realreport 1.0.3 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{h}from"@wooritech/rockhammer";import matchurl from"match-url-wildcard";var extendStatics$1=function(e,t){return extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics$1(e,t)};function __extends$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics$1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var ERR_URL="https://real-report.com/errors",error=function(e,t,r){var i="RealReport Error #".concat(e," : ").concat(ERR_URL,"#").concat(e," ").concat(null!=r?r:"");if(t)throw new Error(i);return window.console&&console.warn(i),i},licWarn=function(e){return"RealReport를 사용하려면 도움말을 참조하세요.\nhttps://real-report.com/licenses (".concat(null==e?void 0:e.message,")")};const error$1=error;var dom=location?location.hostname:void 0,validUrl=function(e){return Array.isArray(e)?e.every(validUrl):!(e.startsWith(".")||e.endsWith(".")||e.endsWith("*")||-1!==e.indexOf(".*.")||-1!==e.indexOf("..")||-1!==e.indexOf("*.com")||-1!==e.indexOf("*.co.kr")||-1!==e.indexOf("*.kr")||-1!==e.indexOf("*.net"))};const dm=function(e){var t=e.split(",").filter(Boolean);return!!validUrl(t)&&(console.log(dom,t,matchurl(dom,t)),dom||error$1(214,!0,"Unknown host domain"),matchurl(dom,t))},getL=function(){return"undefined"!=typeof process&&process.env?process.env.realReportLic:realReportLic||void 0};var ReportViewBase=function(){this.cm=!1;var e=null,t="";try{t="undefined"!=typeof process&&process.env?process.env.realReportLic:realReportLic||void 0,e=new h(t)}catch(e){return void error$1(200,!0,licWarn(e))}this.cm=null!==e&&e.validate([{name:"RealReport",lic:["Enterprise"]}])&&dm(e.lic.server)||e.validate([{name:"RealReport",lic:["Subscription","Limited","Evaluation"]}])&&!e.expired("expire",1)&&dm(e.lic.server),this.cm||error$1(200,!0,licWarn())};const ReportViewBase$1=ReportViewBase,$_instanceOf=function(e,t){return"object"==typeof e&&Object.prototype.toString.call(e).indexOf(t)>=0};"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});let $$_hash=0;class Base{constructor(){this.$_hash=$$_hash++,this.$_disposed=!1,this.$_disposing=!1}dispose(){return this.$_disposed||this.$_disposing||(this.$_disposed=!0,this.$_disposing=!0,this._doDispose()),null}_doDispose(){}get disposing(){return this.$_disposing}get hash(){return this.$_hash}get shash(){return String(this.$_hash)}isMe(e){return e==this.$_hash}$_getters(e){const t=[],r=Object.getOwnPropertyNames(e);for(let i=0,s=r.length;i<s;i++){const s=r[i],A=Object.getOwnPropertyDescriptor(e,s);A&&A.get&&t.push(s)}return t}doAssignSimple(e){return!1}assignFrom(e){let t=Object.getPrototypeOf(this);if(e instanceof Base){let r=Object.getPrototypeOf(e),i={};for(;r&&r.constructor!=Base;){let s=this.$_getters(r);for(let A=0,n=s.length;A<n;A++){const n=s[A];if(!(n in i)){i[n]=null;let s=Object.getOwnPropertyDescriptor(t,n);if(s){if(s.set){const t=Object.getOwnPropertyDescriptor(r,n),i=t&&t.get;i&&s.set.call(this,i.call(e))}}else{let i=Object.getPrototypeOf(t);for(;i;){let t=Object.getOwnPropertyDescriptor(i,n);if(t){if(t.set){const i=Object.getOwnPropertyDescriptor(r,n),s=i&&i.get;s&&t.set.call(this,s.call(e))}i=null}else i=Object.getPrototypeOf(i)}}}}r=Object.getPrototypeOf(r)}}else if(!this.doAssignSimple(e))for(let r in e){let i=Object.getOwnPropertyDescriptor(t,r);if(i)i.set&&i.set.call(this,e[r]);else{let i=Object.getPrototypeOf(t);for(;i;){let t=Object.getOwnPropertyDescriptor(i,r);t?(t.set&&t.set.call(this,e[r]),i=null):i=Object.getPrototypeOf(i)}}}}extend(e){for(let t in e)t in this&&(this[t]=e[t])}toProxy(){const e={};let t=Object.getPrototypeOf(this);for(;t&&t.constructor!=Base;){let r=this.$_getters(t);for(let i=0,s=r.length;i<s;i++){const s=r[i];let A=Object.getOwnPropertyDescriptor(t,s);if(A)A.get&&A.set&&(e[s]=A.get.call(this));else{let r=Object.getPrototypeOf(t);for(;r;){let t=Object.getOwnPropertyDescriptor(r,s);t?(t.get&&t.set&&(e[s]=t.get.call(this)),r=null):r=Object.getPrototypeOf(r)}}}t=Object.getPrototypeOf(t)}return e}toString(){return this.constructor.name}}class EventAware extends Base{constructor(){super(),this._listeners=[]}_doDispose(){for(let e of this._listeners)this.removeListener(e);return this._listeners=null,super._doDispose()}get listenerCount(){return this._listeners.length}addListener(e){return null!=e&&this._listeners.indexOf(e)<0&&this._listeners.push(e),this}removeListener(e){if(this._listeners&&null!=e){const t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}return this}isListener(e){return this._listeners&&this._listeners.indexOf(e)>=0}clearListener(){for(let e of this._listeners)this.removeListener(e);this._listeners.length=0}fireEvent(e,...t){let r=Array.prototype.slice.call(arguments,0);r[0]=this;for(let t=0,i=this._listeners.length;t<i;t++){let i=this._listeners[t],s=i[e];s&&s.apply(i,r)}}fireConfirmEvent(e,...t){let r=Array.prototype.slice.call(arguments,0);r[0]=this;for(let t=0,s=this._listeners.length;t<s;t++){let s=this._listeners[t],A=s[e];if(A){var i=A.apply(s,r);if("boolean"==typeof i&&!i)return!1}}return!0}fireMessageEvent(e,...t){let r=Array.prototype.slice.call(arguments,0);r[0]=this;for(let t=0,i=this._listeners.length;t<i;t++){let i=this._listeners[t],s=i[e];if(s){const e=s.apply(i,r);if("string"==typeof e&&e)return e}}return null}fireObjectEvent(e,...t){let r=Array.prototype.slice.call(arguments,0);r[0]=this;for(let t=0,i=this._listeners.length;t<i;t++){let i=this._listeners[t],s=i[e];if(s){const e=s.apply(i,r);if(null!=e)return e}}return null}}class Point{constructor(e=0,t=0){this.x=e,this.y=t}static empty(){return new Point}static create(e=0,t=0){return new Point(e,t)}get isEmpty(){return 0===this.x||0===this.y}clone(){return new Point(this.x,this.y)}equals(e){return e===this||e&&this.x===e.x&&this.y===e.y}setEmpty(){return this.x=this.y=0,this}set(e,t){return this.x=e,this.y=t,this}round(){const e=this.clone();return e.x>>>=0,e.y>>>=0,e}toString(){return"{x: "+this.x+", y: "+this.y+"}"}}class Rectangle{constructor(e=0,t=0,r=0,i=0){this.x=e,this.y=t,this.width=r,this.height=i}static create(e,t,r,i){return new Rectangle(e,t,r,i)}get left(){return this.x}set left(e){const t=e-this.x;this.x+=t,this.width-=t}get right(){return this.x+this.width}set right(e){const t=e-(this.x+this.width);this.width+=t}get top(){return this.y}set top(e){const t=e-this.y;this.y+=t,this.height-=t}get bottom(){return this.y+this.height}set bottom(e){const t=e-(this.y+this.height);this.height+=t}get isEmpty(){return 0===this.width||0===this.height}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}getInner(){return new Rectangle(0,0,this.width,this.height)}equals(e){return e===this||e&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}leftBy(e){return this.x+=e,this.width-=e,this}rightBy(e){return this.width+=e,this}topBy(e){return this.y+=e,this.height-=e,this}bottomBy(e){return this.height+=e,this}shrink(e,t){return this.width-=e,this.height-=t,this}expand(e,t){return this.width+=e,this.height+=t,this}contains(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height}setEmpty(){return this.width=this.height=0,this}move(e=0,t=0){return this.x=e,this.y=t,this}set(e,t,r,i){return this.x=e,this.y=t,this.width=r,this.height=i,this}setWidth(e){return this.width=e,this}copy(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyHorz(e){return this.x=e.x,this.width=e.width,this}copyVert(e){return this.y=e.y,this.height=e.height,this}inflate(e=0,t,r,i){return t=void 0!==t?t:e,r=void 0!==r?r:e,i=void 0!==i?i:t,e&&(this.left=this.x-e),t&&(this.top=this.y-t),r&&(this.right=this.right+r),i&&(this.bottom=this.bottom+i),this}translate(e,t){return this.x+=e,this.y+=t,this}round(){const e=this.clone();return e.x>>>=0,e.y>>>=0,e.width>>>=0,e.height>>>=0,e}union(e){const t=this.clone();return t.left=Math.min(this.x,e.x),t.right=Math.max(this.right,e.right),t.top=Math.min(this.y,e.y),t.bottom=Math.max(this.bottom,e.bottom),t}normalize(){return this.width<0&&(this.x-=this.width,this.width*=-1),this.height<0&&(this.y-=this.height,this.height*=-1),this}intersects(e){return this.x<=e.right&&e.x<=this.right&&this.y<=e.bottom&&e.y<=this.bottom}toString(){return"{x: "+this.x+", y: "+this.y+", width: "+this.width+", height: "+this.height+"}"}}Rectangle.Temp=new Rectangle;const T_MODEL="_m_",T_HEIGHT="$_h",T_WIDTH="$_w",T_GROUP="$_grp",T_ANCHOR="$_anc",T_ANCHOR_POS="$anp",T_SVG="_svg_",T_ALIGN="_align",T_PAGE="_page_";var Align,VerticalAlign,PrintUnit;!function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(Align||(Align={})),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(VerticalAlign||(VerticalAlign={})),function(e){e.PIXEL="px",e.POINT="pt",e.INCH="in",e.CENTCH="cm",e.MILLI="mm"}(PrintUnit||(PrintUnit={}));const $_pixeler={px:e=>e,pt:e=>e*Dimension.HTMLDPI/72,in:e=>e*Dimension.HTMLDPI,mm:e=>e*Dimension.HTMLDPI/25.4,cm:e=>e*Dimension.HTMLDPI/2.54},$_unpixeler={px:e=>e,pt:e=>72*e/Dimension.HTMLDPI,in:e=>e/Dimension.HTMLDPI,mm:e=>25.4*e/Dimension.HTMLDPI,cm:e=>2.54*e/Dimension.HTMLDPI},getPixelsByUnits=function(e,t){return $_pixeler[e](t)},getUnitsByPixels=function(e,t){return $_unpixeler[e](t)};class AlertError extends Error{}class Dimension{constructor(e){if(this._unit=PrintUnit.PIXEL,this._value=NaN,this._fixed=!0,"number"==typeof e)this._value=e;else if("string"==typeof e){const t=e.trim();this._value=parseFloat(e),isNaN(this._value)||(t.endsWith("%")?this._fixed=!1:t.endsWith("pt")?this._unit=PrintUnit.POINT:t.endsWith("in")?this._unit=PrintUnit.INCH:t.endsWith("mm")?this._unit=PrintUnit.MILLI:t.endsWith("cm")&&(this._unit=PrintUnit.CENTCH))}}static create(e){return null==e?null:"string"!=typeof e||(e=e.trim())?new Dimension(e):null}static createDimensions(e){if(e&&(e=e.trim())){const t=e.split(","),r=[];for(let e of t)r.push(e?new Dimension(e):null);return r}}static equals(e,t){return e===t||e&&t&&e.equals(t)}get fixed(){return this._fixed}get unit(){return this._unit}get value(){return this._value}clone(){const e=new Dimension(void 0);return e._fixed=this._fixed,e._unit=this._unit,e._value=this._value,e}equals(e){return e===this||e instanceof Dimension&&(e._fixed==this._fixed&&e._unit==this._unit&&e._value==this._value)}toString(){return isNaN(this._value)?"NaN":this._fixed?this._value+this._unit:this._value+"%"}getValue(){return isNaN(this._value)?"NaN":this._fixed?this.$_getPixel():this._value+"%"}getPixel(e){if(!isNaN(this._value)){let t=this.$_getPixel();return this._fixed||(t=e*t/100),t}return NaN}getFixedPixel(){return isNaN(this._value)?NaN:this.$_getPixel()}$_getPixel(){return $_pixeler[this._unit](this._value)}}Dimension.HTMLDPI=96;class DimensionCollection{constructor(e){if(this._dims=[],this._relative=0,this._fixed=0,this._dirty=!1,e&&(e=e.trim())){const t=e.split(","),r=this._dims=[];for(let e=0;e<t.length;e++){const i=t[e],s=i?new Dimension(i):null;r.push(s)}this.$_refresh()}}get count(){return this._dims.length}get relative(){return this._relative>0}get(e){return this._dims[e]}set(e,t){t!==this._dims[e]&&(this._dims[e]=t,this._dirty=!0)}getSizes(e,t,r,i=!1){this._dirty&&this.$_refresh();const s=this._dims,A=this._values,n=[],o=r?Math.max(0,r.getPixel(t)||0):0;let a=0,l=0,h=0;for(let t=0,r=Math.min(e,s.length);t<r;t++)s[t]&&(s[t].fixed?isNaN(A[t])||(a+=Math.max(0,A[t])):l+=Math.max(0,A[t]));this._dims.forEach(((e,r)=>{const s=this._values[r];if(isNaN(s))n.push(NaN);else if(e.fixed)n.push(Math.max(o,s));else if(isNaN(t))n.push(NaN);else{let e=(t-a)*s/l,r=Math.floor(e);h+=e-r,h>=1&&(r++,h--),n.push(Math.max(o,i?r:e))}}));let c=0,u=0;for(let t=0;t<e;t++){const e=n[t];isNaN(e)?u++:c+=e}if(u>0&&!isNaN(t)){const r=Math.max(0,(t-c)/u);for(let t=0;t<e;t++)isNaN(n[t])&&(n[t]=Math.max(o,r))}return n}getSize(e,t){const r=this._dims[e];if(r){const i=this._values[e];if(!isNaN(i))return r.fixed?i:Math.max(0,(t-this._fixed)*i/this._relative)}return NaN}changeSize(e,t,r,i,s){0!==r&&(this.getSizes(e,i,s),r>0||(r-=r))}$_refresh(){const e=this._values=[];for(let t of this._dims)if(t)if(t.fixed){const r=t.$_getPixel();e.push(r),this._fixed+=r}else e.push(t.value),this._relative+=t.value;else e.push(NaN);this._dirty=!1}$_init(e){this._dims=e.slice(),this.$_refresh()}}var PageBreakMode,ResizeDirection;DimensionCollection.Empty=new DimensionCollection(null),function(e){e.NONE="none",e.BEFORE="before",e.AFTER="after",e.BOTH="both"}(PageBreakMode||(PageBreakMode={})),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e.TOP_LEFT="topLeft",e.BOTTOM_RIGHT="bottomRight",e.TOP_RIGHT="topRight",e.BOTTOM_LEFT="bottomLeft"}(ResizeDirection||(ResizeDirection={})),function(e){e.isLeft=function(t){return t===e.LEFT||t===e.TOP_LEFT||t===e.BOTTOM_LEFT},e.isTop=function(t){return t===e.TOP||t===e.TOP_LEFT||t===e.TOP_RIGHT},e.isEdge=function(t){return t===e.TOP_LEFT||t===e.BOTTOM_RIGHT||t===e.TOP_RIGHT||t===e.BOTTOM_LEFT},e.isIn=function(e,...t){for(let r of t)if(r===e)return!0}}(ResizeDirection||(ResizeDirection={}));const _isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,_isOpera=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,_isWhale=!!window.whale,_isChrome=!!window.chrome&&!_isOpera,_isFirefox=void 0!==window.InstallTrigger,_isSafari=Object.prototype.toString.call(HTMLElement).indexOf("Constructor")>0||!_isChrome&&!_isOpera&&navigator.userAgent.indexOf("Safari")>=0,_isWinSafari=_isSafari&&("Win32"==navigator.platform||navigator.userAgent.indexOf("Windows")>=0),_isIE=!!document.documentMode,_isEdge=navigator.userAgent.toLowerCase().indexOf("edge/")>=0,_isiOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_isChromiumEdge=navigator.userAgent.toLowerCase().indexOf("edg/")>=0&&navigator.userAgent.toLowerCase().indexOf("chrome/")>=0,_ieVer=function(){let e=3,t=document.createElement("div"),r=t.getElementsByTagName("i");for(;t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e",r[0];);return e>4?e:undefined}(),_ieOld=void 0!==_ieVer&&_ieVer<=9,_ieLeg=void 0!==_ieVer&&_ieVer<=8,_ieTen=-1!==navigator.appVersion.indexOf("MSIE 10");navigator.appVersion.indexOf("MSIE 9");const __epoch=(new Date).getTime(),xml_chars={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};let $$_mobile,$$_chkMob;function getWin(e){return e&&e.ownerDocument&&(e.ownerDocument.defaultView||e.ownerDocument.parentWindow)}function getDoc(e){return e&&e.ownerDocument}function getDocWin(e){return e.defaultView||e.parentWindow}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){let r=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>r.length)&&(t=r.length),t-=e.length;let i=r.indexOf(e,t);return-1!==i&&i===t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.__name||(this.__name=this.toString().split("(",1)[0].split(" ")[1]),this.__name}});class Utils{static stopEvent(e,t=!1){e.preventDefault?(e.preventDefault(),e.stopPropagation()):e.returnValue=!1,t&&e.stopImmediatePropagation()}static setDebugging(e,t,r){Utils.$$_trace=e,Utils.$$_debugging=t,Utils.$$_keyLog=r}static isDebugging(){return Utils.$$_debugging}static isTrace(){return this.$$_trace}static log(e,...t){Utils.isDebugging()&&console.log(e,t)}static keyLog(e,...t){Utils.$$_keyLog&&console.log(e,t)}static trace(e,...t){Utils.isTrace()&&console.log(e,t)}static getErrorStack(e){const t=e.stack;return t?t.split("\n").map((e=>e+"<br/>")):""}static getBaseClassName(e){return Object.getPrototypeOf(e.constructor).name}static getBaseCtor(e){return Object.getPrototypeOf(e.constructor).$_ctor}static isObject(e){return e&&"object"==typeof e&&!Array.isArray(e)}static isArray(e){return Array.isArray(e)}static makeArray(e,t=!1){return null!=e?Array.isArray(e)?e:[e]:t?[]:void 0}static getIntArray(e,t=0){const r=[];for(let i=t,s=t+e;i<s;i++)r.push(i);return r}static isValueArray(e){if(Array.isArray(e)){for(let t=e.length-1;t>=0;t--)if(null!=e[t]&&"object"==typeof e[t])return!1;return!0}}static toArray(e){return Array.isArray(e)?e:null!=e?[e]:null}static push(e,t){if(t&&t.length>0)for(let r=0,i=t.length;r<i;r++)e.push(t[r])}static isDefined(e){return null!=e}static isNotDefined(e){return null==e}static isNumber(e){return"number"==typeof e}static isValidNumber(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}static toNumber(e,t=0){return isNaN(e)?t:+e}static getEnumValues(e){return Object.keys(e).map((t=>e[t]))}static compareText(e,t,r=!1){return e=e||"",t=t||"",r&&(e=e.toLocaleLowerCase(),t=t.toLocaleLowerCase()),e>t?1:e<t?-1:0}static getTimeF(){return(new Date).getTime()/1e3}static getTimer(){return(new Date).getTime()-__epoch}static isWhiteSpace(e){return!e||!e.trim()}static pad(e,t,r){return t=Math.max(t||2,1),r=r||"0",new Array(t-String(e).length+1).join(r)+e}static pad16(e,t,r){return t=Math.max(t||2,1),r=r||"0",new Array(t-e.toString(16).length+1).join(r)+e.toString(16)}static pick(...e){const t=e.length;let r;for(let i=0;i<t;i++)if(r=e[i],null!=r)return r}static pickNum(...e){const t=e.length;for(let r=0;r<t;r++)if(!isNaN(e[r])&&null!==e[r])return e[r];return NaN}static included(e,...t){const r=t.length;for(let i=0;i<r;i++)if(t[i]==e)return!0;return!1}static compareTextValue(e,t,r,i){if(e===t)return!0;let s=String(e),A=null==t?void 0:String(t);return!s&&!A||!(!s||!A)&&(r||(s=s.toLowerCase(),A=A.toLowerCase()),i?A.indexOf(s)>=0:s==A)}static cast(e,t){return e instanceof t?e:null}static irandom(e,t){if(void 0!==t){const r=Math.floor(e),i=Math.floor(t);return Math.floor(Math.random()*(i-r)+r)}{const t=Math.floor(e);return Math.floor(Math.random()*t)}}static brandom(){return Math.random()>.5}static srandom(e,t){let r="";const i=this.irandom(e,t);for(let e=0;e<i;e++)r+=String.fromCharCode(this.irandom(97,123));return r}static erandom(e){const t=Object.values(e);return t[this.irandom(t.length)]}static alert(e){window.alert(e)}static throwAlert(e){throw new AlertError(e)}static toInt(e,t){const r=parseInt(e,t||10);return isNaN(r)?0:r}static toFloat(e){const t=parseFloat(e);return isNaN(t)?0:t}static toEven(e){return 1&e?e+1:e}static hex(e,t=2,r="0"){t=Math.max(t||2,1);const i=e.toString(16);return r=r||"0",new Array(t-i.length+1).join(r)+i}static toStr(e){return"number"==typeof e?isNaN(e)?"":String(e):null!=e?String(e):""}static extend(e,t){e=e||{};for(let r in t)e[r]=t[r];return e}static setBounds(e,t,r,i,s){const A=e.style;A.left=t+"px",A.top=r+"px",A.width=i+"px",A.height=s+"px"}static getClientRect(e){const t=e.getBoundingClientRect();return t.cx=e.offsetLeft,t.cy=e.offsetTop,t}static getChildIndex(e){if(e){const t=e.parentNode;if(t){const r=t.children;for(let t=r.length;t--;)if(r[t]===e)return t}}return-1}static clearChildren(e){let t;for(;t=e.lastChild;)e.removeChild(t)}static clearElements(e){let t;for(;t=e.lastChild;)Utils.clearElements(t),e.removeChild(t)}static addChild(e,t){return!(!e||!t||t.parentNode===e)&&(e.appendChild(t),!0)}static removeChild(e,t){return!(!e||!t||t.parentNode!==e)&&(e.removeChild(t),!0)}static remove(e){const t=e&&e.parentElement;t&&t.removeChild(e)}static disableSelection(e){const t=e.style;t["-moz-user-select"]="-moz-none",t["-khtml-user-select"]="none",t["-webkit-user-select"]="none",t["-o-user-select"]="none",t["-ms-user-select"]="none",t["user-select"]="none"}static selectAll(e){if(e&&window.getSelection&&document.createRange){const t=window.getSelection(),r=document.createRange();r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r)}}static setMobile(e){$$_mobile=e}static isMobile(){return void 0!==$$_mobile?$$_mobile:(void 0===$$_chkMob&&($$_chkMob=this.$_checkMobile()),$$_chkMob)}static $_checkMobile(){let e=!1;return(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(e=!0),e||function(t){if((/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),!e&&null!==t.match(/Macintosh/i)){let t=document.createElement("canvas");if(null!==t){let r=t.getContext("webgl")||t.getContext("experimental-webgl");if(r){let t=r.getExtension("WEBGL_debug_renderer_info");if(t){-1!==r.getParameter(t.UNMASKED_RENDERER_WEBGL).indexOf("Apple")&&(e=!0)}}}}}(navigator.userAgent||navigator.vendor||window.opera),e}static getBrowserSize(e){const t=e?e.ownerDocument:document,r=t.defaultView;return{width:r.innerWidth||t.documentElement.clientWidth||t.body.clientWidth,height:r.innerHeight||t.documentElement.clientHeight||t.body.clientHeight}}static move(e,t,r){e.style.left=t+"px",e.style.top=r+"px"}static htmlEncode(e){return document.createElement("a").appendChild(document.createTextNode(e)).parentNode.innerHTML}static detach(e){e&&e.parentNode&&e.parentNode.removeChild(e)}static getSize(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height}}static getScrolled(e){const t=e.body,r=getDocWin(e),i=e.documentElement;return{sx:r.pageXOffset||i.scrollLeft||t.scrollLeft,sy:r.pageYOffset||i.scrollTop||t.scrollTop}}static getOffset(e){const t=e.ownerDocument,r=t.defaultView,i=e.getBoundingClientRect(),s=t.body,A=t.documentElement,n=r.pageYOffset||A.scrollTop||s.scrollTop,o=r.pageXOffset||A.scrollLeft||s.scrollLeft,a=A.clientTop||s.clientTop||0,l=A.clientLeft||s.clientLeft||0,h=i.left+o-l,c=i.top+n-a;return{x:Math.round(h),y:Math.round(c)}}static isAncestorOf(e,t){let r=t;for(;r;){if(r==e)return!0;r=r.parentElement}return!1}static equalNumbers(e,t){return isNaN(e)==isNaN(t)&&!isNaN(e)&&e==t}static equalArrays(e,t){if(e===t)return!0;if(null==e||null==t)return!1;const r=e.length;if(r!=t.length)return!1;for(let i=0;i<r;++i)if(e[i]!==t[i])return!1;return!0}static parseDate(e,t){const r=new Date(e);return isNaN(r.getTime())?t||new Date:r}static isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}static incMonth(e,t){const r=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(r,Utils.month_days[Utils.isLeapYear(e.getFullYear())?1:0][e.getMonth()])),e}static minDate(e,t){return null!==e?e:null!==t?t:e.getTime()<t.getTime()?e:t}static maxDate(e,t){return null!==e?t:null!==t||e.getTime()>t.getTime()?e:t}static setClassName(e,t){t!=e.className&&(e.className=t)}static addClassName(e,t){if(e.classList)e.classList.add(t);else{const r=e.className.split(" ");r.indexOf(t)<0&&r.push(t),e.className=r.join(" ")}}static removeClassName(e,t){if(e.classList)e.classList.remove(t);else{const r=e.className.split(" ");let i;(i=r.indexOf(t))>=0&&r.splice(i,1),e.className=r.join(" ")}}static getBoundingClientRect2(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,left:t.left,right:t.right,width:t.right-t.left,top:t.top,bottom:t.bottom,height:t.bottom-t.top}}static getTextLength(e){let t=0,r=0,i=0;for(;i=e.charCodeAt(r++);t+=i>>7?2:1);return t}static getClassName(e){if(e&&e.constructor)return e.constructor.name||function(e){let t=e.toString();return t=t.substr("function ".length),t=t.substr(0,t.indexOf("(")),t}(e.constructor)}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static setTextProp(e){e.textProp=this.ieAll?"textContent":"innerText"}static isEmpty(e){if(e)for(let t in e)if(e.hasOwnProperty(t))return!1;return!0}static isNotEmpty(e){if(e)for(let t in e)if(e.hasOwnProperty(t))return!0;return!1}static capitalize(e){if("string"!=typeof e)return"";const t=e.charAt(0);return t>="A"&&t<="Z"?e:t.toUpperCase()+e.slice(1)}static uncapitalize(e){if("string"!=typeof e)return"";const t=e.charAt(0);return t>="a"&&t<="z"?e:t.toLowerCase()+e.slice(1)}static labelize(e){if("string"!=typeof e)return"";const t=e.charAt(0);let r=(e=t>="A"&&t<="Z"?e:t.toUpperCase()+e.slice(1)).charAt(0);for(let t=1;t<e.length;t++){const i=e.charAt(t);i>="A"&&i<="Z"&&(r+=" "),r+=i}return r}static escapeXML(e){return e.replace(/[&<>"']/g,(function(e){return xml_chars[e]}))}static deepClone(e){if(null===e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};for(let r of Object.keys(e))t[r]=Utils.deepClone(e[r]);return t}static getCaretOffset(e){const t=e.ownerDocument.getSelection();return t.rangeCount>0?t.focusOffset:0}static getFocused(){let e=document.getSelection().focusNode;for(;e;){if(e instanceof HTMLElement)return e;e=e.parentElement}}static getArray(e,t){const r=[];for(let i=0;i<e;i++)r.push(t);return r}static getNumArray(e,t=0){const r=[];for(let i=0;i<e;i++)r.push(t);return r}static hasSetter(e,t){for(;e;){const r=Reflect.getOwnPropertyDescriptor(e,t);if(r)return r.writable||!!r.set;e=Object.getPrototypeOf(e)}}static dataUriToBinary(e){const t=";base64,",r=e.indexOf(t)+t.length,i=e.substring(r),s=window.atob(i),A=s.length,n=new Uint8Array(new ArrayBuffer(A));for(let e=0;e<A;e++)n[e]=s.charCodeAt(e);return n}static getImageUrl(e){const t=e.backgroundImage;if(t&&t.startsWith('url("'))return t.substring(5,t.length-2)}}function assert(e,t){if(!e)throw new Error(t)}Utils.isIE=_isIE,Utils.isEdge=_isEdge,Utils.ieAll=_isIE||_isEdge,Utils.ieOld=_ieOld,Utils.isMac=_isMac,Utils.isSafari=_isSafari,Utils.isWinSafari=_isWinSafari,Utils.isChrome=_isChrome,Utils.isFirefox=_isFirefox,Utils.isOpera=_isOpera,Utils.ieLeg=_ieLeg,Utils.ieTen=_ieTen,Utils.isiOS=_isiOS,Utils.isChromium=_isChrome||_isChromiumEdge||_isWhale||_isOpera,Utils.TextProp=Utils.ieAll?"innerText":"textContent",Utils.week_days=window.RG_CONST&&window.RG_CONST.WEEKDAYS?window.RG_CONST.WEEKDAYS:["일","월","화","수","목","금","토"],Utils.month_days=[[31,28,31,30,31,30,31,31,30,31,30,31],[31,29,31,30,31,30,31,31,30,31,30,31]],Utils.colonreg=/;(?=(?:[^"]*"[^"]*")*(?![^"]*"))/,Utils.$$_debugging=!1,Utils.$$_keyLog=!1,Utils.$$_trace=null;class VisualElement extends EventAware{constructor(e,t=null,r=null){super(),this._positionable=!0,this._x=0,this._y=0,this._width=0,this._height=0,this._visible=!0,this._styleName="",this._elements=null,this._dirty=!0,this._hovered=!1,this._className="",this._nodraw=!1,this._name=t;let i=this._dom=this._createDom(e);i&&this._initDom(e,i),r&&r(this,i)}_doDispose(){if(this._dom&&(this._removeEventListeners(this._dom),Utils.detach(this._dom),this._dom=null),this._elements){for(let e of this._elements)e.dispose();this._elements.length=0}this._parent=null,super._doDispose()}get positionable(){return this._positionable}set positionable(e){e!=this._positionable&&(this._positionable=e,this.invalidate())}get name(){return this._name}get styleName(){return this._styleName}set styleName(e){e!=this._styleName&&(this._styleName=e,this.resetStyleName())}get container(){return this._parent&&this._parent.container}get parent(){return this._parent}get elements(){return this._elements?this._elements.slice(0):[]}get childCount(){return this._elements?this._elements.length:0}get isSingleton(){return this._parent&&1==this._parent.childCount&&this._parent._elements[0]===this}get x(){return this._x}set x(e){e!=this._x&&(this._x=e,this.invalidate())}get y(){return this._y}set y(e){e!=this._y&&(this._y=e,this.invalidate())}get width(){return this._width}set width(e){(e=Math.max(0,e))!=this._width&&(this._width=e,this.sizeChanged())}get height(){return this._height}set height(e){(e=Math.max(0,e))!=this._height&&(this._height=e,this.sizeChanged())}get right(){return this._x+this._width}get bottom(){return this._y+this._height}get position(){return new Point(this._x,this._y)}get bounds(){return new Rectangle(this._x,this._y,this._width,this._height)}get clientRect(){return new Rectangle(0,0,this._width,this._height)}get visible(){return this._visible}set visible(e){e!=this._visible&&(this._visible=e,this._dom&&(this._dom.style.display=this._visible?this._getCssDisplay():"none"),this.invalidate(!0),this._visibleChanged())}get findable(){return!0}get hovered(){return this._hovered}set hovered(e){e!=this._hovered&&(this._hovered=e,this._hoverChanged())}get isLayer(){return!1}get blockable(){return!1}get mouseX(){const e=this.container;if(e){let t=e._currentX,r=this;for(;r&&void 0!==r;)t-=r._x,r=r._parent;return t}return NaN}get mouseY(){const e=this.container;if(e){let t=e._currentY,r=this;for(;r&&void 0!==r;)t-=r._y,r=r._parent;return t}return NaN}get dom(){return this._dom}get doc(){return getDoc(this._dom)}get style(){return this._dom&&this._dom.style}get offsetWidth(){return this._dom.offsetWidth}get offsetHeight(){return this._dom.offsetHeight}get offsetSize(){return{width:this._dom.offsetWidth,height:this._dom.offsetHeight}}get printable(){return!0}isDom(e){return e===this._dom}containsDom(e){return this._dom.contains(e)}containsClass(e){return this._dom.classList.contains(e)}canHover(){return!0}getChildren(){return this._elements&&this._elements.slice(0)}getChild(e){return this._elements&&this._elements[e]}indexOf(e){return this._elements?this._elements.indexOf(e):-1}get firstChild(){return this._elements&&this._elements[0]}contains(e){return this._elements&&this._elements.indexOf(e)>=0}getAncestor(e){let t=this._parent;for(;t;){if(t instanceof e)return t;t=t._parent}return null}addDom(e){e&&this._dom.appendChild(e)}addChild(e){return this.insertChild(-1,e)}_getParentDom(){return this._dom}insertChild(e,t){if(t&&!this.contains(t)){const r=this._elements||[],i=t._dom,s=this._getParentDom();if(e<0||e>=r.length)s&&i&&s.appendChild(i),r.push(t);else{if(i){const t=this._elements[e]._dom;s&&t&&s.insertBefore(i,t)}r.splice(e,0,t)}return this._elements=r,t._parent=this,t.$_attached(this),this.invalidate(),!0}return!1}removeChild(e){if(e&&this._elements){const t=this._elements.indexOf(e);if(t>=0)return this.removeChildAt(t)===e}return!1}removeChildAt(e){if(e>=0&&e<this.childCount){const t=this._elements[e],r=this._getParentDom();return this._elements.splice(e,1),r&&t._dom&&r.removeChild(t._dom),t._parent=null,t._dirty=!1,t.$_detached(this),this.invalidate(),t}return null}removeLast(){return this._elements&&this._elements.length>0?this.removeChildAt(this._elements.length-1):null}clear(){const e=this._elements;if((e?e.length:0)>0){for(let t of e)t._parent=null,t.$_detached(this);this._elements=[];const t=this._getParentDom();if(t)for(;t.lastChild;)t.removeChild(t.lastChild);return this.invalidate(),!0}return!1}hideAll(){if(this._elements)for(let e of this._elements)e.visible=!1}invalidate(e=!1,t=!1){if(e||!this._dirty){this._dirty=!0;const e=this.container;e&&e.invalidateElement(this)}if(t&&this._elements)for(let t of this._elements)t.invalidate(e,!0)}validate(){this._dirty=!1}invalidateLayout(){const e=this.container;e&&e.invalidateLayout()}getBounds(e=null){return e?e.set(this._x,this._y,this._width,this._height):new Rectangle(this._x,this._y,this._width,this._height)}getClientRect(e=null){return e?e.set(0,0,this._width,this._height):new Rectangle(0,0,this._width,this._height)}containsInBounds(e,t){return e>=this._x&&e<this._x+this._width&&t>=this._y&&t<this._y+this._height}containsInClient(e,t){return e>=0&&e<this._width&&t>=0&&t<this._height}parentToElement(e,t,r){let i=this;for(;i&&i!=e;)t-=i._x,r-=i._y,i=i._parent;return new Point(t,r)}translateBy(e,t=null){let r=e;for(t||(t=new Rectangle(0,0,this._width,this._height));r&&r!==this;)t.x-=r._x,t.y-=r._y,r=r._parent;return t}topBy(e,t){let r=this._y+t,i=this._parent;for(;i&&i!==e;)r+=i._y,i=i._parent;return r}boundsBy(e,t=null){let r=this._x,i=this._y,s=this._parent;for(t&&(r+=t.x,i+=t.y);s&&s!==e;)r+=s._x,i+=s._y,s=s._parent;return t?new Rectangle(r,i,t.width,t.height):new Rectangle(r,i,this._width,this._height)}boundsByContainer(e=null){let t=this._x,r=this._y;e&&(t+=e.x,r+=e.y);let i=this._parent;for(;i&&void 0!==i._x;)t+=i._x,r+=i._y,i=i._parent;return e?new Rectangle(t,r,e.width,e.height):new Rectangle(t,r,this._width,this._height)}pointByContainer(e,t){let r=this._parent;for(;r&&void 0!==r._x;)e+=r._x,t+=r._y,r=r._parent;return new Point(e+this._x,t+this._y)}containerToElement(e,t){let r=this;for(;r;)e-=r._x,t-=r._y,r=r._parent;return new Point(e,t)}boundsByScreen(e=null){return e=this.boundsByContainer(e),e=this.container.toScreen(e)}offsetFrom(e){const t=e._dom,r=new Point(this._dom.offsetLeft,this._dom.offsetTop);let i=this._dom.offsetParent;for(;i instanceof HTMLElement&&i!==t;)r.x+=i.offsetLeft,r.y+=i.offsetTop,i=i.offsetParent;return r}hitTest(e,t){return e>=0&&e<this._width&&t>=0&&t<this._height}findChildAt(e,t,r,i){const s=this._elements,A=s?s.length:0;if(A>0)for(let n=A-1;n>=0;n--){const A=s[n];if(A.visible){const s=e-A._x,n=t-A._y;if((r||A.findable)&&(A.isLayer||A.hitTest(s,n))){const e=A.findChildAt(s,n,r,i);if(e)return e;if(!A.isLayer||i&&A.blockable)return A}}}return null}findChildOf(e){if(this._elements)for(let t of this._elements){if(t.isDom(e))return t;const r=t.findChildOf(e);if(r)return r}}move(e,t,r=!1){e==this._x&&t==this._y||(this._x=e,this._y=t,r?(this._dom.style.left=e+"px",this._dom.style.top=t+"px"):this.invalidate())}resize(e,t,r=!1){e==this._width&&t==this._height||(this._width=e,this._height=t,r?this._setSizeStyle(this._dom.style):this.sizeChanged())}setBounds(e,t,r,i){return e==this._x&&t==this._y||(this._x=e,this._y=t,this.invalidate()),this.resize(r,i),this}setBoundsI(e,t,r,i){return t>>=0,r>>=0,i>>=0,(e>>=0)==this._x&&t==this._y||(this._x=e,this._y=t,this.invalidate()),this.resize(r,i),this}setRect(e){return e.x==this._x&&e.y==this._y||(this._x=e.x,this._y=e.y,this.invalidate()),this.resize(e.width,e.height),this}setRectI(e){const t=e.x>>0,r=e.y>>0,i=e.width>>0,s=e.height>>0;return t==this._x&&r==this._y||(this._x=t,this._y=r,this.invalidate()),this.resize(i,s),this}getBoundingRect(){return Utils.getBoundingClientRect2(this._dom)}draw(){this._dirty&&this._dom&&!this._nodraw&&(this._beforeDraw(this._dom),this._doDraw(this._dom),this._afterDraw(this._dom),this._dirty=!1)}drawRecursive(){this.draw();for(let e=0,t=this.childCount;e<t;e++){const t=this._elements[e];t.visible&&t.drawRecursive()}}resetSizeStyle(){this._dom&&this._setSizeStyle(this._dom.style)}getHtml(){return this._dom&&this._dom.outerHTML}setImportantStyle(e,t){this._dom.style.setProperty(e,t,"important")}isAncestorOf(e){let t=e&&e.parent;for(;t;){if(t===this)return!0;t=t.parent}}isAncestorDomOf(e,t=!1){if(t&&this._dom===e)return!0;let r=e.parentElement;for(;r;){if(r===this._dom)return!0;r=r.parentElement}}findDescendantOf(e){for(let t=this.childCount-1;t>=0;t--){let r=this.getChild(t);if(r._dom===e)return r;if(r=r.findDescendantOf(e),r)return r}}setStyles(e){if(e){const t=this._dom.style;for(let r in e)t[r]=e[r]}}get scrollTop(){return this._dom.scrollTop}get scrollLeft(){return this._dom.scrollLeft}scrollDom(e,t){Utils.isIE?(this._dom.scrollTop=t,this._dom.scrollLeft=e):this._dom.scroll(e,t)}setHint(e){this._dom.title=e}_isTesting(){return VisualElement.Testing}_getElements(){return this._elements}_createDom(e){return e.createElement("div")}_getCssSelector(){return this._styleName}_initDom(e,t){const r=t.style;r.position="absolute",r.boxSizing="border-box",this._addEventListeners(t)}_addEventListeners(e){}_removeEventListeners(e){}$_attached(e){this._doAttached(e)}_doAttached(e){}$_detached(e){this._doDetached(e)}_doDetached(e){}_isEmptySize(){return!1}_setSizeStyle(e){this._isEmptySize()?(e.width="",e.height=""):(e.width=isNaN(this._width)?"":this._width+"px",e.height=isNaN(this._height)?"":this._height+"px")}setPrintStyles(){const e=this._dom.style;isNaN(this._x)||(e.left=this._x+"px"),isNaN(this._y)||(e.top=this._y+"px"),isNaN(this._width)||(e.width=this._width+"px"),isNaN(this._height)||(e.height=this._height+"px")}_getCssDisplay(){return"block"}resetStyleName(){this._setClassName(this._dom)}_setClassName(e){let t=this._getCssSelector();t!=this._className&&(this._className=t,(e||this._dom).className=t||"")}replaceDom(e){const t=this._dom,r=t.parentElement;r.removeChild(t),r.appendChild(e),this._dom=e}cloneNode(){return this._dom.cloneNode(!0)}applyBounds(){let e=this._dom.style;e.left=this._x+"px",e.top=this._y+"px",this._setSizeStyle(e)}_beforeDraw(e){this._setClassName(e);let t=e.style;this._positionable?(t.left=this._x+"px",t.top=this._y+"px"):(t.left="",t.top=""),this._setSizeStyle(t)}_doDraw(e){}_afterDraw(e){}_hoverChanged(){}_visibleChanged(){}sizeChanged(){this.invalidate(!0,!0),this._doSizeChanged()}_doSizeChanged(){}}VisualElement.Testing=!1;class LayerElement extends VisualElement{get isLayer(){return!0}_doDraw(e){}}const DRAG_THRESHOLD=3;class VisualTool extends Base{constructor(e,t){super(),this._clickX=0,this._clickY=0,this._mouseX=0,this._mouseY=0,this._owner=e,this._name=t,this._previous=null}_doDispose(){this._dragTracker=null,this._previous=null,this._owner=null,this._mouseEventTarget=null,super._doDispose()}get owner(){return this._owner}get name(){return this._name}get previous(){return this._previous}get dragTracker(){return this._dragTracker}set dragTracker(e){e!==this._dragTracker&&(this._dragTracker&&this._dragTracker.deactivate(),this._dragTracker=e,this._dragTracker&&this._dragTracker.activate())}get dragging(){return this._dragTracker&&this._dragTracker.dragging}get mouseX(){return this._mouseX}get mouseY(){return this._mouseY}get mouseEventTarget(){return this._mouseEventTarget}findElementAt(e,t,r,i=!1){return this._owner.findElementAt(e,t,r,i)}findElementOf(e){return this._owner.findElementOf(e)}activate(e){this._doActivated(e)}deactivate(){this._doDeactivated()}keyDown(e){return this._doKeyDown(e)}keyUp(e){return this._doKeyUp(e)}keyPress(e){return this._doKeyPress(e)}mouseDown(e){const t=this._mouseX=this._clickX=e.mouseX,r=this._mouseY=this._clickY=e.mouseY;this.dragging&&this._stopDragTracker(t,r,!1);const i=this._doMouseDown(e);return this._dragTracker&&this._dragTracker.startWhenCreated&&this._startDragTracker(t,r,e.shiftKey,e.altKey),i}dragFrom(e,t){}dropFrom(e,t){}mouseMove(e){const t=this._mouseX=e.mouseX,r=this._mouseY=e.mouseY,i=this._dragTracker,s="mousemove"===e.type?e.buttons:"touchmove"===e.type?1:void 0;if(i)if(i.dragging)if(null==s||s>0||Utils.ieOld&&s>=0){if(!i.drag(this._mouseEventTarget,t,r)){const s=i.getNextRequest(t,r);s&&(this._stopDragTracker(t,r,!0),this.dragTracker=this._getDragTracker(s,t,r),this._startDragTracker(t,r,e.shiftKey,e.altKey))}}else this._stopDragTracker(t,r,!0);else Math.abs(t-this._clickX)>=3||Math.abs(r-this._clickY)>=3?this._startDragTracker(t,r,e.shiftKey,e.altKey):this._doMouseMove(e);else this._doMouseMove(e)}mouseUp(e){try{const t=this._mouseX=e.mouseX,r=this._mouseY=e.mouseY;this.dragging?this._stopDragTracker(t,r,!1):this._doMouseUp(e)}finally{this._dragTracker=null}}mouseEnter(e){this._doMouseEnter(e)}mouseLeave(e){this._doMouseLeave(e)}mouseOver(e){this._doMouseOver(e)}mouseOutside(){this._doMouseOutside()}mouseWheel(e){return this._doMouseWheel(e)}contextMenu(e){return this._doContextMenu(e)}click(e){this._doClick(e)}dblclick(e){this._doDblClick(e)}setFocus(e){!Utils.isMobile()&&this._doSetFocus(e)}focusLeave(e){this._doFocusLeave(e)}isMouseEventTarget(e){return e._dom===this._mouseEventTarget}_doActivated(e){}_doDeactivated(){}_doKeyDown(e){return!1}_doKeyUp(e){return!1}_doKeyPress(e){return!1}_doMouseDown(e){return!1}_doMouseMove(e){}_doMouseUp(e){}_doMouseEnter(e){}_doMouseLeave(e){}_doMouseOver(e){}_doMouseOutside(){}_doMouseWheel(e){return!1}_doContextMenu(e){}_doClick(e){}_doDblClick(e){}_doSetFocus(e){}_doFocusLeave(e){}_getDragTracker(e,t,r){return null}_startDragTracker(e,t,r,i){this._dragTracker&&(this._dragTracker.start(this._mouseEventTarget,e,t,r,i)?this._doDragTrackerStarted(this._dragTracker):this._dragTracker=null)}_stopDragTracker(e,t,r){if(this.dragging){const i=this._dragTracker;r?i.cancel():i.drop(this._mouseEventTarget,e,t),this.dragTracker=null,this._doDragTrackerFinished(i,r)}}_doDragTrackerStarted(e){}_doDragTrackerFinished(e,t){}_findTableCell(e){return this.owner.getTableCell(e||this.mouseEventTarget)}_doTouchStart(e){}_doTouchMove(e){}_doTouchEnd(e){}_doTouchCancel(e){}}class DragTracker extends Base{constructor(e,t){super(),this._active=!1,this._completed=!1,this._dragging=!1,this._currentX=0,this._currentY=0,this._container=e,this._name=t}get container(){return this._container}get name(){return this._name}get active(){return this._active}get dragging(){return this._dragging}get startWhenCreated(){return!1}get completed(){return this._completed}get linkable(){return!1}get cursor(){}activate(){this._active||(this._doActivate(),this._active=!0)}deactivate(){this._active&&(this.cancel(),this._doDeactivate(),this._active=!1)}start(e,t,r,i,s){return this.cancel(),!(!this._active||!this._doStart(e,t,r,i,s))&&(this._currentX=this._startX=t,this._currentY=this._startY=r,this._dragging=!0,this._completed=!1,this._showFeedback(t,r),this.container.setCursor(this.cursor||""),!0)}drag(e,t,r){return!(!this._dragging||(this._currentX=t,this._currentY=r,!this._doDrag(e,t,r)))&&(this.container.setCursor(this.cursor||""),this._moveFeedback(t,r),!0)}cancel(){try{if(this._dragging)try{this._dragging=!1,this._doCanceled(this._currentX,this._currentY)}finally{this.end()}}finally{this._hideFeedback()}}drop(e,t,r){try{if(this._dragging)try{this._currentX=t,this._currentY=r,this._dragging=!1,this._canAccept(e,t,r)?(this._doCompleted(e,t,r),this._completed=!0):this._doCanceled(t,r)}finally{this.end()}}finally{this._hideFeedback()}}end(){this.container.setCursor(""),this._doEnded()}getRequest(){return null}getNextRequest(e,t){return null}get startX(){return this._startX}get startY(){return this._startY}get currentX(){return this._currentX}get currentY(){return this._currentY}_showFeedback(e,t){}_moveFeedback(e,t){}_hideFeedback(){}_doActivate(){}_doDeactivate(){}_doStart(e,t,r,i,s){return!0}_doDrag(e,t,r){return!0}_doCanceled(e,t){}_canAccept(e,t,r){return!0}_doCompleted(e,t,r){}_doEnded(){}}var ScrollEventType;!function(e){e.LINE="line",e.PAGE="page",e.THUMB_TRACK="thumbTrack",e.THUMB_END="thumbEnd"}(ScrollEventType||(ScrollEventType={}));class ScrollElement extends VisualElement{constructor(e,t,r){super(e,r),this._scrollBar=t}_doDispose(){this._scrollBar=null,super._doDispose()}get scrollBar(){return this._scrollBar}get vertical(){return this._scrollBar.vertical}_doDraw(e){this._doRender(e)}_doRender(e){}_changed(){this.invalidate()}}class ScrollTrack extends ScrollElement{constructor(e){super(e.doc,e,"scrollTrackView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rg-scrolltrack"}}class ScrollButton extends ScrollElement{constructor(e,t){super(e.doc,e,"scrollButtonView"),this._enabled=!0,this._far=t}get enabled(){return this._enabled}set enabled(e){e!=this._enabled&&(this._enabled=e,this._changed())}get far(){return this._far}_getCssSelector(){return this.scrollBar.vertical?this._far?"rg-scroll-down":"rg-scroll-up":this._far?"rg-scroll-right":"rg-scroll-left"}}class ScrollThumb extends ScrollElement{constructor(e){super(e.doc,e,"scrollThumbView")}_getCssSelector(){return"rg-scrollthumb"}}class ScrollBar extends VisualElement{constructor(e,t=!1){super(e.doc,"scrollBarView"),this._lineScrollSize=1,this._pageScrollSize=1,this._minThumbSize=20,this._min=0,this._max=0,this._pos=0,this._page=0,this._maxPosition=0,this._buttonSize=20,this._needLayout=!0,this._tipView=null,this._container=e,this._vertical=t,this._track=new ScrollTrack(this),this.addChild(this._track),this._thumb=new ScrollThumb(this),this.addChild(this._thumb),this._nearButton=new ScrollButton(this,!1),this.addChild(this._nearButton),this._farButton=new ScrollButton(this,!0),this.addChild(this._farButton)}_doDispose(){this._track=this._track.dispose(),this._thumb=this._thumb.dispose(),this._nearButton=this._nearButton.dispose(),this._farButton=this._farButton.dispose(),super._doDispose()}get container(){return this._container}get lineScrollSize(){return this._lineScrollSize}set lineScrollSize(e){(e=Math.max(1,e))!=this._lineScrollSize&&(this._lineScrollSize=e)}get pageScrollSize(){return this._pageScrollSize}set pageScrollSize(e){(e=Math.max(1,e))!=this._pageScrollSize&&(this._pageScrollSize=e)}get minThumbSize(){return this._minThumbSize}set minThumbSize(e){(e=Math.max(8,e))!=this._minThumbSize&&(this._minThumbSize=e,this.invalidateLayout())}get vertical(){return this._vertical}get pos(){return this._pos}get maxPosition(){return this._maxPosition}get buttonSize(){return this._buttonSize}set tipView(e){this._tipView=e}layoutContent(){this._needLayout&&(this._needLayout=!1,this._doLayoutContent())}setProperties(e,t,r){e=Math.max(0,e),t=Math.max(e,t),e==this._min&&t==this._max&&r==this._page||(this._min=e,this._max=t,this._page=r,this._pos=Math.min(this._max,Math.max(this._min,this._pos)),this._maxPosition=Math.max(0,this._max-this._page),this.invalidate(),this._needLayout=!0)}setPosition(e,t=!0){(e=Math.min(this._maxPosition,Math.max(this._min,e)))!=this._pos&&(this._pos=e,this.invalidate(),this._needLayout=!0,t&&this.layoutContent())}ptInTrack(e,t,r){const i=this.containerToElement(e,t);if(this._vertical){if(i.y>=this._nearButton.height&&i.x<this._farButton.y)return!r&&i.y<this._thumb.y||r&&i.y>=this._thumb.bottom}else if(e>=this._nearButton.width&&e<this._farButton.x)return!r&&i.x<this._thumb.x||r&&i.x>=this._thumb.right;return!1}setText(e){if(this._tipView&&e){let t,r;if(this._tipView.show(),this._tipView.setText(e),this._vertical){let e=this._tipView.width();t=this.x-e-5,r=this._thumb.y}else{let e=this._tipView.height();t=this._thumb.x,r=this.y-e-5}this._tipView.move(t,r)}}_getCssSelector(){return this._vertical?"rg-vscrollbar":"rg-hscrollbar"}draw(){super.draw()}_doDraw(e){}_doSizeChanged(){this.invalidateLayout()}invalidateLayout(){this._needLayout=!0,super.invalidateLayout()}_doLayoutContent(){const e=this._vertical,t=this._buttonSize,r=this.height,i=this.width,s=(e?r:i)-2*t,A=Math.min(s,Math.max(this._minThumbSize,Math.floor(s*this._page/(this._max-this._min+1)))),n=t+Math.min(s-A,Math.max(0,Math.floor((s-A)*this._pos/(this._maxPosition-this._min))));this._track.setBounds(0,0,i,r),e?(this._nearButton.setBounds(0,0,i,t),this._farButton.setBounds(0,r-t,i,t),A<=s&&this._thumb.setBounds(2,n,i-4,A)):(this._nearButton.setBounds(0,0,t,r),this._farButton.setBounds(i-t,0,t,r),A<=s&&this._thumb.setBounds(n,2,A,r-4))}_doScroll(e,t,r){this.fireEvent(ScrollBar.SCROLLED,e,t,r)}}ScrollBar.SCROLLED="onScrollBarScrolled";class ScrollThumbTracker extends DragTracker{constructor(e){super(e,"scrollThumbTracker")}_doDispose(){this._thumb=this._thumb&&this._thumb.dispose(),super._doDispose()}get thumb(){return this._thumb}set thumb(e){this._thumb=e}get startWhenCreated(){return!0}_doStart(e,t,r){const i=this._thumb.scrollBar,s=i.containerToElement(t,r);return i.vertical?this._offset=s.y-this._thumb.y:this._offset=s.x-this._thumb.x,!0}_doDrag(e,t,r){return this.$_doScroll(t,r,ScrollEventType.THUMB_TRACK)}_doCompleted(e,t,r){return this.$_doScroll(t,r,ScrollEventType.THUMB_END)}_doCanceled(e,t){}_doEnded(){}$_doScroll(e,t,r){const i=this._thumb.scrollBar,s=i._maxPosition-i._min+1,A=i._buttonSize,n=i.containerToElement(e,t);if(i.vertical){const e=i.height-2*A-this._thumb.height;if(e<=0)return!1;n.y-=this._offset,n.y=(n.y-A)*s/e,i._doScroll(r,0,Math.floor(n.y))}else{const e=i.width-2*A-this._thumb.width;if(e<=0)return!1;n.x-=this._offset,n.x=(n.x-A)*s/e,i._doScroll(r,0,Math.floor(n.x))}return!0}}class ScrollButtonTimer extends EventAware{constructor(){super(),this._active=!1,this._timer=void 0,this._ready=!1}get active(){return void 0!==this._timer}start(e){this._button=e,this._scrollBar=e.scrollBar,this._active=!0,setTimeout(function(){this._ready&&(this._ready=!1,this._timer=setInterval(function(){this._active&&this.$_fireEvent()}.bind(this),20))}.bind(this),200),this._ready=!0,this.$_fireEvent()}move(e,t){const r=this._button.containerToElement(e,t);this._active=this._button.containsInClient(r.x,r.y)}stop(){this._ready=!1,this._timer&&(clearInterval(this._timer),this._timer=void 0)}$_fireEvent(){let e=this._button.far?1:-1,t=ScrollEventType.LINE;this._scrollBar._doScroll(t,this._scrollBar.lineScrollSize*e,0)}}class ScrollTrackTimer extends Base{constructor(){super(),this._active=!1,this._timer=void 0,this._ready=!1,this._mouseX=0,this._mouseY=0}get active(){return this._active}start(e,t,r,i){this._scrollBar=e,this._far=t,this._active=!0,setTimeout(function(){this._ready&&(this._ready=!1,this._timer=setInterval(function(){this._active&&this.$_fireEvent()}.bind(this),50))}.bind(this),200),this._ready=!0;const s=this._scrollBar.containerToElement(r,i);this._mouseX=s.x,this._mouseY=s.y,this.$_fireEvent()}move(e,t){const r=this._scrollBar.containerToElement(e,t);this._mouseX=r.x,this._mouseY=r.y,this._active=this._scrollBar.ptInTrack(r.x,r.y,this._far)}stop(){this._ready=!1,this._timer&&clearInterval(this._timer)}$_fireEvent(){let e=null,t=0;const r=this._scrollBar._thumb;if(this._scrollBar.vertical){const i=this._mouseY;this._far&&i>r.bottom?(e=ScrollEventType.PAGE,t=1):!this._far&&i<r.y&&(e=ScrollEventType.PAGE,t=-1)}else{const i=this._mouseX;this._far&&i>r.right?(t=1,e=ScrollEventType.PAGE):i<r.x&&(e=ScrollEventType.PAGE,t=-1)}0!=t&&this._scrollBar._doScroll(e,this._scrollBar.pageScrollSize*t,0)}}class ScrollTool extends VisualTool{constructor(e){super(e,"scrollTool"),this._buttonTimer=new ScrollButtonTimer,this._trackTimer=new ScrollTrackTimer,this._thumbTracker=new ScrollThumbTracker(e)}_doDispose(){this._thumbTracker.cancel(),this._thumbTracker=this._thumbTracker.dispose(),this._buttonTimer.stop(),this._buttonTimer=this._buttonTimer.dispose(),this._trackTimer.stop(),this._trackTimer=this._trackTimer.dispose(),super._doDispose()}_doMouseDown(e){const t=e.mouseX,r=e.mouseY;this._clickElement=null,this._buttonTimer.stop(),this._trackTimer.stop();const i=this.findElementAt(t,r,!1);if(i instanceof ScrollElement){if(this._clickElement=i,i instanceof ScrollButton)this._buttonTimer.start(i);else if(i instanceof ScrollThumb)this._thumbTracker.thumb=i,this.dragTracker=this._thumbTracker;else if(i instanceof ScrollTrack){const e=i.scrollBar.ptInTrack(t,r,!0);this._trackTimer.start(i.scrollBar,e,t,r)}return!0}}_doMouseMove(e){const t=e.mouseX,r=e.mouseY,i=this._clickElement;i instanceof ScrollButton&&this._buttonTimer.active?this._buttonTimer.move(t,r):i instanceof ScrollTrack&&this._trackTimer.active&&this._trackTimer.move(t,r)}_doMouseUp(e){this._clickElement=null,this._buttonTimer.stop(),this._trackTimer.stop()}_doTouchStart(e){this.mouseDown(e),e.preventDefault()}_doTouchEnd(e){this.mouseUp(e)}_doTouchMove(e){this.mouseMove(e)}}class UIElement extends EventAware{constructor(e,t,r="div"){super(),this._elements=[],this._dom=r&&e.createElement(r),this._dom.className=t,this._prepareDom(e,this._dom)}get dom(){return this._dom}get parent(){return this._parent}get container(){return this._parent&&this._parent.container}get x(){return this._dom.offsetLeft}set x(e){this._dom.style.left=e+"px"}get y(){return this._dom.offsetTop}set y(e){this._dom.style.top=e+"px"}get width(){return this._dom.offsetWidth}get height(){return this._dom.offsetHeight}isDom(e){return e===this._dom}setClassName(e){this._dom.className=e}setHint(e){this._dom.title=e}setStyle(e,t){this._dom.style[e]=t}clearStyle(e){this._dom.style[e]=""}setStyles(e){if(e){const t=this._dom.style;for(let r in e){const i=e[r];t[r]=void 0===i?"":i}}}setImportantStyle(e,t){this._dom.style.setProperty(e,t,"important")}getBounds(){return this._dom.getBoundingClientRect()}setBounds(e,t,r,i){Utils.extend(this._dom.style,{left:e+"px",top:t+"px",width:r+"px",height:i+"px"})}setRect(e){this.setBounds(e.x,e.y,e.width,e.height)}move(e,t){return this._dom.style.left=e+"px",this._dom.style.top=t+"px",this}setXP(e){this._dom.style.left=e+"%"}setYP(e){this._dom.style.top=e+"%"}clear(){if(this._elements.length>0){for(let e of this._elements)this._dom.removeChild(e._dom),e._parent=null;this._elements=[]}}addChild(e){if(e&&!this._elements.includes(e,0))return this._addChild(e),!0}removeChild(e){return e&&this._removeChild(e)}removeLast(){if(this._elements.length>0){const e=this._elements[this._elements.length-1];return this._removeChild(e),e}}containerToLocal(e=0,t=0){const r=this.container._containerDiv;let i=this._dom,s=this._dom.offsetParent;for(;s&&(e-=i.offsetLeft,t-=i.offsetTop,s!==r);)i=s,s=i.offsetParent;return{x:e,y:t}}setText(e){this._dom.textContent=e}hide(){this._dom.style.display="none"}show(e="inherit"){this._dom.style.display=e}_addChild(e){this._elements.push(e),this._dom.appendChild(e._dom),e._parent=this}_removeChild(e){const t=this._elements.indexOf(e);if(t>=0)return this._dom.removeChild(e._dom),e._parent=null,this._elements.splice(t,1),!0}_prepareDom(e,t){}}class RootElement extends VisualElement{constructor(e,t,r){super(e,t),this._contaner=r}get container(){return this._contaner}_getCssSelector(){return"root-element"}_initDom(e,t){super._initDom(e,t),t.style.width="100%",t.style.height="100%"}_setSizeStyle(e){}_doDraw(e){}}class VisualContainer extends EventAware{constructor(e){super(),this._disabled=!1,this._updateRequested=!1,this._layoutNeeded=!1,this._invalidated=!1,this._scrolling=!1,this._captured=!1,this._focusing=!1,this._focusingTarget=null,this._hovered=null,this._currentX=0,this._currentY=0,this._rendered=0,this._defaultCursor="default",this._drawing=!1,this._offsetX=0,this._offsetY=0,this._eventHandlers={},this._eventNodes=[],this._contextMenu=null,this._containerRender=this._render.bind(this),this._scrollTool=new ScrollTool(this),this._cursor="default",this._testWidth=NaN,this._testHeight=NaN,this._saveDisplay="",this.$_testing=!1,this.$_prepareContainer(e),this.invalidateLayout(),this._registerEventHandlers(this._containerDom),this.activeTool=this._defaultTool=this._createDefaultTool(),VisualContainer.$_Containers[this.$_hash]=this}getMouseContainer(){return VisualContainer.$_Containers[VisualContainer.$_mouseContainer]}static getActiveGrid(){const e=VisualContainer.$_Containers[VisualContainer.$_ActiveGrid];return e&&e._gridView}static setActiveGrid(e){if(e!==VisualContainer.$_ActiveGrid){let t,r=VisualContainer.$_Containers[e];if(r=r&&r._gridView,window.RealGrid&&(t=window.RealGrid.onActiveGridChanged)){let e=VisualContainer.$_Containers[VisualContainer.$_ActiveGrid];e=e&&e._gridView,t(e&&e.handler,r&&r.handler)}r._fireGridActivated()}VisualContainer.$_ActiveGrid=e}static clearContainer(e){VisualContainer[e]&&delete VisualContainer[e],VisualContainer.$_ActiveGrid===e&&(VisualContainer.$_ActiveGrid=null)}static disposeStatic(){this.$_Containers=null,this.$_ActiveGrid=null}_doDispose(){this._activeTool=null,this._defaultTool&&(this._defaultTool=this._defaultTool.dispose()),this._scrollTool&&(this._scrollTool=this._scrollTool.dispose()),this.$_removeListenerAll(null),Utils.detach(this._containerDom),this._containerDom=null,this._doc=null,Utils.clearElements(this._containerDiv),super._doDispose(),delete VisualContainer.$_Containers[this.$_hash]}get doc(){return this._doc}get dom(){return this._containerDom}get visible(){return"none"!==getComputedStyle(this._containerDiv).display}set visible(e){e!=this.visible&&(e?this._containerDiv.style.display=this._saveDisplay:(this._saveDisplay=getComputedStyle(this._containerDiv).display,this._containerDiv.style.display="none"))}get disabled(){return this._disabled}set disabled(e){e!=this._disabled&&(this._disabled=e,this._doDisabledChanged())}get printing(){return!1}get activeTool(){return this._activeTool}set activeTool(e){if((e=e||this._defaultTool)!=this._activeTool){const t=this._activeTool;t&&t.deactivate(),this._activeTool=e,e&&e.activate(t)}}get defaultTool(){return this._defaultTool}get measurer(){return this._measurer}get width(){return this._containerDom.clientWidth}get height(){return this._containerDom.clientHeight}get scrollHeight(){return this._containerDiv.scrollHeight}get scrollTop(){return this._containerDiv.scrollTop}get scrolling(){return this._scrolling}findElementAt(e,t,r,i){return this._rootElement.findChildAt(e-this._rootElement._x,t-this._rootElement._y,r,i)}findElementOf(e){return this._rootElement.findChildOf(e)}getTableCell(e){return null}setCursor(e){e!=this._cursor&&(this._containerDom.style.cursor=this._cursor=e)}setFocus(){this._containerDom.focus()}updateNow(){this._layoutNeeded=!0,this.invalidate(!0),this._render(Utils.getTimer())}toScreen(e){return e.x+=this._offsetX,e.y+=this._offsetY,e}pointToScreen(e,t){return{x:e+this._offsetX,y:t+this._offsetY}}getBound(){const e=this._containerDom.getBoundingClientRect();return new Rectangle(e.left,e.top,e.width,e.height)}getHtml(){return this._containerDom.outerHTML}addElement(e){return this._rootElement.addChild(e)}removeElement(e){return this._rootElement.removeChild(e)}addFeedback(e){return this._feedbackElement.addChild(e)}addFeedbacks(...e){for(let t of e)this._feedbackElement.addChild(t)}removeFeedback(e){return this._feedbackElement.removeChild(e)}removeFeedbacks(...e){for(let t of e)this._feedbackElement.removeChild(t)}resetSize(e=null){this.updateNow(),e&&setTimeout(e,0)}measureText(e,t){return this._textMeasurer.className=e,this._textMeasurer.innerHTML=t,this._textMeasurer.offsetWidth}$_refreshCheckMeasurer(){if(!this._checkRect){const e=this._checkMeasurer.getBoundingClientRect(),t=getComputedStyle(this._checkMeasurer);this._checkRect={width:e.width+parseInt(t.marginLeft)+parseInt(t.marginRight),height:e.height+parseInt(t.marginTop)+parseInt(t.marginBottom)}}return this._checkRect}measureCheckWidth(){return this.$_refreshCheckMeasurer().width}measureCheckHeight(){return this.$_refreshCheckMeasurer().height}contains(e){if(e instanceof Element)return this._containerDom.contains(e)}getDomPosition(e,t){return this.$_testing?{x:0,y:0,width:1,height:1}:this.$_offsetDomPosition(e,{x:0,y:0},t)}$_offsetDomPosition(e,t,r){e instanceof VisualElement&&(e=e._dom);const i=getDocWin(this._doc),s=(r||this._containerDom).getBoundingClientRect(),A=e.getBoundingClientRect(),n=i.getComputedStyle(this._containerDom);return t.x=A.left-s.left-Math.round(parseFloat(n.borderLeftWidth)),t.y=A.top-s.top-Math.round(parseFloat(n.borderTopWidth)),t.width=A.width,t.height=A.height,t}getBoundingRect(e,t=100){const r=Utils.getBoundingClientRect2(e._dom),i=Utils.getBoundingClientRect2(this._containerDom),s=e.offsetSize,A=100/t;return new Rectangle(r.left*A-i.left*A-2,r.top*A-i.top*A-2,s.width,s.height)}$_setTesting(){this.$_testing=!0,VisualElement.Testing=!0}get _isTesting(){return this.$_testing}_doDisabledChanged(){}$_prepareContainer(e){if(!e)throw new Error("container is null!");if($_instanceOf(e,"HTMLDivElement")?this._containerDiv=e:this._containerDiv=document.getElementById(e),!$_instanceOf(this._containerDiv,"HTMLDivElement"))throw new Error("Invalid visual container element: "+e);const t=this._doc=this._containerDiv.ownerDocument,r=getDocWin(t);r.requestAnimationFrame=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||r.msRequestAnimationFrame||function(e){return r.setTimeout(e,10)};const i=this._containerDom=t.createElement("div");let s=i.style;this._cursor=s.cursor,this._containerDiv.appendChild(i),i.className="rr-visual-container",i.setAttribute("tabindex","0"),s.position="relative",s.width="100%",s.height="100%",s.boxSizing="border-box",s.overflow="hidden",s["-webkit-touch-callout"]="none",s["-webkit-user-select"]="none",s["user-select"]="none",s["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",this._rootElement=this._createRootElement(t),i.appendChild(this._rootElement._dom),this._feedbackElement=new UIElement(t,"rr-feedback-container"),i.appendChild(this._feedbackElement._dom),this._feedbackElement.dom.style.zIndex=VisualContainer.FEEDBACK_ZINDEX,this._printRoot=new LayerElement(t,"printRoot"),this._measurer=t.createElement("div"),this._containerDom.appendChild(this._measurer),this._doPrepareContainer(i)}_doPrepareContainer(e){}_createRootElement(e){return new RootElement(e,"root",this)}_createDefaultTool(){return null}isLayoutNeeded(){return this._layoutNeeded}invalidateLayout(e=!1){this._scrolling=this._scrolling||e,this._layoutNeeded||(this._layoutNeeded=!0,this.invalidate(!0))}invalidate(e){if((!this._updateRequested||!this._invalidated)&&(e||!this._drawing)){if(!this._requestTimer&&!this.$_testing){const e=getDocWin(this._doc);this._requestTimer=e.requestAnimationFrame(this._containerRender)}this._updateRequested=!0,this._invalidated=!0}}invalidateElement(e){const t=getDocWin(this._doc);this._drawing||this._updateRequested||(this._requestTimer||this.$_testing||(this._requestTimer=t.requestAnimationFrame(this._containerRender)),this._updateRequested=!0)}invalidateElements(e=!0){this._rootElement.invalidate(e,!0)}refresh(){this.invalidateLayout(),this.invalidateElements()}_render(e){if(!this.disposing){this._updateRequested=!1,this._offsetX=this._containerDom.offsetLeft,this._offsetY=this._containerDom.offsetTop,this._drawing=!0;try{this.$$_render(e)}finally{this._scrolling=!1,this._drawing=!1,this._invalidated=!1,this._requestTimer=null,this._doAfterRender()}}}$$_render(e){const t=this._containerDom,r=isNaN(this._testWidth)?t.clientWidth:this._testWidth,i=isNaN(this._testHeight)?t.clientHeight:this._testHeight;this._layoutChildren(new Rectangle(0,0,r,i)),this._layoutNeeded?(this._doLayout(new Rectangle(0,0,r,i)),this._layoutNeeded=!1):this._doPrepareRender(new Rectangle(0,0,r,i)),this._doRenderHtml(new Rectangle(0,0,r,i))}_layoutChildren(e){}_doLayout(e){}_doAfterRender(){}_doPrepareRender(e){}_doRenderHtml(e){this._doDrawContainer(e),this._drawElement(this._rootElement),this._validateChildren(this._rootElement)}_doDrawContainer(e){}_drawElement(e){e.draw();for(let t=0,r=e.childCount;t<r;t++){const r=e.getChild(t);r.visible&&this._drawElement(r)}}_validateChildren(e){for(let t=0,r=e.childCount;t<r;t++){e.getChild(t).validate()}}_registerEventHandlers(e){const t=getWin(e);e.style.cursor=this._defaultCursor,this.$_addListener(t,"resize",this._resizeHandler.bind(this),!1),this.$_addListener(t,"mousemove",this._mouseMoveHandler.bind(this),!1),this.$_addListener(t,"mouseup",this._mouseUpHandler.bind(this),!1),this.$_addListener(t,"focus",this._focusHandlerFireFox.bind(this),!0),this.$_addListener(t,"focusin",this._focusinHandler.bind(this),!0),this.$_addListener(t,"focusout",this._focusoutHandler.bind(this),!0),this.$_addListener(t,"mousedown",this._globalMouseDownHandler.bind(this),!1),this.$_addListener(e,"keydown",this._keyDownHandler.bind(this),!1),this.$_addListener(e,"keyup",this._keyUpHandler.bind(this),!1),this.$_addListener(e,"keypress",this._keyPressHandler.bind(this),!1),this.$_addListener(e,"click",this._clickHandler.bind(this),!1),this.$_addListener(e,"dblclick",this._dblclickHandler.bind(this),!1),this.$_addListener(e,"mousedown",this._mouseDownHandler.bind(this),!1),this.$_addListener(e,"mouseenter",this._mouseEnterHandler.bind(this),!1),this.$_addListener(e,"mouseleave",this._mouseLeaveHandler.bind(this),!1),this.$_addListener(e,"mouseover",this._mouseOverHandler.bind(this),!1),this.$_addListener(e,"focus",this._focusHandler.bind(this),!1),this.$_addListener(e,"contextmenu",this._contextMenuHander.bind(this),!1),this.$_addListener(e,"blur",this._blurHandler.bind(this),!1),this.$_addListener(e,"selectstart",this._selectstartHandler.bind(this),!1),this.$_addListener(e,"wheel",this._wheelHandler.bind(this),!1)}$_addListener(e,t,r,i){e in this._eventHandlers||(this._eventHandlers[e]={}),t in this._eventHandlers[e]||(this._eventHandlers[e][t]=[]),this._eventHandlers[e][t].push([r,i]),e.addEventListener(t,r,i),this._eventNodes.indexOf(e)<0&&this._eventNodes.push(e)}$_removeListener(e,t){if(e in this._eventHandlers){const r=this._eventHandlers[e];if(t in r){const i=r[t];for(let r=i.length;r--;){const s=i[r];e.removeEventListener(t,s[0],s[1])}}}}$_removeListenerAll(e=null){const t=e?[e]:this._eventNodes;for(let e=0,r=t.length;e<r;e++){const r=t[e];if(r in this._eventHandlers){const e=this._eventHandlers[r];for(let t in e){const i=e[t];for(let e=i.length;e--;){const s=i[e];r.removeEventListener(t,s[0],s[1])}}}}}_unloadHandler(){this.$_removeListenerAll(),this._containerDiv=null,this._containerDom=null}_resizeHandler(e){this._doResized(e),this.invalidateLayout()}_doResized(e){}_isEnabled(){return this._activeTool&&!this._disabled}_keyDownHandler(e){this._isEnabled()&&this._activeTool.keyDown(e)&&(e.preventDefault(),e.stopImmediatePropagation())}_keyUpHandler(e){this._isEnabled()&&this._activeTool.keyUp(e)}_keyPressHandler(e){this._isEnabled()&&this._activeTool.keyPress(e)}eventToContainer(e){const t=this._containerDom.getBoundingClientRect();return new Point(e.pageX-t.left,e.pageY-t.top)}toOffset(e){if(!this.$_testing){const t=this._containerDom.getBoundingClientRect();e.mouseX=e.clientX-t.left,e.mouseY=e.clientY-t.top}return e}toOffsetTouch(e){const t=this._containerDom.getBoundingClientRect(),r=e.touches[0]||e.changedTouches[0];return e.mouseX=r.clientX-t.left,e.mouseY=r.clientY-t.top,e}_clickHandler(e){this._isEnabled()?this._activeTool.click(this.toOffset(e)):e.preventDefault()}_dblclickHandler(e){this._isEnabled()?this._activeTool.dblclick(this.toOffset(e)):e.preventDefault()}$_getHtmlElement(e){return e instanceof getWin(this._containerDom).HTMLElement?e:e instanceof Node?e.parentElement:void 0}_isAutoFocus(){return!0}_mouseDownHandler(e){if(this._isEnabled()){VisualContainer.$_mouseContainer=this.$_hash,this._isAutoFocus()&&this.setFocus(),this.toOffset(e),this._currentX=e.mouseX,this._currentY=e.mouseY;const t=this.findElementAt(this._currentX,this._currentY,!1,!1);t&&t.getAncestor(ScrollBar)?(this.activeTool.setFocus(),this._scrollTool._previous=this.activeTool,this.activeTool=this._scrollTool):this.activeTool||(this._defaultTool._previous=this.activeTool,this.activeTool=this._defaultTool),this.activeTool._mouseEventTarget=this.$_getHtmlElement(e.target),this.activeTool.mouseDown(e)}else e.preventDefault()}_mouseMoveHandler(e){const t=getWin(this._containerDom);if(this.toOffset(e),this._currentX=e.mouseX,this._currentY=e.mouseY,this._isEnabled()){const r=this._activeTool;r._mouseEventTarget=e.target instanceof t.HTMLElement?e.target:null,r.mouseMove(e);const i=r.dragTracker;if(i&&VisualContainer.$_mouseContainer==this.$_hash)for(let t in VisualContainer.$_Containers){const r=VisualContainer.$_Containers[t];if(r!==this){const t=r._activeTool;t&&t.dragFrom(e,i)}}}}_mouseUpHandler(e){const t=VisualContainer.$_mouseContainer==this.$_hash,r=getWin(this._containerDom);try{if(this.toOffset(e),this._currentX=e.mouseX,this._currentY=e.mouseY,this._isEnabled()){const i=this._activeTool.dragTracker;if(this._activeTool._mouseEventTarget=e.target instanceof r.HTMLElement?e.target:null,this._activeTool.mouseUp(e),this._activeTool instanceof ScrollTool&&(this.activeTool=this._activeTool.previous),i&&i.linkable&&t)for(let t in VisualContainer.$_Containers){const r=VisualContainer.$_Containers[t];if(r!==this){const t=r._activeTool;t&&t.dropFrom(e,i)}}}else e.preventDefault()}finally{this._activeTool&&(this._activeTool.dragTracker=null),t&&(VisualContainer.$_mouseContainer=-1)}}_mouseEnterHandler(e){this._isEnabled()&&this._activeTool.mouseEnter(this.toOffset(e))}_mouseLeaveHandler(e){this._isEnabled()&&this._activeTool.mouseLeave(this.toOffset(e))}_mouseOverHandler(e){this._isEnabled()&&this._activeTool.mouseOver(this.toOffset(e))}_contextMenuHander(e){const t=getWin(this._containerDom);this.toOffset(e),this._currentX=e.mouseX,this._currentY=e.mouseY,this._isEnabled()&&(this._activeTool._mouseEventTarget=e.target instanceof t.HTMLElement?e.target:null,this._activeTool.contextMenu(this.toOffset(e)))}_wheelHandler(e){this._isEnabled()&&this._activeTool.mouseWheel(this.toOffset(e))&&Utils.stopEvent(e)}_focusHandler(e){}_blurHandler(e){}_selectstartHandler(e){return!1}_focusinHandler(e){}_globalMouseDownHandler(e){Utils.isAncestorOf(this._containerDiv,e.target)||this._isEnabled()&&this._activeTool.focusLeave(e)}_focusoutHandler(e){Utils.isAncestorOf(this._containerDiv,e.target)&&e.relatedTarget&&!Utils.isAncestorOf(this._containerDiv,e.relatedTarget)&&this._isEnabled()&&this._activeTool.focusLeave(e)}_focusHandlerFireFox(e){Utils.isAncestorOf(this._containerDiv,e.target)&&this._isEnabled()&&(this._containerDom.setAttribute("tabindex","0"),this._activeTool.setFocus(e.target))}}VisualContainer.FEEDBACK_ZINDEX=1e3,VisualContainer.$_Containers={},VisualContainer.$_mouseContainer=-1,VisualContainer.$_ActiveGrid=null;const $$_DT_DATE_TOKENS=["yy","yyyy","M","MM","d","dd","a","H","HH","h","hh","m","mm","s","ss","S","SS","SSS"],$$_DT_DATE_SEPARATORS=[".","/","-",":"],U_Z="Z".charCodeAt(0),L_Z="z".charCodeAt(0),U_A="A".charCodeAt(0),L_A="a".charCodeAt(0),L_Y="y".charCodeAt(0),U_M="M".charCodeAt(0),L_M="m".charCodeAt(0),L_D="d".charCodeAt(0),U_H="H".charCodeAt(0),L_H="h".charCodeAt(0),U_S="S".charCodeAt(0),L_S="s".charCodeAt(0),pad=function(e){return e<10?"0"+e:String(e)},pad3=function(e){return e<10?"00"+e:e<100?"0":String(e)};class DatetimeFormatter{constructor(e){this._baseYear=2e3,this._preserveTime=!1,this._hasAmPm=!1,this._formatString="",this.formatString=e}static getFormatter(e){let t=DatetimeFormatter.Formatters[e];return t||(DatetimeFormatter.Formatters[e]=t=new DatetimeFormatter(e)),t}static get Default(){return DatetimeFormatter.getFormatter(DatetimeFormatter.DEFAULT_FORMAT)}get format(){return this._format}get formatString(){return this._formatString}set formatString(e){(e=e||DatetimeFormatter.DEFAULT_FORMAT)!=this._formatString&&(this._tokens=[],this.parse(e),this._formatString=e)}getText(e){if(!this._tokens)return"";const t=e instanceof Date?e:new Date(e),r=this._tokens;let i="";for(var s=0,A=r.length;s<A;s++){var n=r[s],o=n.length;switch(n.charCodeAt(0)){case L_Y:i+=o>2?t.getFullYear():pad(t.getFullYear()%100);break;case U_M:i+=o>1?pad(t.getMonth()+1):t.getMonth()+1;break;case L_D:i+=o>1?pad(t.getDate()):t.getDate();break;case U_H:i+=o>1?pad(t.getHours()):t.getHours();break;case L_H:if(this._hasAmPm){let e=t.getHours();0==e?e=12:e>12&&(e-=12),i+=o>1?pad(e):e}else i+=o>1?pad(t.getHours()):t.getHours();break;case L_M:i+=o>1?pad(t.getMinutes()):t.getMinutes();break;case L_S:i+=o>1?pad(t.getSeconds()):t.getSeconds();break;case L_A:case U_A:t.getHours()<12?i+=this._amText:i+=this._pmText;break;case U_S:let e=t.getMilliseconds();i+=3==o?pad3(e):2==o?pad(e):e.toString().substr(0,o);break;default:i+=n}}return i}parseDateFormatTokens(e){var t=[];if(e){const r=e.trim(),i=r.length;let s=0;for(;s<i;){let A=r.charAt(s);if($$_DT_DATE_SEPARATORS.indexOf(A)>=0)t.push(A),s++;else{let n=s++;for(;s<i&&r.charAt(s)==A;)s++;if(A=r.substring(n,s),$$_DT_DATE_TOKENS.indexOf(A)<0){let t=A.charCodeAt(0);if(t>=U_A&&t<=U_Z||t>=L_A&&t<=L_Z)throw new Error("Invalid datetime write format: "+e)}t.push(A)}if(s<i&&Utils.isWhiteSpace(A=r.charAt(s)))for(t.push(A);s<i&&Utils.isWhiteSpace(r.charAt(s));)s++}}return t}parse(e){if(this._amText="AM",this._pmText="PM",e){const t=e.split(";");if(this._format=t[0]||DatetimeFormatter.DEFAULT_FORMAT,this._tokens=this.parseDateFormatTokens(this._format),this._hasAmPm=this._tokens.indexOf("a")>=0||this._tokens.indexOf("A")>=0,t.length>1&&t[1]){const e=t[1].split(",");e.length>0&&e[0]&&(this._amText=e[0]),e.length>1&&e[1]&&(this._pmText=e[1])}}}}DatetimeFormatter.DEFAULT_FORMAT="yyyy/MM/dd",DatetimeFormatter.Formatters={};class DatetimeParser{constructor(e){this._format=null,this._baseYear=2e3,this._patterns=[],this._amText="AM",this._pmText="PM",e&&(this.format=e)}get format(){return this._format}set format(e){if(e!=this._format){if(!e)throw new Error("Invalid empty date format");this._format=e,this.parseFormat(e)}}get baseYear(){return this._baseYear}set baseYear(e){e!=this._baseYear&&(this._baseYear=e)}get amText(){return this._amText}set amText(e){e!=this._amText&&(this._amText=e)}get pmText(){return this._pmText}set pmText(e){e!=this._pmText&&(this._pmText=e)}parse(e){try{let s=0,A=1,n=1,o=0,a=0,l=0,h=0,c=0,u=0,d=this._patterns.length,p=0;const g=e.length;for(let _=0;_<d&&p<g;_++){var t=this._patterns[_],r=t.c,i=t.len;switch(r){case"y":s=parseInt(e.substr(p,i));break;case"M":A=parseInt(e.substr(p,i));break;case"d":n=parseInt(e.substr(p,i));break;case"a":if(this._amText&&e.indexOf(this._amText,p)==p)c=12,i=this._amText.length;else{if(!this._pmText||e.indexOf(this._pmText,p)!=p)return null;u=12,i=this._pmText.length}break;case"H":case"h":o=parseInt(e.substr(p,i));break;case"m":a=parseInt(e.substr(p,i));break;case"s":l=parseInt(e.substr(p,i));break;case"S":h=parseInt(e.substr(p,i));break;case".":case"/":case"-":case":":case" ":if(DatetimeParser.DATE_SEPARATORS.indexOf(e.charAt(p))<0)return null;break;default:return null}p+=i}return s<100&&(s+=this._baseYear),c>0?12==o&&(o=0):u>0&&o<12&&(o+=12),new Date(s,A-1,n,o,a,l,h)}catch(e){return null}}parseFormat(e){var t,r,i,s=e,A=s.length,n=0;for(this._patterns=[];n<A;)if(t=n,r=s.charAt(n),Utils.isWhiteSpace(r)){for(n++;n<A&&Utils.isWhiteSpace(s.charAt(n));)n++;this._patterns.push({c:" ",p:t,len:n-t})}else{switch(i=0,r){case"y":4!=(i=this.getPattern(s,n,r))&&2!=i&&this.throwInvalidFormat(s);break;case"M":case"d":case"H":case"h":case"m":case"s":2!=(i=this.getPattern(s,n,r))&&this.throwInvalidFormat(s);break;case"S":3!=(i=this.getPattern(s,n,r))&&this.throwInvalidFormat(s);break;case"a":case".":case"/":case"-":case":":1!=(i=this.getPattern(s,n,r))&&this.throwInvalidFormat(s);break;default:this.throwInvalidFormat(s)}i>0&&(this._patterns.push({c:r,p:n,len:i}),n+=i)}}throwInvalidFormat(e){throw new Error("Invalid date format: "+e)}throwInvalidValue(e){throw new Error("Invalid date format: "+e)}getPattern(e,t,r){for(var i=1;++t<e.length&&e.charAt(t)==r;)i++;return i}}DatetimeParser.DATE_SEPARATORS="./-: ";class ISODatetimeParser{constructor(){}static parse(e,t){var r=null;try{var i,s,A,n,o=e.indexOf("T"),a=e.substring(0,o),l=e.substring(o+1),h=a.split("-"),c=h.length,u=parseInt(h[0]),d=c>1?parseInt(h[1]):1,p=c>2?parseInt(h[2]):1;-1!=l.indexOf("Z")?(i=1,s=0,A=0,l=l.replace("Z","")):-1!=l.indexOf("+")?(i=1,n=l.substring(l.indexOf("+")+1,l.length),s=Number(n.substring(0,n.indexOf(":"))),A=Number(n.substring(n.indexOf(":")+1,n.length)),l=l.substring(0,l.indexOf("+"))):-1!=l.indexOf("-")?(i=-1,n=l.substring(l.indexOf("-")+1,l.length),s=Number(n.substring(0,n.indexOf(":"))),A=Number(n.substring(n.indexOf(":")+1,n.length)),l=l.substring(0,l.indexOf("-"))):i=0;var g=l.split(":"),_=(c=g?g.length:0)>0?parseInt(g[0]):0,m=c>1?parseInt(g[1]):0,f=c>2?String(g[2]).split("."):null,w=f&&f.length>0?parseInt(f[0]):0,C=f&&f.length>1?1e3*parseFloat("0."+f[1]):0,B=Date.UTC(u,d-1,p,_,m,w,C),E=i?(36e5*s+6e4*A)*i:ISODatetimeParser._zoneOffset;if(r=new Date(B-E),t&&isNaN(r.getTime()))throw"Invalidate date text: "+e}catch(r){if(t){var y="Invalid date Text: "+e;throw y+="\nError: "+r.toString(),y}}return r}}ISODatetimeParser._zoneOffset=60*(new Date).getTimezoneOffset()*1e3;class DatetimeReader{constructor(e){this._format="",this._type=0,this._parser=new DatetimeParser(null),this.format=e}static initialize(){DatetimeReader.Default.amText="AM",DatetimeReader.Default.pmText="PM",DatetimeReader.Default.baseYear=2e3}get format(){return this._format}set format(e){e!=this._format&&(this._format=e,this.parse(e))}get amText(){return this._parser.amText}set amText(e){this._parser.amText=e}get pmText(){return this._parser.pmText}set pmText(e){this._parser.pmText=e}get baseYear(){return this._parser.baseYear}set baseYear(e){this._parser.baseYear=e}toDate(e){if(!e)return null;var t=null;switch(this._type){case 0:t=this._parser.parse(e);break;case 1:t=ISODatetimeParser.parse(e,!1);break;case 2:const r=parseInt(e);t=new Date(r);break;default:t=new Date(e)}return t&&!isNaN(t.getTime())?t:null}parse(e){if(e){const t=e.toLowerCase();this._type=Math.max(0,DatetimeReader.Formats.indexOf(t)),0==this._type&&(this._parser.format=e)}}}DatetimeReader.Formats=["custom","iso","timestamp","platform"],DatetimeReader.Default=new DatetimeReader("yyyy/MM/dd HH:mm:ss"),DatetimeReader.initialize();class ExpressionSyntaxError extends Error{constructor(e,t){super(e),this.message=e,this.tokenPos=t}}class ExpressionEvaluationError extends Error{constructor(e){super(e),this.message=e}}const _pad=function(e,t,r){return t=Math.max(t||2,1),r=r||"0",new Array(t-String(e).length+1).join(r)+e},$$_createTokenArray=function(...e){var t=[];for(var r of e)t[r]=!0;return t},IS_CHECK=$$_createTokenArray(26,27),IS_RELATIVE=$$_createTokenArray(40,45,46,47,48,49,50,51,52,53,41,42,43,44),IS_ADDITIVE=$$_createTokenArray(4,5,18,19),IS_MULTIPLICATIVE=$$_createTokenArray(11,3,2,14,15,16,17);class ExpressionLexer{constructor(){this.IS_IDENT=[],this.IS_INTEGER=[],this.IS_NUMBER=[],this.IS_WHITE=[],this.IS_END=[],this.QUOTATION='"'.charCodeAt(0),this.SQUOTATION="'".charCodeAt(0),this.BACKSLASH="\\".charCodeAt(0),this.BACKTICK="`".charCodeAt(0),this.Keywords={str:20,num:21,bool:23,not:13,len:24,and:11,in:12,mod:15,or:18,div:14,shl:16,shr:17,xor:19,is:26,like:46,ilike:48,match:50,imatch:52,defined:35,null:34,empty:36,nan:37,datestr:90,year:91,month:92,day:93,hour:94,rounddown:95},this._procs=null,this._source=null,this._len=0,this._tokenId=0,this._run=0,this._runAhead=0,this._nextRun=0,this._lineNo=0,this._linePos=0,this._tokenPos=0;for(var e=0;e<256;e++)this.IS_IDENT[e]=e==="_".charCodeAt(0)||e===":".charCodeAt(0)||e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="a".charCodeAt(0)&&e<="z".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="Z".charCodeAt(0),this.IS_INTEGER[e]=e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e>="a".charCodeAt(0)&&e<="f".charCodeAt(0)||e>="A".charCodeAt(0)&&e<="F".charCodeAt(0),this.IS_NUMBER[e]=e>="0".charCodeAt(0)&&e<="9".charCodeAt(0)||e==".".charCodeAt(0)||e==="e".charCodeAt(0)||e==="E".charCodeAt(0),this.IS_WHITE[e]=e>=1&&e<=9||11==e||e>=14&&e<=32,this.IS_END[e]=0==e;this.initProcs()}clear(){this._source=null}next(){var e=this._source.charCodeAt(this._run);this._tokenPos=this._run,e<256?this._procs[e].call(this):this.identProc()}unkownProc(){this._tokenId=0,this._run++}commaProc(){this._tokenId=32,this._run++}crProc(){this._tokenId=33,10==this._source.charCodeAt(this._run+1)?this._run+=2:this._run++,this._lineNo++,this._linePos=this._run}lfProc(){this._tokenId=33,this._run++,this._lineNo++,this._linePos=this._run}equalProc(){this._tokenId=40,this._run++}greaterProc(){"="==this._source.charAt(this._run+1)?(this._tokenId=42,this._run+=2):(this._tokenId=41,this._run++)}lowerProc(){"="==this._source.charAt(this._run+1)?(this._tokenId=44,this._run+=2):">"==this._source.charAt(this._run+1)?(this._tokenId=45,this._run+=2):(this._tokenId=43,this._run++)}nextIdent(){for(var e=this._run;e<this._len&&!this.IS_IDENT[this._source.charCodeAt(e)];)e++;for(var t=e;e<this._len&&this.IS_IDENT[this._source.charCodeAt(e)];)e++;return e>t?(this._nextRun=e,this._source.substr(t,e-t).toLowerCase()):null}identProc(){for(var e=this._run;this._run<this._len&&(this.IS_IDENT[this._source.charCodeAt(this._run)]||this._source.charCodeAt(this._run)>255);)this._run++;var t=this._source.substr(e,this._run-e).toLowerCase();if(this.Keywords.hasOwnProperty(t))switch(this._tokenId=this.Keywords[t],this._tokenId){case 13:if(t=this.nextIdent())switch(t){case"like":this._tokenId=47,this._run=this._nextRun;break;case"ilike":this._tokenId=49,this._run=this._nextRun;break;case"match":this._tokenId=51,this._run=this._nextRun;break;case"imatch":this._tokenId=53,this._run=this._nextRun}break;case 26:"not"==(t=this.nextIdent())&&(this._tokenId=27,this._run=this._nextRun)}else this._tokenId=10}integerProc(){for(this._tokenId=64,this._run++;this._run<this._len&&this.IS_INTEGER[this._source.charCodeAt(this._run)];)this._run++}numberProc(){for(this._tokenId=64,this._run++;this._run<this._len&&this.IS_NUMBER[this._source.charCodeAt(this._run)];){if("."==this._source.charAt(this._run)){if("."==this._source.charAt(this._run+1))break;this._tokenId=63}this._run++}}minusProc(){this._tokenId=4,this._run++}plusProc(){this._tokenId=5,this._run++}pointProc(){"."==this._source.charAt(this._run+1)?(this._tokenId=68,this._run+=2):(this._tokenId=65,this._run++)}roundOpenProc(){this._tokenId=66,this._run++}roundCloseProc(){this._tokenId=67,this._run++}slashProc(){this._tokenId=2,this._run++}spaceProc(){for(this._tokenId=71,this._run++;this._run<this._len&&this.IS_WHITE[this._source.charCodeAt(this._run)];)this._run++}bracketOpenProc(){this._tokenId=69,this._run++}bracketCloseProc(){this._tokenId=70,this._run++}starProc(){this._tokenId=3,this._run++}modProc(){this._tokenId=15,this._run++}stringProc(){this._tokenId=61;do{var e=this._source.charCodeAt(this._run);if(this.IS_END[e])throw new ExpressionSyntaxError("Untermintated string",e);e==this.BACKSLASH&&this._run++,this._run++}while(this._run<this._len&&this._source.charCodeAt(this._run)!=this.QUOTATION);this._run++}smallStringProc(){this._tokenId=61;do{var e=this._source.charCodeAt(this._run);if(this.IS_END[e])throw new ExpressionSyntaxError("Untermintated string",e);e==this.BACKSLASH&&this._run++,this._run++}while(this._run<this._len&&this._source.charCodeAt(this._run)!=this.SQUOTATION);this._run++}backtickProc(){this._tokenId=96;do{var e=this._source.charCodeAt(this._run);if(this.IS_END[e])throw new ExpressionSyntaxError("Untermintated backtick string",e);this._run++}while(this._run<this._len&&this._source.charCodeAt(this._run)!=this.BACKTICK);this._run++}initProcs(){this._procs=[];for(let e=1;e<=32;e++)this._procs[e]=this.spaceProc;this._procs[10]=this.lfProc,this._procs[13]=this.crProc,this._procs["$".charCodeAt(0)]=this.integerProc,this._procs[this.QUOTATION]=this.stringProc,this._procs[this.SQUOTATION]=this.smallStringProc,this._procs[this.BACKTICK]=this.backtickProc;for(let e=0;e<=9;e++)this._procs["0".charCodeAt(0)+e]=this.numberProc;for(let e="A".charCodeAt(0);e<="Z".charCodeAt(0);e++)this._procs[e]=this.identProc;for(let e="a".charCodeAt(0);e<="z".charCodeAt(0);e++)this._procs[e]=this.identProc;this._procs[":".charCodeAt(0)]=this.identProc,this._procs["_".charCodeAt(0)]=this.identProc,this._procs["(".charCodeAt(0)]=this.roundOpenProc,this._procs[")".charCodeAt(0)]=this.roundCloseProc,this._procs["*".charCodeAt(0)]=this.starProc,this._procs["+".charCodeAt(0)]=this.plusProc,this._procs[",".charCodeAt(0)]=this.commaProc,this._procs["-".charCodeAt(0)]=this.minusProc,this._procs[".".charCodeAt(0)]=this.pointProc,this._procs["/".charCodeAt(0)]=this.slashProc,this._procs["%".charCodeAt(0)]=this.modProc,this._procs["<".charCodeAt(0)]=this.lowerProc,this._procs["=".charCodeAt(0)]=this.equalProc,this._procs[">".charCodeAt(0)]=this.greaterProc,this._procs["[".charCodeAt(0)]=this.bracketOpenProc,this._procs["]".charCodeAt(0)]=this.bracketCloseProc}get tokenId(){return this._tokenId}get tokenLoc(){return{x:this._tokenPos-this._linePos,y:this._lineNo}}get tokenLen(){return this._run-this._tokenPos}get token(){return this._source.substr(this._tokenPos,this.tokenLen)}get isSpace(){return 71==this._tokenId}init(e){this._source=e,this._len=e.length,this._lineNo=0,this._linePos=0,this._tokenPos=0,this._runAhead=this._run=0,this._tokenId=0}charAhread(){for(this._runAhead=this._run;this._runAhead<this._len&&this._source.charCodeAt(this._runAhead)>0&&this._source.charCodeAt(this._runAhead)<=32;)this._runAhead++;return this._source.charCodeAt(this._runAhead)}nextId(e){do{this.next()}while(this._run<this._len&&this._tokenId!=e)}nextNoSpace(){if(this._run<this._len)do{this.next()}while(this._run<this._len&&this.isSpace)}isFirstInLine(){if(0==this._tokenPos)return!0;var e,t=this._tokenPos;for(t--;t>0&&this.IS_WHITE[this._source.charCodeAt(t)];)t--;return 0==t||(10==(e=this._source.charCodeAt(t))||13==e)}}class ExpressionRuntime extends Base{constructor(){super()}isIdentifier(e){throw new Error("Token is not a valid Identifier: "+e)}evaluateIdentifier(e){throw new Error("Invalid identifier key: "+e)}evaluateIndexerI(e,t){throw new Error("Invalid identifier indexer: "+e)}evaluateIndexerS(e,t,r){throw new Error("Invalid identifier indexer: "+e)}evaluateFunc(e,t){throw new Error("Invalid identifier func: "+e)}}class ExpressionNode{constructor(){}get value(){}get asLiteral(){return null}prepareValue(){}getLiteral(){}isIdentifier(e){return!1}toString(){return String(this)}}class LiteralNode extends ExpressionNode{}class EmptyExpressionNode extends ExpressionNode{constructor(){super()}evaluate(e){}toString(){return""}}EmptyExpressionNode.Default=new EmptyExpressionNode;class ExpressionNodeImpl extends ExpressionNode{constructor(){super(),this._operator=0}evaluate(e){if(this._literal)return this._literal.value;if(!this._rightExpr)return this._leftExpr.evaluate(e);var t=this._leftExpr.evaluate(e),r=this._rightExpr.evaluate(e);switch(this._operator){case 40:return t==r;case 45:return t!=r;case 41:return t>r;case 42:return t>=r;case 43:return t<r;case 44:return t<=r;case 46:return this.calcLike(t,r,!1);case 47:return!this.calcLike(t,r,!1);case 48:return this.calcLike(t,r,!0);case 49:return!this.calcLike(t,r,!0);case 50:return this.calcMatch(t,r,!1);case 51:return!this.calcMatch(t,r,!1);case 52:return this.calcMatch(t,r,!0);case 53:return!this.calcMatch(t,r,!0);default:throw new ExpressionEvaluationError("Unknown operator: "+this._operator)}}toString(){var e="";if(this._literal)e=this._literal.toString();else if(this._rightExpr){var t,r=this._leftExpr.toString(),i=this._rightExpr.toString();switch(this._operator){case 40:t="=";break;case 45:t="<>";break;case 41:t=">";break;case 42:t=">=";break;case 43:t="<";break;case 44:t="<=";break;case 46:t="like";break;case 47:t="not like";break;case 48:t="ilike";break;case 49:t="not ilike";break;case 50:t="match";break;case 51:t="not match";break;case 52:t="imatch";break;case 53:t="not imatch";break;case 32:t=",";break;default:t="<<ERROR>>"}e="("+r+" "+t+" "+i+")"}else e=this._leftExpr.toString();return e}isIdentifier(e){return this._leftExpr&&!this._rightExpr&&this._leftExpr.isIdentifier(e)}prepareValue(){this._leftExpr.prepareValue(),null==this._rightExpr?this._literal=this._leftExpr.getLiteral():this._rightExpr.prepareValue()}getLiteral(){return this._literal}calcLike(e,t,r){let i=String(e),s=String(t);if(i&&s){r&&(i=i.toLowerCase(),s=s.toLowerCase());let e=s.length;if(e>1){const t="%"==s.charAt(0),r="%"==s.charAt(e-1);return t&&r?(s=s.substr(1,e-2),i.indexOf(s,0)>=0):t?(s=s.substr(1,e-1),i.lastIndexOf(s)==i.length-s.length):r?(s=s.substr(0,e-1),0==i.indexOf(s,0)):i==s}return"%"!=s&&i==s}return!1}calcMatch(e,t,r){return new RegExp(t,"m"+(r?"i":"")).test(e)}}class CheckableNode extends ExpressionNode{get value(){}get asLiteral(){return this}evaluate(e){}}class DefinedNode extends CheckableNode{toString(){return"defined"}}class EmptyNode extends CheckableNode{toString(){return"empty"}}class NullNode extends CheckableNode{get value(){return NaN}toString(){return"null"}}class NanNode extends CheckableNode{toString(){return"NaN"}}class CheckNode extends ExpressionNodeImpl{constructor(e,t,r){super(),this._leftExpr=e,this._operator=t,this._isNot=27==t,this._value=-1,r instanceof DefinedNode?this._value=CheckNode.DEFINED:r instanceof NullNode?this._value=CheckNode.NULL:r instanceof EmptyNode?this._value=CheckNode.EMPTY:r instanceof NanNode&&(this._value=CheckNode.NAN)}prepareValue(){this._leftExpr.prepareValue(),this._literal=this._leftExpr.getLiteral()}getLiteral(){return null}evaluate(e){var t,r=this._literal?this._literal.value:this._leftExpr.evaluate(e);switch(this._value){case CheckNode.DEFINED:t=void 0!==r;break;case CheckNode.NULL:t=null==r;break;case CheckNode.EMPTY:t=null==r||0==String(r).length;break;case CheckNode.NAN:t=null===r||isNaN(r);break;default:return}return this._isNot?!t:t}toString(){var e="<<ERROR>>";switch(this._value){case CheckNode.DEFINED:e="defined";break;case CheckNode.NULL:e="null";break;case CheckNode.EMPTY:e="empty";break;case CheckNode.NAN:e="NaN"}return"("+(this._isNot?"is not ":"is ")+e+")"}}CheckNode.DEFINED=0,CheckNode.NULL=1,CheckNode.EMPTY=2,CheckNode.NAN=3;class FloatLiteralNode extends LiteralNode{constructor(e){super(),this._value=Number(e)}get value(){return this._value}get asLiteral(){return this}evaluate(e){return this._value}toString(){return String(this._value)}}class IntegerLiteralNode extends LiteralNode{constructor(e){super(),this._value="string"==typeof e?parseInt(e):Math.floor(e)}get value(){return this._value}get asLiteral(){return this}evaluate(e){return this._value}toString(){return String(this._value)}}class StringLiteralNode extends LiteralNode{constructor(e){super(),this._value=e.substr(1,e.length-2);for(var t="",r=0,i=!1;r<this._value.length;)"\\"!=this._value[r]||i?(i=!1,t+=this._value[r++]):(i=!0,r++);this._value=t}get value(){return this._value}get asLiteral(){return this}evaluate(e){return this._value}toString(){return"'"+this._value+"'"}}class IdentifierNode extends ExpressionNode{constructor(e){super(),this._idKey=-651212,this._literal=e}get identifier(){return this._literal}evaluate(e){return-651212==this._idKey&&(this._idKey=e.isIdentifier(this._literal)),e.evaluateIdentifier(this._idKey)}toString(){return this._literal}}class IndexerNode extends ExpressionNodeImpl{constructor(e,t,r){super(),this._idKey=-1490313,this._intIndex=NaN,this._strIndex=null,this._ident=e,this._indexer=t,this._capital=r}prepareValue(){let e=this._indexer.asLiteral;if(e||this._indexer instanceof ExpressionNodeImpl&&(this._indexer.prepareValue(),e=this._indexer.getLiteral()),e){const t=e.value;"string"==typeof t?this._strIndex=t:this._intIndex=parseInt(t),this._capital&&this._strIndex&&(this._strIndex=this._strIndex.toUpperCase())}}getLiteral(){return null}evaluate(e){if(-1490313==this._idKey&&(this._idKey=e.isIdentifier(this._ident)),this._strIndex)return e.evaluateIndexerS(this._idKey,this._strIndex,this._capital);if(isNaN(this._intIndex)){const t=this._indexer.evaluate(e);return"string"==typeof t?e.evaluateIndexerS(this._idKey,t,this._capital):e.evaluateIndexerI(this._idKey,t)}return e.evaluateIndexerI(this._idKey,this._intIndex)}toString(){return this._ident+"["+this._indexer.toString()+"]"}}class FuncNode extends ExpressionNodeImpl{constructor(e,t){super(),this._idKey=-1490313,this._strIndex=null,this._ident=e,this._indexer=t}prepareValue(){let e=this._indexer.asLiteral;if(e||this._indexer instanceof ExpressionNodeImpl&&(this._indexer.prepareValue(),e=this._indexer.getLiteral()),e){const t=e.value;"string"==typeof t&&(this._strIndex=t)}}getLiteral(){return null}evaluate(e){if(-1490313==this._idKey&&(this._idKey=e.isIdentifier(this._ident)),this._strIndex)return e.evaluateFunc(this._idKey,this._strIndex);{const t=this._indexer.evaluate(e);return e.evaluateFunc(this._idKey,t)}}toString(){return this._ident+"("+this._indexer.toString()+")"}}class UnaryNode extends ExpressionNode{constructor(e){super(),this._factor=e}prepareValue(){this._literal=this._factor.asLiteral,!this._literal&&this._factor instanceof ExpressionNode&&(this._factor.prepareValue(),this._literal=this._factor.getLiteral())}getLiteral(){return null}}class LenNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t?t.length:0}toString(){return"(len "+this._factor+")"}}class MinusNode extends UnaryNode{constructor(e){super(e)}evaluate(e){return-(this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e))}toString(){return"-"+this._factor}}class PlusNode extends UnaryNode{constructor(e){super(e)}evaluate(e){return this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e)}toString(){return"+"+this._factor}}class NotNode extends UnaryNode{constructor(e){super(e)}evaluate(e){return!(this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e))}toString(){return"(not "+this._factor+")"}}class ToBoolNode extends UnaryNode{constructor(e){super(e)}evaluate(e){var t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return Boolean(t)}toString(){return"(bool "+this._factor+")"}}class ToNumberNode extends UnaryNode{constructor(e){super(e)}evaluate(e){var t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return Number(t)}toString(){return"(num "+this._factor+")"}}class ToStringNode extends UnaryNode{constructor(e){super(e)}evaluate(e){var t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return String(t)}toString(){return"(str "+this._factor+")"}}class ToDateStringNode extends UnaryNode{constructor(e){super(e)}evaluate(e){var t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t instanceof Date&&(t=_pad(t.getFullYear(),4)+_pad(t.getMonth()+1,2)+_pad(t.getDate(),2)+_pad(t.getHours(),2)+_pad(t.getMinutes(),2)+_pad(t.getSeconds(),2)+_pad(t.getMilliseconds(),3)),String(t)}toString(){return"(datestr "+this._factor+")"}}class ToYearNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t instanceof Date?t.getFullYear():null}toString(){return"(year "+this._factor+")"}}class ToMonthNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t instanceof Date?t.getMonth()+1:null}toString(){return"(month "+this._factor+")"}}class ToDayNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t instanceof Date?t.getDate():null}toString(){return"(day "+this._factor+")"}}class ToHourNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._literal instanceof LiteralNode?this._literal.value:this._factor.evaluate(e);return t instanceof Date?t.getHours():null}toString(){return"(hour "+this._factor+")"}}class ToRoundDownNode extends UnaryNode{constructor(e){super(e)}evaluate(e){const t=this._factor,r=t.getLiteral();if(t.getLiteral())return r.value;if(t._rightExpr){const r=t._leftExpr.evaluate(e),s=t._rightExpr.evaluate(e);if(32===t._operator){var i=Math.pow(10,s);return Math.floor(r*i)/i}throw new ExpressionEvaluationError("Unknown operator: "+t._operator)}return t._leftExpr.evaluate(e)}toString(){return"(rounddown "+this._factor+")"}}class TermNode extends ExpressionNode{constructor(){super(),this._factors=[],this._operators=[],this._literal=null}addFactor(e){this._factors.push(e)}addOperator(e){this._operators.push(e)}isIdentifier(e){return 1==this._factors.length&&this._factors[0]instanceof IdentifierNode&&this._factors[0].identifier==e}prepareValue(){var e,t,r;for(e=0,t=this._factors.length;e<t;e++)this._factors[e].prepareValue();0==this._operators.length&&(r=this._factors[0],this._literal=r.asLiteral,this._literal||(this._literal=r.getLiteral()))}getLiteral(){return this._literal}evaluate(e){if(this._literal)return this._literal.value;const t=this._factors.length;let r=this._factors[0].evaluate(e);for(let i=1;i<t;i++){const t=this._factors[i].evaluate(e);switch(this._operators[i-1]){case 11:r=r&&t;break;case 3:r*=t;break;case 2:r/=t;break;case 14:r=Math.floor(Math.floor(r)/Math.floor(t));break;case 15:r%=t;break;case 16:r<<=t;break;case 17:r>>=t}}return r}toString(){var e="";if(this._literal)e=this._literal.toString();else if(1==this._factors.length)e=this._factors[0].toString();else{var t,r=this._factors.length;for(e="("+this._factors[0].toString(),t=1;t<r;t++){switch(this._operators[t-1]){case 11:e+=" and ";break;case 3:e+=" * ";break;case 2:case 14:e+=" / ";break;case 15:e+=" mod ";break;case 16:e+=" shl ";break;case 17:e+=" shr "}e+=this._factors[t].toString()}e+=")"}return e}}class SimpleExpressioNode extends ExpressionNode{constructor(){super(),this._terms=[],this._operators=[],this._literal=null}addTerm(e){this._terms.push(e)}addOperator(e){this._operators.push(e)}isIdentifier(e){return 1==this._terms.length&&this._terms[0].isIdentifier(e)}prepareValue(){for(let e=0,t=this._terms.length;e<t;e++)this._terms[e].prepareValue();0==this._operators.length&&(this._literal=this._terms[0].getLiteral())}getLiteral(){return this._literal}evaluate(e){if(this._literal)return this._literal.value;const t=this._terms.length;let r=this._terms[0].evaluate(e);for(let i=1;i<t;i++){const t=this._terms[i].evaluate(e);switch(this._operators[i-1]){case 4:r-=t;break;case 5:r+=t;break;case 18:r=r||t;break;case 19:r^=t}}return r}toString(){var e="";if(this._literal)e=this._literal.toString();else if(1==this._terms.length)e=this._terms[0].toString();else{var t,r=this._terms.length;for(e="("+this._terms[0].toString(),t=1;t<r;t++){switch(this._operators[t-1]){case 4:e+=" - ";break;case 5:e+=" + ";break;case 18:e+=" or ";break;case 19:e+=" xor ";break;default:e+=" <<ERROR>> "}e+=this._terms[t].toString()}e+=")"}return e}}class ExpressionParser{constructor(){this._node=null,this._capitalIndexers=null,this._lexer=new ExpressionLexer}syntaxError(e,t){throw new ExpressionSyntaxError(e,t)}expected(e){if(e!=this._lexer.tokenId)throw new ExpressionSyntaxError("Token is not a expected kind ["+e+"]: "+this._lexer.tokenId,this._lexer.tokenLoc);this.nextToken()}nextToken(){this._lexer.nextNoSpace()}doExpression(){let e,t=null,r=this.doSimpleExpression();if(IS_CHECK[e=this._lexer.tokenId]){this.nextToken();let i=this.doSimpleExpression();i.prepareValue();let s=i.getLiteral();if(!(s instanceof CheckableNode))throw new ExpressionSyntaxError("is operator's operand must be defined, null or empty: "+this._lexer.tokenId,null);t=new CheckNode(r,e,s)}else t=new ExpressionNodeImpl,t._leftExpr=r,(IS_RELATIVE[this._lexer.tokenId]||32==this._lexer.tokenId)&&(t._operator=this._lexer.tokenId,this.nextToken(),t._rightExpr=this.doSimpleExpression());return t}doSimpleExpression(){let e=new SimpleExpressioNode;for(e.addTerm(this.doTerm());IS_ADDITIVE[this._lexer.tokenId];)e.addOperator(this._lexer.tokenId),this.nextToken(),e.addTerm(this.doTerm());return e}doTerm(){let e=new TermNode;for(e.addFactor(this.doFactor());IS_MULTIPLICATIVE[this._lexer.tokenId];)e.addOperator(this._lexer.tokenId),this.nextToken(),e.addFactor(this.doFactor());return e}doFactor(){var e=this._lexer.tokenId;switch(e){case 61:return this.doCharString();case 96:return this.doBacktick();case 66:return this.doRoundOpen();case 10:return this.doIdentifier();case 64:return this.doInteger();case 63:return this.doNumber();case 4:return this.doMinus();case 5:return this.doPlus();case 13:return this.doNot();case 35:return this.doDefined();case 34:return this.doNull();case 36:return this.doEmpty();case 37:return this.doNaN();case 23:return this.doToBool();case 21:return this.doToNumber();case 20:return this.doToString();case 24:return this.doLength();case 90:return this.doToDateString();case 91:return this.doToYear();case 92:return this.doToMonth();case 93:return this.doToDay();case 94:return this.doToHour();case 95:return this.doRoundDown()}throw new ExpressionSyntaxError("Unkown token: "+e,this._lexer.tokenLoc)}doCharString(){var e=this._lexer.token;return this.nextToken(),new StringLiteralNode(e)}doBacktick(){var e=this._lexer.token;return this.nextToken(),new IdentifierNode(e.substring(1,e.length-1))}doRoundOpen(){this.nextToken();var e=this.doExpression();return this.expected(67),e}doIdentifier(){var e=this._lexer.token;if(this.nextToken(),69==this._lexer.tokenId){this.nextToken();var t=this.doExpression();return this.expected(70),new IndexerNode(e,t,this._capitalIndexers.indexOf(e)>=0)}if(66==this._lexer.tokenId){this.nextToken();t=this.doExpression();return this.expected(67),new FuncNode(e,t)}return new IdentifierNode(e)}doNumber(){var e=this._lexer.token;return this.nextToken(),new FloatLiteralNode(e)}doInteger(){var e=this._lexer.token;return this.nextToken(),new IntegerLiteralNode(e)}doMinus(){return this.nextToken(),new MinusNode(this.doFactor())}doPlus(){return this.nextToken(),new PlusNode(this.doFactor())}doNot(){return this.nextToken(),new NotNode(this.doFactor())}doDefined(){return this.nextToken(),new DefinedNode}doNull(){return this.nextToken(),new NullNode}doEmpty(){return this.nextToken(),new EmptyNode}doNaN(){return this.nextToken(),new NanNode}doToBool(){return this.nextToken(),new ToBoolNode(this.doFactor())}doToNumber(){return this.nextToken(),new ToNumberNode(this.doFactor())}doToString(){return this.nextToken(),new ToStringNode(this.doFactor())}doLength(){return this.nextToken(),new LenNode(this.doFactor())}doToDateString(){return this.nextToken(),new ToDateStringNode(this.doFactor())}doToYear(){return this.nextToken(),new ToYearNode(this.doFactor())}doToMonth(){return this.nextToken(),new ToMonthNode(this.doFactor())}doToDay(){return this.nextToken(),new ToDayNode(this.doFactor())}doToHour(){return this.nextToken(),new ToHourNode(this.doFactor())}doRoundDown(){return this.nextToken(),new ToRoundDownNode(this.doFactor())}parse(e,t){if(e){this._capitalIndexers=t||[],this._lexer.init(e),this.nextToken();var r=this.doExpression();return r&&r.prepareValue(),this._lexer.clear(),this._capitalIndexers=null,r}return null}evaluate(e,t,r){return this.parse(e,r).evaluate(t)}}ExpressionParser.Default=new ExpressionParser;const ID_ROW=0,ID_VALUES=1,IDENTS$1={row:0,values:1},ID_FIELD$1=999;class FieldValueRuntime extends ExpressionRuntime{constructor(){super(),this._fieldMap={}}_doDispose(){super._doDispose()}prepare(e){const t=this._data=e,r=this._fieldMap={};if(t)for(let e=0;e<t.fieldCount;e++){const t=this._data.getField(e).fieldName;r[":"+t]=r[t]=999+e}return this}setRow(e){return this._row=e,this}isIdentifier(e){const t=e.toLocaleLowerCase();return IDENTS$1.hasOwnProperty(t)?IDENTS$1[t]:this._fieldMap.hasOwnProperty(e)?this._fieldMap[e]:super.isIdentifier(e)}evaluateIdentifier(e){if(e>=999)return this._row>=0?this._data.getRowValue(this._row,e-999):void 0;super.evaluateIdentifier(e)}evaluateIndexerS(e,t,r){if(1==e){const e=this._fieldMap[t];return this._row>=0?this._data.getRowValue(this._row,e-999):void 0}throw new ExpressionEvaluationError("Invalid field name: "+e)}evaluateFunc(e,t){return 0===e?this._row:super.evaluateFunc(e,t)}}class ReportDataPath{constructor(e,t){this.data=e,this.path=t}static create(e,t){return new ReportDataPath(e,t)}}class ReportData extends Base{constructor(e,t){super(),this._name=e,this._dp=t}get provider(){return this._dp}get designTime(){var e;return null===(e=this._dp)||void 0===e?void 0:e.designTime}get isBand(){return!1}get name(){return this._name}set name(e){var t;if(e!==this._name){const r=this._name;this._name=e,null===(t=this._dp)||void 0===t||t.dataNameChanged(this,r)}}preparePrint(e,t){}}class ContextData extends ReportData{constructor(e){super("_context_",null),this._context=e}static isValue(e){return this.Values.hasOwnProperty(e)}static isBandValue(e){return this.BandValues.hasOwnProperty(e)}getValue(e){const t=ContextData.Values[e];return t&&t(this._context)}getSaveValues(){}getSaveType(){return"context"}}ContextData.Values={"${page}":e=>e.page+1,"${pages}":e=>e.pageCount,"${date}":e=>e.date},ContextData.BandValues={"${dpage}":e=>0,"${dpages}":e=>0};class SimpleData extends ReportData{constructor(e,t){super(e,null),this.setSample(t),this._isObj=Utils.isObject(t)}getValue(e){if(e&&this._isObj){let t=this._values;const r=e.split(".");for(let e of r)t=t[e];return t}return this._values}get sample(){return this._values}setSample(e){e!==this._values&&(this._values=e)}getFieldNames(){if(this._values){const e=[];for(let t in this._values)e.push(t);return e}}getSaveType(){return"simple"}getSaveValues(){return this._values}}var DesignDataMode,PropCategory;!function(e){e.SAMPLE="sample",e.GENERATE="generate"}(DesignDataMode||(DesignDataMode={}));class BandData extends ReportData{constructor(e,t,r){if(super(e,r),this._calcFieldRuntime=new FieldValueRuntime,t){this._fields=t;for(let e of t){if(!e.fieldName)throw new Error("The fieldName must be exists.");e.dataType||(e.dataType="text"),e.dateReader=null}}}get fields(){return this._fields&&this._fields.slice()}get fieldCount(){return this._fields?this._fields.length:0}getFields(){var e;return null===(e=this._fields)||void 0===e?void 0:e.slice(0)}getField(e){return this._fields[e]}getFieldByName(e){for(let t of this._fields)if(t.fieldName===e)return t}getFieldIndex(e){if(this._fields)for(let t=this._fields.length-1;t>=0;t--)if(this._fields[t].fieldName===e)return t;return-1}containsField(e){return this._fields&&this._fields.some((t=>t.fieldName===e))}indexOfField(e){return this._fields.indexOf(e)}setField(e,t){this._fields[e]={...t}}getSaveFields(){return this._fields}getNextFieldName(e=""){const t=e||"field";let r=t,i=1;for(;this._fields.some((e=>r===e.fieldName));)r=t+"-"+i++;return r}getFieldNames(){return this._fields?this._fields.map((e=>e.fieldName)).sort():[]}addField(e,t){if(t&&!this._fields.includes(t))return e=Math.max(0,Math.min(this._fields.length,e)),this._fields.splice(e,0,t),!0}removeField(e){const t=this._fields.indexOf(e);if(t>=0)return this._fields.splice(t,1),!0}groupBy(e){function t(r,i){if(i.push(r),r.level===e.length)for(let e=0;e<r.count;e++)i.push(e+r.row);else for(let e of r.children)t(e,i);i.push({group:r})}const r=this.rowCount;if(e&&e.length>0){const i=[],s={parent:null,level:0,row:0,count:r,children:[]};!function t(r,i){const s=i.row+i.count;let A=i.level+1,n=i.row;const o=e[A-1];let a={parent:i,level:A,row:n,count:1,value:r.getRowValue(n,o),children:[]};for(i.children.push(a);++n<s;){const e=r.getRowValue(n,o);e!==a.value?(a={parent:i,level:A,row:n,count:1,value:e,children:[]},i.children.push(a)):a.count++}if(A<e.length)for(let e of i.children){let i=e.row;for(;i<e.row+e.count;)t(r,e),i+=e.count}}(this,s);for(let e of s.children)t(e,i);return i}}readValue(e,t){if(e){const r=e.dataType;if("datetime"===r)return e.dateReader||(e.dateReader=new DatetimeReader(e.format)),e.dateReader.toDate(t);if("number"===r)return"number"==typeof t?t:parseFloat(t);if("bool"===r)return"boolean"==typeof t?t:"number"==typeof t?0!==t:"True"===t||"true"===t}return t}readRow(e){if(this._fields){const t=this._fields;if(Utils.isArray(e))for(let r=0;r<t.length;r++)e[r]=this.readValue(t[r],e[r]);else if(e)for(let r in e){const i=this.getFieldIndex(r);i>=0&&(e[r]=this.readValue(t[i],e[r]))}}return e}dateToStr(e,t){const r=e&&e.format&&DatetimeFormatter.getFormatter(e.format);return r?r.getText(t):String(t)}get isBand(){return!0}preparePrint(e,t){super.preparePrint(e,t);const r=this._fields;let i=this._fields;if(!t&&!i){const t=e.designDp.get(this.name);t instanceof BandData&&(i=this._fields=t.getFields())}if(i){const e=this._fieldMap={};for(let t=0;t<i.length;t++)e[i[t].fieldName]=t;r||this._readRows(),this._calcFieldRuntime.prepare(this);for(let t=0;t<i.length;t++){const r=i[t];if(r.expression){const s=ExpressionParser.Default.parse(r.expression);this._prepareCalcField(i,e,r,t,s)}}}}_readRows(){}_prepareCalcField(e,t,r,i,s){}}class BandArrayData extends BandData{constructor(e,t,r,i,s){super(e,t,s),this._sampleCount=-1,this._sampled=!1,i>0&&(this._sampleCount=i),this.setValues(r)}get rowCount(){return this._values.length}getRowValues(e){return this._values[e]}getValue(e){return this.getRowValue(0,e)}getRowValue(e,t){const r=this._values[e];if(r)return"number"==typeof t?r[this.getField(t).fieldName]:r[t]}getFieldValues(e){const t=[];"number"==typeof e&&(e=this.getField(e).fieldName);for(let r=0;r<this._values.length;r++)t.push(this._values[r][e]);return t}equalValues(e,t,r){for(let i=t.length-1;i>=0;i--)if(this._values[e][t[i]]!==r[i])return!1;return!0}equalRows(e,t,r){const i=this._values;r=r||this._fields.map((e=>e.fieldName));for(let s=r.length-1;s>=0;s--)if(i[e][r[s]]!==i[t][r[s]])return!1;return!0}findRows(e){const t=null!=e&&Object.keys(e),r=[];return t&&t.length>0&&this._values.forEach(((i,s)=>{let A=!0;for(let r of t)if(i[r]!==e[r]){A=!1;break}A&&r.push(s)})),r}get sample(){return this._values}getValues(){const e=[];for(let t=0;t<this._values.length;t++)e.push(this.$_cloneRow(this._values[t]));return e}setValues(e){const t=this._values=[];if(this._sampled=!1,e)for(let r=0,i=e.length;r<i;r++){let i=this.$_cloneRow(e[r]);i=this.readRow(i),t.push(i)}else if(this.designTime){const e=this.$_prepareSample();for(let r=0;r<this._sampleCount;r++)t.push({...e});this._sampled=!0}}getSaveType(){return"band"}getSaveValues(){}$_cloneRow(e){if(e){const t={};for(let r in e)t[r]=e[r];return t}return null}$_prepareSample(){const e=this._fields;if(e&&e.length>0){const t={};for(let r of e)t[r.fieldName]=this.readValue(r,r.sample);return t}return{}}_readRows(){const e=this._values;for(let t=0,r=e.length;t<r;t++)e[t]=this.readRow(e[t])}_prepareCalcField(e,t,r,i,s){const A=this._values,n=this._calcFieldRuntime;for(let e=0,t=A.length;e<t;e++){const t=A[e];n.setRow(e);const i=s.evaluate(n);t[r.fieldName]=i}}}class SimpleArrayData extends BandData{constructor(e,t,r,i,s){super(e,t,s),this._sampleCount=1,this._sampled=!1,i>0&&(this._sampleCount=i),this.setValues(r)}get rowCount(){return this._values.length}getValue(e){return this.getRowValue(0,e)}getRowValue(e,t){const r=this._values[e];if(r)return"number"==typeof t?r[t]:r[this.getFieldIndex(t)]}getFieldValues(e){const t=[];"number"!=typeof e&&(e=this.getFieldIndex(e));for(let r=0;r<this._values.length;r++)t.push(this._values[r][e]);return t}equalValues(e,t,r){for(let i=t.length-1;i>=0;i--)if(this._values[e][this.getFieldIndex(t[i])]!==r[i])return!1;return!0}equalRows(e,t,r){const i=this._values;r=r||this._fields.map((e=>e.fieldName));for(let s=r.length-1;s>=0;s--){const A=this.getFieldIndex(r[s]);if(i[e][A]!==i[t][A])return!1}return!0}get sample(){return this._values}getValues(){const e=[];for(let t=0;t<this._values.length;t++)e.push(this.$_cloneRow(this._values[t]));return e}setValues(e){const t=this._values=[];if(this._sampled=!1,e)for(let r=0,i=e.length;r<i;r++){let i=this.$_cloneRow(e[r]);i=this.readRow(i),t.push(i)}else if(this.designTime){const e=this.$_prepareSample();for(let r=0;r<this._sampleCount;r++)t.push(e.slice(0));this._sampled=!0}}getSaveType(){return"array"}getSaveValues(){}$_cloneRow(e){return e?e.slice(0):null}$_prepareSample(){const e=this._fields;if(e&&e.length>0){const t=[];for(let r=0;r<e.length;r++)t.push(this.readValue(e[r],e[r].sample));return t}return[]}_readRows(){const e=this._values;for(let t=0,r=e.length;t<r;t++)e[t]=this.readRow(e[t])}_prepareCalcField(e,t,r,i,s){const A=this._values,n=this._calcFieldRuntime;for(let e=0,t=A.length;e<t;e++){const t=A[e];n.setRow(e);const r=s.evaluate(n);t[i]=r}}}class PrintContext extends Base{constructor(e=!1){super(),this._pageCount=0,this._page=0,this._detailPageCount=0,this._detailPage=0,this._noValueCallback=!1,this.headerHeight=0,this.footerHeight=0,this.reportHeaderHeight=0,this.reportFooterHeight=0,this.bodyTop=0,this.bodyBottom=0,this.bodyHeight=0,this.y=0,this.h=0,this.yBand=0,this.row=-1,this.index=-1,this.contextable=!1,this.contextValues=[],this._userData={row:0},this._tags={},this._printing=e}get printing(){return this._printing}get dp(){return this._dp}set dp(e){this._dp=e}get designDp(){return this._desingDp}set designDp(e){this._desingDp=e}get assets(){return this._assets}set assets(e){this._assets=e}get reportView(){return this._reportView}set reportView(e){this._reportView=e}get pageWidth(){return this._pageWidth}set pageWidth(e){this._pageWidth=e}get pageHeight(){return this._pageHeight}set pageHeight(e){this._pageHeight=e}get date(){return this._date}get pageCount(){return this._pageCount}get page(){return this._page}get detailPageCount(){return this._detailPageCount}get detailPage(){return this._detailPage}preparePrint(e){var t;this.contextValues=[],this._date=new Date,this.report=e||(null===(t=this._reportView)||void 0===t?void 0:t.model)}preparePage(e){this._page=e}setDetailPage(e,t){this._detailPageCount=e,this._detailPage=t}finishPrint(e){this._pageCount=e}getUserData(){return this._userData.row=this.row,this._userData}getCurrentValue(e){if("row"===e)return this.row}setTag(e,t){e&&(this._tags[e]=t)}unsetTag(e){delete this._tags[e]}getTag(e,t){const r=this._tags[e];return void 0!==r?r:t}getValue(e,t,r){if(this._dp&&e&&r){const i=this._dp.get(e);if(i)return t>=0||(t=this.row),i instanceof BandData?i.getRowValue(t,r):i.getValue(r)}}}class PropertyItem extends Base{constructor(e){super(),this._prop=e}get group(){return this._group}get prop(){return this._prop}get name(){return this._prop.name}get label(){return this._prop.label||this._prop.name}get domain(){return this._prop.domain}get parent(){return this._prop.parent}isVisible(e){return!this._prop.visible||!1!==this._prop.visible(e)}isReadOnly(e){return this._prop.readonly||e.isReadOnlyProperty(this._prop)}getValue(e){return e.getProperty(this._prop.name)}setValue(e,t){e.setProperty(this._prop.name,t)}setValues(e,t){e[0].setItemsProperty(e,this._prop.name,t)}hasColor(){return!1}}class PropertyGroup extends Base{constructor(e){super(),this._items=[],this._pool=[],this._label=e}get label(){return this._label}get count(){return this._items.length}get(e){return this._items[e]}borrow(e){for(let t=this._pool.length-1;t>=0;t--){const r=this._pool[t];if(r._prop===e)return this._pool.splice(t,1),r}}add(e){e._group=this,this._items.push(e)}clear(){for(let e of this._items)e._group=null,this._pool.push(e);this._items=[]}}class ValueProperty extends PropertyItem{constructor(e){super(e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this._defaultValue=e}}class StylesProperty extends PropertyItem{constructor(e){super(e)}}class StringProperty extends ValueProperty{constructor(e){super(e)}}StringProperty.$_ctor="StringProperty";class NumberProperty extends ValueProperty{constructor(e){super(e),this._minimum=NaN,this._maximum=NaN}get minimum(){return this._minimum}set minimum(e){this._minimum=e}get maximum(){return this._maximum}set maximum(e){this._maximum=e}}NumberProperty.$_ctor="NumberProperty";class DimensionProperty extends StringProperty{constructor(e){super(e),this.percentable=!0}}DimensionProperty.$_ctor="DimensionProperty";class SizeProperty extends DimensionProperty{constructor(e){super(e)}}SizeProperty.$_ctor="SizeProperty";class BooleanProperty extends ValueProperty{constructor(e){super(e)}}BooleanProperty.$_ctor="BooleanProperty";class EnumProperty extends ValueProperty{constructor(e,t){super(e),this._type=t||e.domain}get domain(){const e=Utils.getEnumValues(this._type);return void 0===this.defaultValue&&e.unshift(void 0),e}}EnumProperty.$_ctor="EnumProperty";class ReportItemProperty extends StringProperty{constructor(e){super(e)}}ReportItemProperty.$_ctor="ReportItemProperty";class ListableProperty extends StringProperty{constructor(e){super(e)}}ListableProperty.$_ctor="ListableProperty";class FunctionProperty extends StringProperty{constructor(e){super(e)}}FunctionProperty.$_ctor="FunctionProperty";class NumberArrayProperty extends ValueProperty{constructor(e){super(e)}}NumberArrayProperty.$_ctor="NumberArrayProperty";class StringArrayProperty extends ValueProperty{constructor(e){super(e)}}StringArrayProperty.$_ctor="StringArrayProperty";class ColorProperty extends ValueProperty{constructor(e){super(e)}}ColorProperty.$_ctor="ColorProperty";class StyleProperty extends PropertyItem{constructor(e){super(e)}getValue(e){return this.parent?e.getSubStyleProperty(this.parent,this.name):e.getStyleProperty(this.name)}setValue(e,t){this.parent?e.setSubStyleProperty(this.parent,this.name,t):e.setStyleProperty(this.name,t)}setValues(e,t){const r=e[0];this.parent?r.setItemsSubStyleProperty(e,this.parent,this.name,t):r.setItemsStyleProperty(e,this.name,t)}}class ColorStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"color"}}ColorStyle.$_ctor="ColorStyle";class FontFamilyStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"fontFamily"}}FontFamilyStyle.VALUES=[void 0,"Arial","Helvetica","Tahoma",'"Trebuchet MS"',"Verdana",'"Courier New"','"Lusida Console"','"Times New Roman"'],FontFamilyStyle.$_ctor="FontFamilyStyle";class FontSizeStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"fontSize"}}FontSizeStyle.$_ctor="FontSizeStyle";class FontStyleStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"fontStyle"}}FontStyleStyle.VALUES=[void 0,"normal","italic","oblique"],FontStyleStyle.$_ctor="FontStyleStyle";class FontWeightStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"fontWeight"}}FontWeightStyle.VALUES=[void 0,"normal","bold","lighter","bolder","100","200","300","400","500","600","700","800","900"],FontWeightStyle.$_ctor="FontWeightStyle";class TextAlignStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"textAlign"}}TextAlignStyle.VALUES=[void 0,"left","center","right"],TextAlignStyle.$_ctor="TextAlignStyle";class VerticalAlignStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"verticalAlign"}}VerticalAlignStyle.VALUES=[void 0,"top","middle","bottom"],VerticalAlignStyle.$_ctor="VerticalAlignStyle";class TextDecorationStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"textDecoration"}}TextDecorationStyle.VALUES=[void 0,"underline","line-through","overline"],TextDecorationStyle.$_ctor="TextDecorationStyle";class BorderStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"border"}hasColor(){return!0}}BorderStyle.$_ctor="BorderStyle";class BorderItemStyle extends StyleProperty{constructor(e){super(e)}hasColor(){return!0}}BorderItemStyle.$_ctor="BorderItemStyle";class BorderLeftStyle extends BorderItemStyle{constructor(e){super(e)}get styleName(){return"border-left"}}BorderLeftStyle.$_ctor="BorderLeftStyle";class BorderRightStyle extends BorderItemStyle{constructor(e){super(e)}get styleName(){return"border-right"}}BorderRightStyle.$_ctor="BorderRightStyle";class BorderTopStyle extends BorderItemStyle{constructor(e){super(e)}get styleName(){return"border-top"}}BorderTopStyle.$_ctor="BorderTopStyle";class BorderBottomStyle extends BorderItemStyle{constructor(e){super(e)}get styleName(){return"border-bottom"}}BorderBottomStyle.$_ctor="BorderBottomStyle";class PaddingItemStyle extends StyleProperty{constructor(e){super(e)}}PaddingItemStyle.$_ctor="PaddingItemStyle";class PaddingLeftStyle extends PaddingItemStyle{constructor(e){super(e)}get styleName(){return"padding-left"}}PaddingLeftStyle.$_ctor="PaddingLeftStyle";class PaddingRightStyle extends PaddingItemStyle{constructor(e){super(e)}get styleName(){return"padding-right"}}PaddingRightStyle.$_ctor="PaddingRightStyle";class PaddingTopStyle extends PaddingItemStyle{constructor(e){super(e)}get styleName(){return"padding-top"}}PaddingTopStyle.$_ctor="PaddingTopStyle";class PaddingBottomStyle extends PaddingItemStyle{constructor(e){super(e)}get styleName(){return"padding-bottom"}}PaddingBottomStyle.$_ctor="PaddingBottomStyle";class OpacityStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"opacity"}}OpacityStyle.$_ctor="OpacityStyle";class CellAlignStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"cellAlign"}}CellAlignStyle.VALUES=[void 0,"left","center","right"],CellAlignStyle.$_ctor="CellAlignStyle";class StrokeWidthStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"strokeWidth"}}StrokeWidthStyle.$_ctor="StrokeWidthStyle";class StrokeDasharrayStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"strokeDasharray"}}StrokeDasharrayStyle.$_ctor="StrokeDasharrayStyle";class WritingModeStyle extends StyleProperty{constructor(e){super(e)}get styleName(){return"writingMode"}}WritingModeStyle.VALUES=[void 0,"horizontal-tb","vertical-rl","vertical-lr"],WritingModeStyle.$_ctor="WritingModeStyle",function(e){e.DESIGN="design",e.BASIC="basic",e.TEXT="text",e.DATA="data",e.BOUND="bound",e.EVENT="event",e.EDITOR="editor",e.REPORT="report",e.PAPER="paper",e.BOX="box",e.TABLE="table",e.CELL="cell",e.BAND="band",e.FIELD="field",e.COLUMN="column",e.ROW="row",e.CHART="chart",e.TITLE="title",e.AXIS="axis",e.XAXIS="x Axis",e.YAXIS="y Axis",e.SERIES="series",e.LEGEND="legend"}(PropCategory||(PropCategory={}));class PropertyModel extends EventAware{constructor(e){super(),this._modelMap={},this._groupMap={},this._styleGroup=new PropertyGroup("Styles"),this._childStyleMap={},this._groups=[],this._models=[],this._name=e}get name(){return this._name}get source(){return this._source}set source(e){e!==this._source&&(this._source=e,this.$_buildItems(),this._fireSourceChanged())}get sources(){return this._sources}set sources(e){this._sources=e,this.source=e&&e.length>0?e[0]:null}get groupCount(){return this._groups.length}get modelCount(){return this._models.length}getGroup(e){return this._groups[e]}getModel(e){return this._models[e]}refresh(){this.$_buildItems()}updateValue(e,t,r){const i=t._prop,s=this._sources;e=e||this.source,t.prop.multiple&&s&&s.length>1?(e=s[0],t.setValues(s,r)):e&&t.setValue(e,r),e&&e.isDominantProp(i)&&(this.refresh(),this._fireSourceChanged())}$_borrowGroup(e){let t=this._groupMap[e];return t||(this._groupMap[e]=t=new PropertyGroup(e)),t.source=null,t}$_borrowModel(e){let t=this._modelMap[e];return t||(this._modelMap[e]=t=new PropertyModel),t}$_clear(){this._models=[];for(let e in this._modelMap)this._modelMap[e].$_clear();this._groups=[];for(let e in this._groupMap)this._groupMap[e].clear();for(let e in this._childStyleMap)this._childStyleMap[e].clear()}$_buildSource(e,t){let r=e.getEditProps();for(let i of r)if(i.type!==StyleProperty){let r=t;r||(r=this.$_borrowGroup(this.name||i.category),this._groups.indexOf(r)<0&&this._groups.push(r));let s=r.borrow(i);s||(s=new i.type(i)),s instanceof ModelProperty&&(s.model.source=e[i.name],i.indented&&(r.source=s.model.source),s.model.$_buildItems(i.indented?r:null)),r.add(s)}let i=e.getStyleProps();if(i&&i.length>0){const e=this._styleGroup;e.source=this.source,e.clear();for(let t of i){let r=e.borrow(t);r||(r=new t.type(t)),e.add(r)}e.count>0&&this._groups.push(e)}for(let t of r)if(t.type===StylesProperty){const r=this.$_borrowGroup(t.name);if(assert(null!=r),r.source=this.source,r.clear(),i=e.getSubStyleProps(t.name),i&&i.length>0)for(let e of i){let t=r.borrow(e);t||(t=new e.type(e)),r.add(t)}r.count>0&&this._groups.push(r)}}$_buildModels(e){for(let t=0;t<e.length;t++){const r=e[t],i=this.$_borrowModel(r.getCollectionLabel()+t);i.source=r,this._models.push(i),i.$_buildItems()}}$_buildItems(e){this.$_clear();const t=this._source;t&&t.getEditProps&&(t.isCollectionProp()?this.$_buildModels(t.getPropertySources()):this.$_buildSource(t,e))}_fireSourceChanged(){this.fireEvent(PropertyModel.SOURCE_CHANGED)}}PropertyModel.SOURCE_CHANGED="onPropertySourceChanged";class ModelProperty extends PropertyItem{constructor(e){super(e),this._model=new PropertyModel(e.name)}get model(){return this._model}}ModelProperty.$_ctor="ModelProperty";const STYLE_CATEGORY="styles",BACKGROUND_COLOR="backgroundColor",COLOR="color",FONT_FAMILY="fontFamily",FONT_SIZE="fontSize",FONT_STYLE$1="fontStyle",FONT_WEIGHT="fontWeight",TEXT_ALIGN$1="textAlign",VERTICAL_ALIGN="verticalAlign",WRITING_MODE="writingMode",TEXT_DECORATION="textDecoration",PADDING_LEFT="paddingLeft",PADDING_RIGHT="paddingRight",PADDING_TOP="paddingTop",PADDING_BOTTOM="paddingBottom",BORDER="border",BORDER_LEFT$2="borderLeft",BORDER_RIGHT$2="borderRight",BORDER_TOP$2="borderTop",BORDER_BOTTOM$2="borderBottom",OPACITY="opacity",FILL="fill",STROKE="stroke",STROKE_WIDTH="strokeWidth",STROKE_DASHARRAY="strokeDasharray",BACK_FILL="backFill",BACK_STROKE="backStroke",BAR_COLOR="barColor",CELL_ALIGN="cellAlign",STYLE_PROPS={};var DropResultType,ItemMoveType,PrintValue;STYLE_PROPS.backgroundColor={name:BACKGROUND_COLOR,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.color={name:COLOR,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.fontFamily={name:FONT_FAMILY,category:"styles",type:FontFamilyStyle,multiple:!0,default:void 0,domain:FontFamilyStyle.VALUES},STYLE_PROPS.fontSize={name:FONT_SIZE,category:"styles",type:FontSizeStyle,multiple:!0,default:void 0},STYLE_PROPS.fontStyle={name:"fontStyle",category:"styles",type:FontStyleStyle,multiple:!0,default:void 0,domain:FontStyleStyle.VALUES},STYLE_PROPS.fontWeight={name:FONT_WEIGHT,category:"styles",type:FontWeightStyle,multiple:!0,default:void 0,domain:FontWeightStyle.VALUES},STYLE_PROPS.textAlign={name:"textAlign",category:"styles",type:TextAlignStyle,multiple:!0,default:void 0,domain:TextAlignStyle.VALUES},STYLE_PROPS.verticalAlign={name:VERTICAL_ALIGN,category:"styles",type:VerticalAlignStyle,multiple:!0,default:void 0,domain:VerticalAlignStyle.VALUES},STYLE_PROPS.writingMode={name:WRITING_MODE,category:"styles",type:WritingModeStyle,multiple:!0,default:void 0,domain:WritingModeStyle.VALUES},STYLE_PROPS.textDecoration={name:TEXT_DECORATION,category:"styles",type:TextDecorationStyle,multiple:!0,default:void 0,domain:TextDecorationStyle.VALUES},STYLE_PROPS.border={name:BORDER,category:"styles",type:BorderStyle,multiple:!0,default:void 0},STYLE_PROPS.borderLeft={name:"borderLeft",category:"styles",type:BorderLeftStyle,multiple:!0,default:void 0},STYLE_PROPS.borderRight={name:"borderRight",category:"styles",type:BorderRightStyle,multiple:!0,default:void 0},STYLE_PROPS.borderTop={name:"borderTop",category:"styles",type:BorderTopStyle,multiple:!0,default:void 0},STYLE_PROPS.borderBottom={name:"borderBottom",category:"styles",type:BorderBottomStyle,multiple:!0,default:void 0},STYLE_PROPS.paddingLeft={name:PADDING_LEFT,category:"styles",type:PaddingLeftStyle,multiple:!0,default:void 0},STYLE_PROPS.paddingRight={name:PADDING_RIGHT,category:"styles",type:PaddingRightStyle,multiple:!0,default:void 0},STYLE_PROPS.paddingTop={name:PADDING_TOP,category:"styles",type:PaddingTopStyle,multiple:!0,default:void 0},STYLE_PROPS.paddingBottom={name:PADDING_BOTTOM,category:"styles",type:PaddingBottomStyle,multiple:!0,default:void 0},STYLE_PROPS.fill={name:FILL,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.stroke={name:STROKE,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.strokeWidth={name:STROKE_WIDTH,category:"styles",type:StrokeWidthStyle,multiple:!0,default:void 0},STYLE_PROPS.strokeDasharray={name:STROKE_DASHARRAY,category:"styles",type:StrokeDasharrayStyle,multiple:!0,default:void 0},STYLE_PROPS.backFill={name:BACK_FILL,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.backStroke={name:BACK_STROKE,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.barColor={name:BAR_COLOR,category:"styles",type:ColorStyle,multiple:!0,default:void 0},STYLE_PROPS.opacity={name:OPACITY,category:"styles",type:OpacityStyle,multiple:!0,default:void 0},STYLE_PROPS.cellAlign={name:CELL_ALIGN,category:"styles",type:CellAlignStyle,multiple:!0,default:void 0,domain:CellAlignStyle.VALUES},function(e){e.PROP="prop"}(DropResultType||(DropResultType={}));class ReportStyleObject{}ReportStyleObject.Shared=new ReportStyleObject;class ReportPageItem extends Base{constructor(){super(...arguments),this.outlineOrder=0}get selectItem(){return this}canSelectedWith(e){return!0}get index(){return-1}get outlineItems(){return null}canParentOf(e){return!1}getProperty(e){return this[e]}setProperty(e,t){const r=this.page;r?r.report.setItemProperty(this,e,t):this[e]=t}isReadOnlyProperty(e){return!1}isDominantProp(e){return!1}isCollectionProp(){return!1}getPropertySources(){return null}getCollectionLabel(){}setItemsStyleProperty(e,t,r){const i=e.filter((e=>e instanceof ReportPageItem)),s=this.page;if(s){this.styles[t]!==r&&s.report.setItemsStyle(i,t,r)}else i.forEach((e=>{e.setStyle(t,r)}))}get parent(){const e=this.outlineParent;return e instanceof ReportGroupItem?e:null}get dataParent(){return this.parent}get displayParent(){return Utils.cast(this.outlineParent,ReportPageItem)}get marqueeParent(){return null}get printable(){return!0}isAncestorOf(e){return e===this}getProps(){const e={};return this.getEditProps().forEach((t=>{e[t.name]=this[t.name]})),e}setProps(e){Utils.isObject(e)&&this.getEditProps().forEach((t=>{if(!t.readonly){const r=t.name;e.hasOwnProperty(r)&&(this[r]=e[r])}}))}canMove(){return!0}_loadProp(e,t){e.hasOwnProperty(t)&&(this[t]=e[t])}_loadProps(e,...t){for(let r of t)e.hasOwnProperty(r)&&(this[r]=e[r])}_loadPropOf(e,t){if(!t.readonly&&t.type!==ModelProperty){const r=t.name;e.hasOwnProperty(r)&&(this[r]=e[r])}}_loadPropsOf(e,t){for(let r of t)this._loadPropOf(e,r)}_saveProp(e,t){const r=this[t];void 0===r||"number"==typeof r&&isNaN(r)||(e[t]=r)}_saveProps(e,...t){for(let r of t){const t=this[r];void 0===t||"number"==typeof t&&isNaN(t)||(e[r]=t)}}_savePropOf(e,t){if(t.type!==ModelProperty){const r=t.name,i=this[r];void 0===i||"number"==typeof i&&isNaN(i)||i===t.default||(e[r]=i)}}_savePropsOf(e,t){for(let r of t)this._savePropOf(e,r)}_arrangePaddingStyles(e){if(e.hasOwnProperty("padding")){const t=e.padding.split(/\s+/),r=t.length;e.hasOwnProperty("paddingTop")||(e.paddingTop=t[0]),e.hasOwnProperty("paddingBottom")||(e.paddingBottom=r>2?t[2]:t[0]),e.hasOwnProperty("paddingLeft")||(e.paddingLeft=r>3?t[3]:r>1?t[1]:t[0]),e.hasOwnProperty("paddingRight")||(e.paddingRight=r>1?t[1]:t[0]),delete e.padding}}_validateSize(e){if("number"==typeof e){if(!isNaN(e))return Math.max(0,e)}else if(e){const t=e.indexOf("-");if(t>=0)return e.substr(t+1)}return e}}!function(e){e.INNER="inner",e.OUTER="outer"}(ItemMoveType||(ItemMoveType={})),function(e){e.NO="${no}",e.ROW="${row}",e.INDEX="${index}",e.INO="${ino}"}(PrintValue||(PrintValue={}));const BLANK_FIELDS="$_blankFlds";class ReportItem extends ReportPageItem{constructor(e){super(),this._visible=!0,this._styles={},this._pageBreak=PageBreakMode.NONE,this._designOrder=ReportItem.DEF_DISPLAY_ORDER,this._index=-1,this._valueCallbackDelegate=(e,t,r,i)=>this._valueCallbackFunc(e,t,r,i),this._styleCallbackDelegate=(e,t,r,i)=>this._styleCallbackFunc(e,t,r,i),this._name=e}static findFloatingAnchor(e){if(e instanceof ReportItem){let t=e.getFloatingContainer();if(t&&t.anchorTarget)return t.outlineParent.find(t.anchorTarget,!0)}}get outlineParent(){return this._parent}get outlineExpandable(){return!1}getEditProps(){const e=this._getEditProps();if(e){const t=[];for(let r of e)r&&r.name&&t.push(r);return t}return[]}getStyleProps(){const e=this._getStyleProps();if(e){const t=[];for(let r of e){const e=STYLE_PROPS[r];e&&t.push(e)}return t.length>0?t:null}}getSubStyleProps(e){if(this.isChildProp(e)){const t=this._getChildStyleProps(e);if(t){const r=[];for(let i of t){let t=STYLE_PROPS[i];t&&(t={...t},t.parent=e,r.push(t))}return r.length>0?r:null}}}getPlaceHolder(e){if(e.name===ReportItem.PROP_DATA)return this._getParentData()}getData(){var e;return null===(e=this.page)||void 0===e?void 0:e.report.designData.get(this.data||this._getParentData())}getDataFieldNames(){const e=this.getData();return e instanceof BandData||e instanceof SimpleData?[void 0].concat(e.getFieldNames()):[void 0]}getPropDomain(e){const t=this.page;if(t){if(e.name===ReportItem.PROP_DATA)return[void 0].concat(t.report.designData.getNames());if(e.name===ReportItem.PROP_VALUE)return this.getDataFieldNames()}}getProperty(e){return this.isChildProp(e)?this._childProps&&this._childProps[e]:this[e]}setProperty(e,t){const r=this.report;r?r.setItemProperty(this,e,t):this.isChildProp(e)?(this._childProps||(this._childProps={}),this._childProps[e]=t):this[e]=t}setItemsProperty(e,t,r){const i=e.filter((e=>e instanceof ReportPageItem)),s=this.report;s?s.setItemsProperty(i,t,r):i.forEach((e=>{e instanceof ReportItem&&(e.isChildProp(t)?(e._childProps||(e._childProps={}),e._childProps[t]=r):e[t]=r)}))}getProperties(e){const t={};if(Utils.isArray(e))for(let r of e)t[r]=this.getProperty(r);else for(let r in e)t[r]=this.getProperty(r);return t}setProperties(e){for(let t in e)if(this.isChildProp(t))this.setChildProp(t,e[t]);else{const r=Object.getOwnPropertyDescriptor(this,t);r&&(r.writable||r.set)&&(this[t]=e[t])}}getStyleProperty(e){return this._styles[e]}setStyleProperty(e,t){const r=this.page;if(r){this.styles[e]!==t&&r.report.setItemStyle(this,e,t)}else this.setStyle(e,t)}getSubStyleProperty(e,t){return this._getSubStyle(e,t)}setSubStyleProperty(e,t,r){const i=this.page;if(i){(this._childProps&&this._childProps[e]&&this._childProps[e][t])!=r&&i.report.setChildStyleProperty(this,e,t,r)}else this._setSubStyle(e,t,r)}setItemsSubStyleProperty(e,t,r,i){const s=e.filter((e=>e instanceof ReportItem)),A=this.page;if(A){this.styles[t]!==i&&A.report.setItemsChildStyleProperty(s,t,r,i)}else s.forEach((e=>{e._setSubStyle(t,r,i)}))}canPropAdoptDragSource(e,t){return!1}adoptPropDragSource(e,t){}dataNameChanged(e,t){this._data===t&&(this._data=e.name)}dataFieldNameChanged(e,t,r){}get parent(){return this._parent}get dataParent(){return this._parent}get index(){return this._index}get level(){return this._parent?this._parent.level+1:0}get page(){return this._parent&&this._parent.page}get report(){return this._parent&&this._parent.report}get name(){return this._name}set name(e){if(e!==this._name){const t=this.page,r=this._name;if(t&&e&&t.getItem(e))throw new Error('"'+e+'"는(은) 이미 다른 아이템의 이름으로 사용 중입니다.');this._name=e,t&&t.$_nameChanged(this,r),this._changed(ReportItem.PROP_NAME,e,r)}}get pathLabel(){return this.getSaveType()||Utils.uncapitalize(this.outlineLabel)}get displayPath(){return(this._parent?this._parent.displayPath+".":"")+this.pathLabel}get tag(){return this._tag}set tag(e){if(e!=this._tag){const t=this._tag;this._tag=e,this._changed(ReportItem.PROP_TAG,e,t)}}get isArray(){return!1}get isBand(){return!1}get visible(){return this._visible}set visible(e){e!=this._visible&&(this._visible=e,this._changed(ReportItem.PROP_VISIBLE,e,!e))}get removable(){return!0}get data(){return this._data}set data(e){if(e!=this._data){const t=this._data;this._data=e,this._changed(ReportItem.PROP_DATA,e,t)}}get value(){return this._value}set value(e){if(e!=this._value){const t=this._value;this._value=e,this._changed(ReportItem.PROP_TAG,e,t)}}get hint(){return this._hint}set hint(e){if(e!=this._hint){const t=this._hint;this._hint=e,this._changed(ReportItem.PROP_HINT,e,t)}}get width(){return this._width}set width(e){if((e=this._validateSize(e))!=this._width){const t=this._width;this._width=e,this._widthDim=new Dimension(e),this._changed(ReportItem.PROP_WIDTH,e,t)}}get height(){return this._height}set height(e){if((e=this._validateSize(e))!=this._height){const t=this._height;this._height=e,this._heightDim=new Dimension(e),this._changed(ReportItem.PROP_HEIGHT,e,t)}}get minWidth(){return this._minWidth}set minWidth(e){if(e!=this._minWidth){const t=this._minWidth;this._minWidth=e,this._minWidthDim=new Dimension(e),this._changed(ReportItem.PROP_MIN_WIDTH,e,t)}}get minHeight(){return this._minHeight}set minHeight(e){if(e!=this._minHeight){const t=this._minHeight;this._minHeight=e,this._minHeightDim=new Dimension(e),this._changed(ReportItem.PROP_MIN_HEIGHT,e,t)}}get onGetValue(){return this._onGetValue}set onGetValue(e){if(e!==this._onGetValue){e?(this._valueCallbackFunc=new Function("ctx","item, row, value",e),this._valueCallback=this._valueCallbackDelegate):this._valueCallback===this._valueCallbackDelegate&&(this._valueCallback=null);const t=this._onGetValue;this._onGetValue=e,this._changed(ReportItem.PROP_ON_GET_VALUE,e,t)}}get valueCallback(){return this._valueCallback}set valueCallback(e){if(e!==this._valueCallback){const t=this._valueCallback;this._valueCallback=e,this._changed(ReportItem.PROP_ON_GET_VALUE,e,t)}}get styles(){return this._styles}set styles(e){const t=this._styles={};if(e){const r=this._getStyleProps();for(let i of r)i in e&&(t[i]=e[i])}t&&this._arrangePaddingStyles(t)}get styleCallback(){return this._styleCallback}set styleCallback(e){if(e!==this._styleCallback){const t=this._styleCallback;this._styleCallback=e,this._changed(ReportItem.PROP_STYLE_CALLBACK,e,t)}}get onGetStyles(){return this._onGetStyles}set onGetStyles(e){if(e!==this._onGetStyles){e?(this._styleCallbackFunc=new Function("ctx, item, row, value",e),this._styleCallback=this._styleCallbackDelegate):this._styleCallback===this._styleCallbackDelegate&&(this._styleCallback=null);const t=this._onGetStyles;this._onGetStyles=e,this._changed(ReportItem.PROP_ON_GET_STYLES,e,t)}}get pageBreak(){return this._pageBreak}set pageBreak(e){if(e!=this._pageBreak){const t=this._pageBreak;this._pageBreak=e,this._changed(ReportItem.PROP_PAGE_BREAK,e,t)}}get outlineLabel(){return this.name||this.hint}get designText(){return this.outlineLabel}get designLevel(){return 0}get childPropInfos(){return this._childPropInfos}set childPropInfos(e){this._childPropInfos=e}get floating(){return!!this.getFloatingContainer()}get designOrder(){return this._designOrder}set designOrder(e){this._designOrder=e}get isRelativeHeight(){return this._heightDim&&!this._heightDim.fixed}get left(){return this.getChildProp("left")}get right(){return this.getChildProp("right")}get top(){return this.getChildProp("top")}get bottom(){return this.getChildProp("bottom")}get row(){return this.getChildProp("row")||0}get col(){return this.getChildProp("col")||0}get equalBlank(){return this.getChildProp("equalBlank")}get blankFields(){return this.getChildProp("blankFields")}get mergedInGroup(){return this.getChildProp("mergedInGroup")}defaultInit(e,t,r,i){this._doDefaultInit(e,t,r,i)}getSaveType(){}getSaveLabel(){return this.getSaveType()}isContextValue(){return this._value&&ContextData.isValue(this._value)}setChildProp(e,t){if(this._childProps||(this._childProps={}),t!==this._childProps[e]){const r=this._childProps[e];return this.$_setChildProp(e,t),this._changed(e,t,r),!0}}$_setChildProp(e,t){switch(void 0===t?delete this._childProps[e]:this._childProps[e]=t,e){case ReportItem.PROP_LEFT:this._leftDim=Dimension.create(t);break;case ReportItem.PROP_RIGHT:this._rightDim=Dimension.create(t);break;case ReportItem.PROP_TOP:this._topDim=Dimension.create(t);break;case ReportItem.PROP_BOTTOM:this._bottomDim=Dimension.create(t)}}isChildProp(e){if(this._childPropInfos)for(let t of this._childPropInfos)if(t.name==e)return!0}getChildProp(e,t){const r=this._childProps&&this._childProps[e];return void 0===r?t:r}getChildProps(){return Object.keys(this._childProps).sort()}isStyleProp(e){const t=this._getStyleProps();return t&&t.includes(e)}canParentOf(e){return!1}canAddTo(e){return!!e}prepareLayout(e){this._doPrepareLayout(e)}preparePrint(e){this.prepareLayout(!0),this._doPreparePrint(e)}getLeft(e){return this._leftDim?this._leftDim.getPixel(e):NaN}setLeft(e){if(e!==this._leftDim){const t=this._leftDim;this._leftDim=e,this._changed(ReportItem.PROP_LEFT,t,e)}}getRight(e){return this._rightDim?this._rightDim.getPixel(e):NaN}setRight(e){if(e!==this._rightDim){const t=this._rightDim;this._rightDim=e,this._changed(ReportItem.PROP_RIGHT,t,e)}}getTop(e){return this._topDim?this._topDim.getPixel(e):NaN}setTop(e){if(e!==this._topDim){const t=this._topDim;this._topDim=e,this._changed(ReportItem.PROP_TOP,t,e)}}getBottom(e){return this._bottomDim?this._bottomDim.getPixel(e):NaN}setBottom(e){if(e!==this._bottomDim){const t=this._bottomDim;this._bottomDim=e,this._changed(ReportItem.PROP_BOTTOM,t,e)}}getWidth(e){return this._widthDim?this._widthDim.getPixel(e):NaN}getHeight(e){return this._heightDim?this._heightDim.getPixel(e):NaN}getMinWidth(e){return this._minWidthDim?this._minWidthDim.getPixel(e):NaN}getMinHeight(e){return this._minHeightDim?this._minHeightDim.getPixel(e):NaN}canResize(e){return!0}canResizeWidth(){return this.canResize(ResizeDirection.LEFT)}canResizeHeight(){return this.canResize(ResizeDirection.TOP)}resize(e,t){return this.canResizeWidth()&&(this.width=e),this.canResizeHeight()&&(this.height=t),this}hasStyle(e){return this._styles.hasOwnProperty(e)}getStyle(e){return this._styles[e]}setStyle(e,t){const r=this._styles[e];t||(t=void 0),t!==r&&(void 0===t?delete this._styles[e]:this._styles[e]=t,this._changed(e,t,r))}clearStyle(e){if(this._styles.hasOwnProperty(e)){const t=this._styles[e];delete this._styles[e],this._changed(e,void 0,t)}}clearStyles(e){for(let t of this._getStyleProps())e[t]=""}load(e,t){this._doLoad(e,t)}save(e){var t;const r=this.getSaveType();r&&(e.type=r),this._name&&(e.name=this._name);const i=null===(t=this.page)||void 0===t?void 0:t.saveTag;return i&&(e[i]=this),this._doSave(e),this.stylable&&(Utils.isEmpty(this._styles)||(this._saveProp(e,"styles"),i&&(e.styles[i]=ReportStyleObject.Shared)),this._saveProp(e,"styleCallback")),Utils.isNotEmpty(e)}getFloatingContainer(){return this instanceof FloatingContainer?this:this._parent instanceof FloatingContainer?this._parent:void 0}delete(){this._parent&&this._parent.remove(this)}isAncestor(e){let t=this._parent;for(;t;){if(t===e)return!0;t=t._parent}}$_getValue(e,t,r){if(r&&r.indexOf("::")>0)return e.getValue(r,t);if(this._data)return e.getValueAt(this._data,r,t);{const i=this._getParentData();if(i)return e.getValueAt(i,r,t)}}getValue(e,t){var r;const i=null===(r=this.page)||void 0===r?void 0:r.report.data;if(i)return this.$_getValue(i,e,t)}getPrintValue(e,t){return this.$_getValue(e,t,this._value)}_getParentData(){let e=this.dataParent;for(;e;){if(e.data)return e.data;e=e.dataParent}}canRemoveFrom(){return this._parent&&this._parent.canRemove(this)}canAdoptDragSource(e){return!1}adoptDragSource(e){}canPageBreak(){return this.level<=4}isBreakBefore(){return this.canPageBreak()&&(this.pageBreak===PageBreakMode.BEFORE||this.pageBreak==PageBreakMode.BOTH)}isBreakAfter(){return this.canPageBreak()&&(this.pageBreak===PageBreakMode.AFTER||this.pageBreak==PageBreakMode.BOTH)}getInvalids(e){if(this.data){const t=e.designData.get(this.data);if(!t)return['"'+this.data+'" is not a valid data name.'];if(this.value&&t instanceof BandData&&!t.containsField(this.value))return['"'+this.value+'" is not a valid field name.']}}get marqueeParent(){return this}get printable(){return this.visible}isReadOnlyProperty(e){return!("data"!==e.name||!this.dataParent.dataDominant)}_sizable(){return!0}_boundable(){return!0}_doDefaultInit(e,t,r,i){}_getSubStyle(e,t){const r=this.getChildProp(e);return r&&r[t]}_setSubStyle(e,t,r){this._childProps||(this._childProps={}),this._childProps[e]||(this._childProps[e]={});let i=this.getChildProp(e);i||(i={},this.setChildProp(e,i));const s=i[t];r!=s&&(void 0===r?delete i[t]:i[t]=r,this._changed(e,r,s))}_doApplyStyle(e,t,r){return!1}_setLeft(e){this._leftDim=new Dimension(e)}_setRight(e){this._rightDim=new Dimension(e)}_setTop(e){this._topDim=new Dimension(e)}_setBottom(e){this._bottomDim=new Dimension(e)}_getEditProps(){let e=ReportItem.PROPINFOS;return this._sizable()&&(e=e.concat(ReportItem.SIZE_PROPINFOS)),this._valueable()?e=e.concat(ReportItem.VALUE_PROPINFOS):this._datable()&&(e=e.concat(ReportItem.VALUE_PROPINFOS[0])),this._childPropInfos&&(e=e.concat(this._childPropInfos)),e}_getStyleProps(){return[]}_getChildStyleProps(e){return"cellStyles"===e?["cellAlign","backgroundColor","paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeft","borderRight","borderTop","borderBottom"]:[]}_valueable(){return!0}_datable(){return!1}$_attached(e){this._parent!==e&&(this._parent=e,e&&this._doAttached())}_doAttached(){}$_detached(){this._parent&&(this._parent=null,this._doDetached())}_doDetached(){}_isLoading(){const e=this.page;return e&&e.loading}_changed(e,t,r){const i=this.page;i&&!i.loading&&(this._parent&&this._parent.$_childChanged(this,e,t,r),i.$_itemChanged(this,e,t,r))}get stylable(){return!0}_doLoad(e,t){this._loadPropsOf(t,ReportItem.PROPINFOS),this._valueable()?this._loadPropsOf(t,ReportItem.VALUE_PROPINFOS):this._datable()&&this._loadPropOf(t,ReportItem.VALUE_PROPINFOS[0]),this._sizable()&&this._loadPropsOf(t,ReportItem.SIZE_PROPINFOS),this.stylable&&this._loadProps(t,"styles","styleCallback")}_saveChildPropsOf(e,t){const r=this._childProps;if(r)for(let i of t){const t=i.name,s=r[t];void 0===s||"number"==typeof s&&isNaN(s)||s===i.default||(e[t]=s)}}_doSave(e){this._valueable()?this._savePropsOf(e,ReportItem.VALUE_PROPINFOS):this._datable()&&this._savePropOf(e,ReportItem.VALUE_PROPINFOS[0]),this._sizable()&&this._savePropsOf(e,ReportItem.SIZE_PROPINFOS),this._savePropsOf(e,ReportItem.PROPINFOS);const t=this._childPropInfos;t&&t.length>0&&this._saveChildPropsOf(e,t)}_doPrepareLayout(e){}_doPreparePrint(e){}_loadObject(e,t,r){const i=e.getSaveLabel();r.hasOwnProperty(i)&&e.load(t,r[i])}_loadObjects(e,t,r){e.forEach((e=>{this._loadObject(e,t,r)}))}_saveObject(e,t){const r={};e.save(r),Utils.isEmpty(r)||(t[e.getSaveLabel()]=r)}_saveObjects(e,t){e.forEach((e=>{this._saveObject(e,t)}))}}ReportItem.DEF_DISPLAY_ORDER=99,ReportItem.PROP_NAME="name",ReportItem.PROP_TAG="tag",ReportItem.PROP_LEFT="left",ReportItem.PROP_RIGHT="right",ReportItem.PROP_TOP="top",ReportItem.PROP_BOTTOM="bottom",ReportItem.PROP_ON_GET_VALUE="onGetValue",ReportItem.PROP_STYLES="styles",ReportItem.PROP_ON_GET_STYLES="onGetStyles",ReportItem.PROP_VISIBLE="visible",ReportItem.PROP_DATA="data",ReportItem.PROP_VALUE="value",ReportItem.PROP_HINT="hint",ReportItem.PROP_WIDTH="width",ReportItem.PROP_HEIGHT="height",ReportItem.PROP_MIN_WIDTH="minWdth",ReportItem.PROP_MIN_HEIGHT="minHeight",ReportItem.PROP_LOCKED="locked",ReportItem.PROP_PAGE_BREAK="pageBreak",ReportItem.PROP_STYLE_CALLBACK="styleCallback",ReportItem.PROPINFOS=[{name:ReportItem.PROP_NAME,category:PropCategory.BASIC,type:StringProperty,multiple:!1,default:void 0},{name:ReportItem.PROP_TAG,category:PropCategory.BASIC,type:StringProperty,multiple:!1,default:void 0},{name:ReportItem.PROP_VISIBLE,category:PropCategory.BASIC,type:BooleanProperty,multiple:!0,default:!0},{name:ReportItem.PROP_PAGE_BREAK,category:PropCategory.BASIC,type:EnumProperty,multiple:!0,default:PageBreakMode.NONE,domain:PageBreakMode,visible:e=>e.canPageBreak()},{name:ReportItem.PROP_ON_GET_VALUE,category:PropCategory.EVENT,type:FunctionProperty,multiple:!1,default:void 0,signature:"(ctx/* PrintContext*/, item/*ReportItem*/, row/*Number*/, value/*any*/)/*any*/",visible:e=>e instanceof ReportItem&&!(e instanceof ReportGroupItem)},{name:ReportItem.PROP_ON_GET_STYLES,category:PropCategory.EVENT,type:FunctionProperty,multiple:!1,default:void 0,signature:"(ctx/* PrintContext*/, item/*ReportItem*/, row/*Number*/, value/*any*/)/*any*/"}],ReportItem.SIZE_PROPINFOS=[{name:ReportItem.PROP_WIDTH,category:PropCategory.BOUND,type:SizeProperty,multiple:!0,default:void 0},{name:ReportItem.PROP_HEIGHT,category:PropCategory.BOUND,type:SizeProperty,multiple:!0,default:void 0}],ReportItem.VALUE_PROPINFOS=[{name:ReportItem.PROP_DATA,category:PropCategory.DATA,type:ListableProperty,multiple:!1,default:void 0,domain:void 0},{name:ReportItem.PROP_VALUE,category:PropCategory.DATA,type:ListableProperty,multiple:!1,default:void 0,domain:void 0,validate:(e,t)=>{if(t){if(Utils.getEnumValues(PrintValue).indexOf(t)>=0)return;if(e.getData()&&e.getDataFieldNames().indexOf(t)<0)throw'"'+t+'"는(은) 타당한 출력 변수 혹은 데이터 필드명이 아닙니다.'}}}];class ReportGroupItem extends ReportItem{constructor(e){super(e),this._items=[],this.layoutChanged=!1}get outlineExpandable(){return!0}get outlineItems(){return this.items}get isChildPropContainer(){return!0}get count(){return this._items.length}get items(){return this._items.slice()}get designWidth(){return this._designWidth}set designWidth(e){if(e!==this._designWidth){const t=this._designWidth;this._designWidth=e,this._changed(ReportGroupItem.PROP_DESIGN_WIDTH,e,t)}}get designHeight(){return this._designHeight}set designHeight(e){if(e!==this._designHeight){const t=this._designHeight;this._designHeight=e,this._changed(ReportGroupItem.PROP_DESIGN_HEIGHT,e,t)}}get dataDominant(){return!1}get firstChild(){return this._items[0]}get lastChild(){return this._items[this._items.length-1]}get isDataRowContainer(){return!1}needDesignWidth(){return!0}needDesignHeight(){return!0}get(e){return this._items[e]}canContainsBand(){return!1}contains(e){return e instanceof ReportItem&&this._items.includes(e)}indexOf(e){return e instanceof ReportItem&&this._items.indexOf(e)}getNames(e,t=!0){const r=function(e,i){for(let s=e._items.length-1;s>=0;s--){const A=e._items[s];A.name&&i.push(A.name),t&&A instanceof ReportGroupItem&&r(A,i)}};return r(this,e=e||[]),e}find(e,t=!0){const r=this._items;for(let i=r.length-1;i>=0;i--){let s=r[i];if(s.name===e)return s;if(t&&s instanceof ReportGroupItem&&(s=s.find(e,!0),s))return s}}canAdd(e){return e&&this._items.length<this._maxChildCount()&&e.canAddTo(this)&&!this.contains(e)}append(e,t=!1){return this.add(e,-1,t)}add(e,t=-1,r=!1){if(e instanceof ReportItem&&this.canAdd(e)){let i=e.outlineParent;i&&(i instanceof CellGroup&&(i=i.outlineParent),i instanceof ReportGroupItem&&i.remove(e)),t<0&&(t=this._items.length);const s=this._addItem(e,t,r);return this._doItemAdded(s,t),this.$_resetIndices(),!0}}canRemove(e){return e instanceof ReportItem&&e.removable&&this.contains(e)}remove(e){if(e instanceof ReportItem&&this.canRemove(e)){const t=this._removeItem(e);t>=0&&(this._doItemRemoved(e,t),this.$_resetIndices())}}clear(){this._clearItems()}getMoveType(e){}canResizeChild(e,t){return!0}search(e,t,r){for(let i of this._items)if(i instanceof ReportGroupItem)i.search(e,t,r);else{const s=i.designText;if(s){let A=s;t.caseSensitive||(A=A.toLowerCase()),(t.wholeWord&&A===e||!t.wholeWord&&A.indexOf(e)>=0)&&r.push({item:i,prop:s})}}}canChangeChildProp(e,t,r){return!0}changeChildIndex(e,t){const r=this.indexOf(e);if(r>=0&&r!==t)return this._items.splice(r,1),this._items.splice(t,0,e),this.$_resetIndices(),e._changed("index",t,r),!0}canAlign(e){return!1}canAlignTo(e,t){return!0}filter(e){return this._items.filter(e)}getDescendants(e=!1,t=!0){const r=[];return function r(i,s){i._items.forEach((i=>{i instanceof ReportGroupItem?e&&(s.push(i),t&&r(i,s)):s.push(i)}))}(this,r),r}collectInvalids(e,t){this._items.forEach((r=>{const i=r.getInvalids(e);i&&i.forEach((e=>t.push({item:r,reason:e}))),r instanceof ReportGroupItem&&r.collectInvalids(e,t)}))}collectBlankItems(e){const t=[];return(e||this._items).forEach((e=>{if(e.equalBlank){let r=e.value?[e.value]:[],i=e.blankFields;i&&(r=i.split(",").map((e=>e.trim())).filter((e=>!!e))),r.length&&(t.push(e),e.$_blankFlds=r)}})),t.length>0?t:null}_getEditProps(){return super._getEditProps().concat(ReportGroupItem.PROPINFOS)}_getStyleProps(){return["paddingLeft","paddingRight","paddingTop","paddingBottom"]}_maxChildCount(){return Number.MAX_SAFE_INTEGER}isAncestorOf(e){if(e===this)return!0;if(this.contains(e))return!0;for(let t of this._items)if(t.isAncestorOf(e))return!0}canParentOf(e){return!0}prepareLayout(e){super.prepareLayout(e);for(let t of this._items)t.prepareLayout(e)}preparePrint(e){super.preparePrint(e);for(let t of this._items)t.preparePrint(e)}_getNameOfItems(){return"items"}_doLoad(e,t){super._doLoad(e,t);const r=this._getNameOfItems();!this._ignoreItems()&&t.hasOwnProperty(r)&&this._loadItems(e,t[r])}_ignoreItems(){return!1}save(e){let t=super.save(e);return!this._ignoreItems()&&this._items.length>0&&(this._saveItems(e[this._getNameOfItems()]=[]),t=!0),t}dataNameChanged(e,t){super.dataNameChanged(e,t),this._items.forEach((r=>r.dataNameChanged(e,t)))}get internalItems(){return this._items}_valueable(){return!1}_loadChildProp(e,t,r){r.hasOwnProperty(t)&&e.setChildProp(t,r[t])}_loadChildProps(e,t,r){for(let i of t)r.hasOwnProperty(i)&&e.setChildProp(i,r[i])}_loadChildPropsOf(e,t,r){for(let i of r)if(i.name in t){const r=t[i.name];e.setChildProp(i.name,r)}}_getChildPropInfos(e){return null}_loadChild(e,t,r){return t.load(e,r),this.isChildPropContainer&&(t.childPropInfos=this._getChildPropInfos(t)),this._doLoadChild(t,r),t}_loadItems(e,t){const r=Utils.makeArray(t);if(this.clear(),r){const t=this.page,i=[];let s=0;for(let A of r)if(A){let r=e.createItem(A);r&&(r.$_attached(this),r=this._loadChild(e,r,A),!r.parent&&r.$_attached(this),i.push(r),t&&t.$_itemAdded(r,s,!0),this._doItemAdded(r,s++))}i&&i.length>0&&(this._items=i,this.$_resetIndices())}}_doLoadChild(e,t){}_saveItems(e){this._doSaveItems(e,this._items)}_doSaveItems(e,t){for(let r of t){const t={};r.save(t),e.push(t)}}_addItem(e,t,r){const i=this.page,s=this._items;return t=Math.max(0,Math.min(s.length,t)),s.splice(t,0,e),this.isChildPropContainer&&(e.childPropInfos=this._getChildPropInfos(e)),e.$_attached(this),i&&i.$_itemAdded(e,t,r),e}_removeItem(e){const t=e?this._items.indexOf(e):-1;if(t>=0){const r=this.page,i=e.parent;return this._items.splice(t,1),e.$_detached(),r&&r.$_itemRemoved(e,i),t}return-1}_clearItems(){if(this._items.length>0){const e=this.page,t=this._items.slice();this._items=[];for(let e of t)e.$_detached();e&&e.$_itemsRemoved(t)}}_doItemAdded(e,t){}_doItemRemoved(e,t){}$_resetIndices(){for(let e=this._items.length-1;e>=0;e--)this._items[e]._index=e}$_childChanged(e,t,r,i){this._doItemChanged(e,t,r,i)}_doItemChanged(e,t,r,i){}_setOutlineOrders(e,...t){for(let r of t)r.outlineOrder=e++}}ReportGroupItem.PROP_DESIGN_WIDTH="designWidth",ReportGroupItem.PROP_DESIGN_HEIGHT="designHeight",ReportGroupItem.PROPINFOS=[{name:ReportGroupItem.PROP_DESIGN_WIDTH,category:PropCategory.DESIGN,type:DimensionProperty,multiple:!1,default:void 0,visible:e=>e.needDesignWidth()},{name:ReportGroupItem.PROP_DESIGN_HEIGHT,category:PropCategory.DESIGN,type:DimensionProperty,multiple:!1,default:void 0,visible:e=>e.needDesignHeight()}];class ReportItemCollectionItem extends ReportPageItem{constructor(e,t){super(),this._collection=e,t&&this.load(t),this._styles||(this._styles={})}get outlineParent(){return this._collection}get outlineExpandable(){return!1}get outlineLabel(){return"["+this.index+"] "+this.itemType}getSaveType(){return""}canRemoveFrom(){return!0}getPropDomain(e){return null}getStyleProps(){const e=this._getStyleProps(),t=[];for(let r of e)t.push(STYLE_PROPS[r]);return t}getStyle(e){return this._styles[e]}setStyle(e,t){const r=this._styles[e];t!==r&&(void 0===t?delete this._styles[e]:this._styles[e]=t,this._changed(e,t,r))}getStyleProperty(e){return this._styles[e]}setStyleProperty(e,t){const r=this.page;if(r){this._styles[e]!==t&&r.report.setItemStyle(this,e,t)}else this.setStyle(e,t)}getSubStyleProps(e){return null}getPlaceHolder(e){}setItemsProperty(e,t,r){}getSubStyleProperty(e,t){}isChildProp(e){return!1}setSubStyleProperty(e,t,r){}setItemsSubStyleProperty(e,t,r,i){}canPropAdoptDragSource(e,t){return!1}adoptPropDragSource(e,t){}get styles(){return this._styles}set styles(e){const t=this._styles={};if(e){const r=this._getStyleProps();for(let i of r)i in e&&(t[i]=e[i])}t&&this._arrangePaddingStyles(t)}get collection(){return this._collection}get level(){return this._collection?this._collection.level+1:0}load(e){this._doLoad(e)}save(e){return this._doSave(e),e}_doLoad(e){e.hasOwnProperty("styles")&&(this.styles=e.styles)}_doSave(e){Utils.isEmpty(this._styles)||this._saveProp(e,"styles")}_changed(e,t,r){var i;null===(i=this._collection)||void 0===i||i._itemChanged(this,e,t,r)}}class ReportItemCollection extends ReportPageItem{canRemoveFrom(){return!1}canParentOf(e){return!1}getEditProps(){return[]}getStyleProps(){return[]}getSubStyleProps(e){return null}getPlaceHolder(e){}getPropDomain(e){return null}getProperty(e){}setProperty(e,t){}setItemsProperty(e,t,r){}getStyleProperty(e){}getStyle(e){}setStyle(e,t){}setStyleProperty(e,t){}setItemsStyleProperty(e,t,r){}isChildProp(e){return!1}getSubStyleProperty(e,t){}setSubStyleProperty(e,t,r){}setItemsSubStyleProperty(e,t,r,i){}canPropAdoptDragSource(e,t){return!1}adoptPropDragSource(e,t){}isCollectionProp(){return!0}getPropertySources(){return this.items}preparePrint(e){this._doPreparePrint(e);for(let t=this.count-1;t>=0;t--){const r=this.get(t);r instanceof ReportItem&&r.preparePrint(e)}}forEach(e){for(let t=0,r=this.count;t<r;t++)e(this.get(t),t)}get styles(){return null}_itemChanged(e,t,r,i){var s;null===(s=this.page)||void 0===s||s.$_itemChanged(e,t,r,i)}_itemAdded(e){const t=this.page;t&&t.$_itemAdded(e,e.index,!1)}_itemsAdded(e){const t=this.page;t&&t.$_itemsAdded(e,e[0].index)}_itemRemoved(e,t){const r=this.page;r&&r.$_itemRemoved(e,t)}_itemsRemoved(e){const t=this.page;t&&t.$_itemsRemoved(e)}_doPreparePrint(e){}}var AnchorPosition,BandSectionLayout,BoxItemsAlign;!function(e){e.CENTER="center",e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e.INNER_LEFT="innerLeft",e.INNER_RIGHT="innerRight",e.INNER_TOP="innerTop",e.INNER_BOTTOM="innerBottom"}(AnchorPosition||(AnchorPosition={}));class FloatingContainer extends ReportGroupItem{constructor(e){super(e),this._anchorPosition=AnchorPosition.CENTER,this.designWidth=80,this.designHeight=80}get anchorTarget(){return this._anchorTarget}set anchorTarget(e){if(e!=this._anchorTarget){const t=this._anchorTarget;this._anchorTarget=e,this._changed(FloatingContainer.PROP_ANCHOR_TARGET,e,t)}}get anchorPosition(){return this._anchorPosition}set anchorPosition(e){if(e!=this._anchorPosition){const t=this._anchorPosition;this._anchorPosition=e,this._changed(FloatingContainer.PROP_ANCHOR_POSITION,e,t)}}getSaveType(){return"floating"}get outlineLabel(){return"[Floating]"}_maxChildCount(){return 1}_boundable(){return!1}_getEditProps(){return super._getEditProps().concat(FloatingContainer.PROPINFOS)}getPropDomain(e){return e.name===FloatingContainer.PROP_ANCHOR_TARGET?this.outlineParent.getNames([void 0],!0):super.getPropDomain(e)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(r||100,100),this.height=100}_doLoad(e,t){super._doLoad(e,t),!t.hasOwnProperty("items")&&t.hasOwnProperty("item")&&this._loadItems(e,t.item),this._loadPropsOf(t,FloatingContainer.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,FloatingContainer.PROPINFOS)}canAdd(e){return super.canAdd(e)&&!(e instanceof FloatingContainer)}}FloatingContainer.PROP_ANCHOR_TARGET="anchorTarget",FloatingContainer.PROP_ANCHOR_POSITION="anchorPosition",FloatingContainer.PROPINFOS=[{name:FloatingContainer.PROP_ANCHOR_TARGET,category:"Floating",type:ReportItemProperty,multiple:!1,default:void 0},{name:FloatingContainer.PROP_ANCHOR_POSITION,category:"Floating",type:EnumProperty,multiple:!1,default:AnchorPosition.CENTER,domain:AnchorPosition}],FloatingContainer.$_ctor="FloatingContainer",FloatingContainer.ITEM_TYPE="Floating Container";class BoundedContainer extends ReportGroupItem{constructor(e){super(e)}_getChildPropInfos(e){return e._boundable()?BoundedContainer.CHILD_PROPS:null}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildPropsOf(e,t,BoundedContainer.CHILD_PROPS)}}BoundedContainer.CHILD_PROPS=[{name:ReportItem.PROP_LEFT,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0},{name:ReportItem.PROP_RIGHT,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0},{name:ReportItem.PROP_TOP,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0},{name:ReportItem.PROP_BOTTOM,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0}];class CellGroup extends ReportGroupItem{constructor(e,t){super(t),assert(!!e),this._addItem(this._item=e,0,!0)}get item(){return this._item}get isChildPropContainer(){return!1}set childPropInfos(e){this._item.childPropInfos=e}get printable(){return!this._item||this._item.printable}_maxChildCount(){return 1}_doItemChanged(e,t,r,i){this.outlineParent._doItemChanged(e,t,r,i)}}class CellContainer extends ReportGroupItem{constructor(e){super(e),this.noPrepareCell=!1}contains(e){if(super.contains(e))return!0;if(!(e instanceof CellGroup))for(let t of this._items)if(t.item===e)return!0}indexOf(e){let t=super.indexOf(e);if(t<=0&&!(e instanceof CellGroup)){const r=this._items;for(let i=r.length-1;i>=0;i--)if(r[i].item===e){t=i;break}}return t}findCell(e){for(let t of this.internalItems)if(t.item===e)return t}find(e,t=!0){const r=this.internalItems;for(let i=r.length-1;i>=0;i--){let s=r[i].item;if(s.name===e)return s;if(t&&s instanceof ReportGroupItem&&(s=s.find(e,!0),s))return s}}_loadChild(e,t,r){return super._loadChild(e,t,r),this.noPrepareCell||(t=this._prepareCellGroup(t)),t}_addItem(e,t,r){return e=this._prepareCellGroup(e),super._addItem(e,t,r)}_removeItem(e){const t=this._unprepareCellGroup(e);if(t){let r=super._removeItem(t);if(r>=0&&e.outlineParent===t)return t._removeItem(e),r}return-1}_unprepareCellGroup(e){return this.findCell(e)}}!function(e){e.ACROSS_DOWN="acrossDown",e.DOWN_ACROSS="downAcross"}(BandSectionLayout||(BandSectionLayout={}));class AssetItem{constructor(e,t){this.name=e,this.data=t,t&&this._parsetData(t)}get isGroup(){return!1}save(e){return(e=e||{}).name=this.name,this._doSave(e),e}_parsetData(e){}_doSave(e){}}class ImageAsset extends AssetItem{_doSave(e){e.type="img",e.data=this.data,e.description=this.description}}class SvgAsset extends AssetItem{_doSave(e){e.type="svg",e.data=this.data,e.description=this.description}}class ColorPaletteAsset extends AssetItem{_parsetData(e){}_doSave(e){}}class ChartistThemeAsset extends AssetItem{_parsetData(e){this.theme=JSON.parse(e)}_doSave(e){e.type="charitst",e.theme=JSON.stringify(this.theme)}}class HighchartThemeAsset extends AssetItem{_parsetData(e){this.theme=JSON.parse(e)}_doSave(e){e.type="highchart",e.theme=JSON.stringify(this.theme)}}class AssetGroup extends AssetItem{constructor(e){super(e,void 0),this.items=[]}get count(){return this.items.length}get(e){for(let t of this.items)if(t.name==e)return t}save(e){for(let t of this.items)if(!(t instanceof AssetGroup)){let r={};t.save(r),Utils.isNotEmpty(r)&&e.push(r)}}indexOf(e){return this.items.indexOf(e)}get isGroup(){return!0}$_findItem(e,t=!1){let r=e.indexOf("/");r<0&&(r=e.indexOf("\\"));let i=r>=0?e.substring(0,r):e;for(let s of this.items)if(s.name==i)return!t||s instanceof AssetGroup?r>=0&&r<e.length-1&&s instanceof AssetGroup?s.$_findItem(e.substr(r+1)):s:this}}class AssetManager extends EventAware{constructor(){super(),this._nameMap={},this._root=new AssetGroup("_root_"),this._root.path="/"}_doDispose(){super._doDispose()}get root(){return this._root}load(e){for(let t in e){const r=this.forceGroup(t),i=e[t];for(let e of i)if(e.name&&e.type&&e.data){let t;switch(e.type){case"img":t=this.$_addImage(r,e.name,e.data);break;case"svg":t=this.$_addSvg(r,e.name,e.data);break;case"palette":t=this.$_addPalette(r,e.name,e.data);break;case"chartist":t=this.$_addChartist(r,e.name,e.data);break;case"highchart":t=this.$_addHighchart(r,e.name,e.data)}e.hasOwnProperty("description")&&(t.description=e.description)}}}$_collectGroups(e,t){t.push(e);for(let r of e.items)r instanceof AssetGroup&&this.$_collectGroups(r,t)}save(e){const t=[];this.$_collectGroups(this._root,t);for(let r of t){let t=[];r.save(t),e[r.path]=t||[]}}$_checkPath(e){return!e||"/"!=e.charAt(0)&&"\\"!=e.charAt(0)||(e=e.substr(1)),e}get(e){return this._nameMap[e]}getImage(e){const t=this._nameMap[e];if(t instanceof ImageAsset)return t.data}getSvg(e){const t=this._nameMap[e];if(t instanceof SvgAsset)return t.data}getPalette(e){const t=this._nameMap[e];if(t instanceof ColorPaletteAsset)return t}getChartist(e){const t=this._nameMap[e];if(t instanceof ChartistThemeAsset)return t}getHighchart(e){const t=this._nameMap[e];if(t instanceof HighchartThemeAsset)return t}findGroup(e){return this.$_findGroup(e)}forceGroup(e){let t=this._root;if(e=this.$_checkPath(e)){const r=e.split(/[\/\\]/);for(let e of r){const r=t.get(e);if(r)r instanceof AssetGroup&&(t=r);else{const r=new AssetGroup(e);r.path=t.path+(t===this._root?"":"/")+e,r.parent=t,t.items.push(r),t=r}}}return t}addGroup(e,t){const r="string"==typeof e?this.$_findGroup(e):e;return this.$_addGroup(r||this._root,t)}removeGroup(e){const t="string"==typeof e?this.$_findGroup(e):e;if(t&&t!==this._root)return this.$_removeGroup(t),!0}add(e,t){t&&this.$_addItem(e,t)}remove(e){e&&this.$_removeItem(e)}addImage(e,t,r){return this.$_addImage(e,t,r)}addSvg(e,t,r){return this.$_addSvg(e,t,r)}addPalette(e,t,r){return this.$_addPalette(e,t,r)}addCharitst(e,t,r){return this.$_addChartist(e,t,r)}addHighchart(e,t,r){return this.$_addHighchart(e,t,r)}getTree(e="Report"){const t={name:e,editable:!1,tag:this._root};return this.$_parseTree(this._root,t),t}$_parseTree(e,t){if(e.count>0){const r=[];for(let t of e.items)if(t instanceof AssetGroup){const e={name:t.name,tag:t,type:"report-asset-group"};this.$_parseTree(t,e),r.push(e)}r.length>0&&(t.children=r)}}getValidName(e){let t=e,r=1;for(;;){let i=!1;for(let s in this._nameMap)if(t===s){t=e+"-"+r++,i=!0;break}if(!i)break}return t}isValidName(e){return!this._nameMap[e]}$_findGroup(e){let t=e?this._root.$_findItem(e):this._root;return t instanceof AssetGroup?t:null}$_addGroup(e,t){const r=new AssetGroup(t);return r.parent=e,r.path=e.path+(e===this._root?"":"/")+r.name,e.items.push(r),r}$_removeGroup(e){const t=e.parent;t.items.splice(t.items.indexOf(e),1),e.parent=null}$_addItem(e,t){if(t.name in this._nameMap)throw new Error("An asset with the same name alyread exisits: "+t.name);const r=("string"==typeof e?this.$_findGroup(e):e)||this._root;r.items.push(t),t.parent=r,this._nameMap[t.name]=t}$_removeItem(e){const t=e.parent,r=t.items.indexOf(e);r>=0&&(t.items.splice(r,1),delete this._nameMap[e.name])}$_addImage(e,t,r){const i=new ImageAsset(t,r);return this.$_addItem(e,i),i}$_addSvg(e,t,r){const i=new SvgAsset(t,r);return this.$_addItem(e,i),i}$_addPalette(e,t,r){const i=new ColorPaletteAsset(t,r);return this.$_addItem(e,i),i}$_addChartist(e,t,r){const i=new ChartistThemeAsset(t,r);return this.$_addItem(e,i),i}$_addHighchart(e,t,r){const i=new HighchartThemeAsset(t,r);return this.$_addItem(e,i),i}}class StackContainer extends BoundedContainer{constructor(e){super(e)}get outlineLabel(){return"[Stack]"}getSaveType(){return"stack"}_datable(){return!0}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(r||300,300),this.height=100}_getStyleProps(){return StackContainer.STYLE_PROPS}canAlign(e){return!0}canAdoptDragSource(e){return e instanceof ImageAsset}getMoveType(e){return ItemMoveType.INNER}}StackContainer.$_ctor="StackContainer",StackContainer.ITEM_TYPE="Stack Container",StackContainer.STYLE_PROPS=["fontFamily","fontSize","fontWeight","color","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","border","borderLeft","borderRight","borderTop","borderBottom"];class PageSection extends StackContainer{constructor(e){super(e)}get removable(){return!1}get page(){return this.outlineParent}canMove(){return!1}getSaveType(){}canResize(e){return e===ResizeDirection.TOP||e===ResizeDirection.BOTTOM}_getStyleProps(){const e=super._getStyleProps();return[].concat(e)}}class SpaceableSection extends PageSection{constructor(e){super(e)}get spaceTop(){return this._spaceTop}set spaceTop(e){(e=Math.max(0,e))!=this._spaceTop&&(this._spaceTop=e,this._changed(SpaceableSection.PROP_SPACE_TOP,e,!e))}get spaceBottom(){return this._spaceBottom}set spaceBottom(e){(e=Math.max(0,e))!=this._spaceBottom&&(this._spaceBottom=e,this._changed(SpaceableSection.PROP_SPACE_BOTTOM,e,!e))}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SpaceableSection.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SpaceableSection.PROPINFOS)}_getEditProps(){return super._getEditProps().concat(SpaceableSection.PROPINFOS)}}SpaceableSection.PROP_SPACE_TOP="spaceTop",SpaceableSection.PROP_SPACE_BOTTOM="spaceBottom",SpaceableSection.PROPINFOS=[{name:SpaceableSection.PROP_SPACE_TOP,category:"Section",type:NumberProperty,multiple:!1,default:void 0},{name:SpaceableSection.PROP_SPACE_BOTTOM,category:"Section",type:NumberProperty,multiple:!1,default:void 0}];class ReportHeader extends SpaceableSection{constructor(){super("reportHeader"),this.designHeight=20}get outlineLabel(){return"Report Header"}get pathLabel(){return"reportHeader"}canResize(e){return e===ResizeDirection.BOTTOM}}ReportHeader.$_ctor="ReportHeader";class ReportFooter extends SpaceableSection{constructor(){super("reportFooter"),this._alignToBottom=!1,this.designHeight=20}get alignToBottom(){return this._alignToBottom}set alignToBottom(e){e!=this._alignToBottom&&(this._alignToBottom=e,this._changed(ReportFooter.PROP_ALIGN_TO_BOTTOM,e,!e))}get outlineLabel(){return"Report Footer"}get pathLabel(){return"reportFooter"}canResize(e){return e===ResizeDirection.TOP}_getEditProps(){return super._getEditProps().concat(ReportFooter.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ReportFooter.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ReportFooter.PROPINFOS)}}ReportFooter.PROP_ALIGN_TO_BOTTOM="alignToBottom",ReportFooter.PROPINFOS=[{name:ReportFooter.PROP_ALIGN_TO_BOTTOM,category:PropCategory.BOUND,type:BooleanProperty,multiple:!0,default:!1,domain:void 0}],ReportFooter.$_ctor="ReportFooter";class PageHeader extends SpaceableSection{constructor(){super("pageHeader"),this.designHeight=20}get outlineLabel(){return"Page Header"}get pathLabel(){return"pageHeader"}canResize(e){return e===ResizeDirection.BOTTOM}}PageHeader.$_ctor="PageHeader";class PageFooter extends SpaceableSection{constructor(){super("pageFooter"),this.designHeight=20}get outlineLabel(){return"Page Footer"}get pathLabel(){return"pageFooter"}canResize(e){return e===ResizeDirection.TOP}}PageFooter.$_ctor="PageFooter";class PageItemContainer extends BoundedContainer{constructor(e,t){super(e),this._label=t}get outlineLabel(){return this._label}get isArray(){return!0}canResize(e){return!1}_doLoad(e,t){this._loadItems(e,t)}_doSave(e){this._saveItems(e)}}PageItemContainer.$_ctor="PageItemContainer";class TextItemBase extends ReportItem{constructor(e){super(e),this._wrap=!1,this._booleanFormat="False:True",this._numberFormat="#,##0",this._dateFormat="yyyy.MM.dd"}get wrap(){return this._wrap}set wrap(e){e!=this._wrap&&(this._wrap=e,this._changed(TextItem.PROP_WRAP,e,!e))}get booleanFormat(){return this._booleanFormat}set booleanFormat(e){if(e!=this._booleanFormat){const t=this._booleanFormat;this._booleanFormat=e,this._changed(TextItem.PROP_BOOLEAN_FORMAT,e,t)}}get numberFormat(){return this._numberFormat}set numberFormat(e){if(e!=this._numberFormat){const t=this._numberFormat;this._numberFormat=e,this._changed(TextItem.PROP_NUMBER_FORMAT,e,t)}}get dateFormat(){return this._dateFormat}set dateFormat(e){if(e!=this._dateFormat){const t=this._dateFormat;this._dateFormat=e,this._changed(TextItem.PROP_DATE_FORMAT,e,t)}}get textFormat(){return this._textFormat}set textFormat(e){if(e!=this._textFormat){const t=this._textFormat;this._textFormat=e,this._changed(TextItem.PROP_TEXT_FORMAT,e,t)}}get prefix(){return this._prefix}set prefix(e){if(e!=this._prefix){const t=this._prefix;this._prefix=e,this._changed(TextItem.PROP_TEXT_PREFIX,e,t)}}get suffix(){return this._suffix}set suffix(e){if(e!=this._suffix){const t=this._suffix;this._suffix=e,this._changed(TextItem.PROP_TEXT_SUFFIX,e,t)}}_getEditProps(){return super._getEditProps().concat(TextItemBase.PROPINFOS)}_getStyleProps(){return TextItemBase.STYLE_PROPS}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TextItemBase.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,TextItemBase.PROPINFOS)}_doApplyStyle(e,t,r){return"verticalAlign"===e||"scale"==e&&(r[e="transform"]="scale("+t+")",!0)}canAdoptDragSource(e){return e instanceof ReportDataPath}adoptDragSource(e){if(e instanceof ReportDataPath)return{type:DropResultType.PROP,prop:"value",value:e.data+"::"+e.path}}canPropAdoptDragSource(e,t){return"value"===e.name&&t instanceof ReportDataPath}adoptPropDragSource(e,t){if("value"===e.name&&t instanceof ReportDataPath)return{type:DropResultType.PROP,prop:"value",value:t.data+"::"+t.path}}getPrintValue(e,t){return this.isContextValue()?e.getContextValue(this.value):super.getPrintValue(e,t)}}TextItemBase.PROP_WRAP="wrap",TextItemBase.PROP_BOOLEAN_FORMAT="booleanFormat",TextItemBase.PROP_NUMBER_FORMAT="numberFormat",TextItemBase.PROP_DATE_FORMAT="dateFormat",TextItemBase.PROP_TEXT_FORMAT="textFormat",TextItemBase.PROP_TEXT_PREFIX="prefix",TextItemBase.PROP_TEXT_SUFFIX="suffix",TextItemBase.PROPINFOS=[{name:TextItemBase.PROP_WRAP,category:PropCategory.TEXT,type:BooleanProperty,multiple:!0,default:!1,domain:void 0},{name:TextItemBase.PROP_BOOLEAN_FORMAT,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:"False:True"},{name:TextItemBase.PROP_NUMBER_FORMAT,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:"#,##0"},{name:TextItemBase.PROP_DATE_FORMAT,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:"yyyy.MM.dd"},{name:TextItemBase.PROP_TEXT_FORMAT,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:void 0},{name:TextItemBase.PROP_TEXT_PREFIX,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:void 0},{name:TextItemBase.PROP_TEXT_SUFFIX,category:PropCategory.TEXT,type:StringProperty,multiple:!0,default:void 0}],TextItemBase.STYLE_PROPS=["fontFamily","fontSize","fontStyle","textDecoration","fontWeight","color","backgroundColor","textAlign","verticalAlign",,"writingMode","scale","paddingLeft","paddingTop","paddingRight","paddingBottom","border","borderLeft","borderRight","borderTop","borderBottom"];class TextItem extends TextItemBase{constructor(e,t){super(e),this._multiLine=!1,this._lineGap=0,this._contextValueCallbackDelegate=e=>this._contextValueCallbackFunc(e),t&&(this.text=t)}get multiLine(){return this._multiLine}set multiLine(e){e!==this._multiLine&&(this._multiLine=e,this._changed(TextItem.PROP_MULTI_LINE,e,!e))}get lineGap(){return this._lineGap}set lineGap(e){if(e!==this._lineGap){const t=this._lineGap;this._lineGap=e,this._changed(TextItem.PROP_MULTI_LINE,e,t)}}get text(){return this._text}set text(e){if(e!=this._text){const t=this._text;this._text=e,this._changed(TextItem.PROP_TEXT,e,t)}}get onGetContextValue(){return this._onGetContextValue}set onGetContextValue(e){if(e!==this._onGetContextValue){e?(this._contextValueCallbackFunc=new Function("ctx",e),this._contextValueCallback=this._contextValueCallbackDelegate):this._contextValueCallback===this._contextValueCallbackDelegate&&(this._contextValueCallback=null);const t=this._onGetContextValue;this._onGetContextValue=e,this._changed(TextItem.PROP_ON_GET_CONTEXT_VALUE,e,t)}}get contextValueCallback(){return this._contextValueCallback}set contextValueCallback(e){if(e!==this._contextValueCallback){const t=this._contextValueCallback;this._contextValueCallback=e,this._changed(TextItem.PROP_ON_GET_CONTEXT_VALUE,e,t)}}getSaveType(){return"text"}get outlineLabel(){const e=this.value?"["+this.value+"]":this._text;return"[Text]"+(e?" "+e:"")}get designText(){return this.value||this._text}get pathLabel(){return"text"}isContextValue(){return!!this._contextValueCallback||super.isContextValue()}_getEditProps(){return super._getEditProps().concat(TextItem.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.text="Text"}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TextItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,TextItem.PROPINFOS)}}TextItem.PROP_MULTI_LINE="multiLine",TextItem.PROP_LINE_GAP="lineGap",TextItem.PROP_TEXT="text",TextItem.PROP_ON_GET_CONTEXT_VALUE="onGetContextValue",TextItem.PROPINFOS=[{name:TextItem.PROP_MULTI_LINE,category:PropCategory.TEXT,type:BooleanProperty,multiple:!0,default:!1},{name:TextItem.PROP_LINE_GAP,category:PropCategory.TEXT,type:NumberProperty,multiple:!0,default:0},{name:TextItem.PROP_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:void 0},{name:TextItem.PROP_ON_GET_CONTEXT_VALUE,category:PropCategory.EVENT,type:FunctionProperty,multiple:!1,default:void 0,signature:"(ctx/*PrintContext*/)/*any*/"}],TextItem.$_ctor="TextItem",TextItem.ITEM_TYPE="Text";class SpaceItem extends ReportItem{constructor(e){super(e),this.size=10}get size(){return this._size}set size(e){if((e=this._validateSize(e))!=this._size){const t=this._size;this._size=e,this._sizeDim=new Dimension(e),this._changed(SpaceItem.PROP_SIZE,e,t)}}getSize(e){return this._sizeDim.getPixel(e)}getSaveType(){return"space"}get outlineLabel(){return this.$_getParentItem(),"[Space] "+this.size}_sizable(){return!1}_boundable(){return!1}_getEditProps(){return super._getEditProps().concat(SpaceItem.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.size=10}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SpaceItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SpaceItem.PROPINFOS)}canAddTo(e){return e instanceof BoxContainer}$_getParentItem(){let e=this.outlineParent;for(;e;){if(e instanceof BoxContainer)return e;e=e.outlineParent}}}SpaceItem.PROP_SIZE="size",SpaceItem.PROPINFOS=[{name:SpaceItem.PROP_SIZE,category:PropCategory.BOUND,type:DimensionProperty,multiple:!1,default:void 0}],SpaceItem.$_ctor="SpaceItem",SpaceItem.ITEM_TYPE="Space",function(e){e.START="start",e.MIDDLE="middle",e.END="end"}(BoxItemsAlign||(BoxItemsAlign={}));class BoxContainer extends ReportGroupItem{constructor(e){super(e),this.itemGap=4}get itemsAlign(){return this._itemsAlign}set itemsAlign(e){if(e!==this._itemsAlign){const t=this._itemsAlign;this._itemsAlign=e,this._changed(BoxContainer.PROP_ITEMS_ALIGN,e,t)}}get itemGap(){return this._itemGap}set itemGap(e){if(Utils.isNotDefined(e)&&(e=0),e!=this._itemGap){const t=this._itemGap;this._itemGap=e,this._itemGapDim=Utils.isEmpty(e)?null:new Dimension(e),this._changed(BoxContainer.PROP_ITEM_GAP,e,t)}}getItemGap(e){return this._itemGapDim?this._itemGapDim.getPixel(e):0}loadProps(e){this._loadPropsOf(e,BoxContainer.PROPINFOS)}_getEditProps(){return super._getEditProps().concat(BoxContainer.PROPINFOS)}_datable(){return!0}_getStyleProps(){return BoxContainer.STYLE_PROPS}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,BoxContainer.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,BoxContainer.PROPINFOS)}canAlign(e){return!0}canAdoptDragSource(e){return e instanceof ImageAsset}}BoxContainer.PROP_ITEMS_ALIGN="itemsAlign",BoxContainer.PROP_ITEM_GAP="itemGap",BoxContainer.PROPINFOS=[{name:BoxContainer.PROP_ITEMS_ALIGN,category:PropCategory.BOX,type:EnumProperty,multiple:!1,default:void 0,domain:BoxItemsAlign},{name:BoxContainer.PROP_ITEM_GAP,category:PropCategory.BOX,type:DimensionProperty,multiple:!1,default:void 0}],BoxContainer.STYLE_PROPS=["fontFamily","fontSize","fontWeight","color","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","border","borderLeft","borderRight","borderTop","borderBottom"];class RowBoxContainer extends BoxContainer{constructor(e){super(e),this._child_top=NaN,this._child_bottom=NaN,this.designHeight=50,this.designWidth=300}getTopOf(e){return e.getChildProp(ReportItem.PROP_TOP,this._child_top)}setTopOf(e,t){e.setChildProp(ReportItem.PROP_TOP,t)}getBottomOf(e){return e.getChildProp(ReportItem.PROP_BOTTOM,this._child_bottom)}setBottomOf(e,t){e.setChildProp(ReportItem.PROP_BOTTOM,t)}getSaveType(){return"rbox"}get outlineLabel(){return"[Row Box]"}_getChildPropInfos(e){return e._boundable()?RowBoxContainer.CHILD_PROPS:null}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(r||300,300),this.height=50}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildPropsOf(e,t,RowBoxContainer.CHILD_PROPS)}canAlignTo(e,t){return"top"===t||"bottom"===t}canResizeChild(e,t){return e instanceof SpaceItem?t===ResizeDirection.RIGHT:ResizeDirection.isIn(t,ResizeDirection.RIGHT,ResizeDirection.TOP,ResizeDirection.BOTTOM,ResizeDirection.TOP_RIGHT,ResizeDirection.BOTTOM_RIGHT)}}RowBoxContainer.CHILD_PROPS=[{name:ReportItem.PROP_TOP,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0},{name:ReportItem.PROP_BOTTOM,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0}],RowBoxContainer.$_ctor="RowBoxContainer",RowBoxContainer.ITEM_TYPE="Row Box";class ColumnBoxContainer extends BoxContainer{constructor(e){super(e),this._child_left=NaN,this._child_right=NaN,this.designWidth=100,this.designHeight=100}getLeftOf(e){return e.getChildProp(ReportItem.PROP_LEFT,this._child_left)}setLeftOf(e,t){e.setChildProp(ReportItem.PROP_LEFT,t)}getRightOf(e){return e.getChildProp(ReportItem.PROP_RIGHT,this._child_right)}setRightOf(e,t){e.setChildProp(ReportItem.PROP_RIGHT,t)}getSaveType(){return"cbox"}get outlineLabel(){return"[Column Box]"}get pathLabel(){return"cbox"}_getChildPropInfos(e){return e._boundable()?ColumnBoxContainer.CHILD_PROPS:null}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(r||100,100),this.height=100}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildPropsOf(e,t,ColumnBoxContainer.CHILD_PROPS)}canAlignTo(e,t){return"left"===t||"right"===t}canResizeChild(e,t){return e instanceof SpaceItem?t===ResizeDirection.BOTTOM:ResizeDirection.isIn(t,ResizeDirection.BOTTOM,ResizeDirection.LEFT,ResizeDirection.RIGHT,ResizeDirection.BOTTOM_LEFT,ResizeDirection.BOTTOM_RIGHT)}}ColumnBoxContainer.CHILD_PROPS=[{name:ReportItem.PROP_LEFT,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0},{name:ReportItem.PROP_RIGHT,category:PropCategory.BOUND,type:DimensionProperty,multiple:!0,default:void 0,domain:void 0}],ColumnBoxContainer.$_ctor="ColumnBoxContainer",ColumnBoxContainer.ITEM_TYPE="Column Box";class DiagonalBoxContainer extends ReportGroupItem{constructor(e){super(e),this._reversed=!1,this._lineStyles={},this.designWidth=60,this.designHeight=60}getSubStyleProps(e){if(e===DiagonalBoxContainer.PROP_LINE_STYLES){const t=[];for(let r of DiagonalBoxContainer.LINE_STYLE_PROPS){const i={...STYLE_PROPS[r]};i.parent=e,t.push(i)}return t}return super.getSubStyleProps(e)}_getSubStyle(e,t){return e===DiagonalBoxContainer.PROP_LINE_STYLES?this._lineStyles[t]:super._getSubStyle(e,t)}_setSubStyle(e,t,r){if(e===DiagonalBoxContainer.PROP_LINE_STYLES){const i=this._lineStyles[t];this._lineStyles[t]=r,this._changed(e,r,i)}else super._setSubStyle(e,t,r)}get reversed(){return this._reversed}set reversed(e){e!==this._reversed&&(this._reversed=e,this._changed(DiagonalBoxContainer.PROP_REVERSED,e,!e))}get lineStyles(){return this._lineStyles}set lineStyles(e){const t=this._lineStyles={};if(e){const r=DiagonalBoxContainer.LINE_STYLE_PROPS;for(let i of r)i in e&&(t[i]=e[i])}}get firstItem(){return this._firstItem}get secondItem(){return this._secondItem}getSaveType(){return"dbox"}get outlineLabel(){return"[Diagonal Box]"}_getEditProps(){return super._getEditProps().concat(DiagonalBoxContainer.PROPINFOS)}_datable(){return!0}_getStyleProps(){return DiagonalBoxContainer.STYLE_PROPS}_maxChildCount(){return 2}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=60,this.height=45,this.add(new TextItem(null,"Text1")),this.add(new TextItem(null,"Text2"))}_doLoad(e,t){this._firstItem=this._secondItem=null,super._doLoad(e,t),this._loadPropsOf(t,DiagonalBoxContainer.PROPINFOS);const r=t.dpos;if(!isNaN(r))switch(r){case 1:this._firstItem=this.get(0),this._secondItem=null;break;case 2:this._firstItem=null,this._secondItem=this.get(0);break;case 3:this._firstItem=this.get(0),this._secondItem=this.get(1)}}_doSave(e){super._doSave(e),this._savePropsOf(e,DiagonalBoxContainer.PROPINFOS);let t=0;this._firstItem&&(t+=1),this._secondItem&&(t+=2),e.dpos=t}_doItemAdded(e,t){super._doItemAdded(e,t),this._firstItem?this._secondItem||(this._secondItem=e):this._firstItem=e}_doItemRemoved(e,t){super._doItemRemoved(e,t),e===this._firstItem?this._firstItem=null:e===this._secondItem&&(this._secondItem=null)}canAlign(e){return!0}}DiagonalBoxContainer.PROP_REVERSED="reversed",DiagonalBoxContainer.PROP_LINE_STYLES="lineStyles",DiagonalBoxContainer.PROPINFOS=[{name:DiagonalBoxContainer.PROP_REVERSED,category:PropCategory.BOX,type:BooleanProperty,multiple:!0,default:!1},{name:DiagonalBoxContainer.PROP_LINE_STYLES,category:PropCategory.BASIC,type:StylesProperty,multiple:!1,default:void 0}],DiagonalBoxContainer.STYLE_PROPS=["fontFamily","fontSize","fontWeight","color","backgroundColor","paddingLeft","paddingTop","paddingRight","paddingBottom","border","borderLeft","borderRight","borderTop","borderBottom"],DiagonalBoxContainer.LINE_STYLE_PROPS=["borderTop"],DiagonalBoxContainer.$_ctor="DiagonalBoxContainer",DiagonalBoxContainer.ITEM_TYPE="Diagonal Box";class EditCommandError extends Error{constructor(e){super(e)}}class EditCommandFailed extends EditCommandError{}class EditCommand extends Base{constructor(e){super(),this._id=-1,this._time=new Date,this._name=e}_doDispose(){}get name(){return this._name}get id(){return this._id}get time(){return this._time}get displayLabel(){return this._name}get description(){return this._name}run(){return this.redo(!1)}}class EditCommandGroup extends EditCommand{constructor(e,t){super(e),assert(t&&t.length>0),this._commands=t.slice()}_doDispose(){for(let e of this._commands)e.dispose();this._commands=null,super._doDispose()}get commands(){return this._commands.slice()}undo(){for(let e=0;e<this._commands.length;e++)this._commands[e].undo()}redo(e){for(let t=this._commands.length-1;t>=0;t--)this._commands[t].redo(e)}get source(){return this._commands[0].source}}class EditCommandStack extends EventAware{constructor(e){super(),this._commands=[],this._current=-1,this._closed=-1,this._undoing=!1,this._redoing=!1,this._owner=e}_doDispose(){this._owner=null,this._commands=null,super._doDispose()}get owner(){return this._owner}get length(){return this._commands.length}get current(){return this._current}get empty(){return 0===this._commands.length}get canUndo(){return this._current>=0}get canRedo(){return this._commands.length>this._current+1}get undoing(){return this._undoing}get redoing(){return this._redoing}get dirty(){return this._closed!==this._current}get(e){return this._commands[e]}undo(){if(this.canUndo){const e=this._commands[this._current];this._undoing=!0;try{e.undo()}finally{this._undoing=!1}const t=this._current;return this._current=this._current-1,this._changed(t,e),!0}}redo(e=!0){if(this.canRedo){const e=this._current+1,t=this._commands[e];this._redoing=!0;try{t.redo(!0)}finally{this._redoing=!1}const r=this._current;return this._current=e,this._changed(r,t),!0}}execute(e){if(e)try{e.run();const t=this._current;return this._current++,this._commands[this._current]=e,e._id=this._current,this.$_shrink(this._current+1),this._changed(t,e),!0}catch(e){if(!(e instanceof EditCommandFailed))throw e}}flush(){let e=this._commands.length;if(e>0){for(;e--;)this._commands[e].dispose();this._commands=[];const t=this._current;this._current=-1,this._changed(t,null)}}close(){this._closed=this._current}getHistory(e=!1){return this._commands.slice(0,e?void 0:this._current+1)}_changed(e,t){const r=this._owner;r&&r.editCommandStackChanged(this,t,this.canUndo,this.canRedo),(this._current<0||e<0)&&r&&r.editCommandStackDirtyChanged(this)}$_shrink(e){const t=this._commands;if(e>=0&&e<t.length){for(let r=t.length-1;r>=e;r--)t[r].dispose();t.splice(e,t.length-e)}}}class Messages{}Messages.E_TABLE_MOVE_MERGE_CELLS="병합된 셀의 일부를 이동할 수 없습니다.",Messages.E_TABLE_MOVE_TARGET_MERGE_CELLS="병합된 셀의 중간으로 이동할 수 없습니다.";class TableCellItem extends CellGroup{constructor(e){super(e,null)}get table(){return this.parent}get col(){const e=this.item.getChildProp(TableBase.PROP_TABLE_COL);return isNaN(e)?0:e}get row(){const e=this.item.getChildProp(TableBase.PROP_TABLE_ROW);return isNaN(e)?0:e}canChangeChildProp(e,t,r){return this.parent.canChangeChildProp(e,t,r)}}class TableRow extends ReportItemCollectionItem{constructor(e,t){super(e,t),this._index=-1}getEditProps(){return TableRow.PROPINFOS}getCollectionLabel(){return"tableRow"}get table(){return this.collection.table}get index(){return this._index}get height(){return this._height}set height(e){if("string"==typeof e&&(e=e.trim()),e!=this._height){const t=this._height;this._height=e,this._heightDim=new Dimension(e),this._changed(TableRow.PROP_HEIGHT,e,t)}}getHeight(e){return this._heightDim?this._heightDim.getPixel(e):NaN}get itemType(){return"Row"}get page(){var e;return null===(e=this.collection)||void 0===e?void 0:e.table.page}get displayPath(){return this.collection?this.collection.table.displayPath+".rows["+this.index+"]":"row"}get collection(){return super.collection}get marqueeParent(){var e;return null===(e=this.collection)||void 0===e?void 0:e.marqueeParent}get level(){return this.collection?this.collection.level+1:0}isAncestor(e){return e===this.collection.table}canRemoveFrom(){return this.collection&&this.collection.count>1}canSelectedWith(e){return e instanceof TableRow&&e.table===this.table}_getStyleProps(){return TableRow.styleProps}_doLoad(e){"string"==typeof e||"number"==typeof e?this.height=e:e&&this._loadPropsOf(e,TableRow.PROPINFOS),super._doLoad(e)}_doSave(e){return this._savePropsOf(e,TableRow.PROPINFOS),super._doSave(e),e}}TableRow.PROP_HEIGHT="height",TableRow.styleProps=["backgroundColor"],TableRow.PROPINFOS=[{name:TableRow.PROP_HEIGHT,category:PropCategory.ROW,type:DimensionProperty,multiple:!1,default:void 0}];class TableRowCollection extends ReportItemCollection{constructor(e){super(),this._rows=[],this._table=e}get outlineParent(){return this._table}get outlineLabel(){return"[Rows]"}get outlineExpandable(){return!0}get outlineItems(){return this._rows.forEach(((e,t)=>e.outlineOrder=t)),this._rows}getSaveType(){return"rows"}get table(){return this._table}get count(){return this._rows.length}set count(e){const t=this._rows.length;if((e=Math.max(0,Utils.toNumber(e)))!==t)try{if(e>t){for(let t=this._rows.length;t<e;t++)this._rows.push(new TableRow(this,null));this._itemsAdded(this._rows.slice(t,e))}else{const r=this._rows.slice(e,t);this._rows.length=e,this._itemsRemoved(r)}}finally{this.$_invalidateRows()}}get items(){return this._rows.slice(0)}load(e,t){if(this._heights=null,this._rows=[],e&&e.length>0)for(let r of e){const e=new TableRow(this,r);if(this._rows.push(e),t>0&&this._rows.length===t)break}if(t>0)for(;this._rows.length<t;)this._rows.push(new TableRow(this,null));return this.$_invalidateRows(),this._rows.length}save(e){this._rows.forEach((t=>e.push(t.save({}))))}get(e){return e>=0&&e<this._rows.length?this._rows[e]:null}getRange(e,t){return t>=e?this._rows.slice(e,t+1):this._rows.slice(t,e+1)}indexOf(e){return this._rows.indexOf(e)}getHeights(){if(this._heights)this._rows.forEach(((e,t)=>{this._heights.set(t,this._rows[t]._heightDim)}));else{const e=[];this._rows.forEach((t=>{e.push(t._heightDim)})),this._heights=new DimensionCollection(null),this._heights.$_init(e)}return this._heights}add(e,t=-1){t=t<0?this._rows.length:t;const r=this.$_add(e,t);if(r)return this.$_invalidateRows(),this._itemAdded(r),r}remove(e){if(e>=0&&e<this._rows.length){const t=this._rows.splice(e,1)[0];return this.$_invalidateRows(),this._itemRemoved(t,this._table),!0}}move(e,t,r){this._rows.splice(e,t).forEach(((e,t)=>this._rows.splice(r+t,0,e))),this.$_invalidateRows()}adjustHeights(e,t,r){const i=t[e+1]-t[e],s=t[e+2]-t[e+1],A=(r-i)/(i+s),n=this._rows[e]._heightDim||new Dimension(i),o=this._rows[e+1]._heightDim||new Dimension(s),a=n.value,l=o.value,h=[];if(n.fixed&&o.fixed){let e=n.getFixedPixel(),t=o.getFixedPixel();const r=e+t;e=Math.round(e+A*r),t=r-e,e=getUnitsByPixels(n.unit,e),t=getUnitsByPixels(o.unit,t),h.push(e+n.unit,t+o.unit)}else if(n.fixed||o.fixed){const e=t[this._rows.length];let r=n.getPixel(e),i=o.getPixel(e);const s=r+i,a=n.fixed?n.unit:o.unit;r=Math.round(r+A*s),i=s-r,r=getUnitsByPixels(a,r),i=getUnitsByPixels(a,i),h.push(r+a,i+a)}else{const e=a+l,t=+(a+A*e).toFixed(1),r=+(e-t).toFixed(1);h.push(t+"%",r+"%")}return h}get page(){var e;return null===(e=this._table)||void 0===e?void 0:e.page}get displayPath(){return this._table?this._table.displayPath+".rows":"rows"}get level(){return this._table?this._table.level+1:0}get marqueeParent(){return this._table}isAncestor(e){return e===this._table}$_add(e,t){if(e instanceof TableRow||(e=new TableRow(this,e)),e instanceof TableRow&&this._rows.indexOf(e)<0)return this._rows.splice(Math.min(t,this._rows.length),0,e),e}$_invalidateRows(){this._rows.forEach(((e,t)=>{e._parent=this,e._index=t})),this._heights=null,this.$_rowChanged(null)}$_rowChanged(e){this._table&&this._table.$_rowChanged(e)}}class TableCell extends ReportItemCollectionItem{constructor(e,t,r,i){super(e,i),this._applyEndStyles=!1,this._row=-1,this._col=-1,this._styleCallbackDelegate=(e,t,r)=>this._styleCallbackFunc(e,t,r),this._row=t,this._col=r}get outlineLabel(){const e=this.table.getCell(this._row,this._col),t=["[",this._row,",",this._col,"] Cell"];if(e){const r=e.rowspan,i=e.colspan;r>1&&t.push(" (",r+" rows)"),i>1&&t.push(" (",i+" cols)")}return t.join("")}getEditProps(){return TableCell.PROPINFOS}get table(){return this.collection.table}get row(){return this._row}get col(){return this._col}get height(){return this._rowspan||1}get width(){return this._colspan||1}get bottom(){return this._row+(isNaN(this._rowspan)?0:this._rowspan-1)}get right(){return this._col+(isNaN(this._colspan)?0:this._colspan-1)}get isSingle(){return 1===this.width&&1===this.height}get colspan(){return this._colspan}set colspan(e){var t;if(e<=1&&(e=void 0),e!==this._colspan){const r=this._colspan;this._colspan=e,this._changed(TableCell.PROP_COLSPAN,e,r),null===(t=this.table)||void 0===t||t._spanChanged(this)}}get rowspan(){return this._rowspan}set rowspan(e){var t;if(e<=1&&(e=void 0),e!==this._rowspan){const r=this._rowspan;this._rowspan=e,this._changed(TableCell.PROP_ROWSPAN,e,r),null===(t=this.table)||void 0===t||t._spanChanged(this)}}get applyEndStyles(){return this._applyEndStyles}set applyEndStyles(e){e!==this._applyEndStyles&&(this._applyEndStyles=e,this._changed(TableCell.PROP_APPLY_END_STYLES,e,!e))}get styleCallback(){return this._styleCallback}set styleCallback(e){if(e!==this._styleCallback){const t=this._styleCallback;this._styleCallback=e,this._changed(TableCell.PROP_STYLE_CALLBACK,e,t)}}get onGetStyles(){return this._onGetStyles}set onGetStyles(e){if(e!==this._onGetStyles){e?(this._styleCallbackFunc=new Function("ctx, cell, row, value",e),this._styleCallback=this._styleCallbackDelegate):this._styleCallback===this._styleCallbackDelegate&&(this._styleCallback=null);const t=this._onGetStyles;this._onGetStyles=e,this._changed(ReportItem.PROP_ON_GET_STYLES,e,t)}}adoptDragSource(e){}get itemType(){return"cell"}get collection(){return super.collection}get page(){var e;return null===(e=this.collection)||void 0===e?void 0:e.table.page}get displayPath(){return this.collection?this.collection.table.displayPath+".cells["+this._row+", "+this._col+"]":"cell"}get marqueeParent(){return this.table}_getStyleProps(){return TableCell.styleProps}setProps(e){super.setProps(e),e.hasOwnProperty("row")&&(this._row=e.row),e.hasOwnProperty("col")&&(this._col=e.col)}canSelectedWith(e){return e instanceof TableCell||e instanceof TableSelection}_doLoad(e){this._loadPropsOf(e,TableCell.PROPINFOS),this._loadProps(e,"styleCallback"),super._doLoad(e)}_doSave(e){e.r=this._row,e.c=this._col,this._savePropsOf(e,TableCell.PROPINFOS),delete e.col,delete e.row,e.colspan<=1&&delete e.colspan,e.rowspan<=1&&delete e.rowspan,this._saveProp(e,"styleCallback"),super._doSave(e)}}TableCell.PROP_COL="col",TableCell.PROP_ROW="row",TableCell.PROP_COLSPAN="colspan",TableCell.PROP_ROWSPAN="rowspan",TableCell.PROP_APPLY_END_STYLES="applyEndStyles",TableCell.PROP_ON_GET_STYLES="onGetStyles",TableCell.PROP_STYLE_CALLBACK="styleCallback",TableCell.PROPINFOS=[{name:TableCell.PROP_ROW,category:PropCategory.CELL,type:NumberProperty,multiple:!1,default:void 0,readonly:!0},{name:TableCell.PROP_COL,category:PropCategory.CELL,type:NumberProperty,multiple:!1,default:void 0,readonly:!0},{name:TableCell.PROP_ROWSPAN,category:PropCategory.CELL,type:NumberProperty,multiple:!1,default:void 0},{name:TableCell.PROP_COLSPAN,category:PropCategory.CELL,type:NumberProperty,multiple:!1,default:void 0},{name:TableCell.PROP_APPLY_END_STYLES,category:PropCategory.CELL,type:BooleanProperty,multiple:!1,default:!1},{name:ReportItem.PROP_ON_GET_STYLES,category:PropCategory.EVENT,type:FunctionProperty,multiple:!1,default:void 0,signature:"(ctx/* PrintContext*/, cell/*TableCell*/, row/*Number*/)/*any*/"}],TableCell.styleProps=["cellAlign","backgroundColor","paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeft","borderRight","borderTop","borderBottom"];class TableSelection{constructor(e,t,r){this.cols=1,this.rows=1,this.selectItem=this._cell=e,this.cols=t,this.rows=r}get table(){return this.selectItem.table}get cell(){return this._cell}get col(){return this._cell.col}get row(){return this._cell.row}get right(){return this._cell.col+this.cols-1}get bottom(){return this._cell.row+this.rows-1}canSelectedWith(e){return e instanceof TableCell||e instanceof TableSelection}contains(e,t){return e>=this.row&&e<=this.bottom&&t>=this.col&&t<=this.right}containsCell(e){return e.table===this.table&&this.contains(e.row,e.col)}isSingle(e){const t=this._cell,r=t.table,i=t.row,s=t.col;if(this.rows>1||this.cols>1){if(e){let e=0;for(let t=0;t<this.rows;t++)for(let A=0;A<this.cols;A++)if(!r.isHiddenAt(i+t,s+A)&&(e++,e>1))return!1;return!0}return!1}return!0}getCells(e){const t=this._cell,r=t.table,i=t.row,s=t.col,A=[];for(let t=0;t<this.rows;t++)for(let n=0;n<this.cols;n++){const o=r.getCell(i+t,s+n);e&&r.isHiddenAt(i+t,s+n)||A.push(o)}return A}resizeTo(e){if(e){const t=this._cell.table,r=this.rows,i=this.cols,s=t.cells.getRectangle(this.selectItem,e);return this._cell=t.getCell(s.y,s.x),this.rows=s.height,this.cols=s.width,r!==this.rows||i!==this.cols}}resizeBy(e,t){const r=this.selectItem.table;let i=this.selectItem.col,s=this.selectItem.row,A=this._cell.col,n=this._cell.row;if(i===A?A=this.right+e:A+=e,s===n?n=this.bottom+t:n+=t,e>0){const e=A;for(let t=Math.min(s,n);t<=Math.max(s,n);t++){const i=r.getCell(t,A);i&&r.isHiddenCell(i)&&(A=Math.max(e,e+r.getHeadCell(i).width-1))}}if(t>0){const e=n;for(let t=Math.min(i,A);t<=Math.max(i,A);t++){const i=r.getCell(n,t);i&&r.isHiddenCell(i)&&(n=Math.max(e,e+r.getHeadCell(i).height-1))}}return A=Math.max(0,Math.min(r.colCount,A)),n=Math.max(0,Math.min(r.rowCount,n)),this.resizeTo(r.getCell(n,A))}equals(e){return this._cell===e&&this.rows===e.height&&this.cols===e.width}}class TableCellCollection extends ReportItemCollection{constructor(e){super(),this._cells=[],this._table=e}get outlineParent(){return this._table}get outlineLabel(){return"[Cells]"}get outlineExpandable(){return!0}get outlineItems(){return this._vcells}getSaveType(){return"cells"}isCollectionProp(){return!1}get table(){return this._table}get count(){return this._vcells.length}get items(){return this._vcells}get rowCount(){return this._cells.length}get colCount(){return this._cells[0].length}getColCount(e){return this._cells[e].length}get(e){return e>=0&&e<this._vcells.length?this._vcells[e]:null}getAt(e,t){if(e>=0&&e<this._cells.length)return this._cells[e][t]}getRectangle(e,t){const r=this.table,i=Math.min(r.getTopRow(e),r.getTopRow(t)),s=Math.max(e.bottom,t.bottom),A=Math.min(r.getLeftCol(e),r.getLeftCol(t)),n=Math.max(e.right,t.right);return Rectangle.create(A,i,n-A+1,s-i+1)}getRectangleCells(e,t,r=!0){const i=this.table,s=this.getRectangle(e,t),A=[];for(let e=s.y;e<s.y+s.height;e++)for(let t=s.x;t<s.x+s.width;t++)r&&i.isHiddenAt(e,t)||A.push(this._cells[e][t]);return A}prepareCells(){const e=this._table,t=this._cells,r=e.rowCount,i=e.colCount;for(;t.length<r;)t.push([]);for(let e=0;e<r;e++){const r=t[e];for(;r.length<i;)r.push(new TableCell(this,e,r.length))}}load(e){var t;if(this.prepareCells(),e&&e.length>0){const r=this._cells;for(let i of e){const e=i.r,s=i.c,A=null===(t=r[e])||void 0===t?void 0:t[s];null==A||A.load(i)}}}save(e){this._cells.forEach((t=>{t.forEach((t=>{const r=t.save({});let i=!1;for(let e in r)if("r"!==e&&"c"!==e){i=!0;break}i&&e.push(r)}))}))}resetVisibles(){const e=this._table,t=this._cells,r=e.rowCount,i=e.colCount,s=this._vcells,A=this._vcells=[];for(let s=0;s<r;s++)for(let r=0;r<i;r++)e.isHiddenAt(s,r)||A.push(t[s][r]);s&&!Utils.equalArrays(s,A)&&(s&&this._itemsRemoved(s),this._itemsAdded(A))}saveCells(){const e=this._cells,t=e.length,r=[];for(let i=0;i<t;i++){const t=[];for(let r=0,s=e[i].length;r<s;r++){const s=e[i][r];t.push({props:s.getProps(),styles:s.styles})}r.push(t)}return r}restoreCells(e){const t=e.length,r=this._cells;for(let i=0;i<t;i++)for(let t=0,s=e[i].length;t<s;t++){const s=r[i][t],A=e[i][t];s.setProps(A.props),s.styles=A.styles}}truncateRow(e){const t=this._cells,r=this.saveCells();for(let r=0;r<e;r++)for(let i=0,s=t[r].length;i<s;i++){const s=t[r][i];r+s.rowspan>e&&(s.rowspan=e-r)}return r}truncateCol(e){const t=this._cells,r=this.saveCells();for(let r=0;r<t.length;r++)for(let i=0;i<e;i++){const s=t[r][i];i+s.colspan>e&&(s.colspan=e-i)}return r}removeRow(e){const t=this._cells,r=this.saveCells();t.splice(e,1);for(let t=e;t<this._cells.length;t++)this._cells[t].forEach((e=>{e._row=e.row-1}));for(let r=0;r<e;r++)for(let i=0,s=t[r].length;i<s;i++){const s=t[r][i];r+s.rowspan>e&&s.rowspan--}return r}removeRows(e,t){const r=this._cells,i=this.saveCells();r.splice(e,t);for(let i=0;i<e;i++)for(let s=0,A=r[i].length;s<A;s++){const A=r[i][s],n=A.rowspan;i+n>e+t?A.rowspan=Math.max(1,n-t):i+n>e&&(A.rowspan=Math.max(1,i-e))}return i}addRow(e){const t=this.saveCells(),r=[],i=this._cells.length>0?this._cells[0].length:this.table.colCount;for(let t=0;t<i;t++)r.push(new TableCell(this,e,t));this._cells.splice(e,0,r);for(let t=e+1;t<this._cells.length;t++)this._cells[t].forEach((e=>{e._row=e.row+1}));for(let t=0;t<e;t++)this._cells[t].forEach((r=>{t+r.rowspan>e&&r.rowspan++}));return t}removeCol(e){const t=this._cells,r=t.length,i=this.saveCells();for(let i=0;i<r;i++)t[i].splice(e,1);for(let i=0;i<r;i++)for(let r=e;r<t[i].length;r++)t[i][r]._col=t[i][r].col-1;for(let i=0;i<r;i++)for(let r=0,s=t[i].length;r<s;r++){const s=t[i][r];r+s.colspan>e&&s.colspan--}return i}removeCols(e,t){}addCol(e){const t=this.saveCells(),r=this._cells,i=r.length;for(let t=0;t<i;t++)r[t].splice(e,0,new TableCell(this,t,e));for(let t=0;t<r.length;t++)for(let i=e+1;i<r[t].length;i++)r[t][i]._col=r[t][i].col+1;for(let t=0;t<i;t++)for(let i=0;i<e;i++)i+r[t][i].colspan>e&&r[t][i].colspan++;return t}$_resetPositions(){const e=this._cells;for(let t=0;t<e.length;t++){const r=e[t];for(let e=0;e<r.length;e++)r[e]._row=t,r[e]._col=e}}moveRows(e,t,r){const i=this.saveCells(),s=this._cells,A=this._table.rowCount;if(r!==e&&t>=1&&e>=0&&e+t<=A&&r>=0&&r<A){return s.splice(e,t).forEach(((e,t)=>s.splice(r+t,0,e))),this.$_resetPositions(),i}}moveCols(e,t,r){const i=this.saveCells(),s=this._table.rowCount,A=this._table.colCount;if(r!==e&&t>=1&&e>=0&&e+t<=A&&r>=0&&r<A){for(let i=0;i<s;i++){const s=this._cells[i];s.splice(e,t).forEach(((e,t)=>s.splice(r+t,0,e)))}return this.$_resetPositions(),i}}getMergeBounds(e,t,r,i){const s=this._cells;let A=t,n=i;for(let o=e;o<=r;o++){for(let e=t-1;e>=0;e--){if(s[o][e].colspan>t-e){A=Math.min(A,e);break}}for(let e=t;e<=i;e++){const t=s[o][e].colspan;if(e+t-1>i){n=Math.max(n,e+t-1);break}}}let o=e,a=r;for(let A=t;A<=i;A++){for(let t=e-1;t>=0;t--){if(s[t][A].rowspan>e-t){o=Math.min(o,t);break}}for(let t=e;t<=r;t++){const e=s[t][A].rowspan;if(t+e-1>r){a=Math.max(a,t+e-1);break}}}return{r1:o,c1:A,r2:a,c2:n}}mergeBoundsOf(e){return this.getMergeBounds(e.row,e.col,e.bottom,e.right)}merge(e,t,r,i){const s=this._cells,A=this.saveCells();for(let A=e;A<=r;A++)for(let e=t;e<=i;e++)s[A][e].rowspan=s[A][e].colspan=void 0;return s[e][t].rowspan=r-e+1,s[e][t].colspan=i-t+1,A}mergeSelection(e){return this.merge(e.row,e.col,e.bottom,e.right)}unmerge(e){const t=this.saveCells();return e.rowspan=e.colspan=void 0,t}get page(){var e;return null===(e=this._table)||void 0===e?void 0:e.page}get displayPath(){return this._table?this._table.displayPath+".cells":"cells"}get level(){return this._table?this._table.level+1:0}get marqueeParent(){return this._table}isAncestor(e){return e===this._table}}class TableBase extends CellContainer{constructor(e){super(e),this._fixed=!1,this._cellStyles={},this._cellMap=[],this._spans=[],this._spanDirty=!0,this._itemDirty=!1,this._rows=this._createRows(),this._cells=new TableCellCollection(this),this._resetCells()}getSubStyleProps(e){if(e===TableBase.PROP_TABLE_CELL_STYLES){const t=[];for(let r of TableBase.CELL_STYLES){const i={...STYLE_PROPS[r]};i.parent=e,t.push(i)}return t}return super.getSubStyleProps(e)}_getSubStyle(e,t){return e===TableBase.PROP_TABLE_CELL_STYLES?this._cellStyles[t]:super._getSubStyle(e,t)}_setSubStyle(e,t,r){if(e===TableBase.PROP_TABLE_CELL_STYLES){const i=this._cellStyles[t];this._cellStyles[t]=r,this._changed(e,r,i)}else super._setSubStyle(e,t,r)}get outlineItems(){return[this._rows,this._cells].concat(super.outlineItems)}get rowCount(){return this._rowCount||0}set rowCount(e){if((e=Math.max(1,Utils.toNumber(e)))!==this._rowCount){const t=this._rowCount;this._rowCount=e,this._rows.count=e,e<t?this._removeRows(e,t-e):this._resetCells(),this._changed(TableBase.PROP_ROW_COUNT,e,t)}}get rows(){return this._rows}get cells(){return this._cells}get minRowHeight(){return this._minRowHeight}set minRowHeight(e){if(e!=this._minRowHeight){const t=this._minRowHeight;this._minRowHeight=e,this._minRowHeightDim=e?new Dimension(e):null,this._changed(TableBase.PROP_MIN_ROW_HEIGHT,e,t)}}get cellStyles(){return this._cellStyles}set cellStyles(e){const t=this._cellStyles={};if(e){const r=TableBase.CELL_STYLES;for(let i of r)i in e&&(t[i]=e[i])}t&&this._arrangePaddingStyles(t)}get fixed(){return this._fixed}set fixed(e){e!==this._fixed&&(this._fixed=e,this._changed(TableBase.PROP_FIXED,e,!e))}getRow(e){return this._rows.get(e)}getRowHeights(){return this._rows.getHeights()}getCell(e,t){return this._cells.getAt(e,t)}getCellItemAt(e,t){return e>=0&&e<this._cellMap.length?this._cellMap[e][t]:null}getCellItem(e){return this.getCellItemAt(e.row,e.col)}isHiddenAt(e,t){const r=this._spans[e][t];return r.r*r.c==0}isHiddenCell(e){const t=e&&this._spans[e.row][e.col];return t&&t.r*t.c==0}getHeadCell(e){let t=e.row,r=e.col;if(this.isHiddenAt(t,r)){for(;t>0&&this.isHiddenAt(--t,r););for(;r>0&&this.isHiddenAt(t,--r););}return this.getCell(t,r)}getLeftCol(e){const t=e.row;let r=e.col;for(;r>0&&this.isHiddenAt(t,r);)r--;return r}getTopRow(e){const t=e.col;let r=e.row;for(;r>0&&this.isHiddenAt(r,t);)r--;return r}getMinRowHeight(){return this._minRowHeightDim?this._minRowHeightDim.getFixedPixel():NaN}getColItems(e,t=!0){return this.filter((r=>{const i=r.col;return t?i===e:i!==e})).map((e=>e.item))}getRowItems(e,t=!0){return this.filter((r=>{const i=r.row;return t?i===e:i!==e})).map((e=>e.item))}getRowItemsFrom(e){return this.filter((t=>t.row>=e)).map((e=>e.item))}getRectItems(e,t,r,i,s=!1){return this.filter((r=>{const i=r.row,A=r.col;return!s||i!==e||A!==t})).map((e=>e.item))}prepareLayout(){return(this._spanDirty||this._itemDirty)&&(this.$_resetSpans(this._cells,this._spanDirty),this._spanDirty=!1,this._itemDirty=!1),this._spans}setFocus(e){this._focus=e&&{...e}}removeRow(e){const t=this._cellMap,r="number"==typeof e?e:this._rows.indexOf(e);if(r>=0&&r<this._rowCount){this._rows.remove(r);for(let e=0;e<this.colCount;e++){const i=t[r][e];i&&this.remove(i.item)}t.splice(r,1);for(let e=r;e<t.length;e++){const r=t[e];if(r)for(let e=0;e<this.colCount;e++){const t=r[e];t&&t.item&&t.item.$_setChildProp("row",t.item.row-1)}}this._rowCount--,this._resetCells(),this._changed(TableBase.PROP_ROW_COUNT,this._rowCount,this._rowCount+1)}}addRow(e,t){if(e>=0&&e<=this._rowCount){const r=this._rows.add(t,e);return this._rowCount++,this._addRows(e,1),this._resetCells(),this._changed(TableBase.PROP_ROW_COUNT,this._rowCount,this._rowCount-1),r}}canMoveRows(e,t,r,i=!1){const s=this.rowCount;if(r!==e&&e>=0&&e+t<=s&&r>=0&&r<s){let A=e;const n=this._spans,o=this.colCount;for(let e=0;e<o;e++){const t=n[A][e];if(0===t.r&&t.v.row<A){if(i)throw new AlertError(Messages.E_TABLE_MOVE_MERGE_CELLS);return!1}}A=e+t-1;for(let e=0;e<o;e++){const t=n[A][e].v;if(t&&t.row+t.rowspan>A){if(i)throw new AlertError(Messages.E_TABLE_MOVE_MERGE_CELLS);return!1}}if(r>e&&r++,r<s)for(let e=0;e<o;e++){if(0===n[r][e].r){if(i)throw new AlertError(Messages.E_TABLE_MOVE_TARGET_MERGE_CELLS);return!1}}return!0}}getNearestMovableRow(e,t,r){if(r<0)for(;e+r>=0;){if(this.canMoveRows(e,t,e+r))return e+r;r--}else if(r>0)for(;e+t-1+r<this.rowCount;){if(this.canMoveRows(e,t,e+r))return e+t-1+r;r++}return-1}moveRows(e,t,r,i=!1){if(i||this.canMoveRows(e,t,r))return this._rows.move(e,t,r),this._moveRows(e,t,r),this.layoutChanged=!0,this._changed(TableBase.PROP_CELL_LAYOUT,void 0,void 0),!0}canMoveCols(e,t,r,i=!1){const s=this.colCount;if(r!==e&&e>=0&&e+t<=s&&r>=0&&r<s){let A=e;const n=this._spans,o=this.rowCount;for(let e=0;e<o;e++){const t=n[e][A];if(0===t.c&&t.v.col<A){if(i)throw new AlertError(Messages.E_TABLE_MOVE_MERGE_CELLS);return!1}}A=e+t-1;for(let e=0;e<o;e++){const t=n[e][A].v;if(t&&t.col+t.colspan-1>A){if(i)throw new AlertError(Messages.E_TABLE_MOVE_MERGE_CELLS);return!1}}if(r>e&&r++,r<s)for(let e=0;e<o;e++){if(0===n[e][r].c){if(i)throw new AlertError(Messages.E_TABLE_MOVE_TARGET_MERGE_CELLS);return!1}}return!0}}getNearestMovableColumn(e,t,r){if(r<0)for(;e+r>=0;){if(this.canMoveCols(e,t,e+r,!1))return e+r;r--}else if(r>0)for(;e+t-1+r<this.colCount;){if(this.canMoveCols(e,t,e+t-1+r,!1))return e+r;r++}return-1}checkCounts(){const e=this.colCount,t=this.rowCount;assert(this._spans.length===t),this._spans.forEach((t=>{assert(t.length===e)}))}getSelection(e){return new TableSelection(e,e.width,e.height)}mergeCells(e,t,r,i){const s=this._cellMap;let A=e;e=Math.max(0,Math.min(e,r)),r=Math.min(this.rowCount-1,Math.max(A,r)),A=t,t=Math.max(0,Math.min(t,i)),i=Math.min(this.colCount-1,Math.max(A,i));for(let A=e;A<=r;A++)for(let r=t;r<=i;r++)if(A!==e||r!==t){const e=s[A][r];e&&this.remove(e.item)}this._resetCells()}_getEditProps(){return super._getEditProps().concat(TableBase.PROPINFOS)}_getStyleProps(){return TableBase.TABLE_STYLES}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.minRowHeight="24px"}_doLoad(e,t){super._doLoad(e,t),t&&(this._loadProps(t,"rowCount","base","minRowHeight","cellStyles"),t.hasOwnProperty("rows")&&(this._rowCount=this._rows.load(t.rows,this._rowCount)),this._cells.load(t.cells),this.$_resetSpans(this._cells))}_doSave(e){super._doSave(e),this._saveProps(e,"rowCount","base","minRowHeight","cellStyles"),this._rows.count&&this._rows.save(e.rows=[]),this._cells.save(e.cells=[])}_doSaveItems(e,t){for(let r of t){const t={};r.item.save(t),e.push(t)}}_getChildPropInfos(e){return TableBase.TABLE_CHILD_PROPS}_doLoadChild(e,t){this._loadChildProps(e,[TableBase.PROP_TABLE_COL,TableBase.PROP_TABLE_ROW],t)}_prepareCellGroup(e){try{const t=e.getChildProp(TableBase.PROP_TABLE_COL,this._focus?this._focus.col:0),r=e.getChildProp(TableBase.PROP_TABLE_ROW,this._focus?this._focus.row:0),i=this._cellMap;if(t>=0&&r>=0){let s=i[r]&&i[r][t];if(!s)return s=this._createCell(e),i[r]||(i[r]=[]),e.setChildProp(TableBase.PROP_TABLE_COL,t),e.setChildProp(TableBase.PROP_TABLE_ROW,r),i[r][t]=s;if(s.item!==e)throw Error("Only one item can exits in a table cell: "+(e.name||"")+"("+r+","+t+")")}}finally{this._focus=null}}_unprepareCellGroup(e){for(let t=0;t<this._cellMap.length;t++){const r=this._cellMap[t];if(r)for(let t=0;t<r.length;t++)if(r[t]&&r[t].item===e){const e=r[t];return r[t]=null,e}}}_doItemAdded(e,t){this._itemDirty=!0}_doItemRemoved(e,t){this._itemDirty=!0}_doItemChanged(e,t,r,i){if("col"===t||"row"===t){let r;"col"===t?(r=this._cellMap[e.row][i],this._cellMap[e.row][i]=null):(r=this._cellMap[i][e.col],this._cellMap[i][e.col]=null),this._cellMap[e.row][e.col]=r,this.onCellChanged&&this.onCellChanged(e,t,i)}}isAncestorOf(e){return super.isAncestorOf(e)||e instanceof TableCell&&e.table===this}_createRows(){return new TableRowCollection(this)}_spanChanged(e){this._spanDirty=!0}_resetCells(){var e;const t=this._cellMap.length,r=[],i=this.rowCount,s=this.colCount;for(let A=0;A<i;A++){const i=[];for(let r=0;r<s;r++){const s=t>A?null===(e=this._cellMap[A])||void 0===e?void 0:e[r]:null;i.push(s)}r.push(i)}this._cellMap=r,this._cells.prepareCells(),this.$_resetSpans(this._cells)}_removeCols(e,t){let r;this._cellMap.forEach((i=>{for(let s=0;s<t;s++)r=i[s+e],r&&this.remove(r.item);for(let s=e+t;s<i.length;s++)r=i[s],r&&r.item&&r.item.$_setChildProp("col",r.item.col-t);i.splice(e,t)})),this.$_resetSpans(this._cells)}_addCols(e,t){this._cellMap.forEach((r=>{for(let i=0;i<t;i++)r.splice(e,0,null);for(let i=e+t;i<r.length;i++){let e=r[i];e&&e.item&&e.item.$_setChildProp("col",e.item.col+t)}}))}_moveCols(e,t,r){this._cellMap.forEach((i=>{i.splice(e,t).forEach(((e,t)=>{i.splice(r+t,0,e)}));for(let e=0;e<i.length;e++){const t=i[e];t&&t.item&&t.item.$_setChildProp("col",e)}})),this.$_resetSpans(this._cells)}_removeRows(e,t){const r=this._cellMap;let i;for(let s=0;s<t;s++){const t=r[s+e];if(t)for(let e=0;e<this.colCount;e++)i=t[e],i&&this.remove(i.item)}r.splice(e,t);for(let s=e;s<r.length;s++){const A=r[s+e];if(A)for(let e=0;e<this.colCount;e++)i=A[e],i&&i.item&&i.item.$_setChildProp("row",i.item.row-t)}this.$_resetSpans(this._cells)}_addRows(e,t){const r=this._cellMap;for(let i=0;i<t;i++)r.splice(e,0,[]);for(let i=e+t;i<r.length;i++){const e=r[i];e&&e.forEach((e=>{e&&e.item&&e.item.$_setChildProp("row",e.item.row+t)}))}}_moveRows(e,t,r){const i=this._cellMap;i.splice(e,t).forEach(((e,t)=>i.splice(r+t,0,e)));for(let e=0;e<i.length;e++){const t=i[e];if(t)for(let r=0;r<this.colCount;r++){const i=t[r];i&&i.item&&i.item.$_setChildProp("row",e)}}this.$_resetSpans(this._cells)}canChangeChildProp(e,t,r){if("col"===t||"row"===t){if(r!==e.getProperty(t)){const i="row"===t?r:e.getProperty("row"),s="col"===t?r:e.getProperty("col");if(i<0||i>=this._rowCount||s<0||s>=this.colCount)throw new Error("Out of bounds");if(this.getCellItemAt(i,s))throw new Error("Already a item exists at ("+i+", "+s+")")}}return!0}$_rowChanged(e){this._changed(TableBase.PROP_ROWS,this._rows,this._rows)}$_resetSpans(e,t=!0){const r=this._rowCount,i=this.colCount;let s=this._spans;if(t){s=this._spans=[];for(let e=0;e<r;e++){s[e]=[];for(let t=0;t<i;t++)s[e][t]={r:1,c:1,m:null,v:null}}}for(let e=0;e<r;e++){s[e]=[];for(let t=0;t<i;t++)s[e][t]={r:1,c:1,m:null,v:null}}for(let t=0;t<r;t++)for(let A=0;A<i;A++){const n=s[t][A];if(n.r>0&&n.c>0){const o=e.getAt(t,A),a=this.getCellItemAt(t,A);if(o){const e=Math.min(i-A,Utils.pickNum(o.colspan,1)),l=Math.min(r-t,Utils.pickNum(o.rowspan,1));if(e>1||l>1)for(let r=0;r<l;r++)for(let i=0;i<e;i++){const e=s[t+r][A+i];e.m=a,i>0&&(e.c=0),r>0&&(e.r=0),e.v=o}n.m=a,n.v=o,n.r=l,n.c=e}else n.m=n.v=null}}this._cells.resetVisibles()}_addColumn(e){this._addCols(e,1),this._resetCells()}_removeColumn(e){var t,r;const i=this.rowCount,s=this.colCount,A=this._cellMap;for(let n=0;n<i;n++){const i=A[n],o=null===(t=A[n][e])||void 0===t?void 0:t.item;if(o&&this.remove(o),i){i.splice(e,1);for(let t=e;t<s;t++){const e=null===(r=i[t])||void 0===r?void 0:r.item;e&&e.$_setChildProp("col",e.col-1)}}}this._resetCells()}}TableBase.PROP_ROW_COUNT="rowCount",TableBase.PROP_MIN_ROW_HEIGHT="minRowHeight",TableBase.PROP_ROWS="rows",TableBase.PROP_TABLE_CELL_STYLES="cellStyles",TableBase.PROP_CELL_LAYOUT="table_cell_layout",TableBase.PROP_FIXED="fixed",TableBase.PROP_TABLE_COL="col",TableBase.PROP_TABLE_ROW="row",TableBase.PROPINFOS=[{name:TableBase.PROP_ROW_COUNT,category:PropCategory.TABLE,type:NumberProperty,multiple:!1,default:0},{name:TableBase.PROP_MIN_ROW_HEIGHT,category:PropCategory.TABLE,type:DimensionProperty,typeProps:{percentable:!1},multiple:!1,default:"15px"},{name:TableBase.PROP_TABLE_CELL_STYLES,category:PropCategory.BASIC,type:StylesProperty,multiple:!1,default:void 0},{name:TableBase.PROP_FIXED,category:PropCategory.TABLE,type:BooleanProperty,multiple:!0,default:void 0}],TableBase.TABLE_CHILD_PROPS=[{name:TableBase.PROP_TABLE_COL,category:PropCategory.TABLE,type:NumberProperty,multiple:!1,default:void 0,domain:void 0},{name:TableBase.PROP_TABLE_ROW,category:PropCategory.TABLE,type:NumberProperty,multiple:!1,default:void 0,domain:void 0}],TableBase.TABLE_STYLES=["fontFamily","fontSize","fontWeight","color","backgroundColor"],TableBase.CELL_STYLES=["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeft","borderRight","borderTop","borderBottom"];class TableColumnBase extends ReportItemCollectionItem{constructor(e,t){super(e,t),this._index=-1,this._widthDim||(this.width="20%")}getEditProps(){return TableColumnBase.PROPINFOS}getCollectionLabel(){return"tableColumn"}get index(){return this._index}get width(){return this._width}set width(e){if(e!=this._width){const t=this._width;this._width=e,this._widthDim=new Dimension(e),this._changed(TableColumnBase.PROP_WIDTH,e,t)}}getWidth(e){return this._widthDim?this._widthDim.getPixel(e):NaN}get itemType(){return"Column"}get page(){var e;return null===(e=this.collection)||void 0===e?void 0:e.page}get level(){return this.collection?this.collection.level+1:0}canSelectedWith(e){return e instanceof TableColumnBase&&e.parent===this.parent}_getStyleProps(){return TableColumnBase.styleProps}_doLoad(e){"string"==typeof e||"number"==typeof e?this.width=e:e&&this._loadPropsOf(e,TableColumnBase.PROPINFOS),super._doLoad(e)}_doSave(e){return this._savePropsOf(e,TableColumnBase.PROPINFOS),super._doSave(e),e}}TableColumnBase.PROP_WIDTH="width",TableColumnBase.PROPINFOS=[{name:TableColumnBase.PROP_WIDTH,category:PropCategory.COLUMN,type:DimensionProperty,multiple:!1,default:void 0}],TableColumnBase.styleProps=["cellAlign","backgroundColor"];class TableColumnCollectionBase extends ReportItemCollection{constructor(e){super(),this._columns=[],this._owner=e}get outlineParent(){return this._owner}get outlineLabel(){return"[Columns]"}get outlineExpandable(){return!0}get outlineItems(){return this._columns.forEach(((e,t)=>e.outlineOrder=t)),this._columns}getSaveType(){return"columns"}get owner(){return this._owner}get count(){return this._columns.length}set count(e){const t=this._columns.length;if((e=Math.max(0,Utils.toNumber(e)))!==t)try{if(e>t){for(let t=this._columns.length;t<e;t++)this._columns.push(this._createColumn(null));this._itemsAdded(this._columns.slice(t,e))}else this._itemsRemoved(this._columns.splice(e,t))}finally{this.$_invalidateColumns()}}get items(){return this.columns}get columns(){return this._columns.slice(0)}load(e,t){if(this._widths=null,this._columns=[],e&&e.length>0)for(let r of e){const e=this._createColumn(r);if(this._columns.push(e),t>0&&this._columns.length===t)break}if(t>0)for(;this._columns.length<t;)this._columns.push(this._createColumn(null));return this.$_invalidateColumns(),this._columns.length}save(e){this._columns.forEach((t=>e.push(t.save({}))))}get(e){return e>=0&&e<this._columns.length?this._columns[e]:null}getRange(e,t){return t>=e?this._columns.slice(e,t+1):this._columns.slice(t,e+1)}indexOf(e){return this._columns.indexOf(e)}getWidths(){if(this._widths)this._columns.forEach(((e,t)=>{this._widths.set(t,e._widthDim)}));else{const e=[];this._columns.forEach((t=>{e.push(t._widthDim)})),this._widths=new DimensionCollection(null),this._widths.$_init(e)}return this._widths}add(e,t=-1){t=t<0?this._columns.length:t;const r=this.$_add(e,t);if(r)return this.$_invalidateColumns(),this._itemAdded(r),r}remove(e){if(e>=0&&e<this._columns.length){const t=this._columns.splice(e,1)[0];return this.$_invalidateColumns(),this._itemRemoved(t,this._owner),!0}}clear(){if(this._columns.length>0)return this._columns=[],this.$_invalidateColumns(),!0}move(e,t,r){this._columns.splice(e,t).forEach(((e,t)=>this._columns.splice(r+t,0,e))),this.$_invalidateColumns()}adjustWidths(e,t,r){const i=this._columns[e]._widthDim,s=this._columns[e+1]._widthDim,A=i.value,n=s.value,o=t[e+1]-t[e],a=(r-o)/(o+(t[e+2]-t[e+1])),l=[];if(i.fixed&&s.fixed){let e=i.getFixedPixel(),t=s.getFixedPixel();const r=e+t;e=Math.round(e+a*r),t=r-e,e=getUnitsByPixels(i.unit,e),t=getUnitsByPixels(s.unit,t),l.push(e+i.unit,t+s.unit)}else if(i.fixed||s.fixed){const e=t[this._columns.length];let r=i.getPixel(e),A=s.getPixel(e);const n=r+A,o=i.fixed?i.unit:s.unit;r=Math.round(r+a*n),A=n-r,r=getUnitsByPixels(o,r),A=getUnitsByPixels(o,A),l.push(r+o,A+o)}else{const e=A+n,t=+(A+a*e).toFixed(1),r=+(e-t).toFixed(1);l.push(t+"%",r+"%")}return l}get page(){var e;return null===(e=this._owner)||void 0===e?void 0:e.page}get displayPath(){return this._owner?this._owner.displayPath+".columns":"columns"}get level(){return this._owner?this._owner.level+1:0}get marqueeParent(){return this._owner}isAncestor(e){return e===this._owner}$_add(e,t){if(e instanceof TableColumnBase||(e=this._createColumn(e)),e instanceof TableColumnBase&&this._columns.indexOf(e)<0)return this._columns.splice(Math.min(t,this._columns.length),0,e),e}$_invalidateColumns(){this._columns.forEach(((e,t)=>{e._parent=this,e._index=t})),this._widths=null,this.$_columnChanged(null)}$_columnChanged(e){this._owner&&this._owner.$_columnChanged(e)}}const ID_SUM=0,ID_COUNT=1,ID_MIN=2,ID_MAX=3,ID_AVG=4,IDENTS={sum:0,count:1,min:2,max:3,avg:4},ID_FIELD=999,ID_MASTER_FIELD=888;class DataBandSummaryRuntime extends ExpressionRuntime{constructor(e){super(),this._fieldMap={},this._idxMap={},this._masterFieldMap={},this._masterIdxMap={},this._band=e}_doDispose(){super._doDispose()}prepare(e,t){let r=this._data=e;if(this._fieldMap={},this._rowCount=NaN,r)for(let e=0;e<r.fieldCount;e++){const t=r.getField(e).fieldName;this._fieldMap[":"+t]=this._fieldMap[t]=999+e,this._idxMap[999+e]=t}if(t instanceof BandData){r=this._master=t;for(let e=0;e<r.fieldCount;e++){const t=r.getField(e).fieldName;this._masterFieldMap["master:"+t]=888+e,this._masterIdxMap[888+e]=t}}return this}setGroup(e){return this._group=e,this}setRows(e,t=-1){return this._rows=e,this._masterRow=t,this}setRowCount(e){return this._rowCount=e,this}isIdentifier(e){const t=e.toLocaleLowerCase();return IDENTS.hasOwnProperty(t)?IDENTS[t]:this._fieldMap.hasOwnProperty(e)?this._fieldMap[e]:this._masterFieldMap.hasOwnProperty(e)?this._masterFieldMap[e]:super.isIdentifier(e)}evaluateIdentifier(e){return e>=999?this._idxMap[e]:e>=888?this._master.getRowValue(this._masterRow,this._masterIdxMap[e]):void super.evaluateIdentifier(e)}evaluateFunc(e,t){const r=this.$_getRows();switch(e){case 0:return this._band.getSum(t,this._rowCount,r);case 1:return this._band.getCount(t,this._rowCount,r);case 2:return this._band.getMin(t,this._rowCount,r);case 3:return this._band.getMax(t,this._rowCount,r);case 4:return this._band.getAvg(t,this._rowCount,r)}return super.evaluateFunc(e,t)}$_getRows(){let e=this._rows;if(!e&&this._group){e=[];for(let t=0;t<this._group.count;t++)e.push(t+this._group.row)}return e}}class DataBandRowGroup extends ReportGroupItem{constructor(e){super(e)}get outlineLabel(){return"["+this.index+"] Group"}canRemoveFrom(){return!0}getEditProps(){return DataBandRowGroup.PROPINFOS}get field(){return this._field}set field(e){if(e!=this._field){const t=this._field;this._field=e,this._changed(DataBandRowGroup.PROP_FIELD,e,t)}}get pathLabel(){return"group"}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,DataBandRowGroup.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,DataBandRowGroup.PROPINFOS)}getPropDomain(e){if(e.name=DataBandRowGroup.PROP_FIELD)return this.getDataFieldNames()}}DataBandRowGroup.PROP_FIELD="field",DataBandRowGroup.PROPINFOS=[{name:DataBandRowGroup.PROP_FIELD,category:PropCategory.BAND,type:ListableProperty,multiple:!1,default:void 0}];class DataBand extends ReportGroupItem{constructor(e){super(e),this._sectionCount=1,this._sectionLayout=BandSectionLayout.DOWN_ACROSS,this._sectionGap=10,this._repeatMastreRow=!1,this._repeatDetailHeader=!1,this._repeatDetailFooter=!1,this.pageNo=0,this.detailRows=NaN,this.add(this._detail=new DataBandCollection(this,"detail")),this._summaryRuntime=new DataBandSummaryRuntime(this)}get dataObj(){return this._dataObj}get designData(){return this._designData}get detail(){return this._detail}get isDetail(){return!!this._master}get master(){return this._master}get bandLevel(){return this._master?this._master.bandLevel+1:0}get sectionCount(){return this.isDetail?1:this._sectionCount}set sectionCount(e){if((e=isNaN(e)?1:Math.max(1,e))!==this._sectionCount){const t=this._sectionCount;this._sectionCount=e,this._changed(DataBand.PROP_DATA_BAND_SECTION_COUNT,e,t)}}get sectionLayout(){return this._sectionLayout}set sectionLayout(e){if(e!==this._sectionLayout){const t=this._sectionLayout;this._sectionLayout=e,this._changed(DataBand.PROP_DATA_BAND_SECTIONLAYOUT,e,t)}}get sectionGap(){return this._sectionGap}set sectionGap(e){if((e=Utils.toNumber(e,0))!=this._sectionGap){const t=this._sectionGap;this._sectionGap=e,this._changed(DataBand.PROP_DATA_BAND_SECTION_GAP,e,t)}}get maxRowCount(){return this._maxRowCount}set maxRowCount(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._maxRowCount){const t=this._maxRowCount;this._maxRowCount=e,this._changed(DataBand.PROP_DATA_BAND_MAX_ROW_COUNT,e,t)}}get rowsPerPage(){return this._rowsPerPage}set rowsPerPage(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._rowsPerPage){const t=this._rowsPerPage;this._rowsPerPage=e,this._changed(DataBand.PROP_DATA_BAND_ROWS_PER_PAGE,e,t)}}get maxRowsPerPage(){return this._maxRowsPerPage}set maxRowsPerPage(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._maxRowsPerPage){const t=this._maxRowsPerPage;this._maxRowsPerPage=e,this._changed(DataBand.PROP_DATA_BAND_MAX_ROWS_PER_PAGE,e,t)}}get endRowCount(){return this._endRowCount}set endRowCount(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._endRowCount){const t=this._endRowCount;this._endRowCount=e,this._changed(DataBand.PROP_DATA_BAND_END_ROW_COUNT,e,t)}}get maxEndRowCount(){return this._maxEndRowCount}set maxEndRowCount(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._maxEndRowCount){const t=this._maxEndRowCount;this._maxEndRowCount=e,this._changed(DataBand.PROP_DATA_BAND_MAX_END_ROW_COUNT,e,t)}}get endRowMessage(){return this._endRowMessage}set endRowMessage(e){if(e!==this._endRowMessage){const t=this._endRowMessage;this._endRowMessage=e,this._changed(DataBand.PROP_DATA_BAND_END_ROW_MESSAGE,e,t)}}get masterFields(){return this._masterFields}set masterFields(e){if(e!=this._masterFields){const t=this._masterFields;this._masterFields=e,this._changed(DataBand.PROP_DATA_BAND_MASTER_FIELDS,e,t)}}get keyFields(){return this._keyFields}set keyFields(e){if(e!=this._keyFields){const t=this._keyFields;this._keyFields=e,this._changed(DataBand.PROP_DATA_BAND_KEY_FIELDS,e,t)}}get rowsPerMaster(){return this._rowsPerMaster}set rowsPerMaster(e){if(isNaN(e)?e=void 0:e>>=0,e!==this._rowsPerMaster){const t=this._rowsPerMaster;this._rowsPerMaster=e,this._changed(DataBand.PROP_DATA_BAND_ROWS_PER_MASTER,e,t)}}get repeatMasterRow(){return this._repeatMastreRow}set repeatMasterRow(e){e!==this._repeatMastreRow&&(this._repeatMastreRow=e,this._changed(DataBand.PROP_DATA_BAND_REPEAT_MASTER_ROW,e,!e))}get repeatDetailHeader(){return this._repeatDetailHeader}set repeatDetailHeader(e){e!==this._repeatDetailHeader&&(this._repeatDetailHeader=e,this._changed(DataBand.PROP_DATA_BAND_REPEAT_DETAIL_HEADER,e,!e))}get repeatDetailFooter(){return this._repeatDetailFooter}set repeatDetailFooter(e){e!==this._repeatDetailFooter&&(this._repeatDetailFooter=e,this._changed(DataBand.PROP_DATA_BAND_REPEAT_DETAIL_FOOTER,e,!e))}get summaryRuntime(){return this._summaryRuntime}prepareIndices(e){this._doPrepareIndices(e);for(let t=0;t<this._detail.count;t++){const r=this._detail.get(t);r instanceof DataBand&&r.prepareIndices(e)}}getColPoints(e){const t=this.sectionGap,r=this.sectionCount,i=(e-t*(r-1))/r;let s=0;const A=[s];for(let e=0;e<r-1;e++)A.push(s+=i),A.push(s+=t);return A.push(s+=i),A}getColWidth(e){const t=this.sectionGap,r=this.sectionCount;return(e-t*(r-1))/r}getValues(e,t,r){if(r){const i=e.dp.get(this.data),s=[];for(let e=0;e<r.length;e++)s.push(i.getRowValue(t,r[e]));return s}}_selectRow(e,t,r){if(this._keyFlds){for(let r=0;r<Math.min(this._keyFlds.length,this._masterFlds.length);r++){if(e.getRowValue(t,this._keyFlds[r])!==this.masterValues[r])return!1}return!0}return r<this.detailRows}_getNextDetailRows(e,t){const r=[],i=e.dp.get(this.data);if(i){const e=i.rowCount;let s=t,A=0;for(;s<e&&this._selectRow(i,s,A);)r.push(s++),A++}return r}_skipDetailRows(e,t){if(this._keyFields){const r=e.dp.get(this.data);if(r){const e=r.rowCount;let i=t;for(;i<e&&this._selectRow(r,i,0);)i++;return i-t}}return 0}getRowsPerPage(){let e=this._rowsPerPage,t=!1;return e>0?t=!0:e=this._maxRowsPerPage>0?this._maxRowsPerPage:Number.MAX_SAFE_INTEGER,{rowsPerPage:e,breakRowsPerPage:t}}getEndRowCount(e=0){let t=this._endRowCount,r=!0;return t>0?(t+=e,r=!1):t=this._maxEndRowCount>0?this._maxEndRowCount+e:0,{endRowCount:t,stopEndRow:r}}getCount(e,t,r=null){if(isNaN(t)){if(r)return r.length;return this.$_getSummary(e,t).count}return t}getVCount(e,t,r=null){if(r)return t<r.length&&(r=r.slice(0,t)),r.length?this.$_getVCount(e,r):0;return this.$_getSummary(e,t).count}getSum(e,t,r=null){if(r)return t<r.length&&(r=r.slice(0,t)),r.length?this.$_getSum(e,r):0;return this.$_getSummary(e,t).sum}getMin(e,t,r=null){if(r)return t<r.length&&(r=r.slice(0,t)),r.length?this.$_getMin(e,r):NaN;return this.$_getSummary(e,t).min}getMax(e,t,r=null){if(r)return t<r.length&&(r=r.slice(0,t)),r.length?this.$_getMax(e,r):NaN;return this.$_getSummary(e,t).max}getAvg(e,t,r=null){if(r)return t<r.length&&(r=r.slice(0,t)),r.length?this.$_getSum(e,r)/r.length:NaN;return this.$_getSummary(e,t).avg}get designLevel(){return this.bandLevel}get dataDominant(){return!0}_getEditProps(){return super._getEditProps().concat(DataBand.PROPINFOS)}_getStyleProps(){return["fontFamily","fontSize","fontWeight","color","backgroundColor"].concat(super._getStyleProps())}canAddTo(e){return super.canAddTo(e)&&!e.isDataRowContainer}canResize(e){return!1}canPageBreak(){return!0}_doLoad(e,t){super._doLoad(e,t),t.hasOwnProperty("columnCount")&&(this.sectionCount=t.columnCount),t.hasOwnProperty("columnLayout")&&(this.sectionLayout=t.columnLayout),t.hasOwnProperty("columnCount")&&(this.sectionGap=t.columnGap),this._loadPropsOf(t,DataBand.PROPINFOS),t.hasOwnProperty("detail")&&this._detail.load(e,t.detail)}_doSave(e){super._doSave(e),this._savePropsOf(e,DataBand.PROPINFOS),this._detail.save(e.detail={})}_doPreparePrint(e){var t;if(super._doPreparePrint(e),this.detailRows=Number.MAX_SAFE_INTEGER,this._keyFlds=this.isDetail&&this._keyFields?this._keyFields.split(/\s*\,\s*/):null,this._keyFlds){for(let e=0;e<this._keyFlds.length;e++)this._keyFlds[e]=this._keyFlds[e].trim();if(this._masterFields){this._masterFlds=this._masterFields?this._masterFields.split(/\s*\,\s*/):null;for(let e=0;e<this._masterFlds.length;e++)this._masterFlds[e]=this._masterFlds[e].trim()}else this._masterFlds=this._keyFlds}this._dataObj=e.dp.get(this.data),this._designData=null===(t=e.designDp)||void 0===t?void 0:t.get(this.data),this._fieldSummary={},this._summaryRuntime.prepare(this._dataObj,this._master&&this._master._dataObj)}clearSummary(){this._fieldSummary={}}testPrepare(e){this._dataObj=e,this._fieldSummary={}}$_getSummary(e,t){let r=this._fieldSummary[e];return r||(this._fieldSummary[e]=r={},this.$_calcSummary(e,r,t)),r}$_calcSummary(e,t,r){const i=this._dataObj,s=isNaN(r)?i.rowCount:r;let A=0,n=0,o=s?Number.MAX_VALUE:NaN,a=s?Number.MIN_VALUE:NaN;for(let t=0;t<s;t++){const r=+i.getRowValue(t,e);isNaN(r)||(A++,n+=r,o=Math.min(o,r),a=Math.max(a,r))}t.count=s,t.vcount=A,t.sum=n,t.min=o,t.max=a,t.avg=s?n/s:NaN}$_getVCount(e,t){const r=this._dataObj;let i=0;for(let s of t){const t=+r.getRowValue(s,e);isNaN(t)||i++}return i}$_getSum(e,t){const r=this._dataObj;let i=0;for(let s of t){const t=+r.getRowValue(s,e);isNaN(t)||(i+=t)}return i}$_getMin(e,t){const r=this._dataObj;let i=Number.MAX_VALUE;for(let s of t){const t=+r.getRowValue(s,e);isNaN(t)||(i=Math.min(i,t))}return i}$_getMax(e,t){const r=this._dataObj;let i=Number.MIN_VALUE;for(let s of t){const t=+r.getRowValue(s,e);isNaN(t)||(i=Math.max(i,t))}return i}}DataBand.PROP_DATA_BAND_MASTER_FIELDS="masterFields",DataBand.PROP_DATA_BAND_KEY_FIELDS="keyFields",DataBand.PROP_DATA_BAND_ROWS_PER_MASTER="rowsPerMaster",DataBand.PROP_DATA_BAND_SECTION_COUNT="sectionCount",DataBand.PROP_DATA_BAND_SECTIONLAYOUT="sectionLayout",DataBand.PROP_DATA_BAND_SECTION_GAP="sectionGap",DataBand.PROP_DATA_BAND_MAX_ROW_COUNT="maxRowCount",DataBand.PROP_DATA_BAND_ROWS_PER_PAGE="rowsPerPage",DataBand.PROP_DATA_BAND_MAX_ROWS_PER_PAGE="maxRowsPerPage",DataBand.PROP_DATA_BAND_REPEAT_MASTER_ROW="repeatMasterRow",DataBand.PROP_DATA_BAND_REPEAT_DETAIL_HEADER="repeatDetailHeader",DataBand.PROP_DATA_BAND_REPEAT_DETAIL_FOOTER="repeatDetailFooter",DataBand.PROP_DATA_BAND_END_ROW_COUNT="endRowCount",DataBand.PROP_DATA_BAND_MAX_END_ROW_COUNT="maxEndRowCount",DataBand.PROP_DATA_BAND_END_ROW_MESSAGE="endRowMessage",DataBand.PROPINFOS=[{name:DataBand.PROP_DATA_BAND_MASTER_FIELDS,category:PropCategory.BAND,type:StringProperty,multiple:!1,default:void 0,visible:e=>e.isDetail},{name:DataBand.PROP_DATA_BAND_KEY_FIELDS,category:PropCategory.BAND,type:StringProperty,multiple:!1,default:void 0,visible:e=>e.isDetail},{name:DataBand.PROP_DATA_BAND_ROWS_PER_MASTER,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:void 0,visible:e=>e.isDetail},{name:DataBand.PROP_DATA_BAND_SECTION_COUNT,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:1},{name:DataBand.PROP_DATA_BAND_SECTIONLAYOUT,category:PropCategory.BAND,type:EnumProperty,multiple:!1,default:BandSectionLayout.DOWN_ACROSS,domain:BandSectionLayout},{name:DataBand.PROP_DATA_BAND_SECTION_GAP,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:10},{name:DataBand.PROP_DATA_BAND_MAX_ROW_COUNT,category:PropCategory.DATA,type:NumberProperty,multiple:!1,default:void 0},{name:DataBand.PROP_DATA_BAND_ROWS_PER_PAGE,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:void 0},{name:DataBand.PROP_DATA_BAND_MAX_ROWS_PER_PAGE,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:void 0},{name:DataBand.PROP_DATA_BAND_REPEAT_MASTER_ROW,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1,visible:e=>!e.isDetail},{name:DataBand.PROP_DATA_BAND_REPEAT_DETAIL_HEADER,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!0,visible:e=>e.isDetail},{name:DataBand.PROP_DATA_BAND_REPEAT_DETAIL_FOOTER,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1,visible:e=>e.isDetail},{name:DataBand.PROP_DATA_BAND_END_ROW_COUNT,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:void 0},{name:DataBand.PROP_DATA_BAND_MAX_END_ROW_COUNT,category:PropCategory.BAND,type:NumberProperty,multiple:!1,default:void 0},{name:DataBand.PROP_DATA_BAND_END_ROW_MESSAGE,category:PropCategory.BAND,type:StringProperty,multiple:!1,default:void 0}];class DataBandCollection extends ReportGroupItem{constructor(e,t){super(""),this._owner=e,this._label=t,this.width="100%",this.designHeight=24}get owner(){return this._owner}getSaveType(){return this._label}get outlineLabel(){return"["+Utils.capitalize(this._label)+"]"}get designLevel(){return this._owner.designLevel}get marqueeParent(){return this._owner}canAdd(e){return e instanceof DataBand&&super.canAdd(e)}canContainsBand(){return!0}_doItemAdded(e,t){super._doItemAdded(e,t),e instanceof DataBand&&(e._master=this._owner)}}DataBandCollection.PROPINFOS=[];class TableBandColumn extends TableColumnBase{constructor(e,t){super(e,t)}getCollectionLabel(){return"tableBandColumn"}get band(){return this.collection.band}get displayPath(){return this.collection?this.collection.band.displayPath+".columns["+this.index+"]":"column"}get collection(){return super.collection}get marqueeParent(){var e;return null===(e=this.collection)||void 0===e?void 0:e.band}isAncestor(e){return e===this.collection.band}canRemoveFrom(){return this.collection&&this.collection.count>1}_changed(e,t,r){this.collection&&this.collection.$_columnChanged(this)}}class TableBandColumnCollection extends TableColumnCollectionBase{constructor(e){super(e)}get band(){return this.owner}_createColumn(e){return new TableBandColumn(this,e)}}class TableBandCellItem extends TableCellItem{constructor(e){super(e)}}TableBandCellItem.$_ctor="TableBandCellItem";class TableBandSection extends TableBase{constructor(e){super(null),this._band=e,this.rowCount=TableBandSection.DEFAULT_ROWS,this.width="100%"}get band(){return this._band}_getStyleProps(){return TableBandSection.STYLE_PROPS}needDesignWidth(){return!1}needDesignHeight(){return!1}canResize(e){return e===ResizeDirection.TOP||e===ResizeDirection.BOTTOM}get marqueeParent(){return this._band}get colCount(){return this._band?this._band.colCount:0}getColumn(e){return this._band.columns.get(e)}getCellWidths(){var e;return null===(e=this._band)||void 0===e?void 0:e.getCellWidths()}_createCell(e){return new TableBandCellItem(e)}isAncestorOf(e){return!!super.isAncestorOf(e)||(e===this.rows||(!!this.rows.isAncestorOf(e)||void 0))}}TableBandSection.PROP_LINES="lines",TableBandSection.STYLE_PROPS=["fontFamily","fontSize","fontWeight","color","backgroundColor"],TableBandSection.DEFAULT_ROWS=1;class TableBandHeader extends TableBandSection{constructor(e,t=!1){super(e),this._repeat=!0,this._pageSection=t}get repeat(){return this._repeat}set repeat(e){e!=this._repeat&&(this._repeat=e,this._changed(TableBandHeader.PROP_TABLE_BAND_HEADER_REPEAT,e,!e))}get outlineLabel(){return this._pageSection?"[Page Header]":"[Band Header]"}get pathLabel(){return"header"}}TableBandHeader.PROP_TABLE_BAND_HEADER_REPEAT="repeat",TableBandHeader.$_ctor="TableBandHeader";class TableBandFooter extends TableBandSection{constructor(e,t=!1){super(e),this._attachToBody=!1,this._pageSection=t}get attachToBody(){return this._attachToBody}set attachToBody(e){e!==this._attachToBody&&(this._attachToBody=e,this._changed(TableBandFooter.PROP_ATTACH_TO_BODY,e,!e))}get outlineLabel(){return this._pageSection?"[Page Footer]":"[Band Footer]"}get pathLabel(){return"footer"}_getEditProps(){return super._getEditProps().concat(TableBandFooter.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TableBandFooter.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,TableBandFooter.PROPINFOS)}}TableBandFooter.PROP_ATTACH_TO_BODY="attachToBody",TableBandFooter.PROPINFOS=[{name:TableBandFooter.PROP_ATTACH_TO_BODY,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1}],TableBandFooter.$_ctor="TableBandFooter";class TableBandDataRow extends TableBandSection{constructor(){super(...arguments),this.masterRow=NaN}get blankItems(){return this._blankItems}canBlank(e,t){if(this.band.dataObj.equalRows(t,t-1,e.$_blankFlds))return!0}getMergedColumns(){const e=[];return this.items.forEach((t=>{const r=t.item;if(r.mergedInGroup){const t=r.col;e.indexOf(t)<0&&e.push(t)}})),e.length?e:null}get outlineLabel(){return"[Data Row]"}get pathLabel(){return"dataRow"}get dataDominant(){return!0}get isDataRowContainer(){return!0}_getChildPropInfos(e){return TableBandDataRow.CHILD_PROPS.concat(super._getChildPropInfos(e))}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildPropsOf(e,t,TableBandDataRow.CHILD_PROPS)}_doPreparePrint(e){super._doPreparePrint(e),this._blankItems=this.$_collectBlankItems()}$_collectBlankItems(){return this.collectBlankItems(this.items.map((e=>e.item)))}}TableBandDataRow.PROP_EQUAL_BLANK="equalBlank",TableBandDataRow.PROP_BLANK_FIELDS="blankFields",TableBandDataRow.PROP_MERGED_IN_GROUP="mergedInGroup",TableBandDataRow.CHILD_PROPS=[{name:TableBandDataRow.PROP_EQUAL_BLANK,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1},{name:TableBandDataRow.PROP_BLANK_FIELDS,category:PropCategory.BAND,type:StringProperty,multiple:!1,default:void 0},{name:TableBandDataRow.PROP_MERGED_IN_GROUP,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1}],TableBandDataRow.$_ctor="TableBandRow";class TableBandRowGroupSection extends TableBase{constructor(e,t){super(t),this._group=e,this.rowCount=TableBandRowGroupSection.DEFAULT_ROWS,this.width="100%"}get group(){return this._group}get band(){var e;return null===(e=this._group)||void 0===e?void 0:e.band}_getStyleProps(){return TableBandSection.STYLE_PROPS}needDesignHeight(){return!1}needDesignWidth(){return!1}canResize(e){return e===ResizeDirection.TOP||e===ResizeDirection.BOTTOM}get marqueeParent(){return this.band}get colCount(){return this.band?this.band.colCount:0}getColumn(e){return this.band.columns.get(e)}getCellWidths(){var e;return null===(e=this.band)||void 0===e?void 0:e.getCellWidths()}_createCell(e){return new TableBandCellItem(e)}isAncestorOf(e){return!!super.isAncestorOf(e)||(e===this.rows||(!!this.rows.isAncestorOf(e)||void 0))}}TableBandRowGroupSection.STYLE_PROPS=["fontFamily","fontSize","fontWeight","color","backgroundColor"],TableBandRowGroupSection.DEFAULT_ROWS=1;class TableBandRowGroupHeader extends TableBandRowGroupSection{constructor(e){super(e,"groupHeader")}get outlineLabel(){return"[Group Header]"}get pathLabel(){return"header"}}TableBandRowGroupHeader.$_ctor="TableBandRowGroupHeader";class TableBandRowGroupFooter extends TableBandRowGroupSection{constructor(e){super(e,"groupFooter"),this._merged=!0}get merged(){return this._merged}set merged(e){e!=this._merged&&(this._merged=e,this._changed(TableBandRowGroupFooter.PROP_MERGED,e,!e))}get outlineLabel(){return"[Group Footer]"}get pathLabel(){return"footer"}getEditProps(){return super.getEditProps().concat(TableBandRowGroupFooter.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TableBandRowGroupFooter.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,TableBandRowGroupFooter.PROPINFOS)}}TableBandRowGroupFooter.PROP_MERGED="merged",TableBandRowGroupFooter.PROPINFOS=[],TableBandRowGroupFooter.$_ctor="TableBandRowGroupFooter";class TableBandRowGroup extends DataBandRowGroup{constructor(e){super("tableBandRowGroup"),this._merged=!0,this.add(this._header=new TableBandRowGroupHeader(this)),this.add(this._footer=new TableBandRowGroupFooter(this)),this._collection=e}get outlineParent(){return this._collection}get marqueeParent(){return this.band}getEditProps(){return super.getEditProps().concat(TableBandRowGroup.PROPINFOS)}getCollectionLabel(){return"tableBandGroup"}get header(){return this._header}get footer(){return this._footer}get band(){var e;return null===(e=this._collection)||void 0===e?void 0:e.band}get page(){var e;return null===(e=this.band)||void 0===e?void 0:e.page}get report(){var e;return null===(e=this.band)||void 0===e?void 0:e.report}get collection(){return this._collection}get dataParent(){return this.band}get outlineLabel(){return"[Group]"}get displayPath(){return this.collection?this.collection.band.displayPath+".groups["+this.index+"]":"group"}_ignoreItems(){return!0}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TableBandRowGroup.PROPINFOS),t.hasOwnProperty("header")&&this._header.load(e,t.header),t.hasOwnProperty("footer")&&this._footer.load(e,t.footer)}_doSave(e){super._doSave(e),this._savePropsOf(e,TableBandRowGroup.PROPINFOS),this._header.save(e.header={}),this._footer.save(e.footer={})}_changed(e,t,r){super._changed(e,t,r),this._collection&&this._collection.$_groupChanged(this)}}TableBandRowGroup.PROPINFOS=[];class TableBandRowGroupCollection extends ReportItemCollection{constructor(e){super(),this._groups=[],this._band=e}get outlineParent(){return this._band}get outlineLabel(){return"[Groups]"}get outlineExpandable(){return!0}get outlineItems(){return this._groups}getSaveType(){return"groups"}get band(){return this._band}get count(){return this._groups.length}get items(){return this._groups.slice()}get visibleCount(){let e=0;for(let t of this._groups)t.visible&&e++;return e}get groups(){return this._groups.slice()}load(e,t){if(this._groups=[],t&&t.length>0){for(let r of t)if(r){const t=new TableBandRowGroup(this);t.load(e,r),this._groups.push(t)}this.$_invalidateGroups()}}save(e){for(let t of this._groups){const r={};t.save(r),e.push(r)}}get(e){return this._groups[e]}indexOf(e){return this._groups.indexOf(e)}add(e,t=-1){const r=this.$_add(e,t);if(r)return this.$_invalidateGroups(),this._itemAdded(r),r}addAll(e,t=-1){if(!e||e.length<1)return;const r=this._groups.length;t=t<0?this._groups.length:Math.max(0,this._groups.length);for(let r of e)this.$_add(r,t)&&t++;return this._groups.length!=r?(this.$_invalidateGroups(),!0):void 0}removeAt(e){if(e>=0&&e<this._groups.length){const t=this._groups.splice(e,1)[0];return this.$_invalidateGroups(),this._itemRemoved(t,this._band),!0}}remove(e){return this.removeAt(this.indexOf(e))}clear(){if(this._groups.length>0)return this._groups=[],this.$_invalidateGroups(),!0}getValidGroups(e){if(e){const t=[];for(let r of this._groups){const i=r.field;Utils.isNumber(i)?i>=0&&i<e.fieldCount&&t.push(r):e.containsField(i)&&t.push(r)}return t.length?t:null}return null}get page(){var e;return null===(e=this._band)||void 0===e?void 0:e.page}get displayPath(){return this._band?this._band.displayPath+".groups":"groups"}get level(){return this._band?this._band.level+1:0}isAncestorOf(e){if(super.isAncestorOf(e))return!0;if(this._groups.indexOf(e)>=0)return!0;for(let t of this._groups)if(t.indexOf(e))return!0}$_add(e,t=-1){if(!(e instanceof TableBandRowGroup)){const t=e;e=new TableBandRowGroup(this),t&&e.extend(t),e.header.cells.prepareCells(),e.footer.cells.prepareCells()}if(e instanceof TableBandRowGroup&&this._groups.indexOf(e)<0)return t<0?this._groups.push(e):this._groups.splice(Math.min(t,this._groups.length),0,e),e}$_invalidateGroups(){for(let e=this._groups.length-1;e>=0;e--)this._groups[e]._index=e;this._band&&this._band.$_groupChanged(null)}$_groupChanged(e){this._band&&this._band.$_groupChanged(e)}}class TableBand extends DataBand{constructor(e){super(e),this._columns=new TableBandColumnCollection(this),this._groups=new TableBandRowGroupCollection(this),this.add(this._header=new TableBandHeader(this)),this.add(this._footer=new TableBandFooter(this)),this.add(this._dataRow=new TableBandDataRow(this)),this._tables=[this._header,this._footer,this._dataRow],this._setOutlineOrders(1,this._dataRow,this._footer,this.detail),this.width="100%"}get outlineItems(){return[this._columns,this._groups].concat(super.outlineItems)}get colCount(){return this._colCount||0}set colCount(e){if((e=Math.max(1,e))!==this._colCount){const t=this._colCount,r=t-e;this._colCount=e,this._columns.count=e,e<t?this._tables.forEach((t=>{t._removeCols(e,r)})):this._tables.forEach((e=>{e._resetCells()})),this._changed(TableBand.PROP_COL_COUNT,e,t)}}get columns(){return this._columns}get groups(){return this._groups}get header(){return this._header}get footer(){return this._footer}get dataRow(){return this._dataRow}get pr(){return this._pr}get tr(){return this._tr}get lastTrs(){return this._lastTrs}getColumn(e){return this._columns.get(e)}getGroup(e){return this._groups.get(e)}getTables(){const e=this._groups,t=[this._header,this._dataRow,this._footer];for(let r=0;r<e.count;r++){const i=e.get(r);t.push(i.header,i.footer)}return t}removeColumn(e){const t="number"==typeof e?e:this._columns.indexOf(e);t>=0&&t<this._colCount&&(this._columns.remove(t),this._colCount--,this.getTables().forEach((e=>{e._removeColumn(t)})),this._changed(TableBand.PROP_COL_COUNT,this._colCount,this._colCount+1))}addColumn(e,t){if(e>=0&&e<=this._colCount){const r=this._columns.add(t,e);return this._colCount++,this.getTables().forEach((t=>{t._addColumn(e)})),this._changed(TableBand.PROP_COL_COUNT,this._colCount,this._colCount-1),r}}canMoveColumns(e,t,r,i=!1){return!this.getTables().some((s=>!s.canMoveCols(e,t,r,i)))}getNearestMovableColumn(e,t,r){let i=e+r;return this.getTables().forEach((s=>{const A=s.getNearestMovableColumn(e,t,r);i=r>0?Math.max(i,A):Math.min(i,A)})),i}moveColumns(e,t,r,i=!1){if(i||this.canMoveColumns(e,t,r))return this._columns.move(e,t,r),this.getTables().forEach((i=>{i._moveCols(e,t,r)})),this.layoutChanged=!0,this._changed(TableBase.PROP_CELL_LAYOUT,void 0,void 0),!0}getCellWidths(){return this._columns.getWidths()}setPrinting(e,t,r=0){e.row=this._pr=t,this._tr+=r,this._lastTrs=r}getSaveType(){return"tableband"}get outlineLabel(){return"[Table Band]"}get isBand(){return!0}_ignoreItems(){return!0}_valueable(){return!0}_getEditProps(){return super._getEditProps().concat(TableBand.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.colCount=TableBand.DEFAULT_COL_COUNT}isAncestorOf(e){return!!super.isAncestorOf(e)||(e===this._groups||(!!this._groups.isAncestorOf(e)||void 0))}_doLoad(e,t){super._doLoad(e,t),t&&(this._loadProps(t,"colCount"),t.hasOwnProperty("fields")&&(this._colCount=this._columns.load(t.fields,this._colCount)),t.hasOwnProperty("columns")&&(this._colCount=this._columns.load(t.columns,this._colCount)),t.hasOwnProperty("groups")&&this._groups.load(e,t.groups),t.hasOwnProperty("header")&&this._header.load(e,t.header),t.hasOwnProperty("footer")&&this._footer.load(e,t.footer),t.hasOwnProperty("row")&&this._dataRow.load(e,t.row),t.hasOwnProperty("dataRow")&&this._dataRow.load(e,t.dataRow))}_doSave(e){super._doSave(e),this._saveProps(e,"colCount"),this._columns.count&&this._columns.save(e.columns=[]),this._groups.count&&this._groups.save(e.groups=[]),this._header.save(e.header={}),this._footer.save(e.footer={}),this._dataRow.save(e.dataRow={})}$_columnChanged(e){this._changed(TableBand.PROP_COLUMNS,this._columns,this._columns)}$_groupChanged(e){this._changed(TableBand.PROP_GROUPS,this._groups,this._groups)}_doPreparePrint(e){super._doPreparePrint(e),this._groups.preparePrint(e)}_doPrepareIndices(e){e.row=e.index=this._pr=this._tr=0,this._lastTrs=0}remove(e){}getNextDetailRows(e){return this._getNextDetailRows(e,this._pr)}skipDetailRows(e){const t=this._skipDetailRows(e,this._pr);this._pr+=t}}TableBand.PROP_COL_COUNT="colCount",TableBand.PROP_COLUMNS="columns",TableBand.PROP_GROUPS="groups",TableBand.PROPINFOS=[{name:TableBand.PROP_COL_COUNT,category:PropCategory.TABLE,type:NumberProperty,multiple:!1,default:0}],TableBand.DEFAULT_COL_COUNT=5,TableBand.$_ctor="TableBand",TableBand.ITEM_TYPE="Table Band";class ChangeTableBandColCountCommand extends EditCommand{constructor(e,t){if(super("Change tableband cols"),assert(!!e),this._band=e,this._oldCols=e.colCount,this._cols=t,t<this._oldCols){const r=this._deleted=[[],[],[]];e.getTables().forEach((e=>{let i=[];for(let r=t;r<this._oldCols;r++)i=i.concat(e.getColItems(r));r.push(i)}));const i=this._cells=[];e.getTables().forEach((e=>{i.push(e.cells.truncateCol(t))}))}}_doDispose(){this._band=null}get band(){return this._band}get cols(){return this._cols}redo(e){this._band.colCount=this._cols}undo(){const e=this._band,t=this._deleted,r=this._cells;e.colCount=this._oldCols,t&&(e.getTables().forEach(((e,r)=>{t[r].forEach((t=>{e.add(t)}))})),e.getTables().forEach(((e,t)=>{e.cells.restoreCells(r[t])})))}get source(){return this._band}}class AddTableBandColumnCommand extends EditCommand{constructor(e,t,r){super("Add Band Field"),assert(!!e),this._band=e,this._index=t,this._config=r}_doDispose(){this._band=this._column=null}get band(){return this._band}get index(){return this._index}redo(e){const t=this._band,r=this._index,i=this._cells=[];t.getTables().forEach((e=>{i.push(e.cells.addCol(r))})),this._column=t.addColumn(r,this._config)}undo(){const e=this._band,t=this._index;e.getTables().forEach((e=>{e.cells.removeCol(t)})),e.removeColumn(this._column),e.getTables().forEach(((e,t)=>{e.cells.restoreCells(this._cells[t])}))}get source(){return this._column}}class RemoveTableBandColumnCommand extends EditCommand{constructor(e){super("Remove TableBandColumn"),this._deleted=[],assert(!!e);const t=this._band=e.band;assert(!!t),this._column=e;const r=this._index=t.columns.indexOf(e);t.getTables().forEach((e=>{this._deleted.push(e.getColItems(r))}))}_doDispose(){this._band=this._column=null}get band(){return this._band}get column(){return this._column}get index(){return this._index}redo(e){this._cells=[],this._band.getTables().forEach((e=>{this._cells.push(e.cells.removeCol(this._index))})),this._band.removeColumn(this._column)}undo(){const e=this._band,t=this._index;e.getTables().forEach(((e,r)=>{e.cells.addCol(t)})),e.addColumn(t,this._column),e.getTables().forEach(((e,t)=>{this._deleted[t].forEach((t=>{e.add(t)})),e.cells.restoreCells(this._cells[t])}))}get source(){return this._column}}class MoveTableBandColumnsCommand extends EditCommand{constructor(e,t,r,i,s){super("Move TableBand Columns"),this._band=e,assert(!!e),this._column=e.getColumn(this._index=t),this._count=r,this._newIndex=i,this._force=s}_doDispose(){this._band=this._column=null}get band(){return this._band}redo(e){this._cells=[],this._band.getTables().forEach((e=>{if(this._cells.push(e.cells.moveCols(this._index,this._count,this._newIndex)),!this._cells)throw new Error("TableCellCollection.moveCols failed: "+this._index+", "+this._count+", "+this._newIndex)})),this._band.moveColumns(this._index,this._count,this._newIndex,this._force)}undo(){this._band.getTables().forEach(((e,t)=>{e.cells.restoreCells(this._cells[t])})),this._band.moveColumns(this._newIndex,this._count,this._index,!0)}get source(){return this._column}}class TableColumn extends TableColumnBase{constructor(e,t){super(e,t)}get table(){return this.collection.table}get displayPath(){return this.collection?this.collection.table.displayPath+".columns["+this.index+"]":"column"}get collection(){return super.collection}get marqueeParent(){var e;return null===(e=this.collection)||void 0===e?void 0:e.table}isAncestor(e){return e===this.collection.table}canRemoveFrom(){return this.collection&&this.collection.count>1}_changed(e,t,r){this.collection&&this.collection.$_columnChanged(this)}}class TableColumnCollection extends TableColumnCollectionBase{constructor(e){super(e)}get table(){return this.owner}_createColumn(e){return new TableColumn(this,e)}}class TableContainerCellItem extends TableCellItem{constructor(e){super(e)}get pathLabel(){return"cell["+this.row+","+this.col+"]"}}TableContainerCellItem.$_ctor="TableCellItem";class TableContainer extends TableBase{constructor(e){super(e),this._columns=new TableColumnCollection(this)}changeColumnWidth(e,t){}getColumnWidth(e){return this._columns.get(e).width}get outlineItems(){return[this._columns].concat(super.outlineItems)}get baseTable(){return this._baseTable}set baseTable(e){if(e!=this._baseTable){const t=this._baseTable;this._baseTable=e,this._changed(TableContainer.PROP_BASE_TABLE,e,t)}}get colCount(){return this._colCount||0}set colCount(e){if((e=Math.max(1,e))!==this._colCount){const t=this._colCount;this._colCount=e,this._columns.count=e,e<t?this._removeCols(e,t-e):this._resetCells(),this._changed(TableContainer.PROP_COL_COUNT,e,t)}}get columns(){return this._columns}getColumn(e){return this._columns.get(e)}removeColumn(e){const t="number"==typeof e?e:this._columns.indexOf(e);t>=0&&t<this._colCount&&(this._columns.remove(t),this._colCount--,this._removeColumn(t),this._changed(TableContainer.PROP_COL_COUNT,this._colCount,this._colCount+1))}addColumn(e,t){if(e>=0&&e<=this._colCount){const r=this._columns.add(t,e);return this._colCount++,this._addColumn(e),this._changed(TableContainer.PROP_COL_COUNT,this._colCount,this._colCount-1),r}}canMoveColumns(e,t,r,i=!1){return this.canMoveCols(e,t,r,i)}moveColumns(e,t,r,i=!1){if(i||this.canMoveCols(e,t,r))return this._columns.move(e,t,r),this._moveCols(e,t,r),this.layoutChanged=!0,this._changed(TableBase.PROP_CELL_LAYOUT,void 0,void 0),!0}getSaveType(){return"table"}get outlineLabel(){return"[Table] ("+this.rowCount+" x "+this.colCount+")"}get pathLabel(){return"table"}needDesignWidth(){return!1}needDesignHeight(){return!1}_datable(){return!0}_getEditProps(){return super._getEditProps().concat(TableContainer.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i);const s=this.colCount=TableContainer.DEFAULT_COL_COUNT;this.rowCount=TableContainer.DEFAULT_ROW_COUNT,this.width="100%",this._columns.forEach(((e,t)=>{const r=Math.floor(100/s);e.width=r+"%"}))}_doLoad(e,t){t&&(this._loadProps(t,"data","colCount","baseTable"),t.hasOwnProperty("columns")&&(this._colCount=this._columns.load(t.columns,this._colCount)),super._doLoad(e,t))}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildProps(e,[],t)}_doSave(e){super._doSave(e),this._saveProps(e,"data","colCount","baseTable"),this._columns.count&&this._columns.save(e.columns=[])}_createCell(e){return new TableContainerCellItem(e)}getCellWidths(){return this._baseContainer&&this._baseContainer.getCellWidths()||this._columns.getWidths()}prepareLayout(){return this._baseContainer=this._baseTable&&this.page.getItem(this._baseTable),super.prepareLayout()}$_columnChanged(e){this._changed(TableContainer.PROP_COLUMNS,this._columns,this._columns)}}TableContainer.PROP_BASE_TABLE="baseTable",TableContainer.PROP_COL_COUNT="colCount",TableContainer.PROP_COLUMNS="columns",TableContainer.PROPINFOS=[{name:TableContainer.PROP_BASE_TABLE,category:PropCategory.TABLE,type:StringProperty,multiple:!1,default:void 0},{name:TableContainer.PROP_COL_COUNT,category:PropCategory.TABLE,type:NumberProperty,multiple:!1,default:0}],TableContainer.DEFAULT_ROW_COUNT=4,TableContainer.DEFAULT_COL_COUNT=4,TableContainer.$_ctor="TableContainer",TableContainer.ITEM_TYPE="Table";class ChangeTableColCountCommand extends EditCommand{constructor(e,t){if(super("Change table cols"),assert(!!e),this._table=e,this._oldCols=e.colCount,this._cols=t,t<this._oldCols){this._deleted=[],this._indices=[];for(let r=0;r<e.rowCount;r++)for(let i=t;i<this._oldCols;i++){const t=e.getCellItemAt(r,i);t&&(this._deleted.push(t.item),this._indices.push(t.index))}this._deleted=this._deleted.sort(((e,t)=>e.parent.index-t.parent.index)),this._indices=this._indices.sort(((e,t)=>e-t)),this._cells=e.cells.truncateCol(t)}}_doDispose(){this._table=null}get table(){return this._table}get cols(){return this._cols}redo(e){this._table.colCount=this._cols}undo(){const e=this._table;e.colCount=this._oldCols,this._deleted&&(this._deleted.forEach(((t,r)=>{e.add(t,this._indices[r])})),e.cells.restoreCells(this._cells))}get source(){return this._table}}class RemoveTableColumnCommand extends EditCommand{constructor(e){super("Remove TableColumn"),this._deleted=[],assert(!!e);const t=this._table=e.table;assert(!!t),this._column=e;const r=this._index=t.columns.indexOf(e);this._deleted=t.getColItems(r)}_doDispose(){this._table=this._column=null}get table(){return this._table}get column(){return this._column}get index(){return this._index}redo(e){this._cells=this._table.cells.removeCol(this._index),this._table.removeColumn(this._column)}undo(){const e=this._table;e.cells.addCol(this._index),e.addColumn(this._index,this._column),this._deleted.forEach((t=>{e.append(t,!0)})),e.cells.restoreCells(this._cells)}get source(){return this._column}}class AddTableColumnCommand extends EditCommand{constructor(e,t){super("Add Table Column"),this._table=e,assert(!!e),this._index=t}_doDispose(){this._table=this._column=null}get table(){return this._table}get index(){return this._index}redo(e){this._cells=this._table.cells.addCol(this._index),this._column=this._table.addColumn(this._index,null)}undo(){this._table.cells.removeCol(this._index),this._table.removeColumn(this._index),this._table.cells.restoreCells(this._cells)}get source(){return this._column}}class MoveTableColumnsCommand extends EditCommand{constructor(e,t,r,i,s){super("Move Table Columns"),this._table=e,assert(!!e),this._column=e.getColumn(this._index=t),this._count=r,this._newIndex=i,this._force=s}_doDispose(){this._table=this._column=null}get table(){return this._table}redo(e){if(this._cells=this._table.cells.moveCols(this._index,this._count,this._newIndex),!this._cells)throw new Error("TableCellCollection.moveRows failed: "+this._index+", "+this._count+", "+this._newIndex);this._table.moveColumns(this._index,this._count,this._newIndex,this._force)}undo(){this._table.cells.restoreCells(this._cells),this._table.moveColumns(this._newIndex,this._count,this._index,!0)}get source(){return this._column}}class ChangeTableRowCountCommand extends EditCommand{constructor(e,t){super("Change table rows"),assert(!!e);const r=this._oldCount=e.rowCount,i=e.colCount;if(this._table=e,this._rows=t,t<r){this._deleted=[],this._indices=[];for(let s=t;s<r;s++)for(let t=0;t<i;t++){const r=e.getCellItemAt(s,t);r&&(this._deleted.push(r.item),this._indices.push(r.index))}this._deleted=this._deleted.sort(((e,t)=>e.parent.index-t.parent.index)),this._indices=this._indices.sort(((e,t)=>e-t)),this._cells=e.cells.truncateRow(t)}}_doDispose(){this._table=null}get table(){return this._table}get cols(){return this._rows}redo(e){this._table.rowCount=this._rows}undo(){const e=this._table;e.rowCount=this._oldCount,this._deleted&&(this._deleted.forEach(((t,r)=>{e.add(t,this._indices[r])})),e.cells.restoreCells(this._cells))}get source(){return this._table}}class RemoveTableRowCommand extends EditCommand{constructor(e){super("Remove TableRow"),assert(!!e);const t=this._table=e.table;assert(!!t),this._row=e;const r=this._index=t.rows.indexOf(e);this._deleted=t.getRowItems(r)}_doDispose(){this._table=this._row=this._cells=null}get table(){return this._table}get row(){return this._row}get index(){return this._index}redo(e){this._cells=this._table.cells.removeRow(this._index),this._table.removeRow(this._row)}undo(){const e=this._table;e.cells.addRow(this._index),e.addRow(this._index,this._row),this._deleted.forEach((t=>{e.append(t,!0)})),e.cells.restoreCells(this._cells)}get source(){return this._row}}class AddTableRowCommand extends EditCommand{constructor(e,t){super("Add TableRow"),this._table=e,assert(!!e),this._index=t}_doDispose(){this._table=this._row=null}get table(){return this._table}get index(){return this._index}redo(e){this._cells=this._table.cells.addRow(this._index),this._row=this._table.addRow(this._index,null)}undo(){this._table.cells.removeRow(this._index),this._table.removeRow(this._index),this._table.cells.restoreCells(this._cells)}get source(){return this._row}}class MoveTableRowsCommand extends EditCommand{constructor(e,t,r,i,s){super("Move Table Rows"),this._table=e,assert(!!this._table),this._row=e.rows.get(this._index=t),this._count=r,this._newIndex=i,this._force=s}_doDispose(){this._table=this._row=null}get table(){return this._table}redo(e){if(this._cells=this._table.cells.moveRows(this._index,this._count,this._newIndex),!this._cells)throw new Error("TableCellCollection.moveRows failed: "+this._index+", "+this._count+", "+this._newIndex);this._table.moveRows(this._index,this._count,this._newIndex,this._force)}undo(){this._table.cells.restoreCells(this._cells),this._table.moveRows(this._newIndex,this._count,this._index,!0)}get source(){return this._row}}class MergeTableSelectionCommand extends EditCommand{constructor(e){super("Merge Table Selection"),this._table=e.table,assert(!!this._table),this._sel=e;const t=this._bounds=e.table.cells.mergeBoundsOf(e);this._deleted=this._table.getRectItems(t.r1,t.c1,t.r2,t.c2,!0)}_doDispose(){this._table=this._bounds=null}get table(){return this._table}get bounds(){return this._bounds}redo(e){const t=this._bounds;this._cells=this._table.cells.merge(t.r1,t.c1,t.r2,t.c2),this._table.mergeCells(t.r1,t.c1,t.r2,t.c2)}undo(){const e=this._table;this._deleted.forEach((t=>{e.append(t,!0)})),e.cells.restoreCells(this._cells)}get source(){return this._sel.selectItem}}class UnmergeTableCellsCommand extends EditCommand{constructor(e){super("Unmerge Table Cell"),this._table=e.table,assert(!!this._table),this._cell=e}_doDispose(){this._table=this._cell=null}get table(){return this._table}redo(e){this._cells=this._table.cells.unmerge(this._cell)}undo(){this._table.cells.restoreCells(this._cells)}get source(){return this._cell}}class AdjustColumnWidthsCommand extends EditCommand{constructor(e,t,r,i){super("Adjust Table Column Widths"),this._table=e,assert(!!this._table),this._column=e.getColumn(t),assert(!!this._column),this._sibling=e.getColumn(t+1),assert(!!this._sibling),this._colPoints=r.slice(0),this._newSize=i,this._oldWidth=this._column.width,this._oldSiblingWidth=this._sibling.width}_doDispose(){this._table=this._column=this._sibling=null}redo(e){if(Utils.isNotDefined(this._newWidth)){const e=this._table.columns.adjustWidths(this._column.index,this._colPoints,this._newSize);this._newWidth=e[0],this._newSiblingWidth=e[1]}this._column.width=this._newWidth,this._sibling.width=this._newSiblingWidth}undo(){this._column.width=this._oldWidth,this._sibling.width=this._oldSiblingWidth}get source(){return this._column}}class AdjustRowHeightsCommand extends EditCommand{constructor(e,t,r,i){super("Adjust Table Row Heights"),this._table=e,assert(!!this._table),this._row=e.getRow(t),assert(!!this._row),this._sibling=e.getRow(t+1),assert(!!this._sibling),this._rowPoints=r.slice(0),this._newSize=i,this._oldHeight=this._row.height,this._oldSiblingHeight=this._sibling.height}_doDispose(){this._table=this._row=this._sibling=null}redo(e){if(Utils.isNotDefined(this._newHeight)){const e=this._table.rows.adjustHeights(this._row.index,this._rowPoints,this._newSize);this._newHeight=e[0],this._newSiblingHeight=e[1]}this._row.height=this._newHeight,this._sibling.height=this._newSiblingHeight}undo(){this._row.height=this._oldHeight,this._sibling.height=this._oldSiblingHeight}get source(){return this._row}}class ChartObject extends ReportItem{constructor(e,t){super(t),this._chart=e,this.visible=this._isDefaultVisible()}get chart(){return this._chart}canHide(){return!0}get page(){return this._chart.page}get report(){return this._chart.report}get dataParent(){return this._chart}get marqueeParent(){return this._chart}getSaveType(){return""}_getEditProps(){return ChartObject.PROPINFOS}_doLoad(e,t){t.hasOwnProperty("visible")&&(this.visible=t.visible)}_doSave(e){this.visible!==this._isDefaultVisible()&&(e.visible=this.visible)}_isDefaultVisible(){return!0}_getPropsWrapper(e,t,r){const i=this.getEditProps();return i&&i.forEach((i=>{if(!t||t.indexOf(i.name)<0){const t=this[i.name],s=r&&r[i.name]||i.name;t instanceof ChartObject||void 0!==t&&(e[s]=t)}})),e}}ChartObject.PROPINFOS=[{name:ReportItem.PROP_VISIBLE,category:PropCategory.BASIC,type:BooleanProperty,multiple:!1,default:void 0,visible:e=>e.canHide()}];class ChartTextObject extends ChartObject{constructor(e){super(e),this._text="Title"}get text(){return this._text}set text(e){if(e!==this._text){const t=this._text;this._text=e,this._changed(ChartTextObject.PROP_TEXT,e,t)}}_getEditProps(){return super._getEditProps().concat(ChartTextObject.PROPINFOS)}_getStyleProps(){return["color","fontSize","fontWeight"]}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ChartTextObject.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ChartTextObject.PROPINFOS)}}ChartTextObject.PROP_TEXT="text",ChartTextObject.PROPINFOS=[{name:ChartTextObject.PROP_TEXT,category:"",type:StringProperty,multiple:!1,default:void 0}];class ChartSeries extends ChartObject{constructor(e){super(e),this._designVisible=!0,this._values=[3,4,7,2,4]}getPropDomain(e){if(this.report){if(e.name===ChartSeries.PROP_DATA)return[void 0].concat(this.chart.report.designData.getNames());if(e.name===ChartSeries.PROP_VALUE_FIELD)return this.getDataFieldNames()}}get designVisible(){return this._designVisible}set designVisible(e){e!=this._designVisible&&(this._designVisible=e,this._changed("designVisible",e,!e))}get valueField(){return this._valueField}set valueField(e){if(e!==this._valueField){const t=this._valueField;this._valueField=e,this._changed(ChartSeries.PROP_VALUE_FIELD,e,t)}}get values(){return this._values}set values(e){if(e!==this._values){const t=this._values;this._values=null==e?void 0:e.slice(),this._changed(ChartSeries.PROP_VALUES,e,t)}}getValues(e,t){if(e&&this._valueField){const e=this.data||this._getParentData();if(e)return t.getFieldValues(e,this._valueField)}return this._values}getSaveType(){return this.seriesType}get displayPath(){return this.chart.displayPath+".series["+this.index+"]"}get outlineLabel(){return"["+this.index+"] "+Utils.capitalize(this.seriesType)}_getEditProps(){return super._getEditProps().concat(ChartSeries.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ChartSeries.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ChartSeries.PROPINFOS)}}ChartSeries.PROP_VALUE_FIELD="valueField",ChartSeries.PROP_VALUES="values",ChartSeries.PROPINFOS=[{name:ReportItem.PROP_NAME,category:PropCategory.BASIC,type:StringProperty,multiple:!1,default:void 0},{name:ReportItem.PROP_DATA,category:PropCategory.DATA,type:ListableProperty,multiple:!1,default:void 0},{name:ChartSeries.PROP_VALUE_FIELD,category:PropCategory.SERIES,type:ListableProperty,multiple:!1,default:void 0},{name:ChartSeries.PROP_VALUES,category:PropCategory.SERIES,type:NumberArrayProperty,multiple:!1,default:void 0}];class ChartSeriesCollection extends ReportItemCollection{constructor(e){super(),this._series=[],this._chart=e}get outlineParent(){return this._chart}get outlineLabel(){return"[Series]"}get outlineExpandable(){return!0}get outlineItems(){return this._series}get chart(){return this._chart}get count(){return this._series.length}get items(){return this._series.slice()}get visibleCount(){let e=0;for(let t of this._series)t.visible&&e++;return e}load(e,t){if(this._series=[],t&&t.length>0){for(let r of t)if(r){const t=this._createSeries(e,r);t.load(e,r),this._series.push(t)}this.$_invalidateSeries()}}save(e){for(let t of this._series){const r={};t.save(r),e.push(r)}}get(e){return this._series[e]}indexOf(e){return this._series.indexOf(e)}add(e,t,r=-1){const i=this.$_add(e,t,r);if(i)return this.$_invalidateSeries(),this._itemAdded(i),i}addAll(e,t,r=-1){if(!t||t.length<1)return;const i=this._series.length;r=r<0?this._series.length:Math.max(0,this._series.length);for(let i of t)this.$_add(e,i,r)&&r++;return this._series.length!=i?(this.$_invalidateSeries(),!0):void 0}removeAt(e){if(e>=0&&e<this._series.length){const t=this._series.splice(e,1)[0];return this.$_invalidateSeries(),this._itemRemoved(t,this._chart),!0}}remove(e){return this.removeAt(this.indexOf(e))}clear(){if(this._series.length>0)return this._series=[],this.$_invalidateSeries(),!0}select(e){for(let t of this._series)t.designVisible=!e||e===t}getSaveType(){return"series"}get page(){var e;return null===(e=this._chart)||void 0===e?void 0:e.page}get displayPath(){return this._chart?this._chart.displayPath+".series":"series"}get level(){return this._chart?this._chart.level+1:0}isAncestorOf(e){return!!super.isAncestorOf(e)||(this._series.indexOf(e)>=0||void 0)}$_add(e,t,r=-1){if(!(t instanceof ChartSeries)){const r=t;t=this._createSeries(e,r),r&&t.load(e,r)}if(t instanceof ChartSeries&&this._series.indexOf(t)<0)return r<0?this._series.push(t):this._series.splice(Math.min(r,this._series.length),0,t),t}$_invalidateSeries(){for(let e=this._series.length-1;e>=0;e--)this._series[e]._index=e;this._seriesChanged(null)}$_seriesChanged(e){this._seriesChanged(null)}}var HichartMarkerSymbol,HichartLegendLayout,BarcodeFormat,QrcodeErrorCorrectionLevel;!function(e){e.CIRCLE="circle",e.SQUARE="square",e.DIAMOND="diamond",e.TRIANGLE="triangle",e.TRIANGLE_DOWN="triangle-down"}(HichartMarkerSymbol||(HichartMarkerSymbol={}));class HichartTitle extends ChartTextObject{constructor(e){super(e)}getSaveLabel(){return"title"}_doDefaultInit(e,t,r,i){this.text="Title"}}class HichartItem extends ReportGroupItem{constructor(e){super(e),this._inverted=!1,this._title=new HichartTitle(this),this._xAxis=new HichartXAxis(this),this._yAxis=new HichartYAxis(this),this._legend=new HichartLegend(this),this._series=new HichartSeriesCollection(this),this._xAxis.title.visible=!1,this._xAxis.title.text="Labels",this._yAxis.title.text="Values"}get outlineItems(){return[this._series,this._xAxis,this._yAxis].concat(super.outlineItems)}get theme(){return this._theme}set theme(e){if(e!=this._theme){const t=this._theme;this._theme=e,this._changed(HichartItem.PROP_HICHART_THEME,e,t)}}get inverted(){return this._inverted}set inverted(e){e!==this._inverted&&(this._inverted=e,this._changed(HichartItem.PROP_HICHART_INVERTED,e,!e))}get title(){return this._title}get xAxis(){return this._xAxis}get yAxis(){return this._yAxis}get legend(){return this._legend}get series(){return this._series}addSeries(e,t){const r=this.report;if(r)return this._series.add(r.loader,e,t)}removeSeries(e){this._series.remove(e)}selectSeries(e){this._series.select(e)}getSaveType(){return"hichart"}get outlineLabel(){return"[High Chart]"}needDesignWidth(){return!1}needDesignHeight(){return!1}_getEditProps(){return super._getEditProps().concat(HichartItem.PROPINFOS)}_getStyleProps(){return HichartItem.STYLE_PROPS}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=340,this.height=270,this._title.defaultInit(e,this,r,i),this._xAxis.defaultInit(e,this,r,i),this._yAxis.defaultInit(e,this,r,i),this._legend.defaultInit(e,this,r,i),this._series.add(e,{},0)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartItem.PROPINFOS),this._loadObjects([this._title,this._xAxis,this._yAxis,this._legend],e,t),t.hasOwnProperty("series")&&this._series.load(e,t.series)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartItem.PROPINFOS),this._saveObjects([this._title,this._xAxis,this._yAxis,this._legend],e),this._series.count&&this._series.save(e.series=[])}canAddTo(e){return super.canAddTo(e)&&!e.isDataRowContainer}$_seriesChanged(e){this._changed(HichartItem.PROP_HICHART_SERIES,this._series,this._series)}}HichartItem.PROP_HICHART_THEME="theme",HichartItem.PROP_HICHART_INVERTED="inverted",HichartItem.PROP_HICHART_TITLE="title",HichartItem.PROP_HICHART_XAXIS="xAxis",HichartItem.PROP_HICHART_YAXIS="yAxis",HichartItem.PROP_HICHART_LEGEND="legend",HichartItem.PROP_HICHART_SERIES="series",HichartItem.PROPINFOS=[{name:ReportItem.PROP_DATA,category:PropCategory.DATA,type:ListableProperty,multiple:!1,default:void 0,domain:void 0},{name:HichartItem.PROP_HICHART_INVERTED,category:PropCategory.CHART,type:BooleanProperty,multiple:!1,default:!1},{name:HichartItem.PROP_HICHART_THEME,category:PropCategory.CHART,type:StringProperty,multiple:!1,default:void 0},{name:HichartItem.PROP_HICHART_TITLE,category:PropCategory.TITLE,type:ModelProperty,indented:!0,multiple:!1,default:void 0,domain:void 0},{name:HichartItem.PROP_HICHART_LEGEND,category:"legend",type:ModelProperty,indented:!0,multiple:!1,default:void 0,domain:void 0}],HichartItem.STYLE_PROPS=["border","backgroundColor"],HichartItem.$_ctor="HichartItem",HichartItem.ITEM_TYPE="Highchart";class HichartAxisTitle extends ChartTextObject{constructor(e){super(e)}getSaveLabel(){return"title"}}class HichartAxis extends ChartObject{constructor(e){super(e),this._title=new HichartAxisTitle(e)}get title(){return this._title}get outlineParent(){return this.chart}_getEditProps(){return super._getEditProps().concat(HichartAxis.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartAxis.PROPINFOS),this._loadObject(this._title,e,t)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartAxis.PROPINFOS),this._saveObject(this._title,e)}}HichartAxis.PROP_TITLE="title",HichartAxis.PROPINFOS=[{name:HichartAxis.PROP_TITLE,category:"title",type:ModelProperty,indented:!0,multiple:!1,default:void 0}];class HichartXAxis extends HichartAxis{constructor(e){super(e)}getPropDomain(e){if(this.report&&e.name===HichartXAxis.PROP_CATEGORY_FIELD)return this.getDataFieldNames()}get categories(){return this._categories}set categories(e){if(e!==this._categories){const t=this._categories;this._categories=null==e?void 0:e.slice(),this._changed(HichartXAxis.PROP_CATEGORIES,e,t)}}get categoryField(){return this._categoryField}set categoryField(e){if(e!==this._categoryField){const t=this._categoryField;this._categoryField=e,this._changed(HichartXAxis.PROP_CATEGORY_FIELD,e,t)}}getCategories(e,t){if(!e||!this._categoryField)return this._categories;{const e=this._getParentData();if(e)return t.getFieldValues(e,this._categoryField)}}getSaveLabel(){return"xAxis"}get displayPath(){return this.chart.displayPath+".xAxis"}get outlineLabel(){return"[X Axis]"}_getEditProps(){return super._getEditProps().concat(HichartXAxis.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartXAxis.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartXAxis.PROPINFOS)}}HichartXAxis.PROP_CATEGORIES="categories",HichartXAxis.PROP_CATEGORY_FIELD="categoryField",HichartXAxis.PROPINFOS=[{name:HichartXAxis.PROP_CATEGORIES,category:PropCategory.AXIS,type:StringArrayProperty,multiple:!1,default:void 0},{name:HichartXAxis.PROP_CATEGORY_FIELD,category:PropCategory.AXIS,type:ListableProperty,multiple:!1,default:void 0}];class HichartYAxis extends HichartAxis{constructor(e){super(e)}get min(){return this._min}set min(e){if(e!==this._min){const t=this._min;this._min=e,this._changed(HichartYAxis.PROP_MIN,e,t)}}get max(){return this._max}set max(e){if(e!==this._max){const t=this._max;this._max=e,this._changed(HichartYAxis.PROP_MAX,e,t)}}getSaveLabel(){return"yAxis"}get displayPath(){return this.chart.displayPath+".yAxis"}get outlineLabel(){return"[Y Axis]"}_getEditProps(){return super._getEditProps().concat(HichartYAxis.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartYAxis.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartYAxis.PROPINFOS)}}HichartYAxis.PROP_MIN="min",HichartYAxis.PROP_MAX="max",HichartYAxis.PROPINFOS=[{name:HichartYAxis.PROP_MIN,category:PropCategory.AXIS,type:NumberProperty,multiple:!1,default:void 0},{name:HichartYAxis.PROP_MAX,category:PropCategory.AXIS,type:NumberProperty,multiple:!1,default:void 0}];class HichartSeries extends ChartSeries{constructor(e){super(e)}canHideMarker(){return!1}getWrapper(e){return Utils.extend(e,{type:this.seriesType,name:this.name}),e}get outlineParent(){return this.chart.series}_getEditProps(){return super._getEditProps().concat(HichartSeries.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i)}_doLoad(e,t){super._doLoad(e,t)}_doSave(e){super._doSave(e)}getCollectionLabel(){return"hichartSeries"}canRemoveFrom(){return!0}}HichartSeries.PROPINFOS=[];class HichartSeriesCollection extends ChartSeriesCollection{constructor(e){super(e)}_createSeries(e,t){return e.createHichartSeries(this.chart,t)}_seriesChanged(e){var t;null===(t=this.chart)||void 0===t||t.$_seriesChanged(e)}}!function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e.PROXIMATE="proximate"}(HichartLegendLayout||(HichartLegendLayout={}));class HichartLegend extends ChartObject{constructor(e){super(e),this._layout=HichartLegendLayout.HORIZONTAL,this._align=Align.CENTER,this._verticalAlign=VerticalAlign.BOTTOM,this.visible=!1}get align(){return this._align}set align(e){if(e!==this._align){const t=this._align;this._align=e,this._changed(HichartLegend.PROP_HICHART_ALIGN,e,t)}}get verticalAlign(){return this._verticalAlign}set verticalAlign(e){if(e!==this._verticalAlign){const t=this._verticalAlign;this._verticalAlign=e,this._changed(HichartLegend.PROP_HICHART_VERTICAL_ALIGN,e,t)}}get layout(){return this._layout}set layout(e){if(e!==this._layout){const t=this._layout;this._layout=e,this._changed(HichartLegend.PROP_HICHART_LAYOUT,e,t)}}_getEditProps(){return super._getEditProps().concat(HichartLegend.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartLegend.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartLegend.PROPINFOS)}getSaveLabel(){return"legend"}_isDefaultVisible(){return!1}}HichartLegend.PROP_HICHART_ALIGN="align",HichartLegend.PROP_HICHART_VERTICAL_ALIGN="verticalAlign",HichartLegend.PROP_HICHART_LAYOUT="layout",HichartLegend.PROPINFOS=[{name:HichartLegend.PROP_HICHART_ALIGN,category:"legend",type:EnumProperty,indented:!0,multiple:!1,default:void 0,domain:Align},{name:HichartLegend.PROP_HICHART_VERTICAL_ALIGN,category:"legend",type:EnumProperty,indented:!0,multiple:!1,default:void 0,domain:VerticalAlign},{name:HichartLegend.PROP_HICHART_LAYOUT,category:"legend",type:EnumProperty,indented:!0,multiple:!1,default:void 0,domain:HichartLegendLayout}];class HichartSeriesMarker extends ChartObject{constructor(e){super(e.chart),this._series=e}get symbol(){return this._symbol}set symbol(e){if(e!==this._symbol){const t=this._symbol;this._symbol=e,this._changed(HichartSeriesMarker.PROP_SYMBOL,e,t)}}get fillColor(){return this._fillColor}set fillColor(e){if(e!==this._fillColor){const t=this._fillColor;this._fillColor=e,this._changed(HichartSeriesMarker.PROP_FILL_COLOR,e,t)}}canHide(){return this._series.canHideMarker()}getWrapper(){return this._getPropsWrapper({},null,{visible:"enabled"})}_getEditProps(){return super._getEditProps().concat(HichartSeriesMarker.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartSeriesMarker.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartSeriesMarker.PROPINFOS)}}HichartSeriesMarker.PROP_SYMBOL="symbol",HichartSeriesMarker.PROP_FILL_COLOR="fillColor",HichartSeriesMarker.PROPINFOS=[{name:HichartSeriesMarker.PROP_SYMBOL,category:"marker",type:EnumProperty,indented:!0,multiple:!1,default:void 0,domain:HichartMarkerSymbol},{name:HichartSeriesMarker.PROP_FILL_COLOR,category:"marker",type:ColorProperty,multiple:!0,default:void 0}];class RemoveHichartSeriesCommand extends EditCommand{constructor(e){super("Remove HichartSeries"),assert(!!e),this._series=e,this._chart=e.chart,assert(!!e),this._index=this._chart.series.indexOf(e)}_doDispose(){this._chart=this._series=null}get chart(){return this._chart}get series(){return this._series}get index(){return this._index}redo(e){this._chart.removeSeries(this._series)}undo(){this._chart.addSeries(this._series,this._index)}get source(){return this._series}}class RemoveItemCommand extends EditCommand{constructor(e){super("Remove Item"),assert(!!e),this._parent=e.outlineParent instanceof CellGroup?e.outlineParent.outlineParent:e.outlineParent,assert(!!this._parent),this._item=e,this._index=this._parent.indexOf(e)}static createCommands(e){if(e&&e.length>0){const t=[];for(let r of e)if(r&&r.canRemoveFrom()){let e;r instanceof TableRow?e=new RemoveTableRowCommand(r):r instanceof TableBandColumn?e=new RemoveTableBandColumnCommand(r):r instanceof TableColumn?e=new RemoveTableColumnCommand(r):r instanceof HichartSeries?e=new RemoveHichartSeriesCommand(r):r instanceof ReportItem&&(e=new RemoveItemCommand(r)),t.push(e)}return t.length>0?t:null}}_doDispose(){this._parent=this._item=null}get parent(){return this._parent}get item(){return this._item}get index(){return this._index}undo(){this._parent.add(this._item,this._index)}redo(e){this._parent.remove(this._item)}get source(){return this._item}}class RemoveItemsCommand extends EditCommandGroup{constructor(e){super("Remove Items",RemoveItemCommand.createCommands(e))}}class ReportPage extends ReportGroupItem{constructor(e){super("reportPage"),this._events=new EventAware,this._nameMap={},this._loading=!1,this._removing=!1,this._report=e,this.add(this._reportHeader=new ReportHeader),this.add(this._reportFooter=new ReportFooter),this.add(this._pageHeader=new PageHeader),this.add(this._pageFooter=new PageFooter),this.add(this._body=new PageBody),this.add(this._backItems=new PageItemContainer("pageBackItems","Back Items")),this.add(this._frontItems=new PageItemContainer("pageFrontItems","Front Items")),this._sections=[this._pageHeader,this._reportHeader,this._body,this._backItems,this._frontItems,this._reportFooter,this._pageFooter]}addListener(e){return this._events.addListener(e)}removeListener(e){return this._events.removeListener(e)}get report(){return this._report}get reportHeader(){return this._reportHeader}get reportFooter(){return this._reportFooter}get pageHeader(){return this._pageHeader}get pageFooter(){return this._pageFooter}get body(){return this._body}get backContainer(){return this._backItems}get backItems(){return this._backItems.items}get frontContainer(){return this._frontItems}get frontItems(){return this._frontItems.items}get loading(){return this._loading}getItem(e){return this._nameMap[e]}removeItems(e,t){if(!(t=t&&t.filter((e=>e.canRemoveFrom())))||0==t.length)return 0;const r=t.sort(((e,t)=>e.level-t.level));for(let e=r.length-1;e>0;e--){const t=r[e];for(let i=e+1;i>=0;i--){const s=r[i];if(s instanceof ReportGroupItem&&t instanceof ReportItem&&t.isAncestor(s)){r.splice(e,1);break}}}try{e?e.execute(new RemoveItemsCommand(r)):new RemoveItemsCommand(r).run()}finally{}}search(e,t,r){t.caseSensitive||(e=e.toLowerCase()),this._sections.forEach((i=>i.search(e,t,r)))}get outlineLabel(){return"Page"}get pathLabel(){return"page"}get page(){return this}canMove(){return!1}getEditProps(){return[]}_getStyleProps(){return["fontFamily","fontSize","fontWeight","color","backgroundColor"]}canDelete(){return!1}_doLoad(e,t){this._loading=!0;try{this._loadProps(t,"styles"),t.hasOwnProperty("reportHeader")&&this._reportHeader.load(e,t.reportHeader),t.hasOwnProperty("reportFooter")&&this._reportFooter.load(e,t.reportFooter),t.hasOwnProperty("pageHeader")&&this._pageHeader.load(e,t.pageHeader),t.hasOwnProperty("pageFooter")&&this._pageFooter.load(e,t.pageFooter),t.hasOwnProperty("body")&&this._body.load(e,t.body),t.hasOwnProperty("backItems")&&this._backItems.load(e,t.backItems),t.hasOwnProperty("frontItems")&&this._frontItems.load(e,t.frontItems)}finally{this._loading=!1}}_ignoreItems(){return!0}_doSave(e){let t;this._pageHeader.save(t={})&&(e.pageHeader=t),this._reportHeader.save(t={})&&(e.reportHeader=t),this._reportFooter.save(t={})&&(e.reportFooter=t),this._pageFooter.save(t={})&&(e.pageFooter=t),this._body.save(t={})&&(e.body=t),this._backItems.count>0&&this._backItems.save(e.backItems=[]),this._frontItems.count>0&&this._frontItems.save(e.frontItems=[])}canResize(e){return!1}getAllItems(e,t=!1){if(e)return e.getDescendants(t);{let e=[];return this._sections.forEach((r=>e=e.concat(r.getDescendants(t)))),e}}collectInvalids(e,t){this._sections.forEach((r=>r.collectInvalids(e,t)))}$_itemAdded(e,t,r){this.$_addItem(e),this._fireItemAdded(e,t,r)}$_addItem(e){if(e instanceof ReportItem&&e.name&&(this._nameMap[e.name]=e),e instanceof ReportGroupItem)for(let t of e._items)this.$_addItem(t)}$_itemsAdded(e,t){e.forEach((e=>this.$_addItem(e))),this._fireItemsAdded(e,t)}$_itemRemoved(e,t){this.$_removeItem(e),this._removing||this._fireItemRemoved(e,t)}$_removeItem(e){if(e instanceof ReportItem&&e.name&&delete this._nameMap[e.name],e instanceof ReportGroupItem)for(let t of e._items)this.$_removeItem(t)}$_itemsRemoved(e){for(let t of e)this.$_removeItem(t);this._removing||this._fireItemsRemoved(e)}$_itemChanged(e,t,r,i){this._fireItemChanged(e,t,r,i)}$_nameChanged(e,t){t&&delete this._nameMap[t],e.name&&(this._nameMap[e.name]=e)}$_dataNameChanged(e,t){this._sections.forEach((r=>r.dataNameChanged(e,t)))}$_dataFieldNameChanged(e,t,r){this._sections.forEach((i=>i.dataFieldNameChanged(e,t,r)))}_fireItemAdded(e,t,r){this._events.fireEvent(ReportPage.ITEM_ADDED,e,t,r)}_fireItemsAdded(e,t){this._events.fireEvent(ReportPage.ITEMS_ADDED,e,t)}_fireItemRemoved(e,t){this._events.fireEvent(ReportPage.ITEM_REMOVED,e,t)}_fireItemsRemoved(e){this._events.fireEvent(ReportPage.ITEMS_REMOVED,e)}_fireItemChanged(e,t,r,i){this._events.fireEvent(ReportPage.ITEM_CHANGED,e,t,r,i)}}ReportPage.ITEM_ADDED="onPageItemAdded",ReportPage.ITEMS_ADDED="onPageItemsAdded",ReportPage.ITEM_REMOVED="onPageItemRemoved",ReportPage.ITEMS_REMOVED="onPageItemsRemoved",ReportPage.ITEM_CHANGED="onPageItemChanged",ReportPage.$_ctor="ReportPage";class PageBodyItems extends ColumnBoxContainer{get outlineLabel(){return"Items"}canContainsBand(){return!0}canResize(e){return!1}canMove(){return!1}needDesignWidth(){return!1}needDesignHeight(){return!1}_boundable(){return!1}_getStyleProps(){return PageBodyItems.STYLE_PROPS}}PageBodyItems.STYLE_PROPS=["backgroundColor"];class PageBody extends PageSection{constructor(){super("pageBody"),this.add(this._bodyItems=new PageBodyItems("bodyItems")),this.add(this._backItems=new PageItemContainer("pageBackItems","Back Items")),this.add(this._frontItems=new PageItemContainer("pageFrontItems","Front Items"))}get backItems(){return this._backItems.items}get backItemsContainer(){return this._backItems}get frontItems(){return this._frontItems.items}get frontItemsContainer(){return this._frontItems}get bodyItems(){return this._bodyItems.items}get itemsContainer(){return this._bodyItems}get outlineLabel(){return"Body"}canParentOf(e){return!1}canResize(e){return!1}_doLoad(e,t){t.hasOwnProperty("items")&&(this._bodyItems.load(e,{items:t.items}),this._bodyItems.loadProps(t)),t.hasOwnProperty("backItems")&&this._backItems.load(e,t.backItems),t.hasOwnProperty("frontItems")&&this._frontItems.load(e,t.frontItems)}_loadItems(e,t){}_ignoreItems(){return!0}_doSave(e){this._bodyItems.count>0&&(this._bodyItems.save(e),delete e.type,delete e.name),this._backItems.count>0&&this._backItems.save(e.backItems=[]),this._frontItems.count>0&&this._frontItems.save(e.frontItems=[])}canRemove(e){return!1}}PageBody.$_ctor="PageBody";class ImageItem extends ReportItem{constructor(e){super(e)}get url(){return this._url}set url(e){if(e!=this._url){const t=this._url;this._url=e,this._changed(ImageItem.PROP_URL,e,t)}}get image(){return this._image}set image(e){if(e!=this._image){const t=this._image;this._image=e,this._changed(ImageItem.PROP_IMAGE,e,t)}}getSaveType(){return"image"}get outlineLabel(){return"[Image]"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=52,this.height=52}_getEditProps(){return super._getEditProps().concat(ImageItem.PROPINFOS)}_getStyleProps(){return["opacity"].concat(super._getStyleProps())}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ImageItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ImageItem.PROPINFOS)}canAdoptDragSource(e){return e instanceof ImageAsset}adoptDragSource(e){if(e instanceof ImageAsset)return{type:DropResultType.PROP,prop:"image",value:e.name}}canPropAdoptDragSource(e,t){return"image"===e.name&&t instanceof ImageAsset}adoptPropDragSource(e,t){if("image"===e.name&&t instanceof ImageAsset)return{type:DropResultType.PROP,prop:"image",value:t.name}}}ImageItem.PROP_URL="url",ImageItem.PROP_IMAGE="image",ImageItem.PROPINFOS=[{name:ImageItem.PROP_URL,category:"Image",type:StringProperty,multiple:!1,default:void 0},{name:ImageItem.PROP_IMAGE,category:"Image",type:StringProperty,multiple:!1,default:void 0}],ImageItem.$_ctor="ImageItem",ImageItem.ITEM_TYPE="Image";class CheckItem extends ReportItem{constructor(e){super(e),this._threeStates=!1,this._checked=!1,this._text="Check",this._falseText="Uncheck"}get threeStates(){return this._threeStates}set threeStates(e){e!=this._threeStates&&(this._threeStates=e,this._changed(CheckItem.PROP_THREE_STATES,e,!e))}get checked(){return this._checked}set checked(e){if(e!=this._checked){const t=this._checked;this._checked=e,this._changed(CheckItem.PROP_CHECKED,e,t)}}get text(){return this._text}set text(e){if(e!=this._text){const t=this._text;this._text=e,this._changed(CheckItem.PROP_TEXT,e,t)}}get falseText(){return this._falseText}set falseText(e){if(e!=this._falseText){const t=this._falseText;this._falseText=e,this._changed(CheckItem.PROP_FALSE_TEXT,e,t)}}get emptyText(){return this._emptyText}set emptyText(e){if(e!=this._emptyText){const t=this._emptyText;this._emptyText=e,this._changed(CheckItem.PROP_EMPTY_TEXT,e,t)}}getChecked(e){return e?"1":!1!==e||this._threeStates?"-1":"0"}getText(e){return e?this._text:!1!==e||this._threeStates?this._emptyText:this._falseText}get outlineLabel(){return"[Check]"}getSaveType(){return"check"}_getEditProps(){return super._getEditProps().concat(CheckItem.PROPINFOS)}_getStyleProps(){return CheckItem.STYLE_PROPS}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.text="Check"}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,CheckItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,CheckItem.PROPINFOS)}}CheckItem.PROP_THREE_STATES="threeStates",CheckItem.PROP_CHECKED="checked",CheckItem.PROP_TEXT="text",CheckItem.PROP_FALSE_TEXT="falseText",CheckItem.PROP_EMPTY_TEXT="emptyText",CheckItem.PROPINFOS=[{name:CheckItem.PROP_THREE_STATES,category:"Check",type:BooleanProperty,multiple:!1,default:!1},{name:CheckItem.PROP_CHECKED,category:"Check",type:BooleanProperty,multiple:!1,default:!1},{name:CheckItem.PROP_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:void 0},{name:CheckItem.PROP_FALSE_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:void 0},{name:CheckItem.PROP_EMPTY_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:void 0}],CheckItem.STYLE_PROPS=["fontFamily","fontSize","fontStyle","textDecoration","fontWeight","color","backgroundColor","border"],CheckItem.$_ctor="CheckItem",CheckItem.ITEM_TYPE="Check";class ListCellItem extends CellGroup{constructor(e){super(e,"tableCell")}}ListCellItem.$_ctor="ListCellItem";class ListContainer extends CellContainer{constructor(e){super(e),this._ordered=!1,this._start=1,this.designHeight=50,this.designWidth=160}get ordered(){return this._ordered}set ordered(e){e!=this._ordered&&(this._ordered=e,this._changed(ListContainer.PROP_ORDERED,e,!e))}get start(){return this._start}set start(e){if(e!=this._start){const t=this._start;this._start=e,this._changed(ListContainer.PROP_START,e,t)}}getSaveType(){return"list"}get outlineLabel(){return"[List]"}_datable(){return!0}_getEditProps(){return super._getEditProps().concat(ListContainer.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ListContainer.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ListContainer.PROPINFOS)}_doSaveItems(e,t){for(let r of t){const t={};r.item.save(t),e.push(t)}}_prepareCellGroup(e){return new ListCellItem(e)}}ListContainer.PROP_ORDERED="ordered",ListContainer.PROP_START="start",ListContainer.PROPINFOS=[{name:ListContainer.PROP_ORDERED,category:"List",type:BooleanProperty,multiple:!1,default:0},{name:ListContainer.PROP_START,category:"List",type:NumberProperty,multiple:!1,default:1}],ListContainer.$_ctor="ListContainer",ListContainer.ITEM_TYPE="List";class SimpleBandSection extends StackContainer{constructor(e){super(null),this._repeat=!0,this._child_field=null,assert(!!e),this._band=e,this.width="100%",this.designHeight=24}get band(){return this._band}get repeat(){return this._repeat}set repeat(e){e!=this._repeat&&(this._repeat=e,this._changed(SimpleBandSection.PROP_SIMPLE_BAND_SECTION_REPEAT,e,!e))}getFieldOf(e){return e.getChildProp(SimpleBandSection.PROP_FIELD,this._child_field)}setFieldOf(e,t){e.setChildProp(SimpleBandSection.PROP_FIELD,t)}get designLevel(){return this._band.designLevel}get marqueeParent(){return this._band}_getStyleProps(){return["fontFamily","fontSize","fontWeight","color","backgroundColor"].concat(super._getStyleProps())}canResize(e){return e===ResizeDirection.BOTTOM}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SimpleBand.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SimpleBand.PROPINFOS)}_doLoadChild(e,t){super._doLoadChild(e,t),t.hasOwnProperty(SimpleBandSection.PROP_FIELD)&&this.setFieldOf(e,t.field)}}SimpleBandSection.PROP_SIMPLE_BAND_SECTION_REPEAT="repeat",SimpleBandSection.PROPINFOS=[{name:SimpleBandSection.PROP_SIMPLE_BAND_SECTION_REPEAT,category:"Band",type:BooleanProperty,multiple:!1,default:!0}],SimpleBandSection.PROP_FIELD="field";class SimpleBandHeader extends SimpleBandSection{constructor(e){super(e)}get outlineLabel(){return"[Band Header]"}}SimpleBandHeader.$_ctor="SimpleBandHeader";class SimpleBandFooter extends SimpleBandSection{constructor(){super(...arguments),this._attachToBody=!1}get attachToBody(){return this._attachToBody}set attachToBody(e){e!==this._attachToBody&&(this._attachToBody=e,this._changed(SimpleBandFooter.PROP_ATTACH_TO_BODY,e,!e))}get outlineLabel(){return"[Band Footer]"}_getEditProps(){return super._getEditProps().concat(SimpleBandFooter.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SimpleBandFooter.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SimpleBandFooter.PROPINFOS)}}SimpleBandFooter.PROP_ATTACH_TO_BODY="attachToBody",SimpleBandFooter.PROPINFOS=[{name:SimpleBandFooter.PROP_ATTACH_TO_BODY,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1}],SimpleBandFooter.$_ctor="SimpleBandFooter";class SimpleBandRow extends SimpleBandSection{constructor(){super(...arguments),this.masterRow=NaN}get blankItems(){return this._blankItems}canBlank(e,t){if(this.band.dataObj.equalRows(t,t-1,e.$_blankFlds))return!0}get outlineLabel(){return"[Data Row]"}get dataDominant(){return!0}get isDataRowContainer(){return!0}_getChildPropInfos(e){return SimpleBandRow.CHILD_PROPS.concat(super._getChildPropInfos(e))}_doLoadChild(e,t){super._doLoadChild(e,t),this._loadChildPropsOf(e,t,SimpleBandRow.CHILD_PROPS)}_doPreparePrint(e){super._doPreparePrint(e),this._blankItems=this.collectBlankItems()}}SimpleBandRow.PROP_EQUAL_BLANK="equalBlank",SimpleBandRow.PROP_BLANK_FIELDS="blankFields",SimpleBandRow.CHILD_PROPS=[{name:SimpleBandRow.PROP_EQUAL_BLANK,category:PropCategory.BAND,type:BooleanProperty,multiple:!1,default:!1},{name:SimpleBandRow.PROP_BLANK_FIELDS,category:PropCategory.BAND,type:StringProperty,multiple:!1,default:void 0}],SimpleBandRow.$_ctor="SimpleBandRow";class SimpleBandRowGroupSection extends StackContainer{constructor(e,t){super(t),this._group=e}get group(){return this._group}get band(){var e;return null===(e=this._group)||void 0===e?void 0:e.band}}SimpleBandRowGroupSection.STYLE_PROPS=["backgroundColor"];class SimpleBandRowGroupHeader extends SimpleBandRowGroupSection{constructor(e){super(e,"groupHeader")}get outlineLabel(){return"Group Header"}}SimpleBandRowGroupHeader.$_ctor="SimpleBandRowGroupHeader";class SimpleBandRowGroupFooter extends SimpleBandRowGroupSection{constructor(e){super(e,"groupFooter")}get outlineLabel(){return"Group Footer"}}SimpleBandRowGroupFooter.$_ctor="SimpleBandRowGroupFooter";class SimpleBandRowGroup extends DataBandRowGroup{constructor(e){super("simpleBandRowGroup"),this.add(this._header=new SimpleBandRowGroupHeader(this)),this.add(this._footer=new SimpleBandRowGroupFooter(this)),this._collection=e}get outlineParent(){return this._collection}get marqueeParent(){return this.band}getEditProps(){return SimpleBandRowGroup.PROPINFOS.concat(super.getEditProps())}get header(){return this._header}get footer(){return this._footer}get band(){var e;return null===(e=this._collection)||void 0===e?void 0:e.band}get page(){var e;return null===(e=this.band)||void 0===e?void 0:e.page}get report(){var e;return null===(e=this.band)||void 0===e?void 0:e.report}get collection(){return this._collection}get dataParent(){return this.band}_ignoreItems(){return!0}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SimpleBandRowGroup.PROPINFOS),t.hasOwnProperty("header")&&this._header.load(e,t.header),t.hasOwnProperty("footer")&&this._footer.load(e,t.footer)}_doSave(e){super._doSave(e),this._savePropsOf(e,SimpleBandRowGroup.PROPINFOS),this._header.save(e.header={}),this._footer.save(e.footer={})}_changed(e,t,r){super._changed(e,t,r),this._collection&&this._collection.$_groupChanged(this)}}SimpleBandRowGroup.PROPINFOS=[];class SimpleBandRowGroupCollection extends ReportItemCollection{constructor(e){super(),this._groups=[],this._band=e}get outlineParent(){return this._band}get outlineLabel(){return"[Groups]"}get outlineExpandable(){return!0}get outlineItems(){return this._groups}getSaveType(){return"groups"}canRemoveFrom(){return!1}canParentOf(e){return!1}get band(){return this._band}get count(){return this._groups.length}get items(){return this._groups.slice()}get visibleCount(){let e=0;for(let t of this._groups)t.visible&&e++;return e}get groups(){return this._groups.slice()}load(e,t){if(this._groups=[],t&&t.length>0){for(let r of t)if(r){const t=new SimpleBandRowGroup(this);t.load(e,r),this._groups.push(t)}this.$_invalidateGroups()}}save(e){for(let t of this._groups){const r={};t.save(r),e.push(r)}}get(e){return this._groups[e]}indexOf(e){return this._groups.indexOf(e)}add(e,t=-1){const r=this.$_add(e,t);if(r)return this.$_invalidateGroups(),this._itemAdded(r),r}addAll(e,t=-1){if(!e||e.length<1)return;const r=this._groups.length;t=t<0?this._groups.length:Math.max(0,this._groups.length);for(let r of e)this.$_add(r,t)&&t++;return this._groups.length!=r?(this.$_invalidateGroups(),!0):void 0}removeAt(e){if(e>=0&&e<this._groups.length){const t=this._groups.splice(e,1)[0];return this.$_invalidateGroups(),this._itemRemoved(t,this._band),!0}}remove(e){return this.removeAt(this.indexOf(e))}clear(){if(this._groups.length>0)return this._groups=[],this.$_invalidateGroups(),!0}getValidGroups(e){if(e){const t=[];for(let r of this._groups){const i=r.field;Utils.isNumber(i)?i>=0&&i<e.fieldCount&&t.push(r):e.containsField(i)&&t.push(r)}return t.length?t:null}return null}get page(){var e;return null===(e=this._band)||void 0===e?void 0:e.page}get displayPath(){return this._band?this._band.displayPath+".groups":"groups"}get level(){return this._band?this._band.level+1:0}isAncestorOf(e){if(super.isAncestorOf(e))return!0;if(this._groups.indexOf(e)>=0)return!0;for(let t of this._groups)if(t.indexOf(e))return!0}$_add(e,t=-1){if(!(e instanceof SimpleBandRowGroup)){const t=e;e=new SimpleBandRowGroup(this),t&&e.extend(t)}if(e instanceof SimpleBandRowGroup&&this._groups.indexOf(e)<0)return t<0?this._groups.push(e):this._groups.splice(Math.min(t,this._groups.length),0,e),e}$_invalidateGroups(){for(let e=this._groups.length-1;e>=0;e--)this._groups[e]._index=e;this._band&&this._band.$_groupChanged(null)}$_groupChanged(e){this._band&&this._band.$_groupChanged(e)}}class SimpleBand extends DataBand{constructor(e){super(e),this._groups=new SimpleBandRowGroupCollection(this),this.add(this._header=new SimpleBandHeader(this)),this.add(this._footer=new SimpleBandFooter(this)),this.add(this._dataRow=new SimpleBandRow(this)),this._setOutlineOrders(1,this._dataRow,this._footer,this.detail),this.width="100%"}get outlineItems(){return[this._groups].concat(super.outlineItems)}get groups(){return this._groups}get header(){return this._header}get footer(){return this._footer}get dataRow(){return this._dataRow}get pr(){return this._pr}setPrinting(e,t){e.row=this._pr=t}getSaveType(){return"simpleband"}get outlineLabel(){return"[Simple Band]"}get isBand(){return!0}_valueable(){return!0}_ignoreItems(){return!0}_getEditProps(){return super._getEditProps().concat(SimpleBand.PROPINFOS)}isAncestorOf(e){return!!super.isAncestorOf(e)||(e===this._groups||(!!this._groups.isAncestorOf(e)||void 0))}_doLoad(e,t){super._doLoad(e,t),t.hasOwnProperty("groups")&&this._groups.load(e,t.groups),t.hasOwnProperty("header")&&this.header.load(e,t.header),t.hasOwnProperty("footer")&&this.footer.load(e,t.footer),t.hasOwnProperty("row")&&this.dataRow.load(e,t.row),t.hasOwnProperty("dataRow")&&this.dataRow.load(e,t.dataRow)}_doSave(e){super._doSave(e),this._groups.save(e.groups=[]),this._header.save(e.header={}),this._footer.save(e.footer={}),this._dataRow.save(e.dataRow={})}$_groupChanged(e){this._changed(SimpleBand.PROP_SIMPLE_BAND_GROUPS,this._groups,this._groups)}_doPreparePrint(e){super._doPreparePrint(e),this._groups.preparePrint(e)}_doPrepareIndices(e){e.row=e.index=this._pr=0}canRemove(e){return!1}getNextDetailRows(e){return this._getNextDetailRows(e,this._pr)}skipDetailRows(e){const t=this._skipDetailRows(e,this._pr);this._pr+=t}}SimpleBand.PROP_SIMPLE_BAND_GROUPS="groups",SimpleBand.PROPINFOS=[],SimpleBand.$_ctor="SimpleBand",SimpleBand.ITEM_TYPE="Simple Band",function(e){e.CODE39="code39",e.CODE128="code128"}(BarcodeFormat||(BarcodeFormat={}));class BarcodeItem extends ReportItem{constructor(e){super(e),this._format=BarcodeFormat.CODE128,this._text=""}get format(){return this._format}set format(e){if(e!=this._format){const t=this._format;this._format=e,this._changed(BarcodeItem.PROP_BARCODE_FORMAT,e,t)}}get text(){return this._text}set text(e){if(e!=this._text){const t=this._text;this._text=e,this._changed(BarcodeItem.PROP_BARCODE_TEXT,e,t)}}convertText(e){return this._format?e.toUpperCase():e}getSaveType(){return"barcode"}get outlineLabel(){return"Barcode"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.text="Cosmos",this.width=100,this.height=50}_getEditProps(){return super._getEditProps().concat(BarcodeItem.PROPINFOS)}_getStyleProps(){return BarcodeItem.STYLE_PROPS}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,BarcodeItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,BarcodeItem.PROPINFOS)}}BarcodeItem.PROP_BARCODE_FORMAT="format",BarcodeItem.PROP_BARCODE_TEXT="text",BarcodeItem.PROPINFOS=[{name:BarcodeItem.PROP_BARCODE_FORMAT,category:"barcode",type:StringProperty,multiple:!1,default:BarcodeFormat.CODE128,domain:[BarcodeFormat.CODE39,BarcodeFormat.CODE128]},{name:BarcodeItem.PROP_BARCODE_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:""}],BarcodeItem.STYLE_PROPS=["fontSize","fontStyle","color","backgroundColor","fill","paddingLeft","paddingTop","paddingRight","paddingBottom","border"],BarcodeItem.$_ctor="BarcodeItem",BarcodeItem.ITEM_TYPE="Barcode",function(e){e.L="L",e.M="M",e.Q="Q",e.H="H"}(QrcodeErrorCorrectionLevel||(QrcodeErrorCorrectionLevel={}));class QrcodeItem extends ReportItem{constructor(e){super(e),this._text="",this._errorCorrectionLevel=QrcodeErrorCorrectionLevel.Q}get text(){return this._text}set text(e){if(e!==this._text){const t=this._text;this._text=e,this._changed(QrcodeItem.PROP_QRCODE_TEXT,e,t)}}get errorCorrectionLevel(){return this._errorCorrectionLevel}set errorCorrectionLevel(e){if(e!==this._errorCorrectionLevel){const t=this._errorCorrectionLevel;this._errorCorrectionLevel=e,this._changed(QrcodeItem.PROP_QRCODE_ERROR_CORRECTION_LEVEL,e,t)}}getSaveType(){return"qrcode"}get outlineLabel(){return"Qrcode"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.text="https://www.google.com",this.width=100,this.height=100}_getEditProps(){return super._getEditProps().concat(QrcodeItem.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,QrcodeItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,QrcodeItem.PROPINFOS)}}QrcodeItem.QRCODE_MIN_SIZE=50,QrcodeItem.PROP_QRCODE_TEXT="text",QrcodeItem.PROP_QRCODE_ERROR_CORRECTION_LEVEL="errorCorrectionLevel",QrcodeItem.PROPINFOS=[{name:QrcodeItem.PROP_QRCODE_ERROR_CORRECTION_LEVEL,category:"qrcode",type:StringProperty,multiple:!1,default:QrcodeErrorCorrectionLevel.Q,domain:[QrcodeErrorCorrectionLevel.L,QrcodeErrorCorrectionLevel.M,QrcodeErrorCorrectionLevel.Q,QrcodeErrorCorrectionLevel.H]},{name:QrcodeItem.PROP_QRCODE_TEXT,category:PropCategory.TEXT,type:StringProperty,multiple:!1,default:""}],QrcodeItem.$_ctor="QrcodeItem",QrcodeItem.ITEM_TYPE="Qrcode";class ShapeDrawing{constructor(e){this.className=e}draw(e,t,r,i=0,s){return this._doDraw(e,t,r,i,s||"")}drawAt(e,t,r,i,s,A=0,n){const o=this._doDraw(r,i,s,A,n||"");return o.setAttribute("transform","translate("+e+","+t+")"),this.className&&o.classList.add(this.className),o}}const $$_polygonShapes={rectangle:[0,0,1,0,1,1,0,1],triangle:[.5,0,0,1,1,1],itriangle:[0,0,.5,1,1,0],diamond:[.5,0,0,.5,.5,1,1,.5],uparrow:[.5,0,0,.5,.3,.5,.3,1,.7,1,.7,.5,1,.5],downarrow:[.3,0,.3,.5,0,.5,.5,1,1,.5,.7,.5,.7,0],leftarrow:[0,.5,.5,1,.5,.7,1,.7,1,.3,.5,.3,.5,0],rightarrow:[0,.3,0,.7,.5,.7,.5,1,1,.5,.5,0,.5,.3],plus:[.3,0,.3,.3,0,.3,0,.7,.3,.7,.3,1,.7,1,.7,.7,1,.7,1,.3,.7,.3,.7,0],minus:[0,.3,0,.7,1,.7,1,.3],star:[.5,0,.6122,.3454,.9755,.3454,.6816,.559,.7938,.9045,.5,.691,.2061,.9045,.3183,.559,.02447,.3454,.3877,.3454]},$$_pairShapes={equal:[[0,.2,0,.4,1,.4,1,.2],[0,.6,0,.8,1,.8,1,.6]]};class PolygonShape extends ShapeDrawing{constructor(e,t){super(t),this._shape=e}get shape(){return this._shape}set shape(e){this._shape=e?"inverted_triangle"===e?PolygonShape.INVERTED_TRIANLGE:e.toLowerCase():null}_doDraw(e,t,r,i,s){const A=this._shape;if(t-=i,r-=i,$$_polygonShapes.hasOwnProperty(A)){let n=$$_polygonShapes[A];if(n){let A=i/2,o=i/2;n=n.slice();for(let e=0,i=n.length/2;e<i;e++)n[2*e]=A+n[2*e]*t,n[2*e+1]=o+n[2*e+1]*r;return n.push(n[0],n[1]),e.polygon(s,n)}}else if($$_pairShapes.hasOwnProperty(A)){const n=$$_pairShapes[A];if(n){let A=i/2,o=i/2,a=n[0].slice();for(let e=0,i=a.length/2;e<i;e++)a[2*e]=A+a[2*e]*t,a[2*e+1]=o+a[2*e+1]*r;a.push(a[0],a[1]),e.polygon(null,a),a=n[1],a=a.slice();for(let e=0,i=a.length/2;e<i;e++)a[2*e]=A+a[2*e]*t,a[2*e+1]=o+a[2*e+1]*r;return a.push(a[0],a[1]),e.polygon(s,a)}}}}PolygonShape.RECTANGLE="rectangle",PolygonShape.TRIANLGE="triangle",PolygonShape.INVERTED_TRIANLGE="itriangle",PolygonShape.DIAMOND="diamond",PolygonShape.UP_ARROW="uparrow",PolygonShape.DOWN_ARROW="downarrow",PolygonShape.LEFT_ARROW="leftarrow",PolygonShape.RIGHT_ARROW="rightarrow",PolygonShape.PLUS="plus",PolygonShape.MINUS="minus",PolygonShape.EQUAL="equal",PolygonShape.STAR="star";class EllipseShape extends ShapeDrawing{constructor(){super(...arguments),this.circled=!0}static isEllipse(e){return e in this.ELLIPSES}_doDraw(e,t,r,i,s){const A=i/2;if(this.circled){const i=Math.min(t,r)/2;return e.ellipse(s,t/2,r/2,i-A,i-A)}return e.ellipse(s,t/2,r/2,t/2-A,r/2-A)}}EllipseShape.CIRCLE="circle",EllipseShape.ELLIPSE="ellipse",EllipseShape.ELLIPSES={circle:"",ellipse:""};class LineShape extends ShapeDrawing{static isLine(e){return e in this.LINES}_doDraw(e,t,r,i){let s,A;switch(this.shape){case LineShape.HLINE:return A=r/2,e.line(null,0,A,t,A);case LineShape.VLINE:return s=t/2,e.line(null,s,0,s,r);case LineShape.DIAGONAL:return e.line(null,0,0,t,r);case LineShape.RDIAGONAL:return e.line(null,0,r,t,0)}}}LineShape.HLINE="hline",LineShape.VLINE="vline",LineShape.DIAGONAL="diagonal",LineShape.RDIAGONAL="rdiagonal",LineShape.LINES={hline:"",vline:"",diagonal:"",rdiagonal:""};const ShapeNames=[PolygonShape.RECTANGLE,PolygonShape.TRIANLGE,PolygonShape.INVERTED_TRIANLGE,PolygonShape.DIAMOND,PolygonShape.UP_ARROW,PolygonShape.DOWN_ARROW,PolygonShape.LEFT_ARROW,PolygonShape.RIGHT_ARROW,PolygonShape.PLUS,PolygonShape.MINUS,PolygonShape.EQUAL,PolygonShape.STAR,EllipseShape.CIRCLE,EllipseShape.ELLIPSE],ShapeNamesEx=ShapeNames.concat([LineShape.HLINE,LineShape.VLINE,LineShape.DIAGONAL,LineShape.RDIAGONAL]);class ShapeItemBase extends ReportItem{constructor(e){super(e),this._shape=PolygonShape.STAR}get shape(){return this._shape}set shape(e){if(e!==this._shape){const t=this._shape;this._shape=e,this._changed(ShapeItemBase.PROP_SHAPE,e,t)}}get shapeCallback(){return this._shapeCallback}set shapeCallback(e){if(e!==this._shapeCallback){const t=this._shapeCallback;this._shapeCallback=e,this._changed(ShapeItemBase.PROP_SHAPE_CALLBACK,e,t)}}_getEditProps(){return super._getEditProps().concat(ShapeItemBase.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ShapeItemBase.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ShapeItemBase.PROPINFOS)}setProperty(e,t){if(super.setProperty(e,t),"shape"===e&&LineShape.isLine(t)&&!this._isLoading()){let e=this.getStyle("stroke");e||(this.setStyleProperty("stroke","green"),e=this.getStyle("strokeWidth"),e||this.setStyleProperty("strokeWidth","2"))}}}ShapeItemBase.PROP_SHAPE="shape",ShapeItemBase.PROP_SHAPE_CALLBACK="shapeCallback",ShapeItemBase.PROPINFOS=[];class ShapeItem extends ShapeItemBase{constructor(e){super(e)}getSaveType(){return"shape"}get outlineLabel(){return"Shape"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.shape="star",this.width=24,this.height=24}_getEditProps(){return super._getEditProps().concat(ShapeItem.PROPINFOS)}_getStyleProps(){return ShapeItem.STYLE_PROPS}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ShapeItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ShapeItem.PROPINFOS)}}ShapeItem.PROPINFOS=[{name:ShapeItemBase.PROP_SHAPE,category:"Shape",type:StringProperty,multiple:!1,default:void 0,domain:ShapeNamesEx}],ShapeItem.STYLE_PROPS=["backgroundColor","fill","stroke","strokeWidth","strokeDasharray"],ShapeItem.$_ctor="ShapeItem",ShapeItem.ITEM_TYPE="Shape";class SvgItem extends ReportItem{constructor(e){super(e)}get svg(){return this._svg}set svg(e){if(e!=this._svg){const t=this._svg;this._svg=e,this._changed(SvgItem.PROP_SVG,e,t)}}getSaveType(){return"svg"}get outlineLabel(){return"Svg"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=52,this.height=52}_getEditProps(){return super._getEditProps().concat(SvgItem.PROPINFOS)}_getStyleProps(){return SvgItem.STYLE_PROPS}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SvgItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SvgItem.PROPINFOS)}}var ChartType,PaperSize;SvgItem.PROP_SVG="svg",SvgItem.PROPINFOS=[{name:SvgItem.PROP_SVG,category:"Svg",type:StringProperty,multiple:!1,default:void 0}],SvgItem.STYLE_PROPS=["backgroundColor","fill","stroke"],SvgItem.$_ctor="SvgItem",SvgItem.ITEM_TYPE="Svg",function(e){e.BAR="bar",e.LINE="line",e.PIE="pie"}(ChartType||(ChartType={}));class Chart extends ReportItem{constructor(e){super(e)}get values(){return this._values}set values(e){if(e!==this._values){const t=this._values;this._values=e&&e.slice(),this._changed(Chart.PROP_CHART_VALUES,e,t)}}get labels(){return this._labels}set labels(e){if(e!==this._labels){const t=this._labels;this._labels=e&&e.slice(),this._changed(Chart.PROP_CHART_LABELS,e,t)}}import(e){this._doImport(e)}getEditProps(){const e=Chart.$_ctor,t=super.getEditProps();for(let r of t)r.tag==PropCategory.CHART&&(r.category=e);return t}_getEditProps(){return Chart.PROPINFOS}_doLoad(e,t){super._doLoad(e,t),this._loadProps(t,Chart.PROP_CHART_VALUES,Chart.PROP_CHART_LABELS)}_doSave(e){super._doSave(e),this._saveProps(e,Chart.PROP_CHART_VALUES,Chart.PROP_CHART_LABELS)}_doImport(e){this._importPropsOf(e,Chart.PROPINFOS)}_importProps(e,...t){for(let r of t)this[r]=e[r]}_importPropsOf(e,t){for(let r of t){const t=r.name;e.hasOwnProperty(t)&&(this[t]=e[t])}}}Chart.PROP_CHART_VALUES="values",Chart.PROP_CHART_LABELS="labels",Chart.PROPINFOS=[{name:Chart.PROP_CHART_VALUES,category:PropCategory.CHART,type:NumberArrayProperty,multiple:!1,default:void 0,domain:void 0,tag:PropCategory.CHART},{name:Chart.PROP_CHART_LABELS,category:PropCategory.CHART,type:StringArrayProperty,multiple:!1,default:void 0,domain:void 0,tag:PropCategory.CHART}],Chart.$_ctor="Chart";class CartesianChart extends Chart{constructor(e){super(e),this._lowValue=NaN,this._highValue=NaN,this._xAxisOffset=NaN,this._yAxisOffset=NaN}get lowValue(){return this._lowValue}set lowValue(e){if(e!=this._lowValue){const t=this._lowValue;this._lowValue=e,this._changed(CartesianChart.PROP_CHART_LOW_VALUE,e,t)}}get highValue(){return this._highValue}set highValue(e){if(e!=this._highValue){const t=this._highValue;this._highValue=e,this._changed(CartesianChart.PROP_CHART_HIGH_VALUE,e,t)}}get xAxisOffset(){return this._xAxisOffset}set xAxisOffset(e){if(e!=this._xAxisOffset){const t=this._xAxisOffset;this._xAxisOffset=e,this._changed(CartesianChart.PROP_CHART_X_AXIS_OFFSET,e,t)}}get yAxisOffset(){return this._yAxisOffset}set yAxisOffset(e){if(e!=this._yAxisOffset){const t=this._yAxisOffset;this._yAxisOffset=e,this._changed(CartesianChart.PROP_CHART_Y_AXIS_OFFSET,e,t)}}_getEditProps(){return super._getEditProps().concat(CartesianChart.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,CartesianChart.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,CartesianChart.PROPINFOS)}_doImport(e){e instanceof CartesianChart&&this._importPropsOf(e,CartesianChart.PROPINFOS)}}CartesianChart.PROP_CHART_LOW_VALUE="lowValue",CartesianChart.PROP_CHART_HIGH_VALUE="highValue",CartesianChart.PROP_CHART_X_AXIS_OFFSET="xAxisOffset",CartesianChart.PROP_CHART_Y_AXIS_OFFSET="yAxisOffset",CartesianChart.PROPINFOS=[{name:CartesianChart.PROP_CHART_LOW_VALUE,category:PropCategory.CHART,type:NumberProperty,multiple:!1,default:void 0,tag:PropCategory.CHART},{name:CartesianChart.PROP_CHART_HIGH_VALUE,category:PropCategory.CHART,type:NumberProperty,multiple:!0,default:void 0,tag:PropCategory.CHART},{name:CartesianChart.PROP_CHART_X_AXIS_OFFSET,category:PropCategory.XAXIS,type:NumberProperty,multiple:!0,label:"Offset",default:void 0},{name:CartesianChart.PROP_CHART_Y_AXIS_OFFSET,category:PropCategory.YAXIS,type:NumberProperty,multiple:!0,label:"Offset",default:void 0}];class LineChart extends CartesianChart{constructor(){super("lineChart"),this._showPoint=!0,this._curved=!1}get showPoint(){return this._showPoint}set showPoint(e){e!=this._showPoint&&(this._showPoint=e,this._changed(LineChart.PROP_LINE_CHART_SHOW_POINT,e,!e))}get curved(){return this._curved}set curved(e){e!=this._curved&&(this._curved=e,this._changed(LineChart.PROP_LINE_CHART_CURVED,e,!e))}_getEditProps(){return super._getEditProps().concat(LineChart.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,LineChart.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,LineChart.PROPINFOS)}_doImport(e){super._doImport(e),e instanceof LineChart&&this._importPropsOf(e,LineChart.PROPINFOS)}}LineChart.PROP_LINE_CHART_SHOW_POINT="showPoint",LineChart.PROP_LINE_CHART_CURVED="curved",LineChart.PROPINFOS=[{name:LineChart.PROP_LINE_CHART_SHOW_POINT,category:PropCategory.CHART,type:BooleanProperty,multiple:!1,default:!0,domain:void 0,tag:PropCategory.CHART},{name:LineChart.PROP_LINE_CHART_CURVED,category:PropCategory.CHART,type:BooleanProperty,multiple:!1,default:!0,domain:void 0,tag:PropCategory.CHART}],LineChart.$_ctor="LineChart";class PieChart extends Chart{constructor(){super("pieChart")}_getEditProps(){return super._getEditProps()}_doLoad(e,t){super._doLoad(e,t)}_doSave(e){super._doSave(e)}_doImport(e){}}PieChart.$_ctor="PieChart";class BarChart extends CartesianChart{constructor(){super("barChart")}_doLoad(e,t){super._doLoad(e,t)}_doImport(e){super._doImport(e)}}BarChart.$_ctor="BarChart";class ChartItem extends ReportGroupItem{constructor(e){super(e)}get chartType(){return this._chartType}set chartType(e){if(e!=this._chartType){const t=this._chartType;this._chartType=e,this._chart=this.$_createChart(e,this._chart),this._changed(ChartItem.PROP_CHART_TYPE,e,t)}}get theme(){return this._theme}set theme(e){if(e!=this._theme){const t=this._theme;this._theme=e,this._changed(ChartItem.PROP_CHART_THEME,e,t)}}get chart(){return this._chart}getSaveType(){return"chart"}get outlineLabel(){return"[Chart]"}needDesignWidth(){return!1}needDesignHeight(){return!1}_getEditProps(){return super._getEditProps().concat(ChartItem.PROPINFOS)}_getStyleProps(){return ChartItem.STYLE_PROPS}isDominantProp(e){return e.name==ChartItem.PROP_CHART_TYPE}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.chartType=ChartType.BAR,this.chart.labels=["A","B"],this.chart.values=[3,5],this.width=240,this.height=240}_doLoad(e,t){super._doLoad(e,t),this._loadProps(t,ChartItem.PROP_CHART_TYPE,ChartItem.PROP_CHART_THEME),this._chart=this.$_createChart(this.chartType,null),t.hasOwnProperty("chart")&&this._chart.load(e,t.chart)}_doSave(e){super._doSave(e),this._saveProps(e,ChartItem.PROP_CHART_TYPE,ChartItem.PROP_CHART_THEME);let t={};this._chart.save(t),Utils.isEmpty(t)||(e.chart=t)}$_createChart(e,t){let r;switch(e){case ChartType.LINE:r=new LineChart;break;case ChartType.PIE:r=new PieChart;break;case ChartType.BAR:default:r=new BarChart}return t&&(t.$_detached(),r.import(t)),r.$_attached(this),r}}ChartItem.PROP_CHART_TYPE="chartType",ChartItem.PROP_CHART_THEME="theme",ChartItem.PROP_CHART_CHART="chart",ChartItem.PROPINFOS=[{name:ChartItem.PROP_CHART_TYPE,category:PropCategory.CHART,type:EnumProperty,multiple:!1,default:void 0,domain:ChartType},{name:ChartItem.PROP_CHART_THEME,category:PropCategory.CHART,type:StringProperty,multiple:!1,default:void 0},{name:ChartItem.PROP_CHART_CHART,category:PropCategory.CHART,type:ModelProperty,multiple:!1,default:void 0}],ChartItem.STYLE_PROPS=["border","backgroundColor"],ChartItem.$_ctor="ChartItem",ChartItem.ITEM_TYPE="Chart";class TemplateItem extends ReportItem{constructor(e){super(e),this._template=TemplateItem.TEMPLATE}get template(){return this._template}set template(e){if(e!=this._template){const t=this._template;this._template=e,this._changed(TemplateItem.PROP_TEMPLATE,e,t)}}getSaveType(){return"template"}get outlineLabel(){return"[Template]"}_getEditProps(){return super._getEditProps().concat(TemplateItem.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,TemplateItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,TemplateItem.PROPINFOS)}}TemplateItem.TEMPLATE="<div>Template</div>",TemplateItem.PROP_TEMPLATE="template",TemplateItem.PROPINFOS=[{name:TemplateItem.PROP_TEMPLATE,category:"Template",type:StringProperty,multiple:!1,default:TemplateItem.TEMPLATE}],TemplateItem.$_ctor="TemplateItem",TemplateItem.ITEM_TYPE="Template Item";class RatingItem extends ShapeItemBase{constructor(e){super(e),this._shapeCount=5,this._countinuous=!1,this._designValue=2}get shapeCount(){return this._shapeCount}set shapeCount(e){if((e=Math.max(1,Utils.toNumber(e)))!==this._shapeCount){const t=this._shapeCount;this._shapeCount=e,this._changed(RatingItem.PROP_RATING_SHAPE_COUNT,e,t)}}get countinuous(){return this._countinuous}set countinuous(e){e!==this._countinuous&&(this._countinuous=e,this._changed(RatingItem.PROP_SHAPE,e,!this._countinuous))}get minimum(){return this._minimum}set minimum(e){if((e=Utils.toNumber(e,NaN))!=this._minimum){const t=this._minimum;this._minimum=e,this._changed(RatingItem.PROP_RATING_MINIMUM,e,t)}}get maximum(){return this._maximum}set maximum(e){if((e=Utils.toNumber(e,NaN))!=this._maximum){const t=this._maximum;this._maximum=e,this._changed(RatingItem.PROP_RATING_MAXIMUM,e,t)}}get designValue(){return this._designValue}set designValue(e){if((e=Utils.toNumber(e,0))!=this._designValue){const t=this._designValue;this._designValue=e,this._changed(RatingItem.PROP_RATING_DESIGN_VALUE,e,t)}}get outlineLabel(){return"[Rating]"}getSaveType(){return"rating"}_getEditProps(){return super._getEditProps().concat(RatingItem.PROPINFOS)}_getStyleProps(){return RatingItem.STYLE_PROPS}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(100,r||100),this.height=Math.min(20,i||20)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,RatingItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,RatingItem.PROPINFOS)}}RatingItem.PROP_RATING_SHAPE_COUNT="shapeCount",RatingItem.PROP_RATING_CONTINUOUS="continuous",RatingItem.PROP_RATING_MINIMUM="minimum",RatingItem.PROP_RATING_MAXIMUM="maximum",RatingItem.PROP_RATING_DESIGN_VALUE="designValue",RatingItem.PROPINFOS=[{name:ShapeItemBase.PROP_SHAPE,category:"Shape",type:StringProperty,multiple:!1,default:void 0,domain:ShapeNames},{name:RatingItem.PROP_RATING_SHAPE_COUNT,category:"Rating",type:NumberProperty,multiple:!1,default:5},{name:RatingItem.PROP_RATING_MINIMUM,category:"Rating",type:NumberProperty,multiple:!1,default:0},{name:RatingItem.PROP_RATING_MAXIMUM,category:"Rating",type:NumberProperty,multiple:!1,default:100},{name:RatingItem.PROP_RATING_DESIGN_VALUE,category:"Rating",type:NumberProperty,multiple:!1,default:50}],RatingItem.STYLE_PROPS=["backgroundColor","fill","stroke","backFill","backStroke"],RatingItem.$_ctor="RatingItem",RatingItem.ITEM_TYPE="Rating";class SummaryItem extends TextItemBase{constructor(e){super(e)}get expression(){return this._expression}set expression(e){if(e!=this._expression){const t=this._expression;this._expression=e,this._exprNode=e?ExpressionParser.Default.parse(e):null,this._changed(SummaryItem.PROP_EXPRESSION,e,t)}}getSummary(e){return this._exprNode?this._exprNode.evaluate(e):NaN}getSaveType(){return"summary"}get designText(){return this.value}get outlineLabel(){let e=this.expression;return"[Summary]"+(e?" "+e:"")}get pathLabel(){return"summary"}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i)}_getEditProps(){return super._getEditProps().concat(SummaryItem.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,SummaryItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,SummaryItem.PROPINFOS)}}SummaryItem.PROP_EXPRESSION="expression",SummaryItem.PROPINFOS=[{name:SummaryItem.PROP_EXPRESSION,category:PropCategory.DATA,type:StringProperty,multiple:!1,default:void 0}],SummaryItem.$_ctor="SummaryItem",SummaryItem.ITEM_TYPE="Summary";class BarItem extends ReportItem{constructor(e){super(e),this._minimum=0,this._maximum=100,this._position=35}get minimum(){return this._minimum}set minimum(e){if(e!=this._minimum){const t=this._minimum;this._minimum=e,this._changed(BarItem.PROP_BAR_MINIMUM,e,t)}}get maximum(){return this._maximum}set maximum(e){if(e!=this._maximum){const t=this._maximum;this._maximum=e,this._changed(BarItem.PROP_BAR_MAXIMUM,e,t)}}get position(){return this._position}set position(e){if((e=Utils.toNumber(e,0))!=this._position){const t=this._position;this._position=e,this._changed(BarItem.PROP_POSITION,e,t)}}get outlineLabel(){return"[Bar]"}getSaveType(){return"bar"}_getEditProps(){return super._getEditProps().concat(BarItem.PROPINFOS)}_getStyleProps(){return BarItem.STYLE_PROPS}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this.width=Math.min(60,r||60),this.height=Math.min(25,i||25)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,BarItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,BarItem.PROPINFOS)}}BarItem.PROP_BAR_MINIMUM="minimum",BarItem.PROP_BAR_MAXIMUM="maximum",BarItem.PROP_POSITION="position",BarItem.PROPINFOS=[{name:BarItem.PROP_BAR_MINIMUM,category:"Bar",type:NumberProperty,multiple:!1,default:0},{name:BarItem.PROP_BAR_MAXIMUM,category:"Bar",type:NumberProperty,multiple:!1,default:100},{name:BarItem.PROP_POSITION,category:"Bar",type:NumberProperty,multiple:!1,default:50}],BarItem.STYLE_PROPS=["border","backgroundColor","barColor"],BarItem.$_ctor="BarItem",BarItem.ITEM_TYPE="Bar";class HichartColumnSeries extends HichartSeries{constructor(e){super(e)}get seriesType(){return"column"}_doLoad(e,t){super._doLoad(e,t)}_doSave(e){super._doSave(e)}}HichartColumnSeries.$_ctor="HichartColumnSeries";class HichartLineSeriesMarker extends HichartSeriesMarker{constructor(e){super(e)}get radius(){return this._radius}set radius(e){if(e!==this._radius){const t=this._radius;this._radius=e,this._changed(HichartLineSeriesMarker.PROP_RADIUS,e,t)}}_getEditProps(){return super._getEditProps().concat(HichartLineSeriesMarker.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartLineSeriesMarker.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartLineSeriesMarker.PROPINFOS)}}HichartLineSeriesMarker.PROP_RADIUS="radius",HichartLineSeriesMarker.PROPINFOS=[{name:HichartLineSeriesMarker.PROP_RADIUS,category:"marker",type:NumberProperty,multiple:!0,default:void 0}];class HichartLineSeries extends HichartSeries{constructor(e){super(e),this._marker=new HichartLineSeriesMarker(this)}get lineWidth(){return this._lineWidth}set lineWidth(e){if(e!==this._lineWidth){const t=this._lineWidth;this._lineWidth=e,this._changed(HichartLineSeries.PROP_LINE_WIDTH,e,t)}}get lineColor(){return this._lineColor}set lineColor(e){if(e!==this._lineColor){const t=this._lineColor;this._lineColor=e,this._changed(HichartLineSeries.PROP_LINE_COLOR,e,t)}}get marker(){return this._marker}get seriesType(){return"line"}canHideMarker(){return!0}_getEditProps(){return super._getEditProps().concat(HichartLineSeries.PROPINFOS)}_doDefaultInit(e,t,r,i){super._doDefaultInit(e,t,r,i),this._marker.defaultInit(e,t,r,i)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartLineSeries.PROPINFOS),this._loadObjects([this._marker],e,t)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartLineSeries.PROPINFOS),this._saveObjects([this._marker],e)}getWrapper(e){super.getWrapper(e);const t=this._getPropsWrapper({});return t.marker=this._marker.getWrapper(),Utils.extend(e,t)}}HichartLineSeries.PROP_LINE_WIDTH="lineWidth",HichartLineSeries.PROP_LINE_COLOR="lineColor",HichartLineSeries.PROP_MARKER="marker",HichartLineSeries.PROPINFOS=[{name:HichartLineSeries.PROP_LINE_WIDTH,category:PropCategory.SERIES,type:NumberProperty,multiple:!0,default:void 0},{name:HichartLineSeries.PROP_LINE_COLOR,category:PropCategory.SERIES,type:ColorProperty,multiple:!0,default:void 0},{name:HichartLineSeries.PROP_MARKER,category:"marker",indented:!0,type:ModelProperty,multiple:!1,default:void 0}],HichartLineSeries.$_ctor="HichartLineSeries";class HichartAreaSeries extends HichartLineSeries{constructor(e){super(e)}get fillColor(){return this._fillColor}set fillColor(e){if(e!==this._fillColor){const t=this._fillColor;this._fillColor=e,this._changed(HichartAreaSeries.PROP_FILL_COLOR,e,t)}}get seriesType(){return"area"}_getEditProps(){return super._getEditProps().concat(HichartAreaSeries.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartAreaSeries.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartAreaSeries.PROPINFOS)}getWrapper(e){return super.getWrapper(e),Utils.extend(e,this._getPropsWrapper({}))}}HichartAreaSeries.PROP_FILL_COLOR="fillColor",HichartAreaSeries.PROPINFOS=[{name:HichartAreaSeries.PROP_FILL_COLOR,category:PropCategory.SERIES,type:ColorProperty,multiple:!0,default:void 0}],HichartAreaSeries.$_ctor="HichartAreaSeries";class HichartPieSeries extends HichartSeries{constructor(e){super(e),this._names=["사과","배","감","귤","수박"],this.size="75%",this.innerSize="0%"}getPropDomain(e){return this.report&&e.name===HichartPieSeries.PROP_PIE_SERIES_NAME_FIELD?this.getDataFieldNames():super.getPropDomain(e)}get nameField(){return this._nameField}set nameField(e){if(e!==this._nameField){const t=this._nameField;this._nameField=e,this._changed(HichartPieSeries.PROP_PIE_SERIES_NAME_FIELD,e,t)}}get names(){return this._names}set names(e){if(e!==this._names){const t=this._names;this._names=null==e?void 0:e.slice(),this._changed(HichartPieSeries.PROP_PIE_SERIES_NAMES,e,t)}}get size(){return this._size}set size(e){if((e=this._validateSize(e))!==this._size){const t=this._size;this._size=e,this._sizeDim=new Dimension(e),this._changed(HichartPieSeries.PROP_PIE_SERIES_SIZE,e,t)}}get innerSize(){return this._innerSize}set innerSize(e){if((e=this._validateSize(e))!==this._innerSize){const t=this._innerSize;this._innerSize=e,this._innerSizeDim=new Dimension(e),this._changed(HichartPieSeries.PROP_PIE_SERIES_SIZE,e,t)}}get seriesType(){return"pie"}_getEditProps(){return super._getEditProps().concat(HichartPieSeries.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartPieSeries.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartPieSeries.PROPINFOS)}getWrapper(e){return super.getWrapper(e),Utils.extend(e,{size:this.getSize(),innerSize:this.getInnerSize()})}getValues(e,t){const r=this._getNames(e,t),i=super.getValues(e,t),s=[];if(i){let e=0;for(let t of i)s.push({y:t,name:r&&r.length>e?r[e]:e}),e++}return s}getSize(){if(this._sizeDim)return this._sizeDim.getValue()}getInnerSize(){if(this._innerSizeDim)return this._innerSizeDim.getValue()}_getNames(e,t){if(e&&this._nameField){const e=this.data||this._getParentData();if(e)return t.getFieldValues(e,this._nameField)}return this._names}}HichartPieSeries.PROP_PIE_SERIES_NAME_FIELD="nameField",HichartPieSeries.PROP_PIE_SERIES_NAMES="names",HichartPieSeries.PROP_PIE_SERIES_SIZE="size",HichartPieSeries.PROP_PIE_SERIES_INNER_SIZE="innerSize",HichartPieSeries.PROPINFOS=[{name:HichartPieSeries.PROP_PIE_SERIES_NAME_FIELD,category:PropCategory.SERIES,type:ListableProperty,multiple:!1,default:void 0},{name:HichartPieSeries.PROP_PIE_SERIES_NAMES,category:PropCategory.SERIES,type:StringArrayProperty,multiple:!1,default:void 0},{name:HichartPieSeries.PROP_PIE_SERIES_SIZE,category:PropCategory.SERIES,type:DimensionProperty,multiple:!0,default:void 0},{name:HichartPieSeries.PROP_PIE_SERIES_INNER_SIZE,category:PropCategory.SERIES,type:DimensionProperty,multiple:!0,default:void 0}],HichartPieSeries.$_ctor="HichartPieSeries";class HichartBubbleSeriesMarker extends HichartSeriesMarker{constructor(e){super(e),this._fillOpacity=.5,this._lineWidth=1}get fillOpacity(){return this._fillOpacity}set fillOpacity(e){if(e!==this._fillOpacity){const t=this._fillOpacity;this._fillOpacity=e,this._changed(HichartBubbleSeriesMarker.PROP_FILL_OPACITY,e,t)}}get lineColor(){return this._lineColor}set lineColor(e){if(e!==this._lineColor){const t=this._lineColor;this._lineColor=e,this._changed(HichartBubbleSeriesMarker.PROP_LINE_COLOR,e,t)}}get lineWidth(){return this._lineWidth}set lineWidth(e){if(e!==this._lineWidth){const t=this._lineWidth;this._lineWidth=e,this._changed(HichartBubbleSeriesMarker.PROP_LINE_WIDTH,e,t)}}_getEditProps(){return super._getEditProps().concat(HichartBubbleSeriesMarker.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartBubbleSeriesMarker.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartBubbleSeriesMarker.PROPINFOS)}}HichartBubbleSeriesMarker.PROP_FILL_OPACITY="fillOpacity",HichartBubbleSeriesMarker.PROP_LINE_COLOR="lineColor",HichartBubbleSeriesMarker.PROP_LINE_WIDTH="lineWidth",HichartBubbleSeriesMarker.PROPINFOS=[{name:HichartBubbleSeriesMarker.PROP_FILL_OPACITY,category:"marker",type:NumberProperty,multiple:!0,default:.5},{name:HichartBubbleSeriesMarker.PROP_LINE_COLOR,category:"marker",type:ColorProperty,multiple:!0,default:void 0},{name:HichartBubbleSeriesMarker.PROP_LINE_WIDTH,category:"marker",type:NumberProperty,multiple:!0,default:1}];class HichartBubbleSeries extends HichartSeries{constructor(e){super(e),this._xValues=[1,2,3,4,5],this._yValues=[1,2,3,4,5],this._marker=new HichartBubbleSeriesMarker(this),this.values=[3,4,7,9,4]}get xField(){return this._xField}set xField(e){if(e!==this._xField){const t=this._xField;this._xField=e,this._changed(HichartBubbleSeries.PROP_X_FIELD,e,t)}}get xValues(){return this._xValues}set xValues(e){if(e!==this._xValues){const t=this._xValues;this._xValues=null==e?void 0:e.slice(),this._changed(HichartBubbleSeries.PROP_X_VALUES,e,t)}}get yField(){return this._yField}set yField(e){if(e!==this._yField){const t=this._yField;this._yField=e,this._changed(HichartBubbleSeries.PROP_Y_FIELD,e,t)}}get yValues(){return this._yValues}set yValues(e){if(e!==this._yValues){const t=this._yValues;this._yValues=null==e?void 0:e.slice(),this._changed(HichartBubbleSeries.PROP_Y_VALUES,e,t)}}get marker(){return this._marker}get seriesType(){return"bubble"}_getEditProps(){return super._getEditProps().concat(HichartBubbleSeries.PROPINFOS)}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,HichartBubbleSeries.PROPINFOS),this._loadObjects([this._marker],e,t)}_doSave(e){super._doSave(e),this._savePropsOf(e,HichartBubbleSeries.PROPINFOS),this._saveObjects([this._marker],e)}getValues(e,t){const r=super.getValues(e,t),i=this._getValues("x",e,t),s=this._getValues("y",e,t),A=[];if(r&&i&&s){let e=0;for(let t of r)A.push({x:i[e],y:s[e],z:t}),e++}return A}getWrapper(e){super.getWrapper(e);const t=this._getPropsWrapper({});return t.marker=this._marker.getWrapper(),Utils.extend(e,t)}_getValues(e,t,r){const i=this["_"+e+"Field"];if(t&&i){const e=this.data||this._getParentData();if(e)return r.getFieldValues(e,i)}return this["_"+e+"Values"]}}HichartBubbleSeries.PROP_X_FIELD="xField",HichartBubbleSeries.PROP_X_VALUES="xValues",HichartBubbleSeries.PROP_Y_FIELD="yField",HichartBubbleSeries.PROP_Y_VALUES="yValues",HichartBubbleSeries.PROP_MARKER="marker",HichartBubbleSeries.PROPINFOS=[{name:HichartBubbleSeries.PROP_X_FIELD,category:PropCategory.SERIES,type:ListableProperty,multiple:!1,default:void 0},{name:HichartBubbleSeries.PROP_X_VALUES,category:PropCategory.SERIES,type:NumberArrayProperty,multiple:!1,default:void 0},{name:HichartBubbleSeries.PROP_Y_FIELD,category:PropCategory.SERIES,type:ListableProperty,multiple:!1,default:void 0},{name:HichartBubbleSeries.PROP_Y_VALUES,category:PropCategory.SERIES,type:NumberArrayProperty,multiple:!1,default:void 0},{name:HichartBubbleSeries.PROP_MARKER,category:"marker",indented:!0,type:ModelProperty,multiple:!1,default:void 0}],HichartBubbleSeries.$_ctor="HichartBubbleSeries";class ReportLoaderImpl extends Base{constructor(){super(),this._itemCreators={text:e=>new TextItem(e),summary:e=>new SummaryItem(e),image:e=>new ImageItem(e),check:e=>new CheckItem(e),stack:e=>new StackContainer(e),cbox:e=>new ColumnBoxContainer(e),rbox:e=>new RowBoxContainer(e),dbox:e=>new DiagonalBoxContainer(e),list:e=>new ListContainer(e),table:e=>new TableContainer(e),space:e=>new SpaceItem(e),simpleband:e=>new SimpleBand(e),tableband:e=>new TableBand(e),floating:e=>new FloatingContainer(e),shape:e=>new ShapeItem(e),barcode:e=>new BarcodeItem(e),qrcode:e=>new QrcodeItem(e),bar:e=>new BarItem(e),rating:e=>new RatingItem(e),template:e=>new TemplateItem(e),svg:e=>new SvgItem(e),chart:e=>new ChartItem(e),chartist:e=>new ChartItem(e),hichart:e=>new HichartItem(e),highchart:e=>new HichartItem(e)},this._hichartSeriesCreators={column:e=>new HichartColumnSeries(e),area:e=>new HichartAreaSeries(e),line:e=>new HichartLineSeries(e),pie:e=>new HichartPieSeries(e),bubble:e=>new HichartBubbleSeries(e)}}_doDispose(){super._doDispose()}createItem(e){const t="string"==typeof e?e:e.type,r=e.name,i=this._itemCreators[t];let s=i&&i(r);return!s&&(e.hasOwnProperty("text")||e.hasOwnProperty("value")||e.hasOwnProperty("title"))&&(s=new TextItem(r)),s}createHichartSeries(e,t){let r="string"==typeof t?t:t.type;const i=this._hichartSeriesCreators[r]||this._hichartSeriesCreators.column;return i&&i(e)}}class AddItemCommand extends EditCommand{constructor(e,t){super("Add Item"),assert(!!e),assert(!!t),assert(e!==t),this._parent=e,this._item=t}_doDispose(){this._parent=this._item=null}get parent(){return this._parent}get item(){return this._item}undo(){this._parent.remove(this._item)}redo(e){if(!this._parent.add(this._item))throw new EditCommandFailed("Item is not added.")}get source(){return this._item}}class Size{constructor(e=0,t=0){this.width=e,this.height=t}static empty(){return new Size}static create(e=0,t=0){return new Size(e,t)}get isEmpty(){return 0===this.width||0===this.height}clone(){return new Size(this.width,this.height)}equals(e){return e===this||e&&this.width===e.width&&this.height===e.height}setEmpty(){return this.width=this.height=0,this}set(e,t){return this.width=e,this.height=t,this}round(){const e=this.clone();return e.width>>>=0,e.height>>>=0,e}toString(){return"{width: "+this.width+", height: "+this.height+"}"}}Size.EMPTY=new Size;class SetPropCommand extends EditCommand{constructor(e,t,r){super("Set Property"),assert(!!e),assert(!!t),this._item=e,this._prop=t,this._childProp=e instanceof ReportItem&&e.isChildProp(t),this._newValue=r,this._oldValue=this._childProp?e.getChildProp(t):e[t]}_doDispose(){this._item=null}get item(){return this._item}get prop(){return this._prop}get childProp(){return this._childProp}get oldValue(){return this._oldValue}get newValue(){return this._newValue}undo(){this._childProp?this._item.setChildProp(this._prop,this._oldValue):this._item[this._prop]=this._oldValue}redo(e){this._childProp?this._item.setChildProp(this._prop,this._newValue):this._item[this._prop]=this._newValue}get description(){return"prop."+this._prop+": "+this._oldValue+" -> "+this._newValue}get source(){return this._item}}class UpdateDataBandFieldCommand extends EditCommand{constructor(e,t,r){super("Update Band Field"),assert(!!e),assert(!!r),this._data=e,this._index=t,this._field=r,this._oldField={...e.getField(t)}}_doDispose(){this._data=this._field=this._oldField=null}get data(){return this._data}get index(){return this._index}get field(){return this._field}get oldField(){return this._oldField}undo(){this._data.setField(this._index,this._oldField)}redo(e){this._data.setField(this._index,this._field)}get source(){return this._data}}class AddDataBandFieldCommand extends EditCommand{constructor(e,t,r){super("Add Band Field"),assert(!!e),assert(!!r),this._data=e,this._index=t,this._field=r}_doDispose(){this._data=this._field=null}get data(){return this._data}get index(){return this._index}get field(){return this._field}redo(e){this._data.addField(this._index,this._field)}undo(){this._data.removeField(this._field)}get source(){return this._data}}class RemoveBandDataFieldCommand extends EditCommand{constructor(e,t,r){super("Remove Band Field"),assert(!!e),assert(!!r),this._data=e,this._index=t,this._field=r}_doDispose(){this._data=this._field=null}get data(){return this._data}get index(){return this._index}get field(){return this._field}redo(e){this._data.removeField(this._field)}undo(){this._data.addField(this._index,this._field)}get source(){return this._data}}class DesignDataManager extends EventAware{constructor(e){super(),this._dataMap={},this._commands=e}_doDispose(){this._dataMap=null,this._contextData=null,super._doDispose()}get designTime(){return!0}preparePrint(e){this._contextData=new ContextData(e),this._contextData.preparePrint(e,!0);for(let t in this._dataMap){const r=this._dataMap[t];r instanceof ReportData&&r.preparePrint(e,!0)}}getAll(){const e=[];for(let t in this._dataMap)e.push(this._dataMap[t]);return e}getNames(){const e=[];for(let t in this._dataMap)e.push(t);return e}get(e){return this._dataMap[e]}getContextValue(e){return this._contextData.getValue(e)}getValue(e,t){if(e){const r=e.indexOf("::"),i=r>=0?e.substring(0,r):e,s=this._dataMap[i];if(s)return e=r>=0?e.substr(r+2):null,s instanceof BandData?s.getRowValue(t,e):s.getValue(e)}}getValueAt(e,t,r){const i=this._dataMap[e];if(i)return i instanceof BandData?i.getRowValue(r,t):i.getValue(t)}getFieldValues(e,t){const r=this._dataMap[e];if(r)return r instanceof BandData?r.getFieldValues(t):[r.getValue(t)]}addData(e){if(e)return this.$_register(null,e),this.$_fireDataAdded(e),!0}removeData(e){const t="string"==typeof e?e:e.name,r=this.get(t);if(r)return this.$_unregister(r),this.$_fireDataRemoved(r),r}dataNameChanged(e,t){this.fireEvent(DesignDataManager.NAME_CHANGED,e,t)}fieldNameChanged(e,t,r){this.fireEvent(DesignDataManager.FIELD_NAME_CHANGED,e,t,r)}load(e){if(!e)return this;for(let t in e){const r=e[t];if(r){const e=r.sample,i=r.fields;switch(r.type){case"array":this.$_register(t,new SimpleArrayData(t,i,e,r.sampleCount,this));break;case"band":this.$_register(t,new BandArrayData(t,i,e,r.sampleCount,this));break;default:e&&this.$_register(t,new SimpleData(t,e))}}}return this}save(e){for(let t in this._dataMap){const r=this._dataMap[t],i=r.getSaveValues(),s=e[t]={type:r.getSaveType()};i&&(s.sample=i),r instanceof BandData&&(s.fields=r.getSaveFields())}}getFieldIndex(e,t){const r=this._dataMap[e];return r instanceof BandData?r.getFieldIndex(t):-1}updateField(e,t,r){var i;null===(i=this._commands)||void 0===i||i.execute(new UpdateDataBandFieldCommand(e,t,r)),this.$_fireDataUpdated(e)}addField(e,t,r){var i;r&&e.indexOfField(r)<0&&(null===(i=this._commands)||void 0===i||i.execute(new AddDataBandFieldCommand(e,t,r)),this.$_fireDataUpdated(e))}removeField(e,t){var r;const i=e.indexOfField(t);i>=0&&(null===(r=this._commands)||void 0===r||r.execute(new RemoveBandDataFieldCommand(e,i,t)),this.$_fireDataUpdated(e))}renameData(e,t){delete this._dataMap[e.name],e.name=t,this._dataMap[t]=e}$_register(e,t){if(t&&(e=e||t.name)){if(this._dataMap[e])throw new Error("Data is already exists: "+e);return t._dp=this,this._dataMap[e]=t,t}}$_unregister(e){e&&e._dp===this&&(delete this._dataMap[e.name],e._dp=null)}$_fireDataAdded(e){this.fireEvent(DesignDataManager.DATA_ADDED,e)}$_fireDataRemoved(e){this.fireEvent(DesignDataManager.DATA_REMOVED,e)}$_fireDataUpdated(e){this.fireEvent(DesignDataManager.DATA_UPDATED,e)}}DesignDataManager.DATA_ADDED="onDesignDataManagerDataAdded",DesignDataManager.DATA_REMOVED="onDesignDataManagerDataRemoved",DesignDataManager.DATA_UPDATED="onDesignDataManagerDataUpdated",DesignDataManager.NAME_CHANGED="onDesignDataManagerNameChanged",DesignDataManager.FIELD_NAME_CHANGED="onDesignDataManagerFieldNameChanged";class AddAssetCommand extends EditCommand{constructor(e,t,r){super("Add Asset"),assert(!!e),assert(!!r),this._manager=e,this._group=t||e.root,this._item=r}_doDispose(){this._group=this._item=null}get manager(){return this._manager}get group(){return this._group}get item(){return this._item}undo(){this._manager.remove(this._item)}redo(e){this._manager.add(this._group,this._item)}get source(){return this._item}}class RemoveAssetCommand extends EditCommand{constructor(e,t){super("Remove Asset"),assert(!!e),assert(!!t),this._manager=e,this._group=t.parent,this._item=t}_doDispose(){this._group=this._item=null}get manager(){return this._manager}get group(){return this._group}get item(){return this._item}undo(){this._manager.add(this._group,this._item)}redo(e){this._manager.remove(this._item)}get source(){return this._group}}class RenameDataCommand extends EditCommand{constructor(e,t,r){super("Set Property"),assert(!!e),assert(!!t),assert(!!r),this._dm=e,this._data=t,this._oldName=t.name,this._newName=r}_doDispose(){this._dm=null,this._data=null}get data(){return this._data}get oldName(){return this._oldName}get newName(){return this._newName}undo(){this._dm.renameData(this._data,this._oldName)}redo(e){this._dm.renameData(this._data,this._newName)}get description(){return"rename data: "+this._oldName+" -> "+this._newName}get source(){return this._data}}class AddDataCommand extends EditCommand{constructor(e,t){super("Add Data"),assert(!!e),assert(!!t),this._dm=e,this._data=t}_doDispose(){this._dm=null,this._data=null}get data(){return this._data}undo(){this._dm.removeData(this._data)}redo(e){this._dm.addData(this._data)}get description(){return"Add data: "+this._data.name}get source(){return this._data}}class RemoveDataCommand extends EditCommand{constructor(e,t){super("Remove Data"),assert(!!e),assert(!!t),this._dm=e,this._data=t}_doDispose(){this._dm=null,this._data=null}get data(){return this._data}undo(){this._dm.addData(this._data)}redo(e){this._dm.removeData(this._data)}get description(){return"Remove data: "+this._data.name}get source(){return this._data}}class SaveSimpleDataCommand extends EditCommand{constructor(e,t){super("Save Simple Data"),assert(!!e),assert(!!t),this._data=e,this._values=t}_doDispose(){this._data=null,this._values=null}get data(){return this._data}undo(){this._data.setSample(this._oldValues)}redo(e){this._data.setSample(this._values)}get description(){return"Save simple data: "+this._data.name}get source(){return this._data}}class SetStyleCommand extends EditCommand{constructor(e,t,r){super("Set Style"),assert(!!e),assert(!!t),this._item=e,this._style=t,this._newValue=r,this._oldValue=this._item.getStyle(t)}_doDispose(){this._item=null}get item(){return this._item}get style(){return this._style}get oldValue(){return this._oldValue}get newValue(){return this._newValue}undo(){this._item.setStyle(this._style,this._oldValue)}redo(e){this._item.setStyle(this._style,this._newValue)}get description(){return"style."+this._style+": "+this._oldValue+" -> "+this._newValue}get source(){return this._item}}class MoveItemCommand extends EditCommand{constructor(e,t,r,i=!1){super("Move Item"),assert(!!e),this._item=e,this._oldLeft=e.left,this._oldRight=e.right,this._oldTop=e.top,this._oldBottom=e.bottom,this._newLeft=t,this._newTop=r,this._persistant=i}static createCommands(e,t){if(e&&e.length>0){const r=[];return e.forEach(((e,i)=>{r.push(new MoveItemCommand(e,t[i].x,t[i].y))})),r.length>0?r:null}}_doDispose(){this._item=null}redo(e){this._item.setChildProp("left",this._newLeft),!this._persistant&&this._item.setChildProp("right",void 0),this._item.setChildProp("top",this._newTop),!this._persistant&&this._item.setChildProp("bottom",void 0)}undo(){this._item.setChildProp("left",this._oldLeft),!this._persistant&&this._item.setChildProp("right",this._oldRight),this._item.setChildProp("top",this._oldTop),!this._persistant&&this._item.setChildProp("bottom",this._oldBottom)}get description(){return"Move item: "+this._item.designText}get source(){return this._item}}class MoveItemDirCommand extends EditCommand{constructor(e,t,r){super("Move Item One Way"),assert(!!e),this._item=e,this._dir=t,this._old=e[t],this._new=r}static createCommands(e,t,r){if(e&&e.length>0){const i=[];return e.forEach(((e,s)=>{i.push(new MoveItemDirCommand(e,t,r[s]))})),i.length>0?i:null}}_doDispose(){this._item=null}redo(e){this._item.setChildProp(this._dir,this._new)}undo(){this._item.setChildProp(this._dir,this._old)}get description(){return"Move item One Way: "+this._item.designText}get source(){return this._item}}class ResizeItemCommand extends EditCommand{constructor(e,t,r,i,s,A,n){super("Resize Item"),assert(!!e),this._item=e,this._saveWidth=t,this._saveHeight=r,this._oldWidth=i,this._oldHeight=s,this._dx=A,this._dy=n}_doDispose(){this._item=null}redo(e){this._dx&&(this._item.width=this._oldWidth+this._dx),this._dy&&(this._item.height=this._oldHeight+this._dy)}undo(){this._dx&&(this._item.width=this._saveWidth),this._dy&&(this._item.height=this._saveHeight)}get description(){return"Resize item: "+this._item.designText}get source(){return this._item}}class ResizeAndMoveCommand extends EditCommandGroup{static createCommand(e,t,r,i,s,A,n,o,a){return[new ResizeItemCommand(e,t,r,i,s,A,n),new MoveItemCommand(e,o,a,!0)]}constructor(e,t,r,i,s,A,n,o,a){super("Resize and Move Item",ResizeAndMoveCommand.createCommand(e,t,r,i,s,A,n,o,a))}}class SetPropsCommand extends EditCommand{constructor(e,t){super("Set Properties"),assert(!!e),assert(!!t),this._item=e,this._props={...t},this._oldProps=e.getProperties(t)}_doDispose(){this._item=null,this._props=null}get item(){return this._item}get props(){return this._props}redo(e){this._item.setProperties(this._props)}undo(){this._item.setProperties(this._oldProps)}get source(){return this._item}}class SetChildStyleCommand extends EditCommand{constructor(e,t,r,i){super("Set Child Style"),assert(!!e),assert(!!t),assert(!!r),this._item=e,this._prop=t,this._style=r,this._newValue=i,this._oldValue=this._item._getSubStyle(t,r)}_doDispose(){this._item=null}get item(){return this._item}get prop(){return this._prop}get style(){return this._style}get oldValue(){return this._oldValue}get newValue(){return this._newValue}undo(){this._item._setSubStyle(this._prop,this._style,this._oldValue)}redo(e){this._item._setSubStyle(this._prop,this._style,this._newValue)}get description(){return this._prop+".style."+this._style+": "+this._oldValue+" -> "+this._newValue}get source(){return this._item}}class AddTableBandGroupCommand extends EditCommand{constructor(e,t,r){super("Add Table Band Group"),assert(!!e),this._band=e,this._index=Math.max(0,e.groups.count),this._config=r}_doDispose(){this._band=null}get band(){return this._band}get index(){return this._index}redo(e){this._group=this._band.groups.add(this._config,this._index)}undo(){this._band.groups.remove(this._group)}get source(){return this._band}}class ChangeChildIndexCommand extends EditCommand{constructor(e,t){super("Change child index"),assert(!!e),this._item=e,this._newIndex=t,this._oldIndex=e.index}_doDispose(){this._item=null}redo(e){this._item.parent.changeChildIndex(this._item,this._newIndex)}undo(){this._item.parent.changeChildIndex(this._item,this._oldIndex)}get description(){return"Change child index: "+this._item.designText}get source(){return this._item}}class SetItemsPropCommand extends EditCommand{constructor(e,t,r){super("Set Items Property"),assert(!!e&&e.length>0),assert(!!t),this._items=e.slice(),this._prop=t,this._childProps=[],this._oldValues=[],this._newValue=r,this._items.forEach((e=>{const r=e instanceof ReportItem&&e.isChildProp(t);this._childProps.push(r),this._oldValues.push(r?e.getChildProp(t):e[t])}))}_doDispose(){this._items=null}get items(){return this._items.slice()}get prop(){return this._prop}get newValue(){return this._newValue}undo(){this._items.forEach(((e,t)=>{this._childProps[t]?e.setChildProp(this._prop,this._oldValues[t]):Utils.hasSetter(e,this._prop)&&(e[this._prop]=this._oldValues[t])}))}redo(e){this._items.forEach(((e,t)=>{this._childProps[t]?e.setChildProp(this._prop,this._newValue):Utils.hasSetter(e,this._prop)&&(e[this._prop]=this._newValue)}))}get description(){return"prop."+this._prop+", "+this._newValue}get source(){return this._items.slice()}}class SetItemsStyleCommand extends EditCommand{constructor(e,t,r){super("Set Items Style"),assert(!!e&&e.length>0),assert(!!t),this._items=e.slice(),this._style=t,this._newValue=r,this._oldValues=[],this._items.forEach((e=>{this._oldValues.push(e.getStyle(t))}))}_doDispose(){this._items=null}get items(){return this._items.slice()}get style(){return this._style}get newValue(){return this._newValue}undo(){this._items.forEach(((e,t)=>{e.setStyle(this._style,this._oldValues[t])}))}redo(e){this._items.forEach(((e,t)=>{e.setStyle(this._style,this._newValue)}))}get description(){return"style."+this._style+": "+this._newValue}get source(){return this._items.slice()}}class SetItemsChildStyleCommand extends EditCommand{constructor(e,t,r,i){super("Set Child Style"),assert(!!e&&e.length>0),assert(!!t),assert(!!r),this._items=e.slice(),this._prop=t,this._style=r,this._newValue=i,this._oldValues=[],this._items.forEach((e=>{this._oldValues.push(e._getSubStyle(t,r))}))}_doDispose(){this._items=null}get items(){return this._items.slice()}get prop(){return this._prop}get style(){return this._style}get newValue(){return this._newValue}undo(){this._items.forEach(((e,t)=>{e._setSubStyle(this._prop,this._style,this._oldValues[t])}))}redo(e){this._items.forEach((e=>{e._setSubStyle(this._prop,this._style,this._newValue)}))}get description(){return this._prop+".style."+this._style+": "+this._newValue}get source(){return this._items.slice()}}class SetItemsPropsCommand extends EditCommand{constructor(e,t){super("Set Items Properties"),assert(!!e&&e.length),assert(!!t),this._items=e.slice(),this._props={...t},this._oldProps=[],this._items.forEach((e=>{this._oldProps.push(e.getProperties(t))}))}_doDispose(){this._items=null,this._props=null}get items(){return this._items.slice()}get props(){return this._props}redo(e){this._items.forEach(((e,t)=>{e.setProperties(this._props)}))}undo(){this._items.forEach(((e,t)=>{e.setProperties(this._oldProps[t])}))}get source(){return this._items.slice()}}class AddSimpleBandGroupCommand extends EditCommand{constructor(e,t,r){super("Add Simple Band Group"),assert(!!e),this._band=e,this._index=Math.max(0,e.groups.count),this._config=r}_doDispose(){this._band=null}get band(){return this._band}get index(){return this._index}redo(e){this._group=this._band.groups.add(this._config,this._index)}undo(){this._band.groups.remove(this._group)}get source(){return this._band}}class ResizeSpaceCommand extends EditCommand{constructor(e,t,r,i){super("Resize Space Item"),assert(!!e),this._item=e,this._orgSize=t,this._oldSize=r,this._delta=i}_doDispose(){this._item=null}redo(e){this._item.size=this._oldSize+this._delta}undo(){this._item.size=this._orgSize}get description(){return"Resize space item"}get source(){return this._item}}!function(e){e.A0="A0",e.A1="A1",e.A2="A2",e.A3="A3",e.A4="A4",e.A5="A5",e.A6="A6",e.A7="A7",e.A8="A8"}(PaperSize||(PaperSize={}));const PaperSizeMap={A0:{w:841,h:1189},A1:{w:594,h:841},A2:{w:420,h:594},A3:{w:297,h:420},A4:{w:210,h:297},A5:{w:148,h:210},A6:{w:105,h:148},A7:{w:74,h:105},A8:{w:52,h:74}};var PaperOrientation;!function(e){e.PORTRAIT="portrait",e.LANDSCAPE="landscape"}(PaperOrientation||(PaperOrientation={}));class PaperOptions extends Base{constructor(e){super(),this._orientation=PaperOrientation.PORTRAIT,this._size=PaperSize.A4,this._width="210mm",this._height="297mm",this._marginLeft="12mm",this._marginRight="12mm",this._marginTop="15mm",this._marginBottom="15mm",this._widthDim=new Dimension(this._width),this._heightDim=new Dimension(this._height),this._marginLeftDim=new Dimension(this._marginLeft),this._marginRightDim=new Dimension(this._marginRight),this._marginTopDim=new Dimension(this._marginTop),this._marginBottomDim=new Dimension(this._marginBottom),this._report=e}_doDispose(){super._doDispose()}get orientation(){return this._orientation}set orientation(e){e!==this._orientation&&(this._orientation=e,this._changed())}get size(){return this._size}set size(e){e!=this._size&&(this._size=e,this._changed())}get width(){return this._width}set width(e){e!=this._width&&(this._width=e,this._widthDim=new Dimension(e),this._changed())}get height(){return this._height}set height(e){e!=this._height&&(this._height=e,this._heightDim=new Dimension(e),this._changed())}get marginLeft(){return this._marginLeft}set marginLeft(e){e!=this._marginLeft&&(this._marginLeft=e,this._marginLeftDim=new Dimension(e),this._changed())}get marginRight(){return this._marginRight}set marginRight(e){e!=this._marginRight&&(this._marginRight=e,this._marginRightDim=new Dimension(e),this._changed())}get marginTop(){return this._marginTop}set marginTop(e){e!=this._marginTop&&(this._marginTop=e,this._marginTopDim=new Dimension(e),this._changed())}get marginBottom(){return this._marginBottom}set marginBottom(e){e!=this._marginBottom&&(this._marginBottom=e,this._marginBottomDim=new Dimension(e),this._changed())}load(e){}getPageSize(){let e=NaN,t=NaN;if(this._size){const r=PaperSizeMap[this._size];r&&(e=getPixelsByUnits(PrintUnit.MILLI,r.w),t=getPixelsByUnits(PrintUnit.MILLI,r.h))}return isNaN(e)&&(e=this._widthDim.getFixedPixel(),t=this._heightDim.getFixedPixel()),this._orientation===PaperOrientation.LANDSCAPE?new Size(t,e):new Size(e,t)}getContentRect(e){return e.topBy(this._marginTopDim.getFixedPixel()),e.bottomBy(-this._marginBottomDim.getFixedPixel()),e.leftBy(this._marginLeftDim.getFixedPixel()),e.rightBy(-this._marginRightDim.getFixedPixel()),e}getClientRect(){const e=this.getPageSize();return new Rectangle(0,0,e.width-this._marginLeftDim.getFixedPixel()-this._marginRightDim.getFixedPixel(),e.height-this._marginTopDim.getFixedPixel()-this._marginBottomDim.getFixedPixel()).round()}applyExtents(e){const t=this.getPageSize(),r=this._marginLeftDim.getFixedPixel(),i=this._marginRightDim.getFixedPixel(),s=this._marginTopDim.getFixedPixel(),A=this._marginBottomDim.getFixedPixel();e.width=t.width-r-i+"px",e.height=t.height-s-A+"px"}applyPreviewExtents(e){const t=this.getPageSize();e.width=t.width+"px",e.height=t.height+"px"}applyClient(e){const t=this.getPageSize(),r=this._marginLeftDim.getFixedPixel(),i=this._marginRightDim.getFixedPixel(),s=this._marginTopDim.getFixedPixel(),A=this._marginBottomDim.getFixedPixel();e.width=t.width-r-i+"px",e.height=t.height-s-A+"px",e.left="0",e.top="0"}applyPreviewClient(e){const t=this.getPageSize(),r=this._marginLeftDim.getFixedPixel(),i=this._marginRightDim.getFixedPixel(),s=this._marginTopDim.getFixedPixel(),A=this._marginBottomDim.getFixedPixel();e.width=t.width-r-i+"px",e.height=t.height-s-A+"px",e.left=r+"px",e.top=s+"px",Utils.extend(e,this._report.page.styles)}_changed(){this._report&&this._report._firePaperChanged()}}class ReportInfo extends Base{constructor(e){super(),this.paper=new PaperOptions(e)}}class ReportRootItem extends ReportGroupItem{constructor(e){super("reportRoot"),this._report=e}get report(){return this._report}get name(){return this._report.info.name}set name(e){const t=this.name;e!=t&&(this._report.info.name=e,this._changed(ReportRootItem.PROP_NAME,e,t))}get author(){return this._report.info.author}set author(e){this._report.info.author=e}get version(){return this._report.info.version}set version(e){this._report.info.version=e}get description(){return this._report.info.description}set description(e){this._report.info.description=e}get paperOrientation(){return this._report.info.paper.orientation}set paperOrientation(e){this._report.info.paper.orientation=e}get paperSize(){return this._report.info.paper.size}set paperSize(e){this._report.info.paper.size=e}get paperWidth(){return this._report.info.paper.width}set paperWidth(e){this._report.info.paper.width=e}get paperHeight(){return this._report.info.paper.height}set paperHeight(e){this._report.info.paper.height=e}get marginLeft(){return this._report.info.paper.marginLeft}set marginLeft(e){this._report.info.paper.marginLeft=e}get marginRight(){return this._report.info.paper.marginRight}set marginRight(e){this._report.info.paper.marginRight=e}get marginTop(){return this._report.info.paper.marginTop}set marginTop(e){this._report.info.paper.marginTop=e}get marginBottom(){return this._report.info.paper.marginBottom}set marginBottom(e){this._report.info.paper.marginBottom=e}get pathLabel(){return"report"}get displayPath(){return"report"}_ignoreItems(){return!0}getEditProps(){return ReportRootItem.PROPINFOS}getStyleProps(){return[]}canResize(e){return!1}_doLoad(e,t){super._doLoad(e,t),this._loadPropsOf(t,ReportRootItem.PROPINFOS)}_doSave(e){super._doSave(e),this._savePropsOf(e,ReportRootItem.PROPINFOS)}}ReportRootItem.PROP_REPORT_NAME="name",ReportRootItem.PROP_REPORT_AUTHOR="author",ReportRootItem.PROP_REPORT_VERSION="version",ReportRootItem.PROP_REPORT_DESCRIPTION="description",ReportRootItem.PROP_PAPER_ORIENTATION="paperOrientation",ReportRootItem.PROP_PAPER_SIZE="paperSize",ReportRootItem.PROP_PAPER_WIDTH="paperWidth",ReportRootItem.PROP_PAPER_HEIGHT="paperHeight",ReportRootItem.PROP_MARGIN_LEFT="marginLeft",ReportRootItem.PROP_MARGIN_RIGHT="marginRight",ReportRootItem.PROP_MARGIN_TOP="marginTop",ReportRootItem.PROP_MARGIN_BOTTOM="marginBottom",ReportRootItem.PROPINFOS=[{name:ReportRootItem.PROP_REPORT_NAME,category:PropCategory.REPORT,type:StringProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_REPORT_AUTHOR,category:PropCategory.REPORT,type:StringProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_REPORT_VERSION,category:PropCategory.REPORT,type:StringProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_REPORT_DESCRIPTION,category:PropCategory.REPORT,type:StringProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_PAPER_ORIENTATION,category:PropCategory.PAPER,type:EnumProperty,multiple:!1,default:PaperOrientation.PORTRAIT,domain:PaperOrientation},{name:ReportRootItem.PROP_PAPER_SIZE,category:PropCategory.PAPER,type:EnumProperty,multiple:!1,default:void 0,domain:PaperSize},{name:ReportRootItem.PROP_PAPER_WIDTH,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_PAPER_HEIGHT,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_MARGIN_LEFT,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_MARGIN_RIGHT,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_MARGIN_TOP,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0},{name:ReportRootItem.PROP_MARGIN_BOTTOM,category:PropCategory.PAPER,type:DimensionProperty,multiple:!1,default:void 0}],ReportRootItem.$_ctor="ReportRootItem";class Report extends EventAware{constructor(e,t){super(),this._unit=PrintUnit.MILLI,this._assetRoot="",this._loader=new ReportLoaderImpl,this._loading=!1,this._invalids=[],this._designTime=e,this._commands=new EditCommandStack(this),this._info=new ReportInfo(this),this._page=new ReportPage(this),this._page.addListener(this),this._root=new ReportRootItem(this),this._root.add(this._page),this._assets=new AssetManager,this._designData=new DesignDataManager(this._commands),e&&(this._data=this._designData,this._designData.addListener(this)),t&&this.load(t)}static isReportSource(e){return e&&Utils.isObject(e.page)}_doDispose(){this._designData.removeListener(this),this._designData=this._designData.dispose(),super._doDispose()}onDesignDataManagerDataAdded(e,t){this.fireEvent(Report.DATA_ADDED,t),this.$_refreshInvalids()}onDesignDataManagerDataRemoved(e,t){this.fireEvent(Report.DATA_REMOVED,t),this.$_refreshInvalids()}onDesignDataManagerDataUpdated(e,t){this.fireEvent(Report.DATA_UPDATED,t),this.$_refreshInvalids()}onDesignDataManagerNameChanged(e,t,r){this._page.$_dataNameChanged(t,r),this.fireEvent(Report.DATA_NAME_CHANGED,t,r),this.$_refreshInvalids()}onDesignDataManagerFieldNameChanged(e,t,r,i){this._page.$_dataFieldNameChanged(t,r,i),this.fireEvent(Report.DATA_FIELD_NAME_CHANGED,t,r,i),this.$_refreshInvalids()}editCommandStackChanged(e,t,r,i){this.fireEvent(Report.COMMANDS_STACK_CHANGED,t,r,i),this.$_refreshInvalids()}editCommandStackDirtyChanged(e){this.fireEvent(Report.DIRTY_CHANGED)}get loader(){return this._loader}get info(){return this._info}get paper(){return this._info.paper}get unit(){return this._unit}set unit(e){e!=this._unit&&(this._unit=e)}get assetRoot(){return this._assetRoot}set assetRoot(e){this._assetRoot=e,this._assetRoot.endsWith("/")||(this._assetRoot+="/")}get root(){return this._root}get page(){return this._page}set page(e){this._page=e}get assets(){return this._assets}get data(){return this._data}get designData(){return this._designData}get canUndo(){return this._commands.canUndo}get canRedo(){return this._commands.canRedo}get dirty(){return this._commands.dirty}load(e){if(e){this._loading=!0;try{return this._root.load(this._loader,e),e.report&&this._root.load(this._loader,e.report),e.page&&this._page.load(this._loader,e.page),e.assets&&this._assets.load(e.assets),e.data&&this._designData.load(e.data),this._fireReset(),this}finally{this._loading=!1}}}setSaveTagging(e){return this._page.saveTag=e,this}save(e=!1){const t={report:{},page:{}};return this._root.save(t.report),this._page.save(t.page),e||(this._assets.save(t.assets={}),this._data instanceof DesignDataManager&&this._data.save(t.data={})),this._page.saveTag=null,t}prepareLayout(){this._page.prepareLayout(!1)}preparePrint(e){this._page.preparePrint(e),this.models={}}getImageUrl(e){if(e)return this._assetRoot.indexOf(":")>=0?this._assetRoot+e:e}clearHistory(){this._commands.flush()}closeHistory(){this._commands.close()}undo(){return this._commands.undo()}redo(){return this._commands.redo()}execute(e){return e&&this._commands.execute(e)}getEditHistory(e=!1){return this._commands.getHistory(e)}getCommand(e){return this._commands.get(e)}itemByName(e){return this._page.getItem(e)}defaultInit(e,t,r,i){e.defaultInit(this._loader,t,r,i)}addItem(e,t,r=-1){if(e&&t){if(!this._fireItemAdd(e,t,r))return!1;if(e.contains(t))throw new Error("Item is already contained in this group item.");if(t.outlineParent)throw new Error("Item is already contained in other group item.");if(t instanceof DataBand&&!e.canContainsBand())throw new Error("데이타밴드를 추가할 수 없는 영역입니다.");if(!(r>=0&&r<e.count))return this.execute(new AddItemCommand(e,t)),t.parent instanceof CellGroup?t.parent.parent===e:t.parent===e}}addTableRow(e,t){t<0&&(t=e.rowCount),this.execute(new AddTableRowCommand(e,t))}moveTableRows(e,t,r,i,s=!1){}moveTableRowsToNearest(e,t,r,i,s=!1){try{const A=e.getNearestMovableRow(t,r,i);A>=0&&e.canMoveRows(t,r,A,s)&&this.execute(new MoveTableRowsCommand(e,t,r,A,!0))}catch(t){if(!(t instanceof AlertError))throw t;this._fireAlert(e,t.message)}}addTableColumn(e,t){e instanceof TableBand?this.execute(new AddTableBandColumnCommand(e,t)):e instanceof TableContainer&&this.execute(new AddTableColumnCommand(e,t))}moveTableColumns(e,t,r,i){}moveTableColumnsToNearest(e,t,r,i){try{if(e instanceof TableBand){const s=e.getNearestMovableColumn(t,r,i);s>=0&&s!==t&&e.canMoveColumns(t,r,s,!0)&&this.execute(new MoveTableBandColumnsCommand(e,t,r,s,!0))}else if(e instanceof TableContainer){const s=e.getNearestMovableColumn(t,r,i);s>=0&&s!==t&&e.canMoveColumns(t,r,s,!0)&&this.execute(new MoveTableColumnsCommand(e,t,r,s,!0))}}catch(t){if(!(t instanceof AlertError))throw t;this._fireAlert(e,t.message)}}removeItem(e){e&&this.removeItems([e])}removeItems(e){e&&e.length>0&&this._page.removeItems(this._commands,e)}setItemProperty(e,t,r){if(e){if(e.isChildProp(t)&&!e.parent.canChangeChildProp(e,t,r))return;e instanceof TableBand&&"colCount"===t?this.execute(new ChangeTableBandColCountCommand(e,r)):e instanceof TableContainer&&"colCount"===t?this.execute(new ChangeTableColCountCommand(e,r)):e instanceof TableBase&&"rowCount"===t?this.execute(new ChangeTableRowCountCommand(e,r)):t&&this.execute(new SetPropCommand(e,t,r))}}setItemProperties(e,t){e instanceof ReportItem&&t&&this.execute(new SetPropsCommand(e,t))}setItemsProperties(e,t){e&&e.length&&t&&this.execute(new SetItemsPropsCommand(e,t))}resetItemProperty(e,t){if(e instanceof ReportItem&&t){let r=!1;if(e.isChildProp(t.name)?e.getChildProp(t.name)!==t.default&&(r=!0):e[t.name]!==t.default&&(r=!0),r)return this.execute(new SetPropCommand(e,t.name,t.default)),!0}}setItemsProperty(e,t,r){e&&e.length&&t&&this.execute(new SetItemsPropCommand(e,t,r))}setItemStyle(e,t,r){e&&t&&this.execute(new SetStyleCommand(e,t,r))}setItemsStyle(e,t,r){e&&e.length&&t&&this.execute(new SetItemsStyleCommand(e,t,r))}setChildStyleProperty(e,t,r,i){e&&t&&this.execute(new SetChildStyleCommand(e,t,r,i))}setItemsChildStyleProperty(e,t,r,i){e&&e.length&&t&&this.execute(new SetItemsChildStyleCommand(e,t,r,i))}addTableBandColumn(e,t,r=-1){e&&this.execute(new AddTableBandColumnCommand(e,r,t))}addTableBandGroup(e,t,r=-1){e&&this.execute(new AddTableBandGroupCommand(e,r,t))}addSimpleBandGroup(e,t,r=-1){e&&this.execute(new AddSimpleBandGroupCommand(e,r,t))}canMergeSelection(e){return e instanceof TableSelection&&!e.isSingle(!0)}mergeSelection(e){if(this.canMergeSelection(e)){const t=new MergeTableSelectionCommand(e);this.execute(t),this._fireCellMerged(e.table.getCell(t.bounds.r1,t.bounds.c1))}}canUnmergeCell(e){return!e.isSingle}unmergeCell(e){this.canUnmergeCell(e)&&this.execute(new UnmergeTableCellsCommand(e))}search(e,t){const r=[];return this._page.search(e,t,r),r.length>0?r:null}applyDropResult(e,t){if(e&&t)return t.type===DropResultType.PROP?this.execute(new SetPropCommand(e,t.prop,t.value)):void 0}addAsset(e,t){if(t){const r="string"==typeof e?this._assets.findGroup(e):e;this.execute(new AddAssetCommand(this._assets,r,t))}}removeAsset(e){e&&this.execute(new RemoveAssetCommand(this._assets,e))}renameData(e,t){if(this._data instanceof DesignDataManager&&e&&t&&e.name!=t)return this.execute(new RenameDataCommand(this._data,e,t)),!0}addData(e){if(this._data instanceof DesignDataManager)return this.execute(new AddDataCommand(this._data,e)),!0}removeData(e){if(this._data instanceof DesignDataManager)return"string"==typeof e&&(e=this._data.get(e)),e&&this.execute(new RemoveDataCommand(this._data,e)),!0}saveSimpleData(e,t){e&&t&&this.execute(new SaveSimpleDataCommand(e,t))}saveItems(e){if(e&&e.length>0){if(e.length>1)for(let t=(e=e.sort(((e,t)=>e.level-t.level))).length-1;t>=0;t--){const r=e[t].parent;for(let i=t+1;i>=0;i--)if(e[i]===r){e.splice(i,1);break}}const t=[];for(let r of e){const e={};r.save(e)&&t.push(e)}return JSON.stringify(t)}}pasteItems(e,t){let r;t instanceof TableCell&&(r=t,t=t.table);let i=(t instanceof ReportGroupItem?t:null==t?void 0:t.parent)||this.page.body._bodyItems;if(i){const t=JSON.parse(e),s=[];for(let e of t){const t=this._loader.createItem(e);if(t){if(i instanceof TableBase){i.noPrepareCell=!0;try{i._loadChild(this._loader,t,e),t.setChildProp("row",r.row),t.setChildProp("col",r.col)}finally{i.noPrepareCell=!1}}else i._loadChild(this._loader,t,e);this.addItem(i,t)&&s.push(t)}}return s}}moveItem(e,t,r){e&&this.execute(new MoveItemCommand(e,t,r))}moveItemDir(e,t,r){e&&this.execute(new MoveItemDirCommand(e,t,r))}resizeItem(e,t,r,i,s,A,n){e&&this.execute(new ResizeItemCommand(e,t,r,i,s,A,n))}resizeSpace(e,t,r,i){e&&this.execute(new ResizeSpaceCommand(e,t,r,i))}resizeAndMove(e,t,r,i,s,A,n,o,a){e&&this.execute(new ResizeAndMoveCommand(e,t,r,i,s,A,n,o,a))}alignItem(e,t){if(e instanceof TableColumn||e instanceof TableCell)this.setItemStyle(e,"cellAlign",t);else if(e instanceof ReportItem)if(e.parent instanceof CellGroup){const r=e.parent.parent.getCell(e.row,e.col);this.execute(new SetStyleCommand(r,"cellAlign",t))}else if(e.parent.canAlign(e))switch(t){case"left":this.setItemProperties(e,{left:0,right:void 0});break;case"right":this.setItemProperties(e,{left:void 0,right:0});break;case"top":this.setItemProperties(e,{top:0,bottom:void 0});break;case"bottom":this.setItemProperties(e,{top:void 0,bottom:0});break;case"center":this.setItemProperties(e,{left:void 0,right:void 0,top:void 0,bottom:void 0})}}alignItems(e,t){const r=[];e.forEach((e=>{if(e instanceof TableCell||e instanceof TableColumn)r.push(new SetStyleCommand(e,"cellAlign",t));else if(e instanceof ReportItem)if(e.parent instanceof CellGroup){const i=e.parent.parent.getCell(e.row,e.col);r.push(new SetStyleCommand(i,"cellAlign",t))}else if(e.parent.canAlign(e))switch(t){case"left":r.push(new SetPropsCommand(e,{left:0,right:void 0}));break;case"right":r.push(new SetPropsCommand(e,{left:void 0,right:0}));break;case"top":r.push(new SetPropsCommand(e,{top:0,bottom:void 0}));break;case"bottom":r.push(new SetPropsCommand(e,{top:void 0,bottom:0}));break;case"center":r.push(new SetPropsCommand(e,{left:void 0,right:void 0,top:void 0,bottom:void 0}))}})),r.length>0&&this.execute(new EditCommandGroup("alignItems",r))}changeItemIndex(e,t){if(t=Math.max(0,Math.min(e.parent.count-1,t)),e&&e.index!==t)return this.execute(new ChangeChildIndexCommand(e,t)),!0}clearTexts(e){const t=[];e.forEach((e=>{(e instanceof TextItem&&e.text||e instanceof CheckItem&&e.text)&&t.push(new SetPropCommand(e,"text",void 0))})),t.length&&this.execute(new EditCommandGroup("",t))}adjustColumnWidths(e,t,r,i){this.execute(new AdjustColumnWidthsCommand(e,t,r,i))}adjustRowHeights(e,t,r,i){this.execute(new AdjustRowHeightsCommand(e,t,r,i))}getInvalids(){return this._invalids}$_refreshInvalids(){this._page.collectInvalids(this,this._invalids=[])}onPageItemAdded(e,t,r,i){this._loading||this.fireEvent(Report.ITEM_ADDED,t,r,i)}onPageItemsAdded(e,t,r){this._loading||this.fireEvent(Report.ITEMS_ADDED,t,r)}onPageItemRemoved(e,t,r){this.fireEvent(Report.ITEM_REMOVED,t,r)}onPageItemsRemoved(e,t){this.fireEvent(Report.ITEMS_REMOVED,t)}onPageItemChanged(e,t,r,i,s){this.fireEvent(Report.ITEM_CHANGED,t,r,i,s)}_fireReset(){this.fireEvent(Report.RESET)}_firePaperChanged(){this.fireEvent(Report.PAPER_CHANGED)}_fireItemAdd(e,t,r){return this.fireConfirmEvent(Report.ITEM_ADD,e,t,r)}_fireItemMoved(e,t){this.fireEvent(Report.ITEM_MOVED,e)}_fireCellMerged(e){this.fireEvent(Report.CELL_MERGED,e)}_fireAlert(e,t){this.fireEvent(Report.ALERT,e,t)}}Report.RESET="onReportReset",Report.PAPER_CHANGED="onReportPaperChanged",Report.ITEM_ADD="onReportItemAdd",Report.ITEM_ADDED="onReportItemAdded",Report.ITEMS_ADDED="onReportItemsAdded",Report.ITEM_REMOVED="onReportItemRemoved",Report.ITEMS_REMOVED="onReportItemsRemoved",Report.ITEM_CHANGED="onReportItemChanged",Report.ITEM_MOVED="onReportItemMoved",Report.COMMANDS_STACK_CHANGED="onReportCommandStackChanged",Report.DIRTY_CHANGED="onReportDirtyChanged",Report.DATA_ADDED="onReportDataAdded",Report.DATA_REMOVED="onReportDataRemoved",Report.DATA_UPDATED="onReportDataUpdated",Report.DATA_NAME_CHANGED="onReportDataNameChanged",Report.DATA_FIELD_NAME_CHANGED="onReportDataFieldNameChanged",Report.CELL_MERGED="onReportCellMerged",Report.ALERT="onReportAlert";const REG_COLOR=/\s*\,\s*/;class ColorUtils{static get hueCount(){return this.HUES.length}static getHue(e){return this.HUES[e]}static rbg2Hue(e){const t=(16711680&e)>>16,r=(65280&e)>>8,i=255&e,s=Math.min(t,r,i),A=Math.max(t,r,i);if(s==A)return 0;{let e=0;return e=A==t?(r-i)/(A-s):A==r?2+(i-t)/(A-s):4+(t-r)/(A-s),e*=60,e<0&&(e+=360),Math.round(e)}}static rgb2Hsl(e,t,r){if(void 0===t){const i=e;e=(16711680&i)>>16,t=(65280&i)>>8,r=255&i}e/=255,t/=255,r/=255;const i=Math.max(e,t,r),s=Math.min(e,t,r);let A,n,o=(i+s)/2;if(i==s)A=n=0;else{const a=i-s;switch(n=o>.5?a/(2-i-s):a/(i+s),i){case e:A=(t-r)/a+(t<r?6:0);break;case t:A=(r-e)/a+2;break;case r:A=(e-t)/a+4}A/=6}return{h:360*A,s:100*n,l:100*o}}static hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}static hsl2Rgb(e,t,r){if(void 0===t){const i=e;e=(16711680&i)>>16,t=(65280&i)>>8,r=255&i}let i,s,A;if(e/=360,r/=100,0==(t/=100))i=s=A=r;else{const n=r<.5?r*(1+t):r+t-r*t,o=2*r-n;i=ColorUtils.hue2rgb(o,n,e+1/3),s=ColorUtils.hue2rgb(o,n,e),A=ColorUtils.hue2rgb(o,n,e-1/3)}return Math.round(255*i)<<16|Math.round(255*s)<<8|Math.round(255*A)}static toHex(e,t=NaN){let r=((16711680&e)>>16).toString(16);1==r.length&&(r="0"+r);let i=((65280&e)>>8).toString(16);1==i.length&&(i="0"+i);let s=(255&e).toString(16);1==s.length&&(s="0"+s);let A="";return isNaN(t)||(A=(255&(t=Math.round(255*t))).toString(16),1==A.length&&(A="0"+A)),"#"+r+i+s+A}static toRgba(e,t){let r="rgba(";return r+=((16711680&e)>>16)+","+((65280&e)>>8)+","+(255&e)+","+t,r+")"}static interpoate(e,t,r){const i=(16711680&e)>>16,s=(65280&e)>>8,A=255&e,n=(16711680&t)>>16,o=(65280&t)>>8,a=255&t;return(Math.floor((n-i)*r+i)<<16)+(Math.floor((o-s)*r+s)<<8)+Math.floor((a-A)*r+A)}static colorToHex(e,t){return"#"+Utils.pad16(e,6)+Utils.pad16(Math.round(255*t),2)}static colorToHex2(e,t){return t<1?"#"+Utils.pad16(e,6)+Utils.pad16(Math.round(255*t),2):"#"+Utils.pad16(e,6)}static colorToCss(e,t){const r=Math.round(100*t)/100;if(1!==r){return"rgba("+((16711680&e)>>16)+","+((65280&e)>>8)+","+(255&e)+","+r+")"}return"#"+Utils.pad16(e,6)}static strToColor(e){let t=0,r=1;if(e)if((e=e.trim()).startsWith("rgba(")&&e.endsWith(")")){const i=e.substring(5,e.length-1).trim().split(REG_COLOR);4===i.length&&(t=parseInt(i[0])<<16|parseInt(i[1])<<8|parseInt(i[2]),r=parseFloat(i[3]))}else if(e.startsWith("rgb(")&&e.endsWith(")")){const r=e.substring(4,e.length-1).trim().split(REG_COLOR);3===r.length&&(t=parseInt(r[0])<<16|parseInt(r[1])<<8|parseInt(r[2]))}else{e.startsWith("#")&&(e=e.substr(1));const i=e.length;i>6?(t=parseInt(e.substr(0,6),16),r=parseInt(e.substring(6),16)/255):i>0&&(3===i&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),t=parseInt(e,16))}return{color:t,alpha:r}}static cssToColor(e,t=!0){if(e)if(e.startsWith("rgba(")){const r=e.substring(5,e.length-1).split(REG_COLOR),i=parseFloat(r[3]);if(i>0||!t){return{color:parseInt(r[0])<<16|parseInt(r[1])<<8|parseInt(r[2]),alpha:i}}}else if(e.startsWith("rgb(")){const t=e.substring(4,e.length-1).split(REG_COLOR);return{color:parseInt(t[0])<<16|parseInt(t[1])<<8|parseInt(t[2]),alpha:1}}}static lighten(e,t){if(t>=1)return e;const r=this.rgb2Hsl(e),i=r.l+r.l*(1-t);return this.hsl2Rgb(r.h,r.s,i)}}ColorUtils.HUE_MAX=360,ColorUtils.SATURATION_MAX=100,ColorUtils.LIGHTNESS_MAX=100,ColorUtils.HUES=[16711680,16776960,65280,65535,255,16711935,16711680];const $_FORBIDDEN_STYLES={position:"poistion",display:"display",marign:"margin"},$_COLOR_STYLES={color:0,backgroundColor:1,fill:2},$_ALIASED_STYLES={};function strToCss(e){if(e&&"#"==e.charAt(0)&&e.length>7){const t=parseInt(e.substring(1,7),16),r=parseInt(e.substring(7),16)/255;e=ColorUtils.colorToCss(t,r)}return e}function aliasStyle(e,t){const r=e.values;return r[t]||r.default}function applyStyles(e,t,r){if(t)for(let i in t){let s=t[i];s&&!e._doApplyStyle(i,s,r)&&(i in $_FORBIDDEN_STYLES||(i in $_COLOR_STYLES?s=strToCss(s):i in $_ALIASED_STYLES&&(s=aliasStyle($_ALIASED_STYLES[i],s),i=$_ALIASED_STYLES[i].css),r[i]=s||""))}}class ReportElement extends VisualElement{constructor(e,t){super(e,t)}_doDispose(){super._doDispose()}get debugging(){return ReportElement.Debugging}get debugLabel(){return this.constructor.name}get guardLabel(){return this.debugLabel}get measuredWidth(){return this._measuredWidth}get measuredHeight(){return this._measuredHeight}get lazyLayout(){return!1}get floating(){return!1}measure(e,t,r){const i=this._dom;e.printing?delete i.dataset.design:i.dataset.design="",e.printing&&this._clearDesign(),this._doPrepareMeasure(e,i);const s=this._doMeasure(e,i,t,r);return this._doAfterMeasure(e,i,t,r,s),this._measuredWidth=s.width,this._measuredHeight=s.height,s}layoutContent(e){this._doPrepareContent(e),this._doLayoutContent(e),this._doAfterLayout(e)}print(e,t,r=NaN){const i=this._dom;return this._printWidth=r,this._setClassName(i),this._doPrint(e,t),this._setSizeStyle(i.style),this.height}findElement(e){return null}applyMeasure(){this.resize(this._measuredWidth,this._measuredHeight)}_doDraw(e){}_debugBorder(){return"1px solid rgba(0, 61, 0, 0.3)"}_debugColor(){return"rgba(0, 61, 0, 0.4)"}_clearDesign(){}_afterDraw(e){if(this.debugging&&this._debuggable()){if(!this._debugView){this._debugView=e.ownerDocument.createElement("span");const t=this._debugView.style;t.display="inline-block",t.position="absolute",t.pointerEvents="none",t.left="0",t.top="0",t.right="0",t.bottom="0",t.border=this._debugBorder(),t.color=this._debugColor()}this._debugView.textContent=this.debugLabel,e.appendChild(this._debugView)}else this._debugView&&Utils.detach(this._debugView)}_debuggable(){return!0}_doPrepareMeasure(e,t){}_doAfterMeasure(e,t,r,i,s){}_doMeasure(e,t,r,i){return new Size(r,i)}_doPrepareContent(e){}_doLayoutContent(e){}_doAfterLayout(e){}_doSetStyles(e,t){this._setStyles(e,e.styles,t.style)}_setStyles(e,t,r){applyStyles(e,t,r)}_getModelWidth(e,t){return e.getWidth(t)}_getModelHeight(e,t){return e.getHeight(t)}_setModelSize(e,t,r,i,s=!1){const A=this._modelWidth=this._getModelWidth(e,r),n=this._modelHeight=this._getModelHeight(e,i);isNaN(A)?s&&(t.style.width=""):t.style.width=A+"px",isNaN(n)?s&&(t.style.height=""):t.style.height=n+"px"}_doPrint(e,t){const r=this.measure(t,t.pageWidth,t.pageHeight);this.width=r.width,this.height=r.height,this.layoutContent(t)}}ReportElement.Debugging=!1;class SectionHeadView extends ReportElement{constructor(e,t,r,i,s){super(e,null),this._model=t,this._text=r,this.dom.title=i;let A="rr-section-head";s&&(A+=" "+s),this.styleName=A}get model(){return this._model}set model(e){this._model=e}get text(){return this._text}set text(e){e!==this._text&&(this._text=e,this.invalidateLayout())}setSelected(e){this.model.isAncestorOf(e)?this.dom.dataset.selected="":delete this.dom.dataset.selected}_initDom(e,t){super._initDom(e,t),this._span=e.createElement("span"),t.appendChild(this._span)}_doMeasure(e,t,r,i){const s=this._span;return t.style.width="",t.style.height="",s.textContent=this._text,new Size(Math.ceil(t.offsetWidth),t.offsetHeight)}isDom(e){return super.isDom(e)||e===this._span}}class ReportItemElement extends ReportElement{constructor(e,t,r){super(e,r),this._modelChanged=!0,this._model=t,this._doModelChanged(null)}_doDispose(){this._model=null,super._doDispose()}get model(){return this._model}set model(e){if(e!==this._model){const t=this._model;this._model=e,this._modelChanged=!0,this._doModelChanged(t)}}get navigableParent(){let e=this.parent;for(;e;){if(e instanceof ReportGroupItemElement)return e.navigable?e:e.navigableParent;e=e.parent}}get modelParent(){let e=this.parent;for(;e;){if(e instanceof ReportGroupItemElement&&e.model===this._model.outlineParent)return e;e=e.parent}return null}get marqueeParent(){var e;const t=null===(e=this.model)||void 0===e?void 0:e.marqueeParent;if(t){let e=this;for(;e;){if(e instanceof ReportItemElement&&e.model===t)return e;e=e.parent}}return this}get designable(){return!0}get editable(){return!1}get isSpace(){return!1}get isRelativeHeight(){return this._model.isRelativeHeight}_clearDesign(){this._designView&&(Utils.remove(this._designView),this._designView=null),super._clearDesign()}getEditText(){return""}setEditText(e,t){}refreshPrintValues(e){}get printable(){return!this._model||this._model.printable}_initDom(e,t){super._initDom(e,t),this.designable&&(this._designView=e.createElement("div"),this._designView.className="rr-design-back",t.appendChild(this._designView),this._bindMarker=e.createElement("span"),this._bindMarker.className="rr-bind-marker",this._designView.appendChild(this._bindMarker))}_setBindMarker(e=!0,t=!1){e?(this._bindMarker.dataset.vis="1",t?this._bindMarker.dataset.sys="1":delete this._bindMarker.dataset.sys):delete this._bindMarker.dataset.vis}_doPrepareMeasure(e,t){const r=this._model;if(r){if(r.stylable){if(!e.printing){if(this._prevStyles){const e=t.style;for(let t in this._prevStyles)e[t]=""}this._prevStyles=r.styles&&{...r.styles}}this._doSetStyles(r,t)}if(e.printing){t.dataset._m_=r.shash,e.report&&(e.report.models[r.shash]=r);const i=r.styleCallback;if(i)try{const s=this.getPrintValue(e,r),A=i(e,r,e.row,s);A&&Utils.extend(t.style,A)}catch(e){console.error("StyleCallback Error",e)}t.dataset.row=e.row+""}t.title=r.hint||""}}_doAfterMeasure(e,t,r,i,s){if(this.model){const e=this._model.getWidth(r),t=this._model.getHeight(i);isNaN(e)||(s.width=e),isNaN(t)||(s.height=t)}}findElement(e){return this._model&&e&&this._model.name===e?this:null}findElementOf(e){return this.isDom(e)?this:null}getPrintValue(e,t,r){let i,s=t.value;switch(s){case PrintValue.NO:if(e.row>=0)return e.row+1;break;case PrintValue.ROW:if(e.row>=0)return e.row;break;case PrintValue.INDEX:return e.index;case PrintValue.INO:return e.index+1;default:s&&e.dp&&(i=t.getPrintValue(e.dp,e.row))}const A=this._runValueCallback(e,t,i);return void 0!==A&&(i=A),void 0!==i?i:r}_doModelChanged(e){}_setX(e,t){e.style.left=t+"px"}_setY(e,t){e.style.top=t+"px"}_setPos(e,t,r){e.style.left=t+"px",e.style.top=r+"px"}_runValueCallback(e,t,r){if(!e._noValueCallback){const i=t.valueCallback;if(i){const s=i(e,t,e.row,r);if(void 0!==s)return s}}}}class ReportGroupItemElement extends ReportItemElement{constructor(e,t,r){super(e,t,r),this._padLeft=0,this._padRight=0,this._padTop=0,this._padBottom=0,this._borderApplied=!1,this.measureFixed=!1}_doDispose(){this._floatings&&(this._floatings=null),super._doDispose()}get navigable(){return!0}isContentDom(e){return e===this._contentBox}findElement(e){let t=super.findElement(e);if(!t){const r=this._getItemsParent();for(let i=0,s=r.childCount;i<s;i++){if(t=r.getChild(i).findElement(e),t)break}}return t}findElementOf(e){let t=super.findElementOf(e);if(!t){const r=this._getItemsParent();for(let i=0,s=r.childCount;i<s;i++){const s=r.getChild(i);if(s instanceof ReportItemElement&&(t=s.findElementOf(e),t))break}}return t||e!==this._contentBox?t:this}getElementOf(e){if(e===this.model)return this;const t=this._getItemsParent();for(let r=0,i=t.childCount;r<i;r++){const i=t.getChild(r);if(i instanceof ReportItemElement&&i.model===e)return i;if(i instanceof ReportGroupItemElement){const t=i.getElementOf(e);if(t)return t}}}indexOfElement(e){return this._getItemsParent().indexOf(e)}getLeaves(){const e=[];return function e(t,r){for(let i=0,s=t.childCount;i<s;i++){const s=t.getChild(i);s instanceof ReportGroupItemElement?e(s,r):s instanceof ReportItemElement&&r.push(s)}}(this._getItemsParent(),e),e}getFirst(){const e=this._getItemsParent();for(let t=0,r=e.childCount;t<r;t++){const r=e.getChild(t);if(r.visible&&r instanceof ReportItemElement)return r}return this}getLast(){const e=this._getItemsParent();for(let t=e.childCount-1;t>=0;t--){const r=e.getChild(t);if(r.visible&&r instanceof ReportItemElement)return r}return this}_getPrev(e){const t=this._getItemsParent(),r=t.indexOf(e);return r>0?t.getChild(r-1):e}_getNext(e){const t=this._getItemsParent(),r=t.indexOf(e);return r<t.childCount-1?t.getChild(r+1):e}getPrev(e){return this._getPrev(e)}getNext(e){return this._getNext(e)}getLeft(e){return this._getPrev(e)}getRight(e){return this._getNext(e)}getUpper(e){return this._getPrev(e)}getLower(e){return this._getNext(e)}itemOfDom(e){if(this.isDom(e))return this.model;const t=this._getElements();if(t)for(let r of t){if(r instanceof ReportGroupItemElement){const t=r.itemOfDom(e);if(t)return t}if(r instanceof ReportItemElement&&r.containsDom(e))return r.model}}setFixedSize(e){return this.width=e,this.measureFixed=!0,this}isDom(e){return super.isDom(e)||e===this._contentBox}_initDom(e,t){if(super._initDom(e,t),this._needContentBox()){const r=this._contentBox=e.createElement("div"),i=r.style;r.className="rr-content-box",i.position="absolute",i.boxSizing="content-box",i.left="0",i.top="0",i.width="100%",i.height="100%",t.appendChild(r)}}replaceDom(e){super.replaceDom(e),this._needContentBox()&&(this._contentBox=e.getElementsByClassName("rr-content-box")[0])}refreshPrintValues(e){for(let t=0;t<this.childCount;t++){const r=this.getChild(t);r instanceof ReportItemElement&&r.refreshPrintValues(e)}}_getItemViews(){const e=this._getElements(),t=[];for(let r of e)r instanceof ReportItemElement&&t.push(r);return t}_getParentDom(){return this._contentBox||this._dom}_getItemsParent(){return this}_needContentBox(){return!0}_needDesignBox(){return!1}_applyPaddings(e,t){const r=getComputedStyle(e),i=this._padTop=Utils.toInt(r.paddingTop)+Utils.toInt(r.borderTopWidth),s=this._padBottom=Utils.toInt(r.paddingBottom)+Utils.toInt(r.borderBottomWidth),A=this._padLeft=Utils.toInt(r.paddingLeft)+Utils.toInt(r.borderLeftWidth),n=this._padRight=Utils.toInt(r.paddingRight)+Utils.toInt(r.borderRightWidth);i>0&&(t.height+=i),s>0&&(t.height+=s),A>0&&(t.width+=A),n>0&&(t.width+=n),this._borderApplied=!0}_applyBorders(e,t){if(!this._borderApplied){const r=getComputedStyle(e),i=this._padTop+=Utils.toInt(r.borderTopWidth),s=this._padBottom+=Utils.toInt(r.borderBottomWidth),A=this._padLeft+=Utils.toInt(r.borderLeftWidth),n=this._padRight+=Utils.toInt(r.borderRightWidth);i>0&&(t.height+=i),s>0&&(t.height+=s),A>0&&(t.width+=A),n>0&&(t.width+=n),this._borderApplied=!0}}_isEmpty(){return this._getItemsParent().childCount<1}_isFocused(){return this.container.focusedElement===this}_isItemFocused(e){return this.container.focusedItem===e}_isItemSelected(e){return this.container._selection.contains(e)}_getFocusedItem(){return this.container.focusedItem}_doMeasure(e,t,r,i){const s=e.printing,A=this.model,n=e.reportView,o=this._getItemsParent();(this._modelChanged||n._modelDirty||A.layoutChanged)&&(o.clear(),this._buildItems(e,n,A),this._modelChanged=!1,A.layoutChanged=!1);const a=this.measureFixed?this.width:Utils.pickNum(this._modelWidth,r),l=o.childCount;for(let t=0;t<l;t++){const r=o.getChild(t);(r.visible=!s||r.printable)&&(r.lazyLayout||this._doMeasureItem(e,r,a,i))}return new Size(this.offsetWidth,this.offsetHeight)}_doPrepareMeasure(e,t){super._doPrepareMeasure(e,t),this._borderApplied=!1,this._padTop=this._padBottom=this._padLeft=this._padRight=0}_getDesignText(){return this.model.outlineLabel}_setDesignContent(e){e?(this._designView.textContent=this._getDesignText(),this._designView.style.paddingLeft=12*this.model.designLevel+"px"):this._designView.textContent=""}_doMeasureItem(e,t,r,i){e.printing&&t.resetStyleName(),t.measure(e,r,i)}_createElement(e,t,r){const i=e.$_createElement(r);return this._prepareChild(i),t.addChild(i),i}_buildItems(e,t,r){const i=r&&r.items,s=this._getItemsParent();if(i&&i.length>0)for(let e of i)this._createElement(t,s,e)}_prepareChild(e){}_doLayoutContent(e){const t=e.printing,r=this._getItemsParent(),i=this._padLeft,s=this._padTop,A=r.width-i-this._padRight,n=r.height-s-this._padBottom;this._floatings&&(this._floatings=[]);for(let o=0,a=r.childCount;o<a;o++){const a=r.getChild(o);(a.visible=!t||a.printable)&&(a.lazyLayout&&this._doMeasureItem(e,a,this.width,this.height),a.resize(a.measuredWidth,a.measuredHeight),a.floating||a.draw(),a.layoutContent(e),a instanceof ReportItemElement?a.floating?(this._floatings||(this._floatings=[]),a._nodraw=!0,this._floatings.push(a)):this._layoutItem(e,a,a.model,i,s,A,n):this._layoutChild(e,a,i,s,A,n))}}layoutFloating(e){const t=this._floatings;if(t&&t.length)for(let r=0;r<t.length;r++){const i=t[r];i.visible&&(i._nodraw=!1,this._layoutFloating(e,i,i.model),i.draw())}}_layoutItem(e,t,r,i,s,A,n){}_layoutChild(e,t,r,i,s,A){}_layoutFloating(e,t,r){const i=this.findElement(r.anchorTarget);if(i instanceof ReportItemElement){const e=this.container.getDomPosition(this),s=this.container.getDomPosition(i);let A=s.x-e.x,n=s.y-e.y;switch(r.anchorPosition){case AnchorPosition.INNER_LEFT:n-=(t.height-i.height)/2;break;case AnchorPosition.LEFT:A-=t.width,n-=(t.height-i.height)/2;break;case AnchorPosition.INNER_RIGHT:A+=i.width-t.width,n-=(t.height-i.height)/2;break;case AnchorPosition.RIGHT:A+=i.width,n-=(t.height-i.height)/2;break;case AnchorPosition.INNER_TOP:A-=(t.width-i.width)/2;break;case AnchorPosition.TOP:A-=(t.width-i.width)/2,n-=t.height;break;case AnchorPosition.INNER_BOTTOM:A-=(t.width-i.width)/2,n+=i.height-t.height;break;case AnchorPosition.BOTTOM:A-=(t.width-i.width)/2,n+=i.height;break;case AnchorPosition.CENTER:default:A-=(t.width-i.width)/2,n-=(t.height-i.height)/2}return t.dom.$_anc=i.dom,t.dom.$anp=r.anchorPosition,t.move(A,n),void t.setPrintStyles()}}_doAfterLayout(e){if(!e.printing&&this._designView)if(this._needDesignBox()){const e=this._isEmpty();this.dom.setAttribute("data-empty",String(e)),this._setDesignContent(e)}else this._designView.style.display="none"}_doPrint(e,t){super._doPrint(e,t),this.layoutFloating(t)}}const BAND_ROW_BLANK="$_brb",BAND_ROW_TYPE="$_brt",BAND_MASTER="master",BAND_ROW="r",BAND_DUMMY="d",BAND_GROUP_HEADER="gh",BAND_GROUP_FOOTER="gf";class BandElement extends ReportGroupItemElement{getSibling(e,t){const r=this.getLines(),i=r.indexOf(e);if(t<0&&i>0||t>0&&i<r.length-1)return r[Math.max(0,Math.min(r.length-1,i+t))]}_getNext(e){const t=this.getLines(),r=t.indexOf(e);if(r<t.length-1)return t[r+1]}_getPrev(e){const t=this.getLines(),r=t.indexOf(e);if(r>0)return t[r-1]}}BandElement.END_ROW_MESSAGE_CLASS="rr-end-row-message";class BoundedContainerElement extends ReportGroupItemElement{constructor(e,t,r){super(e,t,r)}_prepareChild(e){}_doMeasure(e,t,r,i){this.measureFixed||this._setModelSize(this.model,t,r,i,!0);const s=super._doMeasure(e,t,r,i),A=this.childCount;let n=0,o=0;for(let e=0;e<A;e++){const t=this.getChild(e);if(t.visible){const e=t.model;n=Math.max(n,t.measuredWidth),o=Math.max(o,t.measuredHeight);let s=e.getTop(i);s>0&&(o+=s),s=e.getBottom(i),s>0&&(o+=s),s=e.getLeft(r),s>0&&(n+=s),s=e.getRight(r),s>0&&(n+=s)}}return s.set(n,o),this._applyPaddings(t,s),s}_layoutItem(e,t,r,i,s,A,n){const o=r.getLeft(A),a=r.getRight(A),l=r.getTop(n),h=r.getBottom(n);isNaN(o)||isNaN(a)?isNaN(o)?isNaN(a)?i+=(A-t.width)/2:i+=A-t.width-a:i+=o:(i+=o,t.width=Math.max(0,A-o-a)),isNaN(l)||isNaN(h)?isNaN(l)?isNaN(h)?s+=(n-t.height)/2:s+=n-t.height-h:s+=l:(s+=l,t.height=Math.max(0,n-l-h)),t.move(i,s),t.setPrintStyles()}_layoutChild(e,t,r,i,s,A){r+=(s-t.width)/2,i+=(A-t.height)/2,t.move(r,i),t.setPrintStyles()}}class StackContainerElement extends BoundedContainerElement{constructor(e,t,r){super(e,t,r)}_doDispose(){super._doDispose()}get debugLabel(){return"stack"}_getPrev(e){const t=this.$_getSorted("x"),r=t.indexOf(e);return r>0?t[r-1]:null}_getNext(e){const t=this.$_getSorted("x"),r=t.indexOf(e);return r<t.length-1?t[r+1]:null}getUpper(e){const t=this.$_getSorted("y"),r=t.indexOf(e);return r>0?t[r-1]:null}getLower(e){const t=this.$_getSorted("y"),r=t.indexOf(e);return r<t.length-1?t[r+1]:null}$_getSorted(e){return this._getItemViews().sort(((t,r)=>t[e]-r[e]))}}class StackContainerElementImpl extends StackContainerElement{get debugLabel(){return"stack"}_getCssSelector(){return"rr-stack-container rr-group-element"}_needDesignBox(){return!0}}class SectionElement extends StackContainerElement{constructor(e,t,r){super(e,t,r)}_doDispose(){super._doDispose()}_needDesignBox(){return!0}_isContexable(){return!1}_doPrepareMeasure(e,t){e.contextable=this._isContexable(),super._doPrepareMeasure(e,t)}_doMeasure(e,t,r,i){const s=super._doMeasure(e,t,r,i);return s.height>0||e.printing||!(this.model.designHeight>0)||(s.height=this.model.designHeight),s}measure(e,t,r){const i=super.measure(e,t,r);return e.printing&&(isNaN(this._printWidth)?isNaN(this.measuredWidth)||(this.width=this.measuredWidth):this.width=this._printWidth,isNaN(this._printHeight)?isNaN(this.measuredHeight)||(this.height=this.measuredHeight):this.height=this._printHeight,i.width=this.width,i.height=this.height),i}}class ReportHeaderElement extends SectionElement{constructor(e,t){super(e,t,"reportHeaderView")}_doDispose(){super._doDispose()}get debugLabel(){return"report header"}_getCssSelector(){return"rr-report-header rr-group-element"}}class ReportFooterElement extends SectionElement{constructor(e,t){super(e,t,"reportFooterView")}_doDispose(){super._doDispose()}get debugLabel(){return"report footer"}_getCssSelector(){return ReportFooterElement.STYLE_NAME}}ReportFooterElement.STYLE_NAME="rr-page-header rr-group-element",ReportFooterElement.isFooter=function(e){return e&&e.className===ReportFooterElement.STYLE_NAME};class PageHeaderElement extends SectionElement{constructor(e,t){super(e,t,"pageHeaderView")}_doDispose(){super._doDispose()}get debugLabel(){return"page header"}_getCssSelector(){return"rr-page-header rr-group-element"}_isContexable(){return!0}}class PageFooterElement extends SectionElement{constructor(e,t){super(e,t,"pageFooterView")}_doDispose(){super._doDispose()}get debugLabel(){return"page footer"}_getCssSelector(){return"rr-page-footer rr-group-element"}_isContexable(){return!0}}class SpaceItemElement extends ReportItemElement{constructor(e,t){super(e,t,"spaceItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-space rr-item-element"}get guardLabel(){return"space"}get debugLabel(){return"space"}get isSpace(){return!0}_doMeasure(e,t,r,i){return Size.create(0,0)}}class BoxContainerElement extends ReportGroupItemElement{constructor(e,t,r){super(e,t,r),this._gap=0,this._container=this}_doDispose(){super._doDispose()}get gap(){return this._gap}get debugLabel(){return""}_needDesignBox(){return!0}_initDom(e,t){super._initDom(e,t)}_doMeasure(e,t,r,i){this.measureFixed||this._setModelSize(this.model,t,r,i,!0);const s=this.measureFixed?this.width:Utils.pickNum(this._modelWidth,r);this._gap=this.model.getItemGap(s);return super._doMeasure(e,t,s,i)}_doAfterMeasure(e,t,r,i,s){const A=this.measureFixed?this.width:r;s.height>0||e.printing||!(this.model.designHeight>0)||(s.height=this.model.designHeight),s.width>0||e.printing||!(this.model.designWidth>0)||(s.width=this.model.designWidth),this.childCount>0&&this._applyPaddings(t,s),super._doAfterMeasure(e,t,A,i,s)}}class RowBoxContainerElement extends BoxContainerElement{constructor(e,t,r="rowBoxView"){super(e,t,r)}_doDispose(){super._doDispose()}getColPoints(){return this._points.slice()}get debugLabel(){return"rbox"}_getCssSelector(){return"rr-box-container rr-rbox rr-group-element"}_initDom(e,t){super._initDom(e,t)}_doMeasure(e,t,r,i){const s=this.model,A=this._paddings=e.reportView.getBoxPaddings(s);super._doMeasure(e,t,r,i);const n=this,o=n.childCount;let a=0,l=this._gap*(o-1);for(let e=0;e<o;e++){const t=n.getChild(e);t.visible&&(t instanceof SpaceItemElement?l+=t._measuredWidth=t.model.getSize(r):t.floating||(a=Math.max(a,t.measuredHeight),l+=t.measuredWidth))}return n.width=l,n.height=a,n.resetSizeStyle(),this.invalidate(!0,!0),new Size(l+A.left+A.right,a+A.top+A.bottom)}_doLayoutContent(e){const t=this;for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&r instanceof SpaceItemElement&&(r._measuredHeight=this.height)}super._doLayoutContent(e);const r=t.width;let i=0;const s=this._points=[];let A=0;for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&!r.floating&&(A+=r.width+this._gap)}switch(A>0&&(A-=this._gap),this.model.itemsAlign){case BoxItemsAlign.END:i=r-A;break;case BoxItemsAlign.MIDDLE:i=(r-A)/2;break;default:i=0}for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&!r.floating&&(r.x=i,s.push(i),i+=r.width,s.push(i),i+=this._gap,r.setPrintStyles())}}_layoutItem(e,t,r,i,s,A,n){const o=r.getTop(n),a=r.getBottom(n);isNaN(o)?isNaN(a)?s+=(n-t.height)/2:s+=n-t.height-a:s+=o,t.move(this.x,s),t.setPrintStyles()}getUpper(e){return e}getLower(e){return e}}class ColumnBoxContainerElement extends BoxContainerElement{constructor(e,t,r="columnBoxView"){super(e,t,r)}_doDispose(){super._doDispose()}getRowPoints(){return this._points.slice()}get debugLabel(){return"cbox"}_getCssSelector(){return"rr-box-container rr-cbox rr-group-element"}_initDom(e,t){super._initDom(e,t)}_doMeasure(e,t,r,i){const s=this.model,A=this._paddings=e.reportView.getBoxPaddings(s);super._doMeasure(e,t,r,i);const n=this,o=n.childCount;let a=this._gap*(o-1),l=0;for(let e=0;e<o;e++){const t=n.getChild(e);t.visible&&(t instanceof SpaceItemElement?a+=t._measuredHeight=t.model.getSize(i):t.floating||(l=Math.max(l,t.measuredWidth),a+=t.measuredHeight))}return n.width=l,n.height=a,n.resetSizeStyle(),this.invalidate(!0,!0),new Size(l+A.left+A.right,a+A.top+A.bottom)}_doLayoutContent(e){const t=this;for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&r instanceof SpaceItemElement&&(r._measuredWidth=this.width)}super._doLayoutContent(e);const r=t.height;let i=0;const s=this._points=[];let A=0;for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&!r.floating&&(A+=r.height+this._gap)}switch(A>0&&(A-=this._gap),this.model.itemsAlign){case BoxItemsAlign.END:i=r-A;break;case BoxItemsAlign.MIDDLE:i=(r-A)/2;break;default:i=0}for(let e=0,r=t.childCount;e<r;e++){const r=t.getChild(e);r.visible&&!r.floating&&(r.y=i,s.push(i),i+=r.height,s.push(i),i+=this._gap,r.setPrintStyles())}}_layoutItem(e,t,r,i,s,A,n){const o=r.getLeft(A),a=r.getRight(A);isNaN(o)?isNaN(a)?i+=(A-t.width)/2:i+=A-t.width-a:i+=o,t.move(i,t.y),t.setPrintStyles()}getLeft(e){return e}getRight(e){return e}}class DiagonalBoxContainerElement extends ReportGroupItemElement{constructor(e,t){super(e,t,"diagonalBoxView")}_doDispose(){super._doDispose()}get debugLabel(){return"dbox"}_getCssSelector(){return"rr-box-container rr-dbox rr-group-element"}_needDesignBox(){return!0}_initDom(e,t){super._initDom(e,t),t.appendChild(this._line=e.createElement("span")),Utils.extend(this._line.style,{position:"absolute",boxSizing:"borderBox"}),this._line.dataset.line="1"}_doMeasure(e,t,r,i){const s=this.model,A=this._paddings=e.reportView.getBoxPaddings(s);this.measureFixed||this._setModelSize(s,t,r,i,!0),Utils.extend(this._line.style,s.lineStyles),super._doMeasure(e,t,r,i);const n=this.getChild(0),o=this.getChild(1);let a=0,l=0;return n&&o?(a=n.measuredWidth+o.measuredWidth,l=n.measuredHeight+o.measuredHeight):n&&(a=n.measuredWidth,l=n.measuredHeight),e.printing&&(this._line.dataset._m_=t.dataset._m_),new Size(a+A.left+A.right,l+A.top+A.bottom)}_doAfterMeasure(e,t,r,i,s){s.height>0||e.printing||!(this.model.designHeight>0)||(s.height=this.model.designHeight),s.width>0||e.printing||!(this.model.designWidth>0)||(s.width=this.model.designWidth),this.childCount>0&&this._applyPaddings(t,s),super._doAfterMeasure(e,t,r,i,s),t.style.padding="0"}_doLayoutContent(e){const t=this._line,r=this.width,i=this.height,s=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));t.style.width=s+"px",this.model.reversed?(t.style.transform="translateY("+i+"px) rotate(-"+Math.atan(i/r)+"rad)",t.style.transformOrigin="0% 0%"):(t.style.transform="rotate("+Math.atan(i/r)+"rad)",t.style.transformOrigin="0% 0%"),super._doLayoutContent(e)}_layoutItem(e,t,r,i,s,A,n){const o=this.model;o.reversed?t.model===o.firstItem||(i=this.width-t.width-this._padRight,s=this.height-t.height-this._padBottom):t.model===o.firstItem?s=this.height-t.height-this._padBottom:i=this.width-t.width-this._padRight,t.move(i,s,!0)}}class PageItemContainerElement extends BoundedContainerElement{constructor(e,t,r,i=!0){super(e,t,r),this._findable=!0,this._emptySize=i}_doDispose(){super._doDispose()}get isLayer(){return!0}get findable(){return this._findable}set findable(e){this._findable=e}get debugLabel(){return""}get lazyLayout(){return!0}_getCssSelector(){return"rr-item-container "+this.name}_needDesignBox(){return!1}_isEmptySize(){return this._emptySize}_initDom(e,t){super._initDom(e,t)}_prepareChild(e){}_doMeasure(e,t,r,i){return super._doMeasure(e,t,r,i).set(r,i)}}class BodyItemsElement extends ColumnBoxContainerElement{getLines(){const e=[];for(let t=0;t<this._container.childCount;t++){const r=this._container.getChild(t);r instanceof ReportItemElement&&!r.isSpace&&!r.floating&&e.push(r)}return e}getLine(e){const t=this._container.childCount;if(t>0)if(e>=0)for(let r=0,i=0;r<t;r++){const t=this._container.getChild(r);if(t instanceof ReportItemElement&&!t.isSpace&&!t.floating){if(i==e)return t;i++}}else for(let r=t-1,i=-1;r>=0;r--){const t=this._container.getChild(r);if(t instanceof ReportItemElement&&!t.isSpace&&!t.floating){if(i==e)return t;i--}}}isLine(e){return!e.isSpace&&!e.floating&&this._container.contains(e)}getLineOf(e){if(this.isLine(e))return e;let t=e;for(;t;){const e=t.navigableParent;if(e===this._container||e instanceof BandElement)return t;t=e}}getSiblingLine(e,t){let r=e.navigableParent;if(r instanceof BandElement){const i=r.getSibling(e,t);if(i)return i;e=r}r=this._container;let i=r.indexOf(e);if(i>=0)if(t>0)for(let e=i+1;e<r.childCount;e++){const t=r.getChild(e);if(t instanceof ReportItemElement&&!t.isSpace&&!t.floating)return t}else if(t<0)for(let e=i-1;e>=0;e--){const t=r.getChild(e);if(t instanceof ReportItemElement&&!t.isSpace&&!t.floating)return t}}get isLayer(){return!0}get debugLabel(){return""}get designable(){return!1}_debugBorder(){return"none"}_doMeasure(e,t,r,i){const s=e.printing?Math.ceil(e.bodyHeight)-Math.ceil(e.reportHeaderHeight)-Math.ceil(e.reportFooterHeight)-Math.ceil(e.headerHeight)-Math.ceil(e.footerHeight):i;return super._doMeasure(e,t,r,s)}}class PageBodyElement extends ReportElement{constructor(e,t){super(e,"pageBody"),this._findable=!0,this._modelChanged=!1,this._model=t,this.addChild(this._backContainerView=new PageItemContainerElement(e,null,"backView")),this.addChild(this._itemsView=new BodyItemsElement(e,null)),this.addChild(this._frontContainerView=new PageItemContainerElement(e,null,"frontView"))}_doDispose(){super._doDispose()}get model(){return this._model}set model(e){e!==this._model&&(this._model=e,this._modelChanged=!0,e&&(this._backContainerView.model=e.backItemsContainer,this._frontContainerView.model=e.frontItemsContainer,this._itemsView.model=e.itemsContainer))}get empty(){return 0==this._itemsView.childCount&&0==this._backContainerView.childCount&&0==this._frontContainerView.childCount}get itemsView(){return this._itemsView}isPageDom(e){return this.isDom(e)||this._itemsView.isDom(e)||this._itemsView.isContentDom(e)}findElement(e){return this._itemsView.findElement(e)||this._backContainerView.findElement(e)||this._frontContainerView.findElement(e)}findElementOf(e){return this._itemsView.findElementOf(e)||this._backContainerView.findElementOf(e)||this._frontContainerView.findElementOf(e)}getElementOf(e){return this._itemsView.getElementOf(e)||this._backContainerView.getElementOf(e)||this._frontContainerView.getElementOf(e)}isLine(e){return this._itemsView.isLine(e)}getLineOf(e){return this._itemsView.getLineOf(e)}getSiblingLine(e,t){return this._itemsView.getSiblingLine(e,t)}getLine(e){return this._itemsView.getLine(e)}getLines(){return this._itemsView.getLines()}printAll(e,t){const r={startPage:0,pages:new Array,floatings:new Array};return this.print(e,t),this.empty||(this.layoutFloating(t),this.$_buildPages(e,t,r)),r}itemOfDom(e){let t;return(t=this._frontContainerView.itemOfDom(e))||(t=this._itemsView.itemOfDom(e))||(t=this._backContainerView.itemOfDom(e))?t:void 0}_getCssSelector(){return"rr-page-body"}get debugLabel(){return"page body"}get findable(){return this._findable}set findable(e){this._findable=e}_debugBorder(){return"1px solid rgba(0, 0, 255, 0.3)"}_debugColor(){return"rgba(0, 0, 255, 0.4)"}_doMeasure(e,t,r,i){this._modelChanged&&(this._modelChanged=!1),this._backContainerView.setFixedSize(r).measure(e,r,i),this._itemsView.setFixedSize(r).measure(e,r,i),this._frontContainerView.setFixedSize(r).measure(e,r,i);const s=Math.max(this.itemsView.measuredHeight,i);return new Size(r,s)}_doLayoutContent(e){const t=this.width,r=this.height;let i;i=this._backContainerView,i.setBounds(0,0,t,r),i.layoutContent(e),i=this._itemsView,i.setBounds(0,0,t,r),i.layoutContent(e),i=this._frontContainerView,i.setBounds(0,0,t,r),i.layoutContent(e)}layoutFloating(e){this._backContainerView.layoutFloating(e),this._itemsView.layoutFloating(e),this._frontContainerView.layoutContent(e)}$_buildPages(e,t,r){function i(){const e=[];n.push(e);let r=t.bodyTop;return t.h=t.bodyHeight,0==h&&(t.h-=t.reportHeaderHeight,r+=t.reportHeaderHeight),t.y=r,e}const s=this._itemsView,A=s.childCount;if(A<1)return;const n=r.pages,o=t.pageWidth,a=s.gap;let l,h=0;for(t.h=0;h<A;){t.h<=0&&(l=i());const r=h<A-1;let c,u,d=s.getChild(h++);if(d.printable){if(d instanceof ReportItemElement&&d.model.isBreakBefore()&&(l=i()),d instanceof BandElement){let i=t.y;const s=[];d.printBand(e,t,o,s);for(let e=0;e<s.length;e++)e>0&&(n.push(l=[]),i=t.bodyTop),c=s[e],c.style.top=i+"px",c.$_h=t.y-i+(r&&e===s.length-1?a:0),l.push(c);t.h-=a}else u=d.height,u>t.h&&d instanceof SpaceItemElement&&(u=t.h),c=d._dom,d instanceof ReportItemElement&&d.floating?(l.push(c),d=null):u<=t.h?(c.style.top=t.y+"px",c.$_h=u+=r?a:0,l.push(c),t.h-=u,t.y+=u):(t.h=0,h--,d=null);d instanceof ReportItemElement&&d.model.isBreakAfter()&&h<A-1&&(l=i())}else d.visible=!1}t.h<t.reportFooterHeight&&i(),console.log(n.length+" page(s) printed.")}}class TableCellElementBase extends ReportGroupItemElement{constructor(e,t,r,i){super(e,r,i),this._table=t}_doDispose(){super._doDispose()}get table(){return this._table}get container(){return this._table.container}get debugLabel(){return""}get designable(){return!1}get navigable(){return!1}get navigableParent(){return this._table}_getCssSelector(){return TableCellElementBase.STYLE}_needContentBox(){return!1}_initDom(e,t){super._initDom(e,t),t.className=TableCellElementBase.STYLE}_prepareChild(e){e.dom.style.position="relative"}_doLayoutContent(e){super._doLayoutContent(e);const t=this.model,r=this._table,i=r.model.getCell(t.row,t.col),s=this.getChild(0),A=r.model.getColumn(t.col).styles,n=i.styles,o=n&&n.cellAlign||A&&A.cellAlign;let a=0;switch(o){case"left":break;case"right":a=this.offsetWidth-s.offsetWidth;break;default:a=(this.offsetWidth-s.offsetWidth)/2}if(s.x=a,s.setPrintStyles(),s.dom.style.verticalAlign="middle",s.dom.style.top="",s.y=NaN,e.printing){r.$_td(this._row,this._col).dataset._align=o?o.charAt(0):"c"}}}TableCellElementBase.STYLE="rr-table-cell";class TableElement extends ReportGroupItemElement{constructor(e,t,r){super(e,t,r),this._tcells=[],this._ecells=[],this._spans=[]}static setTableStyle(e){const t=e.style;t.setProperty("table-layout","fixed","important"),t.setProperty("width","100%","important"),t.setProperty("border-collapse","collapse","important"),e.className="rr-table"}static getTable(e){return e instanceof TableCellElementBase?e.table:e&&e.parent instanceof TableCellElementBase?e.parent.table:e instanceof TableElement?e:void 0}_doDispose(){super._doDispose()}get rowCount(){return this._tbody.rows.length}get cellCount(){return this._tcells.length}get cellViews(){return this._tcells.slice(0)}get hasCells(){return this._tcells.length>0}getColPoints(){let e=0;const t=[e];if(this._cellWidths)for(let r of this._cellWidths)t.push(e+=parseFloat(r));return t}getColWidth(e){return this._colPts[e+1]-this._colPts[e]}getRowPoints(){const e=this._tbody.rows;let t=0;const r=[t];for(let i=0;i<e.length;i++)r.push(t+=e[i].offsetHeight);return r}getRowRect(e,t=1){const r=this._tbody.rows,i=Rectangle.create(0,0,this.width,0);for(let t=0;t<e;t++)i.y+=r[t].offsetHeight;for(let s=0,A=Math.min(t,this.rowCount-e);s<A;s++)i.height+=r[s+e].offsetHeight;return i}getColRect(e,t=1){const r=Rectangle.create(0,0,0,this.height);return r.x=this._colPts[e],t=Math.min(t,this._colPts.length-e),r.width=this._colPts[e+t]-r.x,r}get blockable(){return!0}get debugLabel(){return"table"}_needContentBox(){return!1}getCellOf(e,t){if(!e)return null;let r;if(t){let t=e;for(;t;){if(t instanceof HTMLTableCellElement){r=t;break}t=t.parentElement}}else e.parentElement instanceof HTMLTableCellElement?r=e.parentElement:e instanceof HTMLTableCellElement&&(r=e);if(r){const e=r.parentElement.rowIndex;return this.model.getCell(e,r.cellIndex)}}findChildAt(e,t,r){const i=this.container.activeTool.mouseEventTarget;for(let e of this._tcells){if(e.isDom(i))return e;let t=e.getChild(0);if(t.isDom(i))return t;let r=t.findDescendantOf(i);if(r)return r;if(t.containsDom(i))return t}}findChildOf(e){for(let t of this._tcells){if(t.isDom(e))return t;const r=t.findChildOf(e);if(r)return r}}findElement(e){const t=super.findElement(e);if(!t)for(let t of this._tcells){const r=t.getChild(0);if(r instanceof ReportItemElement){const t=r.findElement(e);if(t)return t}}return t}findElementOf(e){const t=super.findElementOf(e);if(!t)for(let t of this._tcells){const r=t.getChild(0);if(r instanceof ReportItemElement){if(t.isDom(e))return r;const i=r.findElementOf(e);if(i)return i}}return!t&&(e instanceof HTMLTableCellElement||e.classList.contains(TableCellElementBase.STYLE))&&this.containsDom(e)?this:t}getElementOf(e){for(let t of this._tcells){const r=t.getChild(0);if(r instanceof ReportItemElement&&r.model==e)return r;if(r instanceof ReportGroupItemElement){const t=r.getElementOf(e);if(t)return t}}}setCellDoms(e,t){const r=e.cells,i=t.cells;for(let e=i.length-1;e>=0;e--){const t=i[e].firstElementChild;t&&r[e].appendChild(t)}for(let t of this._tcells)t._row===e.rowIndex&&(t._dom=r[t._col].lastElementChild)}unsetCellDoms(e,t){const r=e.cells,i=t.cells;for(let e=i.length-1;e>=0;e--){const t=i[e].lastElementChild;t&&r[e].appendChild(t)}for(let t of this._tcells)t._row===e.rowIndex&&(t._dom=r[t._col].firstElementChild)}replaceCellDoms(e,t){const r=e.cells,i=t.cells;for(let e=i.length-1;e>=0;e--){const t=i[e].firstElementChild,s=r[e].firstElementChild;t&&s&&(i[e].removeChild(t),i[e].appendChild(s),r[e].appendChild(t))}for(let t of this._tcells)t._row===e.rowIndex&&(t._dom=r[t._col].firstElementChild)}_setTableStyles(e){TableElement.setTableStyle(e)}_createDom(e){const t=super._createDom(e),r=this._table=e.createElement("table");return this._setTableStyles(r),this._colgroup=e.createElement("colgroup"),r.appendChild(this._colgroup),this._tbody=e.createElement("tbody"),r.appendChild(this._tbody),t.appendChild(r),t}_doModelChanged(e){e&&(e.onCellChanged=null),this.model&&(this.model.onCellChanged=this.$_cellChanged.bind(this))}$_refreshRowCells(e,t,r,i=!1){const s=this.container;for(let A of this._tcells){i&&(A._modelChanged=!0);const n=Utils.pickNum(A.dom.offsetWidth,t);A.measure(e,n,r);const o=A.getChild(0);A.layoutContent(e),s?s._drawElement(o):o.drawRecursive()}const A=this.model.getMinRowHeight();if(!isNaN(A)){const e=A+"px",t=this._tbody.rows;for(let r=0;r<t.length;r++){t[r].offsetHeight<A&&(t[r].style.height=e)}}}_isEmpty(){return 0==this.model.colCount}_doMeasure(e,t,r,i){const s=this.model;return this.$_prepareTable(s,this._tbody),this._setModelSize(s,t,r,i,!0),this.$_measureCellWidths(s,this._modelWidth||r),this.$_measureRowHeights(s,this._modelHeight||NaN),super._doMeasure(e,t,r,i),this.$_refreshRowCells(e,r,i),e.printing?this._table.dataset._m_=t.dataset._m_:(this._table.dataset._m_=s.shash,this._table.style.border="1px solid rgba(55, 55, 55, 0.1)"),new Size(this._table.offsetWidth,this._table.offsetHeight)}_doLayoutContent(e){super._doLayoutContent(e)}clear(){if(this._ecells&&this._ecells.length&&(this._ecells.forEach((e=>Utils.remove(e))),this._ecells=null),this._tcells&&this._tcells.length)return this._tcells.forEach((e=>Utils.remove(e._dom))),this._tcells=null,!0}_buildItems(e,t,r){function i(e,t){let r=parseInt(h[e]);for(let i=1;i<t;i++)r+=parseInt(h[e+1]);return r>0?r+"px":""}function s(e,t){return e&&0!==t?Math.max(0,parseInt(e)-t)+"px":e}const A=this.doc,n=r.rowCount,o=r.colCount,a=this._tbody.rows,l=this._spans,h=this._rowHeights;this._tcells=[],this._ecells=[];for(let t=0;t<n;t++){const n=a[t];for(let a=0;a<o;a++){const o=n.cells[a],c=r.getCellItemAt(t,a);if(e.printing||(o.dataset.design=""),0===l[t][a].r||0===l[t][a].c)o.removeAttribute("colspan"),o.removeAttribute("rowspan"),o.style.display="none";else{this._prepareCellStyles(e,r,t,a,o);const n=l[t][a].r,u=n>1?i(t,n):h[t],d=getComputedStyle(o),p=Utils.toInt(d.paddingTop)+Utils.toInt(d.paddingBottom);if(o.colSpan=l[t][a].c,o.rowSpan=n,c){const e=this._createCellElement(A,c);e._row=t,e._col=a,e._dom.style.maxHeight=s(u,p),this._prepareChild(e),o.appendChild(e._dom),this._tcells.push(e)}else{const e=A.createElement("div");e.className=TableCellElementBase.STYLE,e.innerHTML="&nbsp;",e.style.maxHeight=s(u,0),o.appendChild(e),this._ecells.push(e)}}}}}_prepareCellStyles(e,t,r,i,s){const A=t.getCell(r,i),n=A.applyEndStyles;let o=t.cellStyles;this._setStyles(t,o,s.style),o=t.getColumn(i).styles,this._setStyles(t,o,s.style),n&&s.colSpan>1&&(o=t.getColumn(i+s.colSpan-1).styles,this._setStyles(t,o,s.style)),o=t.rows.get(r).styles,this._setStyles(t,o,s.style),n&&s.rowSpan>1&&(o=t.rows.get(r+s.rowSpan-1).styles,this._setStyles(t,o,s.style)),o=A.styles,o&&(CELL_ALIGN in o?(o={...o},delete o.cellAlign,this._setStyles(t,o,s.style)):this._setStyles(t,o,s.style))}_prepareChild(e){e._dom.style.position="relative",e.positionable=!1}getFirst(){const e=this._spans;for(let t=0;t<e.length;t++){const r=e[t];for(let e=0;e<r.length;e++)if(r[e].r){const t=r[e].m;if(t)return this._findCell(t).firstChild}}}getLast(){const e=this._spans;for(let t=e.length-1;t>=0;t--){const r=e[t];for(let e=r.length-1;e>=0;e--)if(r[e].r){const t=r[e].m;if(t)return this._findCell(t).firstChild}}}_getPrev(e){const t=e.model,r=this._spans;let i=t.col;if(i>0){const e=t.row,s=r[e][i].v.rowspan||1;for(;--i>=0;)for(let A=0;A<s;A++){const s=r[e+A][i].m;if(s&&s.item!==t)return this._findCell(s).firstChild}}}_getNext(e){const t=this._spans,r=e.model,i=r.row;let s=r.col;if(s<t[i].length-1){const e=t[i][s].v.rowspan||1;for(;++s<t[i].length;)for(let A=0;A<e;A++){const e=t[i+A][s].m;if(e&&e.item!==r)return this._findCell(e).firstChild}}}getUpper(e){const t=this._spans,r=e.model;let i=r.row;if(i>0){const e=r.col,s=t[i][e].v.colspan||1;for(;--i>=0;)for(let A=0;A<s;A++){const s=t[i][e+A].m;if(s&&s.item!==r)return this._findCell(s).firstChild}}}getLower(e){const t=this._spans,r=e.model;let i=r.row;if(i<t.length-1){const e=r.col,s=t[i][e].v.colspan||1;for(;++i<t.length;)for(let A=0;A<s;A++){const s=t[i][e+A].m;if(s&&s.item!==r)return this._findCell(s).firstChild}}}get $_trows(){return this._tbody.rows}get $_trowsCopy(){return Array.from(this._tbody.rows)}$_cloneRow(e){const t=e.cloneNode(!1),r=e.cells;for(let e=0,i=r.length;e<i;e++){const i=r[e].cloneNode(!1),s=r[e].firstElementChild;s&&i.appendChild(s.cloneNode(!1)),t.appendChild(i)}return t}$_td(e,t){return this._tbody.rows[e].cells[t]}$_cellChanged(e,t,r){}$_prepareTable(e,t){const r=getDoc(t),i=e.rowCount,s=e.colCount;for(this._spans=e.prepareLayout(),this.$_prepareColGroup(r,this._colgroup,s);t.childElementCount<i;){const e=r.createElement("tr");t.appendChild(e)}for(;t.childElementCount>i;)t.removeChild(t.lastChild);const A=t.children;for(let t=0;t<i;t++){const i=A[t];this.$_prepareTableRow(r,e,t,i,s)}}_setRowStyles(e,t){}$_prepareColGroup(e,t,r){let i=t.childElementCount;for(;i++<r;){const r=e.createElement("col");t.appendChild(r)}for(;t.childElementCount>r;)t.removeChild(t.lastElementChild)}$_prepareTableRow(e,t,r,i,s){this._setRowStyles(i,r),this.$_prepareTableRowCells(e,i,s)}$_prepareTableRowCells(e,t,r){let i=t.childElementCount;for(;i++<r;){const r=e.createElement("td");t.appendChild(r)}for(;t.childElementCount>r;)t.removeChild(t.lastChild);return t.childElementCount}$_calcCellWidths(e,t){const r=e.colCount,i=(e.getCellWidths()||DimensionCollection.Empty).getSizes(r,t,e._minCellWidthDim,!1),s=[],A=this._colPts=[0];for(let e=0;e<r;e++)s[e]=i[e]+"px",A.push(A[e]+i[e]);return s}$_measureCellWidths(e,t){if(this._masterView)this._cellWidths=this._masterView._cellWidths,this._colPts=this._masterView._colPts;else{const r=e.colCount;this._tbody.rows.length>0&&r>0?this._cellWidths=this.$_calcCellWidths(e,t):this._cellWidths=[]}let r=0;if(this._cellWidths.length>0){const e=this._colgroup.children;for(let t=e.length-1;t>=0;t--){const i=e[t],s=i.style,A=parseFloat(this._cellWidths[t]);i.$_w=A,s.width=this._cellWidths[t],r+=A}}e.fixed?this._table.style.setProperty("width",Utils.pickNum(r,0)+"px","important"):this._table.style.setProperty("width","100%","important")}$_calcRowHeights(e,t){const r=(e.getRowHeights()||DimensionCollection.Empty).getSizes(e.rowCount,t,e._minRowHeightDim),i=[];for(let t=0,s=e.rowCount;t<s;t++)isNaN(r[t])?i[t]="":i[t]=r[t]+"px";return i}$_measureRowHeights(e,t){const r=this._tbody.rows,i=this._rowHeights=this.$_calcRowHeights(e,t);for(let e=0;e<r.length;e++){const t=i[e];r[e].style.height=t}}getCellBoundingRect(e,t,r,i){const s=this._tbody.rows,A=this._colPts[0]-s[0].cells[0].offsetLeft;let n=this._colPts[e]-A,o=s[t].offsetTop,a=this._colPts[e+r]-A-n-1,l=0;for(let e=0;e<i;e++)l+=s[t+e].offsetHeight;return{x:n,y:o,width:a,height:l}}$_layoutViewInCell(e,t){const r=this.model;let i=-1,s=-1;const A=t instanceof TableCell&&t.table instanceof TableContainer?1:0;if(t instanceof TableCell&&t.table===r&&(i=t.row,s=t.col),e.visible=s>=0&&i<r.rowCount){const t=this._tbody.rows[i].cells[s],r=t.colSpan||1,n=t.rowSpan||1,o=this._colPts[s],a=this._colPts[s+r]-o,l=this._tbody.rows;let h=l[i].offsetHeight,c=0;for(let e=0;e<i;e++)c+=l[e].offsetHeight;for(let e=0;e<n-1;e++)h+=l[i+e+1].offsetHeight;return e.dom.dataset.focused="",e.setBounds(o,c+1,a,h+A),e.draw(),!0}}_findCell(e){for(let t of this._tcells)if(t.model===e)return t}createColGroup(e,t){const r=this.model,i=r.colCount,s=e.createElement("colgroup"),A=this.$_calcCellWidths(r,t);for(let t=0;t<i;t++){const r=e.createElement("col");s.appendChild(r),r.style.width=A[t],r.$_w=parseFloat(A[t])}return s}}class TableLine{constructor(e){this._rows=e.tBodies[0].rows}get height(){let e=0;for(let t=0;t<this._rows.length;t++)e+=this._rows[t].offsetHeight;return e}appendTo(e,t){if(!this._doms){this._doms=[];for(let e=0;e<this._rows.length;e++){const t=this._rows[e].cloneNode(!0);this._doms.push(t)}}for(let r of this._doms)r.classList.add(t),e.appendChild(r);for(let e of this._doms)e.style.height=e.offsetHeight+"px"}remove(){if(this._doms){for(let e=this._doms.length-1;e>=0;e--){const t=this._doms[e],r=t.parentElement;r&&r.removeChild(t)}this._doms=null}}}class PageSectionGuard extends ReportItemElement{get guardLabel(){return"[page]"}}class PageView extends LayerElement{constructor(e,t=!1){super(e,"pageView"),this.addChild(this._backView=new PageItemContainerElement(e,null,"rr-back-container",!1)),this.addChild(this._reportHeaderView=new ReportHeaderElement(e)),this.addChild(this._reportFooterView=new ReportFooterElement(e)),this.addChild(this._pageHeaderView=new PageHeaderElement(e)),this.addChild(this._pageFooterView=new PageFooterElement(e)),this.addChild(this._bodyView=new PageBodyElement(e)),this.addChild(this._frontView=new PageItemContainerElement(e,null,"rr-front-container",!1)),this._sections=[this._pageHeaderView,this._reportHeaderView,this._bodyView,this._reportFooterView,this._pageFooterView],this._sectionGuard=new PageSectionGuard(e)}_doDispose(){super._doDispose()}get model(){return this._model}get reportHeaderView(){return this._reportHeaderView}get reportFooterView(){return this._reportFooterView}get pageHeaderView(){return this._pageHeaderView}get pageFooterView(){return this._pageFooterView}get bodyView(){return this._bodyView}get backFloatingView(){return this._backView}get frontFloatingView(){return this._frontView}get sections(){return this._sections}isPageDom(e){return this.isDom(e)||this.bodyView.isPageDom(e)}measure(e,t){const r=t.width-2,i=t.height-2;let s=0;this._sectionGuard.model=this._model,this._model.clearStyles(this.dom.style),applyStyles(this._model,this._model.styles,this.dom.style);let A=this._backView;A.measureFixed=!0,A.measure(e,r,i),A.setBounds(0,0,r,i);const n=this._pageHeaderView.model;let o=this._pageHeaderView,a=o.setFixedSize(r).measure(e,r,i);s+=Utils.toNumber(n.spaceTop),o.setBounds(0,s,r,a.height),s+=a.height+Utils.toNumber(n.spaceBottom);const l=this._reportHeaderView.model;o=this._reportHeaderView,a=o.setFixedSize(r).measure(e,r,i),s+=Utils.toNumber(l.spaceTop),o.setBounds(0,s,r,a.height),s+=a.height+Utils.toNumber(l.spaceBottom);let h=i;const c=this._pageFooterView.model;o=this._pageFooterView,a=o.setFixedSize(r).measure(e,r,i),h-=a.height-Utils.toNumber(c.spaceBottom),o.setBounds(0,h,r,a.height),h-=Utils.toNumber(c.spaceTop);const u=this._reportFooterView.model;o=this._reportFooterView,a=o.setFixedSize(r).measure(e,r,i),h-=a.height-Utils.toNumber(u.spaceBottom),o.setBounds(0,h,r,a.height),h-=Utils.toNumber(u.spaceTop);const d=this._bodyView;a=d.measure(e,r,h-s),d.setBounds(0,s,r,a.height);const p=a.height-(h-s);p>0&&(this.pageFooterView.y+=p,this._reportFooterView.y+=p),A=this._frontView,A.setFixedSize(r).measure(e,r,i),A.setBounds(0,0,r,i);return{width:r,height:this._pageHeaderView.measuredHeight+this._reportHeaderView.measuredHeight+this._bodyView.measuredHeight+this._pageFooterView.measuredHeight+this._reportFooterView.measuredHeight}}layout(e,t){let r=this._pageHeaderView;r.layoutContent(e),r=this._reportHeaderView,r.layoutContent(e),r=this._reportFooterView,r.layoutContent(e),r=this._pageFooterView,r.layoutContent(e),this._bodyView.layoutContent(e),this._backView.layoutContent(e),this._frontView.layoutContent(e)}layoutFloating(e){this._pageHeaderView.layoutFloating(e),this._reportHeaderView.layoutFloating(e),this._reportFooterView.layoutFloating(e),this._pageFooterView.layoutFloating(e),this._bodyView.layoutFloating(e),this._backView.layoutFloating(e),this._frontView.layoutFloating(e)}afterRender(e){const t=this._backView.width,r=this._backView.height;this._backView.measure(e,t,r),this._backView.layoutContent(e),this._frontView.measure(e,t,r),this._frontView.layoutContent(e)}findElement(e){return this._bodyView.findElement(e)||this._backView.findElement(e)||this._frontView.findElement(e)||this._pageHeaderView.findElement(e)||this._pageFooterView.findElement(e)||this._reportHeaderView.findElement(e)||this._reportFooterView.findElement(e)}findElementOf(e){return this._pageHeaderView.findElementOf(e)||this._pageFooterView.findElementOf(e)||this._reportHeaderView.findElementOf(e)||this._reportFooterView.findElementOf(e)||this._bodyView.findElementOf(e)||this._backView.findElementOf(e)||this._frontView.findElementOf(e)}getElementOf(e){if(e===this._bodyView.model)return this._bodyView;for(let t of this._sections)if(t instanceof ReportItemElement&&t.model===e)return t;return this._bodyView.getElementOf(e)||this._backView.getElementOf(e)||this._frontView.getElementOf(e)||this._pageHeaderView.getElementOf(e)||this._pageFooterView.getElementOf(e)||this._reportHeaderView.getElementOf(e)||this._reportFooterView.getElementOf(e)}getAllElements(e,t){function r(e,t){(e instanceof TableElement?e.cellViews:e.elements).forEach((e=>{e instanceof TableCellElementBase?e.getChild(0)instanceof ReportItemElement&&t.push(e.getChild(0)):e instanceof ReportGroupItemElement?r(e,t):e instanceof ReportItemElement&&t.push(e)}))}const i=[];e?(t.translate(-e.dom.offsetLeft,-e.dom.offsetTop),r(e,i),t.translate(e.dom.offsetLeft,e.dom.offsetTop)):this.sections.forEach((e=>{t.translate(-e.dom.offsetLeft,-e.dom.offsetTop),r(e,i),t.translate(e.dom.offsetLeft,e.dom.offsetTop)}));const s=this.getBoundingRect();return t.translate(s.x,s.y),i.filter((e=>{const r=e.getBoundingRect();return t.intersects(r)}))}print(e,t,r){const i=this.width;this._model.clearStyles(this.dom.style),applyStyles(this._model,this._model.styles,this.dom.style),this.setPrintStyles(),this._backView.setBounds(0,0,i,this.height),this._backView.print(e,t,i),this._frontView.setBounds(0,0,i,this.height),this._frontView.print(e,t,i),[[this._pageHeaderView,"header"],[this._pageFooterView,"footer"],[this._reportHeaderView,"reportHeader"],[this._reportFooterView,"reportFooter"]].forEach((r=>{!function(r,s){const A=r.model;A.visible?t[s+"Height"]=r.$_h=r.print(e,t,i)+Utils.toNumber(A.spaceTop)+Utils.toNumber(A.spaceBottom):t[s+"Height"]=r.$_h=0}(r[0],r[1])})),t.bodyTop=t.headerHeight,t.bodyBottom=t.pageHeight-t.footerHeight,t.bodyHeight=t.bodyBottom-t.bodyTop;const s=this._bodyView.printAll(e,t),A=Math.max(1,s.pages.length),n=[];t.finishPrint(A);for(let e=0;e<A;e++){const r=new PrintPage,i=r.contents;let o;t.preparePage(e),n.push(r);for(let e of t.contextValues)e.refreshPrintValues(t);if(r.background=this._backView.cloneNode(),o=this._pageHeaderView.cloneNode(),o.$_h=this._pageHeaderView.$_h,r.pageHeader=o,o=this._pageFooterView.cloneNode(),o.$_h=this._pageFooterView.$_h,r.pageFooter=o,0==e&&(o=this._reportHeaderView.cloneNode(),o.$_h=this._reportHeaderView.$_h,i.push(o)),s.pages.length>e){const t=s.pages[e];for(let e of t)i.push(e)}e==A-1&&(o=this._reportFooterView.cloneNode(),o.$_h=this._reportFooterView.$_h,i.push(o)),r.foreground=this._frontView.cloneNode()}return n}getSections(){let e=[this._sectionGuard];return this._pageHeaderView.visible&&e.push(this._pageHeaderView),this._reportHeaderView.visible&&e.push(this._reportHeaderView),e=e.concat(this._bodyView.getLines()),this._reportFooterView.visible&&e.push(this._reportFooterView),this._pageFooterView.visible&&e.push(this._pageFooterView),e}isLine(e){return e instanceof SectionElement||this._bodyView.isLine(e)}getFirst(){if(this._pageHeaderView.visible)return this._pageHeaderView.getFirst()}getLast(){if(this._pageFooterView.visible)return this._pageFooterView.getLast()}getFirstInGroup(e){return null==e?void 0:e.getFirst()}getLastInGroup(e){return null==e?void 0:e.getLast()}getPrev(e){var t;if(e instanceof SectionElement);else if(e){let r=null===(t=e.navigableParent)||void 0===t?void 0:t.getPrev(e);if(r&&r!==e)return r}}getNext(e){if(e instanceof SectionElement);else if(e){let t=e.navigableParent;if(t){let r=t.getNext(e);if(r&&r!==e)return r;for(t=t.navigableParent;t;)t.getLeaves(),t=t.navigableParent}}}getLeft(e){var t;if(e instanceof SectionElement);else if(e){let r=null===(t=e.navigableParent)||void 0===t?void 0:t.getLeft(e);if(r&&r!==e)return r;if(this._bodyView.isLine(e))return}}getRight(e){var t;if(e instanceof SectionElement);else if(e){let r=null===(t=e.navigableParent)||void 0===t?void 0:t.getRight(e);if(r&&r!==e)return r;if(this._bodyView.isLine(e))return}}getUpper(e){var t;if(e instanceof SectionElement){const t=this._sections.indexOf(e);if(t>0){const e=this._sections[t-1];return e instanceof ReportItemElement?e:this._bodyView.getLine(-1)}}else if(e){let r=null===(t=e.navigableParent)||void 0===t?void 0:t.getUpper(e);if(r&&r!==e)return r;if(e.navigableParent===this._reportHeaderView)return this._pageHeaderView;if(r=this._bodyView.getLineOf(e),r&&(r=this._bodyView.getSiblingLine(r,-1),r))return r}return this.getFirst()}getLower(e){var t;if(e instanceof SectionElement){const t=this._sections.indexOf(e);if(t<this._sections.length-1){const e=this._sections[t+1];return e instanceof ReportItemElement?e:this._bodyView.getLine(0)}}else if(e){let r=null===(t=e.navigableParent)||void 0===t?void 0:t.getLower(e);if(r&&r!==e)return r;if(e.navigableParent===this._pageHeaderView)return this._reportHeaderView;if(e.navigableParent===this._reportHeaderView)return this._bodyView.getLine(0);if(r=this._bodyView.getLineOf(e),r)return r=this._bodyView.getSiblingLine(r,1),r||(r=this._reportFooterView,r.visible?r:(r=this._pageFooterView,r.visible?r:void 0))}return this.getFirst()}itemOfDom(e){let t;if(t=this._frontView.itemOfDom(e))return t;for(let r of this._sections)if(r instanceof ReportGroupItemElement&&(t=r.itemOfDom(e)))return t;return(t=this._bodyView.itemOfDom(e))||(t=this._backView.itemOfDom(e))?t:void 0}_getCssSelector(){return this.container.printing?"":"rr-page"}$_setModel(e){this._model=e,e?(this._reportHeaderView.model=e.reportHeader,this._reportFooterView.model=e.reportFooter,this._pageHeaderView.model=e.pageHeader,this._pageFooterView.model=e.pageFooter,this._bodyView.model=e.body,this._backView.model=e._backItems,this._frontView.model=e._frontItems):(this._reportHeaderView.model=null,this._reportFooterView.model=null,this._pageHeaderView.model=null,this._pageFooterView.model=null,this._bodyView.model=null,this._backView.model=null,this._frontView.model=null)}}class PrintPage{constructor(){this.contents=[]}}const DEC_SEP=".",GRP_SEP=",",decimalPlaces=function(e){var i=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},_isRoundChar=function(e){return Utils.included(e,"c","f","C","F","a","A")};class NumberFormatter{constructor(e){this._optDecimal=!1,this._groupPos=0,this._replacement="$&,",this._minDigits=0,this._maxDigits=0,this._minInts=0,this._maxInts=0,this.parse(this._format=e)}static getFormatter(e){let t=NumberFormatter.Formatters[e];return t||(NumberFormatter.Formatters[e]=t=new NumberFormatter(e)),t}static get Default(){return NumberFormatter.getFormatter(NumberFormatter.DEFAULT_FORMAT)}get format(){return this._format}get separator(){return this._seperator}get groupSep(){return this._groupSep}get minDigits(){return this._minDigits}get maxDigits(){return this._maxDigits}parse(e){this._minDigits=0,this._maxDigits=0,this._minInts=0,this._maxInts=0,this._parse(e)}getText(e,t=!0){let r=Number(e);if(isNaN(r))return"";{let e=this._minDigits,s=0;if(this._optDecimal){const t=(i=(""+r).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0;e=Math.min(Math.max(t,this._minDigits),this._maxDigits)}if(e>0&&this._round)switch(s=Math.pow(10,e),this._round){case"c":r=Math.ceil(s*r)/s;break;case"f":const t=r.toString().split(".");r=parseFloat(t.length>1?t[0]+"."+t[1].substr(0,e):t[0])}r="a"===this._round?Math.abs(r):r,r=Number(r.toPrecision(15));let A=r.toFixed(e);try{!t&&(s=parseFloat(A))===Math.abs(parseFloat(A))&&0===s&&(A=Math.abs(r).toFixed(e))}catch(e){}return this._seperator&&(A=A.replace(".",this._seperator)),this._reg?e?A.replace(this._regDecimal,this._replacement):A.replace(this._reg,this._replacement):A}var i}_parse(e){if(e&&(e=e.trim()),!e)return;var t=".",r=",";if(e.indexOf(";")>-1){const i=e.split(";");e=i[0],i.length>1&&i[1]&&!_isRoundChar(i[1])&&(t=i[1]),i.length>2&&i[2]&&!_isRoundChar(i[2])&&(r=i[2]),this._round=i[3]||i[2]||i[1],this._round=_isRoundChar(this._round)?this._round.toLowerCase():this._round}this._seperator="."==t?null:t,this._groupSep=","==r?null:r;const i=e.length,s=e.indexOf(".");if(this._optDecimal=e.indexOf("#",s)>0,s>=0){let t=s+1;for(;t<i&&"0"==e.charAt(t);t++)this._minDigits++,this._maxDigits++;for(;t<i&&"#"==e.charAt(t);t++)this._maxDigits++;e=e.substr(0,s)}if(e){const t=e.length;","==e.charAt(t-1)&&(this._groupPos=3,e=e.substr(0,t-1))}if(e){const t=e.length;let r=!0;for(let i=t-1;i>=0;i--){const s=e.charAt(i);if("0"==s&&r)this._minInts++,this._maxInts++;else if(0==this._groupPos&&","==s)this._groupPos=t-i-1;else{if("#"!=s)break;r=!1}}}this._groupPos>0&&(this._replacement="$&"+r,this._reg=new RegExp("\\d(?=(\\d{"+this._groupPos+"})+($|\\"+t+"))","g"),this._regDecimal=new RegExp("\\d(?=(\\d{"+this._groupPos+"})+\\"+t+")","g"))}}NumberFormatter.DEFAULT_FORMAT="#,##0.0",NumberFormatter.Formatters={};class BooleanFormatter{constructor(e){this.$_parse(this._format=e)}static getFormatter(e){let t=BooleanFormatter.Formatters[e];return t||(BooleanFormatter.Formatters[e]=t=new BooleanFormatter(e)),t}get format(){return this._format}getText(e){return void 0===e?this._nullText:e?this._trueText:this._falseText}$_parse(e){if(this._falseText=this._trueText=null,e){var t=e.split(/[;\:]/);this._falseText=t[0],t.length>0&&(this._trueText=t[1]),t.length>1&&(this._nullText=t[2])}}}BooleanFormatter.Formatters={};const DUMMY_PATTERN=/(.*)/,DUMMY_REPLACE="$1";class TextFormatter{constructor(e){this._pattern=DUMMY_PATTERN,this._replace="$1",this.$_parse(this._format=e)}static getFormatter(e){let t=TextFormatter.Formatters[e];return t||(TextFormatter.Formatters[e]=t=new TextFormatter(e)),t}get format(){return this._format}getText(e){return e&&e.replace(this._pattern,this._replace)}$_parse(e){if(e){const t=e.trim().split(Utils.colonreg);if(t.length>1){let e=t[0].trim(),r=t[1].trim();e&&r&&('"'==e.charAt(0)&&(e=e.substr(1,e.length-2)),e&&('"'==r.charAt(0)&&(r=e.substr(1,r.length-2)),r&&(this._pattern=new RegExp(e,t[2]||""),this._replace=r)))}}}}TextFormatter.Formatters={};class TextItemElementBase extends ReportItemElement{constructor(e,t,r){super(e,t,r)}_doDispose(){super._doDispose()}get debugLabel(){return""}_initDom(e,t){super._initDom(e,t),t.style.overflow="hidden",this._table=e.createElement("div"),this._table.style.display="inline-table",this._table.style.height="100%",t.appendChild(this._table),this._span=e.createElement("span"),this._span.style.display="table-cell",this._span.style.verticalAlign="middle",this._table.appendChild(this._span)}_doPrepareMeasure(e,t){super._doPrepareMeasure(e,t),e.contextable&&this.model.isContextValue()&&e.contextValues.push(this),e.printing&&(this._span.dataset._m_=t.dataset._m_||String(this.model.hash),this._span.classList.add(TextItemElement.SPAN))}_doMeasure(e,t,r,i){const s=this.model,A=this._span,n=t.style;let o;if(Utils.addChild(t,this._table),t.style.display="inline-table",t.style.lineHeight="1.1em",this._span.style.verticalAlign=s.getStyle("verticalAlign"),this._span.style.textDecoration=s.getStyle("textDecoration"),t.style.width="",t.style.height="",this._setModelSize(s,t,r,i),n.whiteSpace=s.wrap?"pre-wrap":"pre",e.printing)o=this._getPrintText(e,s),this._setBindMarker(!1);else{const e=s.value,t=e&&e.startsWith("${");o=this._getDesignText(s,t),e?this._setBindMarker(!0,t):this._setBindMarker(!1)}this._text=o=o||"",A.textContent=s.wrap?o:o.replace(/(\r\n|\r|\n)/gm,""),!e.printing&&o&&(t.title=o);let a=this._modelWidth,l=this._modelHeight;return isNaN(a)?(A.style.maxWidth="",a=t.offsetWidth,"italic"===s.getStyle("fontStyle")&&(a+=Math.max(1,.04*A.offsetWidth)),a=Math.ceil(a)+1):A.style.maxWidth=a+"px",isNaN(l)?(A.style.maxHeight="",l=Math.round(t.offsetHeight)):l<t.offsetHeight&&(t.style.lineHeight=l+"px"),new Size(a,l)}_doLayoutContent(e){}refreshPrintValues(e){this._span.textContent=this._getPrintText(e,this.model)}isDom(e){return e===this._span||super.isDom(e)}_getText(e,t){const r=typeof t;let i=t;if("string"===r){if(t){const r=e.textFormat;if(r){const e=TextFormatter.getFormatter(r);e&&(i=e.getText(t))}}}else if("number"===r){const r=e.numberFormat;if(r){const e=NumberFormatter.getFormatter(r);e&&(i=e.getText(t))}}else if(t instanceof Date){const r=e.dateFormat;if(r){const e=DatetimeFormatter.getFormatter(r);e&&(i=e.getText(t))}}else if("boolean"===r){const r=e.booleanFormat;if(r){const e=BooleanFormatter.getFormatter(r);e&&(i=e.getText(t))}}return Utils.isDefined(i)&&""!==i?e.prefix||e.suffix?(e.prefix||"")+i+(e.suffix||""):String(i):i}}TextItemElementBase.CLASS_NAME="rr-text",TextItemElementBase.CLASS_LIST=TextItemElementBase.CLASS_NAME+" rr-item-element",TextItemElementBase.SPAN="_rr_span_";class TextItemElement extends TextItemElementBase{constructor(e,t){super(e,t,"textItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return TextItemElementBase.CLASS_LIST}get guardLabel(){return"text"}get editable(){return!0}getEditText(){return this.model.text}setEditText(e,t){e.setItemProperty(this.model,"text",t)}_getPrintText(e,t){const r=t.contextValueCallback;if(r){const i=r(e);return this._getText(t,i)}if(t.value){const r=this.getPrintValue(e,t);return this._getText(t,r)}{const r=this._runValueCallback(e,t,void 0);return void 0!==r?this._getText(t,r):t.text}}_getDesignText(e,t){return e.value?t?e.value:"["+e.value+"]":e.text||"[text]"}_doMeasure(e,t,r,i){const s=this.model;if(!e.printing){s.value||s.text?delete t.dataset.empty:t.dataset.empty=""}let A=super._doMeasure(e,t,r,i);if(s.multiLine){const e=this._text.split(/\r|\c\r|\<br\>/g),r=this.$_prepareMultiLine(this.doc,this.model,e);if(r){const i=r.length,n=1,o=Utils.pickNum(s.lineGap,0);let a=0,l=0;const h=[0],c=[];Utils.remove(this._table),Utils.addChild(t,this._spanContainer),t.title=e.join(" "),t.style.lineHeight="",r.forEach(((t,r)=>{t.style.textDecoration=s.getStyle("textDecoration"),t.textContent=e[r],t.style.maxWidth="";let A=t.offsetWidth;"italic"===s.getStyle("fontStyle")&&(A+=Math.max(1,.04*t.offsetWidth)),A=Math.ceil(A)+n,a=Math.max(a,A),c.push(A),l+=t.offsetHeight,r<i-1&&(l+=o),h.push(l)}));let u=0;if(!isNaN(this._modelHeight)){switch(s.getStyle("verticalAlign")){case"middle":u=Math.max(0,(this._modelHeight-l)/2);break;case"bottom":u=this._modelHeight-l}l=this._modelHeight}return isNaN(this._modelWidth)||(a=this._modelWidth),r.forEach(((e,t)=>{e.style.top=h[t]+u+"px";let r=0;switch(s.getStyle("textAlign")){case"center":r=Math.max(0,(a-c[t])/2);break;case"right":r=a-c[t]}e.style.left=r+"px"})),A.set(a,l)}}return this._spanContainer&&Utils.removeChild(t,this._spanContainer),A}$_prepareMultiLine(e,t,r){if(t.multiLine){if(this._spans||(this._spans=[]),!this._spanContainer){(this._spanContainer=e.createElement("div")).style.position="absolute"}for(;this._spans.length<r.length;){const t=e.createElement("span");t.style.position="absolute",t.style.whiteSpace="pre",this._spanContainer.appendChild(t),this._spans.push(t)}for(;this._spans.length>r.length;){const e=this._spans.pop()[0];this._spanContainer.removeChild(e)}}else this._spans&&(this._spans.forEach((e=>this._spanContainer.removeChild(e))),this._spans=null);return this._spans&&1===this._spans.length&&(this._spans=null),this._spans}}class ImageItemElement extends ReportItemElement{constructor(e,t){super(e,t,"imageItemView")}_doDispose(){super._doDispose()}get debugLabel(){return"image"}_getCssSelector(){return"rr-image rr-item-element"}_doMeasure(e,t,r,i){const s=this.model,A=s.image&&e.assets.getImage(s.image),n=t.style;let o=A||s.url;return e.printing&&!this._image&&(this._image=new Image),e.printing&&!o&&(o=this.getPrintValue(e,s)),this._setModelSize(s,t,r,i),o?(n.overflow="hidden",n.backgroundImage="url("+o+")",n.backgroundRepeat="no-repeat",n.backgroundSize="cover",n["-webkit-print-color-adjust"]="exact",delete t.dataset.empty,t.innerHTML="",this._image&&(this._image.src=o)):(t.dataset.empty="true",t.innerHTML="<span></span>"),new Size(t.offsetWidth,t.offsetHeight)}}class CheckItemElement extends ReportItemElement{constructor(e,t){super(e,t,"checkItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-check rr-item-element"}get debugLabel(){return""}isDom(e){return e===this._check||e===this._text||e===this._text.parentElement||super.isDom(e)}_initDom(e,t){super._initDom(e,t),t.style.overflow="hidden",t.style.whiteSpace="nowrap";const r=e.createElement("div");r.style.display="table-cell",r.style.verticalAlign="middle",t.appendChild(r),this._check=e.createElement("span"),this._check.className=CheckItemElement.CHECK_CLASS,this._check.style.display="inline-block",this._check.style.verticalAlign="middle",r.appendChild(this._check),this._text=e.createElement("span"),this._text.className=CheckItemElement.TEXT_CLASS,r.appendChild(this._text)}_doMeasure(e,t,r,i){const s=this.model,A=e.printing?Utils.pick(this.getPrintValue(e,s),s.checked):s.checked,n=this._check,o=this._text;this._setModelSize(s,t,r,i,!0),n.dataset.checked=s.getChecked(A),o.textContent=s.getText(A);let a=Math.ceil(Math.max(n.offsetHeight,o.offsetHeight)),l=Math.ceil(n.offsetWidth)+Math.ceil(o.offsetWidth)+1;return"italic"===s.getStyle("fontStyle")&&(l+=Math.max(1,.04*o.offsetWidth)),l=Math.ceil(l),e.printing&&(this._check.dataset._m_=t.dataset._m_),Size.create(l,a)}}CheckItemElement.CHECK_CLASS="rr-check-check",CheckItemElement.TEXT_CLASS="rr-check-text";class ListCellElement extends ReportGroupItemElement{constructor(e,t,r){super(e,r,"listCellView"),this._list=t}_doDispose(){super._doDispose()}get debugLabel(){return""}get navigable(){return!1}get navigableParent(){return this._list}_needContentBox(){return!1}_isEmptySize(){return!0}_getParentDom(){return this._div}_createDom(e){const t=e.createElement("li"),r=this._div=e.createElement("div");return t.appendChild(r),r.className="rr-list-cell",r.style.position="relative",r.style.setProperty("display","inline-block","important"),t}_prepareChild(e){e._dom.style.position="relative",e.positionable=!1}_doMeasure(e,t,r,i){return super._doMeasure(e,t,r,i)}}class ListContainerElement extends ReportGroupItemElement{constructor(e,t){super(e,t,(t&&t.ordered?"o":"u")+"listContainerView")}_doDispose(){super._doDispose()}get debugLabel(){return"list"}_getCssSelector(){return"rr-list-container rr-group-element"}_needDesignBox(){return!0}_needContentBox(){return!1}_getParentDom(){return this._list}_createDom(e){const t=super._createDom(e);t.style.overflow="hidden";const r=this._list=e.createElement(this.name.startsWith("o")?"ol":"ul");return t.appendChild(r),t}_initDom(e,t){super._initDom(e,t);const r=this._list.style;r.marginBlockStart="0",r.marginBlockEnd="0",r.paddingInlineStart=ListContainerElement.ITEM_INDENT+"px"}_createElement(e,t,r){const i=new ListCellElement(this.doc,this,r);return i.positionable=!1,this._prepareChild(i),t.addChild(i),i}_prepareChild(e){e._dom.style.position="relative",e.positionable=!1}_doMeasure(e,t,r,i){return this.measureFixed?(t.style.width="",t.style.height=""):this._setModelSize(this.model,t,r,i,!0),super._doMeasure(e,t,r,i)}_doAfterMeasure(e,t,r,i,s){this.childCount>0?this._applyBorders(t,s):e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=this.model.designHeight),!this.model.width&&this.model.designWidth>0&&(s.width=this.model.designWidth)),super._doAfterMeasure(e,t,r,i,s)}_doLayout(e){}getLower(e){for(let t=0,r=this.childCount;t<r;t++)if(this.getChild(t).firstChild===e&&t<r-1)return this.getChild(t+1).firstChild}getUpper(e){for(let t=0,r=this.childCount;t<r;t++)if(this.getChild(t).firstChild===e&&t>0)return this.getChild(t-1).firstChild}}ListContainerElement.ITEM_INDENT=16;class TableCellElement extends TableCellElementBase{constructor(e,t,r){super(e,t,r,"tableCellView")}_getCssSelector(){return"rr-table-cell"}}class TableContainerElement extends TableElement{constructor(e,t){super(e,t,"tableContainerView")}get columns(){return this.model.columns}get colCount(){return this.model.colCount}getColumn(e){return this.model.getColumn(e)}_getCssSelector(){return"rr-table-container rr-group-element"}_createCellElement(e,t){return new TableCellElement(e,this,t)}_prepareCellStyles(e,t,r,i,s){if(super._prepareCellStyles(e,t,r,i,s),e.printing){const A=t.getCell(r,i),n=A.styleCallback;if(n)try{const t=n(e,A,e.row);t&&Utils.extend(s.style,t)}catch(e){console.error("CellStyleCallback Error",e)}}}}class BandCollectionElement extends ReportGroupItemElement{constructor(e,t){super(e,t,"bandCollectionView")}_doDispose(){super._doDispose()}get debugLabel(){return""}_getCssSelector(){return"rr-band-collection rr-group-element"}_needDesignBox(){return!0}_initDom(e,t){super._initDom(e,t)}_doMeasure(e,t,r,i){const s=super._doMeasure(e,t,r,i);s.height=0;for(let e=0;e<this.childCount;e++)s.height+=this.getChild(e).measuredHeight;return s}_doAfterMeasure(e,t,r,i,s){this.childCount>0?this._applyBorders(t,s):e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=this.model.designHeight),!this.model.width&&this.model.designWidth>0&&(s.width=this.model.designWidth)),super._doAfterMeasure(e,t,r,i,s)}_doLayoutContent(e){super._doLayoutContent(e);const t=this,r=t.width;let i=0;for(let e=0,s=t.childCount;e<s;e++){const s=t.getChild(e);s.floating||(s.y=i,s.x=0+(r-s.width)/2,i+=s.height,i+=0,s.setPrintStyles())}}}class SimpleBandSectionElement extends StackContainerElement{constructor(e,t,r,i){super(e,t,r),this.styleName=i}_doDispose(){super._doDispose()}get debugLabel(){return""}_getCssSelector(){return this.styleName+" rr-group-element"}_needDesignBox(){return!0}_doAfterMeasure(e,t,r,i,s){this.childCount>0||e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=this.model.designHeight),!this.model.width&&this.model.designWidth>0&&(s.width=this.model.designWidth)),super._doAfterMeasure(e,t,r,i,s)}}class SimpleBandGroupSectionElement extends StackContainerElement{constructor(e,t,r){super(e,t,r)}applyGroupStyles(e){Utils.extend(e.style,this.model.styles)}_needDesignBox(){return!0}_doMeasure(e,t,r,i){const s=super._doMeasure(e,t,r,i);return s.width=r,s.height=Math.max(10,s.height),s}_doAfterMeasure(e,t,r,i,s){this.childCount>0?this._applyBorders(t,s):e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=Math.max(s.height,this.model.designHeight)),!this.model.width&&this.model.designWidth>0&&(s.width=Math.max(s.width,this.model.designWidth))),super._doAfterMeasure(e,t,r,i,s)}}class SimpleBandGroupHeaderElement extends SimpleBandGroupSectionElement{constructor(e,t){super(e,t,"simpleBandGroupHeader")}_getCssSelector(){return"rr-simpleband-group-header rr-group-element"}measure(e,t,r){return super.measure(e,t,r)}}class SimpleBandGroupFooterElement extends SimpleBandGroupSectionElement{constructor(e,t){super(e,t,"simpleBandGroupFooter")}_getCssSelector(){return"rr-simpleband-group-footer rr-group-element"}}class SimpleBandGroupElement extends ReportGroupItemElement{constructor(e,t){super(e,t,"simpleBandGroupView")}_doDispose(){super._doDispose()}get header(){return this._header}get footer(){return this._footer}_getCssSelector(){return"rr-simpleband-group rr-group-element"}_needDesignBox(){return!0}_doMeasure(e,t,r,i){return super._doMeasure(e,t,r,i),this._header=this.getChild(0),this._footer=this.getChild(1),Size.create(Math.max(this._header.measuredWidth,this._footer.measuredWidth),this._header.measuredHeight+this._footer.measuredHeight)}_doLayoutContent(e){super._doLayoutContent(e),e.printing||(this._header.y=0,this._footer.y=this._header.y+this._header.height)}}class SimpleBandElement extends BandElement{constructor(e,t){super(e,t,"simpleBandView"),this._groupViews=[],this._colSpans=[],this._grouped=!1,this._masterRow=-1,this._printedRows=NaN,this.addChild(this._headerView=new SimpleBandSectionElement(e,t&&t.header,"bandHeaderView",SimpleBandElement.HEADER_CLASS)),this.addChild(this._footerView=new SimpleBandSectionElement(e,t&&t.footer,"bandFooterView",SimpleBandElement.FOOTER_CLASS)),this.addChild(this._rowView=new SimpleBandSectionElement(e,t&&t.dataRow,"bandRowTemplateView",SimpleBandElement.ROW_CLASS)),this.addChild(this._detailView=new BandCollectionElement(e,t&&t.detail)),this._rowContainer=e.createElement("div"),this._dom.appendChild(this._rowContainer)}static isRow(e){return e.classList.contains(SimpleBandElement.ROW_CLASS)&&"r"===e.$_brt}_doDispose(){super._doDispose()}printBand(e,t,r,i,s,A=-1){const n=this.model,o=n.dataObj,a=n.sectionCount,l=a<2;let h=this._rowDivs;const c=l?null:n.getColPoints(r),u=t.pageHeight;if(s||n.prepareIndices(t),this._masterRow=A,n.dataRow.masterRow=A>=0?A:NaN,n.summaryRuntime.setRows(s,A),c&&(r=c[1]-c[0]),isNaN(this._rowView.measuredHeight)){let e=this._headerView;if((e.visible=e.model.visible)&&(e.measure(t,r,u),e.resize(e.measuredWidth,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t)),e=this._rowView,!h&&(e.measure(t,r,u),e.resize(e.measuredWidth,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t),l)){const i=n.designData,A=this.$_getGroupViews(t,n.groups.getValidGroups(i),r,u);h=this._rowDivs=this.$_printRows(t,o,A,e,r,s)}e=this._footerView,(e.visible=e.model.visible)&&(t.bandSummaryRuntime=n.summaryRuntime,e.measure(t,r,u),e.resize(e.measuredWidth,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t))}else l&&!h&&(h=this._rowDivs=this.$_printRows(t,o,null,this._rowView,r,s));l?this.$_printLinear(e,t,n,o,r,h,i):n.sectionLayout==BandSectionLayout.ACROSS_DOWN?this.$_printAcross(e,t,c,n,a,o,i):this.$_printDown(e,t,c,n,a,o,i),s&&(this._rowDivs=null)}addMasterRow(e,t,r,i){const s=t.cloneNode(!0),A=r.cloneNode(!0);e.appendChild(s),s.style.top=i+"px";const n=s.offsetHeight;return i+=n,e.appendChild(A),A.style.top=i+"px",n+A.offsetHeight}get headerView(){return this._headerView}get footerView(){return this._footerView}get rowTemplateView(){return this._rowView}get groupCount(){return this._groupViews.length}get detailView(){return this._detailView}getGroupView(e){return this._groupViews[e]}indexOfGroup(e){let t=-1;for(let r of this._groupViews)if(r.visible&&(t++,r.model===e))return t;return t}getRowPoints(){const e=[];this.headerView.visible&&e.push(this._headerView.y,this.headerView.height),e.push(this._rowView.y,this._rowView.height),this._footerView.visible&&e.push(this._footerView.y,this._footerView.height);for(let t of this._groupViews)t.visible&&e.push(t.y,t.height);return this.detailView.visible&&e.push(this._detailView.y,this._detailView.height),e}get debugLabel(){return"simple band"}_getCssSelector(){return"rr-band rr-group-element"}_needDesignBox(){return!0}get rowView(){return this._rowView}_isEmpty(){return this.model.sectionCount<2&&super._isEmpty()}$_prepareHeads(e){if(!this._headViews){const t=this.model;this._headViews={},this.addChild(this._headViews[this.shash]=new SectionHeadView(e,t,"SIMPLE BAND","SimpleBand","rr-band-head")),this.addChild(this._headViews[this._headerView.shash]=new SectionHeadView(e,t.header,"HEADER","SimpleBand Header")),this.addChild(this._headViews[this._footerView.shash]=new SectionHeadView(e,t.footer,"FOOTER","SimpleBand Footer")),this.addChild(this._headViews[this._rowView.shash]=new SectionHeadView(e,t.dataRow,"DATA ROW","SimpleBand Row Template"));for(let t of this._groupViews)this.addChild(this._headViews[t.shash]=new SectionHeadView(e,t.model,"GROUP-"+(t.model.index+1),"SimpleBand Group"));this.addChild(this._headViews[this._detailView.shash]=new SectionHeadView(e,t.detail,"DETAILS","SimpleBand Details"))}}_doMeasure(e,t,r,i){const s=this.model;let A,n=0,o=0;r=s.getColWidth(r);let a=this._headerView;if(!e.printing&&(a.visible=a.model.visible)&&(A=a.measure(e,r,i),n=Math.max(n,A.width),o+=A.height),e.printing||(a=this._rowView,A=a.measure(e,r,i),n=Math.max(n,A.width),o+=A.height),a=this._footerView,!e.printing&&(a.visible=a.model.visible)&&(e.bandSummaryRuntime=s.summaryRuntime,A=a.measure(e,r,i),n=Math.max(n,A.width),o+=A.height),this.$_prepareGroupViews(s,this.doc)>0&&(e.printing||(o+=this.$_measureGroupViews(s,e,r,i))),a=this._detailView,(a.visible=a.model.visible)&&(A=a.measure(e,r,i),n=Math.max(n,A.width),o+=A.height),!e.printing&&(this.$_prepareHeads(this.doc),this._headViews)){const t=this.container,s=null==t?void 0:t.focusedItem;for(let t in this._headViews){const a=this._headViews[t],l=a.model;A=a.measure(e,r,i),n=Math.max(n,A.width),o+=A.height+2,l.isAncestorOf(s)?a.dom.dataset.selected="":delete a.dom.dataset.selected}}return new Size(n,o)}_doLayoutContent(e){const t=this.model,r=!!this._headViews,i=t.sectionCount,s=t.getColWidth(this.width),A=2+8*t.bandLevel;let n,o,a=0;const l=e.printing?null:this._lines=[];r&&(o=this._headViews[this.shash],o.setBounds(A,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n=this._headerView,r&&(o=this._headViews[n.shash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,n.measuredWidth,n.measuredHeight),a+=n.height,n.setPrintStyles(),n.layoutContent(e)),null==l||l.push(n),n=this._rowView,r&&(o=this._headViews[n.shash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),e.printing||(n.setBounds((s-n.measuredWidth)/2,a,n.measuredWidth,n.measuredHeight),a+=n.height,n.setPrintStyles(),n.layoutContent(e)),null==l||l.push(n),n=this._footerView,r&&(o=this._headViews[n.shash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,n.measuredWidth,n.measuredHeight),n.setPrintStyles(),n.layoutContent(e),a+=n.height),null==l||l.push(n);for(let t of this._groupViews)r&&(o=this._headViews[t.shash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),t.setBounds((s-t.measuredWidth)/2,a,s,t.measuredHeight),t.setPrintStyles(),t.layoutContent(e),a+=t.height,null==l||l.push(t);n=this._detailView,r&&(o=this._headViews[n.shash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,n.measuredWidth,n.measuredHeight),a+=n.height,n.setPrintStyles(),n.layoutContent(e)),null==l||l.push(n),this._designView&&this.$_layoutCols(this.doc,i)}$_getHeadHeight(){return this._headViews[this.shash].height+1}_setDesignContent(e){const t=this.$_getHeadHeight();this._designView.style.top=t+"px",this._designView.style.height=this.height-t+"px",e&&super._setDesignContent(e)}getLines(){return this._lines}$_checkBlanks(e,t,r){const i=e.dataRow.blankItems;i&&i.forEach((i=>{if(e.dataRow.canBlank(i,t)){const e=r.children;for(let t=e.length-1;t>=0;t--){const s=e[t];if(s.dataset._m_===i.shash){r.removeChild(s);break}}}}))}$_printRows(e,t,r,i,s,A){function n(t,r,A,n=!1,o=0){const l=i.dom,h=(n||t>0)&&0===o,c=l.cloneNode(!h);if(h&&i.replaceDom(c),c.$_brb=o,c.$_brt="r",a.setPrinting(e,t),A){const i=A(e,r,t,void 0);i&&Utils.extend(c.style,i)}return h&&(e.bandSummaryRuntime=a.summaryRuntime,e.bandSummaryRuntime.setGroup(null),i._modelChanged=!0,i.measure(e,s,e.pageHeight),i.resize(i.measuredWidth,i.measuredHeight),i.setPrintStyles(),i.layoutContent(e)),h&&i.replaceDom(l),isNaN(r.masterRow)||(c.dataset.master=String(r.masterRow)),e.index++,c}function o(t,r,i,A){const n=r.dom,o=n.cloneNode(!1);return o.$_brt=A,e.bandSummaryRuntime=a.summaryRuntime,e.bandSummaryRuntime.setGroup(i),a.setPrinting(e,t),r.replaceDom(o),r._modelChanged=!0,r.measure(e,s,e.pageHeight),r.resize(r.measuredWidth,r.measuredHeight),r.setPrintStyles(),r.layoutContent(e),r.replaceDom(n),o}const a=this.model,l=a.dataRow,h=l.styleCallback,c=[];let u=A?A.length:t?t.rowCount:0;const d=u;a.maxRowCount>0&&(u=Math.min(u,a.maxRowCount));const p=a.getEndRowCount();if(!r&&p.endRowCount>0&&(this._endRowView||(this._endRowView=n(0,l,h,!1,1),Utils.clearChildren(this._endRowView)),a.endRowMessage&&(this._endMessageView=function(){const e=i.cloneNode(),t=i.doc.createElement("span");return e.$_brt="d",Utils.clearChildren(e),t.textContent=a.endRowMessage,t.className=BandElement.END_ROW_MESSAGE_CLASS,e.append(t),Object.assign(e.style,{display:"flex",alignItems:"center",justifyContent:"center",width:i.measuredWidth+"px",height:i.measuredHeight+"px"}),e}())),0===u&&!this._endRowView)return c;this._printedRows=u!==d?u:NaN;const g=a.pr;if(e.index=0,r&&u>0){const e=r.map((e=>e.visible&&e.model.field)).filter((e=>!!e)),i=t.groupBy(e,u);for(let e=0;e<i.length;e++){const t=i[e];if(Utils.isNumber(t))c.push(n(t,l,h));else if(t.parent){const e=r[t.level-1];e.header&&e.header.visible&&c.push(o(t.row,e.header,t,"gh"))}else{const e=r[t.group.level-1];e.footer&&e.footer.visible&&c.push(o(e.row,e.footer,t.group,"gf"))}}this._grouped=!0}else if(A)for(let e=0;e<u;e++)c.push(n(A[e],l,h,!0));else for(let e=0;e<u;e++)c.push(n(e,l,h));return a.setPrinting(e,g),c}$_prepareGroupViews(e,t){const r=e.groups.count,i=this._groupViews;for(;i.length>r;){const e=i.pop();e.dispose(),this.removeChild(e)}for(;i.length<r;){const e=new SimpleBandGroupElement(t,null);this.addChild(e),i.push(e)}return i.length}$_measureGroupViews(e,t,r,i){const s=e.groups,A=this._groupViews;let n=0;for(let e=0;e<s.count;e++)A[e].model=s.get(e),n+=A[e].measure(t,r,i).height;return n}$_getGroupViews(e,t,r,i){if(t){const s=[];for(let A of t){const t=this._groupViews[A.index];t.model=A,e._noValueCallback=!0;try{t.measure(e,r,i)}finally{e._noValueCallback=!1}s.push(t)}return s.length?s:null}}$_layoutCols(e,t){const r=this._colSpans;for(;r.length<t-1;){const t=e.createElement("span");t.className="rr-band-col",r.push(t),this._designView.appendChild(t)}const i=this.model.sectionGap,s=this.model.getColWidth(this.width),A=this.height-this.$_getHeadHeight();let n=s+i;for(let e=0;e<t-1;e++){const t=r[e];delete t.dataset.hidden,t.textContent=e+2+"",Utils.setBounds(t,n,0,s,A),n+=s+i}for(let e=t-1;e<r.length;e++)r[e].dataset.hidden="1"}$_createPage(e){const t=e.createElement("div");return t.dataset._m_=this.model.shash,t.dataset._page_="1",t.style.position="relative",this._rowContainer.appendChild(t),t}$_cloneRow(e,t,r,i){const s=this._rowView,A=s.dom,n=s.cloneNode();return e.bandSummaryRuntime=t.summaryRuntime,s.replaceDom(n),s.measure(e,i,e.pageHeight),s.resize(s.measuredWidth,s.measuredHeight),s.setPrintStyles(),s.layoutContent(e),s.replaceDom(A),n}$_printLinear(e,t,r,i,s,A,n){function o(i,s){const A=i.$_createPage(e);return t.yBand=F=0,s&&(x=t.y=t.bodyTop,assert(r.pr>0)),(isNaN(T)||!g||T<=0)&&(T=p),E.length||(v=0),c>0&&r.pageNo>0&&(r.repeatMasterRow&&function(e,t){const r=e.rowView.masterBandView,i=e.rowView.masterHeaderView,s=e.rowView.masterRowView,A=r.addMasterRow(t,i,s,F);F+=A,x+=A}(i,A),r.repeatDetailHeader&&a(i,A)),n.push(A),s&&r.pageNo++,A}function a(e,t){if(e._headerView.visible){b=e._headerView.dom.cloneNode(!0),t.appendChild(b);const r=b.offsetHeight;e._setY(b,F),F+=r,x+=r}}function l(e){const i=e._footerView;!m&&isNaN(e._printedRows)||(r.clearSummary(),t.bandSummaryRuntime=r.summaryRuntime.setRows(m,e._masterRow).setRowCount(e._printedRows),i.measure(t,s,t.pageHeight),i.resize(i.measuredWidth,i.measuredHeight),i.setPrintStyles(),i.layoutContent(t));let A=i.cloneNode();if(e._setY(A,F),S.appendChild(A),F+=L=A.offsetHeight,x+=L,x>O&&E.length&&B){let t=x,r=E.length-1;for(;r>=0&&t>O;)t-=E[r--].offsetHeight;if(t<=O){F-=x-t,e._setY(A,F-L),x=t;for(let e=E.length-1;e>r;e--)S.removeChild(E[e])}}x>O&&(S.removeChild(A),S=o(e,!0),x+=L,e._setY(A,F),S.appendChild(A)),t.yBand=F,t.y=x,t.h=t.bodyHeight-(x-t.bodyTop)}const h=i?i.rowCount:0,c=r.bandLevel,u=r.detail,d=this._grouped,{rowsPerPage:p,breakRowsPerPage:g}=r.getRowsPerPage(),_=r.pr,m=c>0?[]:null,f=this._endRowView;let w=this._endMessageView;const{endRowCount:C,stopEndRow:B}=r.getEndRowCount(w?1:0),E=[];let y,S,b,T,I,P,R,v=0,x=t.y,O=t.bodyBottom,F=t.yBand,L=0,D=!1;for(0==c?S=o(this,!1):(S=n[n.length-1],r.pageNo++,T=p),a(this,S);A.length>0||C>0&&v<C;){const i=r.pr,p=F===t.yBand&&(0===c||0===r.pageNo);if(p&&(x+L>O&&F>0&&(S=o(this,!0)),x!==t.bodyTop||0!==c&&0!==v||a(this,S)),I=P,I||(A.length>0?I=A[0]:w?(I=w,E.push(I)):(I=y=f.cloneNode(!0),I.$_brt="d",E.push(I))),p&&R&&"gh"!==I.$_brt)I=R.cloneNode(!0),this._setY(I,F),S.appendChild(I),I.$_h=I.offsetHeight,F+=L=I.$_h,x+=L,R=I;else if(this._setY(I,F),S.appendChild(I),I.$_h=L=I.offsetHeight,F+=L,x+=L,P=null,x>O&&(c>0||i>0))S.removeChild(I),E.pop(),P=I,E.length&&B?v=C:S=o(this,!0);else{const a=A.shift()||w||y,p="r"===a.$_brt;if(m&&p&&m.push(i),i>0&&!d&&p&&this.$_checkBlanks(r,i,a),!a.$_brb&&p&&r.setPrinting(t,i+1),d&&"gh"===a.$_brt&&(R=a),(p||a===w||a===y)&&(T--,v++,a===w&&(w=null)),D=!1,T<=0&&(A.length>0||C<=0||v===C)&&r.pr<h&&(c>0&&r.repeatDetailFooter&&(l(this),D=!0),(A.length>0||D)&&i<h&&(S=o(this,!0))),p&&u.count>0){t.y=x,t.h=t.bodyHeight-(x-t.bodyTop),t.yBand=F;for(let A=0;A<u.count;A++){const o=this._detailView.getChild(A),a=o.model;o.rowView.masterBandView=this,o.rowView.masterHeaderView=this._headerView.dom,o.rowView.masterRowView=I,a.pageNo=0,a.masterValues=r.getValues(t,i,a._masterFlds),a.detailRows=a.rowsPerMaster;const l=a.getNextDetailRows(t)||[];o.printBand(e,t,s,n,l,i)}S=n[n.length-1],x=t.y,F=t.yBand}}}if(0==c||r.pr>_){if(!D&&(l(this),D=!1,c>0&&p<Number.MAX_SAFE_INTEGER&&r.pr<h)){const r=this.$_createPage(e);t.yBand=F=0,t.y=t.bodyTop,x=t.bodyTop,n.push(r)}}else if(b){const e=b.offsetHeight;Utils.remove(b),F-=e,x-=e}D||(t.yBand=F,t.y=x,t.h=t.bodyHeight-(x-t.bodyTop))}$_printAcross(e,t,r,i,s,A,n){function o(e){if(e._headerView.visible){let t=0;for(let i=0;i<s;i++){const s=e._headerView.cloneNode();e._setPos(s,r[2*i],p),w.appendChild(s),t=Math.max(t,s.offsetHeight)}p+=t,u=h+=t}}const a=Math.min(i.endRowCount>=0?i.endRowCount:Number.MAX_SAFE_INTEGER,A?A.rowCount:0),l=this._headerView.offsetHeight;let h=t.y,c=t.bodyBottom,u=h,d=h,p=0,g=Math.min(s,a);const _=new Array(s),m=new Array,f=new Array;let w;w=this.$_createPage(e),n.push(w),l&&o(this);for(let e=0;e<g;e++)_[e]=[];for(;i.pr<a;){0===p&&l&&o(this);let A=-1,C=0;m.length=0;for(let e=0;e<g&&i.pr<a;e++){const n=r[2*e],o=r[2*e+1]-n,a=f.pop()||this.$_cloneRow(t,i,i.pr,o);m.push(a),this._setPos(a,n,p),w.appendChild(a);const l=a.$_h=a.offsetHeight;if(h+l>c){A=e;break}_[e].push(a),i.setPrinting(t,i.pr+1),e===s-1&&(u+=l),C=Math.max(C,l)}if(A>=0){for(let e of m)w.removeChild(e),f.push(e);u=h=t.bodyTop,p=0,A=-1,d=t.bodyTop,w=this.$_createPage(e),n.push(w)}else h+=C,p+=C,f.length=0}let C=0;if(a>0)for(let e=0;e<g;e++)_[e].length&&C++;const B=this._footerView.cloneNode(),E=i.footer.attachToBody,y=E?Math.min(C,s-1):s-1;this._setPos(B,r[2*y],(E?u:h)-d),w.appendChild(B);const S=B.offsetHeight;E?h=Math.max(h,u+S):h+=S,h>c&&(w.removeChild(B),w=this.$_createPage(e),n.push(w),this._setY(B,0),w.appendChild(B),h=t.bodyTop+S),t.y=h,t.h=t.bodyHeight-(h-t.bodyTop)}$_printDown(e,t,r,i,s,A,n){function o(e){for(let e=0;e<s;e++)p[e]=a,g[e]=[];if(f=0,e._headerView.visible){for(let t=0;t<s;t++){const i=e._headerView.cloneNode();e._setPos(i,r[2*t],c),m.appendChild(i),f=Math.max(f,i.offsetHeight)}c+=f,a+=f}}let a=t.y,l=t.bodyBottom,h=a,c=0;const u=Math.min(i.endRowCount>=0?i.endRowCount:Number.MAX_SAFE_INTEGER,A?A.rowCount:0);let d=Math.min(s,u);const p=new Array(s),g=new Array(s);let _,m,f=0;m=this.$_createPage(e),n.push(m),o(this);do{for(let A=0;A<s;A++){const d=r[2*A],w=r[2*A+1]-d;for(0===c&&(0===A?o(this):(c+=f,a+=f));i.pr<u;){const r=_||this.$_cloneRow(t,i,i.pr,w);_=null,this._setPos(r,d,c),m.appendChild(r),r.$_h=r.offsetHeight;const o=r.$_h;if(c+=o,a+=o,p[A]=a,g[A].push(r),a>l){m.removeChild(r),_=r,g[A].pop(),c=0,A==s-1?(m=this.$_createPage(e),n.push(m),h=t.bodyTop):h=n.length>1?t.bodyTop:t.y,a=h;break}i.setPrinting(t,i.pr+1)}}}while(i.pr<u);let w=0;if(u>1){let e=0;for(let t=0;t<g.length;t++)for(let r=0;r<g[t].length;r++)e+=g[t][r].$_h;const t=new Array(d);let i=Math.round(e/d);for(let e=0;e<d-1;e++){let s,A=g[e],n=0,o=0;for(;n<A.length;){if(o+=s=A[n].$_h,o>i){o-=s;break}n++}t[e]=o;const a=g[e+1];let l=0;for(;n<A.length;){const e=A.splice(n,1)[0];a.splice(l++,0,e)}let h=f;for(let t=0;t<a.length;t++)this._setPos(a[t],r[2*(e+1)],h),h+=a[t].$_h}t[s-1]=0;for(let e=0;e<g[s-1].length;e++)t[s-1]+=g[s-1][e].$_h;for(let e=0;e<2;e++)(()=>{for(let e=d-1;e>0;e--)for(;t[e]>t[e-1];){const i=g[e],s=g[e-1],A=i.shift(),n=A.$_h;let o=f;for(let e=0;e<i.length;e++)this._setY(i[e],o),o+=i[e].$_h;t[e]-=n,s.push(A),this._setX(A,r[2*(e-1)]),this._setY(A,t[e-1]+f),t[e-1]+=n}})();for(let e=0;e<d;e++){let t=g[e];if(p[e]=h+f,t.length>0){w=e+1;for(let r=0;r<t.length;r++)p[e]+=t[r].$_h}}}else{for(let e=0;e<s;e++)p[e]=h+f;w=u,w&&(p[0]+=g[0][0].$_h)}const C=this._footerView.cloneNode(),B=i.footer.attachToBody,E=B?Math.min(w,s-1):s-1,y=B?p[E]:0;a=p[0];for(let e=1;e<d;e++)a=Math.max(a,p[e]);this._setPos(C,r[2*E],(B?y:a)-h),m.appendChild(C);const S=C.offsetHeight;B?a=Math.max(a,y+S):a+=S,a>l&&(m.removeChild(C),m=this.$_createPage(e),n.push(m),this._setY(C,c=0),m.appendChild(C),a=t.bodyTop+S),t.y=a,t.h=t.bodyHeight-(a-t.bodyTop)}}SimpleBandElement.HEADER_CLASS="rr-band-header",SimpleBandElement.FOOTER_CLASS="rr-band-footer",SimpleBandElement.ROW_CLASS="rr-band-rowtemplate";class TableBodyLine{constructor(e,t,r){this._rows=[];for(let i=0;i<r;i++)this._rows.push(e[t+i])}get count(){return this._rows.length}get height(){if(isNaN(this._height)){this._height=0;for(let e of this._rows)this._height+=e.offsetHeight}return this._height}get group(){return this._rows[0].$_grp}get isGroup(){return!!this._rows[0].$_grp}get isRow(){return"r"===this._rows[0].$_brt}get isGroupHeader(){return"gh"===this._rows[0].$_brt}get isGroupFooter(){return"gf"===this._rows[0].$_brt}get first(){return this._rows[0]}get(e){return this._rows[e]}getCell(e,t){return this._rows[e].cells[t]}appendTo(e){for(let t of this._rows)e.appendChild(t),t.style.height=t.offsetHeight+"px"}detach(){for(let e=this._rows.length-1;e>=0;e--)Utils.detach(this._rows[e])}makeBlank(e,t){const r=this._rows[e].cells[t];Utils.remove(r.firstChild.firstChild)}hide(e,t){this._rows[e].cells[t].style.display="none"}clone(){const e=this._rows.map((e=>e.cloneNode(!0)));return new TableBodyLine(e,0,e.length)}}class TableDummyLine extends TableBodyLine{constructor(e,t,r){super(e,t,r),this._rows.forEach((e=>{e.$_brt="d";const t=e.cells,r=t.length;if(r>0){for(let e=0;e<r;e++)Utils.clearChildren(t[e]);t[0].innerHTML="&#160;"}}))}}class TableBandCellElement extends TableCellElementBase{constructor(e,t,r){super(e,t,r,"tableBandCellView")}}class TableBandSectionElement extends TableElement{constructor(e,t,r,i){super(e,t,r),this.styleName=i}get debugLabel(){return""}_getCssSelector(){return this.styleName+" rr-group-element"}_needDesignBox(){return!0}_createCellElement(e,t){return new TableBandCellElement(e,this,t)}_doMeasure(e,t,r,i){return super._doMeasure(e,t,r,i)}_doAfterMeasure(e,t,r,i,s){this.childCount>0?this._applyBorders(t,s):e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=Math.max(s.height,this.model.designHeight)),!this.model.width&&this.model.designWidth>0&&(s.width=Math.max(s.width,this.model.designWidth))),super._doAfterMeasure(e,t,r,i,s)}}class TableBandHeaderElement extends TableBandSectionElement{_setTableStyles(e){super._setTableStyles(e),e.style.setProperty("height","100%","important")}_setRowStyles(e,t){super._setRowStyles(e,t),Utils.extend(e.style,this.model.styles)}}class TableBandFooterElement extends TableBandSectionElement{_setTableStyles(e){super._setTableStyles(e),e.style.setProperty("height","100%","important")}_setRowStyles(e,t){super._setRowStyles(e,t),Utils.extend(e.style,this.model.styles)}}class TableBandDataRowElement extends TableBandSectionElement{applyCellStyles(e,t,r,i,s){const A=this.model,n=r.cells;for(let t=0;t<n.length;t++){const r=n[t].style;this._styles&&Utils.extend(r,this._styles),s&&Utils.extend(r,s);const o=A.getCell(i,n[t].cellIndex),a=o.styleCallback;let l=o.styles;if(l&&Utils.extend(r,l),a)try{const t=a(e,o,e.row);t&&Utils.extend(r,t)}catch(e){console.error("CellStyleCallback Error",e)}}}_setTableStyles(e){super._setTableStyles(e),e.style.setProperty("height","100%","important")}_setRowStyles(e,t){super._setRowStyles(e,t),this._styles={...this.model.styles}}}class TableBandBodyElement extends TableBandSectionElement{constructor(e,t){super(e,t,"tableBandBodyView","rr-tableband-body"),this._bandRowCount=0}get bandRowCount(){return this._bandRowCount}get endMessageView(){return this._endMessageView}get endRowView(){return this._endRowView}printRows(e,t,r,i,s,A){function n(t,r=!1,A=0){const n=r||t>0,o=i.$_trows,h=o.length,p=[];for(let r=0;r<h;r++){const s=o[r],h=n?i.$_cloneRow(s):s.cloneNode(!0);let c;u&&(c=u(e,a,t,void 0)),h.$_brt="r",h.$_brb=A,i.setCellDoms(s,h),i.applyCellStyles(e,l,h,r,c),p.push(h)}n&&(e.bandSummaryRuntime=l.summaryRuntime,e.bandSummaryRuntime.setGroup(null),l.setPrinting(e,t),i.$_refreshRowCells(e,s,d,!0));for(let e=0;e<h;e++)i.unsetCellDoms(p[e],o[e]),p[e].classList.add(TableBandElement.ROW_CLASS),isNaN(a.masterRow)||(p[e].dataset.master=String(a.masterRow)),0==A&&c.appendChild(p[e]);return e.index++,p}function o(t,r,i,A){const n=r.$_trows,o=n.length,a=[];for(let e=0;e<o;e++){const t=n[e],i=r.$_cloneRow(t);i.$_brt=A,r.replaceCellDoms(t,i),r.applyGroupStyles(i),a.push(i)}e.bandSummaryRuntime=l.summaryRuntime,e.bandSummaryRuntime.setGroup(i),l.setPrinting(e,t),r.$_refreshRowCells(e,s,d,!0),i.trows=o;for(let e=0;e<o;e++)a[e].$_grp=i,r.replaceCellDoms(a[e],n[e]),c.appendChild(a[e])}if(A)this._bandRowCount=0;else if(this._bandRowCount>0)return;const a=this.model,l=a.band,h=!!A,c=this._tbody,u=a.styleCallback,d=e.pageHeight;let p=h?A.length:t?t.rowCount:0;const g=p;l.maxRowCount>0&&(p=Math.min(p,l.maxRowCount));const _=l.getEndRowCount();if(!r&&_.endRowCount>0){if(!this._endRowView){const e=n(0,!1,1);this._endRowView=new TableDummyLine(e,0,e.length)}l.endRowMessage&&(this._endMessageView=function(){const e=i.$_trows[0].cloneNode(!0),t=new TableDummyLine([e],0,1),r=e.cells[0];return r.colSpan=e.cells.length,r.textContent=l.endRowMessage,r.className=BandElement.END_ROW_MESSAGE_CLASS,r.style.textAlign="center",e.classList.add(TableBandElement.ROW_CLASS),t}())}if(0===p&&!this._endRowView)return;const m=p!==g?p:NaN,f=l.pr;if(e.index=0,r){const e=r.map((e=>e.visible&&e.model.field)).filter((e=>!!e)),i=t.groupBy(e,p);for(let e=0;e<i.length;e++){const t=i[e];if(Utils.isNumber(t))n(t),this._bandRowCount++;else if(t.parent){const e=r[t.level-1];e.header&&e.header.visible&&(o(t.row,e.header,t,"gh"),this._bandRowCount++)}else{const e=r[t.group.level-1];e.footer&&e.footer.visible&&(o(e.row,e.footer,t.group,"gf"),this._bandRowCount++)}}}else if(A)for(let e=0;e<p;e++)n(A[e],!0),this._bandRowCount++;else for(let e=0;e<p;e++)n(e),this._bandRowCount++;return l.setPrinting(e,f),m}}class TableBandGroupSectionElement extends TableElement{constructor(e,t,r){super(e,t,r)}applyGroupStyles(e){Utils.extend(e.style,this.model.styles)}_needDesignBox(){return!0}_createCellElement(e,t){return new TableBandCellElement(e,this,t)}_doMeasure(e,t,r,i){const s=super._doMeasure(e,t,r,i);return s.height=Math.max(10,s.height),s}_doAfterMeasure(e,t,r,i,s){this.childCount>0?this._applyBorders(t,s):e.printing||(!this.model.height&&this.model.designHeight>0&&(s.height=Math.max(s.height,this.model.designHeight)),!this.model.width&&this.model.designWidth>0&&(s.width=Math.max(s.width,this.model.designWidth))),super._doAfterMeasure(e,t,r,i,s)}}class TableBandGroupHeaderElement extends TableBandGroupSectionElement{constructor(e,t){super(e,t,"tableBandGroupHeader")}_getCssSelector(){return"rr-tableband-group-header rr-group-element"}_setTableStyles(e){super._setTableStyles(e),e.style.setProperty("height","100%","important")}}class TableBandGroupFooterElement extends TableBandGroupSectionElement{constructor(e,t){super(e,t,"tableBandGroupFooter")}_getCssSelector(){return"rr-tableband-group-footer rr-group-element"}_setTableStyles(e){super._setTableStyles(e),e.style.setProperty("height","100%","important")}}class TableBandGroupElement extends ReportGroupItemElement{constructor(e,t){super(e,t,"tableBandGroupView"),this.headIndent=0}_doDispose(){super._doDispose()}get header(){return this._header}get footer(){return this._footer}_getCssSelector(){return"rr-tableband-group rr-group-element"}_needDesignBox(){return!0}_doMeasure(e,t,r,i){super._doMeasure(e,t,r,i);const s=this.container.focusedItem;this._header=this.getChild(0),!e.printing&&(this._header._masterView=this._masterView),this._footer=this.getChild(1),!e.printing&&(this._footer._masterView=this._masterView),e.printing||this._headerHead||(this.addChild(this._headerHead=new SectionHeadView(this.doc,this.model.header,"GROUP HEADER","TableBand RowGroup Header")),this.addChild(this._footerHead=new SectionHeadView(this.doc,this.model.footer,"GROUP FOOTER","TableBand RowGroup Footer")));let A=this._header.measuredHeight+this._footer.measuredHeight;if(!e.printing){let t=this._headerHead,n=t.measure(e,r,i);t.setSelected(s),A+=n.height+2,t=this._footerHead,n=t.measure(e,r,i),t.setSelected(s),A+=n.height+2}return Size.create(Math.max(this._header.measuredWidth,this._footer.measuredWidth),A)}_doLayoutContent(e){if(super._doLayoutContent(e),!e.printing){let e=0,t=this._headerHead;t.applyMeasure(),t.x=this.headIndent,t.y=e+2,e+=t.height+2,this._header.y=e,e+=this._header.height,t=this._footerHead,t.applyMeasure(),t.x=this.headIndent,t.y=e+2,e+=t.height+2,this._footer.y=e}}$_setMasterView(e){this._masterView=e}}class TableBandElement extends BandElement{constructor(e,t){super(e,t,"TableBandView"),this._groupViews=[],this._rowGap=2,this._colSpans=[],this._colWidth=0,this._grouped=!1,this._masterRow=-1,this._printedRows=NaN,this.addChild(this._headerView=new TableBandHeaderElement(e,t&&t.header,"bandHeaderView","rr-tableband-header")),this.addChild(this._rowView=new TableBandDataRowElement(e,t&&t.dataRow,"bandRowTemplateView","rr-tableband-row-template")),this.addChild(this._bodyView=new TableBandBodyElement(e,t&&t.dataRow)),this._bodyView.visible=!1,this.addChild(this._footerView=new TableBandFooterElement(e,t&&t.footer,"bandFooterView","rr-tableband-footer")),this.addChild(this._detailView=new BandCollectionElement(e,t&&t.detail)),this._lines=[this._headerView,this._rowView,this._footerView,this._detailView],this._rowContainer=e.createElement("div"),this._dom.appendChild(this._rowContainer)}_doDispose(){super._doDispose()}get columns(){return this.model.columns}get colCount(){return this.model.colCount}getColumn(e){return this.model.getColumn(e)}printBand(e,t,r,i,s,A=-1){const n=this.model,o=n.dataObj,a=n.sectionCount,l=a<2,h=l?null:n.getColPoints(r);if(s||n.prepareIndices(t),this._masterRow=A,n.dataRow.masterRow=A>=0?A:NaN,n.summaryRuntime.setRows(s,A),this._colWidth=n.getColWidth(r),h&&(r=this._colWidth),isNaN(this._rowView.measuredHeight)){let e=this._headerView;if((e.visible=e.model.visible)&&(e.resetStyleName(),e.measure(t,r,t.pageHeight),e.resize(r,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t)),e=this._rowView,!this._printingRows){e.resetStyleName(),e.measure(t,r,t.pageHeight),e.resize(r,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t),this._bodyView.visible=!0;const i=n.designData,A=this.$_getGroupViews(t,n.groups.getValidGroups(i),r,t.pageHeight);this._printedRows=this._bodyView.printRows(t,o,A,this._rowView,r,s),this._printingRows=this._bodyView.$_trowsCopy,this._grouped=!!A}e=this._footerView,(e.visible=e.model.visible)&&(e.resetStyleName(),t.bandSummaryRuntime=n.summaryRuntime.setGroup(null).setRows(null,this._masterRow),e.measure(t,r,t.pageHeight),e.resize(e.measuredWidth,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t))}else this._printingRows||(this._printedRows=this._bodyView.printRows(t,o,null,this._rowView,r,s),this._printingRows=this._bodyView.$_trowsCopy);const c=this._printingRows,u=this._bodyView.bandRowCount;return this._tempRow||(this._tempRow=c[0]),l?this.$_printLinear(e,t,n,o,r,c,i):n.sectionLayout==BandSectionLayout.ACROSS_DOWN?this.$_printAcross(e,t,n,h,a,r,c,u,i):this.$_printDown(e,t,n,h,a,r,c,u,i),s&&(this._printingRows=null),u}addMasterRow(e,t,r,i){const s=this.$_addTable(this.doc,e,0,i),A=new TableLine(t);A.appendTo(s.tBodies[0],TableBandElement.HEADER_CLASS);const n=A.height,o=r.clone();return o.appendTo(s.tBodies[0]),n+o.height}get headerView(){return this._headerView}get footerView(){return this._footerView}get dataRowView(){return this._rowView}get groupCount(){return this._groupViews.length}getGroupView(e){return this._groupViews[e]}indexOfGroup(e){let t=-1;for(let r of this._groupViews)if(r.visible&&(t++,r.model===e))return t;return t}getRowPoints(){const e=[];e.push(this._headerView.y,this.headerView.height),e.push(this._rowView.y,this._rowView.height),e.push(this._footerView.y,this._footerView.height);for(let t of this._groupViews)t.visible&&e.push(t.y,t.height);return e}getColPoints(){return this._rowView.getColPoints()}getColRect(e,t=1){const r=this._rowView.getColRect(e,t);return r.height=this.height,r}getTableView(e){for(let t of[this._headerView,this._footerView,this._rowView])if(t.model===e)return t;for(let t of this._groupViews){if(t.header.model===e)return t.header;if(t.footer.model===e)return t.footer}}getTableViews(){const e=[this._headerView,this._footerView,this._rowView];for(let t of this._groupViews)e.push(t.header,t.footer);return e}get debugLabel(){return"table band"}_getCssSelector(){return"rr-table-band rr-group-element"}_needDesignBox(){return!0}get rowView(){return this._rowView}$_prepareHeads(e){if(!this._headViews){const t=this.model;this._headViews={},this.addChild(this._headViews[this.hash]=new SectionHeadView(e,t,"TABLE BAND","TableBand","rr-band-head")),this.addChild(this._headViews[this._headerView.hash]=new SectionHeadView(e,t.header,"HEADER","SimpleBand Header")),this.addChild(this._headViews[this._footerView.hash]=new SectionHeadView(e,t.footer,"FOOTER","TableBand Footer")),this.addChild(this._headViews[this._rowView.hash]=new SectionHeadView(e,t.dataRow,"DATA ROW","TableBand Data Row"));for(let t of this._groupViews)this.addChild(this._headViews[t.hash]=new SectionHeadView(e,t.model,"GROUP-"+(t.model.index+1),"TableBand RowGroup"));this.addChild(this._headViews[this._detailView.hash]=new SectionHeadView(e,t.detail,"DETAILS","TableBand Details"))}}_doMeasure(e,t,r,i){var s;const A=e.printing,n=this.model;let o,a=0,l=0;e.printing||(this._headerView._masterView=this._bodyView._masterView=this._footerView._masterView=this._rowView),r=n.getColWidth(r);let h=this._rowView;if(e.printing||(o=h.measure(e,r,i),a=Math.max(a,o.width),l+=o.height+this._rowGap),h=this._headerView,!A&&(h.visible=h.model.visible)&&(o=h.measure(e,r,i),a=Math.max(a,o.width),l+=o.height+this._rowGap),h=this._footerView,!e.printing&&(h.visible=h.model.visible)&&(e.bandSummaryRuntime=n.summaryRuntime,o=h.measure(e,r,i),a=Math.max(a,o.width),l+=o.height),this.$_prepareGroupViews(n,this.doc),e.printing||(l+=this.$_measureGroupViews(n,e,r,i)),h=this._detailView,(h.visible=h.model.visible)&&(o=h.measure(e,r,i),a=Math.max(a,o.width),l+=o.height),!e.printing&&(this.$_prepareHeads(this.doc),this._headViews)){const t=null===(s=this.container)||void 0===s?void 0:s.focusedItem;for(let s in this._headViews){const A=this._headViews[s];o=A.measure(e,r,i),a=Math.max(a,o.width),l+=o.height+2,A.setSelected(t)}}return new Size(a,l)}_doLayoutContent(e){const t=this.model,r=!!this._headViews,i=t.sectionCount,s=t.getColWidth(this.width),A=2+8*t.bandLevel;let n,o,a=0,l=e.printing?null:this._lines=[];r&&(o=this._headViews[this.hash],o.setBounds(A,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n=this._headerView,r&&(o=this._headViews[n.hash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,s,n.measuredHeight),n.setPrintStyles(),a+=n.height+this._rowGap,n.layoutContent(e)),null==l||l.push(n),n=this._rowView,r&&(o=this._headViews[n.hash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.setBounds((s-n.measuredWidth)/2,a,s,n.measuredHeight),n.setPrintStyles(),a+=n.height+this._rowGap,n.layoutContent(e),null==l||l.push(n),n=this._footerView,n=this._footerView,r&&(o=this._headViews[n.hash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,s,n.measuredHeight),n.setPrintStyles(),n.layoutContent(e),a+=n.height),null==l||l.push(n);for(let t of this._groupViews)r&&(o=this._headViews[t.hash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),t.setBounds((s-t.measuredWidth)/2,a,s,t.measuredHeight),t.setPrintStyles(),t.headIndent=A+16,t.layoutContent(e),a+=t.height,null==l||l.push(t);n=this._detailView,r&&(o=this._headViews[n.hash],o.setBounds(A+8,a+2,o.measuredWidth,o.measuredHeight),a+=o.height+2),n.visible&&(n.setBounds((s-n.measuredWidth)/2,a,n.measuredWidth,n.measuredHeight),a+=n.height,n.setPrintStyles(),n.layoutContent(e)),null==l||l.push(n),this._designView&&this.$_layoutCols(this.doc,i)}$_getHeadHeight(){return this._headViews[this.hash].height+1}_setDesignContent(e){const t=this.$_getHeadHeight();this._designView.style.top=t+"px",this._designView.style.height=this.height-t+"px",e&&super._setDesignContent(e)}getLines(){return this._lines}$_prepareGroupViews(e,t){const r=e.groups.count,i=this._groupViews;for(;i.length>r;){const e=i.pop();e.dispose(),this.removeChild(e)}for(;i.length<r;){const e=new TableBandGroupElement(t,null);this.addChild(e),i.push(e),e.$_setMasterView(this._rowView)}}$_measureGroupViews(e,t,r,i){const s=e.groups,A=this._groupViews;let n=0;for(let e=0;e<s.count;e++)A[e].model=s.get(e),n+=A[e].measure(t,r,i).height;return n}$_getGroupViews(e,t,r,i){if(t){const s=[];for(let A of t){const t=this._groupViews[A.index];t.model=A,e._noValueCallback=!0;try{t.measure(e,r,i)}finally{e._noValueCallback=!1}(t.header.hasCells||t.footer.hasCells)&&s.push(t)}return s.length?s:null}}$_layoutCols(e,t){const r=this._colSpans;for(;r.length<t-1;){const t=e.createElement("span");t.className="rr-band-col",r.push(t),this._designView.appendChild(t)}const i=this.model.sectionGap,s=this.model.getColWidth(this.width),A=this.height-this.$_getHeadHeight();let n=s+i;for(let e=0;e<t-1;e++){const t=r[e];delete t.dataset.hidden,t.textContent=e+2+"",Utils.setBounds(t,n,0,s,A),n+=s+i}for(let e=t-1;e<r.length;e++)r[e].dataset.hidden="1"}$_createPage(e){const t=e.createElement("div");return t.style.position="relative",this._rowContainer.appendChild(t),t}$_createTableContainer(e,t,r){const i=e.createElement("div");return Utils.extend(i.style,{position:"absolute",left:t+"px",top:r+"px",width:this._colWidth+"px"}),i}$_createTable(e){const t=e.createElement("table"),r=e.createElement("tbody");return t.appendChild(this._bodyView.createColGroup(e,this._colWidth)),t.appendChild(r),t.style.position="absolute",TableElement.setTableStyle(t),t}$_cloneEmptyRow(e){const t=e.cloneNode(!0),r=t.cells;t.style.height="0px";for(let e=0;e<r.length;e++){const t=r[e],i=t.style;t.colSpan=1,t.rowSpan=1,t.innerHTML="",i.height="0",i.border="none",i.margin="0",i.padding="0"}return t}$_addTable(e,t,r,i){const s=this.$_createTableContainer(e,r,i),A=this.$_createTable(e);return s.dataset._m_=this.model.shash,s.appendChild(A),t.appendChild(s),A}$_checkBlanks(e,t,r){const i=e.dataRow.blankItems;i&&i.forEach((i=>{e.dataRow.canBlank(i,t)&&r.makeBlank(i.row,i.col)}))}$_printLinear(e,t,r,i,s,A,n){function o(){U&&(_.forEach((e=>{const t=[];U.forEach((r=>{for(let i=0;i<r.count;i++)t.push(r.getCell(i,e))})),t[0].rowSpan=t.length;for(let e=1;e<t.length;e++)t[e].style.display="none"})),U=null)}function a(t,r){v=t.$_addTable(e,r,0,M),x=v.tBodies[0],k=!1}function l(i,s){o();const A=i.$_createPage(e);return t.yBand=M=0,s&&(N=t.y=t.bodyTop),(isNaN(O)||!f||O<=0)&&(O=m),T.length||(H=0),d>0&&r.pageNo>0&&r.repeatMasterRow&&function(e,t){const r=e.rowView.masterBandView,i=e.rowView.masterHeaderView,s=e.rowView.masterRowView,A=r.addMasterRow(t,i,s,M);M+=A,N+=A}(i,A),a(i,A),d>0&&r.pageNo>0&&r.repeatDetailHeader&&h(i),n.push(A),s&&r.pageNo++,A}function h(e){if(e._headerView.visible){R=new TableLine(e._headerView._dom.firstChild);const t=R.height;t&&(R.appendTo(x,TableBandElement.HEADER_CLASS),M+=t,N+=t)}}function c(i){if(B||!isNaN(i._printedRows)){const e=i._footerView;e.resetStyleName(),r.clearSummary(),t.bandSummaryRuntime=r.summaryRuntime.setRows(B,i._masterRow).setRowCount(i._printedRows),e.measure(t,s,t.pageHeight),e.resize(e.measuredWidth,e.measuredHeight),e.setPrintStyles(),e.layoutContent(t)}const A=new TableLine(i._footerView._dom.firstChild),n=A.height;n&&(N+n>Q?(P=l(i,!0),x.appendChild(i.$_cloneEmptyRow(i._tempRow))):k&&(v=i.$_addTable(e,P,0,M),x=v.tBodies[0],k=!1),A.appendTo(x,TableBandElement.FOOTER_CLASS),M+=n,N+=n,N>Q&&T.length,N>Q&&(A.remove(),0===x.rows.length&&P.removeChild(v),P=l(i,!0),x.appendChild(i.$_cloneEmptyRow(i._tempRow)),A.appendTo(x,TableBandElement.FOOTER_CLASS),M+=n,N+=n)),t.yBand=M,t.y=N,t.h=t.bodyHeight-(N-t.bodyTop)}const u=i?i.rowCount:0,d=r.bandLevel,p=r.detail,g=this._grouped,_=g&&r.dataRow.getMergedColumns(),{rowsPerPage:m,breakRowsPerPage:f}=r.getRowsPerPage(),w=r.dataRow.rowCount,C=r.pr,B=d>0?[]:null,E=this._bodyView.endRowView;let y=this._bodyView.endMessageView;const{endRowCount:S,stopEndRow:b}=r.getEndRowCount(y?1:0),T=[];let I,P,R,v,x,O,F,L,D,U,H=0,N=t.y,Q=t.bodyBottom,M=t.yBand,k=!1,V=0,G=!1;for(0===d?P=l(this,!1):(P=n[n.length-1],r.pageNo++,O=m,a(this,P)),h(this);A.length>0||S>0&&H<S;){const i=A[0]&&A[0].$_grp,m=r.pr,f=M===t.yBand&&(0===d||0===r.pageNo);if(f?(N+V>Q&&M>0?P=l(this,!0):k&&a(this,P),N!==t.bodyTop||0!==d&&0!==H||h(this)):k&&a(this,P),F=L,F||(A.length>0?F=new TableBodyLine(A,0,i?i.trows:w):y?F=y:(F=I=E.clone(),T.push(F))),f&&D&&"gh"!==F.first.$_brt)F=D.clone(),F.appendTo(x),M+=V=F.height,N+=V,O--;else if(F.appendTo(x),V=F.height,M+=V,N+=V,L=null,N>Q&&(d>0||m>0))F.detach(),T.pop(),L=F,T.length&&b?H=S:P=l(this,!0);else{const i=!1;let a;F.isGroup&&!i&&o(),a=A.length?A.splice(0,F.count)[0]:y?y.first:I.first;const h="r"===a.$_brt;if(B&&h&&B.push(m),m>0&&!F.isGroup&&h&&this.$_checkBlanks(r,m,F),!a.$_brb&&h){const e=F.isGroup?m:m+1;r.setPrinting(t,e,F.count)}if(g&&"gh"===a.$_brt&&(D=F),_&&(F.isGroup&&!i||(U||(U=[]),U.push(F))),(h||y&&a===y.first||I&&a===I.first)&&(O--,H++,y&&a===y.first&&(y=null)),G=!1,O<=0&&(A.length>0||S<=0||H===S)&&r.pr<u&&(d>0&&r.repeatDetailFooter&&(c(this),G=!0),(A.length>0||G)&&m<u&&(P=l(this,!0))),F.isGroupFooter&&i&&o(),h&&p.count>0){t.y=N,t.h=t.bodyHeight-(N-t.bodyTop),t.yBand=M;for(let i=0;i<p.count;i++){const A=this._detailView.getChild(i),o=A.model;A.rowView.masterBandView=this,A.rowView.masterHeaderView=this._headerView.dom.firstChild,A.rowView.masterRowView=F,o.pageNo=0,o.masterValues=r.getValues(t,m,o._masterFlds),o.detailRows=o.rowsPerMaster;const a=o.getNextDetailRows(t)||[];A.printBand(e,t,s,n,a,m)}P=n[n.length-1],k=t.y!==N,N=t.y,M=t.yBand}}}if(0==d||r.pr>C){if(!G&&(c(this),G=!0,d>0&&m<Number.MAX_SAFE_INTEGER&&r.pr<u)){const r=this.$_createPage(e);t.yBand=M=0,t.y=t.bodyTop,N=t.bodyTop,n.push(r),a(this,r)}}else if(R){const e=R.height;R.remove(),M-=e,N-=e}G||(t.yBand=M,t.y=N,t.h=t.bodyHeight-(N-t.bodyTop))}$_printAcross(e,t,r,i,s,A,n,o,a){function l(e){let t=0;for(let r=0;r<s;r++){const i=new TableLine(e._headerView._dom.firstChild);t=Math.max(t,i.height),t&&i.appendTo(b[r],TableBandElement.HEADER_CLASS)}f+=t,_=p+=t}const h=new TableLine(this._footerView._dom.firstChild),c=h.height,u=r.dataRow.rowCount;let d=Math.min(s,o),p=t.y,g=t.bodyBottom,_=p,m=p,f=0;const w=new Array(s),C=new Array,B=new Array;let E,y,S;const b=[];let T;E=this.$_createPage(e),a.push(E);for(let t=0;t<s;t++)y=this.$_addTable(e,E,i[2*t],f),b.push(y.tBodies[0]);l(this);for(let e=0;e<d;e++)w[e]=[];for(;r.pr<o;){0===f&&l(this);let A=-1,h=0;C.length=0;for(let e=0;e<d&&r.pr<o;e++){T=B.pop()||new TableBodyLine(n,r.tr,u),T.appendTo(b[e]),C.push(T);const i=T.height;if(p+i>g){A=e;break}w[e].push(T),r.setPrinting(t,r.pr+1,T.count),e===s-1&&(_+=i),h=Math.max(h,i)}if(A>=0){for(let e of C)e.detach(),B.push(e);_=p=t.bodyTop,f=0,A=-1,m=t.bodyTop,E=this.$_createPage(e),a.push(E),b.length=0;for(let t=0;t<s;t++)y=this.$_addTable(e,E,i[2*t],f),b.push(y.tBodies[0])}else p+=h,f+=h,B.length=0}let I=0;if(o>0)for(let e=0;e<d;e++)w[e].length&&I++;const P=r.footer.attachToBody,R=P?Math.min(I,s-1):s-1;if(P&&(S=b[R]),S||(S=this.$_addTable(e,E,i[2*R],p-m).tBodies[0]),c&&h.appendTo(S,TableBandElement.FOOTER_CLASS),P?p=Math.max(p,_+c):p+=c,p>g){h.remove(),E=this.$_createPage(e),a.push(E),b.length=0;for(let t=0;t<s;t++)y=this.$_addTable(e,E,i[2*t],f),b.push(y.tBodies[0]);S=b[R],c&&h.appendTo(S,TableBandElement.FOOTER_CLASS),p=t.bodyTop+c}t.y=p,t.h=t.bodyHeight-(p-t.bodyTop)}$_printDown(e,t,r,i,s,A,n,o,a){function l(t){for(let e=0;e<s;e++)f[e]=p,w[e]=[];y=0;for(let r=0;r<s;r++){E=t.$_addTable(e,B,i[2*r],m).tBodies[0],S[r]=E;const s=new TableLine(t._headerView._dom.firstChild);s.appendTo(E,TableBandElement.HEADER_CLASS),y=Math.max(y,s.height)}m+=y,p+=y}const h=new TableLine(this._footerView._dom.firstChild),c=h.height,u=r.dataRow.rowCount;let d=Math.min(s,o),p=t.y,g=t.bodyBottom,_=p,m=0;const f=new Array(s),w=new Array(s);let C,B,E,y=0;const S=new Array(s);B=this.$_createPage(e),a.push(B),l(this);do{for(let i=0;i<s;i++)for(0===m&&(0===i?l(this):(m+=y,p+=y));r.pr<o;){const A=C||new TableBodyLine(n,r.tr,u);C=null,E=S[i],A.appendTo(E);const o=A.height;if(m+=o,p+=o,f[i]=p,w[i].push(A),p>g){A.detach(),C=A,w[i].pop(),m=0,i==s-1?(B=this.$_createPage(e),a.push(B),_=t.bodyTop):_=a.length>1?t.bodyTop:t.y,p=_;break}r.setPrinting(t,r.pr+1,A.count)}}while(r.pr<o);let b=0;if(o>1){let e=0;for(let t=0;t<f.length;t++)for(let r=0;r<w[t].length;r++)e+=w[t][r].height;const t=new Array(d);let r=Math.round(e/d);for(let e=0;e<d-1;e++){let i,s=w[e],A=0,n=0;for(;A<s.length;){if(n+=i=s[A].height,n>r){n-=i;break}A++}t[e]=n;const o=w[e+1];let a=0;for(;A<s.length;){const e=s[A];s.splice(A,1),o.splice(a++,0,e)}m=y;for(let t=0;t<o.length;t++)o[t].detach(),o[t].appendTo(S[e+1])}t[s-1]=0;for(let e=0;e<w[s-1].length;e++)t[s-1]+=w[s-1][e].height;for(let e=0;e<2;e++)(()=>{for(let e=d-1;e>0;e--)for(;t[e]>t[e-1];){const r=w[e],i=w[e-1],s=r.shift(),A=s.height;s.detach(),t[e]-=A,i.push(s),s.appendTo(S[e-1]),t[e-1]+=A}})();for(let e=0;e<s;e++){let t=w[e];if(f[e]=_+y,t.length>0){b=e+1;for(let r=0;r<t.length;r++)f[e]+=t[r].height}}}else{for(let e=0;e<s;e++)f[e]=_+y;b=o,b&&(f[0]+=w[0][0].height)}const T=r.footer.attachToBody,I=T?Math.min(b,s-1):s-1,P=T?f[I]:0;p=f[0];for(let e=1;e<d;e++)p=Math.max(p,f[e]);E=T?S[I]:this.$_addTable(e,B,i[2*I],p-_).tBodies[0],c&&h.appendTo(E,TableBandElement.FOOTER_CLASS),T?p=Math.max(p,P+c):p+=c,p>g&&(h.remove(),B=this.$_createPage(e),a.push(B),E=this.$_addTable(e,B,i[2*I],m=0).tBodies[0],c&&h.appendTo(E,TableBandElement.FOOTER_CLASS),p=t.bodyTop+c),t.y=p,t.h=t.bodyHeight-(p-t.bodyTop)}}TableBandElement.HEADER_CLASS="-rrp-tableband-header",TableBandElement.FOOTER_CLASS="-rrp-tableband-footer",TableBandElement.ROW_CLASS="-rrp-tableband-row";class FloatingContainerElement extends ReportGroupItemElement{constructor(e,t){super(e,t,"floatingContainerView")}_getCssSelector(){return"rr-floating-container rr-group-element"}get debugLabel(){return"floating"}get floating(){return!0}_needDesignBox(){return!0}_doMeasure(e,t,r,i){if(this.measureFixed||this._setModelSize(this.model,t,r,i,!0),super._doMeasure(e,t,r,i),this.childCount>0){const e=this.getChild(0);return new Size(e.measuredWidth,e.measuredHeight)}return new Size}_doAfterMeasure(e,t,r,i,s){!e.printing&&this.model.designHeight>0&&(s.height=this.model.designHeight),!e.printing&&this.model.designWidth>0&&(s.width=this.model.designWidth),super._doAfterMeasure(e,t,r,i,s),e.printing||(this._isEmpty()?this.dom.style.background="":(this._setDesignContent(!0),this.dom.style.background="#ff880010",this.dom.style.border=e.reportView.focusedElement===this.getChild(0)?"1px dashed #000":"1px dashed #55000080"))}_layoutItem(e,t,r,i,s,A,n){i=(A-t.width)/2,s=(n-t.height)/2,t.move(i,s),t.setPrintStyles()}}const SVGNS="http://www.w3.org/2000/svg";let $_clip=0;class SvgRenderer extends Base{constructor(e,t){super(),this._transforms=[],this._defs=e,this._element=t}_doDispose(){this.clear(),super._doDispose()}get doc(){return getDoc(this._element)||document}get element(){return this._element}init(e,t){return this._defs=e,this._element=t,this}clear(){this._defs=null,this._element=null,this._transforms=null}save(){this._transforms.push(this._trans),this._trans=""}restore(){this._trans=this._transforms.pop()}translate(e,t){this._trans+="translate("+e+","+t+")"}rotate(e){this._trans+="rotate("+180*e/Math.PI+")"}rotateAt(e,t,r){this._trans+="rotate("+180*e/Math.PI+","+t+",)"}scale(e,t){this._trans+="scale("+e+","+t+")"}clipRect(e){this.clip(e.x,e.y,e.width,e.height)}clip(e,t,r,i){const s=this.doc,A=$_clip++,n=s.createElementNS(SVGNS,"clipPath");n.setAttributeNS(null,"id","clip"+A);const o=s.createElementNS(SVGNS,"rect");o.x.baseVal.value=e,o.y.baseVal.value=t,o.width.baseVal.value=r,o.height.baseVal.value=i,n.appendChild(o),this._defs.appendChild(n)}line(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"line");return this._element.appendChild(A),A.x1.baseVal.value=t,A.y1.baseVal.value=r,A.x2.baseVal.value=i,A.y2.baseVal.value=s,this.$_setStyles(A,e),A}sline(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"line");return this._element.appendChild(A),A.x1.baseVal.valueAsString=t,A.y1.baseVal.valueAsString=r,A.x2.baseVal.valueAsString=i,A.y2.baseVal.valueAsString=s,this.$_setStyles(A,e),A}lines(e,...t){if(null==t||t.length<4)return;const r=this.doc.createElementNS(SVGNS,"polyline"),i=[];i.push(t[0]+","+t[1]);for(let e=2;e<t.length;e+=2)i.push(t[e]+","+t[e+1]);r.setAttributeNS(null,"points",i.join(" ")),this.$_setStyles(r,e),this._element.appendChild(r)}polygon(e,t){if(null==t||t.length<4)return;const r=this.doc.createElementNS(SVGNS,"polygon"),i=[];i.push(t[0]+","+t[1]);for(let e=2;e<t.length;e+=2)i.push(t[e]+","+t[e+1]);return this._trans&&r.setAttributeNS(null,"transform",this._trans),r.setAttributeNS(null,"points",i.join(" ")),this.$_setStyles(r,e),this._element.appendChild(r),r}quadratic(e,t,r,i,s,A,n){const o=this.doc.createElementNS(SVGNS,"path");o.setAttributeNS(null,"d",["M",t,r,"Q",i,s,A,n].join(" ")),this.$_setStyles(o,e),this._element.appendChild(o)}squadratic(e,t,r,i,s,A,n){const o=this.doc.createElementNS(SVGNS,"path");o.setAttributeNS(null,"d",["M",t+"%",r+"%","Q",i+"%",s+"%",A+"%",n+"%"].join(" ")),this.$_setStyles(o,e),this._element.appendChild(o)}curve(e,...t){const r=this.$_getCurvedLinePath(t,0,t.length-1);if(r){const t=this.doc.createElementNS(SVGNS,"path");t.setAttributeNS(null,"d",r.join(" ")),this.$_setStyles(t,e),this._element.appendChild(t)}}scurve(e,...t){const r=this.$_getCurvedLinePath(t,0,t.length-1);if(r){const t=this.doc.createElementNS(SVGNS,"path");for(let e=0;e<r.length;e++)"number"==typeof r[e]&&(r[e]=r[e]+"%");t.setAttributeNS(null,"d",r.join(" ")),this.$_setStyles(t,e),this._element.appendChild(t)}}curveRange(e,t,r,i,s){if(i&&i.length>1&&s&&s.length>1&&(e||t)){let A=this.$_getCurvedLinePath(i,0,i.length/2-1,!0);if(A){A.push("L",s[s.length-2],[s.length-1]);const n=this.$_getCurvedLinePath(s,s.length/2-1,0,!1);n&&(A=A.concat(n)),A.push("L",i[0],i[1]);const o=this.doc.createElementNS(SVGNS,"path");o.setAttributeNS(null,"d",A.join(" ")),this.$_fillOrStroke(o,e,t,r),this._element.appendChild(o)}}}rect(e,t){const r=this.doc.createElementNS(SVGNS,"rect");r.x.baseVal.value=t.x,r.y.baseVal.value=t.y,r.width.baseVal.value=t.width,r.height.baseVal.value=t.height,this.$_setStyles(r,e),this._element.appendChild(r)}srect(e,t){const r=this.doc.createElementNS(SVGNS,"rect");r.x.baseVal.valueAsString=t.x+"%",r.y.baseVal.valueAsString=t.y+"%",r.width.baseVal.valueAsString=t.width+"%",r.height.baseVal.valueAsString=t.height+"%",this.$_setStyles(r,e),this._element.appendChild(r)}bounds(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"rect");A.x.baseVal.value=t,A.y.baseVal.value=s<0?r+s:r,A.width.baseVal.value=i,A.height.baseVal.value=Math.abs(s),this.$_setStyles(A,e),this._element.appendChild(A)}pbounds(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"rect");A.x.baseVal.valueAsString=t+"%",A.y.baseVal.valueAsString=(s<0?r+s:r)+"%",A.width.baseVal.valueAsString=i+"%",A.height.baseVal.valueAsString=Math.abs(s)+"%",this.$_setStyles(A,e),this._element.appendChild(A)}sbounds(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"rect");A.x.baseVal.valueAsString=t,A.y.baseVal.valueAsString=r,A.width.baseVal.valueAsString=i,A.height.baseVal.valueAsString=s,this.$_setStyles(A,e),this._element.appendChild(A)}circle(e,t,r,i){const s=this.doc.createElementNS(SVGNS,"circle");s.cx.baseVal.value=t,s.cy.baseVal.value=r,s.r.baseVal.value=i,this.$_setStyles(s,e),this._element.appendChild(s)}scircle(e,t,r,i){const s=this.doc.createElementNS(SVGNS,"circle");s.cx.baseVal.valueAsString=t,s.cy.baseVal.valueAsString=r,s.r.baseVal.valueAsString=i,this.$_setStyles(s,e),this._element.appendChild(s)}circleRect(e,t,r,i,s,A){const n=this.doc.createElementNS(SVGNS,"circle"),o=r+s/2,a=i+A/2,l=Math.min(s,A)/2;n.cx.baseVal.value=o,n.cy.baseVal.value=a,n.r.baseVal.value=l,this.$_setStyles(n,e),this._element.appendChild(n)}scircleRect(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"circle"),n=t+i/2,o=r+s/2,a=Math.min(i,s)/2;A.cx.baseVal.valueAsString=n+"%",A.cy.baseVal.valueAsString=o+"%",A.r.baseVal.valueAsString=a+"%",this.$_setStyles(A,e),this._element.appendChild(A)}ellipse(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"ellipse");return A.cx.baseVal.value=t,A.cy.baseVal.value=r,A.rx.baseVal.value=i,A.ry.baseVal.value=s,this.$_setStyles(A,e),this._element.appendChild(A),A}sellipse(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"ellipse");A.cx.baseVal.valueAsString=t+"%",A.cy.baseVal.valueAsString=r+"%",A.rx.baseVal.valueAsString=i+"%",A.ry.baseVal.valueAsString=s+"%",this.$_setStyles(A,e),this._element.appendChild(A)}ellipseRect(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"ellipse"),n=i/2,o=s/2;return A.cx.baseVal.value=t+n,A.cy.baseVal.value=r+o,A.rx.baseVal.value=n,A.ry.baseVal.value=o,this.$_setStyles(A,e),this._element.appendChild(A),A}sellipseRect(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"ellipse"),n=i/2,o=s/2;A.cx.baseVal.valueAsString=t+n+"%",A.cy.baseVal.valueAsString=r+o+"%",A.rx.baseVal.valueAsString=n+"%",A.ry.baseVal.valueAsString=o+"%",this.$_setStyles(A,e),this._element.appendChild(A)}text(e,t,r,i,s,A,n,o,a){const l=this.doc.createElementNS(SVGNS,"text");t=t||"Verdana",l.setAttributeNS(null,"y",o+""),l.setAttributeNS(null,"dy","top"),l.setAttributeNS(null,"x",n+""),l.setAttributeNS(null,"text-anchor",a),l.setAttributeNS(null,"font-family",t),l.setAttributeNS(null,"font-size",r+""),s&&l.setAttributeNS(null,"text-decoration",s),l[Utils.TextProp]=A,this.$_setStyles(l,e),this._element.appendChild(l)}stext(e,t,r,i,s){const A=this.doc.createElementNS(SVGNS,"text");A.setAttributeNS(null,"y",i+"%"),A.setAttributeNS(null,"dy","top"),A.setAttributeNS(null,"x",r+"%"),A[Utils.TextProp]=t,this.$_setStyles(A,e),this._element.appendChild(A)}$_setStyles(e,t){"string"==typeof t?e.setAttribute("class",t):t&&Utils.extend(e.style,t)}$_stroke(e,t,r){e.style.fill="none",e.style.stroke=t,isNaN(r)||(e.style.strokeWidth=r+"")}$_fill(e,t){e.style.fill=t}$_fillOrStroke(e,t,r,i){r&&(e.style.stroke=r,isNaN(i)||(e.style.strokeWidth=i+"")),e.style.fill=t||"none"}$_getCurvedLinePath(e,t,r,i=!0){if(e&&r!=t&&e.length/2>r){const s=[],A=t>r?-1:1;let n=t;if(i&&s.push("M",e[2*n],e[2*n+1]),2==Math.abs(r-t))return s.push("L",e[2*(n+A)],e[2*(n+A)+1]),s;const o=.25,a={x:0,y:0},l={x:0,y:0},h={x:0,y:0},c={x:e[2*(n+A)]-e[2*n],y:e[2*(n+A)+1]-e[2*n+1]};let u={x:0,y:0};const d={x:0,y:0},p={x:0,y:0},g={x:0,y:0};let _=Math.sqrt(c.x*c.x+c.y*c.y);c.x/=_,c.y/=_;let m=e[2*(n+A)]-e[2*n],f=e[2*n],w=e[2*n+1];for(n+=A;n!=r;n+=A){h.x=-c.x,h.y=-c.y,c.x=e[2*(n+A)]-e[2*n],c.y=e[2*(n+A)]-e[2*n+1],_=Math.sqrt(c.x*c.x+c.y*c.y),c.x/=_,c.y/=_,c.x<h.x?(u.x=h.x-c.x,u.y=h.y-c.y):(u.x=c.x-h.x,u.y=c.y-h.y);const r=Math.sqrt(u.x*u.x+u.y*u.y);u.x/=r,u.y/=r,h.y*c.y>=0&&(u={x:1,y:0}),a.x=-u.x*m*o,a.y=-u.y*m*o,n==A+t?s.push("Q",e[2*n]+a.x,e[2*n+1]+a.y,e[2*n],e[2*n+1]):(d.x=f+l.x,d.y=w+l.y,p.x=e[2*n]+a.x,p.y=e[2*n+1]+a.y,g.x=(d.x+p.x)/2,g.y=(d.y+p.y)/2,s.push("Q",d.x,d.y,g.x,g.y),s.push("Q",p.x,p.y,e[2*n],e[2*n+1])),m=e[2*(n+A)]-e[2*n],l.x=u.x*m*o,l.y=u.y*m*o,f=e[2*n],w=e[2*n+1]}return s.push("Q",f+l.x,w+l.y,e[2*n],e[2*n+1]),s}return null}}class SvgElement extends Base{constructor(e){super();const t=getDoc(e),r=this._element=t.createElementNS(SVGNS,"svg"),i=r.style,s=this._defs=t.createElementNS(SVGNS,"defs");r.appendChild(s),i.background="",i.border="none",i.pointerEvents="none",e.appendChild(r),this._renderer=new SvgRenderer(this._defs)}static createSVG(e,t,r){const i=getDoc(e),s=i.createElementNS(SVGNS,"svg");return s.appendChild(i.createElementNS(SVGNS,"defs")),s.appendChild(i.createElementNS(SVGNS,"g")),t&&s.setAttribute("class","rr-rating-shape"),Utils.extend(s.style,{background:"",border:"none",pointerEvents:"none"}),r&&Utils.extend(s.style,r),e.appendChild(s),s}static renderSVG(e,t,r){const i=t.lastElementChild,s=this._renderer.init(t.firstChild,i);Utils.clearChildren(i),r.call(e,t,s,t.clientWidth,t.clientHeight),s.clear()}static setAttr(e,t,r){e.setAttribute(t,r)}static setStyle(e,t,r){e.style[t]=r}static prepareExport(e,t,r){e.attributes.viewBox||e.setAttribute("viewBox",[0,0,t,r].join(" "));const i=e.style;if(!i.fill||!i.stroke){const t=getComputedStyle(e);i.fill||(i.fill=t.fill),i.stroke||(i.stroke=t.stroke)}}_doDispose(){this._renderer=this._renderer.dispose(),this._element.parentElement.removeChild(this._element),this._element=this._defs=null,super._doDispose()}get element(){return this._element}render(e){this._clear(),e?e.call(this,this._renderer,this._element.clientWidth,this._element.clientHeight):this._doRender(this._renderer,this._element.clientWidth,this._element.clientHeight)}_clear(){this._element.childElementCount>1&&this._element.removeChild(this._element.lastElementChild);const e=getDoc(this._element).createElementNS(SVGNS,"g");this._element.appendChild(e),this._renderer._element=e}_doRender(e,t,r){}}SvgElement._renderer=new SvgRenderer;class Barcode extends Base{constructor(){super()}_doDispose(){super._doDispose()}get value(){return this._value}set value(e){if(e!=this._value){this._value=e;try{this._error=null,this._parse(e)}catch(e){this._error=e}}}get error(){return this._error}render(e,t,r=!0){this._doRender(e,t,r)}}class LinearBarcode extends Barcode{constructor(){super(),this.integralBar=!0,this.minBarWidth=1,this.maxBarWidth=0,this.barWidth=0}_doDispose(){super._doDispose()}_doRender(e,t,r){let i=this._getBarLength();if(i<1)return;let s=this.barWidth;s<=0&&(s=this.integralBar?Math.floor(t.width/i):t.width/i,s=Math.max(this.minBarWidth,s),this.maxBarWidth>0&&(s=Math.min(this.maxBarWidth,s))),i*=s,t.x+=(t.width-i)/2,this.integralBar&&(t.x=Math.floor(t.x)),this._drawBars(e,this.barStyle,r,t.x,t.y,s,t.height)}}const $$_C128_BAR_WEIGHTS=[2171426,2236706,2236961,1184291,1184546,1249826,1188371,1188626,1253906,2232851,2233106,2298386,1122866,1188146,1188401,1126946,1192226,1192481,2241041,2232626,2232881,2175506,2240786,3219761,3215906,3281186,3281441,3219986,3285266,3285521,2171171,2171681,2302241,1119011,1249571,1250081,1123091,1253651,1254161,2167571,2298131,2298641,1122611,1123121,1253681,1126691,1127201,1257761,3223841,2167601,2298161,2175251,2175761,2175281,3215651,3216161,3346721,3219731,3220241,3350801,3227921,2233361,4395281,1118756,1119266,1184036,1184801,1315106,1315361,1122836,1123346,1188116,1188881,1319186,1319441,2363921,2232596,4272401,2363666,1261841,1118786,1184066,1184321,1131026,1196306,1196561,4264466,4329746,4330001,2171201,2179361,4268321,1118531,1119041,1249601,1130771,1131281,4264211,4264721,1126721,1130801,3215681,4264241,2167826,2167316,2167346,36901138],$$_C128_STOP_CODE=106,$$_C128_TYPE_A=0,$$_C128_TYPE_B=1,$$_C128_TYPE_C=2,$$_C128_START_CODES=[103,104,105],$$_C128_MASKS=[251658240,15728640,983040,61440,3840,240,15];class Code128 extends LinearBarcode{constructor(){super(),this.quietZoneWidth=10}_doDispose(){super._doDispose()}_parse(e){this._weights=[];let t=e?e.length:0;if(t<1)return;const r=this.$_detectType(e);2==r&&t%2==1&&(e="0"+e,t++);let i=$$_C128_START_CODES[r],s=$$_C128_BAR_WEIGHTS[i],A=i;if(this._weights.push(s),2==r)for(let n=0;n<t;n+=2){let t=e.substr(n,2);i=parseInt(t),i=this.$_convert(r,i),s=$$_C128_BAR_WEIGHTS[i],this._weights.push(s),A+=i*(n+1)}else for(let n=0;n<t;n++)i=e.charCodeAt(n),i=this.$_convert(r,i),s=$$_C128_BAR_WEIGHTS[i],this._weights.push(s),A+=i*(n+1);A%=103,this._weights.push($$_C128_BAR_WEIGHTS[A]),this._weights.push($$_C128_BAR_WEIGHTS[106])}_getBarLength(){return this.quietZoneWidth+11*(this._weights.length-1)+13+this.quietZoneWidth}_drawBars(e,t,r,i,s,A,n){i+=10*A;const o=this._weights.length-1;let a;for(let l=0;l<o;l++){a=this._weights[l];for(let o=0;o<6;o++){let l=(a&$$_C128_MASKS[o+1])>>4*(5-o);l*=A,o%2==0&&(r?(this.integralBar,e.sbounds(t,i+"",s+"%",l+"",n+"%")):(this.integralBar,e.bounds(t,i,s,l,n))),i+=l}}a=this._weights[o];for(let o=0;o<7;o++){let l=(a&$$_C128_MASKS[o])>>4*(6-o);l*=A,o%2==0&&(r?(this.integralBar,e.sbounds(t,i+"",s+"%",l+"",n+"%")):(this.integralBar,e.bounds(t,i,s,l,n))),i+=l}}$_convert(e,t){switch(e){case 0:if(t>=0&&t<32)return t+64;if(t>=32&&t<96)return t-32;case 1:if(t>=32&&t<128)return t-32;case 2:if(t>=0&&t<=99)return t}throw new Error("Invalid code128 charactor: "+t)}$_detectType(e){let t=/^[0-9]+$/;return t.test(e)?2:(t=/[a-z]/,t.test(e)?1:0)}}const $$_C39_CODES={0:"nnnwwnwnn",1:"wnnwnnnnw",2:"nnwwnnnnw",3:"wnwwnnnnn",4:"nnnwwnnnw",5:"wnnwwnnnn",6:"nnwwwnnnn",7:"nnnwnnwnw",8:"wnnwnnwnn",9:"nnwwnnwnn",A:"wnnnnwnnw",B:"nnwnnwnnw",C:"wnwnnwnnn",D:"nnnnwwnnw",E:"wnnnwwnnn",F:"nnwnwwnnn",G:"nnnnnwwnw",H:"wnnnnwwnn",I:"nnwnnwwnn",J:"nnnnwwwnn",K:"wnnnnnnww",L:"nnwnnnnww",M:"wnwnnnnwn",N:"nnnnwnnww",O:"wnnnwnnwn",P:"nnwnwnnwn",Q:"nnnnnnwww",R:"wnnnnnwwn",S:"nnwnnnwwn",T:"nnnnwnwwn",U:"wwnnnnnnw",V:"nwwnnnnnw",W:"wwwnnnnnn",X:"nwnnwnnnw",Y:"wwnnwnnnn",Z:"nwwnwnnnn","-":"nwnnnnwnw",".":"wwnnnnwnn"," ":"nwwnnnwnn",$:"nwnwnwnnn","/":"nwnwnnnwn","+":"nwnnnwnwn","%":"nnnwnwnwn","*":"nwnnwnwnn"};class Code39 extends LinearBarcode{constructor(){super(),this._wideWidth=3}_doDispose(){super._doDispose()}_parse(e){if(this._codes=[],!e)return;const t=e.length;this._codes.push($$_C39_CODES["*"]);for(let r=0;r<t;r++){const t=e.charAt(r),i=$$_C39_CODES[t];if(!i)throw new Error("Invalid Code39 character: "+t);this._codes.push(i)}this._codes.push($$_C39_CODES["*"])}_getBarLength(){const e=this._codes.length;return e*(3*this._wideWidth+6)+(e-1)}_drawBars(e,t,r,i,s,A,n){const o=this._codes.length;if(o>2)for(let a=0;a<o;a++){const l=this._codes[a];for(let o=0;o<9;o++){let a="n"==l.charAt(o)?1:this._wideWidth;a*=A,o%2==0&&(r?(this.integralBar,e.sbounds(t,i+"",s+"%",a+"",n+"%")):(this.integralBar,e.bounds(t,i,s,a,n))),i+=a}a<o-1&&(i+=A)}}}class BarcodeItemElement extends ReportItemElement{constructor(e,t){super(e,t,"barcodeItemView"),this.$_render=(e,t,r,i)=>{const s=this.$_getText(e,this.model);s&&(this._barcode.value=s,this._isTesting()||this._barcode.render(t,new Rectangle(0,0,r,100)))}}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-barcode rr-item-element"}get debugLabel(){return""}_initDom(e,t){super._initDom(e,t),this._svg=SvgElement.createSVG(t);const r=this._svg.style;r.left="0px",r.top="0px",r.width="100%",r.height="100%",this._svg.setAttribute("class","rr-barcode-bar")}_doMeasure(e,t,r,i){const s=this.model,A=this._svg;this._setModelSize(s,t,r,i,!0),this.$_prepareBarcode(s),SvgElement.renderSVG(e,A,this.$_render);const n=t.offsetWidth,o=t.offsetHeight;return e.printing&&SvgElement.prepareExport(this._svg,n,o),Size.create(n,o)}_setStyles(e,t,r){super._setStyles(e,t,r),"fill"in t&&(this._svg.style.fill=t.fill)}$_prepareBarcode(e){e.format===BarcodeFormat.CODE39?this._barcode instanceof Code39||(this._barcode=new Code39):this._barcode instanceof Code128||(this._barcode=new Code128)}$_getText(e,t){let r="";return t.value?r=e.printing?this.getPrintValue(e,t):t.value:t.text&&(r=t.text),r&&t.convertText(r)}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e){var t={exports:{}};return e(t,t.exports),t.exports}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var qrCodeStyling=createCommonjsModule((function(e,t){self,e.exports=(()=>{var e={192:(e,t)=>{var r,i,s=function(){var e=function(e,t){var r=e,i=n[t],s=null,A=0,a=null,_=[],m={},w=function(e,t){s=function(e){for(var t=new Array(e),r=0;r<e;r+=1){t[r]=new Array(e);for(var i=0;i<e;i+=1)t[r][i]=null}return t}(A=4*r+17),C(0,0),C(A-7,0),C(0,A-7),E(),B(),S(e,t),r>=7&&y(e),null==a&&(a=T(r,i,_)),b(a,t)},C=function(e,t){for(var r=-1;r<=7;r+=1)if(!(e+r<=-1||A<=e+r))for(var i=-1;i<=7;i+=1)t+i<=-1||A<=t+i||(s[e+r][t+i]=0<=r&&r<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=i&&i<=4)},B=function(){for(var e=8;e<A-8;e+=1)null==s[e][6]&&(s[e][6]=e%2==0);for(var t=8;t<A-8;t+=1)null==s[6][t]&&(s[6][t]=t%2==0)},E=function(){for(var e=o.getPatternPosition(r),t=0;t<e.length;t+=1)for(var i=0;i<e.length;i+=1){var A=e[t],n=e[i];if(null==s[A][n])for(var a=-2;a<=2;a+=1)for(var l=-2;l<=2;l+=1)s[A+a][n+l]=-2==a||2==a||-2==l||2==l||0==a&&0==l}},y=function(e){for(var t=o.getBCHTypeNumber(r),i=0;i<18;i+=1){var n=!e&&1==(t>>i&1);s[Math.floor(i/3)][i%3+A-8-3]=n}for(i=0;i<18;i+=1)n=!e&&1==(t>>i&1),s[i%3+A-8-3][Math.floor(i/3)]=n},S=function(e,t){for(var r=i<<3|t,n=o.getBCHTypeInfo(r),a=0;a<15;a+=1){var l=!e&&1==(n>>a&1);a<6?s[a][8]=l:a<8?s[a+1][8]=l:s[A-15+a][8]=l}for(a=0;a<15;a+=1)l=!e&&1==(n>>a&1),a<8?s[8][A-a-1]=l:a<9?s[8][15-a-1+1]=l:s[8][15-a-1]=l;s[A-8][8]=!e},b=function(e,t){for(var r=-1,i=A-1,n=7,a=0,l=o.getMaskFunction(t),h=A-1;h>0;h-=2)for(6==h&&(h-=1);;){for(var c=0;c<2;c+=1)if(null==s[i][h-c]){var u=!1;a<e.length&&(u=1==(e[a]>>>n&1)),l(i,h-c)&&(u=!u),s[i][h-c]=u,-1==(n-=1)&&(a+=1,n=7)}if((i+=r)<0||A<=i){i-=r,r=-r;break}}},T=function(e,t,r){for(var i=h.getRSBlocks(e,t),s=c(),A=0;A<r.length;A+=1){var n=r[A];s.put(n.getMode(),4),s.put(n.getLength(),o.getLengthInBits(n.getMode(),e)),n.write(s)}var a=0;for(A=0;A<i.length;A+=1)a+=i[A].dataCount;if(s.getLengthInBits()>8*a)throw"code length overflow. ("+s.getLengthInBits()+">"+8*a+")";for(s.getLengthInBits()+4<=8*a&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*a||(s.put(236,8),s.getLengthInBits()>=8*a));)s.put(17,8);return function(e,t){for(var r=0,i=0,s=0,A=new Array(t.length),n=new Array(t.length),a=0;a<t.length;a+=1){var h=t[a].dataCount,c=t[a].totalCount-h;i=Math.max(i,h),s=Math.max(s,c),A[a]=new Array(h);for(var u=0;u<A[a].length;u+=1)A[a][u]=255&e.getBuffer()[u+r];r+=h;var d=o.getErrorCorrectPolynomial(c),p=l(A[a],d.getLength()-1).mod(d);for(n[a]=new Array(d.getLength()-1),u=0;u<n[a].length;u+=1){var g=u+p.getLength()-n[a].length;n[a][u]=g>=0?p.getAt(g):0}}var _=0;for(u=0;u<t.length;u+=1)_+=t[u].totalCount;var m=new Array(_),f=0;for(u=0;u<i;u+=1)for(a=0;a<t.length;a+=1)u<A[a].length&&(m[f]=A[a][u],f+=1);for(u=0;u<s;u+=1)for(a=0;a<t.length;a+=1)u<n[a].length&&(m[f]=n[a][u],f+=1);return m}(s,i)};m.addData=function(e,t){var r=null;switch(t=t||"Byte"){case"Numeric":r=u(e);break;case"Alphanumeric":r=d(e);break;case"Byte":r=p(e);break;case"Kanji":r=g(e);break;default:throw"mode:"+t}_.push(r),a=null},m.isDark=function(e,t){if(e<0||A<=e||t<0||A<=t)throw e+","+t;return s[e][t]},m.getModuleCount=function(){return A},m.make=function(){if(r<1){for(var e=1;e<40;e++){for(var t=h.getRSBlocks(e,i),s=c(),A=0;A<_.length;A++){var n=_[A];s.put(n.getMode(),4),s.put(n.getLength(),o.getLengthInBits(n.getMode(),e)),n.write(s)}var a=0;for(A=0;A<t.length;A++)a+=t[A].dataCount;if(s.getLengthInBits()<=8*a)break}r=e}w(!1,function(){for(var e=0,t=0,r=0;r<8;r+=1){w(!0,r);var i=o.getLostPoint(m);(0==r||e>i)&&(e=i,t=r)}return t}())},m.createTableTag=function(e,t){e=e||2;var r="";r+='<table style="',r+=" border-width: 0px; border-style: none;",r+=" border-collapse: collapse;",r+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",r+='">',r+="<tbody>";for(var i=0;i<m.getModuleCount();i+=1){r+="<tr>";for(var s=0;s<m.getModuleCount();s+=1)r+='<td style="',r+=" border-width: 0px; border-style: none;",r+=" border-collapse: collapse;",r+=" padding: 0px; margin: 0px;",r+=" width: "+e+"px;",r+=" height: "+e+"px;",r+=" background-color: ",r+=m.isDark(i,s)?"#000000":"#ffffff",r+=";",r+='"/>';r+="</tr>"}return(r+="</tbody>")+"</table>"},m.createSvgTag=function(e,t,r,i){var s={};"object"==typeof arguments[0]&&(e=(s=arguments[0]).cellSize,t=s.margin,r=s.alt,i=s.title),e=e||2,t=void 0===t?4*e:t,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var A,n,o,a,l=m.getModuleCount()*e+2*t,h="";for(a="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",h+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',h+=s.scalable?"":' width="'+l+'px" height="'+l+'px"',h+=' viewBox="0 0 '+l+" "+l+'" ',h+=' preserveAspectRatio="xMinYMin meet"',h+=i.text||r.text?' role="img" aria-labelledby="'+I([i.id,r.id].join(" ").trim())+'"':"",h+=">",h+=i.text?'<title id="'+I(i.id)+'">'+I(i.text)+"</title>":"",h+=r.text?'<description id="'+I(r.id)+'">'+I(r.text)+"</description>":"",h+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',h+='<path d="',n=0;n<m.getModuleCount();n+=1)for(o=n*e+t,A=0;A<m.getModuleCount();A+=1)m.isDark(n,A)&&(h+="M"+(A*e+t)+","+o+a);return(h+='" stroke="transparent" fill="black"/>')+"</svg>"},m.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var r=m.getModuleCount()*e+2*t,i=t,s=r-t;return f(r,r,(function(t,r){if(i<=t&&t<s&&i<=r&&r<s){var A=Math.floor((t-i)/e),n=Math.floor((r-i)/e);return m.isDark(n,A)?0:1}return 1}))},m.createImgTag=function(e,t,r){e=e||2,t=void 0===t?4*e:t;var i=m.getModuleCount()*e+2*t,s="";return s+="<img",s+=' src="',s+=m.createDataURL(e,t),s+='"',s+=' width="',s+=i,s+='"',s+=' height="',s+=i,s+='"',r&&(s+=' alt="',s+=I(r),s+='"'),s+"/>"};var I=function(e){for(var t="",r=0;r<e.length;r+=1){var i=e.charAt(r);switch(i){case"<":t+="&lt;";break;case">":t+="&gt;";break;case"&":t+="&amp;";break;case'"':t+="&quot;";break;default:t+=i}}return t};return m.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,r,i,s,A,n=1*m.getModuleCount()+2*e,o=e,a=n-e,l={"██":"█","█ ":"▀"," █":"▄"," ":" "},h={"██":"▀","█ ":"▀"," █":" "," ":" "},c="";for(t=0;t<n;t+=2){for(i=Math.floor((t-o)/1),s=Math.floor((t+1-o)/1),r=0;r<n;r+=1)A="█",o<=r&&r<a&&o<=t&&t<a&&m.isDark(i,Math.floor((r-o)/1))&&(A=" "),o<=r&&r<a&&o<=t+1&&t+1<a&&m.isDark(s,Math.floor((r-o)/1))?A+=" ":A+="█",c+=e<1&&t+1>=a?h[A]:l[A];c+="\n"}return n%2&&e>0?c.substring(0,c.length-n-1)+Array(n+1).join("▀"):c.substring(0,c.length-1)}(t);e-=1,t=void 0===t?2*e:t;var r,i,s,A,n=m.getModuleCount()*e+2*t,o=t,a=n-t,l=Array(e+1).join("██"),h=Array(e+1).join(" "),c="",u="";for(r=0;r<n;r+=1){for(s=Math.floor((r-o)/e),u="",i=0;i<n;i+=1)A=1,o<=i&&i<a&&o<=r&&r<a&&m.isDark(s,Math.floor((i-o)/e))&&(A=0),u+=A?l:h;for(s=0;s<e;s+=1)c+=u+"\n"}return c.substring(0,c.length-1)},m.renderTo2dContext=function(e,t){t=t||2;for(var r=m.getModuleCount(),i=0;i<r;i++)for(var s=0;s<r;s++)e.fillStyle=m.isDark(i,s)?"black":"white",e.fillRect(i*t,s*t,t,t)},m};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],r=0;r<e.length;r+=1){var i=e.charCodeAt(r);t.push(255&i)}return t}}).default,e.createStringToBytes=function(e,t){var r=function(){for(var r=m(e),i=function(){var e=r.read();if(-1==e)throw"eof";return e},s=0,A={};;){var n=r.read();if(-1==n)break;var o=i(),a=i()<<8|i();A[String.fromCharCode(n<<8|o)]=a,s+=1}if(s!=t)throw s+" != "+t;return A}(),i="?".charCodeAt(0);return function(e){for(var t=[],s=0;s<e.length;s+=1){var A=e.charCodeAt(s);if(A<128)t.push(A);else{var n=r[e.charAt(s)];"number"==typeof n?(255&n)==n?t.push(n):(t.push(n>>>8),t.push(255&n)):t.push(i)}}return t}};var t,r,i,s,A,n={L:1,M:0,Q:3,H:2},o=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,i=7973,A=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(s={}).getBCHTypeInfo=function(e){for(var t=e<<10;A(t)-A(r)>=0;)t^=r<<A(t)-A(r);return 21522^(e<<10|t)},s.getBCHTypeNumber=function(e){for(var t=e<<12;A(t)-A(i)>=0;)t^=i<<A(t)-A(i);return e<<12|t},s.getPatternPosition=function(e){return t[e-1]},s.getMaskFunction=function(e){switch(e){case 0:return function(e,t){return(e+t)%2==0};case 1:return function(e,t){return e%2==0};case 2:return function(e,t){return t%3==0};case 3:return function(e,t){return(e+t)%3==0};case 4:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case 5:return function(e,t){return e*t%2+e*t%3==0};case 6:return function(e,t){return(e*t%2+e*t%3)%2==0};case 7:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},s.getErrorCorrectPolynomial=function(e){for(var t=l([1],0),r=0;r<e;r+=1)t=t.multiply(l([1,a.gexp(r)],0));return t},s.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+e}}},s.getLostPoint=function(e){for(var t=e.getModuleCount(),r=0,i=0;i<t;i+=1)for(var s=0;s<t;s+=1){for(var A=0,n=e.isDark(i,s),o=-1;o<=1;o+=1)if(!(i+o<0||t<=i+o))for(var a=-1;a<=1;a+=1)s+a<0||t<=s+a||0==o&&0==a||n==e.isDark(i+o,s+a)&&(A+=1);A>5&&(r+=3+A-5)}for(i=0;i<t-1;i+=1)for(s=0;s<t-1;s+=1){var l=0;e.isDark(i,s)&&(l+=1),e.isDark(i+1,s)&&(l+=1),e.isDark(i,s+1)&&(l+=1),e.isDark(i+1,s+1)&&(l+=1),0!=l&&4!=l||(r+=3)}for(i=0;i<t;i+=1)for(s=0;s<t-6;s+=1)e.isDark(i,s)&&!e.isDark(i,s+1)&&e.isDark(i,s+2)&&e.isDark(i,s+3)&&e.isDark(i,s+4)&&!e.isDark(i,s+5)&&e.isDark(i,s+6)&&(r+=40);for(s=0;s<t;s+=1)for(i=0;i<t-6;i+=1)e.isDark(i,s)&&!e.isDark(i+1,s)&&e.isDark(i+2,s)&&e.isDark(i+3,s)&&e.isDark(i+4,s)&&!e.isDark(i+5,s)&&e.isDark(i+6,s)&&(r+=40);var h=0;for(s=0;s<t;s+=1)for(i=0;i<t;i+=1)e.isDark(i,s)&&(h+=1);return r+Math.abs(100*h/t/t-50)/5*10},s),a=function(){for(var e=new Array(256),t=new Array(256),r=0;r<8;r+=1)e[r]=1<<r;for(r=8;r<256;r+=1)e[r]=e[r-4]^e[r-5]^e[r-6]^e[r-8];for(r=0;r<255;r+=1)t[e[r]]=r;return{glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}}}();function l(e,t){if(void 0===e.length)throw e.length+"/"+t;var r=function(){for(var r=0;r<e.length&&0==e[r];)r+=1;for(var i=new Array(e.length-r+t),s=0;s<e.length-r;s+=1)i[s]=e[s+r];return i}(),i={getAt:function(e){return r[e]},getLength:function(){return r.length},multiply:function(e){for(var t=new Array(i.getLength()+e.getLength()-1),r=0;r<i.getLength();r+=1)for(var s=0;s<e.getLength();s+=1)t[r+s]^=a.gexp(a.glog(i.getAt(r))+a.glog(e.getAt(s)));return l(t,0)},mod:function(e){if(i.getLength()-e.getLength()<0)return i;for(var t=a.glog(i.getAt(0))-a.glog(e.getAt(0)),r=new Array(i.getLength()),s=0;s<i.getLength();s+=1)r[s]=i.getAt(s);for(s=0;s<e.getLength();s+=1)r[s]^=a.gexp(a.glog(e.getAt(s))+t);return l(r,0).mod(e)}};return i}var h=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var r={};return r.totalCount=e,r.dataCount=t,r},r={getRSBlocks:function(r,i){var s=function(t,r){switch(r){case n.L:return e[4*(t-1)+0];case n.M:return e[4*(t-1)+1];case n.Q:return e[4*(t-1)+2];case n.H:return e[4*(t-1)+3];default:return}}(r,i);if(void 0===s)throw"bad rs block @ typeNumber:"+r+"/errorCorrectionLevel:"+i;for(var A=s.length/3,o=[],a=0;a<A;a+=1)for(var l=s[3*a+0],h=s[3*a+1],c=s[3*a+2],u=0;u<l;u+=1)o.push(t(h,c));return o}};return r}(),c=function(){var e=[],t=0,r={getBuffer:function(){return e},getAt:function(t){var r=Math.floor(t/8);return 1==(e[r]>>>7-t%8&1)},put:function(e,t){for(var i=0;i<t;i+=1)r.putBit(1==(e>>>t-i-1&1))},getLengthInBits:function(){return t},putBit:function(r){var i=Math.floor(t/8);e.length<=i&&e.push(0),r&&(e[i]|=128>>>t%8),t+=1}};return r},u=function(e){var t=e,r={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var r=t,s=0;s+2<r.length;)e.put(i(r.substring(s,s+3)),10),s+=3;s<r.length&&(r.length-s==1?e.put(i(r.substring(s,s+1)),4):r.length-s==2&&e.put(i(r.substring(s,s+2)),7))}},i=function(e){for(var t=0,r=0;r<e.length;r+=1)t=10*t+s(e.charAt(r));return t},s=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},d=function(e){var t=e,r={getMode:function(){return 2},getLength:function(e){return t.length},write:function(e){for(var r=t,s=0;s+1<r.length;)e.put(45*i(r.charAt(s))+i(r.charAt(s+1)),11),s+=2;s<r.length&&e.put(i(r.charAt(s)),6)}},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},p=function(t){var r=e.stringToBytes(t);return{getMode:function(){return 4},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}}},g=function(t){var r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(e,t){var i=r("友");if(2!=i.length||38726!=(i[0]<<8|i[1]))throw"sjis not supported."}();var i=r(t);return{getMode:function(){return 8},getLength:function(e){return~~(i.length/2)},write:function(e){for(var t=i,r=0;r+1<t.length;){var s=(255&t[r])<<8|255&t[r+1];if(33088<=s&&s<=40956)s-=33088;else{if(!(57408<=s&&s<=60351))throw"illegal char at "+(r+1)+"/"+s;s-=49472}s=192*(s>>>8&255)+(255&s),e.put(s,13),r+=2}if(r<t.length)throw"illegal char at "+(r+1)}}},_=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,r,i){r=r||0,i=i||e.length;for(var s=0;s<i;s+=1)t.writeByte(e[s+r])},writeString:function(e){for(var r=0;r<e.length;r+=1)t.writeByte(e.charCodeAt(r))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var r=0;r<e.length;r+=1)r>0&&(t+=","),t+=e[r];return t+"]"}};return t},m=function(e){var t=e,r=0,i=0,s=0,A={read:function(){for(;s<8;){if(r>=t.length){if(0==s)return-1;throw"unexpected end of file./"+s}var e=t.charAt(r);if(r+=1,"="==e)return s=0,-1;e.match(/^\s$/)||(i=i<<6|n(e.charCodeAt(0)),s+=6)}var A=i>>>s-8&255;return s-=8,A}},n=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return A},f=function(e,t,r){for(var i=function(e,t){var r=e,i=t,s=new Array(e*t),A={setPixel:function(e,t,i){s[t*r+e]=i},write:function(e){e.writeString("GIF87a"),e.writeShort(r),e.writeShort(i),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(r),e.writeShort(i),e.writeByte(0);var t=n(2);e.writeByte(2);for(var s=0;t.length-s>255;)e.writeByte(255),e.writeBytes(t,s,255),s+=255;e.writeByte(t.length-s),e.writeBytes(t,s,t.length-s),e.writeByte(0),e.writeString(";")}},n=function(e){for(var t=1<<e,r=1+(1<<e),i=e+1,A=o(),n=0;n<t;n+=1)A.add(String.fromCharCode(n));A.add(String.fromCharCode(t)),A.add(String.fromCharCode(r));var a,l,h,c=_(),u=(a=c,l=0,h=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;l+t>=8;)a.writeByte(255&(e<<l|h)),t-=8-l,e>>>=8-l,h=0,l=0;h|=e<<l,l+=t},flush:function(){l>0&&a.writeByte(h)}});u.write(t,i);var d=0,p=String.fromCharCode(s[d]);for(d+=1;d<s.length;){var g=String.fromCharCode(s[d]);d+=1,A.contains(p+g)?p+=g:(u.write(A.indexOf(p),i),A.size()<4095&&(A.size()==1<<i&&(i+=1),A.add(p+g)),p=g)}return u.write(A.indexOf(p),i),u.write(r,i),u.flush(),c.toByteArray()},o=function(){var e={},t=0,r={add:function(i){if(r.contains(i))throw"dup key:"+i;e[i]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return r};return A}(e,t),s=0;s<t;s+=1)for(var A=0;A<e;A+=1)i.setPixel(A,s,r(A,s));var n=_();i.write(n);for(var o=function(){var e=0,t=0,r=0,i="",s={},A=function(e){i+=String.fromCharCode(n(63&e))},n=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return s.writeByte=function(i){for(e=e<<8|255&i,t+=8,r+=1;t>=6;)A(e>>>t-6),t-=6},s.flush=function(){if(t>0&&(A(e<<6-t),e=0,t=0),r%3!=0)for(var s=3-r%3,n=0;n<s;n+=1)i+="="},s.toString=function(){return i},s}(),a=n.toByteArray(),l=0;l<a.length;l+=1)o.writeByte(a[l]);return o.flush(),"data:image/gif;base64,"+o};return e}();s.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t.push(i):i<2048?t.push(192|i>>6,128|63&i):i<55296||i>=57344?t.push(224|i>>12,128|i>>6&63,128|63&i):(r++,i=65536+((1023&i)<<10|1023&e.charCodeAt(r)),t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return t}(e)},void 0===(i="function"==typeof(r=function(){return s})?r.apply(t,[]):r)||(e.exports=i)},151:(e,t,r)=>{r.d(t,{default:()=>b});var i=function(){return(i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=Array(e),s=0;for(t=0;t<r;t++)for(var A=arguments[t],n=0,o=A.length;n<o;n++,s++)i[s]=A[n];return i},A=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)};function n(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!t.length)return e;var o=t.shift();return void 0!==o&&A(e)&&A(o)?(e=i({},e),Object.keys(o).forEach((function(t){var r=e[t],i=o[t];Array.isArray(r)&&Array.isArray(i)?e[t]=i:A(r)&&A(i)?e[t]=n(Object.assign({},r),i):e[t]=i})),n.apply(void 0,s([e],t))):e}const o={L:.07,M:.15,Q:.25,H:.3};var a=function(){return(a=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};const l=function(){function e(e){var t=e.context,r=e.type;this._context=t,this._type=r}return e.prototype.draw=function(e,t,r,i){var s,A=this._context;switch(this._type){case"dots":s=this._drawDot;break;case"classy":s=this._drawClassy;break;case"classy-rounded":s=this._drawClassyRounded;break;case"rounded":s=this._drawRounded;break;case"extra-rounded":s=this._drawExtraRounded;break;default:s=this._drawSquare}s.call(this,{x:e,y:t,size:r,context:A,getNeighbor:i})},e.prototype._rotateFigure=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation,n=e.draw,o=t+i/2,a=r+i/2;s.translate(o,a),A&&s.rotate(A),n(),s.closePath(),A&&s.rotate(-A),s.translate(-o,-a)},e.prototype._basicDot=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(0,0,t/2,0,2*Math.PI)}}))},e.prototype._basicSquare=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.rect(-t/2,-t/2,t,t)}}))},e.prototype._basicSideRounded=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(0,0,t/2,-Math.PI/2,Math.PI/2),r.lineTo(-t/2,t/2),r.lineTo(-t/2,-t/2),r.lineTo(0,-t/2)}}))},e.prototype._basicCornerRounded=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(0,0,t/2,-Math.PI/2,0),r.lineTo(t/2,t/2),r.lineTo(-t/2,t/2),r.lineTo(-t/2,-t/2),r.lineTo(0,-t/2)}}))},e.prototype._basicCornerExtraRounded=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(-t/2,t/2,t,-Math.PI/2,0),r.lineTo(-t/2,t/2),r.lineTo(-t/2,-t/2)}}))},e.prototype._basicCornersRounded=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(0,0,t/2,-Math.PI/2,0),r.lineTo(t/2,t/2),r.lineTo(0,t/2),r.arc(0,0,t/2,Math.PI/2,Math.PI),r.lineTo(-t/2,-t/2),r.lineTo(0,-t/2)}}))},e.prototype._basicCornersExtraRounded=function(e){var t=e.size,r=e.context;this._rotateFigure(a(a({},e),{draw:function(){r.arc(-t/2,t/2,t,-Math.PI/2,0),r.arc(t/2,-t/2,t,Math.PI/2,Math.PI)}}))},e.prototype._drawDot=function(e){var t=e.x,r=e.y,i=e.size,s=e.context;this._basicDot({x:t,y:r,size:i,context:s,rotation:0})},e.prototype._drawSquare=function(e){var t=e.x,r=e.y,i=e.size,s=e.context;this._basicSquare({x:t,y:r,size:i,context:s,rotation:0})},e.prototype._drawRounded=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.getNeighbor,n=+A(-1,0),o=+A(1,0),a=+A(0,-1),l=+A(0,1),h=n+o+a+l;if(0!==h)if(h>2||n&&o||a&&l)this._basicSquare({x:t,y:r,size:i,context:s,rotation:0});else{if(2===h){var c=0;return n&&a?c=Math.PI/2:a&&o?c=Math.PI:o&&l&&(c=-Math.PI/2),void this._basicCornerRounded({x:t,y:r,size:i,context:s,rotation:c})}if(1===h)return c=0,a?c=Math.PI/2:o?c=Math.PI:l&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:r,size:i,context:s,rotation:c})}else this._basicDot({x:t,y:r,size:i,context:s,rotation:0})},e.prototype._drawExtraRounded=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.getNeighbor,n=+A(-1,0),o=+A(1,0),a=+A(0,-1),l=+A(0,1),h=n+o+a+l;if(0!==h)if(h>2||n&&o||a&&l)this._basicSquare({x:t,y:r,size:i,context:s,rotation:0});else{if(2===h){var c=0;return n&&a?c=Math.PI/2:a&&o?c=Math.PI:o&&l&&(c=-Math.PI/2),void this._basicCornerExtraRounded({x:t,y:r,size:i,context:s,rotation:c})}if(1===h)return c=0,a?c=Math.PI/2:o?c=Math.PI:l&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:r,size:i,context:s,rotation:c})}else this._basicDot({x:t,y:r,size:i,context:s,rotation:0})},e.prototype._drawClassy=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.getNeighbor,n=+A(-1,0),o=+A(1,0),a=+A(0,-1),l=+A(0,1);0!==n+o+a+l?n||a?o||l?this._basicSquare({x:t,y:r,size:i,context:s,rotation:0}):this._basicCornerRounded({x:t,y:r,size:i,context:s,rotation:Math.PI/2}):this._basicCornerRounded({x:t,y:r,size:i,context:s,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:i,context:s,rotation:Math.PI/2})},e.prototype._drawClassyRounded=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.getNeighbor,n=+A(-1,0),o=+A(1,0),a=+A(0,-1),l=+A(0,1);0!==n+o+a+l?n||a?o||l?this._basicSquare({x:t,y:r,size:i,context:s,rotation:0}):this._basicCornerExtraRounded({x:t,y:r,size:i,context:s,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:t,y:r,size:i,context:s,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:i,context:s,rotation:Math.PI/2})},e}();var h=function(){return(h=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};const c=function(){function e(e){var t=e.context,r=e.type;this._context=t,this._type=r}return e.prototype.draw=function(e,t,r,i){var s,A=this._context;switch(this._type){case"square":s=this._drawSquare;break;case"extra-rounded":s=this._drawExtraRounded;break;default:s=this._drawDot}s.call(this,{x:e,y:t,size:r,context:A,rotation:i})},e.prototype._rotateFigure=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation,n=e.draw,o=t+i/2,a=r+i/2;s.translate(o,a),A&&s.rotate(A),n(),s.closePath(),A&&s.rotate(-A),s.translate(-o,-a)},e.prototype._basicDot=function(e){var t=e.size,r=e.context,i=t/7;this._rotateFigure(h(h({},e),{draw:function(){r.arc(0,0,t/2,0,2*Math.PI),r.arc(0,0,t/2-i,0,2*Math.PI)}}))},e.prototype._basicSquare=function(e){var t=e.size,r=e.context,i=t/7;this._rotateFigure(h(h({},e),{draw:function(){r.rect(-t/2,-t/2,t,t),r.rect(-t/2+i,-t/2+i,t-2*i,t-2*i)}}))},e.prototype._basicExtraRounded=function(e){var t=e.size,r=e.context,i=t/7;this._rotateFigure(h(h({},e),{draw:function(){r.arc(-i,-i,2.5*i,Math.PI,-Math.PI/2),r.lineTo(i,-3.5*i),r.arc(i,-i,2.5*i,-Math.PI/2,0),r.lineTo(3.5*i,-i),r.arc(i,i,2.5*i,0,Math.PI/2),r.lineTo(-i,3.5*i),r.arc(-i,i,2.5*i,Math.PI/2,Math.PI),r.lineTo(-3.5*i,-i),r.arc(-i,-i,1.5*i,Math.PI,-Math.PI/2),r.lineTo(i,-2.5*i),r.arc(i,-i,1.5*i,-Math.PI/2,0),r.lineTo(2.5*i,-i),r.arc(i,i,1.5*i,0,Math.PI/2),r.lineTo(-i,2.5*i),r.arc(-i,i,1.5*i,Math.PI/2,Math.PI),r.lineTo(-2.5*i,-i)}}))},e.prototype._drawDot=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation;this._basicDot({x:t,y:r,size:i,context:s,rotation:A})},e.prototype._drawSquare=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation;this._basicSquare({x:t,y:r,size:i,context:s,rotation:A})},e.prototype._drawExtraRounded=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation;this._basicExtraRounded({x:t,y:r,size:i,context:s,rotation:A})},e}();var u=function(){return(u=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};const d=function(){function e(e){var t=e.context,r=e.type;this._context=t,this._type=r}return e.prototype.draw=function(e,t,r,i){var s=this._context;("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:e,y:t,size:r,context:s,rotation:i})},e.prototype._rotateFigure=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation,n=e.draw,o=t+i/2,a=r+i/2;s.translate(o,a),A&&s.rotate(A),n(),s.closePath(),A&&s.rotate(-A),s.translate(-o,-a)},e.prototype._basicDot=function(e){var t=e.size,r=e.context;this._rotateFigure(u(u({},e),{draw:function(){r.arc(0,0,t/2,0,2*Math.PI)}}))},e.prototype._basicSquare=function(e){var t=e.size,r=e.context;this._rotateFigure(u(u({},e),{draw:function(){r.rect(-t/2,-t/2,t,t)}}))},e.prototype._drawDot=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation;this._basicDot({x:t,y:r,size:i,context:s,rotation:A})},e.prototype._drawSquare=function(e){var t=e.x,r=e.y,i=e.size,s=e.context,A=e.rotation;this._basicSquare({x:t,y:r,size:i,context:s,rotation:A})},e}();var p=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],g=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const _=function(){function e(e){this._canvas=document.createElement("canvas"),this._canvas.width=e.width,this._canvas.height=e.height,this._options=e}return Object.defineProperty(e.prototype,"context",{get:function(){return this._canvas.getContext("2d")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._canvas.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._canvas.height},enumerable:!1,configurable:!0}),e.prototype.getCanvas=function(){return this._canvas},e.prototype.clear=function(){var e=this.context;e&&e.clearRect(0,0,this._canvas.width,this._canvas.height)},e.prototype.drawQR=function(e){return t=this,r=void 0,s=function(){var t,r,i,s,A,n,a,l,h,c=this;return function(e,t){var r,i,s,A,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return A={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(A[Symbol.iterator]=function(){return this}),A;function o(A){return function(o){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=2&A[0]?i.return:A[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,A[1])).done)return s;switch(i=0,s&&(A=[2&A[0],s.value]),A[0]){case 0:case 1:s=A;break;case 4:return n.label++,{value:A[1],done:!1};case 5:n.label++,i=A[1],A=[0];continue;case 7:A=n.ops.pop(),n.trys.pop();continue;default:if(!((s=(s=n.trys).length>0&&s[s.length-1])||6!==A[0]&&2!==A[0])){n=0;continue}if(3===A[0]&&(!s||A[1]>s[0]&&A[1]<s[3])){n.label=A[1];break}if(6===A[0]&&n.label<s[1]){n.label=s[1],s=A;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(A);break}s[2]&&n.ops.pop(),n.trys.pop();continue}A=t.call(e,n)}catch(e){A=[6,e],i=0}finally{r=s=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,o])}}}(this,(function(u){switch(u.label){case 0:return t=e.getModuleCount(),r=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=Math.floor(r/t),s={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=e,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(u.sent(),!this._image)return[2];A=this._options,n=A.imageOptions,a=A.qrOptions,l=n.imageSize*o[a.errorCorrectionLevel],h=Math.floor(l*t*t),s=function(e){var t=e.originalHeight,r=e.originalWidth,i=e.maxHiddenDots,s=e.maxHiddenAxisDots,A=e.dotSize,n={x:0,y:0},o={x:0,y:0};if(t<=0||r<=0||i<=0||A<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var a=t/r;return n.x=Math.floor(Math.sqrt(i/a)),n.x<=0&&(n.x=1),s&&s<n.x&&(n.x=s),n.x%2==0&&n.x--,o.x=n.x*A,n.y=1+2*Math.ceil((n.x*a-1)/2),o.y=Math.round(o.x*a),(n.y*n.x>i||s&&s<n.y)&&(s&&s<n.y?(n.y=s,n.y%2==0&&n.x--):n.y-=2,o.y=n.y*A,n.x=1+2*Math.ceil((n.y/a-1)/2),o.x=Math.round(o.y/a)),{height:o.y,width:o.x,hideYDots:n.y,hideXDots:n.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:h,maxHiddenAxisDots:t-14,dotSize:i}),u.label=2;case 2:return this.clear(),this.drawBackground(),this.drawDots((function(e,r){var i,A,n,o,a,l;return!(c._options.imageOptions.hideBackgroundDots&&e>=(t-s.hideXDots)/2&&e<(t+s.hideXDots)/2&&r>=(t-s.hideYDots)/2&&r<(t+s.hideYDots)/2||(null===(i=p[e])||void 0===i?void 0:i[r])||(null===(A=p[e-t+7])||void 0===A?void 0:A[r])||(null===(n=p[e])||void 0===n?void 0:n[r-t+7])||(null===(o=g[e])||void 0===o?void 0:o[r])||(null===(a=g[e-t+7])||void 0===a?void 0:a[r])||(null===(l=g[e])||void 0===l?void 0:l[r-t+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:s.width,height:s.height,count:t,dotSize:i}),[2]}}))},new((i=void 0)||(i=Promise))((function(e,A){function n(e){try{a(s.next(e))}catch(e){A(e)}}function o(e){try{a(s.throw(e))}catch(e){A(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(n,o)}a((s=s.apply(t,r||[])).next())}));var t,r,i,s},e.prototype.drawBackground=function(){var e=this.context,t=this._options;if(e){if(t.backgroundOptions.gradient){var r=t.backgroundOptions.gradient,i=this._createGradient({context:e,options:r,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});r.colorStops.forEach((function(e){var t=e.offset,r=e.color;i.addColorStop(t,r)})),e.fillStyle=i}else t.backgroundOptions.color&&(e.fillStyle=t.backgroundOptions.color);e.fillRect(0,0,this._canvas.width,this._canvas.height)}},e.prototype.drawDots=function(e){var t=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var i=this._options,s=this._qr.getModuleCount();if(s>i.width||s>i.height)throw"The canvas is too small.";var A=Math.min(i.width,i.height)-2*i.margin,n=Math.floor(A/s),o=Math.floor((i.width-s*n)/2),a=Math.floor((i.height-s*n)/2),h=new l({context:r,type:i.dotsOptions.type});r.beginPath();for(var c=function(r){for(var i=function(i){return e&&!e(r,i)?"continue":u._qr.isDark(r,i)?void h.draw(o+r*n,a+i*n,n,(function(A,n){return!(r+A<0||i+n<0||r+A>=s||i+n>=s)&&!(e&&!e(r+A,i+n))&&!!t._qr&&t._qr.isDark(r+A,i+n)})):"continue"},A=0;A<s;A++)i(A)},u=this,d=0;d<s;d++)c(d);if(i.dotsOptions.gradient){var p=i.dotsOptions.gradient,g=this._createGradient({context:r,options:p,additionalRotation:0,x:o,y:a,size:s*n});p.colorStops.forEach((function(e){var t=e.offset,r=e.color;g.addColorStop(t,r)})),r.fillStyle=r.strokeStyle=g}else i.dotsOptions.color&&(r.fillStyle=r.strokeStyle=i.dotsOptions.color);r.fill("evenodd")},e.prototype.drawCorners=function(e){var t=this;if(!this._qr)throw"QR code is not defined";var r=this.context;if(!r)throw"QR code is not defined";var i=this._options,s=this._qr.getModuleCount(),A=Math.min(i.width,i.height)-2*i.margin,n=Math.floor(A/s),o=7*n,a=3*n,h=Math.floor((i.width-s*n)/2),u=Math.floor((i.height-s*n)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(A){var _,m,f,w,C,B,E,y,S,b,T=A[0],I=A[1],P=A[2];if(!e||e(T,I)){var R=h+T*n*(s-7),v=u+I*n*(s-7);if(null===(_=i.cornersSquareOptions)||void 0===_?void 0:_.type){var x=new c({context:r,type:null===(m=i.cornersSquareOptions)||void 0===m?void 0:m.type});r.beginPath(),x.draw(R,v,o,P)}else{var O=new l({context:r,type:i.dotsOptions.type});r.beginPath();for(var F=function(e){for(var t=function(t){if(!(null===(f=p[e])||void 0===f?void 0:f[t]))return"continue";O.draw(R+e*n,v+t*n,n,(function(r,i){var s;return!!(null===(s=p[e+r])||void 0===s?void 0:s[t+i])}))},r=0;r<p[e].length;r++)t(r)},L=0;L<p.length;L++)F(L)}if(null===(w=i.cornersSquareOptions)||void 0===w?void 0:w.gradient){var D=i.cornersSquareOptions.gradient,U=t._createGradient({context:r,options:D,additionalRotation:P,x:R,y:v,size:o});D.colorStops.forEach((function(e){var t=e.offset,r=e.color;U.addColorStop(t,r)})),r.fillStyle=r.strokeStyle=U}else(null===(C=i.cornersSquareOptions)||void 0===C?void 0:C.color)&&(r.fillStyle=r.strokeStyle=i.cornersSquareOptions.color);if(r.fill("evenodd"),null===(B=i.cornersDotOptions)||void 0===B?void 0:B.type){var H=new d({context:r,type:null===(E=i.cornersDotOptions)||void 0===E?void 0:E.type});r.beginPath(),H.draw(R+2*n,v+2*n,a,P)}else{O=new l({context:r,type:i.dotsOptions.type}),r.beginPath();var N=function(e){for(var t=function(t){if(!(null===(y=g[e])||void 0===y?void 0:y[t]))return"continue";O.draw(R+e*n,v+t*n,n,(function(r,i){var s;return!!(null===(s=g[e+r])||void 0===s?void 0:s[t+i])}))},r=0;r<g[e].length;r++)t(r)};for(L=0;L<g.length;L++)N(L)}if(null===(S=i.cornersDotOptions)||void 0===S?void 0:S.gradient){D=i.cornersDotOptions.gradient;var Q=t._createGradient({context:r,options:D,additionalRotation:P,x:R+2*n,y:v+2*n,size:a});D.colorStops.forEach((function(e){var t=e.offset,r=e.color;Q.addColorStop(t,r)})),r.fillStyle=r.strokeStyle=Q}else(null===(b=i.cornersDotOptions)||void 0===b?void 0:b.color)&&(r.fillStyle=r.strokeStyle=i.cornersDotOptions.color);r.fill("evenodd")}}))},e.prototype.loadImage=function(){var e=this;return new Promise((function(t,r){var i=e._options,s=new Image;if(!i.image)return r("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(s.crossOrigin=i.imageOptions.crossOrigin),e._image=s,s.onload=function(){t()},s.src=i.image}))},e.prototype.drawImage=function(e){var t=e.width,r=e.height,i=e.count,s=e.dotSize,A=this.context;if(!A)throw"canvasContext is not defined";if(!this._image)throw"image is not defined";var n=this._options,o=Math.floor((n.width-i*s)/2),a=Math.floor((n.height-i*s)/2),l=o+n.imageOptions.margin+(i*s-t)/2,h=a+n.imageOptions.margin+(i*s-r)/2,c=t-2*n.imageOptions.margin,u=r-2*n.imageOptions.margin;A.drawImage(this._image,l,h,c<0?0:c,u<0?0:u)},e.prototype._createGradient=function(e){var t,r=e.context,i=e.options,s=e.additionalRotation,A=e.x,n=e.y,o=e.size;if("radial"===i.type)t=r.createRadialGradient(A+o/2,n+o/2,0,A+o/2,n+o/2,o/2);else{var a=((i.rotation||0)+s)%(2*Math.PI),l=(a+2*Math.PI)%(2*Math.PI),h=A+o/2,c=n+o/2,u=A+o/2,d=n+o/2;l>=0&&l<=.25*Math.PI||l>1.75*Math.PI&&l<=2*Math.PI?(h-=o/2,c-=o/2*Math.tan(a),u+=o/2,d+=o/2*Math.tan(a)):l>.25*Math.PI&&l<=.75*Math.PI?(c-=o/2,h-=o/2/Math.tan(a),d+=o/2,u+=o/2/Math.tan(a)):l>.75*Math.PI&&l<=1.25*Math.PI?(h+=o/2,c+=o/2*Math.tan(a),u-=o/2,d-=o/2*Math.tan(a)):l>1.25*Math.PI&&l<=1.75*Math.PI&&(c+=o/2,h+=o/2/Math.tan(a),d-=o/2,u-=o/2/Math.tan(a)),t=r.createLinearGradient(Math.round(h),Math.round(c),Math.round(u),Math.round(d))}return t},e}();for(var m={},f=0;f<=40;f++)m[f]=f;const w={width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:m[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var C=function(){return(C=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function B(e){var t=C({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map((function(e){return C(C({},e),{offset:Number(e.offset)})})),t}function E(e){var t=C({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=C(C({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=C({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=B(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=C({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=B(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=C({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=B(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=C({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=B(t.backgroundOptions.gradient))),t}var y=r(192),S=r.n(y);const b=function(){function e(e){this._options=e?E(n(w,e)):w,this.update()}return e._clearContainer=function(e){e&&(e.innerHTML="")},e.prototype.update=function(t){e._clearContainer(this._container),this._options=t?E(n(this._options,t)):this._options,this._options.data&&(this._qr=S()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._canvas=new _(this._options),this._drawingPromise=this._canvas.drawQR(this._qr),this.append(this._container))},e.prototype.append=function(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._canvas&&e.appendChild(this._canvas.getCanvas()),this._container=e}},e.prototype.download=function(e){var t=this;this._drawingPromise&&this._drawingPromise.then((function(){if(t._canvas){var r="png",i="qr";"string"==typeof e?(r=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(i=e.name),e.extension&&(r=e.extension)),function(e,t){var r=document.createElement("a");r.download=t,r.href=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}(t._canvas.getCanvas().toDataURL("image/"+r),i+"."+r)}}))},e}()}},t={};function r(i){if(t[i])return t[i].exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r(151)})().default})),QRCodeStyling=getDefaultExportFromCjs(qrCodeStyling);class QrcodeItemElement extends ReportItemElement{constructor(e,t){super(e,t,"qrcodeItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-qrcode rr-item-element"}get guardLabel(){return"qrcode"}get debugLabel(){return"qrcode"}_doMeasure(e,t,r,i){const s=this.model;return this._setModelSize(s,t,r,i),this._isTesting()||this.$_render(s,t),Size.create(t.offsetWidth,t.offsetHeight)}isDom(e){return e.parentElement===this.dom||super.isDom(e)}$_render(e,t){const{offsetWidth:r,offsetHeight:i}=t,s=QrcodeItem.QRCODE_MIN_SIZE;if(!(r<s||i<s))if(this._qrcode){const{width:e,height:t}=this._qrcode._options;r===e&&i===t||this._qrcode.update({width:r,height:i})}else this._qrcode=new QRCodeStyling({width:r,height:i,data:e.text,qrOptions:{errorCorrectionLevel:e.errorCorrectionLevel}}),this._qrcode.append(t)}}class ShapeItemBaseElement extends ReportItemElement{_getShape(e,t){const r=t.shapeCallback;let i=t.shape;if(t.value&&r){let s;s=e.printing?this.getPrintValue(e,t):t.value,i=r(e.getUserData(),t,s)||i}return i}_getDrawing(e,t){let r;return e&&(e=e.toLowerCase(),EllipseShape.isEllipse(e)?(r=this._ellipse?this._ellipse:this._ellipse=new EllipseShape,this._ellipse.circled=e===EllipseShape.CIRCLE):LineShape.isLine(e)?(r=this._line?this._line:this._line=new LineShape,this._line.shape=e):(r=this._polygon?this._polygon:this._polygon=new PolygonShape(e),this._polygon.shape=e)),r.className=t,r}}class ShapeItemElement extends ShapeItemBaseElement{constructor(e,t){super(e,t,"shapeItemView"),this.$_render=(e,t,r,i)=>{const s=this._getShape(e,this.model);if(s){const e=this._getDrawing(s);if(e){const A=getComputedStyle(this._svg),n=parseFloat(A.strokeWidth)||0,o="star"!==s?1:0;this._isTesting()||e.drawAt(o,o,t,r-2*o,i-2*o,n)}}}}_doDispose(){super._doDispose()}prepareExport(){const e=this.dom;this._svg.setAttribute("viewBox",[0,0,e.offsetWidth,e.offsetHeight].join(" "))}_getCssSelector(){return"rr-shape rr-item-element"}get debugLabel(){return""}_initDom(e,t){super._initDom(e,t),this._svg=SvgElement.createSVG(t,"rr-shape-shape",{position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%"})}_setStyles(e,t,r){super._setStyles(e,t,r),ShapeItem.STYLE_PROPS.forEach((e=>{e in t&&(this._svg.style[e]=t[e])}))}_doMeasure(e,t,r,i){const s=this.model;this._setModelSize(s,t,r,i),SvgElement.renderSVG(e,this._svg,this.$_render);const A=t.offsetWidth,n=t.offsetHeight;return e.printing&&SvgElement.prepareExport(this._svg,A,n),Size.create(A,n)}}class SvgItemElement extends ReportItemElement{constructor(e,t){super(e,t,"svgItemView"),SvgItemElement.SVG||(SvgItemElement.SVG=e.createElement("div"))}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-svg rr-item-element"}get debugLabel(){return""}_doMeasure(e,t,r,i){const s=this.model,A=s.svg&&e.assets.getSvg(s.svg),n=t.style;if(this._setModelSize(s,t,r,i),Utils.isIE){const e=SvgItemElement.SVG;e.innerHTML=A.substring(A.indexOf("<svg"));const r=e.lastChild;r instanceof SVGSVGElement?(r.setAttribute("viewbox","0 0 "+r.getAttribute("width")+" "+r.getAttribute("height")),r.setAttribute("width","100%"),r.setAttribute("height","100%"),t.innerHTML=e.innerHTML,delete t.dataset.empty):(t.dataset.empty="true",t.innerHTML="<span></span>")}else A?(n.background="no-repeat center/contain url('"+A+"')",t.innerHTML="",delete t.dataset.empty):(t.dataset.empty="true",t.innerHTML="<span></span>"),e.printing&&(t._svg_=A);return Size.create(t.offsetWidth,t.offsetHeight)}}class ChartWrapper extends Base{constructor(e,t){super(),ChartWrapper.Chartist||(ChartWrapper.Chartist=window.Chartist),this._container=e,this._model=t}_doDispose(){super._doDispose()}refreshChart(e,t,r){if(!ChartWrapper.Chartist)return;const i=this._model.theme?e.getChartist(this._model.theme):null,s={},A=i&&i.theme?Utils.deepClone(i.theme):{},n=A.plugins=[],o={};A.width=t,A.height=r,A.chartPadding={top:20,right:0,bottom:30,left:10},this._buildXAxis(o.axisX={}),this._buildYAxis(o.axisY={}),n.push(ChartWrapper.Chartist.plugins.ctAxisTitle(o)),this._buildOptions(this._model,s,A),this._doRefreshChart(this._container,this._model.chart,s,A)}_buildOptions(e,t,r){}_buildXAxis(e){Utils.extend(e,{axisTitle:"Time (mins)",axisClass:"ct-axis-title",offset:{x:0,y:40},textAnchor:"middle"})}_buildYAxis(e){Utils.extend(e,{axisTitle:"Goals",axisClass:"ct-axis-title",offset:{x:0,y:-10},textAnchor:"middle",flipTitle:!1})}}class CartesianChartWrapper extends ChartWrapper{constructor(e,t){super(e,t)}_doDispose(){super._doDispose()}get chartType(){return ChartType.BAR}_buildOptions(e,t,r){super._buildOptions(e,t,r);const i=e.chart,s=i.labels,A=i.values;t.labels=s,t.series=[A],isNaN(i.lowValue)||(r.low=i.lowValue),isNaN(i.highValue)||(r.high=i.highValue);let n=r.axisX=r.axisX||{};isNaN(i.xAxisOffset)||(n.offset=i.xAxisOffset),n=r.axisY=r.axisY||{},isNaN(i.yAxisOffset)||(n.offset=i.yAxisOffset)}}class LineChartWrapper extends CartesianChartWrapper{constructor(e,t){super(e,t)}_doDispose(){super._doDispose()}get chartType(){return ChartType.LINE}_buildOptions(e,t,r){super._buildOptions(e,t,r);const i=e.chart;r.showPoint=i.showPoint,r.lineSmooth=i.curved}_doRefreshChart(e,t,r,i){ChartWrapper.Chartist.Line(e,r,i).on("draw",(function(e){}))}}class PieChartWrapper extends ChartWrapper{constructor(e,t){super(e,t)}_doDispose(){super._doDispose()}get chartType(){return ChartType.PIE}_buildOptions(e,t,r){super._buildOptions(e,t,r);const i=e.chart,s=i.labels,A=i.values;t.labels=s,t.series=A}_doRefreshChart(e,t,r,i){ChartWrapper.Chartist.Pie(e,r,i).on("draw",(function(e){}))}}class BarChartWrapper extends CartesianChartWrapper{constructor(e,t){super(e,t)}_doDispose(){super._doDispose()}get chartType(){return ChartType.BAR}_doRefreshChart(e,t,r,i){ChartWrapper.Chartist.Bar(e,r,i).on("draw",(function(e){const t=e.element._node.style;"bar"==e.type&&(t.strokeWidth="30px")}))}}class ChartItemElement extends ReportItemElement{constructor(e,t){super(e,t,"chartItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-chart rr-item-element"}get debugLabel(){return"Chart"}_initDom(e,t){super._initDom(e,t);const r=this._chartDiv=e.createElement("div");r.className="rr-chart-wrapper",t.appendChild(r)}_doMeasure(e,t,r,i){const s=this.model,A=t.style;return e.printing||(t.style.border="1px solid rgba(55, 55, 55, 0.1)"),this.$_prepareWrapper(s,this._chartDiv),this._setModelSize(s,t,r,i),A.overflow="hidden",new Size(t.offsetWidth,t.offsetHeight)}_doLayoutContent(e){this._wrapper&&this.$_layoutWrapper(e,this._wrapper)}$_createWrapper(e,t){switch(t.chartType){case ChartType.LINE:return new LineChartWrapper(e,t);case ChartType.PIE:return new PieChartWrapper(e,t);case ChartType.BAR:default:return new BarChartWrapper(e,t)}}$_prepareWrapper(e,t){this._wrapper&&e.chartType==this._wrapper.chartType||(this._wrapper=this.$_createWrapper(t,e))}$_layoutWrapper(e,t){t.refreshChart(e.assets,this.width,this.height)}}class HichartWrapper extends Base{constructor(e,t){super(),HichartWrapper.Highcharts||(HichartWrapper.Highcharts=window.Highcharts),HichartWrapper.Highcharts&&HichartWrapper.Highcharts.setOptions(HichartWrapper.hichart_options),this._container=e,this._model=t}_doDispose(){super._doDispose()}refreshChart(e,t,r){if(!HichartWrapper.Highcharts)return;const i=e.assets,s=this._model,A=s.theme?i.getHighchart(s.theme):null,n=A&&A.theme?Utils.deepClone(A.theme):{};n.chart={inverted:s.inverted,styledMode:!1,backgroundColor:null},n.credits={enabled:!1},n.title={enabled:s.title.visible,text:s.title.visible?s.title.text:"",style:Utils.extend({},s.title.styles)},n.plotOptions=n.plotOptions||{},this._buildConfig(e,s,n);const o=HichartWrapper.Highcharts.chart(this._container,n);this._doRefreshChart(o,s,n)}_buildConfig(e,t,r){this.$_buildXAxis(e,t.xAxis,r.xAxis=r.xAxis||{}),this.$_buildYAxis(t.yAxis,r.yAxis=r.yAxis||{}),this.$_buildLegend(t.legend,r.legend=r.legend||{});const i=r.series=[];for(let r=0;r<t.series.count;r++){const s=t.series.get(r),A={};s.getWrapper(A),A.visible=s.visible&&(e.printing||s.designVisible),A.data=s.getValues(e.printing,e.dp),i.push(A)}}_doRefreshChart(e,t,r){}$_buildXAxis(e,t,r){r.categories=t.getCategories(e.printing,e.dp),r.title||(r.title={}),r.title.enabled=t.title.visible,r.title.text=t.title.text,r.title.style=Utils.extend({},t.title.styles)}$_buildYAxis(e,t){isNaN(e.min)||(t.min=e.min),isNaN(e.max)||(t.min=e.max),t.title||(t.title={}),t.title.enabled=e.title.visible,t.title.text=e.title.text,t.title.style=Utils.extend({},e.title.styles)}$_buildLegend(e,t){t.enabled=e.visible,t.align=e.align,t.verticalAlign=e.verticalAlign,t.layout=e.layout}}HichartWrapper.hichart_options={plotOptions:{series:{animation:!1,enableMouseTracking:!1}}};class HichartItemElement extends ReportItemElement{constructor(e,t){super(e,t,"hichartItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-hichart rr-item-element"}get debugLabel(){return"Hichart"}_initDom(e,t){super._initDom(e,t);const r=this._chartDiv=e.createElement("div");r.className="rr-hichart-wrapper",t.appendChild(r)}_doMeasure(e,t,r,i){const s=this.model,A=t.style;return e.printing||(t.style.border="1px solid rgba(55, 55, 55, 0.1)"),this.$_prepareWrapper(s,this._chartDiv),this._setModelSize(s,t,r,i),A.overflow="hidden",new Size(t.offsetWidth,t.offsetHeight)}_doLayoutContent(e){this._wrapper&&(this._chartDiv.style.width=this.width+"px",this._chartDiv.style.height=this.height+"px",this._isTesting()||this.$_layoutWrapper(e,this._wrapper))}isDom(e){return this.containsDom(e)||super.isDom(e)}$_createWrapper(e,t){return new HichartWrapper(e,t)}$_prepareWrapper(e,t){this._wrapper||(this._wrapper=this.$_createWrapper(t,e))}$_layoutWrapper(e,t){t.refreshChart(e,this.width,this.height)}}class TemplateItemElement extends ReportItemElement{constructor(e,t){super(e,t,"TemplateItemView")}_doDispose(){super._doDispose()}}class SummaryItemElement extends TextItemElementBase{constructor(e,t){super(e,t,"SummaryItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-summary rr-item-element"}get guardLabel(){return"summary"}get editable(){return!1}_getPrintText(e,t){this._error=null;try{const r=t.expression&&e.bandSummaryRuntime;let i=r?t.getSummary(r):this.getPrintValue(e,t);return this._getText(t,i)}catch(e){return this._error=e,console.error(e),"<<ERROR>>"}}_getDesignText(e,t){let r="";return e.expression?r="["+e.expression+"]":e.value&&(r=t?e.value:"["+e.value+"]"),r||"[summary]"}_doMeasure(e,t,r,i){const s=super._doMeasure(e,t,r,i);return t.dataset.error=this._error?"1":"0",this._error&&(t.title=this._error),s}}class BarItemElement extends ReportItemElement{constructor(e,t){super(e,t,"barItemView")}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-bar rr-item-element"}get debugLabel(){return""}_initDom(e,t){super._initDom(e,t),this._bar=e.createElement("span"),this._bar.className="rr-bar-bar",Utils.extend(this._bar.style,{position:"absolute",textAlign:"center",color:"gray"}),t.appendChild(this._bar)}_doMeasure(e,t,r,i){const s=this.model,A=100*((e.printing?this.getPrintValue(e,s,s.position):s.position)-s.minimum)/(s.maximum-s.minimum);return A<=0&&!e.printing?(Utils.extend(this._bar.style,{width:"100%",height:"",top:"50%",transform:"translateY(-50%)"}),this._bar.textContent="[ BAR ]",this._bar.dataset.design=""):(Utils.extend(this._bar.style,{width:A+"%",height:"100%",top:"",transform:""}),this._bar.textContent="",delete this._bar.dataset.design),e.printing&&(this._bar.dataset._m_=t.dataset._m_),Size.create(t.offsetWidth,t.offsetHeight)}_setStyles(e,t,r){super._setStyles(e,t,r),"barColor"in t&&(this._bar.style.backgroundColor=t.barColor)}isDom(e){return e===this._bar||super.isDom(e)}}class RatingItemElement extends ShapeItemBaseElement{constructor(e,t){super(e,t,"ratingItemView"),this.$_render=(e,t,r,i)=>{const s=this.model,A=this._getShape(e,s);if(A){const n="star"!==A?1:0,o=this._getDrawing(A,RatingItemElement.SVG_CLASS);if(o){const A=s.shapeCount,a=Math.min(r/A,i),l=e.printing?this.getPrintValue(e,s):s.designValue,h=Utils.toNumber(s.minimum,0),c=Utils.toNumber(s.maximum,A),u=Math.min(A,Math.round((l-h)*A/(c-h))),d=0,p=(r-a*A)/2,g=a-2*n,_=i-2*n;for(let e=0;e<u;e++){const r=p+e*a+n,i=d+n;o.drawAt(r,i,t,g,_)}for(let e=u;e<A;e++){const r=p+e*a+n,i=d+n,s=o.drawAt(r,i,t,g,_,0,RatingItemElement.BACK_CLASS);this._backFill&&SvgElement.setStyle(s,"fill",this._backFill),this._backStroke&&SvgElement.setStyle(s,"stroke",this._backStroke)}}}}}_doDispose(){super._doDispose()}_getCssSelector(){return"rr-rating rr-item-element"}get debugLabel(){return""}_initDom(e,t){super._initDom(e,t);this._svg=SvgElement.createSVG(t,"rr-rating-shape",{position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%"})}_doMeasure(e,t,r,i){this._setModelSize(this.model,t,r,i),SvgElement.renderSVG(e,this._svg,this.$_render);const s=t.offsetWidth,A=t.offsetHeight;return e.printing&&SvgElement.prepareExport(this._svg,s,A),Size.create(s,A)}_setStyles(e,t,r){super._setStyles(e,t,r),["fill","stroke"].forEach((e=>{e in t&&(this._svg.style[e]=t[e])})),this._backFill=t.backFill,this._backStroke=t.backStroke}}RatingItemElement.SVG_CLASS="rr-rating-shape-svg",RatingItemElement.BACK_CLASS="rr-rating-shape-back";class EmptyView extends LayerElement{constructor(e){super(e,"emptyView"),this._error=""}get error(){return this._error}set error(e){this._error=e}layoutContent(e){const t=this._errorView,r=e.loadError;if(this.error=r){t.style.visibility="",t.textContent=r;const e=Math.round((this.height-t.offsetHeight)/2);t.style.top=e+"px",t.style.width=this.width+"px"}else t.style.visibility="hidden"}_getCssSelector(){return"rr-empty"}_initDom(e,t){super._initDom(e,t);const r=e.createElement("span"),i=r.style;i.position="absolute",i.left="20px",i.top="20px",r.className="rr-empty-view rr-empty-message",r.textContent="Report model is not set.",t.appendChild(r);const s=e.createElement("span"),A=s.style;A.position="absolute",A.left="20px",A.bottom="10px",s.className="rr-empty-view rr-empty-bottom",s.textContent="RealReport v1.0",t.appendChild(s);const n=this._errorView=e.createElement("span");n.style.position="absolute",n.className="rr-empty-view rr-empty-error",t.appendChild(n)}}class ReportView extends LayerElement{constructor(e,t=!1,r=!1){super(e,"reportView"),this._loadError="",this._nameMap={},this._modelDirty=!1,this._editable=t,this.addChild(this._pageView=new PageView(e,r)),r||this.addChild(this._emptyView=this._createEmptyView(e))}_doDispose(){super._doDispose()}addImage(e){this._images[e]=1}imageLoaded(e){delete this._images[e]}imagesAllLoaded(){return Utils.isEmpty(this._images)}get editable(){return this._editable}get model(){return this._model}set model(e){e!==this._model&&(this._model&&this._model.removeListener(this),this._model=e,this._pageView.$_setModel(e&&e.page),this._nameMap={},this._model&&this._model.addListener(this),this._modelDirty=!0,this.invalidateLayout())}get pageView(){return this._pageView}get loadError(){return this._loadError}set loadError(e){this._loadError=e}get zoom(){return 100}getBoxPaddings(e){const t=this._boxMeasurer.style,r=e.styles;if(t.padding="0",t.paddingLeft="0",t.paddingTop="0",r)for(let e in r)"p"==e.charAt(0)&&"a"==e.charAt(1)&&(t[e]=r[e]);t.margin="0",t.border="none";const i=this._boxMeasurer.offsetWidth,s=this._boxMeasurer.offsetHeight,A=this._boxInner.offsetLeft-this._boxMeasurer.offsetLeft,n=this._boxInner.offsetTop-this._boxMeasurer.offsetTop;return{left:A,top:n,right:i-A-1,bottom:s-n-1}}findElement(e){let t=this._nameMap[e];return t||(t=this._pageView.findElement(e),t&&(this._nameMap[e]=t),t)}findElementOf(e){return this._pageView.findElementOf(e)}getElementOf(e){return this._pageView.getElementOf(e)}getItemBoundingRect(e){const t=Utils.getBoundingClientRect2(e._dom),r=Utils.getBoundingClientRect2(this._pageView._dom),i=e.offsetSize,s=100/this.zoom;return new Rectangle(t.left*s-r.left*s-2,t.top*s-r.top*s-2,i.width,i.height)}_getCssSelector(){return"rr-report-view"}_initDom(e,t){super._initDom(e,t),this._boxMeasurer=e.createElement("div"),this._boxMeasurer.className="box-measurer";let r=this._boxMeasurer.style;r.display="inline-block",r.position="abolute",r.left="0",r.top="0",r.visibility="hidden",r.pointerEvents="none",this._boxInner=e.createElement("div"),this._boxInner.className="box-measurer-inner",r=this._boxInner.style,r.width="1px",r.height="1px",this._boxMeasurer.appendChild(this._boxInner),t.appendChild(this._boxMeasurer)}_createEmptyView(e){return new EmptyView(e)}_layoutPageBorders(e,t){}$_layout(e,t){let r=t.clone();const i=this._model&&this._model.paper;if(!i)return Size.create(r.x,r.y);e.reportView=this,this._pageView.visible=!!this._model,this._emptyView.visible=!this._pageView.visible;try{if(this._pageView.visible){this._nameMap={},this._model.prepareLayout(),r=i.getContentRect(r.move(0,0));const s=this._pageView.measure(e,r.clone());this._pageView.layout(e,r.clone()),this._pageView.setRect(r),this._layoutPageBorders(t,r);const A=Size.create(t.width,t.height);return s.height>r.height&&(A.height+=s.height-r.height),s.width>r.width&&(A.width+=s.width-r.width),A}return this._emptyView.setRect(r),this._emptyView.layoutContent&&this._emptyView.layoutContent(this),Size.create(r.x,r.y)}finally{this._modelDirty=!1,this._afterLayout(e)}}_afterLayout(e){}$_afterRender(e){e&&e.reportView&&this._pageView.visible&&(this._pageView.layoutFloating(e),this._pageView.afterRender(e))}$_createElement(e){return ReportView.ViewCreators[e.constructor.$_ctor](this.doc,e)}$_preparePrint(e){const t=this._model&&this._model.paper;this._nameMap={},this._model.preparePrint(e),this._model.prepareLayout();const r=t.getClientRect();this._pageView.setRect(r),this.setPrintStyles(),this._images={}}$_endPrint(e){Utils.detach(this._boxMeasurer)}_modelChanged(){this._modelDirty=!0}onReportReset(e){this._modelChanged(),this.invalidateLayout()}onReportPaperChanged(e){this._modelChanged(),this.invalidateLayout()}onReportItemAdded(e,t,r,i){this._modelChanged(),this.invalidateLayout()}onReportItemRemoved(e,t,r){this._modelChanged(),this.invalidateLayout()}onReportItemsRemoved(e,t){this._modelChanged(),this.invalidateLayout()}onReportItemChanged(e,t,r,i,s){this._modelChanged(),this.invalidateLayout()}onReportCommandStackChanged(e,t){}}ReportView.PAGE_HEAD="rr-page-head",ReportView.BACK_HEAD="rr-back-head",ReportView.FRONT_HEAD="rr-front-head",ReportView.ViewCreators={TextItem:(e,t)=>new TextItemElement(e,t),SummaryItem:(e,t)=>new SummaryItemElement(e,t),ImageItem:(e,t)=>new ImageItemElement(e,t),CheckItem:(e,t)=>new CheckItemElement(e,t),SimpleBand:(e,t)=>new SimpleBandElement(e,t),SimpleBandRowGroupHeader:(e,t)=>new SimpleBandGroupHeaderElement(e,t),SimpleBandRowGroupFooter:(e,t)=>new SimpleBandGroupFooterElement(e,t),TableBand:(e,t)=>new TableBandElement(e,t),TableBandRowGroupHeader:(e,t)=>new TableBandGroupHeaderElement(e,t),TableBandRowGroupFooter:(e,t)=>new TableBandGroupFooterElement(e,t),RowBoxContainer:(e,t)=>new RowBoxContainerElement(e,t),ColumnBoxContainer:(e,t)=>new ColumnBoxContainerElement(e,t),DiagonalBoxContainer:(e,t)=>new DiagonalBoxContainerElement(e,t),ListContainer:(e,t)=>new ListContainerElement(e,t),TableContainer:(e,t)=>new TableContainerElement(e,t),SpaceItem:(e,t)=>new SpaceItemElement(e,t),FloatingContainer:(e,t)=>new FloatingContainerElement(e,t),StackContainer:(e,t)=>new StackContainerElementImpl(e,t),ShapeItem:(e,t)=>new ShapeItemElement(e,t),BarItem:(e,t)=>new BarItemElement(e,t),RatingItem:(e,t)=>new RatingItemElement(e,t),BarcodeItem:(e,t)=>new BarcodeItemElement(e,t),QrcodeItem:(e,t)=>new QrcodeItemElement(e,t),SvgItem:(e,t)=>new SvgItemElement(e,t),TemplateItem:(e,t)=>new TemplateItemElement(e,t),ChartItem:(e,t)=>new ChartItemElement(e,t),HichartItem:(e,t)=>new HichartItemElement(e,t)};class ErrorView extends VisualElement{_initDom(e,t){super._initDom(e,t),t.className="rr-print-error",Utils.extend(t.style,{display:"flex",alignItems:"center",width:"90%",height:"90%",background:"rgb(238, 238, 238, 0.95)",border:"2px dashed red",paddingTop:"8px",paddingLeft:"12px",zIndex:10}),t.appendChild(this._title=e.createElement("div")),Utils.extend(this._title.style,{color:"#333",fontWeight:"bold",fontSize:"1.3em",marginBottom:"8px",textDecoration:"underline"}),this._title.innerHTML="Print Error",t.appendChild(this._span=e.createElement("div")),Utils.extend(this._span.style,{color:"#333"}),this.visible=!1}setError(e){this._span.innerHTML=e}}class PrintContainer extends VisualContainer{constructor(e){super(e),this._pageGap=20,this._zoom=1,this._align=Align.CENTER,this._styles={},this.traceMode=!1,this._preview=!1,this._errorView=new ErrorView(this.doc),this._containerDiv.appendChild(this._errorView.dom)}_doDispose(){super._doDispose()}get pageCount(){return this._pages.length}get page(){const e=this._pages,t=this.scrollTop;for(let r=0;r<e.length;r++){const i=e[r].page.offsetTop,s=i+e[r].page.offsetHeight;if(i>=t&&i<t+this.scrollHeight||s>=t&&s<t+this.scrollHeight)return r}return e.length}set page(e){e=Math.max(0,Math.min(this._pages.length-1,e));this._pages[e].page.scrollIntoView({behavior:"smooth"})}get zoom(){return this._zoom}set zoom(e){var t;(e=Math.max(.1,Utils.toNumber(e)))!==this._zoom&&(this._zoom=e,this.$_resetPreviewer(),null===(t=this.onZoomed)||void 0===t||t.call(this,this._zoom))}get pages(){var e;return null===(e=this._pages)||void 0===e?void 0:e.slice(0)}print(e,t,r,i=""){Utils.isArray(e)?this.printAll(e,t,r,i):this.printSingle(e,t,r,i)}printSingle(e,t,r,i=""){if(e instanceof Report){try{this._previewId=i,(this._preview=r)&&(this._indicator=this.$_createIndicator(this.doc),this._containerDiv.appendChild(this._indicator)),this._reportView&&this.removeElement(this._reportView),this.addElement(this._reportView=new ReportView(this.doc,!1,!0));const s=this._context=new PrintContext(!0),A=this._reportView,n=e.info.paper.getClientRect();A.model=e,s.dp=t,s.designDp=e.designData,s.assets=e.assets,s.reportView=A,s.pageWidth=n.width,s.pageHeight=n.height,s.preparePrint()}catch(e){const t=this.$_getPreviewer(i);return t&&(t.style.display="none"),Utils.remove(this._indicator),void this.$_showError(null,e)}r?this._isTesting?(this.$_print(this.doc,this._context,!0,i),Utils.remove(this._indicator)):setTimeout((()=>{this.$_print(this.doc,this._context,!0,i),Utils.remove(this._indicator)}),0):(this.$_print(this.doc,this._context,!1,i),Utils.remove(this._indicator))}}printAll(e,t,r,i=""){if(!e||0===e.length)return;const s=e.length;if(1!==s){try{this._previewId=i,(this._preview=r)&&(this._indicator=this.$_createIndicator(this.doc),this._containerDiv.appendChild(this._indicator)),this._reportViews&&this._reportViews.forEach((e=>this.removeElement(e))),this._reportViews=[],this._contexts=[];for(let e=0;e<s;e++){const e=new PrintContext(!0),t=new ReportView(this.doc,!1,!0);this._contexts.push(e),this.addElement(t),this._reportViews.push(t),e.reportView=t}e.forEach(((e,r)=>{const i=this._contexts[r],s=this._reportViews[r],A=e.info.paper.getClientRect();s.model=e,i.dp=t,i.designDp=e.designData,i.assets=e.assets,i.pageWidth=A.width,i.pageHeight=A.height,i.preparePrint()}))}catch(e){const t=this.$_getPreviewer(i);return t&&(t.style.display="none"),Utils.remove(this._indicator),void this.$_showError(null,e)}r?this._isTesting?(this.$_print2(this.doc,this._contexts,!0,i),Utils.remove(this._indicator)):setTimeout((()=>{this.$_print2(this.doc,this._contexts,!0,i),Utils.remove(this._indicator)}),0):(this.$_print2(this.doc,this._contexts,!1,i),Utils.remove(this._indicator))}else this.printSingle(e[0],t,r,i)}isAllRendered(){return!!this.$_getContainer().getElementsByClassName(PrintContainer.CONFIRM_CLASS)}getPrintHtml(){const e=this.$_getPreviewer(this._previewId),t=e?parseFloat(e.style.left):0,r=this.zoom;try{return this.zoom=1,e&&(e.style.left="0px"),this.$_getContainer().innerHTML}finally{this.zoom=r,e&&(e.style.left=t+"px")}}setStyles(e){this._styles=e,this.$_resetPreviewer()}fitToWidth(){const e=this.$_getContainer().offsetWidth,t=this.$_getPreviewer(this._previewId).offsetWidth;this.zoom=e/t}fitToHeight(){const e=this._pages.length,t=this.$_getContainer().offsetHeight,r=(this.$_getPreviewer(this._previewId).offsetHeight-this._pageGap*(e-1))/e;this.zoom=t/r}fitToPage(){const e=this._pages.length,t=this.$_getContainer().offsetWidth,r=this.$_getPreviewer(this._previewId).offsetWidth,i=this.$_getContainer().offsetHeight,s=(this.$_getPreviewer(this._previewId).offsetHeight-this._pageGap*(e-1))/e;this.zoom=Math.min(t/r,i/s)}get printing(){return!0}_doPrepareContainer(e){super._doPrepareContainer(e),e.classList.add("rr-report-root"),e.classList.add(PrintContainer.CLASS_NAME)}_render(e){}_doResized(){if(this._preview){const e=this.$_getPreviewer(this._previewId);e&&e.parentElement&&this.$_resetPreviewer()}}$_showError(e,t){if(this._errorView.visible=!0,this._errorView.setError('<span class="rr-print-error-title">'+(t.message||t)+"</span><br/><br/>"+Utils.getErrorStack(t)),Utils.detach(e),this.traceMode)throw t}$_createIndicator(e){const t=this._containerDiv.getBoundingClientRect(),r=this.doc.createElement("div");return r.className="rr-print-indicator",Utils.extend(r.style,{position:"absolute",width:t.width+"px",height:t.height+"px",top:"0px",zIndex:1e3}),r}$_print(e,t,r,i){const s=+new Date,A=e.getElementById(PrintContainer.PREVIEW_CLASS+i);A&&(Utils.detach(A),this._containerDiv.appendChild(this._containerDom)),this._errorView.visible=!1;const n=t.reportView,o=n.pageView;let a;t.designDp&&t.designDp.preparePrint(t),t.dp&&t.dp.preparePrint(t),n.$_preparePrint(t);try{a=o.print(e,t,0)}catch(e){return console.error(e),void this.$_showError(A,e)}finally{n.$_endPrint(t)}Utils.detach(this._containerDom);const l=e.createElement("div");r&&(l.id=PrintContainer.PREVIEW_CLASS+i),l.className="rr-report-root"+(r?" "+PrintContainer.PREVIEW_CLASS:""),l.style.setProperty("position","absolute","important"),l.style.setProperty("transform-origin","top left","important"),this._containerDiv.appendChild(l),t.container=l,this.$_buildOutput(e,r,n.model,0,a,l),this.$_markRendered(e,l),this._pages=a,this.$_resetPreviewer(),console.log("Printed in "+(+new Date-s)+"ms.")}$_print2(e,t,r,i){const s=+new Date,A=e.getElementById(PrintContainer.PREVIEW_CLASS+i);A&&(Utils.detach(A),this._containerDiv.appendChild(this._containerDom));const n=[];this._errorView.visible=!1;for(let r=0;r<t.length;r++){const i=t[r],s=i.reportView,o=s.pageView;i.designDp&&i.designDp.preparePrint(i),i.dp&&i.dp.preparePrint(i),s.$_preparePrint(i);try{const t=o.print(e,i,0);n.push(t)}catch(e){return console.error(e),void this.$_showError(A,e)}finally{s.$_endPrint(i)}}Utils.detach(this._containerDom);const o=e.createElement("div");r&&(o.id=PrintContainer.PREVIEW_CLASS+i),o.className="rr-report-root"+(r?" "+PrintContainer.PREVIEW_CLASS:""),o.style.setProperty("position","absolute","important"),o.style.setProperty("transform-origin","top left","important"),this._containerDiv.appendChild(o);let a=0;t.forEach(((t,i)=>{const s=n[i];t.container=o,this.$_buildOutput(e,r,t.report,a,s,o),a+=s.length})),this.$_markRendered(e,o),this._pages=n.reduce(((e,t)=>e.concat(t)),[]),this.$_resetPreviewer(),console.log("Printed in "+(+new Date-s)+"ms.")}$_getContainer(){return this._containerDiv}$_getPreviewer(e){return this.doc.getElementById(PrintContainer.PREVIEW_CLASS+(e||this._previewId))}$_resetPreviewer(){if(this._preview){const e=this.$_getPreviewer(this._previewId),t=this.$_getContainer().getBoundingClientRect(),r=this._zoom;Utils.extend(e.style,this._styles),e.style.transform=1==r?"":"scale("+r+")";const i=e.getBoundingClientRect().width||t.width;let s=0;switch(this._align){case Align.LEFT:break;case Align.RIGHT:s=t.width-i;break;case Align.CENTER:default:s=Math.round((t.width-i)/2)}e.style.left=Math.max(0,s)+"px"}}$_buildOutput(e,t,r,i,s,A){const n=r.page.pageHeader,o=r.page.pageFooter,a=r.page.reportFooter,l=r.info.paper,h=l.getClientRect().height,c=[],u=[];for(let r=0,i=s.length;r<i;r++){const d=r,p=s[r],g=p.contents,_=e.createElement("div"),m=e.createElement("div");_.className="rr-print-div2",m.className="rr-print-div3",t&&(_.className="rr-print-page rr-page-break page"+d,_.dataset.page=d+"",l.applyPreviewExtents(_.style),l.applyPreviewClient(m.style)),m.style.position="absolute",_.appendChild(m),u.push(m),p.page=_;let f=p.background;f&&m.appendChild(f),f=p.pageHeader;let w=0+Utils.toNumber(n.spaceTop);f.style.top=w+"px",m.appendChild(f),w+=f.$_h,f=p.pageFooter;const C=h-f.$_h-Utils.toNumber(o.spaceBottom);f.style.top=C+"px",m.appendChild(f);const B=[];for(let e=0,t=g.length;e<t;e++)if(f=g[e],f.$_anc)c.push(f),B.push(e);else{const s=f.$_h;r===i-1&&e===t-1&&s>0&&a.alignToBottom&&ReportFooterElement.isFooter(f)&&(w=C-s),f.style.top=w+"px",w+=isNaN(s)?f.offsetHeight:s,m.appendChild(f)}for(let e=B.length-1;e>=0;e--)g.splice(B[e],1);if(A.appendChild(_),f=p.foreground,f&&m.appendChild(f),t){const t=e.createElement("div");t.className="rr-print-space",t.style.height=this._pageGap+"px",A.appendChild(t)}}if(c.length>0){const e=[];for(let t of c){const r=t.$_anc;for(let i=0;i<u.length;i++){const A=u[i];if(A.contains(r)){e.push(A),s[i].contents.push(t);break}}}this.$_layoutFloatings(e,c)}}$_markRendered(e,t){const r=e.createElement("div");r.className=PrintContainer.CONFIRM_CLASS,Utils.extend(r.style,{position:"abolute",top:t.offsetHeight-1+"px",left:"0px",width:"1px",height:"1px",background:"#ffffff01"}),t.appendChild(r)}$_layoutFloatings(e,t){t.forEach(((t,r)=>{const i=t.$_anc,s=t.$anp;let A=i.offsetLeft,n=i.offsetTop,o=i.offsetParent;const a=e[r];for(;o instanceof HTMLElement&&o!==a;)A+=o.offsetLeft,n+=o.offsetTop,o=o.offsetParent;switch(a.appendChild(t),s){case AnchorPosition.INNER_LEFT:n-=(t.offsetHeight-i.offsetHeight)/2;break;case AnchorPosition.LEFT:A-=t.offsetWidth,n-=(t.offsetHeight-i.offsetHeight)/2;break;case AnchorPosition.INNER_RIGHT:A+=i.offsetWidth-t.offsetWidth,n-=(t.offsetHeight-i.offsetHeight)/2;break;case AnchorPosition.RIGHT:A+=i.offsetWidth,n-=(t.offsetHeight-i.offsetHeight)/2;break;case AnchorPosition.INNER_TOP:A-=(t.offsetWidth-i.offsetWidth)/2;break;case AnchorPosition.TOP:A-=(t.offsetWidth-i.offsetWidth)/2,n-=t.offsetHeight;break;case AnchorPosition.INNER_BOTTOM:A-=(t.offsetWidth-i.offsetWidth)/2,n+=i.offsetHeight-t.offsetHeight;break;case AnchorPosition.BOTTOM:A-=(t.offsetWidth-i.offsetWidth)/2,n+=i.offsetHeight;break;case AnchorPosition.CENTER:default:A-=(t.offsetWidth-i.offsetWidth)/2,n-=(t.offsetHeight-i.offsetHeight)/2}t.style.left=A+"px",t.style.top=n+"px"}))}}PrintContainer.CLASS_NAME="rr-report-container",PrintContainer.PREVIEW_CLASS="rr-report-preview",PrintContainer.CONFIRM_CLASS="$_rr_rendered_";class ReportDataProvider extends Base{constructor(){super(),this._dataMap={}}_doDispose(){this._dataMap=null,this._contextData=null,super._doDispose()}preparePrint(e){this._contextData=new ContextData(e);for(let t in this._dataMap){const r=this._dataMap[t];r instanceof ReportData&&r.preparePrint(e,!1)}}getAll(){const e=[];for(let t in this._dataMap)e.push(this._dataMap[t]);return e}get(e){return this._dataMap[e]}getContextValue(e){return this._contextData.getValue(e)}getValue(e,t){if(e){const r=e.indexOf("::"),i=r>=0?e.substring(0,r):e,s=this._dataMap[i];if(s){if(e=r>=0?e.substr(r+2):null,!(s instanceof BandData))return s.getValue(e);if(t>=0)return s.getRowValue(t,e)}}}getValueAt(e,t,r){const i=this._dataMap[e];if(i)return i instanceof BandData?i.getRowValue(r,t):i.getValue(t)}getFieldValues(e,t){const r=this._dataMap[e];if(r)return r instanceof BandData?r.getFieldValues(t):[r.getValue(t)]}clear(){return this._dataMap={},this._contextData=null,this}register(e,t){if(t&&(e=e||t.name)){if(this._dataMap[e])throw new Error("Data is already exists: "+e);this._dataMap[e]=t}return this}load(e){if(e){for(let t in e){const r=e[t];if(r&&r.hasOwnProperty("values")){const e=r.values;let i=r.type;switch(i||(Utils.isArray(e)?e.length>0&&(i=Utils.isObject(e[0])?"band":"array"):Utils.isObject(e)&&(i="simple")),i){case"array":this.register(t,new SimpleArrayData(t,null,e));break;case"band":this.register(t,new BandArrayData(t,null,e));break;default:this.register(t,new SimpleData(t,e))}}}return this}}}var extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)};function __awaiter(e,t,r,i){return new(r||(r=Promise))((function(s,A){function n(e){try{a(i.next(e))}catch(e){A(e)}}function o(e){try{a(i.throw(e))}catch(e){A(e)}}function a(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(n,o)}a((i=i.apply(e,t||[])).next())}))}function __generator(e,t){var r,i,s,A,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return A={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(A[Symbol.iterator]=function(){return this}),A;function o(A){return function(o){return function(A){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=2&A[0]?i.return:A[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,A[1])).done)return s;switch(i=0,s&&(A=[2&A[0],s.value]),A[0]){case 0:case 1:s=A;break;case 4:return n.label++,{value:A[1],done:!1};case 5:n.label++,i=A[1],A=[0];continue;case 7:A=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==A[0]&&2!==A[0])){n=0;continue}if(3===A[0]&&(!s||A[1]>s[0]&&A[1]<s[3])){n.label=A[1];break}if(6===A[0]&&n.label<s[1]){n.label=s[1],s=A;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(A);break}s[2]&&n.ops.pop(),n.trys.pop();continue}A=t.call(e,n)}catch(e){A=[6,e],i=0}finally{r=s=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([A,o])}}}function __spreadArray(e,t,r){if(r||2===arguments.length)for(var i,s=0,A=t.length;s<A;s++)!i&&s in t||(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||t)}for(var Bounds=function(){function e(e,t,r,i){this.left=e,this.top=t,this.width=r,this.height=i}return e.prototype.add=function(t,r,i,s){return new e(this.left+t,this.top+r,this.width+i,this.height+s)},e.fromClientRect=function(t,r){return new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height)},e.fromDOMRectList=function(t,r){var i=r[0];return i?new e(i.x+t.windowBounds.left,i.y+t.windowBounds.top,i.width,i.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),parseBounds=function(e,t){return Bounds.fromClientRect(e,t.getBoundingClientRect())},parseDocumentSize=function(e){var t=e.body,r=e.documentElement;if(!t||!r)throw new Error("Unable to get document size");var i=Math.max(Math.max(t.scrollWidth,r.scrollWidth),Math.max(t.offsetWidth,r.offsetWidth),Math.max(t.clientWidth,r.clientWidth)),s=Math.max(Math.max(t.scrollHeight,r.scrollHeight),Math.max(t.offsetHeight,r.offsetHeight),Math.max(t.clientHeight,r.clientHeight));return new Bounds(0,0,i,s)},toCodePoints$1=function(e){for(var t=[],r=0,i=e.length;r<i;){var s=e.charCodeAt(r++);if(s>=55296&&s<=56319&&r<i){var A=e.charCodeAt(r++);56320==(64512&A)?t.push(((1023&s)<<10)+(1023&A)+65536):(t.push(s),r--)}else t.push(s)}return t},fromCodePoint$1=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var i=[],s=-1,A="";++s<r;){var n=e[s];n<=65535?i.push(n):(n-=65536,i.push(55296+(n>>10),n%1024+56320)),(s+1===r||i.length>16384)&&(A+=String.fromCharCode.apply(String,i),i.length=0)}return A},chars$2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$2="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i$2=0;i$2<chars$2.length;i$2++)lookup$2[chars$2.charCodeAt(i$2)]=i$2;var decode$1=function(e){var t,r,i,s,A,n=.75*e.length,o=e.length,a=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),h=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<o;t+=4)r=lookup$2[e.charCodeAt(t)],i=lookup$2[e.charCodeAt(t+1)],s=lookup$2[e.charCodeAt(t+2)],A=lookup$2[e.charCodeAt(t+3)],h[a++]=r<<2|i>>4,h[a++]=(15&i)<<4|s>>2,h[a++]=(3&s)<<6|63&A;return l},polyUint16Array$1=function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r.push(e[i+1]<<8|e[i]);return r},polyUint32Array$1=function(e){for(var t=e.length,r=[],i=0;i<t;i+=4)r.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return r},UTRIE2_SHIFT_2$1=5,UTRIE2_SHIFT_1$1=11,UTRIE2_INDEX_SHIFT$1=2,UTRIE2_SHIFT_1_2$1=UTRIE2_SHIFT_1$1-UTRIE2_SHIFT_2$1,UTRIE2_LSCP_INDEX_2_OFFSET$1=65536>>UTRIE2_SHIFT_2$1,UTRIE2_DATA_BLOCK_LENGTH$1=1<<UTRIE2_SHIFT_2$1,UTRIE2_DATA_MASK$1=UTRIE2_DATA_BLOCK_LENGTH$1-1,UTRIE2_LSCP_INDEX_2_LENGTH$1=1024>>UTRIE2_SHIFT_2$1,UTRIE2_INDEX_2_BMP_LENGTH$1=UTRIE2_LSCP_INDEX_2_OFFSET$1+UTRIE2_LSCP_INDEX_2_LENGTH$1,UTRIE2_UTF8_2B_INDEX_2_OFFSET$1=UTRIE2_INDEX_2_BMP_LENGTH$1,UTRIE2_UTF8_2B_INDEX_2_LENGTH$1=32,UTRIE2_INDEX_1_OFFSET$1=UTRIE2_UTF8_2B_INDEX_2_OFFSET$1+UTRIE2_UTF8_2B_INDEX_2_LENGTH$1,UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1=65536>>UTRIE2_SHIFT_1$1,UTRIE2_INDEX_2_BLOCK_LENGTH$1=1<<UTRIE2_SHIFT_1_2$1,UTRIE2_INDEX_2_MASK$1=UTRIE2_INDEX_2_BLOCK_LENGTH$1-1,slice16$1=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},slice32$1=function(e,t,r){return e.slice?e.slice(t,r):new Uint32Array(Array.prototype.slice.call(e,t,r))},createTrieFromBase64$1=function(e){var t=decode$1(e),r=Array.isArray(t)?polyUint32Array$1(t):new Uint32Array(t),i=Array.isArray(t)?polyUint16Array$1(t):new Uint16Array(t),s=slice16$1(i,12,r[4]/2),A=2===r[5]?slice16$1(i,(24+r[4])/2):slice32$1(r,Math.ceil((24+r[4])/4));return new Trie$1(r[0],r[1],r[2],r[3],s,A)},Trie$1=function(){function e(e,t,r,i,s,A){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>UTRIE2_SHIFT_2$1])<<UTRIE2_INDEX_SHIFT$1)+(e&UTRIE2_DATA_MASK$1),this.data[t];if(e<=65535)return t=((t=this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1+(e-55296>>UTRIE2_SHIFT_2$1)])<<UTRIE2_INDEX_SHIFT$1)+(e&UTRIE2_DATA_MASK$1),this.data[t];if(e<this.highStart)return t=UTRIE2_INDEX_1_OFFSET$1-UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1+(e>>UTRIE2_SHIFT_1$1),t=this.index[t],t+=e>>UTRIE2_SHIFT_2$1&UTRIE2_INDEX_2_MASK$1,t=((t=this.index[t])<<UTRIE2_INDEX_SHIFT$1)+(e&UTRIE2_DATA_MASK$1),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),base64$1="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",LETTER_NUMBER_MODIFIER=50,BK=1,CR$1=2,LF$1=3,CM=4,NL=5,WJ=7,ZW=8,GL=9,SP=10,ZWJ$1=11,B2=12,BA=13,BB=14,HY=15,CB=16,CL=17,CP=18,EX=19,IN=20,NS=21,OP=22,QU=23,IS=24,NU=25,PO=26,PR=27,SY=28,AI=29,AL=30,CJ=31,EB=32,EM=33,H2=34,H3=35,HL=36,ID=37,JL=38,JV=39,JT=40,RI$1=41,SA=42,XX=43,ea_OP=[9001,65288],BREAK_MANDATORY="!",BREAK_NOT_ALLOWED$1="×",BREAK_ALLOWED$1="÷",UnicodeTrie$1=createTrieFromBase64$1(base64$1),ALPHABETICS=[AL,HL],HARD_LINE_BREAKS=[BK,CR$1,LF$1,NL],SPACE$1=[SP,ZW],PREFIX_POSTFIX=[PR,PO],LINE_BREAKS=HARD_LINE_BREAKS.concat(SPACE$1),KOREAN_SYLLABLE_BLOCK=[JL,JV,JT,H2,H3],HYPHEN=[HY,BA],codePointsToCharacterClasses=function(e,t){void 0===t&&(t="strict");var r=[],i=[],s=[];return e.forEach((function(e,A){var n=UnicodeTrie$1.get(e);if(n>LETTER_NUMBER_MODIFIER?(s.push(!0),n-=LETTER_NUMBER_MODIFIER):s.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(A),r.push(CB);if(n===CM||n===ZWJ$1){if(0===A)return i.push(A),r.push(AL);var o=r[A-1];return-1===LINE_BREAKS.indexOf(o)?(i.push(i[A-1]),r.push(o)):(i.push(A),r.push(AL))}return i.push(A),n===CJ?r.push("strict"===t?NS:ID):n===SA||n===AI?r.push(AL):n===XX?e>=131072&&e<=196605||e>=196608&&e<=262141?r.push(ID):r.push(AL):void r.push(n)})),[i,r,s]},isAdjacentWithSpaceIgnored=function(e,t,r,i){var s=i[r];if(Array.isArray(e)?-1!==e.indexOf(s):e===s)for(var A=r;A<=i.length;){if((a=i[++A])===t)return!0;if(a!==SP)break}if(s===SP)for(A=r;A>0;){var n=i[--A];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var o=r;o<=i.length;){var a;if((a=i[++o])===t)return!0;if(a!==SP)break}if(n!==SP)break}return!1},previousNonSpaceClassType=function(e,t){for(var r=e;r>=0;){var i=t[r];if(i!==SP)return i;r--}return 0},_lineBreakAtIndex=function(e,t,r,i,s){if(0===r[i])return BREAK_NOT_ALLOWED$1;var A=i-1;if(Array.isArray(s)&&!0===s[A])return BREAK_NOT_ALLOWED$1;var n=A-1,o=A+1,a=t[A],l=n>=0?t[n]:0,h=t[o];if(a===CR$1&&h===LF$1)return BREAK_NOT_ALLOWED$1;if(-1!==HARD_LINE_BREAKS.indexOf(a))return BREAK_MANDATORY;if(-1!==HARD_LINE_BREAKS.indexOf(h))return BREAK_NOT_ALLOWED$1;if(-1!==SPACE$1.indexOf(h))return BREAK_NOT_ALLOWED$1;if(previousNonSpaceClassType(A,t)===ZW)return BREAK_ALLOWED$1;if(UnicodeTrie$1.get(e[A])===ZWJ$1)return BREAK_NOT_ALLOWED$1;if((a===EB||a===EM)&&UnicodeTrie$1.get(e[o])===ZWJ$1)return BREAK_NOT_ALLOWED$1;if(a===WJ||h===WJ)return BREAK_NOT_ALLOWED$1;if(a===GL)return BREAK_NOT_ALLOWED$1;if(-1===[SP,BA,HY].indexOf(a)&&h===GL)return BREAK_NOT_ALLOWED$1;if(-1!==[CL,CP,EX,IS,SY].indexOf(h))return BREAK_NOT_ALLOWED$1;if(previousNonSpaceClassType(A,t)===OP)return BREAK_NOT_ALLOWED$1;if(isAdjacentWithSpaceIgnored(QU,OP,A,t))return BREAK_NOT_ALLOWED$1;if(isAdjacentWithSpaceIgnored([CL,CP],NS,A,t))return BREAK_NOT_ALLOWED$1;if(isAdjacentWithSpaceIgnored(B2,B2,A,t))return BREAK_NOT_ALLOWED$1;if(a===SP)return BREAK_ALLOWED$1;if(a===QU||h===QU)return BREAK_NOT_ALLOWED$1;if(h===CB||a===CB)return BREAK_ALLOWED$1;if(-1!==[BA,HY,NS].indexOf(h)||a===BB)return BREAK_NOT_ALLOWED$1;if(l===HL&&-1!==HYPHEN.indexOf(a))return BREAK_NOT_ALLOWED$1;if(a===SY&&h===HL)return BREAK_NOT_ALLOWED$1;if(h===IN)return BREAK_NOT_ALLOWED$1;if(-1!==ALPHABETICS.indexOf(h)&&a===NU||-1!==ALPHABETICS.indexOf(a)&&h===NU)return BREAK_NOT_ALLOWED$1;if(a===PR&&-1!==[ID,EB,EM].indexOf(h)||-1!==[ID,EB,EM].indexOf(a)&&h===PO)return BREAK_NOT_ALLOWED$1;if(-1!==ALPHABETICS.indexOf(a)&&-1!==PREFIX_POSTFIX.indexOf(h)||-1!==PREFIX_POSTFIX.indexOf(a)&&-1!==ALPHABETICS.indexOf(h))return BREAK_NOT_ALLOWED$1;if(-1!==[PR,PO].indexOf(a)&&(h===NU||-1!==[OP,HY].indexOf(h)&&t[o+1]===NU)||-1!==[OP,HY].indexOf(a)&&h===NU||a===NU&&-1!==[NU,SY,IS].indexOf(h))return BREAK_NOT_ALLOWED$1;if(-1!==[NU,SY,IS,CL,CP].indexOf(h))for(var c=A;c>=0;){if((u=t[c])===NU)return BREAK_NOT_ALLOWED$1;if(-1===[SY,IS].indexOf(u))break;c--}if(-1!==[PR,PO].indexOf(h))for(c=-1!==[CL,CP].indexOf(a)?n:A;c>=0;){var u;if((u=t[c])===NU)return BREAK_NOT_ALLOWED$1;if(-1===[SY,IS].indexOf(u))break;c--}if(JL===a&&-1!==[JL,JV,H2,H3].indexOf(h)||-1!==[JV,H2].indexOf(a)&&-1!==[JV,JT].indexOf(h)||-1!==[JT,H3].indexOf(a)&&h===JT)return BREAK_NOT_ALLOWED$1;if(-1!==KOREAN_SYLLABLE_BLOCK.indexOf(a)&&-1!==[IN,PO].indexOf(h)||-1!==KOREAN_SYLLABLE_BLOCK.indexOf(h)&&a===PR)return BREAK_NOT_ALLOWED$1;if(-1!==ALPHABETICS.indexOf(a)&&-1!==ALPHABETICS.indexOf(h))return BREAK_NOT_ALLOWED$1;if(a===IS&&-1!==ALPHABETICS.indexOf(h))return BREAK_NOT_ALLOWED$1;if(-1!==ALPHABETICS.concat(NU).indexOf(a)&&h===OP&&-1===ea_OP.indexOf(e[o])||-1!==ALPHABETICS.concat(NU).indexOf(h)&&a===CP)return BREAK_NOT_ALLOWED$1;if(a===RI$1&&h===RI$1){for(var d=r[A],p=1;d>0&&t[--d]===RI$1;)p++;if(p%2!=0)return BREAK_NOT_ALLOWED$1}return a===EB&&h===EM?BREAK_NOT_ALLOWED$1:BREAK_ALLOWED$1},cssFormattedClasses=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var r=codePointsToCharacterClasses(e,t.lineBreak),i=r[0],s=r[1],A=r[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(s=s.map((function(e){return-1!==[NU,AL,SA].indexOf(e)?ID:e})));var n="keep-all"===t.wordBreak?A.map((function(t,r){return t&&e[r]>=19968&&e[r]<=40959})):void 0;return[i,s,n]},Break=function(){function e(e,t,r,i){this.codePoints=e,this.required=t===BREAK_MANDATORY,this.start=r,this.end=i}return e.prototype.slice=function(){return fromCodePoint$1.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),LineBreaker=function(e,t){var r=toCodePoints$1(e),i=cssFormattedClasses(r,t),s=i[0],A=i[1],n=i[2],o=r.length,a=0,l=0;return{next:function(){if(l>=o)return{done:!0,value:null};for(var e=BREAK_NOT_ALLOWED$1;l<o&&(e=_lineBreakAtIndex(r,A,s,++l,n))===BREAK_NOT_ALLOWED$1;);if(e!==BREAK_NOT_ALLOWED$1||l===o){var t=new Break(r,e,a,l);return a=l,{value:t,done:!1}}return{done:!0,value:null}}}},FLAG_UNRESTRICTED=1,FLAG_ID=2,FLAG_INTEGER=4,FLAG_NUMBER=8,LINE_FEED=10,SOLIDUS=47,REVERSE_SOLIDUS=92,CHARACTER_TABULATION=9,SPACE=32,QUOTATION_MARK=34,EQUALS_SIGN=61,NUMBER_SIGN=35,DOLLAR_SIGN=36,PERCENTAGE_SIGN=37,APOSTROPHE=39,LEFT_PARENTHESIS=40,RIGHT_PARENTHESIS=41,LOW_LINE=95,HYPHEN_MINUS=45,EXCLAMATION_MARK=33,LESS_THAN_SIGN=60,GREATER_THAN_SIGN=62,COMMERCIAL_AT=64,LEFT_SQUARE_BRACKET=91,RIGHT_SQUARE_BRACKET=93,CIRCUMFLEX_ACCENT=61,LEFT_CURLY_BRACKET=123,QUESTION_MARK=63,RIGHT_CURLY_BRACKET=125,VERTICAL_LINE=124,TILDE=126,CONTROL=128,REPLACEMENT_CHARACTER=65533,ASTERISK=42,PLUS_SIGN=43,COMMA=44,COLON=58,SEMICOLON=59,FULL_STOP=46,NULL=0,BACKSPACE=8,LINE_TABULATION=11,SHIFT_OUT=14,INFORMATION_SEPARATOR_ONE=31,DELETE=127,EOF$1=-1,ZERO=48,a=97,e=101,f=102,u=117,z=122,A=65,E=69,F=70,U=85,Z=90,isDigit=function(e){return e>=ZERO&&e<=57},isSurrogateCodePoint=function(e){return e>=55296&&e<=57343},isHex=function(e){return isDigit(e)||e>=A&&e<=F||e>=a&&e<=f},isLowerCaseLetter=function(e){return e>=a&&e<=z},isUpperCaseLetter=function(e){return e>=A&&e<=Z},isLetter=function(e){return isLowerCaseLetter(e)||isUpperCaseLetter(e)},isNonASCIICodePoint=function(e){return e>=CONTROL},isWhiteSpace=function(e){return e===LINE_FEED||e===CHARACTER_TABULATION||e===SPACE},isNameStartCodePoint=function(e){return isLetter(e)||isNonASCIICodePoint(e)||e===LOW_LINE},isNameCodePoint=function(e){return isNameStartCodePoint(e)||isDigit(e)||e===HYPHEN_MINUS},isNonPrintableCodePoint=function(e){return e>=NULL&&e<=BACKSPACE||e===LINE_TABULATION||e>=SHIFT_OUT&&e<=INFORMATION_SEPARATOR_ONE||e===DELETE},isValidEscape=function(e,t){return e===REVERSE_SOLIDUS&&t!==LINE_FEED},isIdentifierStart=function(e,t,r){return e===HYPHEN_MINUS?isNameStartCodePoint(t)||isValidEscape(t,r):!!isNameStartCodePoint(e)||!(e!==REVERSE_SOLIDUS||!isValidEscape(e,t))},isNumberStart=function(e,t,r){return e===PLUS_SIGN||e===HYPHEN_MINUS?!!isDigit(t)||t===FULL_STOP&&isDigit(r):isDigit(e===FULL_STOP?t:e)},stringToNumber=function(t){var r=0,i=1;t[r]!==PLUS_SIGN&&t[r]!==HYPHEN_MINUS||(t[r]===HYPHEN_MINUS&&(i=-1),r++);for(var s=[];isDigit(t[r]);)s.push(t[r++]);var A=s.length?parseInt(fromCodePoint$1.apply(void 0,s),10):0;t[r]===FULL_STOP&&r++;for(var n=[];isDigit(t[r]);)n.push(t[r++]);var o=n.length,a=o?parseInt(fromCodePoint$1.apply(void 0,n),10):0;t[r]!==E&&t[r]!==e||r++;var l=1;t[r]!==PLUS_SIGN&&t[r]!==HYPHEN_MINUS||(t[r]===HYPHEN_MINUS&&(l=-1),r++);for(var h=[];isDigit(t[r]);)h.push(t[r++]);var c=h.length?parseInt(fromCodePoint$1.apply(void 0,h),10):0;return i*(A+a*Math.pow(10,-o))*Math.pow(10,l*c)},LEFT_PARENTHESIS_TOKEN={type:2},RIGHT_PARENTHESIS_TOKEN={type:3},COMMA_TOKEN={type:4},SUFFIX_MATCH_TOKEN={type:13},PREFIX_MATCH_TOKEN={type:8},COLUMN_TOKEN={type:21},DASH_MATCH_TOKEN={type:9},INCLUDE_MATCH_TOKEN={type:10},LEFT_CURLY_BRACKET_TOKEN={type:11},RIGHT_CURLY_BRACKET_TOKEN={type:12},SUBSTRING_MATCH_TOKEN={type:14},BAD_URL_TOKEN={type:23},BAD_STRING_TOKEN={type:1},CDO_TOKEN={type:25},CDC_TOKEN={type:24},COLON_TOKEN={type:26},SEMICOLON_TOKEN={type:27},LEFT_SQUARE_BRACKET_TOKEN={type:28},RIGHT_SQUARE_BRACKET_TOKEN={type:29},WHITESPACE_TOKEN={type:31},EOF_TOKEN={type:32},Tokenizer=function(){function t(){this._value=[]}return t.prototype.write=function(e){this._value=this._value.concat(toCodePoints$1(e))},t.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==EOF_TOKEN;)e.push(t),t=this.consumeToken();return e},t.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case QUOTATION_MARK:return this.consumeStringToken(QUOTATION_MARK);case NUMBER_SIGN:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);if(isNameCodePoint(t)||isValidEscape(r,i)){var s=isIdentifierStart(t,r,i)?FLAG_ID:FLAG_UNRESTRICTED;return{type:5,value:this.consumeName(),flags:s}}break;case DOLLAR_SIGN:if(this.peekCodePoint(0)===EQUALS_SIGN)return this.consumeCodePoint(),SUFFIX_MATCH_TOKEN;break;case APOSTROPHE:return this.consumeStringToken(APOSTROPHE);case LEFT_PARENTHESIS:return LEFT_PARENTHESIS_TOKEN;case RIGHT_PARENTHESIS:return RIGHT_PARENTHESIS_TOKEN;case ASTERISK:if(this.peekCodePoint(0)===EQUALS_SIGN)return this.consumeCodePoint(),SUBSTRING_MATCH_TOKEN;break;case PLUS_SIGN:if(isNumberStart(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case COMMA:return COMMA_TOKEN;case HYPHEN_MINUS:var A=e,n=this.peekCodePoint(0),o=this.peekCodePoint(1);if(isNumberStart(A,n,o))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(isIdentifierStart(A,n,o))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===HYPHEN_MINUS&&o===GREATER_THAN_SIGN)return this.consumeCodePoint(),this.consumeCodePoint(),CDC_TOKEN;break;case FULL_STOP:if(isNumberStart(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case SOLIDUS:if(this.peekCodePoint(0)===ASTERISK)for(this.consumeCodePoint();;){var a=this.consumeCodePoint();if(a===ASTERISK&&(a=this.consumeCodePoint())===SOLIDUS)return this.consumeToken();if(a===EOF$1)return this.consumeToken()}break;case COLON:return COLON_TOKEN;case SEMICOLON:return SEMICOLON_TOKEN;case LESS_THAN_SIGN:if(this.peekCodePoint(0)===EXCLAMATION_MARK&&this.peekCodePoint(1)===HYPHEN_MINUS&&this.peekCodePoint(2)===HYPHEN_MINUS)return this.consumeCodePoint(),this.consumeCodePoint(),CDO_TOKEN;break;case COMMERCIAL_AT:var l=this.peekCodePoint(0),h=this.peekCodePoint(1),c=this.peekCodePoint(2);if(isIdentifierStart(l,h,c))return{type:7,value:this.consumeName()};break;case LEFT_SQUARE_BRACKET:return LEFT_SQUARE_BRACKET_TOKEN;case REVERSE_SOLIDUS:if(isValidEscape(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case RIGHT_SQUARE_BRACKET:return RIGHT_SQUARE_BRACKET_TOKEN;case CIRCUMFLEX_ACCENT:if(this.peekCodePoint(0)===EQUALS_SIGN)return this.consumeCodePoint(),PREFIX_MATCH_TOKEN;break;case LEFT_CURLY_BRACKET:return LEFT_CURLY_BRACKET_TOKEN;case RIGHT_CURLY_BRACKET:return RIGHT_CURLY_BRACKET_TOKEN;case u:case U:var d=this.peekCodePoint(0),p=this.peekCodePoint(1);return d!==PLUS_SIGN||!isHex(p)&&p!==QUESTION_MARK||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case VERTICAL_LINE:if(this.peekCodePoint(0)===EQUALS_SIGN)return this.consumeCodePoint(),DASH_MATCH_TOKEN;if(this.peekCodePoint(0)===VERTICAL_LINE)return this.consumeCodePoint(),COLUMN_TOKEN;break;case TILDE:if(this.peekCodePoint(0)===EQUALS_SIGN)return this.consumeCodePoint(),INCLUDE_MATCH_TOKEN;break;case EOF$1:return EOF_TOKEN}return isWhiteSpace(e)?(this.consumeWhiteSpace(),WHITESPACE_TOKEN):isDigit(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):isNameStartCodePoint(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:fromCodePoint$1(e)}},t.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},t.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},t.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},t.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();isHex(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var r=!1;t===QUESTION_MARK&&e.length<6;)e.push(t),t=this.consumeCodePoint(),r=!0;if(r)return{type:30,start:parseInt(fromCodePoint$1.apply(void 0,e.map((function(e){return e===QUESTION_MARK?ZERO:e}))),16),end:parseInt(fromCodePoint$1.apply(void 0,e.map((function(e){return e===QUESTION_MARK?F:e}))),16)};var i=parseInt(fromCodePoint$1.apply(void 0,e),16);if(this.peekCodePoint(0)===HYPHEN_MINUS&&isHex(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];isHex(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(fromCodePoint$1.apply(void 0,s),16)}}return{type:30,start:i,end:i}},t.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&this.peekCodePoint(0)===LEFT_PARENTHESIS?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===LEFT_PARENTHESIS?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},t.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===EOF$1)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===APOSTROPHE||t===QUOTATION_MARK){var r=this.consumeStringToken(this.consumeCodePoint());return 0===r.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===EOF$1||this.peekCodePoint(0)===RIGHT_PARENTHESIS)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),BAD_URL_TOKEN)}for(;;){var i=this.consumeCodePoint();if(i===EOF$1||i===RIGHT_PARENTHESIS)return{type:22,value:fromCodePoint$1.apply(void 0,e)};if(isWhiteSpace(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===EOF$1||this.peekCodePoint(0)===RIGHT_PARENTHESIS?(this.consumeCodePoint(),{type:22,value:fromCodePoint$1.apply(void 0,e)}):(this.consumeBadUrlRemnants(),BAD_URL_TOKEN);if(i===QUOTATION_MARK||i===APOSTROPHE||i===LEFT_PARENTHESIS||isNonPrintableCodePoint(i))return this.consumeBadUrlRemnants(),BAD_URL_TOKEN;if(i===REVERSE_SOLIDUS){if(!isValidEscape(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),BAD_URL_TOKEN;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},t.prototype.consumeWhiteSpace=function(){for(;isWhiteSpace(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===RIGHT_PARENTHESIS||e===EOF$1)return;isValidEscape(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var r=Math.min(6e4,e);t+=fromCodePoint$1.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),t},t.prototype.consumeStringToken=function(e){for(var t="",r=0;;){var i=this._value[r];if(i===EOF$1||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(r)};if(i===LINE_FEED)return this._value.splice(0,r),BAD_STRING_TOKEN;if(i===REVERSE_SOLIDUS){var s=this._value[r+1];s!==EOF$1&&void 0!==s&&(s===LINE_FEED?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):isValidEscape(i,s)&&(t+=this.consumeStringSlice(r),t+=fromCodePoint$1(this.consumeEscapedCodePoint()),r=-1))}r++}},t.prototype.consumeNumber=function(){var t=[],r=FLAG_INTEGER,i=this.peekCodePoint(0);for(i!==PLUS_SIGN&&i!==HYPHEN_MINUS||t.push(this.consumeCodePoint());isDigit(this.peekCodePoint(0));)t.push(this.consumeCodePoint());i=this.peekCodePoint(0);var s=this.peekCodePoint(1);if(i===FULL_STOP&&isDigit(s))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),r=FLAG_NUMBER;isDigit(this.peekCodePoint(0));)t.push(this.consumeCodePoint());i=this.peekCodePoint(0),s=this.peekCodePoint(1);var A=this.peekCodePoint(2);if((i===E||i===e)&&((s===PLUS_SIGN||s===HYPHEN_MINUS)&&isDigit(A)||isDigit(s)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),r=FLAG_NUMBER;isDigit(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[stringToNumber(t),r]},t.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],r=e[1],i=this.peekCodePoint(0),s=this.peekCodePoint(1),A=this.peekCodePoint(2);return isIdentifierStart(i,s,A)?{type:15,number:t,flags:r,unit:this.consumeName()}:i===PERCENTAGE_SIGN?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},t.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(isHex(e)){for(var t=fromCodePoint$1(e);isHex(this.peekCodePoint(0))&&t.length<6;)t+=fromCodePoint$1(this.consumeCodePoint());isWhiteSpace(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return 0===r||isSurrogateCodePoint(r)||r>1114111?REPLACEMENT_CHARACTER:r}return e===EOF$1?REPLACEMENT_CHARACTER:e},t.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(isNameCodePoint(t))e+=fromCodePoint$1(t);else{if(!isValidEscape(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=fromCodePoint$1(this.consumeEscapedCodePoint())}}},t}(),Parser=function(){function e(e){this._tokens=e}return e.create=function(t){var r=new Tokenizer;return r.write(t),new e(r.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},r=this.consumeToken();;){if(32===r.type||isEndingTokenFor(r,e))return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue()),r=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var r=this.consumeToken();if(32===r.type||3===r.type)return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?EOF_TOKEN:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),isDimensionToken=function(e){return 15===e.type},isNumberToken=function(e){return 17===e.type},isIdentToken=function(e){return 20===e.type},isStringToken=function(e){return 0===e.type},isIdentWithValue=function(e,t){return isIdentToken(e)&&e.value===t},nonWhiteSpace=function(e){return 31!==e.type},nonFunctionArgSeparator=function(e){return 31!==e.type&&4!==e.type},parseFunctionArgs=function(e){var t=[],r=[];return e.forEach((function(e){if(4===e.type){if(0===r.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(r),void(r=[])}31!==e.type&&r.push(e)})),r.length&&t.push(r),t},isEndingTokenFor=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},isLength=function(e){return 17===e.type||15===e.type},isLengthPercentage=function(e){return 16===e.type||isLength(e)},parseLengthPercentageTuple=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},ZERO_LENGTH={type:17,number:0,flags:FLAG_INTEGER},FIFTY_PERCENT={type:16,number:50,flags:FLAG_INTEGER},HUNDRED_PERCENT={type:16,number:100,flags:FLAG_INTEGER},getAbsoluteValueForTuple=function(e,t,r){var i=e[0],s=e[1];return[getAbsoluteValue(i,t),getAbsoluteValue(void 0!==s?s:i,r)]},getAbsoluteValue=function(e,t){if(16===e.type)return e.number/100*t;if(isDimensionToken(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},DEG="deg",GRAD="grad",RAD="rad",TURN="turn",angle={name:"angle",parse:function(e,t){if(15===t.type)switch(t.unit){case DEG:return Math.PI*t.number/180;case GRAD:return Math.PI/200*t.number;case RAD:return t.number;case TURN:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")}},isAngle=function(e){return 15===e.type&&(e.unit===DEG||e.unit===GRAD||e.unit===RAD||e.unit===TURN)},parseNamedSide=function(e){switch(e.filter(isIdentToken).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ZERO_LENGTH,ZERO_LENGTH];case"to top":case"bottom":return deg(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ZERO_LENGTH,HUNDRED_PERCENT];case"to right":case"left":return deg(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[HUNDRED_PERCENT,HUNDRED_PERCENT];case"to bottom":case"top":return deg(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[HUNDRED_PERCENT,ZERO_LENGTH];case"to left":case"right":return deg(270)}return 0},deg=function(e){return Math.PI*e/180},color$1={name:"color",parse:function(e,t){if(18===t.type){var r=SUPPORTED_COLOR_FUNCTIONS[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return r(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),s=t.value.substring(1,2),A=t.value.substring(2,3);return pack(parseInt(i+i,16),parseInt(s+s,16),parseInt(A+A,16),1)}if(4===t.value.length){i=t.value.substring(0,1),s=t.value.substring(1,2),A=t.value.substring(2,3);var n=t.value.substring(3,4);return pack(parseInt(i+i,16),parseInt(s+s,16),parseInt(A+A,16),parseInt(n+n,16)/255)}if(6===t.value.length){i=t.value.substring(0,2),s=t.value.substring(2,4),A=t.value.substring(4,6);return pack(parseInt(i,16),parseInt(s,16),parseInt(A,16),1)}if(8===t.value.length){i=t.value.substring(0,2),s=t.value.substring(2,4),A=t.value.substring(4,6),n=t.value.substring(6,8);return pack(parseInt(i,16),parseInt(s,16),parseInt(A,16),parseInt(n,16)/255)}}if(20===t.type){var o=COLORS[t.value.toUpperCase()];if(void 0!==o)return o}return COLORS.TRANSPARENT}},isTransparent=function(e){return 0==(255&e)},asString=function(e){var t=255&e,r=255&e>>8,i=255&e>>16,s=255&e>>24;return t<255?"rgba("+s+","+i+","+r+","+t/255+")":"rgb("+s+","+i+","+r+")"},pack=function(e,t,r,i){return(e<<24|t<<16|r<<8|Math.round(255*i)<<0)>>>0},getTokenColorValue=function(e,t){if(17===e.type)return e.number;if(16===e.type){var r=3===t?1:255;return 3===t?e.number/100*r:Math.round(e.number/100*r)}return 0},rgb=function(e,t){var r=t.filter(nonFunctionArgSeparator);if(3===r.length){var i=r.map(getTokenColorValue),s=i[0],A=i[1],n=i[2];return pack(s,A,n,1)}if(4===r.length){var o=r.map(getTokenColorValue),a=(s=o[0],A=o[1],n=o[2],o[3]);return pack(s,A,n,a)}return 0};function hue2rgb(e,t,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(t-e)*r*6+e:r<.5?t:r<2/3?6*(t-e)*(2/3-r)+e:e}var BACKGROUND_CLIP,hsl=function(e,t){var r=t.filter(nonFunctionArgSeparator),i=r[0],s=r[1],A=r[2],n=r[3],o=(17===i.type?deg(i.number):angle.parse(e,i))/(2*Math.PI),a=isLengthPercentage(s)?s.number/100:0,l=isLengthPercentage(A)?A.number/100:0,h=void 0!==n&&isLengthPercentage(n)?getAbsoluteValue(n,1):1;if(0===a)return pack(255*l,255*l,255*l,1);var c=l<=.5?l*(a+1):l+a-l*a,u=2*l-c,d=hue2rgb(u,c,o+1/3),p=hue2rgb(u,c,o),g=hue2rgb(u,c,o-1/3);return pack(255*d,255*p,255*g,h)},SUPPORTED_COLOR_FUNCTIONS={hsl:hsl,hsla:hsl,rgb:rgb,rgba:rgb},parseColor=function(e,t){return color$1.parse(e,Parser.create(t).parseComponentValue())},COLORS={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(e){e[e.BORDER_BOX=0]="BORDER_BOX",e[e.PADDING_BOX=1]="PADDING_BOX",e[e.CONTENT_BOX=2]="CONTENT_BOX"}(BACKGROUND_CLIP||(BACKGROUND_CLIP={}));var CSSImageType,backgroundClip={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(isIdentToken(e))switch(e.value){case"padding-box":return BACKGROUND_CLIP.PADDING_BOX;case"content-box":return BACKGROUND_CLIP.CONTENT_BOX}return BACKGROUND_CLIP.BORDER_BOX}))}},backgroundColor={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},parseColorStop=function(e,t){var r=color$1.parse(e,t[0]),i=t[1];return i&&isLengthPercentage(i)?{color:r,stop:i}:{color:r,stop:null}},processColorStops=function(e,t){var r=e[0],i=e[e.length-1];null===r.stop&&(r.stop=ZERO_LENGTH),null===i.stop&&(i.stop=HUNDRED_PERCENT);for(var s=[],A=0,n=0;n<e.length;n++){var o=e[n].stop;if(null!==o){var a=getAbsoluteValue(o,t);a>A?s.push(a):s.push(A),A=a}else s.push(null)}var l=null;for(n=0;n<s.length;n++){var h=s[n];if(null===h)null===l&&(l=n);else if(null!==l){for(var c=n-l,u=(h-s[l-1])/(c+1),d=1;d<=c;d++)s[l+d-1]=u*d;l=null}}return e.map((function(e,r){return{color:e.color,stop:Math.max(Math.min(1,s[r]/t),0)}}))},getAngleFromCorner=function(e,t,r){var i=t/2,s=r/2,A=getAbsoluteValue(e[0],t)-i,n=s-getAbsoluteValue(e[1],r);return(Math.atan2(n,A)+2*Math.PI)%(2*Math.PI)},calculateGradientDirection=function(e,t,r){var i="number"==typeof e?e:getAngleFromCorner(e,t,r),s=Math.abs(t*Math.sin(i))+Math.abs(r*Math.cos(i)),A=t/2,n=r/2,o=s/2,a=Math.sin(i-Math.PI/2)*o,l=Math.cos(i-Math.PI/2)*o;return[s,A-l,A+l,n-a,n+a]},distance=function(e,t){return Math.sqrt(e*e+t*t)},findCorner=function(e,t,r,i,s){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var A=t[0],n=t[1],o=distance(r-A,i-n);return(s?o<e.optimumDistance:o>e.optimumDistance)?{optimumCorner:t,optimumDistance:o}:e}),{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},calculateRadius=function(e,t,r,i,s){var A=0,n=0;switch(e.size){case CSSRadialExtent.CLOSEST_SIDE:e.shape===CSSRadialShape.CIRCLE?A=n=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(r),Math.abs(r-s)):e.shape===CSSRadialShape.ELLIPSE&&(A=Math.min(Math.abs(t),Math.abs(t-i)),n=Math.min(Math.abs(r),Math.abs(r-s)));break;case CSSRadialExtent.CLOSEST_CORNER:if(e.shape===CSSRadialShape.CIRCLE)A=n=Math.min(distance(t,r),distance(t,r-s),distance(t-i,r),distance(t-i,r-s));else if(e.shape===CSSRadialShape.ELLIPSE){var o=Math.min(Math.abs(r),Math.abs(r-s))/Math.min(Math.abs(t),Math.abs(t-i)),a=findCorner(i,s,t,r,!0),l=a[0],h=a[1];n=o*(A=distance(l-t,(h-r)/o))}break;case CSSRadialExtent.FARTHEST_SIDE:e.shape===CSSRadialShape.CIRCLE?A=n=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(r),Math.abs(r-s)):e.shape===CSSRadialShape.ELLIPSE&&(A=Math.max(Math.abs(t),Math.abs(t-i)),n=Math.max(Math.abs(r),Math.abs(r-s)));break;case CSSRadialExtent.FARTHEST_CORNER:if(e.shape===CSSRadialShape.CIRCLE)A=n=Math.max(distance(t,r),distance(t,r-s),distance(t-i,r),distance(t-i,r-s));else if(e.shape===CSSRadialShape.ELLIPSE){o=Math.max(Math.abs(r),Math.abs(r-s))/Math.max(Math.abs(t),Math.abs(t-i));var c=findCorner(i,s,t,r,!1);l=c[0],h=c[1];n=o*(A=distance(l-t,(h-r)/o))}}return Array.isArray(e.size)&&(A=getAbsoluteValue(e.size[0],i),n=2===e.size.length?getAbsoluteValue(e.size[1],s):A),[A,n]},linearGradient=function(e,t){var r=deg(180),i=[];return parseFunctionArgs(t).forEach((function(t,s){if(0===s){var A=t[0];if(20===A.type&&"to"===A.value)return void(r=parseNamedSide(t));if(isAngle(A))return void(r=angle.parse(e,A))}var n=parseColorStop(e,t);i.push(n)})),{angle:r,stops:i,type:CSSImageType.LINEAR_GRADIENT}},prefixLinearGradient=function(e,t){var r=deg(180),i=[];return parseFunctionArgs(t).forEach((function(t,s){if(0===s){var A=t[0];if(20===A.type&&-1!==["top","left","right","bottom"].indexOf(A.value))return void(r=parseNamedSide(t));if(isAngle(A))return void(r=(angle.parse(e,A)+deg(270))%deg(360))}var n=parseColorStop(e,t);i.push(n)})),{angle:r,stops:i,type:CSSImageType.LINEAR_GRADIENT}},webkitGradient=function(e,t){var r=deg(180),i=[],s=CSSImageType.LINEAR_GRADIENT,A=CSSRadialShape.CIRCLE,n=CSSRadialExtent.FARTHEST_CORNER;return parseFunctionArgs(t).forEach((function(t,r){var A=t[0];if(0===r){if(isIdentToken(A)&&"linear"===A.value)return void(s=CSSImageType.LINEAR_GRADIENT);if(isIdentToken(A)&&"radial"===A.value)return void(s=CSSImageType.RADIAL_GRADIENT)}if(18===A.type)if("from"===A.name){var n=color$1.parse(e,A.values[0]);i.push({stop:ZERO_LENGTH,color:n})}else if("to"===A.name){n=color$1.parse(e,A.values[0]);i.push({stop:HUNDRED_PERCENT,color:n})}else if("color-stop"===A.name){var o=A.values.filter(nonFunctionArgSeparator);if(2===o.length){n=color$1.parse(e,o[1]);var a=o[0];isNumberToken(a)&&i.push({stop:{type:16,number:100*a.number,flags:a.flags},color:n})}}})),s===CSSImageType.LINEAR_GRADIENT?{angle:(r+deg(180))%deg(360),stops:i,type:s}:{size:n,shape:A,stops:i,position:[],type:s}},CLOSEST_SIDE="closest-side",FARTHEST_SIDE="farthest-side",CLOSEST_CORNER="closest-corner",FARTHEST_CORNER="farthest-corner",CIRCLE="circle",ELLIPSE="ellipse",COVER="cover",CONTAIN="contain",radialGradient=function(e,t){var r=CSSRadialShape.CIRCLE,i=CSSRadialExtent.FARTHEST_CORNER,s=[],A=[];return parseFunctionArgs(t).forEach((function(t,n){var o=!0;if(0===n){var a=!1;o=t.reduce((function(e,t){if(a)if(isIdentToken(t))switch(t.value){case"center":return A.push(FIFTY_PERCENT),e;case"top":case"left":return A.push(ZERO_LENGTH),e;case"right":case"bottom":return A.push(HUNDRED_PERCENT),e}else(isLengthPercentage(t)||isLength(t))&&A.push(t);else if(isIdentToken(t))switch(t.value){case CIRCLE:return r=CSSRadialShape.CIRCLE,!1;case ELLIPSE:return r=CSSRadialShape.ELLIPSE,!1;case"at":return a=!0,!1;case CLOSEST_SIDE:return i=CSSRadialExtent.CLOSEST_SIDE,!1;case COVER:case FARTHEST_SIDE:return i=CSSRadialExtent.FARTHEST_SIDE,!1;case CONTAIN:case CLOSEST_CORNER:return i=CSSRadialExtent.CLOSEST_CORNER,!1;case FARTHEST_CORNER:return i=CSSRadialExtent.FARTHEST_CORNER,!1}else if(isLength(t)||isLengthPercentage(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),o)}if(o){var l=parseColorStop(e,t);s.push(l)}})),{size:i,shape:r,stops:s,position:A,type:CSSImageType.RADIAL_GRADIENT}},prefixRadialGradient=function(e,t){var r=CSSRadialShape.CIRCLE,i=CSSRadialExtent.FARTHEST_CORNER,s=[],A=[];return parseFunctionArgs(t).forEach((function(t,n){var o=!0;if(0===n?o=t.reduce((function(e,t){if(isIdentToken(t))switch(t.value){case"center":return A.push(FIFTY_PERCENT),!1;case"top":case"left":return A.push(ZERO_LENGTH),!1;case"right":case"bottom":return A.push(HUNDRED_PERCENT),!1}else if(isLengthPercentage(t)||isLength(t))return A.push(t),!1;return e}),o):1===n&&(o=t.reduce((function(e,t){if(isIdentToken(t))switch(t.value){case CIRCLE:return r=CSSRadialShape.CIRCLE,!1;case ELLIPSE:return r=CSSRadialShape.ELLIPSE,!1;case CONTAIN:case CLOSEST_SIDE:return i=CSSRadialExtent.CLOSEST_SIDE,!1;case FARTHEST_SIDE:return i=CSSRadialExtent.FARTHEST_SIDE,!1;case CLOSEST_CORNER:return i=CSSRadialExtent.CLOSEST_CORNER,!1;case COVER:case FARTHEST_CORNER:return i=CSSRadialExtent.FARTHEST_CORNER,!1}else if(isLength(t)||isLengthPercentage(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),o)),o){var a=parseColorStop(e,t);s.push(a)}})),{size:i,shape:r,stops:s,position:A,type:CSSImageType.RADIAL_GRADIENT}};!function(e){e[e.URL=0]="URL",e[e.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",e[e.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(CSSImageType||(CSSImageType={}));var CSSRadialShape,CSSRadialExtent,isLinearGradient=function(e){return e.type===CSSImageType.LINEAR_GRADIENT},isRadialGradient=function(e){return e.type===CSSImageType.RADIAL_GRADIENT};!function(e){e[e.CIRCLE=0]="CIRCLE",e[e.ELLIPSE=1]="ELLIPSE"}(CSSRadialShape||(CSSRadialShape={})),function(e){e[e.CLOSEST_SIDE=0]="CLOSEST_SIDE",e[e.FARTHEST_SIDE=1]="FARTHEST_SIDE",e[e.CLOSEST_CORNER=2]="CLOSEST_CORNER",e[e.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(CSSRadialExtent||(CSSRadialExtent={}));var image={name:"image",parse:function(e,t){if(22===t.type){var r={url:t.value,type:CSSImageType.URL};return e.cache.addImage(t.value),r}if(18===t.type){var i=SUPPORTED_IMAGE_FUNCTIONS[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)}};function isSupportedImage(e){return!(20===e.type&&"none"===e.value||18===e.type&&!SUPPORTED_IMAGE_FUNCTIONS[e.name])}var BACKGROUND_REPEAT,SUPPORTED_IMAGE_FUNCTIONS={"linear-gradient":linearGradient,"-moz-linear-gradient":prefixLinearGradient,"-ms-linear-gradient":prefixLinearGradient,"-o-linear-gradient":prefixLinearGradient,"-webkit-linear-gradient":prefixLinearGradient,"radial-gradient":radialGradient,"-moz-radial-gradient":prefixRadialGradient,"-ms-radial-gradient":prefixRadialGradient,"-o-radial-gradient":prefixRadialGradient,"-webkit-radial-gradient":prefixRadialGradient,"-webkit-gradient":webkitGradient},backgroundImage={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t.filter((function(e){return nonFunctionArgSeparator(e)&&isSupportedImage(e)})).map((function(t){return image.parse(e,t)}))}},backgroundOrigin={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(isIdentToken(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},backgroundPosition={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return parseFunctionArgs(t).map((function(e){return e.filter(isLengthPercentage)})).map(parseLengthPercentageTuple)}};!function(e){e[e.REPEAT=0]="REPEAT",e[e.NO_REPEAT=1]="NO_REPEAT",e[e.REPEAT_X=2]="REPEAT_X",e[e.REPEAT_Y=3]="REPEAT_Y"}(BACKGROUND_REPEAT||(BACKGROUND_REPEAT={}));var BACKGROUND_SIZE,backgroundRepeat={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return parseFunctionArgs(t).map((function(e){return e.filter(isIdentToken).map((function(e){return e.value})).join(" ")})).map(parseBackgroundRepeat)}},parseBackgroundRepeat=function(e){switch(e){case"no-repeat":return BACKGROUND_REPEAT.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return BACKGROUND_REPEAT.REPEAT_X;case"repeat-y":case"no-repeat repeat":return BACKGROUND_REPEAT.REPEAT_Y;default:return BACKGROUND_REPEAT.REPEAT}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(BACKGROUND_SIZE||(BACKGROUND_SIZE={}));var BORDER_STYLE,backgroundSize={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return parseFunctionArgs(t).map((function(e){return e.filter(isBackgroundSizeInfoToken)}))}},isBackgroundSizeInfoToken=function(e){return isIdentToken(e)||isLengthPercentage(e)},borderColorForSide=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},borderTopColor=borderColorForSide("top"),borderRightColor=borderColorForSide("right"),borderBottomColor=borderColorForSide("bottom"),borderLeftColor=borderColorForSide("left"),borderRadiusForSide=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return parseLengthPercentageTuple(t.filter(isLengthPercentage))}}},borderTopLeftRadius=borderRadiusForSide("top-left"),borderTopRightRadius=borderRadiusForSide("top-right"),borderBottomRightRadius=borderRadiusForSide("bottom-right"),borderBottomLeftRadius=borderRadiusForSide("bottom-left");!function(e){e[e.NONE=0]="NONE",e[e.SOLID=1]="SOLID",e[e.DASHED=2]="DASHED",e[e.DOTTED=3]="DOTTED",e[e.DOUBLE=4]="DOUBLE"}(BORDER_STYLE||(BORDER_STYLE={}));var FLOAT,borderStyleForSide=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return BORDER_STYLE.NONE;case"dashed":return BORDER_STYLE.DASHED;case"dotted":return BORDER_STYLE.DOTTED;case"double":return BORDER_STYLE.DOUBLE}return BORDER_STYLE.SOLID}}},borderTopStyle=borderStyleForSide("top"),borderRightStyle=borderStyleForSide("right"),borderBottomStyle=borderStyleForSide("bottom"),borderLeftStyle=borderStyleForSide("left"),borderWidthForSide=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return isDimensionToken(t)?t.number:0}}},borderTopWidth=borderWidthForSide("top"),borderRightWidth=borderWidthForSide("right"),borderBottomWidth=borderWidthForSide("bottom"),borderLeftWidth=borderWidthForSide("left"),color={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},direction={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},display={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(isIdentToken).reduce((function(e,t){return e|parseDisplayValue(t.value)}),0)}},parseDisplayValue=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(e){e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.INLINE_START=3]="INLINE_START",e[e.INLINE_END=4]="INLINE_END"}(FLOAT||(FLOAT={}));var LINE_BREAK,float={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return FLOAT.LEFT;case"right":return FLOAT.RIGHT;case"inline-start":return FLOAT.INLINE_START;case"inline-end":return FLOAT.INLINE_END}return FLOAT.NONE}},letterSpacing={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(LINE_BREAK||(LINE_BREAK={}));var LIST_STYLE_POSITION,lineBreak={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?LINE_BREAK.STRICT:LINE_BREAK.NORMAL}},lineHeight={name:"line-height",initialValue:"normal",prefix:!1,type:4},computeLineHeight=function(e,t){return isIdentToken(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:isLengthPercentage(e)?getAbsoluteValue(e,t):t},listStyleImage={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:image.parse(e,t)}};!function(e){e[e.INSIDE=0]="INSIDE",e[e.OUTSIDE=1]="OUTSIDE"}(LIST_STYLE_POSITION||(LIST_STYLE_POSITION={}));var LIST_STYLE_TYPE,listStylePosition={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?LIST_STYLE_POSITION.INSIDE:LIST_STYLE_POSITION.OUTSIDE}};!function(e){e[e.NONE=-1]="NONE",e[e.DISC=0]="DISC",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e[e.DECIMAL=3]="DECIMAL",e[e.CJK_DECIMAL=4]="CJK_DECIMAL",e[e.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",e[e.LOWER_ROMAN=6]="LOWER_ROMAN",e[e.UPPER_ROMAN=7]="UPPER_ROMAN",e[e.LOWER_GREEK=8]="LOWER_GREEK",e[e.LOWER_ALPHA=9]="LOWER_ALPHA",e[e.UPPER_ALPHA=10]="UPPER_ALPHA",e[e.ARABIC_INDIC=11]="ARABIC_INDIC",e[e.ARMENIAN=12]="ARMENIAN",e[e.BENGALI=13]="BENGALI",e[e.CAMBODIAN=14]="CAMBODIAN",e[e.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",e[e.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",e[e.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",e[e.DEVANAGARI=18]="DEVANAGARI",e[e.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",e[e.GEORGIAN=20]="GEORGIAN",e[e.GUJARATI=21]="GUJARATI",e[e.GURMUKHI=22]="GURMUKHI",e[e.HEBREW=22]="HEBREW",e[e.HIRAGANA=23]="HIRAGANA",e[e.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",e[e.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",e[e.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",e[e.KANNADA=27]="KANNADA",e[e.KATAKANA=28]="KATAKANA",e[e.KATAKANA_IROHA=29]="KATAKANA_IROHA",e[e.KHMER=30]="KHMER",e[e.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",e[e.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",e[e.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",e[e.LAO=34]="LAO",e[e.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",e[e.MALAYALAM=36]="MALAYALAM",e[e.MONGOLIAN=37]="MONGOLIAN",e[e.MYANMAR=38]="MYANMAR",e[e.ORIYA=39]="ORIYA",e[e.PERSIAN=40]="PERSIAN",e[e.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",e[e.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",e[e.TAMIL=43]="TAMIL",e[e.TELUGU=44]="TELUGU",e[e.THAI=45]="THAI",e[e.TIBETAN=46]="TIBETAN",e[e.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",e[e.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",e[e.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",e[e.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",e[e.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(LIST_STYLE_TYPE||(LIST_STYLE_TYPE={}));var OVERFLOW,listStyleType={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return LIST_STYLE_TYPE.DISC;case"circle":return LIST_STYLE_TYPE.CIRCLE;case"square":return LIST_STYLE_TYPE.SQUARE;case"decimal":return LIST_STYLE_TYPE.DECIMAL;case"cjk-decimal":return LIST_STYLE_TYPE.CJK_DECIMAL;case"decimal-leading-zero":return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;case"lower-roman":return LIST_STYLE_TYPE.LOWER_ROMAN;case"upper-roman":return LIST_STYLE_TYPE.UPPER_ROMAN;case"lower-greek":return LIST_STYLE_TYPE.LOWER_GREEK;case"lower-alpha":return LIST_STYLE_TYPE.LOWER_ALPHA;case"upper-alpha":return LIST_STYLE_TYPE.UPPER_ALPHA;case"arabic-indic":return LIST_STYLE_TYPE.ARABIC_INDIC;case"armenian":return LIST_STYLE_TYPE.ARMENIAN;case"bengali":return LIST_STYLE_TYPE.BENGALI;case"cambodian":return LIST_STYLE_TYPE.CAMBODIAN;case"cjk-earthly-branch":return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;case"cjk-ideographic":return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;case"devanagari":return LIST_STYLE_TYPE.DEVANAGARI;case"ethiopic-numeric":return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;case"georgian":return LIST_STYLE_TYPE.GEORGIAN;case"gujarati":return LIST_STYLE_TYPE.GUJARATI;case"gurmukhi":return LIST_STYLE_TYPE.GURMUKHI;case"hebrew":return LIST_STYLE_TYPE.HEBREW;case"hiragana":return LIST_STYLE_TYPE.HIRAGANA;case"hiragana-iroha":return LIST_STYLE_TYPE.HIRAGANA_IROHA;case"japanese-formal":return LIST_STYLE_TYPE.JAPANESE_FORMAL;case"japanese-informal":return LIST_STYLE_TYPE.JAPANESE_INFORMAL;case"kannada":return LIST_STYLE_TYPE.KANNADA;case"katakana":return LIST_STYLE_TYPE.KATAKANA;case"katakana-iroha":return LIST_STYLE_TYPE.KATAKANA_IROHA;case"khmer":return LIST_STYLE_TYPE.KHMER;case"korean-hangul-formal":return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;case"lao":return LIST_STYLE_TYPE.LAO;case"lower-armenian":return LIST_STYLE_TYPE.LOWER_ARMENIAN;case"malayalam":return LIST_STYLE_TYPE.MALAYALAM;case"mongolian":return LIST_STYLE_TYPE.MONGOLIAN;case"myanmar":return LIST_STYLE_TYPE.MYANMAR;case"oriya":return LIST_STYLE_TYPE.ORIYA;case"persian":return LIST_STYLE_TYPE.PERSIAN;case"simp-chinese-formal":return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;case"tamil":return LIST_STYLE_TYPE.TAMIL;case"telugu":return LIST_STYLE_TYPE.TELUGU;case"thai":return LIST_STYLE_TYPE.THAI;case"tibetan":return LIST_STYLE_TYPE.TIBETAN;case"trad-chinese-formal":return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;case"upper-armenian":return LIST_STYLE_TYPE.UPPER_ARMENIAN;case"disclosure-open":return LIST_STYLE_TYPE.DISCLOSURE_OPEN;case"disclosure-closed":return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;default:return LIST_STYLE_TYPE.NONE}}},marginForSide=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},marginTop=marginForSide("top"),marginRight=marginForSide("right"),marginBottom=marginForSide("bottom"),marginLeft=marginForSide("left");!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.SCROLL=2]="SCROLL",e[e.CLIP=3]="CLIP",e[e.AUTO=4]="AUTO"}(OVERFLOW||(OVERFLOW={}));var TEXT_ALIGN,overflow={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(isIdentToken).map((function(e){switch(e.value){case"hidden":return OVERFLOW.HIDDEN;case"scroll":return OVERFLOW.SCROLL;case"clip":return OVERFLOW.CLIP;case"auto":return OVERFLOW.AUTO;default:return OVERFLOW.VISIBLE}}))}},overflowWrap={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},paddingForSide=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},paddingTop=paddingForSide("top"),paddingRight=paddingForSide("right"),paddingBottom=paddingForSide("bottom"),paddingLeft=paddingForSide("left");!function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(TEXT_ALIGN||(TEXT_ALIGN={}));var POSITION,textAlign={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return TEXT_ALIGN.RIGHT;case"center":case"justify":return TEXT_ALIGN.CENTER;default:return TEXT_ALIGN.LEFT}}};!function(e){e[e.STATIC=0]="STATIC",e[e.RELATIVE=1]="RELATIVE",e[e.ABSOLUTE=2]="ABSOLUTE",e[e.FIXED=3]="FIXED",e[e.STICKY=4]="STICKY"}(POSITION||(POSITION={}));var TEXT_TRANSFORM,position={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return POSITION.RELATIVE;case"absolute":return POSITION.ABSOLUTE;case"fixed":return POSITION.FIXED;case"sticky":return POSITION.STICKY}return POSITION.STATIC}},textShadow={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&isIdentWithValue(t[0],"none")?[]:parseFunctionArgs(t).map((function(t){for(var r={color:COLORS.TRANSPARENT,offsetX:ZERO_LENGTH,offsetY:ZERO_LENGTH,blur:ZERO_LENGTH},i=0,s=0;s<t.length;s++){var A=t[s];isLength(A)?(0===i?r.offsetX=A:1===i?r.offsetY=A:r.blur=A,i++):r.color=color$1.parse(e,A)}return r}))}};!function(e){e[e.NONE=0]="NONE",e[e.LOWERCASE=1]="LOWERCASE",e[e.UPPERCASE=2]="UPPERCASE",e[e.CAPITALIZE=3]="CAPITALIZE"}(TEXT_TRANSFORM||(TEXT_TRANSFORM={}));var VISIBILITY,textTransform={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return TEXT_TRANSFORM.UPPERCASE;case"lowercase":return TEXT_TRANSFORM.LOWERCASE;case"capitalize":return TEXT_TRANSFORM.CAPITALIZE}return TEXT_TRANSFORM.NONE}},transform$1={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var r=SUPPORTED_TRANSFORM_FUNCTIONS[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return r(t.values)}return null}},matrix=function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d=function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),r=t[0],i=t[1],s=t[4],A=t[5],n=t[12],o=t[13];return 16===t.length?[r,i,s,A,n,o]:null},SUPPORTED_TRANSFORM_FUNCTIONS={matrix:matrix,matrix3d:matrix3d},DEFAULT_VALUE={type:16,number:50,flags:FLAG_INTEGER},DEFAULT=[DEFAULT_VALUE,DEFAULT_VALUE],transformOrigin={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var r=t.filter(isLengthPercentage);return 2!==r.length?DEFAULT:[r[0],r[1]]}};!function(e){e[e.VISIBLE=0]="VISIBLE",e[e.HIDDEN=1]="HIDDEN",e[e.COLLAPSE=2]="COLLAPSE"}(VISIBILITY||(VISIBILITY={}));var WORD_BREAK,visibility={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return VISIBILITY.HIDDEN;case"collapse":return VISIBILITY.COLLAPSE;default:return VISIBILITY.VISIBLE}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(WORD_BREAK||(WORD_BREAK={}));var FONT_STYLE,wordBreak={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return WORD_BREAK.BREAK_ALL;case"keep-all":return WORD_BREAK.KEEP_ALL;default:return WORD_BREAK.NORMAL}}},zIndex={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(isNumberToken(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},time={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},opacity={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return isNumberToken(t)?t.number:1}},textDecorationColor={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},textDecorationLine={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(isIdentToken).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},fontFamily={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var r=[],i=[];return t.forEach((function(e){switch(e.type){case 20:case 0:r.push(e.value);break;case 17:r.push(e.number.toString());break;case 4:i.push(r.join(" ")),r.length=0}})),r.length&&i.push(r.join(" ")),i.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},fontSize={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},fontWeight={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return isNumberToken(t)?t.number:isIdentToken(t)&&"bold"===t.value?700:400}},fontVariant={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(isIdentToken).map((function(e){return e.value}))}};!function(e){e.NORMAL="normal",e.ITALIC="italic",e.OBLIQUE="oblique"}(FONT_STYLE||(FONT_STYLE={}));var PAINT_ORDER_LAYER,fontStyle={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return FONT_STYLE.OBLIQUE;case"italic":return FONT_STYLE.ITALIC;default:return FONT_STYLE.NORMAL}}},contains=function(e,t){return 0!=(e&t)},content={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t}},counterIncrement={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;for(var i=[],s=t.filter(nonWhiteSpace),A=0;A<s.length;A++){var n=s[A],o=s[A+1];if(20===n.type){var a=o&&isNumberToken(o)?o.number:1;i.push({counter:n.value,increment:a})}}return i}},counterReset={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var r=[],i=t.filter(nonWhiteSpace),s=0;s<i.length;s++){var A=i[s],n=i[s+1];if(isIdentToken(A)&&"none"!==A.value){var o=n&&isNumberToken(n)?n.number:0;r.push({counter:A.value,reset:o})}}return r}},duration={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(isDimensionToken).map((function(t){return time.parse(e,t)}))}},quotes={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;var i=[],s=t.filter(isStringToken);if(s.length%2!=0)return null;for(var A=0;A<s.length;A+=2){var n=s[A].value,o=s[A+1].value;i.push({open:n,close:o})}return i}},getQuote=function(e,t,r){if(!e)return"";var i=e[Math.min(t,e.length-1)];return i?r?i.open:i.close:""},boxShadow={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&isIdentWithValue(t[0],"none")?[]:parseFunctionArgs(t).map((function(t){for(var r={color:255,offsetX:ZERO_LENGTH,offsetY:ZERO_LENGTH,blur:ZERO_LENGTH,spread:ZERO_LENGTH,inset:!1},i=0,s=0;s<t.length;s++){var A=t[s];isIdentWithValue(A,"inset")?r.inset=!0:isLength(A)?(0===i?r.offsetX=A:1===i?r.offsetY=A:2===i?r.blur=A:r.spread=A,i++):r.color=color$1.parse(e,A)}return r}))}};!function(e){e[e.FILL=0]="FILL",e[e.STROKE=1]="STROKE",e[e.MARKERS=2]="MARKERS"}(PAINT_ORDER_LAYER||(PAINT_ORDER_LAYER={}));for(var paintOrder={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var r=[PAINT_ORDER_LAYER.FILL,PAINT_ORDER_LAYER.STROKE,PAINT_ORDER_LAYER.MARKERS],i=[];return t.filter(isIdentToken).forEach((function(e){switch(e.value){case"stroke":i.push(PAINT_ORDER_LAYER.STROKE);break;case"fill":i.push(PAINT_ORDER_LAYER.FILL);break;case"markers":i.push(PAINT_ORDER_LAYER.MARKERS)}})),r.forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),i}},webkitTextStrokeColor={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},webkitTextStrokeWidth={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return isDimensionToken(t)?t.number:0}},CSSParsedDeclaration=function(){function e(e,t){var r,i;this.animationDuration=parse(e,duration,t.animationDuration),this.backgroundClip=parse(e,backgroundClip,t.backgroundClip),this.backgroundColor=parse(e,backgroundColor,t.backgroundColor),this.backgroundImage=parse(e,backgroundImage,t.backgroundImage),this.backgroundOrigin=parse(e,backgroundOrigin,t.backgroundOrigin),this.backgroundPosition=parse(e,backgroundPosition,t.backgroundPosition),this.backgroundRepeat=parse(e,backgroundRepeat,t.backgroundRepeat),this.backgroundSize=parse(e,backgroundSize,t.backgroundSize),this.borderTopColor=parse(e,borderTopColor,t.borderTopColor),this.borderRightColor=parse(e,borderRightColor,t.borderRightColor),this.borderBottomColor=parse(e,borderBottomColor,t.borderBottomColor),this.borderLeftColor=parse(e,borderLeftColor,t.borderLeftColor),this.borderTopLeftRadius=parse(e,borderTopLeftRadius,t.borderTopLeftRadius),this.borderTopRightRadius=parse(e,borderTopRightRadius,t.borderTopRightRadius),this.borderBottomRightRadius=parse(e,borderBottomRightRadius,t.borderBottomRightRadius),this.borderBottomLeftRadius=parse(e,borderBottomLeftRadius,t.borderBottomLeftRadius),this.borderTopStyle=parse(e,borderTopStyle,t.borderTopStyle),this.borderRightStyle=parse(e,borderRightStyle,t.borderRightStyle),this.borderBottomStyle=parse(e,borderBottomStyle,t.borderBottomStyle),this.borderLeftStyle=parse(e,borderLeftStyle,t.borderLeftStyle),this.borderTopWidth=parse(e,borderTopWidth,t.borderTopWidth),this.borderRightWidth=parse(e,borderRightWidth,t.borderRightWidth),this.borderBottomWidth=parse(e,borderBottomWidth,t.borderBottomWidth),this.borderLeftWidth=parse(e,borderLeftWidth,t.borderLeftWidth),this.boxShadow=parse(e,boxShadow,t.boxShadow),this.color=parse(e,color,t.color),this.direction=parse(e,direction,t.direction),this.display=parse(e,display,t.display),this.float=parse(e,float,t.cssFloat),this.fontFamily=parse(e,fontFamily,t.fontFamily),this.fontSize=parse(e,fontSize,t.fontSize),this.fontStyle=parse(e,fontStyle,t.fontStyle),this.fontVariant=parse(e,fontVariant,t.fontVariant),this.fontWeight=parse(e,fontWeight,t.fontWeight),this.letterSpacing=parse(e,letterSpacing,t.letterSpacing),this.lineBreak=parse(e,lineBreak,t.lineBreak),this.lineHeight=parse(e,lineHeight,t.lineHeight),this.listStyleImage=parse(e,listStyleImage,t.listStyleImage),this.listStylePosition=parse(e,listStylePosition,t.listStylePosition),this.listStyleType=parse(e,listStyleType,t.listStyleType),this.marginTop=parse(e,marginTop,t.marginTop),this.marginRight=parse(e,marginRight,t.marginRight),this.marginBottom=parse(e,marginBottom,t.marginBottom),this.marginLeft=parse(e,marginLeft,t.marginLeft),this.opacity=parse(e,opacity,t.opacity);var s=parse(e,overflow,t.overflow);this.overflowX=s[0],this.overflowY=s[s.length>1?1:0],this.overflowWrap=parse(e,overflowWrap,t.overflowWrap),this.paddingTop=parse(e,paddingTop,t.paddingTop),this.paddingRight=parse(e,paddingRight,t.paddingRight),this.paddingBottom=parse(e,paddingBottom,t.paddingBottom),this.paddingLeft=parse(e,paddingLeft,t.paddingLeft),this.paintOrder=parse(e,paintOrder,t.paintOrder),this.position=parse(e,position,t.position),this.textAlign=parse(e,textAlign,t.textAlign),this.textDecorationColor=parse(e,textDecorationColor,null!==(r=t.textDecorationColor)&&void 0!==r?r:t.color),this.textDecorationLine=parse(e,textDecorationLine,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=parse(e,textShadow,t.textShadow),this.textTransform=parse(e,textTransform,t.textTransform),this.transform=parse(e,transform$1,t.transform),this.transformOrigin=parse(e,transformOrigin,t.transformOrigin),this.visibility=parse(e,visibility,t.visibility),this.webkitTextStrokeColor=parse(e,webkitTextStrokeColor,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=parse(e,webkitTextStrokeWidth,t.webkitTextStrokeWidth),this.wordBreak=parse(e,wordBreak,t.wordBreak),this.zIndex=parse(e,zIndex,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===VISIBILITY.VISIBLE},e.prototype.isTransparent=function(){return isTransparent(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return this.position!==POSITION.STATIC},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==FLOAT.NONE},e.prototype.isInlineLevel=function(){return contains(this.display,4)||contains(this.display,33554432)||contains(this.display,268435456)||contains(this.display,536870912)||contains(this.display,67108864)||contains(this.display,134217728)},e}(),CSSParsedPseudoDeclaration=function(e,t){this.content=parse(e,content,t.content),this.quotes=parse(e,quotes,t.quotes)},CSSParsedCounterDeclaration=function(e,t){this.counterIncrement=parse(e,counterIncrement,t.counterIncrement),this.counterReset=parse(e,counterReset,t.counterReset)},parse=function(e,t,r){var i=new Tokenizer,s=null!=r?r.toString():t.initialValue;i.write(s);var A=new Parser(i.read());switch(t.type){case 2:var n=A.parseComponentValue();return t.parse(e,isIdentToken(n)?n.value:t.initialValue);case 0:return t.parse(e,A.parseComponentValue());case 1:return t.parse(e,A.parseComponentValues());case 4:return A.parseComponentValue();case 3:switch(t.format){case"angle":return angle.parse(e,A.parseComponentValue());case"color":return color$1.parse(e,A.parseComponentValue());case"image":return image.parse(e,A.parseComponentValue());case"length":var o=A.parseComponentValue();return isLength(o)?o:ZERO_LENGTH;case"length-percentage":var a=A.parseComponentValue();return isLengthPercentage(a)?a:ZERO_LENGTH;case"time":return time.parse(e,A.parseComponentValue())}}},elementDebuggerAttribute="data-html2canvas-debug",getElementDebugType=function(e){switch(e.getAttribute(elementDebuggerAttribute)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},isDebugging=function(e,t){var r=getElementDebugType(e);return 1===r||t===r},ElementContainer=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,isDebugging(t,3),this.styles=new CSSParsedDeclaration(e,window.getComputedStyle(t,null)),isHTMLElementNode(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=parseBounds(this.context,t),isDebugging(t,4)&&(this.flags|=16)},base64="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",chars$1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i$1$1=0;i$1$1<chars$1.length;i$1$1++)lookup$1[chars$1.charCodeAt(i$1$1)]=i$1$1;for(var decode=function(e){var t,r,i,s,A,n=.75*e.length,o=e.length,a=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),h=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<o;t+=4)r=lookup$1[e.charCodeAt(t)],i=lookup$1[e.charCodeAt(t+1)],s=lookup$1[e.charCodeAt(t+2)],A=lookup$1[e.charCodeAt(t+3)],h[a++]=r<<2|i>>4,h[a++]=(15&i)<<4|s>>2,h[a++]=(3&s)<<6|63&A;return l},polyUint16Array=function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r.push(e[i+1]<<8|e[i]);return r},polyUint32Array=function(e){for(var t=e.length,r=[],i=0;i<t;i+=4)r.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return r},UTRIE2_SHIFT_2=5,UTRIE2_SHIFT_1=11,UTRIE2_INDEX_SHIFT=2,UTRIE2_SHIFT_1_2=UTRIE2_SHIFT_1-UTRIE2_SHIFT_2,UTRIE2_LSCP_INDEX_2_OFFSET=65536>>UTRIE2_SHIFT_2,UTRIE2_DATA_BLOCK_LENGTH=1<<UTRIE2_SHIFT_2,UTRIE2_DATA_MASK=UTRIE2_DATA_BLOCK_LENGTH-1,UTRIE2_LSCP_INDEX_2_LENGTH=1024>>UTRIE2_SHIFT_2,UTRIE2_INDEX_2_BMP_LENGTH=UTRIE2_LSCP_INDEX_2_OFFSET+UTRIE2_LSCP_INDEX_2_LENGTH,UTRIE2_UTF8_2B_INDEX_2_OFFSET=UTRIE2_INDEX_2_BMP_LENGTH,UTRIE2_UTF8_2B_INDEX_2_LENGTH=32,UTRIE2_INDEX_1_OFFSET=UTRIE2_UTF8_2B_INDEX_2_OFFSET+UTRIE2_UTF8_2B_INDEX_2_LENGTH,UTRIE2_OMITTED_BMP_INDEX_1_LENGTH=65536>>UTRIE2_SHIFT_1,UTRIE2_INDEX_2_BLOCK_LENGTH=1<<UTRIE2_SHIFT_1_2,UTRIE2_INDEX_2_MASK=UTRIE2_INDEX_2_BLOCK_LENGTH-1,slice16=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},slice32=function(e,t,r){return e.slice?e.slice(t,r):new Uint32Array(Array.prototype.slice.call(e,t,r))},createTrieFromBase64=function(e,t){var r=decode(e),i=Array.isArray(r)?polyUint32Array(r):new Uint32Array(r),s=Array.isArray(r)?polyUint16Array(r):new Uint16Array(r),A=slice16(s,12,i[4]/2),n=2===i[5]?slice16(s,(24+i[4])/2):slice32(i,Math.ceil((24+i[4])/4));return new Trie(i[0],i[1],i[2],i[3],A,n)},Trie=function(){function e(e,t,r,i,s,A){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=i,this.index=s,this.data=A}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>UTRIE2_SHIFT_2])<<UTRIE2_INDEX_SHIFT)+(e&UTRIE2_DATA_MASK),this.data[t];if(e<=65535)return t=((t=this.index[UTRIE2_LSCP_INDEX_2_OFFSET+(e-55296>>UTRIE2_SHIFT_2)])<<UTRIE2_INDEX_SHIFT)+(e&UTRIE2_DATA_MASK),this.data[t];if(e<this.highStart)return t=UTRIE2_INDEX_1_OFFSET-UTRIE2_OMITTED_BMP_INDEX_1_LENGTH+(e>>UTRIE2_SHIFT_1),t=this.index[t],t+=e>>UTRIE2_SHIFT_2&UTRIE2_INDEX_2_MASK,t=((t=this.index[t])<<UTRIE2_INDEX_SHIFT)+(e&UTRIE2_DATA_MASK),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i$3=0;i$3<chars.length;i$3++)lookup[chars.charCodeAt(i$3)]=i$3;var PseudoElementType,Prepend=1,CR=2,LF=3,Control=4,Extend=5,SpacingMark=7,L=8,V=9,T=10,LV=11,LVT=12,ZWJ=13,Extended_Pictographic=14,RI=15,toCodePoints=function(e){for(var t=[],r=0,i=e.length;r<i;){var s=e.charCodeAt(r++);if(s>=55296&&s<=56319&&r<i){var A=e.charCodeAt(r++);56320==(64512&A)?t.push(((1023&s)<<10)+(1023&A)+65536):(t.push(s),r--)}else t.push(s)}return t},fromCodePoint=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var i=[],s=-1,A="";++s<r;){var n=e[s];n<=65535?i.push(n):(n-=65536,i.push(55296+(n>>10),n%1024+56320)),(s+1===r||i.length>16384)&&(A+=String.fromCharCode.apply(String,i),i.length=0)}return A},UnicodeTrie=createTrieFromBase64(base64),BREAK_NOT_ALLOWED="×",BREAK_ALLOWED="÷",codePointToClass=function(e){return UnicodeTrie.get(e)},_graphemeBreakAtIndex=function(e,t,r){var i=r-2,s=t[i],A=t[r-1],n=t[r];if(A===CR&&n===LF)return BREAK_NOT_ALLOWED;if(A===CR||A===LF||A===Control)return BREAK_ALLOWED;if(n===CR||n===LF||n===Control)return BREAK_ALLOWED;if(A===L&&-1!==[L,V,LV,LVT].indexOf(n))return BREAK_NOT_ALLOWED;if(!(A!==LV&&A!==V||n!==V&&n!==T))return BREAK_NOT_ALLOWED;if((A===LVT||A===T)&&n===T)return BREAK_NOT_ALLOWED;if(n===ZWJ||n===Extend)return BREAK_NOT_ALLOWED;if(n===SpacingMark)return BREAK_NOT_ALLOWED;if(A===Prepend)return BREAK_NOT_ALLOWED;if(A===ZWJ&&n===Extended_Pictographic){for(;s===Extend;)s=t[--i];if(s===Extended_Pictographic)return BREAK_NOT_ALLOWED}if(A===RI&&n===RI){for(var o=0;s===RI;)o++,s=t[--i];if(o%2==0)return BREAK_NOT_ALLOWED}return BREAK_ALLOWED},GraphemeBreaker=function(e){var t=toCodePoints(e),r=t.length,i=0,s=0,A=t.map(codePointToClass);return{next:function(){if(i>=r)return{done:!0,value:null};for(var e=BREAK_NOT_ALLOWED;i<r&&(e=_graphemeBreakAtIndex(t,A,++i))===BREAK_NOT_ALLOWED;);if(e!==BREAK_NOT_ALLOWED||i===r){var n=fromCodePoint.apply(null,t.slice(s,i));return s=i,{value:n,done:!1}}return{done:!0,value:null}}}},splitGraphemes=function(e){for(var t,r=GraphemeBreaker(e),i=[];!(t=r.next()).done;)t.value&&i.push(t.value.slice());return i},testRangeBounds=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height="123px",r.style.display="block",e.body.appendChild(r),t.selectNode(r);var i=t.getBoundingClientRect(),s=Math.round(i.height);if(e.body.removeChild(r),123===s)return!0}}return!1},testIOSLineBreak=function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var r=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var i=t.firstChild,s=toCodePoints$1(i.data).map((function(e){return fromCodePoint$1(e)})),A=0,n={},o=s.every((function(e,t){r.setStart(i,A),r.setEnd(i,A+e.length);var s=r.getBoundingClientRect();A+=e.length;var o=s.x>n.x||s.y>n.y;return n=s,0===t||o}));return e.body.removeChild(t),o},testCORS=function(){return void 0!==(new Image).crossOrigin},testResponseType=function(){return"string"==typeof(new XMLHttpRequest).responseType},testSVG=function(e){var t=new Image,r=e.createElement("canvas"),i=r.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(t,0,0),r.toDataURL()}catch(e){return!1}return!0},isGreenPixel=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},testForeignObject=function(e){var t=e.createElement("canvas"),r=100;t.width=r,t.height=r;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,r,r);var s=new Image,A=t.toDataURL();s.src=A;var n=createForeignObjectSVG(r,r,0,0,s);return i.fillStyle="red",i.fillRect(0,0,r,r),loadSerializedSVG$1(n).then((function(t){i.drawImage(t,0,0);var s=i.getImageData(0,0,r,r).data;i.fillStyle="red",i.fillRect(0,0,r,r);var n=e.createElement("div");return n.style.backgroundImage="url("+A+")",n.style.height="100px",isGreenPixel(s)?loadSerializedSVG$1(createForeignObjectSVG(r,r,0,0,n)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),isGreenPixel(i.getImageData(0,0,r,r).data)})).catch((function(){return!1}))},createForeignObjectSVG=function(e,t,r,i,s){var A="http://www.w3.org/2000/svg",n=document.createElementNS(A,"svg"),o=document.createElementNS(A,"foreignObject");return n.setAttributeNS(null,"width",e.toString()),n.setAttributeNS(null,"height",t.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",r.toString()),o.setAttributeNS(null,"y",i.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),n.appendChild(o),o.appendChild(s),n},loadSerializedSVG$1=function(e){return new Promise((function(t,r){var i=new Image;i.onload=function(){return t(i)},i.onerror=r,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},FEATURES={get SUPPORT_RANGE_BOUNDS(){var e=testRangeBounds(document);return Object.defineProperty(FEATURES,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=FEATURES.SUPPORT_RANGE_BOUNDS&&testIOSLineBreak(document);return Object.defineProperty(FEATURES,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=testSVG(document);return Object.defineProperty(FEATURES,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?testForeignObject(document):Promise.resolve(!1);return Object.defineProperty(FEATURES,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=testCORS();return Object.defineProperty(FEATURES,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=testResponseType();return Object.defineProperty(FEATURES,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(FEATURES,"SUPPORT_CORS_XHR",{value:e}),e}},TextBounds=function(e,t){this.text=e,this.bounds=t},parseTextBounds=function(e,t,r,i){var s=breakText(t,r),A=[],n=0;return s.forEach((function(t){if(r.textDecorationLine.length||t.trim().length>0)if(FEATURES.SUPPORT_RANGE_BOUNDS)FEATURES.SUPPORT_WORD_BREAKING?A.push(new TextBounds(t,getRangeBounds(e,i,n,t.length))):A.push(new TextBounds(t,Bounds.fromDOMRectList(e,createRange(i,n,t.length).getClientRects())));else{var s=i.splitText(t.length);A.push(new TextBounds(t,getWrapperBounds(e,i))),i=s}else FEATURES.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));n+=t.length})),A},getWrapperBounds=function(e,t){var r=t.ownerDocument;if(r){var i=r.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var s=t.parentNode;if(s){s.replaceChild(i,t);var A=parseBounds(e,i);return i.firstChild&&s.replaceChild(i.firstChild,i),A}}return Bounds.EMPTY},createRange=function(e,t,r){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var s=i.createRange();return s.setStart(e,t),s.setEnd(e,t+r),s},getRangeBounds=function(e,t,r,i){return Bounds.fromClientRect(e,createRange(t,r,i).getBoundingClientRect())},breakText=function(e,t){return 0!==t.letterSpacing?splitGraphemes(e):breakWords(e,t)},wordSeparators=[32,160,4961,65792,65793,4153,4241],breakWords=function(e,t){for(var r,i=LineBreaker(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),s=[],A=function(){if(r.value){var e=r.value.slice(),t=toCodePoints$1(e),i="";t.forEach((function(e){-1===wordSeparators.indexOf(e)?i+=fromCodePoint$1(e):(i.length&&s.push(i),s.push(fromCodePoint$1(e)),i="")})),i.length&&s.push(i)}};!(r=i.next()).done;)A();return s},TextContainer=function(e,t,r){this.text=transform(t.data,r.textTransform),this.textBounds=parseTextBounds(e,this.text,r,t)},transform=function(e,t){switch(t){case TEXT_TRANSFORM.LOWERCASE:return e.toLowerCase();case TEXT_TRANSFORM.CAPITALIZE:return e.replace(CAPITALIZE,capitalize);case TEXT_TRANSFORM.UPPERCASE:return e.toUpperCase();default:return e}},CAPITALIZE=/(^|\s|:|-|\(|\))([a-z])/g,capitalize=function(e,t,r){return e.length>0?t+r.toUpperCase():e},ImageElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.src=r.currentSrc||r.src,i.intrinsicWidth=r.naturalWidth,i.intrinsicHeight=r.naturalHeight,i.context.cache.addImage(i.src),i}return __extends(t,e),t}(ElementContainer),CanvasElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.canvas=r,i.intrinsicWidth=r.width,i.intrinsicHeight=r.height,i}return __extends(t,e),t}(ElementContainer),SVGElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this,s=new XMLSerializer,A=parseBounds(t,r);return r.setAttribute("width",A.width+"px"),r.setAttribute("height",A.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(s.serializeToString(r)),i.intrinsicWidth=r.width.baseVal.value,i.intrinsicHeight=r.height.baseVal.value,i.context.cache.addImage(i.svg),i}return __extends(t,e),t}(ElementContainer),LIElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.value=r.value,i}return __extends(t,e),t}(ElementContainer),OLElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.start=r.start,i.reversed="boolean"==typeof r.reversed&&!0===r.reversed,i}return __extends(t,e),t}(ElementContainer),CHECKBOX_BORDER_RADIUS=[{type:15,flags:0,unit:"px",number:3}],RADIO_BORDER_RADIUS=[{type:16,flags:0,number:50}],reformatInputBounds=function(e){return e.width>e.height?new Bounds(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new Bounds(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},getInputValue=function(e){var t=e.type===PASSWORD?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t},CHECKBOX="checkbox",RADIO="radio",PASSWORD="password",INPUT_COLOR=707406591,InputElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;switch(i.type=r.type.toLowerCase(),i.checked=r.checked,i.value=getInputValue(r),i.type!==CHECKBOX&&i.type!==RADIO||(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=BORDER_STYLE.SOLID,i.styles.backgroundClip=[BACKGROUND_CLIP.BORDER_BOX],i.styles.backgroundOrigin=[0],i.bounds=reformatInputBounds(i.bounds)),i.type){case CHECKBOX:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=CHECKBOX_BORDER_RADIUS;break;case RADIO:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=RADIO_BORDER_RADIUS}return i}return __extends(t,e),t}(ElementContainer),SelectElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this,s=r.options[r.selectedIndex||0];return i.value=s&&s.text||"",i}return __extends(t,e),t}(ElementContainer),TextareaElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.value=r.value,i}return __extends(t,e),t}(ElementContainer),IFrameElementContainer=function(e){function t(t,r){var i=e.call(this,t,r)||this;i.src=r.src,i.width=parseInt(r.width,10)||0,i.height=parseInt(r.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){i.tree=parseTree(t,r.contentWindow.document.documentElement);var s=r.contentWindow.document.documentElement?parseColor(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):COLORS.TRANSPARENT,A=r.contentWindow.document.body?parseColor(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):COLORS.TRANSPARENT;i.backgroundColor=isTransparent(s)?isTransparent(A)?i.styles.backgroundColor:A:s}}catch(e){}return i}return __extends(t,e),t}(ElementContainer),LIST_OWNERS=["OL","UL","MENU"],parseNodeTree=function(e,t,r,i){for(var s=t.firstChild,A=void 0;s;s=A)if(A=s.nextSibling,isTextNode(s)&&s.data.trim().length>0)r.textNodes.push(new TextContainer(e,s,r.styles));else if(isElementNode(s))if(isSlotElement(s)&&s.assignedNodes)s.assignedNodes().forEach((function(t){return parseNodeTree(e,t,r,i)}));else{var n=createContainer(e,s);n.styles.isVisible()&&(createsRealStackingContext(s,n,i)?n.flags|=4:createsStackingContext(n.styles)&&(n.flags|=2),-1!==LIST_OWNERS.indexOf(s.tagName)&&(n.flags|=8),r.elements.push(n),s.shadowRoot?parseNodeTree(e,s.shadowRoot,n,i):isTextareaElement(s)||isSVGElement(s)||isSelectElement(s)||parseNodeTree(e,s,n,i))}},createContainer=function(e,t){return isImageElement(t)?new ImageElementContainer(e,t):isCanvasElement(t)?new CanvasElementContainer(e,t):isSVGElement(t)?new SVGElementContainer(e,t):isLIElement(t)?new LIElementContainer(e,t):isOLElement(t)?new OLElementContainer(e,t):isInputElement(t)?new InputElementContainer(e,t):isSelectElement(t)?new SelectElementContainer(e,t):isTextareaElement(t)?new TextareaElementContainer(e,t):isIFrameElement(t)?new IFrameElementContainer(e,t):new ElementContainer(e,t)},parseTree=function(e,t){var r=createContainer(e,t);return r.flags|=4,parseNodeTree(e,t,r,r),r},createsRealStackingContext=function(e,t,r){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||isBodyElement(e)&&r.styles.isTransparent()},createsStackingContext=function(e){return e.isPositioned()||e.isFloating()},isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},isHTMLElementNode=function(e){return isElementNode(e)&&void 0!==e.style&&!isSVGElementNode(e)},isSVGElementNode=function(e){return"object"==typeof e.className},isLIElement=function(e){return"LI"===e.tagName},isOLElement=function(e){return"OL"===e.tagName},isInputElement=function(e){return"INPUT"===e.tagName},isHTMLElement=function(e){return"HTML"===e.tagName},isSVGElement=function(e){return"svg"===e.tagName},isBodyElement=function(e){return"BODY"===e.tagName},isCanvasElement=function(e){return"CANVAS"===e.tagName},isImageElement=function(e){return"IMG"===e.tagName},isIFrameElement=function(e){return"IFRAME"===e.tagName},isStyleElement=function(e){return"STYLE"===e.tagName},isScriptElement=function(e){return"SCRIPT"===e.tagName},isTextareaElement=function(e){return"TEXTAREA"===e.tagName},isSelectElement=function(e){return"SELECT"===e.tagName},isSlotElement=function(e){return"SLOT"===e.tagName},CounterState=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,r=e.counterIncrement,i=e.counterReset,s=!0;null!==r&&r.forEach((function(e){var r=t.counters[e.counter];r&&0!==e.increment&&(s=!1,r.length||r.push(1),r[Math.max(0,r.length-1)]+=e.increment)}));var A=[];return s&&i.forEach((function(e){var r=t.counters[e.counter];A.push(e.counter),r||(r=t.counters[e.counter]=[]),r.push(e.reset)})),A},e}(),ROMAN_UPPER={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},ARMENIAN={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},HEBREW={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},GEORGIAN={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},createAdditiveCounter=function(e,t,r,i,s,A){return e<t||e>r?createCounterText(e,s,A.length>0):i.integers.reduce((function(t,r,s){for(;e>=r;)e-=r,t+=i.values[s];return t}),"")+A},createCounterStyleWithSymbolResolver=function(e,t,r,i){var s="";do{r||e--,s=i(e)+s,e/=t}while(e*t>=t);return s},createCounterStyleFromRange=function(e,t,r,i,s){var A=r-t+1;return(e<0?"-":"")+(createCounterStyleWithSymbolResolver(Math.abs(e),A,i,(function(e){return fromCodePoint$1(Math.floor(e%A)+t)}))+s)},createCounterStyleFromSymbols=function(e,t,r){void 0===r&&(r=". ");var i=t.length;return createCounterStyleWithSymbolResolver(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+r},CJK_ZEROS=1,CJK_TEN_COEFFICIENTS=2,CJK_TEN_HIGH_COEFFICIENTS=4,CJK_HUNDRED_COEFFICIENTS=8,createCJKCounter=function(e,t,r,i,s,A){if(e<-9999||e>9999)return createCounterText(e,LIST_STYLE_TYPE.CJK_DECIMAL,s.length>0);var n=Math.abs(e),o=s;if(0===n)return t[0]+o;for(var a=0;n>0&&a<=4;a++){var l=n%10;0===l&&contains(A,CJK_ZEROS)&&""!==o?o=t[l]+o:l>1||1===l&&0===a||1===l&&1===a&&contains(A,CJK_TEN_COEFFICIENTS)||1===l&&1===a&&contains(A,CJK_TEN_HIGH_COEFFICIENTS)&&e>100||1===l&&a>1&&contains(A,CJK_HUNDRED_COEFFICIENTS)?o=t[l]+(a>0?r[a-1]:"")+o:1===l&&a>0&&(o=r[a-1]+o),n=Math.floor(n/10)}return(e<0?i:"")+o},CHINESE_INFORMAL_MULTIPLIERS="十百千萬",CHINESE_FORMAL_MULTIPLIERS="拾佰仟萬",JAPANESE_NEGATIVE="マイナス",KOREAN_NEGATIVE="마이너스",createCounterText=function(e,t,r){var i=r?". ":"",s=r?"、":"",A=r?", ":"",n=r?" ":"";switch(t){case LIST_STYLE_TYPE.DISC:return"•"+n;case LIST_STYLE_TYPE.CIRCLE:return"◦"+n;case LIST_STYLE_TYPE.SQUARE:return"◾"+n;case LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:var o=createCounterStyleFromRange(e,48,57,!0,i);return o.length<4?"0"+o:o;case LIST_STYLE_TYPE.CJK_DECIMAL:return createCounterStyleFromSymbols(e,"〇一二三四五六七八九",s);case LIST_STYLE_TYPE.LOWER_ROMAN:return createAdditiveCounter(e,1,3999,ROMAN_UPPER,LIST_STYLE_TYPE.DECIMAL,i).toLowerCase();case LIST_STYLE_TYPE.UPPER_ROMAN:return createAdditiveCounter(e,1,3999,ROMAN_UPPER,LIST_STYLE_TYPE.DECIMAL,i);case LIST_STYLE_TYPE.LOWER_GREEK:return createCounterStyleFromRange(e,945,969,!1,i);case LIST_STYLE_TYPE.LOWER_ALPHA:return createCounterStyleFromRange(e,97,122,!1,i);case LIST_STYLE_TYPE.UPPER_ALPHA:return createCounterStyleFromRange(e,65,90,!1,i);case LIST_STYLE_TYPE.ARABIC_INDIC:return createCounterStyleFromRange(e,1632,1641,!0,i);case LIST_STYLE_TYPE.ARMENIAN:case LIST_STYLE_TYPE.UPPER_ARMENIAN:return createAdditiveCounter(e,1,9999,ARMENIAN,LIST_STYLE_TYPE.DECIMAL,i);case LIST_STYLE_TYPE.LOWER_ARMENIAN:return createAdditiveCounter(e,1,9999,ARMENIAN,LIST_STYLE_TYPE.DECIMAL,i).toLowerCase();case LIST_STYLE_TYPE.BENGALI:return createCounterStyleFromRange(e,2534,2543,!0,i);case LIST_STYLE_TYPE.CAMBODIAN:case LIST_STYLE_TYPE.KHMER:return createCounterStyleFromRange(e,6112,6121,!0,i);case LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:return createCounterStyleFromSymbols(e,"子丑寅卯辰巳午未申酉戌亥",s);case LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:return createCounterStyleFromSymbols(e,"甲乙丙丁戊己庚辛壬癸",s);case LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:case LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:return createCJKCounter(e,"零一二三四五六七八九",CHINESE_INFORMAL_MULTIPLIERS,"負",s,CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS|CJK_HUNDRED_COEFFICIENTS);case LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:return createCJKCounter(e,"零壹貳參肆伍陸柒捌玖",CHINESE_FORMAL_MULTIPLIERS,"負",s,CJK_ZEROS|CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS|CJK_HUNDRED_COEFFICIENTS);case LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:return createCJKCounter(e,"零一二三四五六七八九",CHINESE_INFORMAL_MULTIPLIERS,"负",s,CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS|CJK_HUNDRED_COEFFICIENTS);case LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:return createCJKCounter(e,"零壹贰叁肆伍陆柒捌玖",CHINESE_FORMAL_MULTIPLIERS,"负",s,CJK_ZEROS|CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS|CJK_HUNDRED_COEFFICIENTS);case LIST_STYLE_TYPE.JAPANESE_INFORMAL:return createCJKCounter(e,"〇一二三四五六七八九","十百千万",JAPANESE_NEGATIVE,s,0);case LIST_STYLE_TYPE.JAPANESE_FORMAL:return createCJKCounter(e,"零壱弐参四伍六七八九","拾百千万",JAPANESE_NEGATIVE,s,CJK_ZEROS|CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS);case LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:return createCJKCounter(e,"영일이삼사오육칠팔구","십백천만",KOREAN_NEGATIVE,A,CJK_ZEROS|CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS);case LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:return createCJKCounter(e,"零一二三四五六七八九","十百千萬",KOREAN_NEGATIVE,A,0);case LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:return createCJKCounter(e,"零壹貳參四五六七八九","拾百千",KOREAN_NEGATIVE,A,CJK_ZEROS|CJK_TEN_COEFFICIENTS|CJK_TEN_HIGH_COEFFICIENTS);case LIST_STYLE_TYPE.DEVANAGARI:return createCounterStyleFromRange(e,2406,2415,!0,i);case LIST_STYLE_TYPE.GEORGIAN:return createAdditiveCounter(e,1,19999,GEORGIAN,LIST_STYLE_TYPE.DECIMAL,i);case LIST_STYLE_TYPE.GUJARATI:return createCounterStyleFromRange(e,2790,2799,!0,i);case LIST_STYLE_TYPE.GURMUKHI:return createCounterStyleFromRange(e,2662,2671,!0,i);case LIST_STYLE_TYPE.HEBREW:return createAdditiveCounter(e,1,10999,HEBREW,LIST_STYLE_TYPE.DECIMAL,i);case LIST_STYLE_TYPE.HIRAGANA:return createCounterStyleFromSymbols(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case LIST_STYLE_TYPE.HIRAGANA_IROHA:return createCounterStyleFromSymbols(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case LIST_STYLE_TYPE.KANNADA:return createCounterStyleFromRange(e,3302,3311,!0,i);case LIST_STYLE_TYPE.KATAKANA:return createCounterStyleFromSymbols(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case LIST_STYLE_TYPE.KATAKANA_IROHA:return createCounterStyleFromSymbols(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case LIST_STYLE_TYPE.LAO:return createCounterStyleFromRange(e,3792,3801,!0,i);case LIST_STYLE_TYPE.MONGOLIAN:return createCounterStyleFromRange(e,6160,6169,!0,i);case LIST_STYLE_TYPE.MYANMAR:return createCounterStyleFromRange(e,4160,4169,!0,i);case LIST_STYLE_TYPE.ORIYA:return createCounterStyleFromRange(e,2918,2927,!0,i);case LIST_STYLE_TYPE.PERSIAN:return createCounterStyleFromRange(e,1776,1785,!0,i);case LIST_STYLE_TYPE.TAMIL:return createCounterStyleFromRange(e,3046,3055,!0,i);case LIST_STYLE_TYPE.TELUGU:return createCounterStyleFromRange(e,3174,3183,!0,i);case LIST_STYLE_TYPE.THAI:return createCounterStyleFromRange(e,3664,3673,!0,i);case LIST_STYLE_TYPE.TIBETAN:return createCounterStyleFromRange(e,3872,3881,!0,i);case LIST_STYLE_TYPE.DECIMAL:default:return createCounterStyleFromRange(e,48,57,!0,i)}},IGNORE_ATTRIBUTE="data-html2canvas-ignore",DocumentCloner=function(){function e(e,t,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new CounterState,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement)}return e.prototype.toIFrame=function(e,t){var r=this,i=createIFrameContainer(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var s=e.defaultView.pageXOffset,A=e.defaultView.pageYOffset,n=i.contentWindow,o=n.document,a=iframeLoader(i).then((function(){return __awaiter(r,void 0,void 0,(function(){var e,r;return __generator(this,(function(s){switch(s.label){case 0:return this.scrolledElements.forEach(restoreNodeScroll),n&&(n.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===t.top&&n.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-t.left,n.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(r=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:o.fonts&&o.fonts.ready?[4,o.fonts.ready]:[3,2];case 1:s.sent(),s.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,imagesReady(o)]:[3,4];case 3:s.sent(),s.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(o,r)})).then((function(){return i}))]:[2,i]}}))}))}));return o.open(),o.write(serializeDoctype(document.doctype)+"<html></html>"),restoreOwnerScroll(this.referenceElement.ownerDocument,s,A),o.replaceChild(o.adoptNode(this.documentElement),o.documentElement),o.close(),a},e.prototype.createElementClone=function(e){if(isDebugging(e,2),isCanvasElement(e))return this.createCanvasClone(e);if(isStyleElement(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return isImageElement(t)&&(isImageElement(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=r,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var r=e.ownerDocument.createElement("img");try{return r.src=e.toDataURL(),r}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var s=e.getContext("2d"),A=i.getContext("2d");if(A)if(!this.options.allowTaint&&s)A.putImageData(s.getImageData(0,0,e.width,e.height),0,0);else{var n=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(n){var o=n.getContextAttributes();!1===(null==o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}A.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.cloneNode=function(e){if(isTextNode(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var t=e.ownerDocument.defaultView;if(t&&isElementNode(e)&&(isHTMLElementNode(e)||isSVGElementNode(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=t.getComputedStyle(e),s=t.getComputedStyle(e,":before"),A=t.getComputedStyle(e,":after");this.referenceElement===e&&isHTMLElementNode(r)&&(this.clonedReferenceElement=r),isBodyElement(r)&&createPseudoHideStyles(r);for(var n=this.counters.parse(new CSSParsedCounterDeclaration(this.context,i)),o=this.resolvePseudoContent(e,r,s,PseudoElementType.BEFORE),a=e.firstChild;a;a=a.nextSibling)isElementNode(a)&&(isScriptElement(a)||a.hasAttribute(IGNORE_ATTRIBUTE)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(a))||this.options.copyStyles&&isElementNode(a)&&isStyleElement(a)||r.appendChild(this.cloneNode(a));o&&r.insertBefore(o,r.firstChild);var l=this.resolvePseudoContent(e,r,A,PseudoElementType.AFTER);return l&&r.appendChild(l),this.counters.pop(n),i&&(this.options.copyStyles||isSVGElementNode(e))&&!isIFrameElement(e)&&copyCSSStyles(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(isTextareaElement(e)||isSelectElement(e))&&(isTextareaElement(r)||isSelectElement(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,r,i){var s=this;if(r){var A=r.content,n=t.ownerDocument;if(n&&A&&"none"!==A&&"-moz-alt-content"!==A&&"none"!==r.display){this.counters.parse(new CSSParsedCounterDeclaration(this.context,r));var o=new CSSParsedPseudoDeclaration(this.context,r),a=n.createElement("html2canvaspseudoelement");copyCSSStyles(r,a),o.content.forEach((function(t){if(0===t.type)a.appendChild(n.createTextNode(t.value));else if(22===t.type){var r=n.createElement("img");r.src=t.value,r.style.opacity="1",a.appendChild(r)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(isIdentToken);i.length&&a.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var A=t.values.filter(nonFunctionArgSeparator),l=A[0],h=A[1];if(l&&isIdentToken(l)){var c=s.counters.getCounterValue(l.value),u=h&&isIdentToken(h)?listStyleType.parse(s.context,h.value):LIST_STYLE_TYPE.DECIMAL;a.appendChild(n.createTextNode(createCounterText(c,u,!1)))}}else if("counters"===t.name){var d=t.values.filter(nonFunctionArgSeparator),p=(l=d[0],d[1]);h=d[2];if(l&&isIdentToken(l)){var g=s.counters.getCounterValues(l.value),_=h&&isIdentToken(h)?listStyleType.parse(s.context,h.value):LIST_STYLE_TYPE.DECIMAL,m=p&&0===p.type?p.value:"",f=g.map((function(e){return createCounterText(e,_,!1)})).join(m);a.appendChild(n.createTextNode(f))}}}else if(20===t.type)switch(t.value){case"open-quote":a.appendChild(n.createTextNode(getQuote(o.quotes,s.quoteDepth++,!0)));break;case"close-quote":a.appendChild(n.createTextNode(getQuote(o.quotes,--s.quoteDepth,!1)));break;default:a.appendChild(n.createTextNode(t.value))}})),a.className=PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER;var l=i===PseudoElementType.BEFORE?" "+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE:" "+PSEUDO_HIDE_ELEMENT_CLASS_AFTER;return isSVGElementNode(t)?t.className.baseValue+=l:t.className+=l,a}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(PseudoElementType||(PseudoElementType={}));var PathType,createIFrameContainer=function(e,t){var r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling="no",r.setAttribute(IGNORE_ATTRIBUTE,"true"),e.body.appendChild(r),r},imageReady=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},imagesReady=function(e){return Promise.all([].slice.call(e.images,0).map(imageReady))},iframeLoader=function(e){return new Promise((function(t,r){var i=e.contentWindow;if(!i)return r("No window assigned for iframe");var s=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var r=setInterval((function(){s.body.childNodes.length>0&&"complete"===s.readyState&&(clearInterval(r),t(e))}),50)}}))},ignoredStyleProperties=["all","d","content"],copyCSSStyles=function(e,t){for(var r=e.length-1;r>=0;r--){var i=e.item(r);-1===ignoredStyleProperties.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},serializeDoctype=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},restoreOwnerScroll=function(e,t,r){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||r!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,r)},restoreNodeScroll=function(e){var t=e[0],r=e[1],i=e[2];t.scrollLeft=r,t.scrollTop=i},PSEUDO_BEFORE=":before",PSEUDO_AFTER=":after",PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",PSEUDO_HIDE_ELEMENT_STYLE='{\n content: "" !important;\n display: none !important;\n}',createPseudoHideStyles=function(e){createStyles(e,"."+PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+PSEUDO_BEFORE+PSEUDO_HIDE_ELEMENT_STYLE+"\n ."+PSEUDO_HIDE_ELEMENT_CLASS_AFTER+PSEUDO_AFTER+PSEUDO_HIDE_ELEMENT_STYLE)},createStyles=function(e,t){var r=e.ownerDocument;if(r){var i=r.createElement("style");i.textContent=t,e.appendChild(i)}},CacheStorage=function(){function e(){}return e.getOrigin=function(t){var r=e._link;return r?(r.href=t,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Cache=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:isBlobImage(e)||isRenderable(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,s,A=this;return __generator(this,(function(n){switch(n.label){case 0:return t=CacheStorage.isSameOrigin(e),r=!isInlineImage(e)&&!0===this._options.useCORS&&FEATURES.SUPPORT_CORS_IMAGES&&!t,i=!isInlineImage(e)&&!t&&!isBlobImage(e)&&"string"==typeof this._options.proxy&&FEATURES.SUPPORT_CORS_XHR&&!r,t||!1!==this._options.allowTaint||isInlineImage(e)||isBlobImage(e)||i||r?(s=e,i?[4,this.proxy(s)]:[3,2]):[2];case 1:s=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(isInlineBase64Image(s)||r)&&(i.crossOrigin="anonymous"),i.src=s,!0===i.complete&&setTimeout((function(){return e(i)}),500),A._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+A._options.imageTimeout+"ms) loading image")}),A._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(s,A){var n=FEATURES.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===n)s(o.response);else{var e=new FileReader;e.addEventListener("load",(function(){return s(e.result)}),!1),e.addEventListener("error",(function(e){return A(e)}),!1),e.readAsDataURL(o.response)}else A("Failed to proxy resource "+i+" with status code "+o.status)},o.onerror=A;var a=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+a+"url="+encodeURIComponent(e)+"&responseType="+n),"text"!==n&&o instanceof XMLHttpRequest&&(o.responseType=n),t._options.imageTimeout){var l=t._options.imageTimeout;o.timeout=l,o.ontimeout=function(){return A("Timed out ("+l+"ms) proxying "+i)}}o.send()}))},e}(),INLINE_SVG=/^data:image\/svg\+xml/i,INLINE_BASE64=/^data:image\/.*;base64,/i,INLINE_IMG=/^data:image\/.*/i,isRenderable=function(e){return FEATURES.SUPPORT_SVG_DRAWING||!isSVG(e)},isInlineImage=function(e){return INLINE_IMG.test(e)},isInlineBase64Image=function(e){return INLINE_BASE64.test(e)},isBlobImage=function(e){return"blob"===e.substr(0,4)},isSVG=function(e){return"svg"===e.substr(-3).toLowerCase()||INLINE_SVG.test(e)};!function(e){e[e.VECTOR=0]="VECTOR",e[e.BEZIER_CURVE=1]="BEZIER_CURVE"}(PathType||(PathType={}));var CORNER,equalPath=function(e,t){return e.length===t.length&&e.some((function(e,r){return e===t[r]}))},transformPath=function(e,t,r,i,s){return e.map((function(e,A){switch(A){case 0:return e.add(t,r);case 1:return e.add(t+i,r);case 2:return e.add(t+i,r+s);case 3:return e.add(t,r+s)}return e}))},Vector=function(){function e(e,t){this.type=PathType.VECTOR,this.x=e,this.y=t}return e.prototype.add=function(t,r){return new e(this.x+t,this.y+r)},e}(),lerp=function(e,t,r){return new Vector(e.x+(t.x-e.x)*r,e.y+(t.y-e.y)*r)},BezierCurve=function(){function e(e,t,r,i){this.type=PathType.BEZIER_CURVE,this.start=e,this.startControl=t,this.endControl=r,this.end=i}return e.prototype.subdivide=function(t,r){var i=lerp(this.start,this.startControl,t),s=lerp(this.startControl,this.endControl,t),A=lerp(this.endControl,this.end,t),n=lerp(i,s,t),o=lerp(s,A,t),a=lerp(n,o,t);return r?new e(this.start,i,n,a):new e(a,o,A,this.end)},e.prototype.add=function(t,r){return new e(this.start.add(t,r),this.startControl.add(t,r),this.endControl.add(t,r),this.end.add(t,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),isBezierCurve=function(e){return e.type===PathType.BEZIER_CURVE},BoundCurves=function(e){var t=e.styles,r=e.bounds,i=getAbsoluteValueForTuple(t.borderTopLeftRadius,r.width,r.height),s=i[0],A=i[1],n=getAbsoluteValueForTuple(t.borderTopRightRadius,r.width,r.height),o=n[0],a=n[1],l=getAbsoluteValueForTuple(t.borderBottomRightRadius,r.width,r.height),h=l[0],c=l[1],u=getAbsoluteValueForTuple(t.borderBottomLeftRadius,r.width,r.height),d=u[0],p=u[1],g=[];g.push((s+o)/r.width),g.push((d+h)/r.width),g.push((A+p)/r.height),g.push((a+c)/r.height);var _=Math.max.apply(Math,g);_>1&&(s/=_,A/=_,o/=_,a/=_,h/=_,c/=_,d/=_,p/=_);var m=r.width-o,f=r.height-c,w=r.width-h,C=r.height-p,B=t.borderTopWidth,E=t.borderRightWidth,y=t.borderBottomWidth,S=t.borderLeftWidth,b=getAbsoluteValue(t.paddingTop,e.bounds.width),T=getAbsoluteValue(t.paddingRight,e.bounds.width),I=getAbsoluteValue(t.paddingBottom,e.bounds.width),P=getAbsoluteValue(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||A>0?getCurvePoints(r.left+S/3,r.top+B/3,s-S/3,A-B/3,CORNER.TOP_LEFT):new Vector(r.left+S/3,r.top+B/3),this.topRightBorderDoubleOuterBox=s>0||A>0?getCurvePoints(r.left+m,r.top+B/3,o-E/3,a-B/3,CORNER.TOP_RIGHT):new Vector(r.left+r.width-E/3,r.top+B/3),this.bottomRightBorderDoubleOuterBox=h>0||c>0?getCurvePoints(r.left+w,r.top+f,h-E/3,c-y/3,CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width-E/3,r.top+r.height-y/3),this.bottomLeftBorderDoubleOuterBox=d>0||p>0?getCurvePoints(r.left+S/3,r.top+C,d-S/3,p-y/3,CORNER.BOTTOM_LEFT):new Vector(r.left+S/3,r.top+r.height-y/3),this.topLeftBorderDoubleInnerBox=s>0||A>0?getCurvePoints(r.left+2*S/3,r.top+2*B/3,s-2*S/3,A-2*B/3,CORNER.TOP_LEFT):new Vector(r.left+2*S/3,r.top+2*B/3),this.topRightBorderDoubleInnerBox=s>0||A>0?getCurvePoints(r.left+m,r.top+2*B/3,o-2*E/3,a-2*B/3,CORNER.TOP_RIGHT):new Vector(r.left+r.width-2*E/3,r.top+2*B/3),this.bottomRightBorderDoubleInnerBox=h>0||c>0?getCurvePoints(r.left+w,r.top+f,h-2*E/3,c-2*y/3,CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width-2*E/3,r.top+r.height-2*y/3),this.bottomLeftBorderDoubleInnerBox=d>0||p>0?getCurvePoints(r.left+2*S/3,r.top+C,d-2*S/3,p-2*y/3,CORNER.BOTTOM_LEFT):new Vector(r.left+2*S/3,r.top+r.height-2*y/3),this.topLeftBorderStroke=s>0||A>0?getCurvePoints(r.left+S/2,r.top+B/2,s-S/2,A-B/2,CORNER.TOP_LEFT):new Vector(r.left+S/2,r.top+B/2),this.topRightBorderStroke=s>0||A>0?getCurvePoints(r.left+m,r.top+B/2,o-E/2,a-B/2,CORNER.TOP_RIGHT):new Vector(r.left+r.width-E/2,r.top+B/2),this.bottomRightBorderStroke=h>0||c>0?getCurvePoints(r.left+w,r.top+f,h-E/2,c-y/2,CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width-E/2,r.top+r.height-y/2),this.bottomLeftBorderStroke=d>0||p>0?getCurvePoints(r.left+S/2,r.top+C,d-S/2,p-y/2,CORNER.BOTTOM_LEFT):new Vector(r.left+S/2,r.top+r.height-y/2),this.topLeftBorderBox=s>0||A>0?getCurvePoints(r.left,r.top,s,A,CORNER.TOP_LEFT):new Vector(r.left,r.top),this.topRightBorderBox=o>0||a>0?getCurvePoints(r.left+m,r.top,o,a,CORNER.TOP_RIGHT):new Vector(r.left+r.width,r.top),this.bottomRightBorderBox=h>0||c>0?getCurvePoints(r.left+w,r.top+f,h,c,CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=d>0||p>0?getCurvePoints(r.left,r.top+C,d,p,CORNER.BOTTOM_LEFT):new Vector(r.left,r.top+r.height),this.topLeftPaddingBox=s>0||A>0?getCurvePoints(r.left+S,r.top+B,Math.max(0,s-S),Math.max(0,A-B),CORNER.TOP_LEFT):new Vector(r.left+S,r.top+B),this.topRightPaddingBox=o>0||a>0?getCurvePoints(r.left+Math.min(m,r.width-E),r.top+B,m>r.width+E?0:Math.max(0,o-E),Math.max(0,a-B),CORNER.TOP_RIGHT):new Vector(r.left+r.width-E,r.top+B),this.bottomRightPaddingBox=h>0||c>0?getCurvePoints(r.left+Math.min(w,r.width-S),r.top+Math.min(f,r.height-y),Math.max(0,h-E),Math.max(0,c-y),CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width-E,r.top+r.height-y),this.bottomLeftPaddingBox=d>0||p>0?getCurvePoints(r.left+S,r.top+Math.min(C,r.height-y),Math.max(0,d-S),Math.max(0,p-y),CORNER.BOTTOM_LEFT):new Vector(r.left+S,r.top+r.height-y),this.topLeftContentBox=s>0||A>0?getCurvePoints(r.left+S+P,r.top+B+b,Math.max(0,s-(S+P)),Math.max(0,A-(B+b)),CORNER.TOP_LEFT):new Vector(r.left+S+P,r.top+B+b),this.topRightContentBox=o>0||a>0?getCurvePoints(r.left+Math.min(m,r.width+S+P),r.top+B+b,m>r.width+S+P?0:o-S+P,a-(B+b),CORNER.TOP_RIGHT):new Vector(r.left+r.width-(E+T),r.top+B+b),this.bottomRightContentBox=h>0||c>0?getCurvePoints(r.left+Math.min(w,r.width-(S+P)),r.top+Math.min(f,r.height+B+b),Math.max(0,h-(E+T)),c-(y+I),CORNER.BOTTOM_RIGHT):new Vector(r.left+r.width-(E+T),r.top+r.height-(y+I)),this.bottomLeftContentBox=d>0||p>0?getCurvePoints(r.left+S+P,r.top+C,Math.max(0,d-(S+P)),p-(y+I),CORNER.BOTTOM_LEFT):new Vector(r.left+S+P,r.top+r.height-(y+I))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(CORNER||(CORNER={}));var getCurvePoints=function(e,t,r,i,s){var A=(Math.sqrt(2)-1)/3*4,n=r*A,o=i*A,a=e+r,l=t+i;switch(s){case CORNER.TOP_LEFT:return new BezierCurve(new Vector(e,l),new Vector(e,l-o),new Vector(a-n,t),new Vector(a,t));case CORNER.TOP_RIGHT:return new BezierCurve(new Vector(e,t),new Vector(e+n,t),new Vector(a,l-o),new Vector(a,l));case CORNER.BOTTOM_RIGHT:return new BezierCurve(new Vector(a,t),new Vector(a,t+o),new Vector(e+n,l),new Vector(e,l));case CORNER.BOTTOM_LEFT:default:return new BezierCurve(new Vector(a,l),new Vector(a-n,l),new Vector(e,t+o),new Vector(e,t))}},calculateBorderBoxPath=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},calculateContentBoxPath=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},calculatePaddingBoxPath=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},TransformEffect=function(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6},ClipEffect=function(e,t){this.path=e,this.target=t,this.type=1},OpacityEffect=function(e){this.opacity=e,this.type=2,this.target=6},isTransformEffect=function(e){return 0===e.type},isClipEffect=function(e){return 1===e.type},isOpacityEffect=function(e){return 2===e.type},StackingContext=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},ElementPaint=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new BoundCurves(this.container),this.container.styles.opacity<1&&this.effects.push(new OpacityEffect(this.container.styles.opacity)),null!==this.container.styles.transform){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new TransformEffect(r,i,s))}if(this.container.styles.overflowX!==OVERFLOW.VISIBLE){var A=calculateBorderBoxPath(this.curves),n=calculatePaddingBoxPath(this.curves);equalPath(A,n)?this.effects.push(new ClipEffect(A,6)):(this.effects.push(new ClipEffect(A,2)),this.effects.push(new ClipEffect(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[POSITION.ABSOLUTE,POSITION.FIXED].indexOf(this.container.styles.position),r=this.parent,i=this.effects.slice(0);r;){var s=r.effects.filter((function(e){return!isClipEffect(e)}));if(t||r.container.styles.position!==POSITION.STATIC||!r.parent){if(i.unshift.apply(i,s),t=-1===[POSITION.ABSOLUTE,POSITION.FIXED].indexOf(r.container.styles.position),r.container.styles.overflowX!==OVERFLOW.VISIBLE){var A=calculateBorderBoxPath(r.curves),n=calculatePaddingBoxPath(r.curves);equalPath(A,n)||i.unshift(new ClipEffect(n,6))}}else i.unshift.apply(i,s);r=r.parent}return i.filter((function(t){return contains(t.target,e)}))},e}(),parseStackTree=function(e,t,r,i){e.container.elements.forEach((function(s){var A=contains(s.flags,4),n=contains(s.flags,2),o=new ElementPaint(s,e);contains(s.styles.display,2048)&&i.push(o);var a=contains(s.flags,8)?[]:i;if(A||n){var l=A||s.styles.isPositioned()?r:t,h=new StackingContext(o);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var c=s.styles.zIndex.order;if(c<0){var u=0;l.negativeZIndex.some((function(e,t){return c>e.element.container.styles.zIndex.order?(u=t,!1):u>0})),l.negativeZIndex.splice(u,0,h)}else if(c>0){var d=0;l.positiveZIndex.some((function(e,t){return c>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),l.positiveZIndex.splice(d,0,h)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else s.styles.isFloating()?l.nonPositionedFloats.push(h):l.nonPositionedInlineLevel.push(h);parseStackTree(o,h,A?h:r,a)}else s.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),parseStackTree(o,t,r,a);contains(s.flags,8)&&processListItems(s,a)}))},processListItems=function(e,t){for(var r=e instanceof OLElementContainer?e.start:1,i=e instanceof OLElementContainer&&e.reversed,s=0;s<t.length;s++){var A=t[s];A.container instanceof LIElementContainer&&"number"==typeof A.container.value&&0!==A.container.value&&(r=A.container.value),A.listValue=createCounterText(r,A.container.styles.listStyleType,!0),r+=i?-1:1}},parseStackingContexts=function(e){var t=new ElementPaint(e,null),r=new StackingContext(t),i=[];return parseStackTree(t,r,r,i),processListItems(t.container,i),r},parsePathForBorder=function(e,t){switch(t){case 0:return createPathFromCurves(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return createPathFromCurves(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return createPathFromCurves(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return createPathFromCurves(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},parsePathForBorderDoubleOuter=function(e,t){switch(t){case 0:return createPathFromCurves(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return createPathFromCurves(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return createPathFromCurves(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return createPathFromCurves(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},parsePathForBorderDoubleInner=function(e,t){switch(t){case 0:return createPathFromCurves(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return createPathFromCurves(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return createPathFromCurves(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return createPathFromCurves(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},parsePathForBorderStroke=function(e,t){switch(t){case 0:return createStrokePathFromCurves(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return createStrokePathFromCurves(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return createStrokePathFromCurves(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return createStrokePathFromCurves(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},createStrokePathFromCurves=function(e,t){var r=[];return isBezierCurve(e)?r.push(e.subdivide(.5,!1)):r.push(e),isBezierCurve(t)?r.push(t.subdivide(.5,!0)):r.push(t),r},createPathFromCurves=function(e,t,r,i){var s=[];return isBezierCurve(e)?s.push(e.subdivide(.5,!1)):s.push(e),isBezierCurve(r)?s.push(r.subdivide(.5,!0)):s.push(r),isBezierCurve(i)?s.push(i.subdivide(.5,!0).reverse()):s.push(i),isBezierCurve(t)?s.push(t.subdivide(.5,!1).reverse()):s.push(t),s},paddingBox=function(e){var t=e.bounds,r=e.styles;return t.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},contentBox=function(e){var t=e.styles,r=e.bounds,i=getAbsoluteValue(t.paddingLeft,r.width),s=getAbsoluteValue(t.paddingRight,r.width),A=getAbsoluteValue(t.paddingTop,r.width),n=getAbsoluteValue(t.paddingBottom,r.width);return r.add(i+t.borderLeftWidth,A+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+i+s),-(t.borderTopWidth+t.borderBottomWidth+A+n))},calculateBackgroundPositioningArea=function(e,t){return 0===e?t.bounds:2===e?contentBox(t):paddingBox(t)},calculateBackgroundPaintingArea=function(e,t){return e===BACKGROUND_CLIP.BORDER_BOX?t.bounds:e===BACKGROUND_CLIP.CONTENT_BOX?contentBox(t):paddingBox(t)},calculateBackgroundRendering=function(e,t,r){var i=calculateBackgroundPositioningArea(getBackgroundValueForIndex(e.styles.backgroundOrigin,t),e),s=calculateBackgroundPaintingArea(getBackgroundValueForIndex(e.styles.backgroundClip,t),e),A=calculateBackgroundSize(getBackgroundValueForIndex(e.styles.backgroundSize,t),r,i),n=A[0],o=A[1],a=getAbsoluteValueForTuple(getBackgroundValueForIndex(e.styles.backgroundPosition,t),i.width-n,i.height-o);return[calculateBackgroundRepeatPath(getBackgroundValueForIndex(e.styles.backgroundRepeat,t),a,A,i,s),Math.round(i.left+a[0]),Math.round(i.top+a[1]),n,o]},isAuto=function(e){return isIdentToken(e)&&e.value===BACKGROUND_SIZE.AUTO},hasIntrinsicValue=function(e){return"number"==typeof e},calculateBackgroundSize=function(e,t,r){var i=t[0],s=t[1],A=t[2],n=e[0],o=e[1];if(!n)return[0,0];if(isLengthPercentage(n)&&o&&isLengthPercentage(o))return[getAbsoluteValue(n,r.width),getAbsoluteValue(o,r.height)];var a=hasIntrinsicValue(A);if(isIdentToken(n)&&(n.value===BACKGROUND_SIZE.CONTAIN||n.value===BACKGROUND_SIZE.COVER))return hasIntrinsicValue(A)?r.width/r.height<A!=(n.value===BACKGROUND_SIZE.COVER)?[r.width,r.width/A]:[r.height*A,r.height]:[r.width,r.height];var l=hasIntrinsicValue(i),h=hasIntrinsicValue(s),c=l||h;if(isAuto(n)&&(!o||isAuto(o)))return l&&h?[i,s]:a||c?c&&a?[l?i:s*A,h?s:i/A]:[l?i:r.width,h?s:r.height]:[r.width,r.height];if(a){var u=0,d=0;return isLengthPercentage(n)?u=getAbsoluteValue(n,r.width):isLengthPercentage(o)&&(d=getAbsoluteValue(o,r.height)),isAuto(n)?u=d*A:o&&!isAuto(o)||(d=u/A),[u,d]}var p=null,g=null;if(isLengthPercentage(n)?p=getAbsoluteValue(n,r.width):o&&isLengthPercentage(o)&&(g=getAbsoluteValue(o,r.height)),null===p||o&&!isAuto(o)||(g=l&&h?p/i*s:r.height),null!==g&&isAuto(n)&&(p=l&&h?g/s*i:r.width),null!==p&&null!==g)return[p,g];throw new Error("Unable to calculate background-size for element")},getBackgroundValueForIndex=function(e,t){var r=e[t];return void 0===r?e[0]:r},calculateBackgroundRepeatPath=function(e,t,r,i,s){var A=t[0],n=t[1],o=r[0],a=r[1];switch(e){case BACKGROUND_REPEAT.REPEAT_X:return[new Vector(Math.round(i.left),Math.round(i.top+n)),new Vector(Math.round(i.left+i.width),Math.round(i.top+n)),new Vector(Math.round(i.left+i.width),Math.round(a+i.top+n)),new Vector(Math.round(i.left),Math.round(a+i.top+n))];case BACKGROUND_REPEAT.REPEAT_Y:return[new Vector(Math.round(i.left+A),Math.round(i.top)),new Vector(Math.round(i.left+A+o),Math.round(i.top)),new Vector(Math.round(i.left+A+o),Math.round(i.height+i.top)),new Vector(Math.round(i.left+A),Math.round(i.height+i.top))];case BACKGROUND_REPEAT.NO_REPEAT:return[new Vector(Math.round(i.left+A),Math.round(i.top+n)),new Vector(Math.round(i.left+A+o),Math.round(i.top+n)),new Vector(Math.round(i.left+A+o),Math.round(i.top+n+a)),new Vector(Math.round(i.left+A),Math.round(i.top+n+a))];default:return[new Vector(Math.round(s.left),Math.round(s.top)),new Vector(Math.round(s.left+s.width),Math.round(s.top)),new Vector(Math.round(s.left+s.width),Math.round(s.height+s.top)),new Vector(Math.round(s.left),Math.round(s.height+s.top))]}},SMALL_IMAGE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",SAMPLE_TEXT="Hidden Text",FontMetrics=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),i=this._document.createElement("img"),s=this._document.createElement("span"),A=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",A.appendChild(r),i.src=SMALL_IMAGE,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(SAMPLE_TEXT)),r.appendChild(s),r.appendChild(i);var n=i.offsetTop-s.offsetTop+2;r.removeChild(s),r.appendChild(this._document.createTextNode(SAMPLE_TEXT)),r.style.lineHeight="normal",i.style.verticalAlign="super";var o=i.offsetTop-r.offsetTop+2;return A.removeChild(r),{baseline:n,middle:o}},e.prototype.getMetrics=function(e,t){var r=e+" "+t;return void 0===this._data[r]&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},e}(),Renderer=function(e,t){this.context=e,this.options=t},MASK_OFFSET=1e4,CanvasRenderer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i._activeEffects=[],i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),r.canvas||(i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px"),i.fontMetrics=new FontMetrics(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),i}return __extends(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},t.prototype.applyEffect=function(e){this.ctx.save(),isOpacityEffect(e)&&(this.ctx.globalAlpha=e.opacity),isTransformEffect(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),isClipEffect(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.renderNode=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return contains(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.renderTextWithLetterSpacing=function(e,t,r){var i=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r):splitGraphemes(e.text).reduce((function(t,s){return i.ctx.fillText(s,t,e.bounds.top+r),t+i.ctx.measureText(s).width}),e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),r=e.fontFamily.join(", "),i=isDimensionToken(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,i,r].join(" "),r,i]},t.prototype.renderTextNode=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,i,s,A,n,o,a,l,h=this;return __generator(this,(function(c){return r=this.createFontStyle(t),i=r[0],s=r[1],A=r[2],this.ctx.font=i,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",n=this.fontMetrics.getMetrics(s,A),o=n.baseline,a=n.middle,l=t.paintOrder,e.textBounds.forEach((function(e){l.forEach((function(r){switch(r){case PAINT_ORDER_LAYER.FILL:h.ctx.fillStyle=asString(t.color),h.renderTextWithLetterSpacing(e,t.letterSpacing,o);var i=t.textShadow;i.length&&e.text.trim().length&&(i.slice(0).reverse().forEach((function(r){h.ctx.shadowColor=asString(r.color),h.ctx.shadowOffsetX=r.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=r.offsetY.number*h.options.scale,h.ctx.shadowBlur=r.blur.number,h.renderTextWithLetterSpacing(e,t.letterSpacing,o)})),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),t.textDecorationLine.length&&(h.ctx.fillStyle=asString(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:h.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+o),e.bounds.width,1);break;case 2:h.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:h.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+a),e.bounds.width,1)}})));break;case PAINT_ORDER_LAYER.STROKE:t.webkitTextStrokeWidth&&e.text.trim().length&&(h.ctx.strokeStyle=asString(t.webkitTextStrokeColor),h.ctx.lineWidth=t.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+o)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter"}}))})),[2]}))}))},t.prototype.renderReplacedElement=function(e,t,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=contentBox(e),s=calculatePaddingBoxPath(t);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return __awaiter(this,void 0,void 0,(function(){var r,i,s,A,n,o,a,l,h,c,u,d,p,g,_,m,f,w;return __generator(this,(function(C){switch(C.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,i=e.curves,s=r.styles,A=0,n=r.textNodes,C.label=1;case 1:return A<n.length?(o=n[A],[4,this.renderTextNode(o,s)]):[3,4];case 2:C.sent(),C.label=3;case 3:return A++,[3,1];case 4:if(!(r instanceof ImageElementContainer))return[3,8];C.label=5;case 5:return C.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return _=C.sent(),this.renderReplacedElement(r,i,_),[3,8];case 7:return C.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof CanvasElementContainer&&this.renderReplacedElement(r,i,r.canvas),!(r instanceof SVGElementContainer))return[3,12];C.label=9;case 9:return C.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return _=C.sent(),this.renderReplacedElement(r,i,_),[3,12];case 11:return C.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof IFrameElementContainer&&r.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}).render(r.tree)]:[3,14];case 13:a=C.sent(),r.width&&r.height&&this.ctx.drawImage(a,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),C.label=14;case 14:if(r instanceof InputElementContainer&&(l=Math.min(r.bounds.width,r.bounds.height),r.type===CHECKBOX?r.checked&&(this.ctx.save(),this.path([new Vector(r.bounds.left+.39363*l,r.bounds.top+.79*l),new Vector(r.bounds.left+.16*l,r.bounds.top+.5549*l),new Vector(r.bounds.left+.27347*l,r.bounds.top+.44071*l),new Vector(r.bounds.left+.39694*l,r.bounds.top+.5649*l),new Vector(r.bounds.left+.72983*l,r.bounds.top+.23*l),new Vector(r.bounds.left+.84*l,r.bounds.top+.34085*l),new Vector(r.bounds.left+.39363*l,r.bounds.top+.79*l)]),this.ctx.fillStyle=asString(INPUT_COLOR),this.ctx.fill(),this.ctx.restore()):r.type===RADIO&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+l/2,r.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=asString(INPUT_COLOR),this.ctx.fill(),this.ctx.restore())),isTextInputElement(r)&&r.value.length){switch(h=this.createFontStyle(s),f=h[0],c=h[1],u=this.fontMetrics.getMetrics(f,c).baseline,this.ctx.font=f,this.ctx.fillStyle=asString(s.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=canvasTextAlign(r.styles.textAlign),w=contentBox(r),d=0,r.styles.textAlign){case TEXT_ALIGN.CENTER:d+=w.width/2;break;case TEXT_ALIGN.RIGHT:d+=w.width}p=w.add(d,0,0,-w.height/2+1),this.ctx.save(),this.path([new Vector(w.left,w.top),new Vector(w.left+w.width,w.top),new Vector(w.left+w.width,w.top+w.height),new Vector(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new TextBounds(r.value,p),s.letterSpacing,u),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!contains(r.styles.display,2048))return[3,20];if(null===r.styles.listStyleImage)return[3,19];if((g=r.styles.listStyleImage).type!==CSSImageType.URL)return[3,18];_=void 0,m=g.url,C.label=15;case 15:return C.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return _=C.sent(),this.ctx.drawImage(_,r.bounds.left-(_.width+10),r.bounds.top),[3,18];case 17:return C.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&r.styles.listStyleType!==LIST_STYLE_TYPE.NONE&&(f=this.createFontStyle(s)[0],this.ctx.font=f,this.ctx.fillStyle=asString(s.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new Bounds(r.bounds.left,r.bounds.top+getAbsoluteValue(r.styles.paddingTop,r.bounds.width),r.bounds.width,computeLineHeight(s.lineHeight,s.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new TextBounds(e.listValue,w),s.letterSpacing,computeLineHeight(s.lineHeight,s.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),C.label=20;case 20:return[2]}}))}))},t.prototype.renderStackContent=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,s,A,n,o,a,l,h,c,u,d,p,g;return __generator(this,(function(_){switch(_.label){case 0:return contains(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:_.sent(),t=0,r=e.negativeZIndex,_.label=2;case 2:return t<r.length?(g=r[t],[4,this.renderStack(g)]):[3,5];case 3:_.sent(),_.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:_.sent(),i=0,s=e.nonInlineLevel,_.label=7;case 7:return i<s.length?(g=s[i],[4,this.renderNode(g)]):[3,10];case 8:_.sent(),_.label=9;case 9:return i++,[3,7];case 10:A=0,n=e.nonPositionedFloats,_.label=11;case 11:return A<n.length?(g=n[A],[4,this.renderStack(g)]):[3,14];case 12:_.sent(),_.label=13;case 13:return A++,[3,11];case 14:o=0,a=e.nonPositionedInlineLevel,_.label=15;case 15:return o<a.length?(g=a[o],[4,this.renderStack(g)]):[3,18];case 16:_.sent(),_.label=17;case 17:return o++,[3,15];case 18:l=0,h=e.inlineLevel,_.label=19;case 19:return l<h.length?(g=h[l],[4,this.renderNode(g)]):[3,22];case 20:_.sent(),_.label=21;case 21:return l++,[3,19];case 22:c=0,u=e.zeroOrAutoZIndexOrTransformedOrOpacity,_.label=23;case 23:return c<u.length?(g=u[c],[4,this.renderStack(g)]):[3,26];case 24:_.sent(),_.label=25;case 25:return c++,[3,23];case 26:d=0,p=e.positiveZIndex,_.label=27;case 27:return d<p.length?(g=p[d],[4,this.renderStack(g)]):[3,30];case 28:_.sent(),_.label=29;case 29:return d++,[3,27];case 30:return[2]}}))}))},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach((function(e,r){var i=isBezierCurve(e)?e.start:e;0===r?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),isBezierCurve(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},t.prototype.renderRepeat=function(e,t,r,i){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},t.prototype.resizeImage=function(e,t,r){var i;if(e.width===t&&e.height===r)return e;var s=(null!==(i=this.canvas.ownerDocument)&&void 0!==i?i:document).createElement("canvas");return s.width=Math.max(1,t),s.height=Math.max(1,r),s.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,r),s},t.prototype.renderBackgroundImage=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,s,A,n;return __generator(this,(function(o){switch(o.label){case 0:t=e.styles.backgroundImage.length-1,r=function(r){var s,A,n,o,a,l,h,c,u,d,p,g,_,m,f,w,C,B,E,y,S,b,T,I,P,R,v,x,O,F,L;return __generator(this,(function(D){switch(D.label){case 0:if(r.type!==CSSImageType.URL)return[3,5];s=void 0,A=r.url,D.label=1;case 1:return D.trys.push([1,3,,4]),[4,i.context.cache.match(A)];case 2:return s=D.sent(),[3,4];case 3:return D.sent(),i.context.logger.error("Error loading background-image "+A),[3,4];case 4:return s&&(n=calculateBackgroundRendering(e,t,[s.width,s.height,s.width/s.height]),w=n[0],b=n[1],T=n[2],E=n[3],y=n[4],m=i.ctx.createPattern(i.resizeImage(s,E,y),"repeat"),i.renderRepeat(w,m,b,T)),[3,6];case 5:isLinearGradient(r)?(o=calculateBackgroundRendering(e,t,[null,null,null]),w=o[0],b=o[1],T=o[2],E=o[3],y=o[4],a=calculateGradientDirection(r.angle,E,y),l=a[0],h=a[1],c=a[2],u=a[3],d=a[4],(p=document.createElement("canvas")).width=E,p.height=y,g=p.getContext("2d"),_=g.createLinearGradient(h,u,c,d),processColorStops(r.stops,l).forEach((function(e){return _.addColorStop(e.stop,asString(e.color))})),g.fillStyle=_,g.fillRect(0,0,E,y),E>0&&y>0&&(m=i.ctx.createPattern(p,"repeat"),i.renderRepeat(w,m,b,T))):isRadialGradient(r)&&(f=calculateBackgroundRendering(e,t,[null,null,null]),w=f[0],C=f[1],B=f[2],E=f[3],y=f[4],S=0===r.position.length?[FIFTY_PERCENT]:r.position,b=getAbsoluteValue(S[0],E),T=getAbsoluteValue(S[S.length-1],y),I=calculateRadius(r,b,T,E,y),P=I[0],R=I[1],P>0&&R>0&&(v=i.ctx.createRadialGradient(C+b,B+T,0,C+b,B+T,P),processColorStops(r.stops,2*P).forEach((function(e){return v.addColorStop(e.stop,asString(e.color))})),i.path(w),i.ctx.fillStyle=v,P!==R?(x=e.bounds.left+.5*e.bounds.width,O=e.bounds.top+.5*e.bounds.height,L=1/(F=R/P),i.ctx.save(),i.ctx.translate(x,O),i.ctx.transform(1,0,0,F,0,0),i.ctx.translate(-x,-O),i.ctx.fillRect(C,L*(B-O)+O,E,y*L),i.ctx.restore()):i.ctx.fill())),D.label=6;case 6:return t--,[2]}}))},i=this,s=0,A=e.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return s<A.length?(n=A[s],[5,r(n)]):[3,4];case 2:o.sent(),o.label=3;case 3:return s++,[3,1];case 4:return[2]}}))}))},t.prototype.renderSolidBorder=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return this.path(parsePathForBorder(r,t)),this.ctx.fillStyle=asString(e),this.ctx.fill(),[2]}))}))},t.prototype.renderDoubleBorder=function(e,t,r,i){return __awaiter(this,void 0,void 0,(function(){var s,A;return __generator(this,(function(n){switch(n.label){case 0:return t<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return n.sent(),[2];case 2:return s=parsePathForBorderDoubleOuter(i,r),this.path(s),this.ctx.fillStyle=asString(e),this.ctx.fill(),A=parsePathForBorderDoubleInner(i,r),this.path(A),this.ctx.fill(),[2]}}))}))},t.prototype.renderNodeBackgroundAndBorders=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,i,s,A,n,o,a,l=this;return __generator(this,(function(h){switch(h.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,r=!isTransparent(t.backgroundColor)||t.backgroundImage.length,i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],s=calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(t.backgroundClip,0),e.curves),r||t.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),isTransparent(t.backgroundColor)||(this.ctx.fillStyle=asString(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){l.ctx.save();var r=calculateBorderBoxPath(e.curves),i=t.inset?0:MASK_OFFSET,s=transformPath(r,-i+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(l.path(r),l.ctx.clip(),l.mask(s)):(l.mask(r),l.ctx.clip(),l.path(s)),l.ctx.shadowOffsetX=t.offsetX.number+i,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=asString(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?asString(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()})),h.label=2;case 2:A=0,n=0,o=i,h.label=3;case 3:return n<o.length?(a=o[n]).style!==BORDER_STYLE.NONE&&!isTransparent(a.color)&&a.width>0?a.style!==BORDER_STYLE.DASHED?[3,5]:[4,this.renderDashedDottedBorder(a.color,a.width,A,e.curves,BORDER_STYLE.DASHED)]:[3,11]:[3,13];case 4:return h.sent(),[3,11];case 5:return a.style!==BORDER_STYLE.DOTTED?[3,7]:[4,this.renderDashedDottedBorder(a.color,a.width,A,e.curves,BORDER_STYLE.DOTTED)];case 6:return h.sent(),[3,11];case 7:return a.style!==BORDER_STYLE.DOUBLE?[3,9]:[4,this.renderDoubleBorder(a.color,a.width,A,e.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(a.color,A,e.curves)];case 10:h.sent(),h.label=11;case 11:A++,h.label=12;case 12:return n++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,r,i,s){return __awaiter(this,void 0,void 0,(function(){var A,n,o,a,l,h,c,u,d,p,g,_,m,f,w,C;return __generator(this,(function(B){return this.ctx.save(),A=parsePathForBorderStroke(i,r),n=parsePathForBorder(i,r),s===BORDER_STYLE.DASHED&&(this.path(n),this.ctx.clip()),isBezierCurve(n[0])?(o=n[0].start.x,a=n[0].start.y):(o=n[0].x,a=n[0].y),isBezierCurve(n[1])?(l=n[1].end.x,h=n[1].end.y):(l=n[1].x,h=n[1].y),c=0===r||2===r?Math.abs(o-l):Math.abs(a-h),this.ctx.beginPath(),s===BORDER_STYLE.DOTTED?this.formatPath(A):this.formatPath(n.slice(0,2)),u=t<3?3*t:2*t,d=t<3?2*t:t,s===BORDER_STYLE.DOTTED&&(u=t,d=t),p=!0,c<=2*u?p=!1:c<=2*u+d?(u*=g=c/(2*u+d),d*=g):(_=Math.floor((c+d)/(u+d)),m=(c-_*u)/(_-1),d=(f=(c-(_+1)*u)/_)<=0||Math.abs(d-m)<Math.abs(d-f)?m:f),p&&(s===BORDER_STYLE.DOTTED?this.ctx.setLineDash([0,u+d]):this.ctx.setLineDash([u,d])),s===BORDER_STYLE.DOTTED?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=asString(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===BORDER_STYLE.DASHED&&(isBezierCurve(n[0])&&(w=n[3],C=n[0],this.ctx.beginPath(),this.formatPath([new Vector(w.end.x,w.end.y),new Vector(C.start.x,C.start.y)]),this.ctx.stroke()),isBezierCurve(n[1])&&(w=n[1],C=n[2],this.ctx.beginPath(),this.formatPath([new Vector(w.end.x,w.end.y),new Vector(C.start.x,C.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},t.prototype.render=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=asString(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=parseStackingContexts(e),[4,this.renderStack(t)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}}))}))},t}(Renderer),isTextInputElement=function(e){return e instanceof TextareaElementContainer||(e instanceof SelectElementContainer||e instanceof InputElementContainer&&e.type!==RADIO&&e.type!==CHECKBOX)},calculateBackgroundCurvedPaintingArea=function(e,t){switch(e){case BACKGROUND_CLIP.BORDER_BOX:return calculateBorderBoxPath(t);case BACKGROUND_CLIP.CONTENT_BOX:return calculateContentBoxPath(t);case BACKGROUND_CLIP.PADDING_BOX:default:return calculatePaddingBoxPath(t)}},canvasTextAlign=function(e){switch(e){case TEXT_ALIGN.CENTER:return"center";case TEXT_ALIGN.RIGHT:return"right";case TEXT_ALIGN.LEFT:default:return"left"}},ForeignObjectRenderer=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.canvas=r.canvas?r.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=r,i.canvas.width=Math.floor(r.width*r.scale),i.canvas.height=Math.floor(r.height*r.scale),i.canvas.style.width=r.width+"px",i.canvas.style.height=r.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-r.x,-r.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),i}return __extends(t,e),t.prototype.render=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(i){switch(i.label){case 0:return t=createForeignObjectSVG(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,loadSerializedSVG(t)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=asString(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},t}(Renderer),loadSerializedSVG=function(e){return new Promise((function(t,r){var i=new Image;i.onload=function(){t(i)},i.onerror=r,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Logger=function(){function e(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,__spreadArray([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,__spreadArray([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,__spreadArray([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,__spreadArray([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),Context=function(){function e(t,r){var i;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new Logger({id:this.instanceName,enabled:t.logging}),this.cache=null!==(i=t.cache)&&void 0!==i?i:new Cache(this,t)}return e.instanceCount=1,e}(),html2canvas=function(e,t){return void 0===t&&(t={}),renderElement(e,t)};"undefined"!=typeof window&&CacheStorage.setContext(window);var renderElement=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,i,s,A,n,o,a,l,h,c,u,d,p,g,_,m,f,w,C,B,E,y,S,b,T,I,P,R,v,x,O,F,L,D,U,H,N,Q;return __generator(this,(function(M){switch(M.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(i=r.defaultView))throw new Error("Document is not attached to a Window");return s={allowTaint:null!==(y=t.allowTaint)&&void 0!==y&&y,imageTimeout:null!==(S=t.imageTimeout)&&void 0!==S?S:15e3,proxy:t.proxy,useCORS:null!==(b=t.useCORS)&&void 0!==b&&b},A=__assign({logging:null===(T=t.logging)||void 0===T||T,cache:t.cache},s),n={windowWidth:null!==(I=t.windowWidth)&&void 0!==I?I:i.innerWidth,windowHeight:null!==(P=t.windowHeight)&&void 0!==P?P:i.innerHeight,scrollX:null!==(R=t.scrollX)&&void 0!==R?R:i.pageXOffset,scrollY:null!==(v=t.scrollY)&&void 0!==v?v:i.pageYOffset},o=new Bounds(n.scrollX,n.scrollY,n.windowWidth,n.windowHeight),a=new Context(A,o),l=null!==(x=t.foreignObjectRendering)&&void 0!==x&&x,h={allowTaint:null!==(O=t.allowTaint)&&void 0!==O&&O,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),c=new DocumentCloner(a,e,h),(u=c.clonedReferenceElement)?[4,c.toIFrame(r,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=M.sent(),p=isBodyElement(u)||isHTMLElement(u)?parseDocumentSize(u.ownerDocument):parseBounds(a,u),g=p.width,_=p.height,m=p.left,f=p.top,w=parseBackgroundColor(a,u,t.backgroundColor),C={canvas:t.canvas,backgroundColor:w,scale:null!==(L=null!==(F=t.scale)&&void 0!==F?F:i.devicePixelRatio)&&void 0!==L?L:1,x:(null!==(D=t.x)&&void 0!==D?D:0)+m,y:(null!==(U=t.y)&&void 0!==U?U:0)+f,width:null!==(H=t.width)&&void 0!==H?H:Math.ceil(g),height:null!==(N=t.height)&&void 0!==N?N:Math.ceil(_)},l?(a.logger.debug("Document cloned, using foreign object rendering"),[4,new ForeignObjectRenderer(a,C).render(u)]):[3,3];case 2:return B=M.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+m+","+f+" with size "+g+"x"+_+" using computed rendering"),a.logger.debug("Starting DOM parsing"),E=parseTree(a,u),w===E.styles.backgroundColor&&(E.styles.backgroundColor=COLORS.TRANSPARENT),a.logger.debug("Starting renderer for element at "+C.x+","+C.y+" with size "+C.width+"x"+C.height),[4,new CanvasRenderer(a,C).render(E)];case 4:B=M.sent(),M.label=5;case 5:return(null===(Q=t.removeContainer)||void 0===Q||Q)&&(DocumentCloner.destroy(d)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,B]}}))}))},parseBackgroundColor=function(e,t,r){var i=t.ownerDocument,s=i.documentElement?parseColor(e,getComputedStyle(i.documentElement).backgroundColor):COLORS.TRANSPARENT,A=i.body?parseColor(e,getComputedStyle(i.body).backgroundColor):COLORS.TRANSPARENT,n="string"==typeof r?parseColor(e,r):null===r?COLORS.TRANSPARENT:4294967295;return t===i.documentElement?isTransparent(s)?isTransparent(A)?n:A:s:n},u8=Uint8Array,u16=Uint16Array,u32=Uint32Array,fleb=new u8([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fdeb=new u8([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),clim=new u8([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb=function(e,t){for(var r=new u16(31),i=0;i<31;++i)r[i]=t+=1<<e[i-1];var s=new u32(r[30]);for(i=1;i<30;++i)for(var A=r[i];A<r[i+1];++A)s[A]=A-r[i]<<5|i;return[r,s]},_a=freb(fleb,2),fl=_a[0],revfl=_a[1];fl[28]=258,revfl[258]=28;for(var _b=freb(fdeb,0),revfd=_b[1],rev=new u16(32768),i$1=0;i$1<32768;++i$1){var x=(43690&i$1)>>>1|(21845&i$1)<<1;x=(61680&(x=(52428&x)>>>2|(13107&x)<<2))>>>4|(3855&x)<<4,rev[i$1]=((65280&x)>>>8|(255&x)<<8)>>>1}var hMap=function(e,t,r){for(var i=e.length,s=0,A=new u16(t);s<i;++s)++A[e[s]-1];var n,o=new u16(t);for(s=0;s<t;++s)o[s]=o[s-1]+A[s-1]<<1;if(r){n=new u16(1<<t);var a=15-t;for(s=0;s<i;++s)if(e[s])for(var l=s<<4|e[s],h=t-e[s],c=o[e[s]-1]++<<h,u=c|(1<<h)-1;c<=u;++c)n[rev[c]>>>a]=l}else for(n=new u16(i),s=0;s<i;++s)e[s]&&(n[s]=rev[o[e[s]-1]++]>>>15-e[s]);return n},flt=new u8(288);for(i$1=0;i$1<144;++i$1)flt[i$1]=8;for(i$1=144;i$1<256;++i$1)flt[i$1]=9;for(i$1=256;i$1<280;++i$1)flt[i$1]=7;for(i$1=280;i$1<288;++i$1)flt[i$1]=8;var fdt=new u8(32);for(i$1=0;i$1<32;++i$1)fdt[i$1]=5;var flm=hMap(flt,9,0),fdm=hMap(fdt,5,0),shft=function(e){return(e+7)/8|0},slc=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var i=new(e instanceof u16?u16:e instanceof u32?u32:u8)(r-t);return i.set(e.subarray(t,r)),i},ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(e,t,r){var i=new Error(t||ec[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,err),!r)throw i;return i},wbits=function(e,t,r){r<<=7&t;var i=t/8|0;e[i]|=r,e[i+1]|=r>>>8},wbits16=function(e,t,r){r<<=7&t;var i=t/8|0;e[i]|=r,e[i+1]|=r>>>8,e[i+2]|=r>>>16},hTree=function(e,t){for(var r=[],i=0;i<e.length;++i)e[i]&&r.push({s:i,f:e[i]});var s=r.length,A=r.slice();if(!s)return[et,0];if(1==s){var n=new u8(r[0].s+1);return n[r[0].s]=1,[n,1]}r.sort((function(e,t){return e.f-t.f})),r.push({s:-1,f:25001});var o=r[0],a=r[1],l=0,h=1,c=2;for(r[0]={s:-1,f:o.f+a.f,l:o,r:a};h!=s-1;)o=r[r[l].f<r[c].f?l++:c++],a=r[l!=h&&r[l].f<r[c].f?l++:c++],r[h++]={s:-1,f:o.f+a.f,l:o,r:a};var u=A[0].s;for(i=1;i<s;++i)A[i].s>u&&(u=A[i].s);var d=new u16(u+1),p=ln(r[h-1],d,0);if(p>t){i=0;var g=0,_=p-t,m=1<<_;for(A.sort((function(e,t){return d[t.s]-d[e.s]||e.f-t.f}));i<s;++i){var f=A[i].s;if(!(d[f]>t))break;g+=m-(1<<p-d[f]),d[f]=t}for(g>>>=_;g>0;){var w=A[i].s;d[w]<t?g-=1<<t-d[w]++-1:++i}for(;i>=0&&g;--i){var C=A[i].s;d[C]==t&&(--d[C],++g)}p=t}return[new u8(d),p]},ln=function(e,t,r){return-1==e.s?Math.max(ln(e.l,t,r+1),ln(e.r,t,r+1)):t[e.s]=r},lc=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new u16(++t),i=0,s=e[0],A=1,n=function(e){r[i++]=e},o=1;o<=t;++o)if(e[o]==s&&o!=t)++A;else{if(!s&&A>2){for(;A>138;A-=138)n(32754);A>2&&(n(A>10?A-11<<5|28690:A-3<<5|12305),A=0)}else if(A>3){for(n(s),--A;A>6;A-=6)n(8304);A>2&&(n(A-3<<5|8208),A=0)}for(;A--;)n(s);A=1,s=e[o]}return[r.subarray(0,i),t]},clen=function(e,t){for(var r=0,i=0;i<t.length;++i)r+=e[i]*t[i];return r},wfblk=function(e,t,r){var i=r.length,s=shft(t+2);e[s]=255&i,e[s+1]=i>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var A=0;A<i;++A)e[s+A+4]=r[A];return 8*(s+4+i)},wblk=function(e,t,r,i,s,A,n,o,a,l,h){wbits(t,h++,r),++s[256];for(var c=hTree(s,15),u=c[0],d=c[1],p=hTree(A,15),g=p[0],_=p[1],m=lc(u),f=m[0],w=m[1],C=lc(g),B=C[0],E=C[1],y=new u16(19),S=0;S<f.length;++S)y[31&f[S]]++;for(S=0;S<B.length;++S)y[31&B[S]]++;for(var b=hTree(y,7),T=b[0],I=b[1],P=19;P>4&&!T[clim[P-1]];--P);var R,v,x,O,F=l+5<<3,L=clen(s,flt)+clen(A,fdt)+n,D=clen(s,u)+clen(A,g)+n+14+3*P+clen(y,T)+(2*y[16]+3*y[17]+7*y[18]);if(F<=L&&F<=D)return wfblk(t,h,e.subarray(a,a+l));if(wbits(t,h,1+(D<L)),h+=2,D<L){R=hMap(u,d,0),v=u,x=hMap(g,_,0),O=g;var U=hMap(T,I,0);wbits(t,h,w-257),wbits(t,h+5,E-1),wbits(t,h+10,P-4),h+=14;for(S=0;S<P;++S)wbits(t,h+3*S,T[clim[S]]);h+=3*P;for(var H=[f,B],N=0;N<2;++N){var Q=H[N];for(S=0;S<Q.length;++S){var M=31&Q[S];wbits(t,h,U[M]),h+=T[M],M>15&&(wbits(t,h,Q[S]>>>5&127),h+=Q[S]>>>12)}}}else R=flm,v=flt,x=fdm,O=fdt;for(S=0;S<o;++S)if(i[S]>255){M=i[S]>>>18&31;wbits16(t,h,R[M+257]),h+=v[M+257],M>7&&(wbits(t,h,i[S]>>>23&31),h+=fleb[M]);var k=31&i[S];wbits16(t,h,x[k]),h+=O[k],k>3&&(wbits16(t,h,i[S]>>>5&8191),h+=fdeb[k])}else wbits16(t,h,R[i[S]]),h+=v[i[S]];return wbits16(t,h,R[256]),h+v[256]},deo=new u32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et=new u8(0),dflt=function(e,t,r,i,s,A){var n=e.length,o=new u8(i+n+5*(1+Math.ceil(n/7e3))+s),a=o.subarray(i,o.length-s),l=0;if(!t||n<8)for(var h=0;h<=n;h+=65535){var c=h+65535;c<n?l=wfblk(a,l,e.subarray(h,c)):(a[h]=A,l=wfblk(a,l,e.subarray(h,n)))}else{for(var u=deo[t-1],d=u>>>13,p=8191&u,g=(1<<r)-1,_=new u16(32768),m=new u16(g+1),f=Math.ceil(r/3),w=2*f,C=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<w)&g},B=new u32(25e3),E=new u16(288),y=new u16(32),S=0,b=0,T=(h=0,0),I=0,P=0;h<n;++h){var R=C(h),v=32767&h,x=m[R];if(_[v]=x,m[R]=v,I<=h){var O=n-h;if((S>7e3||T>24576)&&O>423){l=wblk(e,a,0,B,E,y,b,T,P,h-P,l),T=S=b=0,P=h;for(var F=0;F<286;++F)E[F]=0;for(F=0;F<30;++F)y[F]=0}var L=2,D=0,U=p,H=v-x&32767;if(O>2&&R==C(h-H))for(var N=Math.min(d,O)-1,Q=Math.min(32767,h),M=Math.min(258,O);H<=Q&&--U&&v!=x;){if(e[h+L]==e[h+L-H]){for(var k=0;k<M&&e[h+k]==e[h+k-H];++k);if(k>L){if(L=k,D=H,k>N)break;var V=Math.min(H,k-2),G=0;for(F=0;F<V;++F){var K=h-H+F+32768&32767,W=K-_[K]+32768&32767;W>G&&(G=W,x=K)}}}H+=(v=x)-(x=_[v])+32768&32767}if(D){B[T++]=268435456|revfl[L]<<18|revfd[D];var $=31&revfl[L],z=31&revfd[D];b+=fleb[$]+fdeb[z],++E[257+$],++y[z],I=h+L,++S}else B[T++]=e[h],++E[e[h]]}}l=wblk(e,a,A,B,E,y,b,T,P,h-P,l),!A&&7&l&&(l=wfblk(a,l+1,et))}return slc(o,0,i+shft(l)+s)},crct=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,i=9;--i;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),crc=function(){var e=-1;return{p:function(t){for(var r=e,i=0;i<t.length;++i)r=crct[255&r^t[i]]^r>>>8;e=r},d:function(){return~e}}},dopt=function(e,t,r,i,s){return dflt(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,i,!s)},mrg=function(e,t){var r={};for(var i in e)r[i]=e[i];for(var i in t)r[i]=t[i];return r},wbytes=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function deflateSync(e,t){return dopt(e,t||{},0,0)}var fltn=function(e,t,r,i){for(var s in e){var A=e[s],n=t+s;A instanceof u8?r[n]=[A,i]:Array.isArray(A)?r[n]=[A[0],mrg(i,A[1])]:fltn(A,n+"/",r,i)}},te="undefined"!=typeof TextEncoder&&new TextEncoder,td="undefined"!=typeof TextDecoder&&new TextDecoder;try{td.decode(et,{stream:!0})}catch(e){}function strToU8(e,t){if(t){for(var r=new u8(e.length),i=0;i<e.length;++i)r[i]=e.charCodeAt(i);return r}if(te)return te.encode(e);var s=e.length,A=new u8(e.length+(e.length>>1)),n=0,o=function(e){A[n++]=e};for(i=0;i<s;++i){if(n+5>A.length){var a=new u8(n+8+(s-i<<1));a.set(A),A=a}var l=e.charCodeAt(i);l<128||t?o(l):l<2048?(o(192|l>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++i))>>18),o(128|l>>12&63),o(128|l>>6&63),o(128|63&l)):(o(224|l>>12),o(128|l>>6&63),o(128|63&l))}return slc(A,0,n)}var exfl=function(e){var t=0;if(e)for(var r in e){var i=e[r].length;i>65535&&err(9),t+=i+4}return t},wzh=function(e,t,r,i,s,A,n,o){var a=i.length,l=r.extra,h=o&&o.length,c=exfl(l);wbytes(e,t,null!=n?33639248:67324752),t+=4,null!=n&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(null==A&&8),e[t++]=s&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var u=new Date(null==r.mtime?Date.now():r.mtime),d=u.getFullYear()-1980;if((d<0||d>119)&&err(10),wbytes(e,t,d<<25|u.getMonth()+1<<21|u.getDate()<<16|u.getHours()<<11|u.getMinutes()<<5|u.getSeconds()>>>1),t+=4,null!=A&&(wbytes(e,t,r.crc),wbytes(e,t+4,A),wbytes(e,t+8,r.size)),wbytes(e,t+12,a),wbytes(e,t+14,c),t+=16,null!=n&&(wbytes(e,t,h),wbytes(e,t+6,r.attrs),wbytes(e,t+10,n),t+=14),e.set(i,t),t+=a,c)for(var p in l){var g=l[p],_=g.length;wbytes(e,t,+p),wbytes(e,t+2,_),e.set(g,t+4),t+=4+_}return h&&(e.set(o,t),t+=h),t},wzf=function(e,t,r,i,s){wbytes(e,t,101010256),wbytes(e,t+8,r),wbytes(e,t+10,r),wbytes(e,t+12,i),wbytes(e,t+16,s)};function zipSync(e,t){t||(t={});var r={},i=[];fltn(e,"",r,t);var s=0,A=0;for(var n in r){var o=r[n],a=o[0],l=o[1],h=0==l.level?0:8,c=(y=strToU8(n)).length,u=l.comment,d=u&&strToU8(u),p=d&&d.length,g=exfl(l.extra);c>65535&&err(11);var _=h?deflateSync(a,l):a,m=_.length,f=crc();f.p(a),i.push(mrg(l,{size:a.length,crc:f.d(),c:_,f:y,m:d,u:c!=n.length||d&&u.length!=p,o:s,compression:h})),s+=30+c+g+m,A+=76+2*(c+g)+(p||0)+m}for(var w=new u8(A+22),C=s,B=A-s,E=0;E<i.length;++E){var y=i[E];wzh(w,y.o,y,y.f,y.u,y.c.length);var S=30+y.f.length+exfl(y.extra);w.set(y.c,y.o+S),wzh(w,s,y,y.f,y.u,y.c.length,y.o,y.m),s+=16+S+(y.m?y.m.length:0)}return wzf(w,s,i.length,B,C),w}var download=createCommonjsModule((function(e,t){e.exports=function e(t,r,i){var s,A,n=window,o="application/octet-stream",a=i||o,l=t,h=!r&&!i&&l,c=document.createElement("a"),u=function(e){return String(e)},d=n.Blob||n.MozBlob||n.WebKitBlob||u,p=r||"download";if(d=d.call?d.bind(n):Blob,"true"===String(this)&&(a=(l=[l,a])[0],l=l[1]),h&&h.length<2048&&(p=h.split("/").pop().split("?")[0],c.href=h,-1!==c.href.indexOf(h))){var g=new XMLHttpRequest;return g.open("GET",h,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,p,o)},setTimeout((function(){g.send()}),0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(l)){if(!(l.length>2096103.424&&d!==u))return navigator.msSaveBlob?navigator.msSaveBlob(w(l),p):C(l);a=(l=w(l)).type||o}else if(/([\x80-\xff])/.test(l)){for(var _=0,m=new Uint8Array(l.length),f=m.length;_<f;++_)m[_]=l.charCodeAt(_);l=new d([m],{type:a})}function w(e){for(var t=e.split(/[:;,]/),r=t[1],i=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),s=i.length,A=0,n=new Uint8Array(s);A<s;++A)n[A]=i.charCodeAt(A);return new d([n],{type:r})}function C(e,t){if("download"in c)return c.href=e,c.setAttribute("download",p),c.className="download-js-link",c.innerHTML="downloading...",c.style.display="none",document.body.appendChild(c),setTimeout((function(){c.click(),document.body.removeChild(c),!0===t&&setTimeout((function(){n.URL.revokeObjectURL(c.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,o)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var r=document.createElement("iframe");document.body.appendChild(r),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,o)),r.src=e,setTimeout((function(){document.body.removeChild(r)}),333)}if(s=l instanceof d?l:new d([l],{type:a}),navigator.msSaveBlob)return navigator.msSaveBlob(s,p);if(n.URL)C(n.URL.createObjectURL(s),!0);else{if("string"==typeof s||s.constructor===u)try{return C("data:"+a+";base64,"+n.btoa(s))}catch(e){return C("data:"+a+","+encodeURIComponent(s))}(A=new FileReader).onload=function(e){C(this.result)},A.readAsDataURL(s)}return!0}})),es6Promise=createCommonjsModule((function(e,t){e.exports=function(){function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var r=void 0;r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var i=r,s=0,A=void 0,n=void 0,o=function(e,t){C[s]=e,C[s+1]=t,2===(s+=2)&&(n?n(B):y())};function a(e){n=e}function l(e){o=e}var h="undefined"!=typeof window?window:void 0,c=h||{},u=c.MutationObserver||c.WebKitMutationObserver,d="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function g(){return function(){return process.nextTick(B)}}function _(){return void 0!==A?function(){A(B)}:w()}function m(){var e=0,t=new u(B),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=B,function(){return e.port2.postMessage(0)}}function w(){var e=setTimeout;return function(){return e(B,1)}}var C=new Array(1e3);function B(){for(var e=0;e<s;e+=2)(0,C[e])(C[e+1]),C[e]=void 0,C[e+1]=void 0;s=0}function E(){try{var e=Function("return this")().require("vertx");return A=e.runOnLoop||e.runOnContext,_()}catch(e){return w()}}var y=void 0;function S(e,t){var r=this,i=new this.constructor(I);void 0===i[T]&&z(i);var s=r._state;if(s){var A=arguments[s-1];o((function(){return G(s,i,A,r._result)}))}else k(r,i,e,t);return i}function b(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(I);return H(r,e),r}y=d?g():u?m():p?f():void 0===h&&"function"==typeof commonjsRequire?E():w();var T=Math.random().toString(36).substring(2);function I(){}var P=void 0,R=1,v=2;function x(){return new TypeError("You cannot resolve a promise with itself")}function O(){return new TypeError("A promises callback cannot return that same promise.")}function F(e,t,r,i){try{e.call(t,r,i)}catch(e){return e}}function L(e,t,r){o((function(e){var i=!1,s=F(r,t,(function(r){i||(i=!0,t!==r?H(e,r):Q(e,r))}),(function(t){i||(i=!0,M(e,t))}));!i&&s&&(i=!0,M(e,s))}),e)}function D(e,t){t._state===R?Q(e,t._result):t._state===v?M(e,t._result):k(t,void 0,(function(t){return H(e,t)}),(function(t){return M(e,t)}))}function U(e,r,i){r.constructor===e.constructor&&i===S&&r.constructor.resolve===b?D(e,r):void 0===i?Q(e,r):t(i)?L(e,r,i):Q(e,r)}function H(t,r){if(t===r)M(t,x());else if(e(r)){var i=void 0;try{i=r.then}catch(e){return void M(t,e)}U(t,r,i)}else Q(t,r)}function N(e){e._onerror&&e._onerror(e._result),V(e)}function Q(e,t){e._state===P&&(e._result=t,e._state=R,0!==e._subscribers.length&&o(V,e))}function M(e,t){e._state===P&&(e._state=v,e._result=t,o(N,e))}function k(e,t,r,i){var s=e._subscribers,A=s.length;e._onerror=null,s[A]=t,s[A+R]=r,s[A+v]=i,0===A&&e._state&&o(V,e)}function V(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var i=void 0,s=void 0,A=e._result,n=0;n<t.length;n+=3)i=t[n],s=t[n+r],i?G(r,i,s,A):s(A);e._subscribers.length=0}}function G(e,r,i,s){var A=t(i),n=void 0,o=void 0,a=!0;if(A){try{n=i(s)}catch(e){a=!1,o=e}if(r===n)return void M(r,O())}else n=s;r._state!==P||(A&&a?H(r,n):!1===a?M(r,o):e===R?Q(r,n):e===v&&M(r,n))}function K(e,t){try{t((function(t){H(e,t)}),(function(t){M(e,t)}))}catch(t){M(e,t)}}var W=0;function $(){return W++}function z(e){e[T]=W++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Y(){return new Error("Array Methods must be provided an Array")}var X=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(I),this.promise[T]||z(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?Q(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&Q(this.promise,this._result))):M(this.promise,Y())}return e.prototype._enumerate=function(e){for(var t=0;this._state===P&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,i=r.resolve;if(i===b){var s=void 0,A=void 0,n=!1;try{s=e.then}catch(e){n=!0,A=e}if(s===S&&e._state!==P)this._settledAt(e._state,t,e._result);else if("function"!=typeof s)this._remaining--,this._result[t]=e;else if(r===te){var o=new r(I);n?M(o,A):U(o,e,s),this._willSettleAt(o,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(i(e),t)},e.prototype._settledAt=function(e,t,r){var i=this.promise;i._state===P&&(this._remaining--,e===v?M(i,r):this._result[t]=r),0===this._remaining&&Q(i,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,(function(e){return r._settledAt(R,t,e)}),(function(e){return r._settledAt(v,t,e)}))},e}();function J(e){return new X(this,e).promise}function j(e){var t=this;return i(e)?new t((function(r,i){for(var s=e.length,A=0;A<s;A++)t.resolve(e[A]).then(r,i)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Z(e){var t=new this(I);return M(t,e),t}function q(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[T]=$(),this._result=this._state=void 0,this._subscribers=[],I!==t&&("function"!=typeof t&&q(),this instanceof e?K(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var r=this,i=r.constructor;return t(e)?r.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):r.then(e,e)},e}();function re(){var e=void 0;if(void 0!==commonjsGlobal)e=commonjsGlobal;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=te}return te.prototype.then=S,te.all=J,te.race=j,te.resolve=b,te.reject=Z,te._setScheduler=a,te._setAsap=l,te._asap=o,te.polyfill=re,te.Promise=te,te}()}));const G3CODE_EOL=-1,G3CODE_INVALID=-2,EOL_CODES=[12,1,-1,9,1,-2,10,1,-2,11,1,-2,12,0,-2],WHITE_TERMS=[8,53,0,6,7,1,4,7,2,4,8,3,4,11,4,4,12,5,4,14,6,4,15,7,5,19,8,5,20,9,5,7,10,5,8,11,6,8,12,6,3,13,6,52,14,6,53,15,6,42,16,6,43,17,7,39,18,7,12,19,7,8,20,7,23,21,7,3,22,7,4,23,7,40,24,7,43,25,7,19,26,7,36,27,7,24,28,8,2,29,8,3,30,8,26,31,8,27,32,8,18,33,8,19,34,8,20,35,8,21,36,8,22,37,8,23,38,8,40,39,8,41,40,8,42,41,8,43,42,8,44,43,8,45,44,8,4,45,8,5,46,8,10,47,8,11,48,8,82,49,8,83,50,8,84,51,8,85,52,8,36,53,8,37,54,8,88,55,8,89,56,8,90,57,8,91,58,8,74,59,8,75,60,8,50,61,8,51,62,8,52,63],WHITE_MARKS=[5,27,64,5,18,128,6,23,192,7,55,256,8,54,320,8,55,384,8,100,448,8,101,512,8,104,576,8,103,640,9,204,704,9,205,768,9,210,832,9,211,896,9,212,960,9,213,1024,9,214,1088,9,215,1152,9,216,1216,9,217,1280,9,218,1344,9,219,1408,9,152,1472,9,153,1536,9,154,1600,6,24,1664,9,155,1728,11,8,1792,11,12,1856,11,13,1920,12,18,1984,12,19,2048,12,20,2112,12,21,2176,12,22,2240,12,23,2304,12,28,2368,12,29,2432,12,30,2496,12,31,2560],BLACK_TERMS=[10,55,0,3,2,1,2,3,2,2,2,3,3,3,4,4,3,5,4,2,6,5,3,7,6,5,8,6,4,9,7,4,10,7,5,11,7,7,12,8,4,13,8,7,14,9,24,15,10,23,16,10,24,17,10,8,18,11,103,19,11,104,20,11,108,21,11,55,22,11,40,23,11,23,24,11,24,25,12,202,26,12,203,27,12,204,28,12,205,29,12,104,30,12,105,31,12,106,32,12,107,33,12,210,34,12,211,35,12,212,36,12,213,37,12,214,38,12,215,39,12,108,40,12,109,41,12,218,42,12,219,43,12,84,44,12,85,45,12,86,46,12,87,47,12,100,48,12,101,49,12,82,50,12,83,51,12,36,52,12,55,53,12,56,54,12,39,55,12,40,56,12,88,57,12,89,58,12,43,59,12,44,60,12,90,61,12,102,62,12,103,63],BLACK_MARKS=[10,15,64,12,200,128,12,201,192,12,91,256,12,51,320,12,52,384,12,53,448,13,108,512,13,109,576,13,74,640,13,75,704,13,76,768,13,77,832,13,114,896,13,115,960,13,116,1024,13,117,1088,13,118,1152,13,119,1216,13,82,1280,13,83,1344,13,84,1408,13,85,1472,13,90,1536,13,91,1600,13,100,1664,13,101,1728,11,8,1792,11,12,1856,11,13,1920,12,18,1984,12,19,2048,12,20,2112,12,21,2176,12,22,2240,12,23,2304,12,28,2368,12,29,2432,12,30,2496,12,31,2560],createColorCode=function(e,t,r){return{codeLen:e,code:t,runLength:r}},buildColorCodes=function(e){const t=[];for(let r=0,i=e.length;r<i;r+=3)t.push({codeLen:e[r],code:e[r+1],runLength:e[r+2]});return t},TERMS=[buildColorCodes(WHITE_TERMS),buildColorCodes(BLACK_TERMS)],MARKS=[buildColorCodes(WHITE_MARKS),buildColorCodes(BLACK_MARKS)],EOLS=buildColorCodes(EOL_CODES),PASS_CODE=createColorCode(4,1,0),HORI_CODE=createColorCode(3,1,0),VERT_CODES=buildColorCodes([7,3,0,6,3,0,3,3,0,1,1,0,3,2,0,6,2,0,7,2,0]);var CCITTScheme;!function(e){e.GROUP_3="g3",e.GROUP_3_2D="g3-2d",e.GROUP_4="g4"}(CCITTScheme||(CCITTScheme={}));const WHITE=0,BLACK=1,MASK_1=[128,64,32,16,8,4,2,1],MASK_4=[240,15];class CCITTLine{constructor(e,t){if(1!==e&&4!==e&&8!==e)throw new Error("Invalid bps: "+e);this._bps=e,this._pixels=t,this._bytes=this.bytesOfPixels(t),this._dv=new DataView(new ArrayBuffer(this._bytes))}get byteLength(){return this._bytes}bytesOfPixels(e){return(e*this._bps+7)/8|0}prepare(e,t){for(let r=0;r<this._bytes;r++)this._dv.setUint8(r,e[t+r]);return this}clear(){for(let e=0;e<this._bytes;e++)this._dv.setUint8(e,0);return this}getRow(e){return new Uint8Array(this._dv.buffer.slice(0,this.bytesOfPixels(e)))}getByte(e){return this._dv.getUint8(e)}getBytes(e){return new Uint8Array(this._dv.buffer.slice(0,e))}getPixel(e){const t=e*this._bps,r=t/8|0,i=t%8,s=this._dv.getUint8(r);return 1===this._bps?s&MASK_1[i]:4===this._bps?s&MASK_4[i]:s}getBit(e){const t=e/8|0,r=e%8;return this._dv.getUint8(t)&MASK_1[r]?1:0}setBits(e,t,r){const i=r-1;let s=e/8|0,A=e%8,n=0;for(;n<r;)try{let e=this._dv.getUint8(s);for(;A<8&&n<r;){e&=255&~(1<<7-A),e|=(t&1<<i-n?1:0)<<7-A,n++,A++}this._dv.setUint8(s,e),s++,A=0}catch(e){}}setString(e,t){const r=t.length;let i=0;for(let e=0;e<r;e++){i+=("0"===t.charAt(e)?0:1)<<r-1-e}this.setBits(e,i,r)}getBits(e,t){const r=t-1;let i=e/8|0,s=e%8,A=0,n=0;for(;n<t;){const e=this._dv.getUint8(i);for(;s<8&&n<t;){A|=(e&MASK_1[s]?1:0)<<r-n,n++,s++}i++,s=0}return A}getSpan(e){const t=this._dv.byteLength;let r=e/8|0,i=e%8,s=this._dv.getUint8(r);const A=s&MASK_1[i++]?1:0;let n=1;for(;r<t;){for(;i<8;){if((s&MASK_1[i++]?1:0)!==A)return n;n++}r++,i=0,r<t&&(s=this._dv.getUint8(r))}return n}toString(){let e="";for(let t=0,r=this._dv.byteLength;t<r;t++){const r=this._dv.getUint8(t);for(let t=0;t<8;t++){e+=r&1<<7-t?1:0}}return e}}class CCITTEncoder{constructor(){}static encodePixcels(e,t){return t.scheme===CCITTScheme.GROUP_4?(console.log("TIFF G4 Encode",t.scheme),(new CCITTGroup4Encoder).encode(e,t)):(console.log("TIFF G3 Encode",t.scheme),(new CCITTGroup3Encoder).encode(e,t))}encode(e,t){return this._wPixels=t.columns,this._doEncode(e,t)}_encodeLine1D(e,t,r,i){let s=0,A=0,n=0,o=0;const a=EOLS[0];if(t.setBits(A,a.code,a.codeLen),A+=a.codeLen,i&&(t.setBits(A,1,1),A+=1),1===e.getBit(0)){const e=TERMS[0][0];t.setBits(A,e.code,e.codeLen),A+=e.codeLen,n=1}for(;s<r;){const r=e.getSpan(s);if(r<64){const e=TERMS[n][r];t.setBits(A,e.code,e.codeLen),A+=e.codeLen,o+=e.runLength}else if(r<2624){const e=MARKS[n][(r-64)/64|0];t.setBits(A,e.code,e.codeLen),A+=e.codeLen,o+=e.runLength;const i=TERMS[n][r%64];t.setBits(A,i.code,i.codeLen),A+=i.codeLen,o+=i.runLength}s+=r,n=1-n}return o!==r&&console.log(o),A}$_findDiff(e,t,r){let i=t;for(;i<this._wPixels;i++)if(e.getBit(i)!==r)return i;return i}$_setSpan(e,t,r,i){let s=0;if(r<64){const A=TERMS[i][r];e.setBits(t,A.code,A.codeLen),s+=A.codeLen}else if(r<2624){const A=MARKS[i][(r-64)/64|0];e.setBits(t,A.code,A.codeLen),t+=A.codeLen,s+=A.codeLen;const n=TERMS[i][r%64];e.setBits(t,n.code,n.codeLen),s+=n.codeLen}return s}_encodeLine2D(e,t,r,i){let s=0,A=0!==t.getBit(0)?0:this.$_findDiff(t,0,0),n=0!==e.getBit(0)?0:this.$_findDiff(e,0,0),o=0;for(;;){const a=n<i?this.$_findDiff(e,n,e.getBit(n)):i;if(a>=A){const e=n-A;if(e>=-3&&e<=3){const t=VERT_CODES[e+3];r.setBits(o,t.code,t.codeLen),o+=t.codeLen,s=A}else{const e=A<i?this.$_findDiff(t,A,t.getBit(A)):i;r.setBits(o,HORI_CODE.code,HORI_CODE.codeLen),o+=HORI_CODE.codeLen,s+A===0||0===t.getBit(s)?(o+=this.$_setSpan(r,o,A-s,0),o+=this.$_setSpan(r,o,e-A,1)):(o+=this.$_setSpan(r,o,A-s,1),o+=this.$_setSpan(r,o,e-A,0)),s=e}}else r.setBits(o,PASS_CODE.code,PASS_CODE.codeLen),o+=PASS_CODE.codeLen,s=a;if(s>=i)break;const l=t.getBit(s);A=this.$_findDiff(t,s,l),n=this.$_findDiff(e,s,1-l),n=this.$_findDiff(e,n,l)}return o}}class CCITTGroup3Encoder extends CCITTEncoder{_doEncode(e,t){const r=t.columns,i=t.height;return t.scheme===CCITTScheme.GROUP_3?this.$_encode1D(e,r,i):this.$_encode2D(e,r,i)}$_encode1D(e,t,r){const i=[],s=[],A=new CCITTLine(1,t),n=A.byteLength,o=new CCITTLine(1,4*t);for(let a=0;a<r;a++){const r=this._encodeLine1D(A.prepare(e,n*a),o.clear(),t,!1),l=o.bytesOfPixels(r);i.push(l),s.push(o.getBytes(l))}const a=s.map((e=>e.length)).reduce(((e,t)=>e+t),0),l=new Uint8Array(new ArrayBuffer(a));for(let e=0,t=0;e<r;e++)l.set(s[e],t),t+=i[e];return{counts:i,rows:l}}$_encode2D(e,t,r){const i=[],s=[],A=new CCITTLine(1,t),n=A.byteLength,o=new CCITTLine(1,4*t);for(let a=0;a<r;a++){const r=this._encodeLine1D(A.prepare(e,n*a),o.clear(),t,!0),l=o.bytesOfPixels(r);i.push(l),s.push(o.getBytes(l))}const a=s.map((e=>e.length)).reduce(((e,t)=>e+t),0),l=new Uint8Array(new ArrayBuffer(a));for(let e=0,t=0;e<r;e++)l.set(s[e],t),t+=i[e];return{counts:i,rows:l}}}class CCITTGroup4Encoder extends CCITTEncoder{_doEncode(e,t){const r=t.columns,i=t.height,s=[],A=[];let n=new CCITTLine(1,r).clear();const o=new CCITTLine(1,r),a=o.byteLength,l=new CCITTLine(1,4*r);for(let t=0;t<i;t++){const i=this._encodeLine2D(n,o.prepare(e,a*t),l.clear(),r),h=l.bytesOfPixels(i);s.push(h),A.push(l.getBytes(h))}const h=A.map((e=>e.length)).reduce(((e,t)=>e+t),0),c=new Uint8Array(new ArrayBuffer(h));for(let e=0,t=0;e<i;e++)c.set(A[e],t),t+=s[e];return{counts:s,rows:c}}}const T_SHORT=3,T_LONG=4,T_RATIONAL=5,COMPRESSION_T4=3,COMPRESSION_T6=4,WHITE_IS_ZERO=0,RES_INCH=2,IMG_START=500;class TFile{constructor(){this._curr=0}encode(e,t){const r=8+500*e.length+e.map((e=>Utils.toEven(8*e.encoded.counts.length+e.encoded.rows.length))).reduce(((e,t)=>e+t),0),i=new ArrayBuffer(r),s=this._dv=new DataView(i);return this.$_writeHeader(s),e.forEach(((e,r,i)=>this.$_writeIFD(e,t,r,i.length))),i}seek(e){this._curr=e}skip(e){this._curr+=e}set16(e){this._dv.setInt16(this._curr,e),this._curr+=2}setU16(e){this._dv.setUint16(this._curr,e),this._curr+=2}set32(e){this._dv.setInt32(this._curr,e),this._curr+=4}setU32(e){this._dv.setUint32(this._curr,e),this._curr+=4}setStr(e){for(let t=0,r=e.length;t<r;t++)this._dv.setUint8(this._curr++,255&e.charCodeAt(t));1&this._curr&&this._curr++}strLen(e){return Utils.toEven(e.length)}dateStr(e){function t(e){return e<10?"0"+e:String(e)}return e.getFullYear()+":"+t(e.getMonth()+1)+":"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())}$_writeHeader(e){this.set16(19789),this.set16(42),this.set32(8)}$_writeIFD(e,t,r,i){const s=r===i-1,A=e.width,n=e.height,o=t.encoding===CCITTScheme.GROUP_3_2D||t.encoding===CCITTScheme.GROUP_3?3:4,a=this._curr,l=e.encoded.counts,h=l.length,c=e.encoded.rows,u=s?0:Utils.toEven(a+500+8*l.length+c.length);this._entryCount=0,this._pointer=0,this._pointers=[],this.skip(2),this.$_addVal(256,3,1,A),this.$_addVal(257,3,1,n),this.$_addVal(259,3,1,o),this.$_addVal(262,3,1,0),this.$_addVal(266,3,1,1),this.$_addVal(273,4,h,a+500+4*h),this.$_addVal(277,3,1,1),this.$_addVal(278,3,1,1),this.$_addVal(279,4,h,a+500),this.$_addOff(282,5,1,8),this.$_addOff(283,5,1,8),this.$_addVal(292,4,1,1),this.$_addVal(296,3,1,2),this.set32(u),this.set32(t.dpi||204),this.set32(1),this.set32(t.dpi||196),this.set32(1);let d=a+2+12*this._entryCount+4;this._pointers.forEach((e=>{const t=this._dv.getUint32(e);this._dv.setUint32(e,d+t)}));const p=this._curr;this.seek(a),this.setU16(this._entryCount),this.seek(p),this.seek(a+500);for(let e=0;e<h;e++)this.setU32(l[e]);for(let e=0,t=this._curr+4*h;e<h;e++)this.setU32(t),t+=l[e];this._curr;new Uint8Array(this._dv.buffer).set(e.encoded.rows,this._curr),s||this.seek(u)}$_addVal(e,t,r,i){this.set16(e),this.set16(t),this.set32(r),3===t&&1===r?(this.set16(i),this.set16(0)):this.set32(i),this._entryCount++}$_addOff(e,t,r,i){this.set16(e),this.set16(t),this.set32(r),this._pointers.push(this._curr),this.set32(this._pointer),this._pointer+=i,this._entryCount++}}class TiffEncoder{constructor(){}encode(e,t){t.encoding=t.encoding||CCITTScheme.GROUP_4;const r=this.$_getImages(e,t.encoding),i=(new TFile).encode(r,t);return[new Uint8Array(i)]}$_getImages(e,t){const r=[];return e.forEach(((e,i)=>{const s=e.width,A=e.height,n=e.getContext("2d").getImageData(0,0,s,A).data,o=n.length,a=Math.floor((s+7)/8)*A,l=new Uint8Array(a),h=new DataView(l.buffer);let c=0,u=0;for(;c<o;){let e=0;for(;u<a&&c<o&&e<s;){let t=0;for(let r=0;r<8&&c<o&&e<s;r++,e++)if(n[c+3]>0){const e=n[c++],i=n[c++],s=n[c++];c++,t+=(255===e&&255===i&&255===s?0:1)<<7-r}else c+=4;h.setUint8(u++,t)}}l.length;const d=+new Date,p=CCITTEncoder.encodePixcels(l,{scheme:t,width:32*e.width,height:e.height,columns:e.width});console.log("Encoded",+new Date-d,"ms."),r.push({index:i,width:e.width,height:e.height,imageData:l,length:Utils.toEven(a),encoded:p})})),r}}function toInt(e){return~~e}var ncycles$1=100,netsize$1=256,maxnetpos$1=netsize$1-1,netbiasshift$1=4,intbiasshift$1=16,intbias$1=1<<intbiasshift$1,gammashift$1=10,betashift$1=10,beta$1=intbias$1>>betashift$1,betagamma$1=intbias$1<<gammashift$1-betashift$1,initrad$1=netsize$1>>3,radiusbiasshift$1=6,radiusbias$1=1<<radiusbiasshift$1,initradius$1=initrad$1*radiusbias$1,radiusdec$1=30,alphabiasshift$1=10,initalpha$1=1<<alphabiasshift$1,radbiasshift$1=8,radbias$1=1<<radbiasshift$1,alpharadbshift$1=alphabiasshift$1+radbiasshift$1,alpharadbias$1=1<<alpharadbshift$1,prime1$1=499,prime2$1=491,prime3$1=487,prime4$1=503,minpicturebytes$1=3*prime4$1;function NeuQuant$1(e,t){var r,i,s,A,n;function o(e,t,i,s,A){r[t][0]-=e*(r[t][0]-i)/initalpha$1,r[t][1]-=e*(r[t][1]-s)/initalpha$1,r[t][2]-=e*(r[t][2]-A)/initalpha$1}function a(e,t,i,s,A){for(var o,a,l=Math.abs(t-e),h=Math.min(t+e,netsize$1),c=t+1,u=t-1,d=1;c<h||u>l;)a=n[d++],c<h&&((o=r[c++])[0]-=a*(o[0]-i)/alpharadbias$1,o[1]-=a*(o[1]-s)/alpharadbias$1,o[2]-=a*(o[2]-A)/alpharadbias$1),u>l&&((o=r[u--])[0]-=a*(o[0]-i)/alpharadbias$1,o[1]-=a*(o[1]-s)/alpharadbias$1,o[2]-=a*(o[2]-A)/alpharadbias$1)}function l(e,t,i){const n=netsize$1/8;var o,a,l,h,c,u=~(1<<31),d=u,p=-1,g=p;for(o=0;o<n;o++)a=r[o],(l=Math.abs(a[0]-e)+Math.abs(a[1]-t)+Math.abs(a[2]-i))<u&&(u=l,p=o),(h=l-(s[o]>>intbiasshift$1-netbiasshift$1))<d&&(d=h,g=o),c=A[o]>>betashift$1,A[o]-=c,s[o]+=c<<gammashift$1;return A[p]+=beta$1,s[p]-=betagamma$1,g}this.buildColormap=function(){!function(){var e,t;for(r=[],i=[],s=[],A=[],n=[],e=0;e<netsize$1;e++)t=(e<<netbiasshift$1+8)/netsize$1,r[e]=[t,t,t],A[e]=intbias$1/netsize$1,s[e]=0}(),function(){var r,i,s,A,h,c,u=e.length,d=toInt(30+(t-1)/3),p=toInt(u/(3*t)),g=toInt(p/ncycles$1),_=initalpha$1,m=initradius$1,f=m>>radiusbiasshift$1;for(f<=1&&(f=0),r=0;r<f;r++)n[r]=toInt(_*((f*f-r*r)*radbias$1/(f*f)));u<minpicturebytes$1?(t=1,i=3):i=u%prime1$1!=0?3*prime1$1:u%prime2$1!=0?3*prime2$1:u%prime3$1!=0?3*prime3$1:3*prime4$1;var w=0;for(r=0;r<p;)if(o(_,c=l(s=(255&e[w])<<netbiasshift$1,A=(255&e[w+1])<<netbiasshift$1,h=(255&e[w+2])<<netbiasshift$1),s,A,h),0!==f&&a(f,c,s,A,h),(w+=i)>=u&&(w-=u),0===g&&(g=1),++r%g==0)for(_-=_/d,(f=(m-=m/radiusdec$1)>>radiusbiasshift$1)<=1&&(f=0),c=0;c<f;c++)n[c]=~~(_*((f*f-c*c)*radbias$1/(f*f)))}(),function(){for(var e=0;e<netsize$1;e++)r[e][0]>>=netbiasshift$1,r[e][1]>>=netbiasshift$1,r[e][2]>>=netbiasshift$1,r[e][3]=e}(),function(){var e,t,s,A,n,o,a=0,l=0;for(e=0;e<netsize$1;e++){for(n=e,o=(s=r[e])[1],t=e+1;t<netsize$1;t++)(A=r[t])[1]<o&&(n=t,o=A[1]);if(A=r[n],e!=n&&(t=A[0],A[0]=s[0],s[0]=t,t=A[1],A[1]=s[1],s[1]=t,t=A[2],A[2]=s[2],s[2]=t,t=A[3],A[3]=s[3],s[3]=t),o!=a){for(i[a]=l+e>>1,t=a+1;t<o;t++)i[t]=e;a=o,l=e}}for(i[a]=l+maxnetpos$1>>1,t=a+1;t<256;t++)i[t]=maxnetpos$1}()},this.getColormap=function(){for(var e=[],t=[],i=0;i<netsize$1;i++)t[r[i][3]]=i;for(var s=0,A=0;A<netsize$1;A++){var n=t[A];e[s++]=r[n][0],e[s++]=r[n][1],e[s++]=r[n][2]}return e},this.lookupRGB=function(e,t,s){for(var A,n,o,a=1e3,l=-1,h=i[t],c=h-1;h<netsize$1||c>=0;)h<netsize$1&&((o=(n=r[h])[1]-t)>=a?h=netsize$1:(h++,o<0&&(o=-o),(A=n[0]-e)<0&&(A=-A),(o+=A)<a&&((A=n[2]-s)<0&&(A=-A),(o+=A)<a&&(a=o,l=n[3])))),c>=0&&((o=t-(n=r[c])[1])>=a?c=-1:(c--,o<0&&(o=-o),(A=n[0]-e)<0&&(A=-A),(o+=A)<a&&((A=n[2]-s)<0&&(A=-A),(o+=A)<a&&(a=o,l=n[3]))));return l}}var NeuQuant_1=NeuQuant$1,ncycles=100,netsize=256,maxnetpos=netsize-1,netbiasshift=4,intbiasshift=16,intbias=1<<intbiasshift,gammashift=10,betashift=10,beta=intbias>>betashift,betagamma=intbias<<gammashift-betashift,initrad=netsize>>3,radiusbiasshift=6,radiusbias=1<<radiusbiasshift,initradius=initrad*radiusbias,radiusdec=30,alphabiasshift=10,initalpha=1<<alphabiasshift,radbiasshift=8,radbias=1<<radbiasshift,alpharadbshift=alphabiasshift+radbiasshift,alpharadbias=1<<alpharadbshift,prime1=499,prime2=491,prime3=487,prime4=503,minpicturebytes=3*prime4;function NeuQuant(e,t){var r,i,s,A,n;function o(e,t,i,s,A){r[t][0]-=e*(r[t][0]-i)/initalpha,r[t][1]-=e*(r[t][1]-s)/initalpha,r[t][2]-=e*(r[t][2]-A)/initalpha}function a(e,t,i,s,A){for(var o,a,l=Math.abs(t-e),h=Math.min(t+e,netsize),c=t+1,u=t-1,d=1;c<h||u>l;)a=n[d++],c<h&&((o=r[c++])[0]-=a*(o[0]-i)/alpharadbias,o[1]-=a*(o[1]-s)/alpharadbias,o[2]-=a*(o[2]-A)/alpharadbias),u>l&&((o=r[u--])[0]-=a*(o[0]-i)/alpharadbias,o[1]-=a*(o[1]-s)/alpharadbias,o[2]-=a*(o[2]-A)/alpharadbias)}function l(e,t,i){var n,o,a,l,h,c=~(1<<31),u=c,d=-1,p=d;for(n=0;n<netsize;n++)o=r[n],(a=Math.abs(o[0]-e)+Math.abs(o[1]-t)+Math.abs(o[2]-i))<c&&(c=a,d=n),(l=a-(s[n]>>intbiasshift-netbiasshift))<u&&(u=l,p=n),h=A[n]>>betashift,A[n]-=h,s[n]+=h<<gammashift;return A[d]+=beta,s[d]-=betagamma,p}this.buildColormap=function(){!function(){var e,t;for(r=[],i=new Int32Array(256),s=new Int32Array(netsize),A=new Int32Array(netsize),n=new Int32Array(netsize>>3),e=0;e<netsize;e++)t=(e<<netbiasshift+8)/netsize,r[e]=new Float64Array([t,t,t,0]),A[e]=intbias/netsize,s[e]=0}(),function(){var r,i,s,A,h,c,u=e.length,d=30+(t-1)/3,p=u/(3*t),g=~~(p/ncycles),_=initalpha,m=initradius,f=m>>radiusbiasshift;for(f<=1&&(f=0),r=0;r<f;r++)n[r]=_*((f*f-r*r)*radbias/(f*f));u<minpicturebytes?(t=1,i=3):i=u%prime1!=0?3*prime1:u%prime2!=0?3*prime2:u%prime3!=0?3*prime3:3*prime4;var w=0;for(r=0;r<p;)if(o(_,c=l(s=(255&e[w])<<netbiasshift,A=(255&e[w+1])<<netbiasshift,h=(255&e[w+2])<<netbiasshift),s,A,h),0!==f&&a(f,c,s,A,h),(w+=i)>=u&&(w-=u),0===g&&(g=1),++r%g==0)for(_-=_/d,(f=(m-=m/radiusdec)>>radiusbiasshift)<=1&&(f=0),c=0;c<f;c++)n[c]=_*((f*f-c*c)*radbias/(f*f))}(),function(){for(var e=0;e<netsize;e++)r[e][0]>>=netbiasshift,r[e][1]>>=netbiasshift,r[e][2]>>=netbiasshift,r[e][3]=e}(),function(){var e,t,s,A,n,o,a=0,l=0;for(e=0;e<netsize;e++){for(n=e,o=(s=r[e])[1],t=e+1;t<netsize;t++)(A=r[t])[1]<o&&(n=t,o=A[1]);if(A=r[n],e!=n&&(t=A[0],A[0]=s[0],s[0]=t,t=A[1],A[1]=s[1],s[1]=t,t=A[2],A[2]=s[2],s[2]=t,t=A[3],A[3]=s[3],s[3]=t),o!=a){for(i[a]=l+e>>1,t=a+1;t<o;t++)i[t]=e;a=o,l=e}}for(i[a]=l+maxnetpos>>1,t=a+1;t<256;t++)i[t]=maxnetpos}()},this.getColormap=function(){for(var e=[],t=[],i=0;i<netsize;i++)t[r[i][3]]=i;for(var s=0,A=0;A<netsize;A++){var n=t[A];e[s++]=r[n][0],e[s++]=r[n][1],e[s++]=r[n][2]}return e},this.lookupRGB=function(e,t,s){for(var A,n,o,a=1e3,l=-1,h=i[t],c=h-1;h<netsize||c>=0;)h<netsize&&((o=(n=r[h])[1]-t)>=a?h=netsize:(h++,o<0&&(o=-o),(A=n[0]-e)<0&&(A=-A),(o+=A)<a&&((A=n[2]-s)<0&&(A=-A),(o+=A)<a&&(a=o,l=n[3])))),c>=0&&((o=t-(n=r[c])[1])>=a?c=-1:(c--,o<0&&(o=-o),(A=n[0]-e)<0&&(A=-A),(o+=A)<a&&((A=n[2]-s)<0&&(A=-A),(o+=A)<a&&(a=o,l=n[3]))));return l}}var TypedNeuQuant=NeuQuant,EOF=-1,BITS=12,HSIZE=5003,masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(e,t,r,i){var s,A,n,o,a,l,h,c,u,d=Math.max(2,i),p=new Uint8Array(256),g=new Int32Array(HSIZE),_=new Int32Array(HSIZE),m=0,f=0,w=!1;function C(e,t){p[A++]=e,A>=254&&y(t)}function B(e){E(HSIZE),f=c+2,w=!0,T(c,e)}function E(e){for(var t=0;t<e;++t)g[t]=-1}function y(e){A>0&&(e.writeByte(A),e.writeBytes(p,0,A),A=0)}function S(e){return(1<<e)-1}function b(){return 0===o?EOF:(--o,255&r[a++])}function T(e,t){for(s&=masks[m],m>0?s|=e<<m:s=e,m+=l;m>=8;)C(255&s,t),s>>=8,m-=8;if((f>n||w)&&(w?(n=S(l=h),w=!1):(++l,n=l==BITS?1<<BITS:S(l))),e==u){for(;m>0;)C(255&s,t),s>>=8,m-=8;y(t)}}this.encode=function(r){r.writeByte(d),o=e*t,a=0,function(e,t){var r,i,s,o,a,d,p;for(w=!1,n=S(l=h=e),u=1+(c=1<<e-1),f=c+2,A=0,o=b(),p=0,r=HSIZE;r<65536;r*=2)++p;p=8-p,E(d=HSIZE),T(c,t);e:for(;(i=b())!=EOF;)if(r=(i<<BITS)+o,g[s=i<<p^o]!==r){if(g[s]>=0){a=d-s,0===s&&(a=1);do{if((s-=a)<0&&(s+=d),g[s]===r){o=_[s];continue e}}while(g[s]>=0)}T(o,t),o=i,f<1<<BITS?(_[s]=f++,g[s]=r):B(t)}else o=_[s];T(o,t),T(u,t)}(d+1,r),r.writeByte(0)}}var LZWEncoder_1=LZWEncoder;function ByteArray(){this.page=-1,this.pages=[],this.newPage()}ByteArray.pageSize=4096,ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);function GIFEncoder(e,t){this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new ByteArray}ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize),this.cursor=0},ByteArray.prototype.getData=function(){for(var e="",t=0;t<this.pages.length;t++)for(var r=0;r<ByteArray.pageSize;r++)e+=ByteArray.charMap[this.pages[t][r]];return e},ByteArray.prototype.writeByte=function(e){this.cursor>=ByteArray.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=e},ByteArray.prototype.writeUTFBytes=function(e){for(var t=e.length,r=0;r<t;r++)this.writeByte(e.charCodeAt(r))},ByteArray.prototype.writeBytes=function(e,t,r){for(var i=r||e.length,s=t||0;s<i;s++)this.writeByte(e[s])},GIFEncoder.prototype.setDelay=function(e){this.delay=Math.round(e/10)},GIFEncoder.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},GIFEncoder.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},GIFEncoder.prototype.setRepeat=function(e){this.repeat=e},GIFEncoder.prototype.setTransparent=function(e){this.transparent=e},GIFEncoder.prototype.addFrame=function(e){this.image=e,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels();let t=+new Date;this.analyzePixels(),console.log("analyzed",+new Date-t,"ms"),!0===this.globalPalette&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.globalPalette||this.writePalette(),t=+new Date,this.writePixels(),console.log("encoded",+new Date-t,"ms"),this.firstFrame=!1},GIFEncoder.prototype.finish=function(){this.out.writeByte(59)},GIFEncoder.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},GIFEncoder.prototype.setDither=function(e){!0===e&&(e="FloydSteinberg"),this.dither=e},GIFEncoder.prototype.setGlobalPalette=function(e){this.globalPalette=e},GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},GIFEncoder.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new NeuQuant_1(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},GIFEncoder.prototype.indexPixels=function(e){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var r=0,i=0;i<t;i++){var s=this.findClosestRGB(255&this.pixels[r++],255&this.pixels[r++],255&this.pixels[r++]);this.usedEntry[s]=!0,this.indexedPixels[i]=s}},GIFEncoder.prototype.ditherPixels=function(e,t){var r={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!e||!r[e])throw"Unknown dithering kernel: "+e;var i=r[e],s=0,A=this.height,n=this.width,o=this.pixels,a=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var l=0;l<A;l++){t&&(a*=-1);for(var h=1==a?0:n-1,c=1==a?n:0;h!==c;h+=a){var u=3*(s=l*n+h),d=o[u],p=o[u+1],g=o[u+2];u=this.findClosestRGB(d,p,g),this.usedEntry[u]=!0,this.indexedPixels[s]=u,u*=3;for(var _=d-this.colorTab[u],m=p-this.colorTab[u+1],f=g-this.colorTab[u+2],w=1==a?0:i.length-1,C=1==a?i.length:0;w!==C;w+=a){var B=i[w][1],E=i[w][2];if(B+h>=0&&B+h<n&&E+l>=0&&E+l<A){var y=i[w][0];u=s+B+E*n,o[u*=3]=Math.max(0,Math.min(255,o[u]+_*y)),o[u+1]=Math.max(0,Math.min(255,o[u+1]+m*y)),o[u+2]=Math.max(0,Math.min(255,o[u+2]+f*y))}}}}},GIFEncoder.prototype.findClosest=function(e,t){return this.findClosestRGB((16711680&e)>>16,(65280&e)>>8,255&e,t)},GIFEncoder.prototype.findClosestRGB=function(e,t,r,i){if(null===this.colorTab)return-1;if(this.neuQuant&&!i)return this.neuQuant.lookupRGB(e,t,r);for(var s=0,A=16777216,n=this.colorTab.length,o=0,a=0;o<n;a++){var l=e-(255&this.colorTab[o++]),h=t-(255&this.colorTab[o++]),c=r-(255&this.colorTab[o++]),u=l*l+h*h+c*c;(!i||this.usedEntry[a])&&u<A&&(A=u,s=a)}return s},GIFEncoder.prototype.getImagePixels=function(){var e=this.width,t=this.height;this.pixels=new Uint8Array(e*t*3);for(var r=this.image,i=0,s=0,A=0;A<t;A++)for(var n=0;n<e;n++)this.pixels[s++]=r[i++],this.pixels[s++]=r[i++],this.pixels[s++]=r[i++],i++},GIFEncoder.prototype.writeGraphicCtrlExt=function(){var e,t;this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4),null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&dispose),t<<=2,this.out.writeByte(0|t|e),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.out.writeByte(0)},GIFEncoder.prototype.writeShort=function(e){this.out.writeByte(255&e),this.out.writeByte(e>>8&255)},GIFEncoder.prototype.writePixels=function(){new LZWEncoder_1(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},GIFEncoder.prototype.stream=function(){return this.out};var GIFEncoder_1=GIFEncoder,gif={NeuQuant:NeuQuant_1,TypedNeuQuant:TypedNeuQuant,GIFEncoder:GIFEncoder_1,LZWEncoder:LZWEncoder_1};class ImageExporter extends Base{constructor(){super()}_doDispose(){super._doDispose()}export(e,t,r,i){function s(e,t){i?i(e,t):download(e,t)}console.log("export to image",r);const A=r.type||"png",n=r.fileName||"realreport",o=(r.zipName||"realreport")+".zip";if("tiff"===A||"tif"===A){const e=[],i=[];for(let r=0;r<t.length;r++){const s=t[r].page,A={onclone:e=>{const t=e.body.getElementsByClassName("rr-print-page");for(let e of t)e.style.boxShadow="unset";const r=e.body.getElementsByClassName("rr-group-element");for(let e of r){const t=getComputedStyle(e).backgroundColor;t&&"rgba(0, 0, 0, 0)"!==t&&"rgba(0,0,0,0)"!==t&&(e.style.backgroundColor="#fff",e.style.backgroundImage="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Crect x='3.5' y='3.5' width='0.5' height='0.5' fill='%23000'/%3E%3C/svg%3E\")")}}},n=function(t,r){return new es6Promise.Promise(((i,s)=>{html2canvas(r,A).then((r=>{e.push(r),i(t)}))}))}(r,s);i.push(n)}es6Promise.Promise.all(i).then((()=>{const t=(new TiffEncoder).encode(e,r.tiff||{}),i={};t.forEach(((e,t)=>{i[n+"."+A]=[e,{}]}));s(zipSync(i),o)})).catch((e=>{console.error(e),alert(e)}))}else if("gif"===A){const e={},r=[],i={onclone:e=>{const t=e.body.getElementsByClassName("rr-print-page");for(let e of t)e.style.boxShadow="unset"}};for(let s=0;s<t.length;s++){const o=function(r,s){return new es6Promise.Promise(((o,a)=>{html2canvas(s,i).then((i=>{const s=i.getContext("2d").getImageData(0,0,i.width,i.height).data,a=new gif.GIFEncoder(i.width,i.height);a.writeHeader(),a.addFrame(s),a.finish();const l=a.out,h=l.pages;let c=0;for(let e=0;e<h.length-1;e++)c+=h[e].length;c+=l.cursor;const u=new Uint8Array(c);h[h.length-1]=h[h.length-1].subarray(0,l.cursor);for(let e=0,t=0;e<h.length;e++)u.set(h[e],t),t+=h[e].length;const d=n+(t.length>1?r+1:"");e[d+"."+A]=[u,{}],o(r)}))}))}(s,t[s].page);r.push(o)}es6Promise.Promise.all(r).then((()=>{s(zipSync(e),o)}))}else{const e={png:"",jpg:"image/jpeg",jpeg:"image/jpeg"},r={},i=[],a={onclone:e=>{const t=e.body.getElementsByClassName("rr-print-page");for(let e of t)e.style.boxShadow="unset"}};for(let s=0;s<t.length;s++){const o=function(i,s){return new es6Promise.Promise(((o,l)=>{html2canvas(s,a).then((s=>{const a=s.toDataURL(e[A]),l=Utils.dataUriToBinary(a),h=n+(t.length>1?i+1:"");r[h+"."+A]=[l,{}],o(i)}))}))}(s,t[s].page);i.push(o)}es6Promise.Promise.all(i).then((()=>{s(zipSync(r),o)}))}}}var build=createCommonjsModule((function(e,t){e.exports=(()=>{var e={742:(e,t)=>{t.byteLength=function(e){var t=a(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,A=a(e),n=A[0],o=A[1],l=new s(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),h=0,c=o>0?n-4:n;for(r=0;r<c;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[h++]=t>>16&255,l[h++]=t>>8&255,l[h++]=255&t;return 2===o&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[h++]=255&t),1===o&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[h++]=t>>8&255,l[h++]=255&t),l},t.fromByteArray=function(e){for(var t,i=e.length,s=i%3,A=[],n=16383,o=0,a=i-s;o<a;o+=n)A.push(l(e,o,o+n>a?a:o+n));return 1===s?(t=e[i-1],A.push(r[t>>2]+r[t<<4&63]+"==")):2===s&&(t=(e[i-2]<<8)+e[i-1],A.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),A.join("")};for(var r=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=A.length;n<o;++n)r[n]=A[n],i[A.charCodeAt(n)]=n;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,i){for(var s,A,n=[],o=t;o<i;o+=3)s=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(r[(A=s)>>18&63]+r[A>>12&63]+r[A>>6&63]+r[63&A]);return n.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},764:(e,t,r)=>{const i=r(742),s=r(645),A="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50;const n=2147483647;function o(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let i=o(r);const s=i.write(e,t);return s!==r&&(i=i.slice(0,s)),i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return a.from(i,t,r);const s=function(e){if(a.isBuffer(e)){const t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?o(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return h(e),o(e<0?0:0|p(e))}function u(e){const t=e.length<0?0:0|p(e.length),r=o(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(i,a.prototype),i}function p(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function g(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let s=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(s)return i?-1:$(e).length;t=(""+t).toLowerCase(),s=!0}}function _(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return v(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return b(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function f(e,t,r,i,s){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:w(e,t,r,i,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,i,s);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,i,s){let A,n=1,o=e.length,a=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;n=2,o/=2,a/=2,r/=2}function l(e,t){return 1===n?e[t]:e.readUInt16BE(t*n)}if(s){let i=-1;for(A=r;A<o;A++)if(l(e,A)===l(t,-1===i?0:A-i)){if(-1===i&&(i=A),A-i+1===a)return i*n}else-1!==i&&(A-=A-i),i=-1}else for(r+a>o&&(r=o-a),A=r;A>=0;A--){let r=!0;for(let i=0;i<a;i++)if(l(e,A+i)!==l(t,i)){r=!1;break}if(r)return A}return-1}function C(e,t,r,i){r=Number(r)||0;const s=e.length-r;i?(i=Number(i))>s&&(i=s):i=s;const A=t.length;let n;for(i>A/2&&(i=A/2),n=0;n<i;++n){const i=parseInt(t.substr(2*n,2),16);if(J(i))return n;e[r+n]=i}return n}function B(e,t,r,i){return Y($(t,e.length-r),e,r,i)}function E(e,t,r,i){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function y(e,t,r,i){return Y(z(t),e,r,i)}function S(e,t,r,i){return Y(function(e,t){let r,i,s;const A=[];for(let n=0;n<e.length&&!((t-=2)<0);++n)r=e.charCodeAt(n),i=r>>8,s=r%256,A.push(s),A.push(i);return A}(t,e.length-r),e,r,i)}function b(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const i=[];let s=t;for(;s<r;){const t=e[s];let A=null,n=t>239?4:t>223?3:t>191?2:1;if(s+n<=r){let r,i,o,a;switch(n){case 1:t<128&&(A=t);break;case 2:r=e[s+1],128==(192&r)&&(a=(31&t)<<6|63&r,a>127&&(A=a));break;case 3:r=e[s+1],i=e[s+2],128==(192&r)&&128==(192&i)&&(a=(15&t)<<12|(63&r)<<6|63&i,a>2047&&(a<55296||a>57343)&&(A=a));break;case 4:r=e[s+1],i=e[s+2],o=e[s+3],128==(192&r)&&128==(192&i)&&128==(192&o)&&(a=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&o,a>65535&&a<1114112&&(A=a))}}null===A?(A=65533,n=1):A>65535&&(A-=65536,i.push(A>>>10&1023|55296),A=56320|1023&A),i.push(A),s+=n}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=I));return r}(i)}t.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return h(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(X(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let s=0,A=Math.min(r,i);s<A;++s)if(e[s]!==t[s]){r=e[s],i=t[s];break}return r<i?-1:i<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const i=a.allocUnsafe(t);let s=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,Uint8Array))s+t.length>i.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(i,s)):Uint8Array.prototype.set.call(i,t,s);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,s)}s+=t.length}return i},a.byteLength=g,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):_.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},A&&(a.prototype[A]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,s){if(X(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===s&&(s=this.length),t<0||r>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&t>=r)return 0;if(i>=s)return-1;if(t>=r)return 1;if(this===e)return 0;let A=(s>>>=0)-(i>>>=0),n=(r>>>=0)-(t>>>=0);const o=Math.min(A,n),l=this.slice(i,s),h=e.slice(t,r);for(let e=0;e<o;++e)if(l[e]!==h[e]){A=l[e],n=h[e];break}return A<n?-1:n<A?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},a.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const s=this.length-t;if((void 0===r||r>s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let A=!1;for(;;)switch(i){case"hex":return C(this,e,t,r);case"utf8":case"utf-8":return B(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return y(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(A)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),A=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function P(e,t,r){let i="";r=Math.min(e.length,r);for(let s=t;s<r;++s)i+=String.fromCharCode(127&e[s]);return i}function R(e,t,r){let i="";r=Math.min(e.length,r);for(let s=t;s<r;++s)i+=String.fromCharCode(e[s]);return i}function v(e,t,r){const i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let s="";for(let i=t;i<r;++i)s+=j[e[i]];return s}function x(e,t,r){const i=e.slice(t,r);let s="";for(let e=0;e<i.length-1;e+=2)s+=String.fromCharCode(i[e]+256*i[e+1]);return s}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,r,i,s,A){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<A)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function L(e,t,r,i,s){V(t,i,s,e,r,7);let A=Number(t&BigInt(4294967295));e[r++]=A,A>>=8,e[r++]=A,A>>=8,e[r++]=A,A>>=8,e[r++]=A;let n=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=n,n>>=8,e[r++]=n,n>>=8,e[r++]=n,n>>=8,e[r++]=n,r}function D(e,t,r,i,s){V(t,i,s,e,r,7);let A=Number(t&BigInt(4294967295));e[r+7]=A,A>>=8,e[r+6]=A,A>>=8,e[r+5]=A,A>>=8,e[r+4]=A;let n=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=n,n>>=8,e[r+2]=n,n>>=8,e[r+1]=n,n>>=8,e[r]=n,r+8}function U(e,t,r,i,s,A){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function H(e,t,r,i,A){return t=+t,r>>>=0,A||U(e,0,r,4),s.write(e,t,r,i,23,4),r+4}function N(e,t,r,i,A){return t=+t,r>>>=0,A||U(e,0,r,8),s.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,a.prototype),i},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let i=this[e],s=1,A=0;for(;++A<t&&(s*=256);)i+=this[e+A]*s;return i},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let i=this[e+--t],s=1;for(;t>0&&(s*=256);)i+=this[e+--t]*s;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,s=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(s)<<BigInt(32))})),a.prototype.readBigUInt64BE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],s=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(s)})),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let i=this[e],s=1,A=0;for(;++A<t&&(s*=256);)i+=this[e+A]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let i=t,s=1,A=this[e+--i];for(;i>0&&(s*=256);)A+=this[e+--i]*s;return s*=128,A>=s&&(A-=Math.pow(2,8*t)),A},a.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),a.prototype.readBigInt64BE=Z((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),s.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),s.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),s.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),s.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||F(this,e,t,r,Math.pow(2,8*r)-1,0);let s=1,A=0;for(this[t]=255&e;++A<r&&(s*=256);)this[t+A]=e/s&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||F(this,e,t,r,Math.pow(2,8*r)-1,0);let s=r-1,A=1;for(this[t+s]=255&e;--s>=0&&(A*=256);)this[t+s]=e/A&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=Z((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=Z((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}let s=0,A=1,n=0;for(this[t]=255&e;++s<r&&(A*=256);)e<0&&0===n&&0!==this[t+s-1]&&(n=1),this[t+s]=(e/A>>0)-n&255;return t+r},a.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}let s=r-1,A=1,n=0;for(this[t+s]=255&e;--s>=0&&(A*=256);)e<0&&0===n&&0!==this[t+s+1]&&(n=1),this[t+s]=(e/A>>0)-n&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=Z((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=Z((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(e,t,r){return H(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return H(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);const s=i-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,i):Uint8Array.prototype.set.call(e,this.subarray(r,i),t),s},a.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{const A=a.isBuffer(e)?e:a.from(e,i),n=A.length;if(0===n)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=A[s%n]}return this};const Q={};function M(e,t,r){Q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function k(e){let t="",r=e.length;const i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,i,s,A){if(e>r||e<t){const i="bigint"==typeof t?"n":"";let s;throw s=A>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(A+1)}${i}`:`>= -(2${i} ** ${8*(A+1)-1}${i}) and < 2 ** ${8*(A+1)-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new Q.ERR_OUT_OF_RANGE("value",s,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(i,s,A)}function G(e,t){if("number"!=typeof e)throw new Q.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new Q.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new Q.ERR_BUFFER_OUT_OF_BOUNDS;throw new Q.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(e,t,r){let i=`The value of "${e}" is out of range.`,s=r;return Number.isInteger(r)&&Math.abs(r)>2**32?s=k(String(r)):"bigint"==typeof r&&(s=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(s=k(s)),s+="n"),i+=` It must be ${t}. Received ${s}`,i}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const i=e.length;let s=null;const A=[];for(let n=0;n<i;++n){if(r=e.charCodeAt(n),r>55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&A.push(239,191,189);continue}if(n+1===i){(t-=3)>-1&&A.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&A.push(239,191,189),s=r;continue}r=65536+(s-55296<<10|r-56320)}else s&&(t-=3)>-1&&A.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;A.push(r)}else if(r<2048){if((t-=2)<0)break;A.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;A.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;A.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return A}function z(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,i){let s;for(s=0;s<i&&!(s+r>=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const j=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let s=0;s<16;++s)t[i+s]=e[r]+e[s]}return t}();function Z(e){return"undefined"==typeof BigInt?q:e}function q(){throw new Error("BigInt not supported")}},187:e=>{var t,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function A(){A.init.call(this)}e.exports=A,e.exports.once=function(e,t){return new Promise((function(r,i){function s(r){e.removeListener(t,A),i(r)}function A(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,A,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,s)}))},A.EventEmitter=A,A.prototype._events=void 0,A.prototype._eventsCount=0,A.prototype._maxListeners=void 0;var n=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?A.defaultMaxListeners:e._maxListeners}function l(e,t,r,i){var s,A,n,l;if(o(r),void 0===(A=e._events)?(A=e._events=Object.create(null),e._eventsCount=0):(void 0!==A.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),A=e._events),n=A[t]),void 0===n)n=A[t]=r,++e._eventsCount;else if("function"==typeof n?n=A[t]=i?[r,n]:[n,r]:i?n.unshift(r):n.push(r),(s=a(e))>0&&n.length>s&&!n.warned){n.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=n.length,l=h,console&&console.warn&&console.warn(l)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=h.bind(i);return s.listener=r,i.wrapFn=s,s}function u(e,t,r){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):p(s,s.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function g(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(A){i.once&&e.removeEventListener(t,s),r(A)}))}}Object.defineProperty(A,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");n=e}}),A.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},A.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},A.prototype.getMaxListeners=function(){return a(this)},A.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,A=this._events;if(void 0!==A)s=s&&void 0===A.error;else if(!s)return!1;if(s){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var o=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw o.context=n,o}var a=A[e];if(void 0===a)return!1;if("function"==typeof a)i(a,this,t);else{var l=a.length,h=p(a,l);for(r=0;r<l;++r)i(h[r],this,t)}return!0},A.prototype.addListener=function(e,t){return l(this,e,t,!1)},A.prototype.on=A.prototype.addListener,A.prototype.prependListener=function(e,t){return l(this,e,t,!0)},A.prototype.once=function(e,t){return o(t),this.on(e,c(this,e,t)),this},A.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,c(this,e,t)),this},A.prototype.removeListener=function(e,t){var r,i,s,A,n;if(o(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,A=r.length-1;A>=0;A--)if(r[A]===t||r[A].listener===t){n=r[A].listener,s=A;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,n||t)}return this},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,A=Object.keys(r);for(i=0;i<A.length;++i)"removeListener"!==(s=A[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},A.prototype.listeners=function(e){return u(this,e,!0)},A.prototype.rawListeners=function(e){return u(this,e,!1)},A.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},A.prototype.listenerCount=d,A.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:(e,t)=>{t.read=function(e,t,r,i,s){var A,n,o=8*s-i-1,a=(1<<o)-1,l=a>>1,h=-7,c=r?s-1:0,u=r?-1:1,d=e[t+c];for(c+=u,A=d&(1<<-h)-1,d>>=-h,h+=o;h>0;A=256*A+e[t+c],c+=u,h-=8);for(n=A&(1<<-h)-1,A>>=-h,h+=i;h>0;n=256*n+e[t+c],c+=u,h-=8);if(0===A)A=1-l;else{if(A===a)return n?NaN:1/0*(d?-1:1);n+=Math.pow(2,i),A-=l}return(d?-1:1)*n*Math.pow(2,A-i)},t.write=function(e,t,r,i,s,A){var n,o,a,l=8*A-s-1,h=(1<<l)-1,c=h>>1,u=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:A-1,p=i?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,n=h):(n=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-n))<1&&(n--,a*=2),(t+=n+c>=1?u/a:u*Math.pow(2,1-c))*a>=2&&(n++,a/=2),n+c>=h?(o=0,n=h):n+c>=1?(o=(t*a-1)*Math.pow(2,s),n+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,s),n=0));s>=8;e[r+d]=255&o,d+=p,o/=256,s-=8);for(n=n<<s|o,l+=s;l>0;e[r+d]=255&n,d+=p,n/=256,l-=8);e[r+d-p]|=128*g}},717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},733:(e,t,r)=>{e.exports=function e(t,r,i){function s(n,o){if(!r[n]){if(!t[n]){if(A)return A(n,!0);var a=new Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}var l=r[n]={exports:{}};t[n][0].call(l.exports,(function(e){return s(t[n][1][e]||e)}),l,l.exports,e,t,r,i)}return r[n].exports}for(var A=void 0,n=0;n<i.length;n++)s(i[n]);return s}({1:[function(e,t,r){var i=e("./utils"),s=e("./support"),A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,s,n,o,a,l,h=[],c=0,u=e.length,d=u,p="string"!==i.getTypeOf(e);c<e.length;)d=u-c,s=p?(t=e[c++],r=c<u?e[c++]:0,c<u?e[c++]:0):(t=e.charCodeAt(c++),r=c<u?e.charCodeAt(c++):0,c<u?e.charCodeAt(c++):0),n=t>>2,o=(3&t)<<4|r>>4,a=1<d?(15&r)<<2|s>>6:64,l=2<d?63&s:64,h.push(A.charAt(n)+A.charAt(o)+A.charAt(a)+A.charAt(l));return h.join("")},r.decode=function(e){var t,r,i,n,o,a,l=0,h=0,c="data:";if(e.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");var u,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===A.charAt(64)&&d--,e.charAt(e.length-2)===A.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=s.uint8array?new Uint8Array(0|d):new Array(0|d);l<e.length;)t=A.indexOf(e.charAt(l++))<<2|(n=A.indexOf(e.charAt(l++)))>>4,r=(15&n)<<4|(o=A.indexOf(e.charAt(l++)))>>2,i=(3&o)<<6|(a=A.indexOf(e.charAt(l++))),u[h++]=t,64!==o&&(u[h++]=r),64!==a&&(u[h++]=i);return u}},{"./support":30,"./utils":32}],2:[function(e,t,r){var i=e("./external"),s=e("./stream/DataWorker"),A=e("./stream/Crc32Probe"),n=e("./stream/DataLengthProbe");function o(e,t,r,i,s){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=s}o.prototype={getContentWorker:function(){var e=new s(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new n("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new s(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new A).pipe(new n("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new n("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var i=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var i=e("./utils"),s=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==i.getTypeOf(e)?function(e,t,r,i){var A=s,n=0+r;e^=-1;for(var o=0;o<n;o++)e=e>>>8^A[255&(e^t[o])];return-1^e}(0|t,e,e.length):function(e,t,r,i){var A=s,n=0+r;e^=-1;for(var o=0;o<n;o++)e=e>>>8^A[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var i;i="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:i}},{lie:37}],7:[function(e,t,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,s=e("pako"),A=e("./utils"),n=e("./stream/GenericWorker"),o=i?"uint8array":"array";function a(e,t){n.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",A.inherits(a,n),a.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(A.transformTo(o,e.data),!1)},a.prototype.flush=function(){n.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},a.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this._pako=null},a.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new a("Deflate",e)},r.uncompressWorker=function(){return new a("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function i(e,t){var r,i="";for(r=0;r<t;r++)i+=String.fromCharCode(255&e),e>>>=8;return i}function s(e,t,r,s,n,h){var c,u,d=e.file,p=e.compression,g=h!==o.utf8encode,_=A.transformTo("string",h(d.name)),m=A.transformTo("string",o.utf8encode(d.name)),f=d.comment,w=A.transformTo("string",h(f)),C=A.transformTo("string",o.utf8encode(f)),B=m.length!==d.name.length,E=C.length!==f.length,y="",S="",b="",T=d.dir,I=d.date,P={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(P.crc32=e.crc32,P.compressedSize=e.compressedSize,P.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),g||!B&&!E||(R|=2048);var v=0,x=0;T&&(v|=16),"UNIX"===n?(x=798,v|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(d.unixPermissions,T)):(x=20,v|=function(e){return 63&(e||0)}(d.dosPermissions)),c=I.getUTCHours(),c<<=6,c|=I.getUTCMinutes(),c<<=5,c|=I.getUTCSeconds()/2,u=I.getUTCFullYear()-1980,u<<=4,u|=I.getUTCMonth()+1,u<<=5,u|=I.getUTCDate(),B&&(S=i(1,1)+i(a(_),4)+m,y+="up"+i(S.length,2)+S),E&&(b=i(1,1)+i(a(w),4)+C,y+="uc"+i(b.length,2)+b);var O="";return O+="\n\0",O+=i(R,2),O+=p.magic,O+=i(c,2),O+=i(u,2),O+=i(P.crc32,4),O+=i(P.compressedSize,4),O+=i(P.uncompressedSize,4),O+=i(_.length,2),O+=i(y.length,2),{fileRecord:l.LOCAL_FILE_HEADER+O+_+y,dirRecord:l.CENTRAL_FILE_HEADER+i(x,2)+O+i(w.length,2)+"\0\0\0\0"+i(v,4)+i(s,4)+_+y+w}}var A=e("../utils"),n=e("../stream/GenericWorker"),o=e("../utf8"),a=e("../crc32"),l=e("../signature");function h(e,t,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}A.inherits(h,n),h.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,n.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=s(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=s(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+i(e.crc32,4)+i(e.compressedSize,4)+i(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,s=function(e,t,r,s,n){var o=A.transformTo("string",n(s));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(e,2)+i(e,2)+i(t,4)+i(r,4)+i(o.length,2)+o}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:s,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},h.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(e){var t=this._sources;if(!n.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},h.prototype.lock=function(){n.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var i=e("../compressions"),s=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var A=new s(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach((function(e,r){n++;var s=function(e,t){var r=e||t,s=i[r];if(!s)throw new Error(r+" is not a valid compression method !");return s}(r.options.compression,t.compression),o=r.options.compressionOptions||t.compressionOptions||{},a=r.dir,l=r.date;r._compressWorker(s,o).withStreamInfo("file",{name:e,dir:a,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(A)})),A.entriesCount=n}catch(e){A.error(e)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new i;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(i.prototype=e("./object")).loadAsync=e("./load"),i.support=e("./support"),i.defaults=e("./defaults"),i.version="3.7.1",i.loadAsync=function(e,t){return(new i).loadAsync(e,t)},i.external=e("./external"),t.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var i=e("./utils"),s=e("./external"),A=e("./utf8"),n=e("./zipEntries"),o=e("./stream/Crc32Probe"),a=e("./nodejsUtils");function l(e){return new s.Promise((function(t,r){var i=e.decompressed.getContentWorker().pipe(new o);i.on("error",(function(e){r(e)})).on("end",(function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=i.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:A.utf8decode}),a.isNode&&a.isStream(e)?s.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new n(t);return r.load(e),r})).then((function(e){var r=[s.Promise.resolve(e)],i=e.files;if(t.checkCRC32)for(var A=0;A<i.length;A++)r.push(l(i[A]));return s.Promise.all(r)})).then((function(e){for(var i=e.shift(),s=i.files,A=0;A<s.length;A++){var n=s[A];r.file(n.fileNameStr,n.decompressed,{binary:!0,optimizedBinaryString:!0,date:n.date,dir:n.dir,comment:n.fileCommentStr.length?n.fileCommentStr:null,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions,createFolders:t.createFolders})}return i.zipComment.length&&(r.comment=i.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var i=e("../utils"),s=e("../stream/GenericWorker");function A(e,t){s.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}i.inherits(A,s),A.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},A.prototype.pause=function(){return!!s.prototype.pause.call(this)&&(this._stream.pause(),!0)},A.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=A},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var i=e("readable-stream").Readable;function s(e,t,r){i.call(this,t),this._helper=e;var s=this;e.on("data",(function(e,t){s.push(e)||s._helper.pause(),r&&r(t)})).on("error",(function(e){s.emit("error",e)})).on("end",(function(){s.push(null)}))}e("../utils").inherits(s,i),s.prototype._read=function(){this._helper.resume()},t.exports=s},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function i(e,t,r){var i,s=A.getTypeOf(t),o=A.extend(r||{},a);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(e=g(e)),o.createFolders&&(i=p(e))&&_.call(this,i,!0);var c,m="string"===s&&!1===o.binary&&!1===o.base64;r&&void 0!==r.binary||(o.binary=!m),(t instanceof l&&0===t.uncompressedSize||o.dir||!t||0===t.length)&&(o.base64=!1,o.binary=!0,t="",o.compression="STORE",s="string"),c=t instanceof l||t instanceof n?t:u.isNode&&u.isStream(t)?new d(e,t):A.prepareContent(e,t,o.binary,o.optimizedBinaryString,o.base64);var f=new h(e,c,o);this.files[e]=f}var s=e("./utf8"),A=e("./utils"),n=e("./stream/GenericWorker"),o=e("./stream/StreamHelper"),a=e("./defaults"),l=e("./compressedObject"),h=e("./zipObject"),c=e("./generate"),u=e("./nodejsUtils"),d=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_=function(e,t){return t=void 0!==t?t:a.createFolders,e=g(e),this.files[e]||i.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function m(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var f={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,i)},filter:function(e){var t=[];return this.forEach((function(r,i){e(r,i)&&t.push(i)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,i.call(this,e,t,r),this;if(m(e)){var s=e;return this.filter((function(e,t){return!t.dir&&s.test(e)}))}var A=this.files[this.root+e];return A&&!A.dir?A:null},folder:function(e){if(!e)return this;if(m(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=_.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=A.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:s.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");A.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";t=c.generateWorker(this,r,i)}catch(e){(t=new n("error")).error(e)}return new o(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=f},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var i=e("./DataReader");function s(e){i.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(s,i),s.prototype.byteAt=function(e){return this.data[this.zero+e]},s.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),s=e.charCodeAt(3),A=this.length-4;0<=A;--A)if(this.data[A]===t&&this.data[A+1]===r&&this.data[A+2]===i&&this.data[A+3]===s)return A-this.zero;return-1},s.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),s=e.charCodeAt(3),A=this.readData(4);return t===A[0]&&r===A[1]&&i===A[2]&&s===A[3]},s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var i=e("../utils");function s(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}s.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=s},{"../utils":32}],19:[function(e,t,r){var i=e("./Uint8ArrayReader");function s(e){i.call(this,e)}e("../utils").inherits(s,i),s.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var i=e("./DataReader");function s(e){i.call(this,e)}e("../utils").inherits(s,i),s.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},s.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},s.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},s.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var i=e("./ArrayReader");function s(e){i.call(this,e)}e("../utils").inherits(s,i),s.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=s},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var i=e("../utils"),s=e("../support"),A=e("./ArrayReader"),n=e("./StringReader"),o=e("./NodeBufferReader"),a=e("./Uint8ArrayReader");t.exports=function(e){var t=i.getTypeOf(e);return i.checkSupport(t),"string"!==t||s.uint8array?"nodebuffer"===t?new o(e):s.uint8array?new a(i.transformTo("uint8array",e)):new A(i.transformTo("array",e)):new n(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){var i=e("./GenericWorker"),s=e("../utils");function A(e){i.call(this,"ConvertWorker to "+e),this.destType=e}s.inherits(A,i),A.prototype.processChunk=function(e){this.push({data:s.transformTo(this.destType,e.data),meta:e.meta})},t.exports=A},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var i=e("./GenericWorker"),s=e("../crc32");function A(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(A,i),A.prototype.processChunk=function(e){this.streamInfo.crc32=s(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=A},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var i=e("../utils"),s=e("./GenericWorker");function A(e){s.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}i.inherits(A,s),A.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}s.prototype.processChunk.call(this,e)},t.exports=A},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var i=e("../utils"),s=e("./GenericWorker");function A(e){s.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}i.inherits(A,s),A.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},A.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},A.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},A.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=A},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function i(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=i},{}],29:[function(e,t,r){var i=e("../utils"),s=e("./ConvertWorker"),A=e("./GenericWorker"),n=e("../base64"),o=e("../support"),a=e("../external"),l=null;if(o.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function h(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,i.checkSupport(n),this._worker=e.pipe(new s(n)),e.lock()}catch(e){this._worker=new A("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return function(e,t){return new a.Promise((function(r,s){var A=[],o=e._internalType,a=e._outputType,l=e._mimeType;e.on("data",(function(e,r){A.push(e),t&&t(r)})).on("error",(function(e){A=[],s(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),r);case"base64":return n.encode(t);default:return i.transformTo(e,t)}}(a,function(e,t){var r,i=0,s=null,A=0;for(r=0;r<t.length;r++)A+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(s=new Uint8Array(A),r=0;r<t.length;r++)s.set(t[r],i),i+=t[r].length;return s;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(o,A),l);r(e)}catch(e){s(e)}A=[]})).resume()}))}(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){i.delay(t,arguments,r)})),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(e){try{var s=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);s.append(i),r.blob=0===s.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var i=e("./utils"),s=e("./support"),A=e("./nodejsUtils"),n=e("./stream/GenericWorker"),o=new Array(256),a=0;a<256;a++)o[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(){n.call(this,"utf-8 decode"),this.leftOver=null}function h(){n.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(e){return s.nodebuffer?A.newBufferFrom(e,"utf-8"):function(e){var t,r,i,A,n,o=e.length,a=0;for(A=0;A<o;A++)55296==(64512&(r=e.charCodeAt(A)))&&A+1<o&&56320==(64512&(i=e.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(i-56320),A++),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=s.uint8array?new Uint8Array(a):new Array(a),A=n=0;n<a;A++)55296==(64512&(r=e.charCodeAt(A)))&&A+1<o&&56320==(64512&(i=e.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(i-56320),A++),r<128?t[n++]=r:(r<2048?t[n++]=192|r>>>6:(r<65536?t[n++]=224|r>>>12:(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63),t[n++]=128|r>>>6&63),t[n++]=128|63&r);return t}(e)},r.utf8decode=function(e){return s.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,s,A,n=e.length,a=new Array(2*n);for(t=r=0;t<n;)if((s=e[t++])<128)a[r++]=s;else if(4<(A=o[s]))a[r++]=65533,t+=A-1;else{for(s&=2===A?31:3===A?15:7;1<A&&t<n;)s=s<<6|63&e[t++],A--;1<A?a[r++]=65533:s<65536?a[r++]=s:(s-=65536,a[r++]=55296|s>>10&1023,a[r++]=56320|1023&s)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),i.applyFromCharCode(a)}(e=i.transformTo(s.uint8array?"uint8array":"array",e))},i.inherits(l,n),l.prototype.processChunk=function(e){var t=i.transformTo(s.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(s.uint8array){var A=t;(t=new Uint8Array(A.length+this.leftOver.length)).set(this.leftOver,0),t.set(A,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}(t),a=t;n!==t.length&&(s.uint8array?(a=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(a=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:r.utf8decode(a),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,i.inherits(h,n),h.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var i=e("./support"),s=e("./base64"),A=e("./nodejsUtils"),n=e("set-immediate-shim"),o=e("./external");function a(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(e,t,r){var i=[],s=0,A=e.length;if(A<=r)return String.fromCharCode.apply(null,e);for(;s<A;)"array"===t||"nodebuffer"===t?i.push(String.fromCharCode.apply(null,e.slice(s,Math.min(s+r,A)))):i.push(String.fromCharCode.apply(null,e.subarray(s,Math.min(s+r,A)))),s+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,A.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var t=65536,i=r.getTypeOf(e),s=!0;if("uint8array"===i?s=h.applyCanBeUsed.uint8array:"nodebuffer"===i&&(s=h.applyCanBeUsed.nodebuffer),s)for(;1<t;)try{return h.stringifyByChunk(e,i,t)}catch(e){t=Math.floor(t/2)}return h.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=c;var d={};d.string={string:a,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,A.allocBuffer(e.length))}},d.array={string:c,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return A.newBufferFrom(e)}},d.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return A.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return A.newBufferFrom(e)}},d.nodebuffer={string:c,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:a},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var i=r.getTypeOf(t);return d[i][e](t)},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":i.nodebuffer&&A.isBuffer(e)?"nodebuffer":i.uint8array&&e instanceof Uint8Array?"uint8array":i.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!i[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,i="";for(r=0;r<(e||"").length;r++)i+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return i},r.delay=function(e,t,r){n((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,A,n,a){return o.Promise.resolve(t).then((function(e){return i.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new o.Promise((function(t,r){var i=new FileReader;i.onload=function(e){t(e.target.result)},i.onerror=function(e){r(e.target.error)},i.readAsArrayBuffer(e)})):e})).then((function(t){var h=r.getTypeOf(t);return h?("arraybuffer"===h?t=r.transformTo("uint8array",t):"string"===h&&(a?t=s.decode(t):A&&!0!==n&&(t=function(e){return l(e,i.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):o.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(e,t,r){var i=e("./reader/readerFor"),s=e("./utils"),A=e("./signature"),n=e("./zipEntry"),o=(e("./utf8"),e("./support"));function a(e){this.files=[],this.loadOptions=e}a.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+s.pretty(t)+", expected "+s.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4)===t;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=s.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,i=this.zip64EndOfCentralSize-44;0<i;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(A.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(A.CENTRAL_FILE_HEADER);)(e=new n({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(A.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,A.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(A.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===s.MAX_VALUE_16BITS||this.diskWithCentralDirStart===s.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===s.MAX_VALUE_16BITS||this.centralDirRecords===s.MAX_VALUE_16BITS||this.centralDirSize===s.MAX_VALUE_32BITS||this.centralDirOffset===s.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,A.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=t-r;if(0<i)this.isSignature(t,A.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(e){this.reader=i(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=a},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var i=e("./reader/readerFor"),s=e("./utils"),A=e("./compressedObject"),n=e("./crc32"),o=e("./utf8"),a=e("./compressions"),l=e("./support");function h(e,t){this.options=e,this.loadOptions=t}h.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in a)if(a.hasOwnProperty(t)&&a[t].magic===e)return a[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new A(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,i,s=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<s;)t=e.readInt(2),r=e.readInt(2),i=e.readData(r),this.extraFields[t]={id:t,length:r,value:i};e.setIndex(s)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=s.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var A=s.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(A)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=i(e.value);return 1!==t.readInt(1)||n(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=i(e.value);return 1!==t.readInt(1)||n(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function i(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var s=e("./stream/StreamHelper"),A=e("./stream/DataWorker"),n=e("./utf8"),o=e("./compressedObject"),a=e("./stream/GenericWorker");i.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var i="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var A=!this._dataBinary;A&&!i&&(t=t.pipe(new n.Utf8EncodeWorker)),!A&&i&&(t=t.pipe(new n.Utf8DecodeWorker))}catch(e){(t=new a("error")).error(e)}return new s(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new n.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof a?this._data:new A(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<l.length;c++)i.prototype[l[c]]=h;t.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,i){(function(e){var r,i,s=e.MutationObserver||e.WebKitMutationObserver;if(s){var A=0,n=new s(h),o=e.document.createTextNode("");n.observe(o,{characterData:!0}),r=function(){o.data=A=++A%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var a=new e.MessageChannel;a.port1.onmessage=h,r=function(){a.port2.postMessage(0)}}var l=[];function h(){var e,t;i=!0;for(var r=l.length;r;){for(t=l,l=[],e=-1;++e<r;)t[e]();r=l.length}i=!1}t.exports=function(e){1!==l.push(e)||i||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){var i=e("immediate");function s(){}var A={},n=["REJECTED"],o=["FULFILLED"],a=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,e!==s&&d(this,e)}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function c(e,t,r){i((function(){var i;try{i=t(r)}catch(i){return A.reject(e,i)}i===e?A.reject(e,new TypeError("Cannot resolve promise with itself")):A.resolve(e,i)}))}function u(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){var r=!1;function i(t){r||(r=!0,A.reject(e,t))}function s(t){r||(r=!0,A.resolve(e,t))}var n=p((function(){t(s,i)}));"error"===n.status&&i(n.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=l).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===o||"function"!=typeof t&&this.state===n)return this;var r=new this.constructor(s);return this.state!==a?c(r,this.state===o?e:t,this.outcome):this.queue.push(new h(r,e,t)),r},h.prototype.callFulfilled=function(e){A.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){c(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){A.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){c(this.promise,this.onRejected,e)},A.resolve=function(e,t){var r=p(u,t);if("error"===r.status)return A.reject(e,r.value);var i=r.value;if(i)d(e,i);else{e.state=o,e.outcome=t;for(var s=-1,n=e.queue.length;++s<n;)e.queue[s].callFulfilled(t)}return e},A.reject=function(e,t){e.state=n,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:A.resolve(new this(s),e)},l.reject=function(e){var t=new this(s);return A.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,i=!1;if(!r)return this.resolve([]);for(var n=new Array(r),o=0,a=-1,l=new this(s);++a<r;)h(e[a],a);return l;function h(e,s){t.resolve(e).then((function(e){n[s]=e,++o!==r||i||(i=!0,A.resolve(l,n))}),(function(e){i||(i=!0,A.reject(l,e))}))}},l.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var i,n=-1,o=new this(s);++n<t;)i=e[n],this.resolve(i).then((function(e){r||(r=!0,A.resolve(o,e))}),(function(e){r||(r=!0,A.reject(o,e))}));return o}},{immediate:36}],38:[function(e,t,r){var i={};(0,e("./lib/utils/common").assign)(i,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var i=e("./zlib/deflate"),s=e("./utils/common"),A=e("./utils/strings"),n=e("./zlib/messages"),o=e("./zlib/zstream"),a=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(n[r]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var h;if(h="string"==typeof t.dictionary?A.string2buf(t.dictionary):"[object ArrayBuffer]"===a.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=i.deflateSetDictionary(this.strm,h)))throw new Error(n[r]);this._dict_set=!0}}function h(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}l.prototype.push=function(e,t){var r,n,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=A.string2buf(e):"[object ArrayBuffer]"===a.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new s.Buf8(l),o.next_out=0,o.avail_out=l),1!==(r=i.deflate(o,n))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(A.buf2binstring(s.shrinkBuf(o.output,o.next_out))):this.onData(s.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==r);return 4===n?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==n||(this.onEnd(0),!(o.avail_out=0))},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=l,r.deflate=h,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,h(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,h(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var i=e("./zlib/inflate"),s=e("./utils/common"),A=e("./utils/strings"),n=e("./zlib/constants"),o=e("./zlib/messages"),a=e("./zlib/zstream"),l=e("./zlib/gzheader"),h=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=s.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,t.windowBits);if(r!==n.Z_OK)throw new Error(o[r]);this.header=new l,i.inflateGetHeader(this.strm,this.header)}function u(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}c.prototype.push=function(e,t){var r,o,a,l,c,u,d=this.strm,p=this.options.chunkSize,g=this.options.dictionary,_=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?n.Z_FINISH:n.Z_NO_FLUSH,"string"==typeof e?d.input=A.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new s.Buf8(p),d.next_out=0,d.avail_out=p),(r=i.inflate(d,n.Z_NO_FLUSH))===n.Z_NEED_DICT&&g&&(u="string"==typeof g?A.string2buf(g):"[object ArrayBuffer]"===h.call(g)?new Uint8Array(g):g,r=i.inflateSetDictionary(this.strm,u)),r===n.Z_BUF_ERROR&&!0===_&&(r=n.Z_OK,_=!1),r!==n.Z_STREAM_END&&r!==n.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==n.Z_STREAM_END&&(0!==d.avail_in||o!==n.Z_FINISH&&o!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(a=A.utf8border(d.output,d.next_out),l=d.next_out-a,c=A.buf2string(d.output,a),d.next_out=l,d.avail_out=p-l,l&&s.arraySet(d.output,d.output,a,l,0),this.onData(c)):this.onData(s.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(_=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==n.Z_STREAM_END);return r===n.Z_STREAM_END&&(o=n.Z_FINISH),o===n.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===n.Z_OK):o!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),!(d.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===n.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=c,r.inflate=u,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},r.ungzip=u},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,r,i,s){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),s);else for(var A=0;A<i;A++)e[s+A]=t[r+A]},flattenChunks:function(e){var t,r,i,s,A,n;for(t=i=0,r=e.length;t<r;t++)i+=e[t].length;for(n=new Uint8Array(i),t=s=0,r=e.length;t<r;t++)A=e[t],n.set(A,s),s+=A.length;return n}},A={arraySet:function(e,t,r,i,s){for(var A=0;A<i;A++)e[s+A]=t[r+A]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,s)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,A))},r.setTyped(i)},{}],42:[function(e,t,r){var i=e("./common"),s=!0,A=!0;try{String.fromCharCode.apply(null,[0])}catch(e){s=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){A=!1}for(var n=new i.Buf8(256),o=0;o<256;o++)n[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function a(e,t){if(t<65537&&(e.subarray&&A||!e.subarray&&s))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}n[254]=n[254]=1,r.string2buf=function(e){var t,r,s,A,n,o=e.length,a=0;for(A=0;A<o;A++)55296==(64512&(r=e.charCodeAt(A)))&&A+1<o&&56320==(64512&(s=e.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(s-56320),A++),a+=r<128?1:r<2048?2:r<65536?3:4;for(t=new i.Buf8(a),A=n=0;n<a;A++)55296==(64512&(r=e.charCodeAt(A)))&&A+1<o&&56320==(64512&(s=e.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(s-56320),A++),r<128?t[n++]=r:(r<2048?t[n++]=192|r>>>6:(r<65536?t[n++]=224|r>>>12:(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63),t[n++]=128|r>>>6&63),t[n++]=128|63&r);return t},r.buf2binstring=function(e){return a(e,e.length)},r.binstring2buf=function(e){for(var t=new i.Buf8(e.length),r=0,s=t.length;r<s;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,i,s,A,o=t||e.length,l=new Array(2*o);for(r=i=0;r<o;)if((s=e[r++])<128)l[i++]=s;else if(4<(A=n[s]))l[i++]=65533,r+=A-1;else{for(s&=2===A?31:3===A?15:7;1<A&&r<o;)s=s<<6|63&e[r++],A--;1<A?l[i++]=65533:s<65536?l[i++]=s:(s-=65536,l[i++]=55296|s>>10&1023,l[i++]=56320|1023&s)}return a(l,i)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,i){for(var s=65535&e|0,A=e>>>16&65535|0,n=0;0!==r;){for(r-=n=2e3<r?2e3:r;A=A+(s=s+t[i++]|0)|0,--n;);s%=65521,A%=65521}return s|A<<16|0}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,s){var A=i,n=s+r;e^=-1;for(var o=s;o<n;o++)e=e>>>8^A[255&(e^t[o])];return-1^e}},{}],46:[function(e,t,r){var i,s=e("../utils/common"),A=e("./trees"),n=e("./adler32"),o=e("./crc32"),a=e("./messages"),l=-2,h=258,c=262,u=113;function d(e,t){return e.msg=a[t],t}function p(e){return(e<<1)-(4<e?9:0)}function g(e){for(var t=e.length;0<=--t;)e[t]=0}function _(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(s.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function m(e,t){A._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function C(e,t){var r,i,s=e.max_chain_length,A=e.strstart,n=e.prev_length,o=e.nice_match,a=e.strstart>e.w_size-c?e.strstart-(e.w_size-c):0,l=e.window,u=e.w_mask,d=e.prev,p=e.strstart+h,g=l[A+n-1],_=l[A+n];e.prev_length>=e.good_match&&(s>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(r=t)+n]===_&&l[r+n-1]===g&&l[r]===l[A]&&l[++r]===l[A+1]){A+=2,r++;do{}while(l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&l[++A]===l[++r]&&A<p);if(i=h-(p-A),A=p-h,n<i){if(e.match_start=t,o<=(n=i))break;g=l[A+n-1],_=l[A+n]}}}while((t=d[t&u])>a&&0!=--s);return n<=e.lookahead?n:e.lookahead}function B(e){var t,r,i,A,a,l,h,u,d,p,g=e.w_size;do{if(A=e.window_size-e.lookahead-e.strstart,e.strstart>=g+(g-c)){for(s.arraySet(e.window,e.window,g,g,0),e.match_start-=g,e.strstart-=g,e.block_start-=g,t=r=e.hash_size;i=e.head[--t],e.head[t]=g<=i?i-g:0,--r;);for(t=r=g;i=e.prev[--t],e.prev[t]=g<=i?i-g:0,--r;);A+=g}if(0===e.strm.avail_in)break;if(l=e.strm,h=e.window,u=e.strstart+e.lookahead,p=void 0,(d=A)<(p=l.avail_in)&&(p=d),r=0===p?0:(l.avail_in-=p,s.arraySet(h,l.input,l.next_in,p,u),1===l.state.wrap?l.adler=n(l.adler,h,p,u):2===l.state.wrap&&(l.adler=o(l.adler,h,p,u)),l.next_in+=p,l.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+3-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<c&&0!==e.strm.avail_in)}function E(e,t){for(var r,i;;){if(e.lookahead<c){if(B(e),e.lookahead<c&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-c&&(e.match_length=C(e,r)),e.match_length>=3)if(i=A._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(m(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(m(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m(e,!1),0===e.strm.avail_out)?1:2}function y(e,t){for(var r,i,s;;){if(e.lookahead<c){if(B(e),e.lookahead<c&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-c&&(e.match_length=C(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(s=e.strstart+e.lookahead-3,i=A._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=s&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(m(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=A._tr_tally(e,0,e.window[e.strstart-1]))&&m(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=A._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(m(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m(e,!1),0===e.strm.avail_out)?1:2}function S(e,t,r,i,s){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=s}function b(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new s.Buf16(1146),this.dyn_dtree=new s.Buf16(122),this.bl_tree=new s.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new s.Buf16(16),this.heap=new s.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new s.Buf16(573),g(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function T(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:u,e.adler=2===t.wrap?0:1,t.last_flush=0,A._tr_init(t),0):d(e,l)}function I(e){var t=T(e);return 0===t&&function(e){e.window_size=2*e.w_size,g(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function P(e,t,r,i,A,n){if(!e)return l;var o=1;if(-1===t&&(t=6),i<0?(o=0,i=-i):15<i&&(o=2,i-=16),A<1||9<A||8!==r||i<8||15<i||t<0||9<t||n<0||4<n)return d(e,l);8===i&&(i=9);var a=new b;return(e.state=a).strm=e,a.wrap=o,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=A+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new s.Buf8(2*a.w_size),a.head=new s.Buf16(a.hash_size),a.prev=new s.Buf16(a.w_size),a.lit_bufsize=1<<A+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new s.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=n,a.method=r,I(e)}i=[new S(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,m(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-c&&(m(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(m(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(m(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,E),new S(4,5,16,8,E),new S(4,6,32,32,E),new S(4,4,16,16,y),new S(8,16,32,32,y),new S(8,16,128,128,y),new S(8,32,128,256,y),new S(32,128,258,1024,y),new S(32,258,258,4096,y)],r.deflateInit=function(e,t){return P(e,t,8,15,8,0)},r.deflateInit2=P,r.deflateReset=I,r.deflateResetKeep=T,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},r.deflate=function(e,t){var r,s,n,a;if(!e||!e.state||5<t||t<0)return e?d(e,l):l;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||666===s.status&&4!==t)return d(e,0===e.avail_out?-5:l);if(s.strm=e,r=s.last_flush,s.last_flush=t,42===s.status)if(2===s.wrap)e.adler=0,f(s,31),f(s,139),f(s,8),s.gzhead?(f(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),f(s,255&s.gzhead.time),f(s,s.gzhead.time>>8&255),f(s,s.gzhead.time>>16&255),f(s,s.gzhead.time>>24&255),f(s,9===s.level?2:2<=s.strategy||s.level<2?4:0),f(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(f(s,255&s.gzhead.extra.length),f(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=o(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69):(f(s,0),f(s,0),f(s,0),f(s,0),f(s,0),f(s,9===s.level?2:2<=s.strategy||s.level<2?4:0),f(s,3),s.status=u);else{var c=8+(s.w_bits-8<<4)<<8;c|=(2<=s.strategy||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(c|=32),c+=31-c%31,s.status=u,w(s,c),0!==s.strstart&&(w(s,e.adler>>>16),w(s,65535&e.adler)),e.adler=1}if(69===s.status)if(s.gzhead.extra){for(n=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),_(e),n=s.pending,s.pending!==s.pending_buf_size));)f(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=73)}else s.status=73;if(73===s.status)if(s.gzhead.name){n=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),_(e),n=s.pending,s.pending===s.pending_buf_size)){a=1;break}a=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,f(s,a)}while(0!==a);s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),0===a&&(s.gzindex=0,s.status=91)}else s.status=91;if(91===s.status)if(s.gzhead.comment){n=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),_(e),n=s.pending,s.pending===s.pending_buf_size)){a=1;break}a=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,f(s,a)}while(0!==a);s.gzhead.hcrc&&s.pending>n&&(e.adler=o(e.adler,s.pending_buf,s.pending-n,n)),0===a&&(s.status=103)}else s.status=103;if(103===s.status&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&_(e),s.pending+2<=s.pending_buf_size&&(f(s,255&e.adler),f(s,e.adler>>8&255),e.adler=0,s.status=u)):s.status=u),0!==s.pending){if(_(e),0===e.avail_out)return s.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(r)&&4!==t)return d(e,-5);if(666===s.status&&0!==e.avail_in)return d(e,-5);if(0!==e.avail_in||0!==s.lookahead||0!==t&&666!==s.status){var C=2===s.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(B(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(m(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(m(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m(e,!1),0===e.strm.avail_out)?1:2}(s,t):3===s.strategy?function(e,t){for(var r,i,s,n,o=e.window;;){if(e.lookahead<=h){if(B(e),e.lookahead<=h&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(i=o[s=e.strstart-1])===o[++s]&&i===o[++s]&&i===o[++s]){n=e.strstart+h;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&s<n);e.match_length=h-(n-s),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=A._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=A._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(m(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(m(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m(e,!1),0===e.strm.avail_out)?1:2}(s,t):i[s.level].func(s,t);if(3!==C&&4!==C||(s.status=666),1===C||3===C)return 0===e.avail_out&&(s.last_flush=-1),0;if(2===C&&(1===t?A._tr_align(s):5!==t&&(A._tr_stored_block(s,0,0,!1),3===t&&(g(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),_(e),0===e.avail_out))return s.last_flush=-1,0}return 4!==t?0:s.wrap<=0?1:(2===s.wrap?(f(s,255&e.adler),f(s,e.adler>>8&255),f(s,e.adler>>16&255),f(s,e.adler>>24&255),f(s,255&e.total_in),f(s,e.total_in>>8&255),f(s,e.total_in>>16&255),f(s,e.total_in>>24&255)):(w(s,e.adler>>>16),w(s,65535&e.adler)),_(e),0<s.wrap&&(s.wrap=-s.wrap),0!==s.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==u&&666!==t?d(e,l):(e.state=null,t===u?d(e,-3):0):l},r.deflateSetDictionary=function(e,t){var r,i,A,o,a,h,c,u,d=t.length;if(!e||!e.state)return l;if(2===(o=(r=e.state).wrap)||1===o&&42!==r.status||r.lookahead)return l;for(1===o&&(e.adler=n(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new s.Buf8(r.w_size),s.arraySet(u,t,d-r.w_size,r.w_size,0),t=u,d=r.w_size),a=e.avail_in,h=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,B(r);r.lookahead>=3;){for(i=r.strstart,A=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+3-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--A;);r.strstart=i,r.lookahead=2,B(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=h,e.input=c,e.avail_in=a,r.wrap=o,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(e,t){var r,i,s,A,n,o,a,l,h,c,u,d,p,g,_,m,f,w,C,B,E,y,S,b,T;r=e.state,i=e.next_in,b=e.input,s=i+(e.avail_in-5),A=e.next_out,T=e.output,n=A-(t-e.avail_out),o=A+(e.avail_out-257),a=r.dmax,l=r.wsize,h=r.whave,c=r.wnext,u=r.window,d=r.hold,p=r.bits,g=r.lencode,_=r.distcode,m=(1<<r.lenbits)-1,f=(1<<r.distbits)-1;e:do{p<15&&(d+=b[i++]<<p,p+=8,d+=b[i++]<<p,p+=8),w=g[d&m];t:for(;;){if(d>>>=C=w>>>24,p-=C,0==(C=w>>>16&255))T[A++]=65535&w;else{if(!(16&C)){if(0==(64&C)){w=g[(65535&w)+(d&(1<<C)-1)];continue t}if(32&C){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}B=65535&w,(C&=15)&&(p<C&&(d+=b[i++]<<p,p+=8),B+=d&(1<<C)-1,d>>>=C,p-=C),p<15&&(d+=b[i++]<<p,p+=8,d+=b[i++]<<p,p+=8),w=_[d&f];r:for(;;){if(d>>>=C=w>>>24,p-=C,!(16&(C=w>>>16&255))){if(0==(64&C)){w=_[(65535&w)+(d&(1<<C)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&w,p<(C&=15)&&(d+=b[i++]<<p,(p+=8)<C&&(d+=b[i++]<<p,p+=8)),a<(E+=d&(1<<C)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=C,p-=C,(C=A-n)<E){if(h<(C=E-C)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=u,(y=0)===c){if(y+=l-C,C<B){for(B-=C;T[A++]=u[y++],--C;);y=A-E,S=T}}else if(c<C){if(y+=l+c-C,(C-=c)<B){for(B-=C;T[A++]=u[y++],--C;);if(y=0,c<B){for(B-=C=c;T[A++]=u[y++],--C;);y=A-E,S=T}}}else if(y+=c-C,C<B){for(B-=C;T[A++]=u[y++],--C;);y=A-E,S=T}for(;2<B;)T[A++]=S[y++],T[A++]=S[y++],T[A++]=S[y++],B-=3;B&&(T[A++]=S[y++],1<B&&(T[A++]=S[y++]))}else{for(y=A-E;T[A++]=T[y++],T[A++]=T[y++],T[A++]=T[y++],2<(B-=3););B&&(T[A++]=T[y++],1<B&&(T[A++]=T[y++]))}break}}break}}while(i<s&&A<o);i-=B=p>>3,d&=(1<<(p-=B<<3))-1,e.next_in=i,e.next_out=A,e.avail_in=i<s?s-i+5:5-(i-s),e.avail_out=A<o?o-A+257:257-(A-o),r.hold=d,r.bits=p}},{}],49:[function(e,t,r){var i=e("../utils/common"),s=e("./adler32"),A=e("./crc32"),n=e("./inffast"),o=e("./inftrees"),a=-2;function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):a}function u(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):a}function d(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?a:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,u(e))):a}function p(e,t){var r,i;return e?(i=new h,(e.state=i).window=null,0!==(r=d(e,t))&&(e.state=null),r):a}var g,_,m=!0;function f(e){if(m){var t;for(g=new i.Buf32(512),_=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,_,0,e.work,{bits:5}),m=!1}e.lencode=g,e.lenbits=9,e.distcode=_,e.distbits=5}function w(e,t,r,s){var A,n=e.state;return null===n.window&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new i.Buf8(n.wsize)),s>=n.wsize?(i.arraySet(n.window,t,r-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(s<(A=n.wsize-n.wnext)&&(A=s),i.arraySet(n.window,t,r-s,A,n.wnext),(s-=A)?(i.arraySet(n.window,t,r-s,s,0),n.wnext=s,n.whave=n.wsize):(n.wnext+=A,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=A))),0}r.inflateReset=u,r.inflateReset2=d,r.inflateResetKeep=c,r.inflateInit=function(e){return p(e,15)},r.inflateInit2=p,r.inflate=function(e,t){var r,h,c,u,d,p,g,_,m,C,B,E,y,S,b,T,I,P,R,v,x,O,F,L,D=0,U=new i.Buf8(4),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return a;12===(r=e.state).mode&&(r.mode=13),d=e.next_out,c=e.output,g=e.avail_out,u=e.next_in,h=e.input,p=e.avail_in,_=r.hold,m=r.bits,C=p,B=g,O=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(2&r.wrap&&35615===_){U[r.check=0]=255&_,U[1]=_>>>8&255,r.check=A(r.check,U,2,0),m=_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&_)){e.msg="unknown compression method",r.mode=30;break}if(m-=4,x=8+(15&(_>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<x,e.adler=r.check=1,r.mode=512&_?10:12,m=_=0;break;case 2:for(;m<16;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(r.flags=_,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(U[0]=255&_,U[1]=_>>>8&255,r.check=A(r.check,U,2,0)),m=_=0,r.mode=3;case 3:for(;m<32;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.head&&(r.head.time=_),512&r.flags&&(U[0]=255&_,U[1]=_>>>8&255,U[2]=_>>>16&255,U[3]=_>>>24&255,r.check=A(r.check,U,4,0)),m=_=0,r.mode=4;case 4:for(;m<16;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(U[0]=255&_,U[1]=_>>>8&255,r.check=A(r.check,U,2,0)),m=_=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(U[0]=255&_,U[1]=_>>>8&255,r.check=A(r.check,U,2,0)),m=_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(E=r.length)&&(E=p),E&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,h,u,E,x)),512&r.flags&&(r.check=A(r.check,h,E,u)),p-=E,u+=E,r.length-=E),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break e;for(E=0;x=h[u+E++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x)),x&&E<p;);if(512&r.flags&&(r.check=A(r.check,h,E,u)),p-=E,u+=E,x)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break e;for(E=0;x=h[u+E++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x)),x&&E<p;);if(512&r.flags&&(r.check=A(r.check,h,E,u)),p-=E,u+=E,x)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(_!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}m=_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;m<32;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}e.adler=r.check=l(_),m=_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=d,e.avail_out=g,e.next_in=u,e.avail_in=p,r.hold=_,r.bits=m,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){_>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}switch(r.last=1&_,m-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(f(r),r.mode=20,6!==t)break;_>>>=2,m-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}_>>>=2,m-=2;break;case 14:for(_>>>=7&m,m-=7&m;m<32;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if((65535&_)!=(_>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&_,m=_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(E=r.length){if(p<E&&(E=p),g<E&&(E=g),0===E)break e;i.arraySet(c,h,u,E,d),p-=E,u+=E,g-=E,d+=E,r.length-=E;break}r.mode=12;break;case 17:for(;m<14;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(r.nlen=257+(31&_),_>>>=5,m-=5,r.ndist=1+(31&_),_>>>=5,m-=5,r.ncode=4+(15&_),_>>>=4,m-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.lens[H[r.have++]]=7&_,_>>>=3,m-=3}for(;r.have<19;)r.lens[H[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,F={bits:r.lenbits},O=o(0,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,O){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;T=(D=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,I=65535&D,!((b=D>>>24)<=m);){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(I<16)_>>>=b,m-=b,r.lens[r.have++]=I;else{if(16===I){for(L=b+2;m<L;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(_>>>=b,m-=b,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}x=r.lens[r.have-1],E=3+(3&_),_>>>=2,m-=2}else if(17===I){for(L=b+3;m<L;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}m-=b,x=0,E=3+(7&(_>>>=b)),_>>>=3,m-=3}else{for(L=b+7;m<L;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}m-=b,x=0,E=11+(127&(_>>>=b)),_>>>=7,m-=7}if(r.have+E>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=x}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,F={bits:r.lenbits},O=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,O){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},O=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,O){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=p&&258<=g){e.next_out=d,e.avail_out=g,e.next_in=u,e.avail_in=p,r.hold=_,r.bits=m,n(e,B),d=e.next_out,c=e.output,g=e.avail_out,u=e.next_in,h=e.input,p=e.avail_in,_=r.hold,m=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(D=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,I=65535&D,!((b=D>>>24)<=m);){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(T&&0==(240&T)){for(P=b,R=T,v=I;T=(D=r.lencode[v+((_&(1<<P+R)-1)>>P)])>>>16&255,I=65535&D,!(P+(b=D>>>24)<=m);){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}_>>>=P,m-=P,r.back+=P}if(_>>>=b,m-=b,r.back+=b,r.length=I,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(L=r.extra;m<L;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(D=r.distcode[_&(1<<r.distbits)-1])>>>16&255,I=65535&D,!((b=D>>>24)<=m);){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(0==(240&T)){for(P=b,R=T,v=I;T=(D=r.distcode[v+((_&(1<<P+R)-1)>>P)])>>>16&255,I=65535&D,!(P+(b=D>>>24)<=m);){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}_>>>=P,m-=P,r.back+=P}if(_>>>=b,m-=b,r.back+=b,64&T){e.msg="invalid distance code",r.mode=30;break}r.offset=I,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(L=r.extra;m<L;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break e;if(E=B-g,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}y=E>r.wnext?(E-=r.wnext,r.wsize-E):r.wnext-E,E>r.length&&(E=r.length),S=r.window}else S=c,y=d-r.offset,E=r.length;for(g<E&&(E=g),g-=E,r.length-=E;c[d++]=S[y++],--E;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break e;c[d++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===p)break e;p--,_|=h[u++]<<m,m+=8}if(B-=g,e.total_out+=B,r.total+=B,B&&(e.adler=r.check=r.flags?A(r.check,c,B,d-B):s(r.check,c,B,d-B)),B=g,(r.flags?_:l(_))!==r.check){e.msg="incorrect data check",r.mode=30;break}m=_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===p)break e;p--,_+=h[u++]<<m,m+=8}if(_!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}m=_=0}r.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;default:return a}return e.next_out=d,e.avail_out=g,e.next_in=u,e.avail_in=p,r.hold=_,r.bits=m,(r.wsize||B!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,B-e.avail_out)?(r.mode=31,-4):(C-=e.avail_in,B-=e.avail_out,e.total_in+=C,e.total_out+=B,r.total+=B,r.wrap&&B&&(e.adler=r.check=r.flags?A(r.check,c,B,e.next_out-B):s(r.check,c,B,e.next_out-B)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==C&&0===B||4===t)&&0===O&&(O=-5),O)},r.inflateEnd=function(e){if(!e||!e.state)return a;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?a:((r.head=t).done=!1,0):a},r.inflateSetDictionary=function(e,t){var r,i=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?a:11===r.mode&&s(1,t,i,0)!==r.check?-3:w(e,t,i,i)?(r.mode=31,-4):(r.havedict=1,0):a},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var i=e("../utils/common"),s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],A=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],n=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,a,l,h,c,u){var d,p,g,_,m,f,w,C,B,E=u.bits,y=0,S=0,b=0,T=0,I=0,P=0,R=0,v=0,x=0,O=0,F=null,L=0,D=new i.Buf16(16),U=new i.Buf16(16),H=null,N=0;for(y=0;y<=15;y++)D[y]=0;for(S=0;S<a;S++)D[t[r+S]]++;for(I=E,T=15;1<=T&&0===D[T];T--);if(T<I&&(I=T),0===T)return l[h++]=20971520,l[h++]=20971520,u.bits=1,0;for(b=1;b<T&&0===D[b];b++);for(I<b&&(I=b),y=v=1;y<=15;y++)if(v<<=1,(v-=D[y])<0)return-1;if(0<v&&(0===e||1!==T))return-1;for(U[1]=0,y=1;y<15;y++)U[y+1]=U[y]+D[y];for(S=0;S<a;S++)0!==t[r+S]&&(c[U[t[r+S]]++]=S);if(f=0===e?(F=H=c,19):1===e?(F=s,L-=257,H=A,N-=257,256):(F=n,H=o,-1),y=b,m=h,R=S=O=0,g=-1,_=(x=1<<(P=I))-1,1===e&&852<x||2===e&&592<x)return 1;for(;;){for(w=y-R,B=c[S]<f?(C=0,c[S]):c[S]>f?(C=H[N+c[S]],F[L+c[S]]):(C=96,0),d=1<<y-R,b=p=1<<P;l[m+(O>>R)+(p-=d)]=w<<24|C<<16|B|0,0!==p;);for(d=1<<y-1;O&d;)d>>=1;if(0!==d?(O&=d-1,O+=d):O=0,S++,0==--D[y]){if(y===T)break;y=t[r+c[S]]}if(I<y&&(O&_)!==g){for(0===R&&(R=I),m+=b,v=1<<(P=y-R);P+R<T&&!((v-=D[P+R])<=0);)P++,v<<=1;if(x+=1<<P,1===e&&852<x||2===e&&592<x)return 1;l[g=O&_]=I<<24|P<<16|m-h|0}}return 0!==O&&(l[m+O]=y-R<<24|64<<16|0),u.bits=I,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var i=e("../utils/common");function s(e){for(var t=e.length;0<=--t;)e[t]=0}var A=256,n=286,o=30,a=15,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],h=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);s(d);var p=new Array(60);s(p);var g=new Array(512);s(g);var _=new Array(256);s(_);var m=new Array(29);s(m);var f,w,C,B=new Array(o);function E(e,t,r,i,s){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=s,this.has_stree=e&&e.length}function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?g[e]:g[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function T(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,b(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function I(e,t,r){T(e,r[2*t],r[2*t+1])}function P(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function R(e,t,r){var i,s,A=new Array(16),n=0;for(i=1;i<=a;i++)A[i]=n=n+r[i-1]<<1;for(s=0;s<=t;s++){var o=e[2*s+1];0!==o&&(e[2*s]=P(A[o]++,o))}}function v(e){var t;for(t=0;t<n;t++)e.dyn_ltree[2*t]=0;for(t=0;t<o;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function x(e){8<e.bi_valid?b(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function O(e,t,r,i){var s=2*t,A=2*r;return e[s]<e[A]||e[s]===e[A]&&i[t]<=i[r]}function F(e,t,r){for(var i=e.heap[r],s=r<<1;s<=e.heap_len&&(s<e.heap_len&&O(t,e.heap[s+1],e.heap[s],e.depth)&&s++,!O(t,i,e.heap[s],e.depth));)e.heap[r]=e.heap[s],r=s,s<<=1;e.heap[r]=i}function L(e,t,r){var i,s,n,o,a=0;if(0!==e.last_lit)for(;i=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],s=e.pending_buf[e.l_buf+a],a++,0===i?I(e,s,t):(I(e,(n=_[s])+A+1,t),0!==(o=l[n])&&T(e,s-=m[n],o),I(e,n=S(--i),r),0!==(o=h[n])&&T(e,i-=B[n],o)),a<e.last_lit;);I(e,256,t)}function D(e,t){var r,i,s,A=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.elems,h=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==A[2*r]?(e.heap[++e.heap_len]=h=r,e.depth[r]=0):A[2*r+1]=0;for(;e.heap_len<2;)A[2*(s=e.heap[++e.heap_len]=h<2?++h:0)]=1,e.depth[s]=0,e.opt_len--,o&&(e.static_len-=n[2*s+1]);for(t.max_code=h,r=e.heap_len>>1;1<=r;r--)F(e,A,r);for(s=l;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F(e,A,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,A[2*s]=A[2*r]+A[2*i],e.depth[s]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,A[2*r+1]=A[2*i+1]=s,e.heap[1]=s++,F(e,A,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,s,A,n,o,l=t.dyn_tree,h=t.max_code,c=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(A=0;A<=a;A++)e.bl_count[A]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)g<(A=l[2*l[2*(i=e.heap[r])+1]+1]+1)&&(A=g,_++),l[2*i+1]=A,h<i||(e.bl_count[A]++,n=0,p<=i&&(n=d[i-p]),o=l[2*i],e.opt_len+=o*(A+n),u&&(e.static_len+=o*(c[2*i+1]+n)));if(0!==_){do{for(A=g-1;0===e.bl_count[A];)A--;e.bl_count[A]--,e.bl_count[A+1]+=2,e.bl_count[g]--,_-=2}while(0<_);for(A=g;0!==A;A--)for(i=e.bl_count[A];0!==i;)h<(s=e.heap[--r])||(l[2*s+1]!==A&&(e.opt_len+=(A-l[2*s+1])*l[2*s],l[2*s+1]=A),i--)}}(e,t),R(A,h,e.bl_count)}function U(e,t,r){var i,s,A=-1,n=t[1],o=0,a=7,l=4;for(0===n&&(a=138,l=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)s=n,n=t[2*(i+1)+1],++o<a&&s===n||(o<l?e.bl_tree[2*s]+=o:0!==s?(s!==A&&e.bl_tree[2*s]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,A=s,l=(o=0)===n?(a=138,3):s===n?(a=6,3):(a=7,4))}function H(e,t,r){var i,s,A=-1,n=t[1],o=0,a=7,l=4;for(0===n&&(a=138,l=3),i=0;i<=r;i++)if(s=n,n=t[2*(i+1)+1],!(++o<a&&s===n)){if(o<l)for(;I(e,s,e.bl_tree),0!=--o;);else 0!==s?(s!==A&&(I(e,s,e.bl_tree),o--),I(e,16,e.bl_tree),T(e,o-3,2)):o<=10?(I(e,17,e.bl_tree),T(e,o-3,3)):(I(e,18,e.bl_tree),T(e,o-11,7));A=s,l=(o=0)===n?(a=138,3):s===n?(a=6,3):(a=7,4)}}s(B);var N=!1;function Q(e,t,r,s){T(e,0+(s?1:0),3),function(e,t,r,s){x(e),b(e,r),b(e,~r),i.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}r._tr_init=function(e){N||(function(){var e,t,r,i,s,A=new Array(16);for(i=r=0;i<28;i++)for(m[i]=r,e=0;e<1<<l[i];e++)_[r++]=i;for(_[r-1]=i,i=s=0;i<16;i++)for(B[i]=s,e=0;e<1<<h[i];e++)g[s++]=i;for(s>>=7;i<o;i++)for(B[i]=s<<7,e=0;e<1<<h[i]-7;e++)g[256+s++]=i;for(t=0;t<=a;t++)A[t]=0;for(e=0;e<=143;)d[2*e+1]=8,e++,A[8]++;for(;e<=255;)d[2*e+1]=9,e++,A[9]++;for(;e<=279;)d[2*e+1]=7,e++,A[7]++;for(;e<=287;)d[2*e+1]=8,e++,A[8]++;for(R(d,287,A),e=0;e<o;e++)p[2*e+1]=5,p[2*e]=P(e,5);f=new E(d,l,257,n,a),w=new E(p,h,0,o,a),C=new E(new Array(0),c,0,19,7)}(),N=!0),e.l_desc=new y(e.dyn_ltree,f),e.d_desc=new y(e.dyn_dtree,w),e.bl_desc=new y(e.bl_tree,C),e.bi_buf=0,e.bi_valid=0,v(e)},r._tr_stored_block=Q,r._tr_flush_block=function(e,t,r,i){var s,n,o=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<A;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),D(e,e.l_desc),D(e,e.d_desc),o=function(e){var t;for(U(e,e.dyn_ltree,e.l_desc.max_code),U(e,e.dyn_dtree,e.d_desc.max_code),D(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(n=e.static_len+3+7>>>3)<=s&&(s=n)):s=n=r+5,r+4<=s&&-1!==t?Q(e,t,r,i):4===e.strategy||n===s?(T(e,2+(i?1:0),3),L(e,d,p)):(T(e,4+(i?1:0),3),function(e,t,r,i){var s;for(T(e,t-257,5),T(e,r-1,5),T(e,i-4,4),s=0;s<i;s++)T(e,e.bl_tree[2*u[s]+1],3);H(e,e.dyn_ltree,t-1),H(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),L(e,e.dyn_ltree,e.dyn_dtree)),v(e),i&&x(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(_[r]+A+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){T(e,2,3),I(e,256,d),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)},155:e=>{var t,r,i=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}function n(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:A}catch(e){r=A}}();var o,a=[],l=!1,h=-1;function c(){l&&o&&(l=!1,o.length?a=o.concat(a):h=-1,a.length&&u())}function u(){if(!l){var e=n(c);l=!0;for(var t=a.length;t;){for(o=a,a=[];++h<t;)o&&o[h].run();h=-1,t=a.length}o=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===A||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.push(new d(e,t)),1!==a.length||l||n(u)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},509:(e,t,r)=>{var i=r(764),s=i.Buffer;function A(e,t){for(var r in e)t[r]=e[r]}function n(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=i:(A(i,t),t.Buffer=n),A(s,n),n.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},n.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=s(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},n.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},n.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},99:(e,t,r)=>{!function(e){e.parser=function(e,t){return new s(e,t)},e.SAXParser=s,e.SAXStream=n,e.createStream=function(e,t){return new n(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function s(t,r){if(!(this instanceof s))return new s(t,r);var A=this;!function(e){for(var t=0,r=i.length;t<r;t++)e[i[t]]=""}(A),A.q=A.c="",A.bufferCheckPosition=e.MAX_BUFFER_LENGTH,A.opt=r||{},A.opt.lowercase=A.opt.lowercase||A.opt.lowercasetags,A.looseCase=A.opt.lowercase?"toLowerCase":"toUpperCase",A.tags=[],A.closed=A.closedRoot=A.sawRoot=!1,A.tag=A.error=null,A.strict=!!t,A.noscript=!(!t&&!A.opt.noscript),A.state=E.BEGIN,A.strictEntities=A.opt.strictEntities,A.ENTITIES=A.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),A.attribList=[],A.opt.xmlns&&(A.ns=Object.create(l)),A.trackPosition=!1!==A.opt.position,A.trackPosition&&(A.position=A.line=A.column=0),S(A,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}),s.prototype={end:function(){R(this)},write:function(t){var r=this;if(this.error)throw this.error;if(r.closed)return P(r,"Cannot write after close. Assign an onready handler.");if(null===t)return R(r);"object"==typeof t&&(t=t.toString());for(var s=0,A="";A=N(t,s++),r.c=A,A;)switch(r.trackPosition&&(r.position++,"\n"===A?(r.line++,r.column=0):r.column++),r.state){case E.BEGIN:if(r.state=E.BEGIN_WHITESPACE,"\ufeff"===A)continue;H(r,A);continue;case E.BEGIN_WHITESPACE:H(r,A);continue;case E.TEXT:if(r.sawRoot&&!r.closedRoot){for(var n=s-1;A&&"<"!==A&&"&"!==A;)(A=N(t,s++))&&r.trackPosition&&(r.position++,"\n"===A?(r.line++,r.column=0):r.column++);r.textNode+=t.substring(n,s-1)}"<"!==A||r.sawRoot&&r.closedRoot&&!r.strict?(p(A)||r.sawRoot&&!r.closedRoot||v(r,"Text data outside of root node."),"&"===A?r.state=E.TEXT_ENTITY:r.textNode+=A):(r.state=E.OPEN_WAKA,r.startTagPosition=r.position);continue;case E.SCRIPT:"<"===A?r.state=E.SCRIPT_ENDING:r.script+=A;continue;case E.SCRIPT_ENDING:"/"===A?r.state=E.CLOSE_TAG:(r.script+="<"+A,r.state=E.SCRIPT);continue;case E.OPEN_WAKA:if("!"===A)r.state=E.SGML_DECL,r.sgmlDecl="";else if(p(A));else if(m(h,A))r.state=E.OPEN_TAG,r.tagName=A;else if("/"===A)r.state=E.CLOSE_TAG,r.tagName="";else if("?"===A)r.state=E.PROC_INST,r.procInstName=r.procInstBody="";else{if(v(r,"Unencoded <"),r.startTagPosition+1<r.position){var o=r.position-r.startTagPosition;A=new Array(o).join(" ")+A}r.textNode+="<"+A,r.state=E.TEXT}continue;case E.SGML_DECL:"[CDATA["===(r.sgmlDecl+A).toUpperCase()?(b(r,"onopencdata"),r.state=E.CDATA,r.sgmlDecl="",r.cdata=""):r.sgmlDecl+A==="--"?(r.state=E.COMMENT,r.comment="",r.sgmlDecl=""):"DOCTYPE"===(r.sgmlDecl+A).toUpperCase()?(r.state=E.DOCTYPE,(r.doctype||r.sawRoot)&&v(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===A?(b(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=E.TEXT):g(A)?(r.state=E.SGML_DECL_QUOTED,r.sgmlDecl+=A):r.sgmlDecl+=A;continue;case E.SGML_DECL_QUOTED:A===r.q&&(r.state=E.SGML_DECL,r.q=""),r.sgmlDecl+=A;continue;case E.DOCTYPE:">"===A?(r.state=E.TEXT,b(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=A,"["===A?r.state=E.DOCTYPE_DTD:g(A)&&(r.state=E.DOCTYPE_QUOTED,r.q=A));continue;case E.DOCTYPE_QUOTED:r.doctype+=A,A===r.q&&(r.q="",r.state=E.DOCTYPE);continue;case E.DOCTYPE_DTD:r.doctype+=A,"]"===A?r.state=E.DOCTYPE:g(A)&&(r.state=E.DOCTYPE_DTD_QUOTED,r.q=A);continue;case E.DOCTYPE_DTD_QUOTED:r.doctype+=A,A===r.q&&(r.state=E.DOCTYPE_DTD,r.q="");continue;case E.COMMENT:"-"===A?r.state=E.COMMENT_ENDING:r.comment+=A;continue;case E.COMMENT_ENDING:"-"===A?(r.state=E.COMMENT_ENDED,r.comment=I(r.opt,r.comment),r.comment&&b(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+A,r.state=E.COMMENT);continue;case E.COMMENT_ENDED:">"!==A?(v(r,"Malformed comment"),r.comment+="--"+A,r.state=E.COMMENT):r.state=E.TEXT;continue;case E.CDATA:"]"===A?r.state=E.CDATA_ENDING:r.cdata+=A;continue;case E.CDATA_ENDING:"]"===A?r.state=E.CDATA_ENDING_2:(r.cdata+="]"+A,r.state=E.CDATA);continue;case E.CDATA_ENDING_2:">"===A?(r.cdata&&b(r,"oncdata",r.cdata),b(r,"onclosecdata"),r.cdata="",r.state=E.TEXT):"]"===A?r.cdata+="]":(r.cdata+="]]"+A,r.state=E.CDATA);continue;case E.PROC_INST:"?"===A?r.state=E.PROC_INST_ENDING:p(A)?r.state=E.PROC_INST_BODY:r.procInstName+=A;continue;case E.PROC_INST_BODY:if(!r.procInstBody&&p(A))continue;"?"===A?r.state=E.PROC_INST_ENDING:r.procInstBody+=A;continue;case E.PROC_INST_ENDING:">"===A?(b(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=E.TEXT):(r.procInstBody+="?"+A,r.state=E.PROC_INST_BODY);continue;case E.OPEN_TAG:m(c,A)?r.tagName+=A:(x(r),">"===A?L(r):"/"===A?r.state=E.OPEN_TAG_SLASH:(p(A)||v(r,"Invalid character in tag name"),r.state=E.ATTRIB));continue;case E.OPEN_TAG_SLASH:">"===A?(L(r,!0),D(r)):(v(r,"Forward-slash in opening tag not followed by >"),r.state=E.ATTRIB);continue;case E.ATTRIB:if(p(A))continue;">"===A?L(r):"/"===A?r.state=E.OPEN_TAG_SLASH:m(h,A)?(r.attribName=A,r.attribValue="",r.state=E.ATTRIB_NAME):v(r,"Invalid attribute name");continue;case E.ATTRIB_NAME:"="===A?r.state=E.ATTRIB_VALUE:">"===A?(v(r,"Attribute without value"),r.attribValue=r.attribName,F(r),L(r)):p(A)?r.state=E.ATTRIB_NAME_SAW_WHITE:m(c,A)?r.attribName+=A:v(r,"Invalid attribute name");continue;case E.ATTRIB_NAME_SAW_WHITE:if("="===A)r.state=E.ATTRIB_VALUE;else{if(p(A))continue;v(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",b(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===A?L(r):m(h,A)?(r.attribName=A,r.state=E.ATTRIB_NAME):(v(r,"Invalid attribute name"),r.state=E.ATTRIB)}continue;case E.ATTRIB_VALUE:if(p(A))continue;g(A)?(r.q=A,r.state=E.ATTRIB_VALUE_QUOTED):(v(r,"Unquoted attribute value"),r.state=E.ATTRIB_VALUE_UNQUOTED,r.attribValue=A);continue;case E.ATTRIB_VALUE_QUOTED:if(A!==r.q){"&"===A?r.state=E.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=A;continue}F(r),r.q="",r.state=E.ATTRIB_VALUE_CLOSED;continue;case E.ATTRIB_VALUE_CLOSED:p(A)?r.state=E.ATTRIB:">"===A?L(r):"/"===A?r.state=E.OPEN_TAG_SLASH:m(h,A)?(v(r,"No whitespace between attributes"),r.attribName=A,r.attribValue="",r.state=E.ATTRIB_NAME):v(r,"Invalid attribute name");continue;case E.ATTRIB_VALUE_UNQUOTED:if(!_(A)){"&"===A?r.state=E.ATTRIB_VALUE_ENTITY_U:r.attribValue+=A;continue}F(r),">"===A?L(r):r.state=E.ATTRIB;continue;case E.CLOSE_TAG:if(r.tagName)">"===A?D(r):m(c,A)?r.tagName+=A:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=E.SCRIPT):(p(A)||v(r,"Invalid tagname in closing tag"),r.state=E.CLOSE_TAG_SAW_WHITE);else{if(p(A))continue;f(h,A)?r.script?(r.script+="</"+A,r.state=E.SCRIPT):v(r,"Invalid tagname in closing tag."):r.tagName=A}continue;case E.CLOSE_TAG_SAW_WHITE:if(p(A))continue;">"===A?D(r):v(r,"Invalid characters in closing tag");continue;case E.TEXT_ENTITY:case E.ATTRIB_VALUE_ENTITY_Q:case E.ATTRIB_VALUE_ENTITY_U:var a,l;switch(r.state){case E.TEXT_ENTITY:a=E.TEXT,l="textNode";break;case E.ATTRIB_VALUE_ENTITY_Q:a=E.ATTRIB_VALUE_QUOTED,l="attribValue";break;case E.ATTRIB_VALUE_ENTITY_U:a=E.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===A?(r[l]+=U(r),r.entity="",r.state=a):m(r.entity.length?d:u,A)?r.entity+=A:(v(r,"Invalid character in entity name"),r[l]+="&"+r.entity+A,r.entity="",r.state=a);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(t){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),s=0,A=0,n=i.length;A<n;A++){var o=t[i[A]].length;if(o>r)switch(i[A]){case"textNode":T(t);break;case"cdata":b(t,"oncdata",t.cdata),t.cdata="";break;case"script":b(t,"onscript",t.script),t.script="";break;default:P(t,"Max buffer length exceeded: "+i[A])}s=Math.max(s,o)}var a=e.MAX_BUFFER_LENGTH-s;t.bufferCheckPosition=a+t.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;T(e=this),""!==e.cdata&&(b(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(b(e,"onscript",e.script),e.script="")}};try{t=r(830).Stream}catch(e){t=function(){}}var A=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function n(e,r){if(!(this instanceof n))return new n(e,r);t.apply(this),this._parser=new s(e,r),this.writable=!0,this.readable=!0;var i=this;this._parser.onend=function(){i.emit("end")},this._parser.onerror=function(e){i.emit("error",e),i._parser.error=null},this._decoder=null,A.forEach((function(e){Object.defineProperty(i,"on"+e,{get:function(){return i._parser["on"+e]},set:function(t){if(!t)return i.removeAllListeners(e),i._parser["on"+e]=t,t;i.on(e,t)},enumerable:!0,configurable:!1})}))}n.prototype=Object.create(t.prototype,{constructor:{value:n}}),n.prototype.write=function(e){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)){if(!this._decoder){var t=r(553).s;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},n.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},n.prototype.on=function(e,r){var i=this;return i._parser["on"+e]||-1===A.indexOf(e)||(i._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),i.emit.apply(i,t)}),t.prototype.on.call(i,e,r)};var o="http://www.w3.org/XML/1998/namespace",a="http://www.w3.org/2000/xmlns/",l={xml:o,xmlns:a},h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,c=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,u=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function p(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function g(e){return'"'===e||"'"===e}function _(e){return">"===e||p(e)}function m(e,t){return e.test(t)}function f(e,t){return!m(e,t)}var w,C,B,E=0;for(var y in e.STATE={BEGIN:E++,BEGIN_WHITESPACE:E++,TEXT:E++,TEXT_ENTITY:E++,OPEN_WAKA:E++,SGML_DECL:E++,SGML_DECL_QUOTED:E++,DOCTYPE:E++,DOCTYPE_QUOTED:E++,DOCTYPE_DTD:E++,DOCTYPE_DTD_QUOTED:E++,COMMENT_STARTING:E++,COMMENT:E++,COMMENT_ENDING:E++,COMMENT_ENDED:E++,CDATA:E++,CDATA_ENDING:E++,CDATA_ENDING_2:E++,PROC_INST:E++,PROC_INST_BODY:E++,PROC_INST_ENDING:E++,OPEN_TAG:E++,OPEN_TAG_SLASH:E++,ATTRIB:E++,ATTRIB_NAME:E++,ATTRIB_NAME_SAW_WHITE:E++,ATTRIB_VALUE:E++,ATTRIB_VALUE_QUOTED:E++,ATTRIB_VALUE_CLOSED:E++,ATTRIB_VALUE_UNQUOTED:E++,ATTRIB_VALUE_ENTITY_Q:E++,ATTRIB_VALUE_ENTITY_U:E++,CLOSE_TAG:E++,CLOSE_TAG_SAW_WHITE:E++,SCRIPT:E++,SCRIPT_ENDING:E++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var r=e.ENTITIES[t],i="number"==typeof r?String.fromCharCode(r):r;e.ENTITIES[t]=i})),e.STATE)e.STATE[e.STATE[y]]=y;function S(e,t,r){e[t]&&e[t](r)}function b(e,t,r){e.textNode&&T(e),S(e,t,r)}function T(e){e.textNode=I(e.opt,e.textNode),e.textNode&&S(e,"ontext",e.textNode),e.textNode=""}function I(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function P(e,t){return T(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,S(e,"onerror",t),e}function R(e){return e.sawRoot&&!e.closedRoot&&v(e,"Unclosed root tag"),e.state!==E.BEGIN&&e.state!==E.BEGIN_WHITESPACE&&e.state!==E.TEXT&&P(e,"Unexpected end"),T(e),e.c="",e.closed=!0,S(e,"onend"),s.call(e,e.strict,e.opt),e}function v(e,t){if("object"!=typeof e||!(e instanceof s))throw new Error("bad call to strictFail");e.strict&&P(e,t)}function x(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns),e.attribList.length=0,b(e,"onopentagstart",r)}function O(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),i=r[0],s=r[1];return t&&"xmlns"===e&&(i="xmlns",s=""),{prefix:i,local:s}}function F(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=O(e.attribName,!0),r=t.prefix,i=t.local;if("xmlns"===r)if("xml"===i&&e.attribValue!==o)v(e,"xml: prefix must be bound to "+o+"\nActual: "+e.attribValue);else if("xmlns"===i&&e.attribValue!==a)v(e,"xmlns: prefix must be bound to "+a+"\nActual: "+e.attribValue);else{var s=e.tag,A=e.tags[e.tags.length-1]||e;s.ns===A.ns&&(s.ns=Object.create(A.ns)),s.ns[i]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,b(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function L(e,t){if(e.opt.xmlns){var r=e.tag,i=O(e.tagName);r.prefix=i.prefix,r.local=i.local,r.uri=r.ns[i.prefix]||"",r.prefix&&!r.uri&&(v(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),r.uri=i.prefix);var s=e.tags[e.tags.length-1]||e;r.ns&&s.ns!==r.ns&&Object.keys(r.ns).forEach((function(t){b(e,"onopennamespace",{prefix:t,uri:r.ns[t]})}));for(var A=0,n=e.attribList.length;A<n;A++){var o=e.attribList[A],a=o[0],l=o[1],h=O(a,!0),c=h.prefix,u=h.local,d=""===c?"":r.ns[c]||"",p={name:a,value:l,prefix:c,local:u,uri:d};c&&"xmlns"!==c&&!d&&(v(e,"Unbound namespace prefix: "+JSON.stringify(c)),p.uri=c),e.tag.attributes[a]=p,b(e,"onattribute",p)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),b(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=E.TEXT:e.state=E.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function D(e){if(!e.tagName)return v(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=E.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=E.SCRIPT);b(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var i=r;t--&&e.tags[t].name!==i;)v(e,"Unexpected close tag");if(t<0)return v(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=E.TEXT);e.tagName=r;for(var s=e.tags.length;s-- >t;){var A=e.tag=e.tags.pop();e.tagName=e.tag.name,b(e,"onclosetag",e.tagName);var n={};for(var o in A.ns)n[o]=A.ns[o];var a=e.tags[e.tags.length-1]||e;e.opt.xmlns&&A.ns!==a.ns&&Object.keys(A.ns).forEach((function(t){var r=A.ns[t];b(e,"onclosenamespace",{prefix:t,uri:r})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=E.TEXT}function U(e){var t,r=e.entity,i=r.toLowerCase(),s="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[i]?e.ENTITIES[i]:("#"===(r=i).charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),s=(t=parseInt(r,16)).toString(16)):(r=r.slice(1),s=(t=parseInt(r,10)).toString(10))),r=r.replace(/^0+/,""),isNaN(t)||s.toLowerCase()!==r?(v(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function H(e,t){"<"===t?(e.state=E.OPEN_WAKA,e.startTagPosition=e.position):p(t)||(v(e,"Non-whitespace before first tag."),e.textNode=t,e.state=E.TEXT)}function N(e,t){var r="";return t<e.length&&(r=e.charAt(t)),r}E=e.STATE,String.fromCodePoint||(w=String.fromCharCode,C=Math.floor,B=function(){var e,t,r=16384,i=[],s=-1,A=arguments.length;if(!A)return"";for(var n="";++s<A;){var o=Number(arguments[s]);if(!isFinite(o)||o<0||o>1114111||C(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?i.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,i.push(e,t)),(s+1===A||i.length>r)&&(n+=w.apply(null,i),i.length=0)}return n},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:B,configurable:!0,writable:!0}):String.fromCodePoint=B)}(t)},830:(e,t,r)=>{e.exports=s;var i=r(187).EventEmitter;function s(){i.call(this)}r(717)(s,i),s.Readable=r(577),s.Writable=r(323),s.Duplex=r(656),s.Transform=r(473),s.PassThrough=r(366),s.finished=r(86),s.pipeline=r(472),s.Stream=s,s.prototype.pipe=function(e,t){var r=this;function s(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function A(){r.readable&&r.resume&&r.resume()}r.on("data",s),e.on("drain",A),e._isStdio||t&&!1===t.end||(r.on("end",o),r.on("close",a));var n=!1;function o(){n||(n=!0,e.end())}function a(){n||(n=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(h(),0===i.listenerCount(this,"error"))throw e}function h(){r.removeListener("data",s),e.removeListener("drain",A),r.removeListener("end",o),r.removeListener("close",a),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("error",l),e.on("error",l),r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e}},106:e=>{var t={};function r(e,r,i){i||(i=Error);var s=function(e){var t,i;function s(t,i,s){return e.call(this,function(e,t,i){return"string"==typeof r?r:r(e,t,i)}(t,i,s))||this}return i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,s}(i);s.prototype.name=i.name,s.prototype.code=e,t[e]=s}function i(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var s,A,n,o,a;if("string"==typeof t&&(A="not ",t.substr(0,A.length)===A)?(s="must not be",t=t.replace(/^not /,"")):s="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))n="The ".concat(e," ").concat(s," ").concat(i(t,"type"));else{var l=("number"!=typeof a&&(a=0),a+".".length>(o=e).length||-1===o.indexOf(".",a)?"argument":"property");n='The "'.concat(e,'" ').concat(l," ").concat(s," ").concat(i(t,"type"))}return n+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},656:(e,t,r)=>{var i=r(155),s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var A=r(577),n=r(323);r(717)(h,A);for(var o=s(n.prototype),a=0;a<o.length;a++){var l=o[a];h.prototype[l]||(h.prototype[l]=n.prototype[l])}function h(e){if(!(this instanceof h))return new h(e);A.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||i.nextTick(u,this)}function u(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},366:(e,t,r)=>{e.exports=s;var i=r(473);function s(e){if(!(this instanceof s))return new s(e);i.call(this,e)}r(717)(s,i),s.prototype._transform=function(e,t,r){r(null,e)}},577:(e,t,r)=>{var i,s=r(155);e.exports=b,b.ReadableState=S,r(187).EventEmitter;var A,n=function(e,t){return e.listeners(t).length},o=r(194),a=r(764).Buffer,l=r.g.Uint8Array||function(){},h=r(964);A=h&&h.debuglog?h.debuglog("stream"):function(){};var c,u,d,p=r(686),g=r(29),_=r(94).getHighWaterMark,m=r(106).q,f=m.ERR_INVALID_ARG_TYPE,w=m.ERR_STREAM_PUSH_AFTER_EOF,C=m.ERR_METHOD_NOT_IMPLEMENTED,B=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(717)(b,o);var E=g.errorOrDestroy,y=["error","close","destroy","pause","resume"];function S(e,t,s){i=i||r(656),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=_(this,e,"readableHighWaterMark",s),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=r(553).s),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(656),!(this instanceof b))return new b(e);var t=this instanceof i;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function T(e,t,r,i,s){A("readableAddChunk",t);var n,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(A("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?v(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}}(e,o);else if(s||(n=function(e,t){var r,i;return i=t,a.isBuffer(i)||i instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new f("chunk",["string","Buffer","Uint8Array"],t)),r}(o,t)),n)E(e,n);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),i)o.endEmitted?E(e,new B):I(e,o,t,!0);else if(o.ended)E(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?I(e,o,t,!1):O(e,o)):I(e,o,t,!1)}else i||(o.reading=!1,O(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function I(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&v(e)),O(e,t)}Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){t(e)},b.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=a.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},b.prototype.unshift=function(e){return T(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){c||(c=r(553).s);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,s="";null!==i;)s+=t.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this};var P=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=P?e=P:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function v(e){var t=e._readableState;A("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(A("emitReadable",t.flowing),t.emittedReadable=!0,s.nextTick(x,e))}function x(e){var t=e._readableState;A("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,H(e)}function O(e,t){t.readingMore||(t.readingMore=!0,s.nextTick(F,e,t))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(A("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){A("readable nexttick read 0"),e.read(0)}function U(e,t){A("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),H(e),t.flowing&&!t.reading&&e.read(0)}function H(e){var t=e._readableState;for(A("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function Q(e){var t=e._readableState;A("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,s.nextTick(M,t,e))}function M(e,t){if(A("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function k(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}b.prototype.read=function(e){A("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return A("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):v(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&Q(this),null;var i,s=t.needReadable;return A("need readable",s),(0===t.length||t.length-e<t.highWaterMark)&&A("length less than watermark",s=!0),t.ended||t.reading?A("reading or ended",s=!1):s&&(A("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null!==i&&this.emit("data",i),i},b.prototype._read=function(e){E(this,new C("_read()"))},b.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,A("pipe count=%d opts=%j",i.pipesCount,t);var o=t&&!1===t.end||e===s.stdout||e===s.stderr?g:a;function a(){A("onend"),e.end()}i.endEmitted?s.nextTick(o):r.once("end",o),e.on("unpipe",(function t(s,n){A("onunpipe"),s===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,A("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",u),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;A("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,H(e))}}(r);e.on("drain",l);var h=!1;function c(t){A("ondata");var s=e.write(t);A("dest.write",s),!1===s&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==k(i.pipes,e))&&!h&&(A("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function u(t){A("onerror",t),g(),e.removeListener("error",u),0===n(e,"error")&&E(e,t)}function d(){e.removeListener("finish",p),g()}function p(){A("onfinish"),e.removeListener("close",d),g()}function g(){A("unpipe"),r.unpipe(e)}return r.on("data",c),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",u),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(A("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,s=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var A=0;A<s;A++)i[A].emit("unpipe",this,{hasUnpiped:!1});return this}var n=k(t.pipes,e);return-1===n||(t.pipes.splice(n,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,A("on readable",i.length,i.reading),i.length?v(this):i.reading||s.nextTick(D,this))),r},b.prototype.addListener=b.prototype.on,b.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&s.nextTick(L,this),r},b.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||s.nextTick(L,this),t},b.prototype.resume=function(){var e=this._readableState;return e.flowing||(A("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,s.nextTick(U,e,t))}(this,e)),e.paused=!1,this},b.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},b.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var s in e.on("end",(function(){if(A("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(s){A("wrapped data"),r.decoder&&(s=r.decoder.write(s)),r.objectMode&&null==s||(r.objectMode||s&&s.length)&&(t.push(s)||(i=!0,e.pause()))})),e)void 0===this[s]&&"function"==typeof e[s]&&(this[s]=function(t){return function(){return e[t].apply(e,arguments)}}(s));for(var n=0;n<y.length;n++)e.on(y[n],this.emit.bind(this,y[n]));return this._read=function(t){A("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(b.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=r(828)),u(this)}),Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(b.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(b.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),b._fromList=N,Object.defineProperty(b.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(b.from=function(e,t){return void 0===d&&(d=r(265)),d(b,e,t)})},473:(e,t,r)=>{e.exports=h;var i=r(106).q,s=i.ERR_METHOD_NOT_IMPLEMENTED,A=i.ERR_MULTIPLE_CALLBACK,n=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=i.ERR_TRANSFORM_WITH_LENGTH_0,a=r(656);function l(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new A);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function h(e){if(!(this instanceof h))return new h(e);a.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(t,r){u(e,t,r)}))}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new n;return e.push(null)}r(717)(h,a),h.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},h.prototype._transform=function(e,t,r){r(new s("_transform()"))},h.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var s=this._readableState;(i.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}},h.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},h.prototype._destroy=function(e,t){a.prototype._destroy.call(this,e,(function(e){t(e)}))}},323:(e,t,r)=>{var i,s=r(155);function A(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;for(e.entry=null;i;){var s=i.callback;t.pendingcb--,s(void 0),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=b,b.WritableState=S;var n,o={deprecate:r(927)},a=r(194),l=r(764).Buffer,h=r.g.Uint8Array||function(){},c=r(29),u=r(94).getHighWaterMark,d=r(106).q,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,f=d.ERR_STREAM_DESTROYED,w=d.ERR_STREAM_NULL_VALUES,C=d.ERR_STREAM_WRITE_AFTER_END,B=d.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;function y(){}function S(e,t,n){i=i||r(656),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,A=r.writecb;if("function"!=typeof A)throw new _;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,A){--t.pendingcb,r?(s.nextTick(A,i),s.nextTick(x,e,t),e._writableState.errorEmitted=!0,E(e,i)):(A(i),e._writableState.errorEmitted=!0,E(e,i),x(e,t))}(e,r,i,t,A);else{var n=R(r)||e.destroyed;n||r.corked||r.bufferProcessing||!r.bufferedRequest||P(e,r),i?s.nextTick(I,e,r,n,A):I(e,r,n,A)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}function b(e){var t=this instanceof(i=i||r(656));if(!t&&!n.call(b,this))return new b(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function T(e,t,r,i,s,A,n){t.writelen=i,t.writecb=n,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new f("write")):r?e._writev(s,t.onwrite):e._write(s,A,t.onwrite),t.sync=!1}function I(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),x(e,t)}function P(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),n=t.corkedRequestsFree;n.entry=r;for(var o=0,a=!0;r;)s[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;s.allBuffers=a,T(e,t,!0,t.length,s,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new A(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,c=r.callback;if(T(e,t,!1,t.objectMode?1:l.length,l,h,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){e._final((function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var r=R(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,s.nextTick(v,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}r(717)(b,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===b&&e&&e._writableState instanceof S}})):n=function(e){return e instanceof this},b.prototype.pipe=function(){E(this,new m)},b.prototype.write=function(e,t,r){var i,A=this._writableState,n=!1,o=!A.objectMode&&(i=e,l.isBuffer(i)||i instanceof h);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=A.defaultEncoding),"function"!=typeof r&&(r=y),A.ending?function(e,t){var r=new C;E(e,r),s.nextTick(t,r)}(this,r):(o||function(e,t,r,i){var A;return null===r?A=new w:"string"==typeof r||t.objectMode||(A=new p("chunk",["string","Buffer"],r)),!A||(E(e,A),s.nextTick(i,A),!1)}(this,A,e,r))&&(A.pendingcb++,n=function(e,t,r,i,s,A){if(!r){var n=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}(t,i,s);i!==n&&(r=!0,s="buffer",i=n)}var o=t.objectMode?1:i.length;t.length+=o;var a=t.length<t.highWaterMark;if(a||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:s,isBuf:r,callback:A,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,o,i,s,A);return a}(this,A,o,e,t,r)),n},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||P(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new B(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new g("_write()"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?s.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=c.destroy,b.prototype._undestroy=c.undestroy,b.prototype._destroy=function(e,t){t(e)}},828:(e,t,r)=>{var i,s=r(155);function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n=r(86),o=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[o];if(null!==t){var r=e[d].read();null!==r&&(e[c]=null,e[o]=null,e[a]=null,t(p(r,!1)))}}function _(e){s.nextTick(g,e)}var m=Object.getPrototypeOf((function(){})),f=Object.setPrototypeOf((A(i={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[h])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){s.nextTick((function(){e[l]?r(e[l]):t(p(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(r,i){e.then((function(){t[h]?r(p(void 0,!0)):t[u](r,i)}),i)}}(i,this));else{var A=this[d].read();if(null!==A)return Promise.resolve(p(A,!1));r=new Promise(this[u])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),A(i,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),i),m);e.exports=function(e){var t,r=Object.create(f,(A(t={},d,{value:e,writable:!0}),A(t,o,{value:null,writable:!0}),A(t,a,{value:null,writable:!0}),A(t,l,{value:null,writable:!0}),A(t,h,{value:e._readableState.endEmitted,writable:!0}),A(t,u,{value:function(e,t){var i=r[d].read();i?(r[c]=null,r[o]=null,r[a]=null,e(p(i,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[c]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[c]=null,r[o]=null,r[a]=null,t(e)),void(r[l]=e)}var i=r[o];null!==i&&(r[c]=null,r[o]=null,r[a]=null,i(p(void 0,!0))),r[h]=!0})),e.on("readable",_.bind(null,r)),r}},686:(e,t,r)=>{function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var n=r(764).Buffer,o=r(862).inspect,a=o&&o.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return n.alloc(0);for(var t,r,i,s=n.allocUnsafe(e>>>0),A=this.head,o=0;A;)t=A.data,r=s,i=o,n.prototype.copy.call(t,r,i),o+=A.data.length,A=A.next;return s}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var s=t.data,A=e>s.length?s.length:e;if(A===s.length?i+=s:i+=s.slice(0,e),0==(e-=A)){A===s.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=s.slice(A));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=n.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var s=r.data,A=e>s.length?s.length:e;if(s.copy(t,t.length-e,0,A),0==(e-=A)){A===s.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=s.slice(A));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],t&&A(e.prototype,t),e}()},29:(e,t,r)=>{var i=r(155);function s(e,t){n(e,t),A(e)}function A(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(n,this,e)):i.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?i.nextTick(A,r):(r._writableState.errorEmitted=!0,i.nextTick(s,r,e)):i.nextTick(s,r,e):t?(i.nextTick(A,r),t(e)):i.nextTick(A,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}},86:(e,t,r)=>{var i=r(106).q.ERR_STREAM_PREMATURE_CLOSE;function s(){}e.exports=function e(t,r,A){if("function"==typeof r)return e(t,null,r);r||(r={}),A=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];e.apply(this,i)}}}(A||s);var n=r.readable||!1!==r.readable&&t.readable,o=r.writable||!1!==r.writable&&t.writable,a=function(){t.writable||h()},l=t._writableState&&t._writableState.finished,h=function(){o=!1,l=!0,n||A.call(t)},c=t._readableState&&t._readableState.endEmitted,u=function(){n=!1,c=!0,o||A.call(t)},d=function(e){A.call(t,e)},p=function(){var e;return n&&!c?(t._readableState&&t._readableState.ended||(e=new i),A.call(t,e)):o&&!l?(t._writableState&&t._writableState.ended||(e=new i),A.call(t,e)):void 0},g=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?g():t.on("request",g)):o&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",u),t.on("finish",h),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",h),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",h),t.removeListener("end",u),t.removeListener("error",d),t.removeListener("close",p)}}},265:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},472:(e,t,r)=>{var i,s=r(106).q,A=s.ERR_MISSING_ARGS,n=s.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function a(e,t,s,A){A=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(A);var o=!1;e.on("close",(function(){o=!0})),void 0===i&&(i=r(86)),i(e,{readable:t,writable:s},(function(e){if(e)return A(e);o=!0,A()}));var a=!1;return function(t){if(!o&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void A(t||new n("pipe"))}}function l(e){e()}function h(e,t){return e.pipe(t)}function c(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,s=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new A("streams");var n=t.map((function(e,r){var A=r<t.length-1;return a(e,A,r>0,(function(e){i||(i=e),e&&n.forEach(l),A||(n.forEach(l),s(i))}))}));return t.reduce(h)}},94:(e,t,r)=>{var i=r(106).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,s){var A=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,s,r);if(null!=A){if(!isFinite(A)||Math.floor(A)!==A||A<0)throw new i(s?r:"highWaterMark",A);return Math.floor(A)}return e.objectMode?16:16384}}},194:(e,t,r)=>{e.exports=r(187).EventEmitter},553:(e,t,r)=>{var i=r(509).Buffer,s=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===s||!s(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=a,this.end=l,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=h,this.end=c,t=3;break;default:return this.write=u,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function n(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function h(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=A,A.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},A.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},A.prototype.text=function(e,t){var r=function(e,t,r){var i=t.length-1;if(i<r)return 0;var s=n(t[i]);return s>=0?(s>0&&(e.lastNeed=s-1),s):--i<r||-2===s?0:(s=n(t[i]))>=0?(s>0&&(e.lastNeed=s-2),s):--i<r||-2===s?0:(s=n(t[i]))>=0?(s>0&&(2===s?s=0:e.lastNeed=s-3),s):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},A.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},927:(e,t,r)=>{function i(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},881:e=>{e.exports={isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}}},888:(e,t,r)=>{var i=r(229),s=r(388),A=r(501),n=r(673);e.exports={xml2js:i,xml2json:s,js2xml:A,json2xml:n}},501:(e,t,r)=>{var i,s,A=r(740),n=r(881).isArray;function o(e,t,r){return(!r&&e.spaces?"\n":"")+Array(t+1).join(e.spaces)}function a(e,t,r){if(t.ignoreAttributes)return"";"attributesFn"in t&&(e=t.attributesFn(e,s,i));var A,n,a,l,h=[];for(A in e)e.hasOwnProperty(A)&&null!==e[A]&&void 0!==e[A]&&(l=t.noQuotesForNativeAttributes&&"string"!=typeof e[A]?"":'"',n=(n=""+e[A]).replace(/"/g,"&quot;"),a="attributeNameFn"in t?t.attributeNameFn(A,n,s,i):A,h.push(t.spaces&&t.indentAttributes?o(t,r+1,!1):" "),h.push(a+"="+l+("attributeValueFn"in t?t.attributeValueFn(n,A,s,i):n)+l));return e&&Object.keys(e).length&&t.spaces&&t.indentAttributes&&h.push(o(t,r,!1)),h.join("")}function l(e,t,r){return i=e,s="xml",t.ignoreDeclaration?"":"<?xml"+a(e[t.attributesKey],t,r)+"?>"}function h(e,t,r){if(t.ignoreInstruction)return"";var A;for(A in e)if(e.hasOwnProperty(A))break;var n="instructionNameFn"in t?t.instructionNameFn(A,e[A],s,i):A;if("object"==typeof e[A])return i=e,s=n,"<?"+n+a(e[A][t.attributesKey],t,r)+"?>";var o=e[A]?e[A]:"";return"instructionFn"in t&&(o=t.instructionFn(o,A,s,i)),"<?"+n+(o?" "+o:"")+"?>"}function c(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,s,i):e)+"--\x3e"}function u(e,t){return t.ignoreCdata?"":"<![CDATA["+("cdataFn"in t?t.cdataFn(e,s,i):e.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function d(e,t){return t.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in t?t.doctypeFn(e,s,i):e)+">"}function p(e,t){return t.ignoreText?"":(e=(e=(e=""+e).replace(/&amp;/g,"&")).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"textFn"in t?t.textFn(e,s,i):e)}function g(e,t,r,A){return e.reduce((function(e,n){var l=o(t,r,A&&!e);switch(n.type){case"element":return e+l+function(e,t,r){i=e,s=e.name;var A=[],n="elementNameFn"in t?t.elementNameFn(e.name,e):e.name;A.push("<"+n),e[t.attributesKey]&&A.push(a(e[t.attributesKey],t,r));var o=e[t.elementsKey]&&e[t.elementsKey].length||e[t.attributesKey]&&"preserve"===e[t.attributesKey]["xml:space"];return o||(o="fullTagEmptyElementFn"in t?t.fullTagEmptyElementFn(e.name,e):t.fullTagEmptyElement),o?(A.push(">"),e[t.elementsKey]&&e[t.elementsKey].length&&(A.push(g(e[t.elementsKey],t,r+1)),i=e,s=e.name),A.push(t.spaces&&function(e,t){var r;if(e.elements&&e.elements.length)for(r=0;r<e.elements.length;++r)switch(e.elements[r][t.typeKey]){case"text":if(t.indentText)return!0;break;case"cdata":if(t.indentCdata)return!0;break;case"instruction":if(t.indentInstruction)return!0;break;default:return!0}return!1}(e,t)?"\n"+Array(r+1).join(t.spaces):""),A.push("</"+n+">")):A.push("/>"),A.join("")}(n,t,r);case"comment":return e+l+c(n[t.commentKey],t);case"doctype":return e+l+d(n[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?l:"")+u(n[t.cdataKey],t);case"text":return e+(t.indentText?l:"")+p(n[t.textKey],t);case"instruction":var _={};return _[n[t.nameKey]]=n[t.attributesKey]?n:n[t.instructionKey],e+(t.indentInstruction?l:"")+h(_,t,r)}}),"")}function _(e,t,r){var i;for(i in e)if(e.hasOwnProperty(i))switch(i){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||r)return!0;break;case t.cdataKey:if(t.indentCdata||r)return!0;break;case t.instructionKey:if(t.indentInstruction||r)return!0;break;case t.doctypeKey:case t.commentKey:default:return!0}return!1}function m(e,t,r,A,n){i=e,s=t;var l="elementNameFn"in r?r.elementNameFn(t,e):t;if(null==e||""===e)return"fullTagEmptyElementFn"in r&&r.fullTagEmptyElementFn(t,e)||r.fullTagEmptyElement?"<"+l+"></"+l+">":"<"+l+"/>";var h=[];if(t){if(h.push("<"+l),"object"!=typeof e)return h.push(">"+p(e,r)+"</"+l+">"),h.join("");e[r.attributesKey]&&h.push(a(e[r.attributesKey],r,A));var c=_(e,r,!0)||e[r.attributesKey]&&"preserve"===e[r.attributesKey]["xml:space"];if(c||(c="fullTagEmptyElementFn"in r?r.fullTagEmptyElementFn(t,e):r.fullTagEmptyElement),!c)return h.push("/>"),h.join("");h.push(">")}return h.push(f(e,r,A+1,!1)),i=e,s=t,t&&h.push((n?o(r,A,!1):"")+"</"+l+">"),h.join("")}function f(e,t,r,i){var s,A,a,g=[];for(A in e)if(e.hasOwnProperty(A))for(a=n(e[A])?e[A]:[e[A]],s=0;s<a.length;++s){switch(A){case t.declarationKey:g.push(l(a[s],t,r));break;case t.instructionKey:g.push((t.indentInstruction?o(t,r,i):"")+h(a[s],t,r));break;case t.attributesKey:case t.parentKey:break;case t.textKey:g.push((t.indentText?o(t,r,i):"")+p(a[s],t));break;case t.cdataKey:g.push((t.indentCdata?o(t,r,i):"")+u(a[s],t));break;case t.doctypeKey:g.push(o(t,r,i)+d(a[s],t));break;case t.commentKey:g.push(o(t,r,i)+c(a[s],t));break;default:g.push(o(t,r,i)+m(a[s],A,t,r,_(a[s],t)))}i=i&&!g.length}return g.join("")}e.exports=function(e,t){t=function(e){var t=A.copyOptions(e);return A.ensureFlagExists("ignoreDeclaration",t),A.ensureFlagExists("ignoreInstruction",t),A.ensureFlagExists("ignoreAttributes",t),A.ensureFlagExists("ignoreText",t),A.ensureFlagExists("ignoreComment",t),A.ensureFlagExists("ignoreCdata",t),A.ensureFlagExists("ignoreDoctype",t),A.ensureFlagExists("compact",t),A.ensureFlagExists("indentText",t),A.ensureFlagExists("indentCdata",t),A.ensureFlagExists("indentAttributes",t),A.ensureFlagExists("indentInstruction",t),A.ensureFlagExists("fullTagEmptyElement",t),A.ensureFlagExists("noQuotesForNativeAttributes",t),A.ensureSpacesExists(t),"number"==typeof t.spaces&&(t.spaces=Array(t.spaces+1).join(" ")),A.ensureKeyExists("declaration",t),A.ensureKeyExists("instruction",t),A.ensureKeyExists("attributes",t),A.ensureKeyExists("text",t),A.ensureKeyExists("comment",t),A.ensureKeyExists("cdata",t),A.ensureKeyExists("doctype",t),A.ensureKeyExists("type",t),A.ensureKeyExists("name",t),A.ensureKeyExists("elements",t),A.checkFnExists("doctype",t),A.checkFnExists("instruction",t),A.checkFnExists("cdata",t),A.checkFnExists("comment",t),A.checkFnExists("text",t),A.checkFnExists("instructionName",t),A.checkFnExists("elementName",t),A.checkFnExists("attributeName",t),A.checkFnExists("attributeValue",t),A.checkFnExists("attributes",t),A.checkFnExists("fullTagEmptyElement",t),t}(t);var r=[];return i=e,s="_root_",t.compact?r.push(f(e,t,0,!0)):(e[t.declarationKey]&&r.push(l(e[t.declarationKey],t,0)),e[t.elementsKey]&&e[t.elementsKey].length&&r.push(g(e[t.elementsKey],t,0,!r.length))),r.join("")}},673:(e,t,r)=>{var i=r(501);e.exports=function(e,t){e instanceof Buffer&&(e=e.toString());var r=null;if("string"==typeof e)try{r=JSON.parse(e)}catch(e){throw new Error("The JSON structure is invalid")}else r=e;return i(r,t)}},740:(e,t,r)=>{var i=r(881).isArray;e.exports={copyOptions:function(e){var t,r={};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r},ensureFlagExists:function(e,t){e in t&&"boolean"==typeof t[e]||(t[e]=!1)},ensureSpacesExists:function(e){(!("spaces"in e)||"number"!=typeof e.spaces&&"string"!=typeof e.spaces)&&(e.spaces=0)},ensureAlwaysArrayExists:function(e){"alwaysArray"in e&&("boolean"==typeof e.alwaysArray||i(e.alwaysArray))||(e.alwaysArray=!1)},ensureKeyExists:function(e,t){e+"Key"in t&&"string"==typeof t[e+"Key"]||(t[e+"Key"]=t.compact?"_"+e:e)},checkFnExists:function(e,t){return e+"Fn"in t}}},229:(e,t,r)=>{var i,s,A=r(99),n=r(740),o=r(881).isArray;function a(e){var t=Number(e);if(!isNaN(t))return t;var r=e.toLowerCase();return"true"===r||"false"!==r&&e}function l(e,t){var r;if(i.compact){if(!s[i[e+"Key"]]&&(o(i.alwaysArray)?-1!==i.alwaysArray.indexOf(i[e+"Key"]):i.alwaysArray)&&(s[i[e+"Key"]]=[]),s[i[e+"Key"]]&&!o(s[i[e+"Key"]])&&(s[i[e+"Key"]]=[s[i[e+"Key"]]]),e+"Fn"in i&&"string"==typeof t&&(t=i[e+"Fn"](t,s)),"instruction"===e&&("instructionFn"in i||"instructionNameFn"in i))for(r in t)if(t.hasOwnProperty(r))if("instructionFn"in i)t[r]=i.instructionFn(t[r],r,s);else{var A=t[r];delete t[r],t[i.instructionNameFn(r,A,s)]=A}o(s[i[e+"Key"]])?s[i[e+"Key"]].push(t):s[i[e+"Key"]]=t}else{s[i.elementsKey]||(s[i.elementsKey]=[]);var n={};if(n[i.typeKey]=e,"instruction"===e){for(r in t)if(t.hasOwnProperty(r))break;n[i.nameKey]="instructionNameFn"in i?i.instructionNameFn(r,t,s):r,i.instructionHasAttributes?(n[i.attributesKey]=t[r][i.attributesKey],"instructionFn"in i&&(n[i.attributesKey]=i.instructionFn(n[i.attributesKey],r,s))):("instructionFn"in i&&(t[r]=i.instructionFn(t[r],r,s)),n[i.instructionKey]=t[r])}else e+"Fn"in i&&(t=i[e+"Fn"](t,s)),n[i[e+"Key"]]=t;i.addParent&&(n[i.parentKey]=s),s[i.elementsKey].push(n)}}function h(e){var t;if("attributesFn"in i&&e&&(e=i.attributesFn(e,s)),(i.trim||"attributeValueFn"in i||"attributeNameFn"in i||i.nativeTypeAttributes)&&e)for(t in e)if(e.hasOwnProperty(t)&&(i.trim&&(e[t]=e[t].trim()),i.nativeTypeAttributes&&(e[t]=a(e[t])),"attributeValueFn"in i&&(e[t]=i.attributeValueFn(e[t],t,s)),"attributeNameFn"in i)){var r=e[t];delete e[t],e[i.attributeNameFn(t,e[t],s)]=r}return e}function c(e){var t={};if(e.body&&("xml"===e.name.toLowerCase()||i.instructionHasAttributes)){for(var r,A=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(r=A.exec(e.body));)t[r[1]]=r[2]||r[3]||r[4];t=h(t)}if("xml"===e.name.toLowerCase()){if(i.ignoreDeclaration)return;s[i.declarationKey]={},Object.keys(t).length&&(s[i.declarationKey][i.attributesKey]=t),i.addParent&&(s[i.declarationKey][i.parentKey]=s)}else{if(i.ignoreInstruction)return;i.trim&&(e.body=e.body.trim());var n={};i.instructionHasAttributes&&Object.keys(t).length?(n[e.name]={},n[e.name][i.attributesKey]=t):n[e.name]=e.body,l("instruction",n)}}function u(e,t){var r;if("object"==typeof e&&(t=e.attributes,e=e.name),t=h(t),"elementNameFn"in i&&(e=i.elementNameFn(e,s)),i.compact){var A;if(r={},!i.ignoreAttributes&&t&&Object.keys(t).length)for(A in r[i.attributesKey]={},t)t.hasOwnProperty(A)&&(r[i.attributesKey][A]=t[A]);!(e in s)&&(o(i.alwaysArray)?-1!==i.alwaysArray.indexOf(e):i.alwaysArray)&&(s[e]=[]),s[e]&&!o(s[e])&&(s[e]=[s[e]]),o(s[e])?s[e].push(r):s[e]=r}else s[i.elementsKey]||(s[i.elementsKey]=[]),(r={})[i.typeKey]="element",r[i.nameKey]=e,!i.ignoreAttributes&&t&&Object.keys(t).length&&(r[i.attributesKey]=t),i.alwaysChildren&&(r[i.elementsKey]=[]),s[i.elementsKey].push(r);r[i.parentKey]=s,s=r}function d(e){i.ignoreText||(e.trim()||i.captureSpacesBetweenElements)&&(i.trim&&(e=e.trim()),i.nativeType&&(e=a(e)),i.sanitize&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")),l("text",e))}function p(e){i.ignoreComment||(i.trim&&(e=e.trim()),l("comment",e))}function g(e){var t=s[i.parentKey];i.addParent||delete s[i.parentKey],s=t}function _(e){i.ignoreCdata||(i.trim&&(e=e.trim()),l("cdata",e))}function m(e){i.ignoreDoctype||(e=e.replace(/^ /,""),i.trim&&(e=e.trim()),l("doctype",e))}function f(e){e.note=e}e.exports=function(e,t){var r=A.parser(!0,{}),o={};if(s=o,i=function(e){return i=n.copyOptions(e),n.ensureFlagExists("ignoreDeclaration",i),n.ensureFlagExists("ignoreInstruction",i),n.ensureFlagExists("ignoreAttributes",i),n.ensureFlagExists("ignoreText",i),n.ensureFlagExists("ignoreComment",i),n.ensureFlagExists("ignoreCdata",i),n.ensureFlagExists("ignoreDoctype",i),n.ensureFlagExists("compact",i),n.ensureFlagExists("alwaysChildren",i),n.ensureFlagExists("addParent",i),n.ensureFlagExists("trim",i),n.ensureFlagExists("nativeType",i),n.ensureFlagExists("nativeTypeAttributes",i),n.ensureFlagExists("sanitize",i),n.ensureFlagExists("instructionHasAttributes",i),n.ensureFlagExists("captureSpacesBetweenElements",i),n.ensureAlwaysArrayExists(i),n.ensureKeyExists("declaration",i),n.ensureKeyExists("instruction",i),n.ensureKeyExists("attributes",i),n.ensureKeyExists("text",i),n.ensureKeyExists("comment",i),n.ensureKeyExists("cdata",i),n.ensureKeyExists("doctype",i),n.ensureKeyExists("type",i),n.ensureKeyExists("name",i),n.ensureKeyExists("elements",i),n.ensureKeyExists("parent",i),n.checkFnExists("doctype",i),n.checkFnExists("instruction",i),n.checkFnExists("cdata",i),n.checkFnExists("comment",i),n.checkFnExists("text",i),n.checkFnExists("instructionName",i),n.checkFnExists("elementName",i),n.checkFnExists("attributeName",i),n.checkFnExists("attributeValue",i),n.checkFnExists("attributes",i),i}(t),r.opt={strictEntities:!0},r.onopentag=u,r.ontext=d,r.oncomment=p,r.onclosetag=g,r.onerror=f,r.oncdata=_,r.ondoctype=m,r.onprocessinginstruction=c,r.write(e).close(),o[i.elementsKey]){var a=o[i.elementsKey];delete o[i.elementsKey],o[i.elementsKey]=a,delete o.text}return o}},388:(e,t,r)=>{var i=r(740),s=r(229);e.exports=function(e,t){var r,A,n;return r=function(e){var t=i.copyOptions(e);return i.ensureSpacesExists(t),t}(t),A=s(e,r),n="compact"in r&&r.compact?"_parent":"parent",("addParent"in r&&r.addParent?JSON.stringify(A,(function(e,t){return e===n?"_":t}),r.spaces):JSON.stringify(A,null,r.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},255:e=>{var t={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};e.exports=function(e){return e&&e.replace?e.replace(/([&"<>'])/g,(function(e,r){return t[r]})):e}},479:(e,t,r)=>{var i=r(155),s=r(255),A=r(830).Stream;function n(e,t,r){r=r||0;var i,A,o=(i=t,new Array(r||0).join(i||"")),a=e;if("object"==typeof e&&(a=e[A=Object.keys(e)[0]])&&a._elem)return a._elem.name=A,a._elem.icount=r,a._elem.indent=t,a._elem.indents=o,a._elem.interrupt=a,a._elem;var l,h=[],c=[];function u(e){Object.keys(e).forEach((function(t){h.push(function(e,t){return e+'="'+s(t)+'"'}(t,e[t]))}))}switch(typeof a){case"object":if(null===a)break;a._attr&&u(a._attr),a._cdata&&c.push(("<![CDATA["+a._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),a.forEach&&(l=!1,c.push(""),a.forEach((function(e){"object"==typeof e?"_attr"==Object.keys(e)[0]?u(e._attr):c.push(n(e,t,r+1)):(c.pop(),l=!0,c.push(s(e)))})),l||c.push(""));break;default:c.push(s(a))}return{name:A,interrupt:!1,attributes:h,content:c,icount:r,indents:o,indent:t}}function o(e,t,r){if("object"!=typeof t)return e(!1,t);var i=t.interrupt?1:t.content.length;function s(){for(;t.content.length;){var s=t.content.shift();if(void 0!==s){if(A(s))return;o(e,s)}}e(!1,(i>1?t.indents:"")+(t.name?"</"+t.name+">":"")+(t.indent&&!r?"\n":"")),r&&r()}function A(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=s,t.interrupt=!1,e(!0),!0)}if(e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(i?t.name?">":"":t.name?"/>":"")+(t.indent&&i>1?"\n":"")),!i)return e(!1,t.indent?"\n":"");A(t)||s()}e.exports=function(e,t){"object"!=typeof t&&(t={indent:t});var r,s,a=t.stream?new A:null,l="",h=!1,c=t.indent?!0===t.indent?" ":t.indent:"",u=!0;function d(e){u?i.nextTick(e):e()}function p(e,t){if(void 0!==t&&(l+=t),e&&!h&&(a=a||new A,h=!0),e&&h){var r=l;d((function(){a.emit("data",r)})),l=""}}function g(e,t){o(p,n(e,c,c?1:0),t)}function _(){if(a){var e=l;d((function(){a.emit("data",e),a.emit("end"),a.readable=!1,a.emit("close")}))}}return d((function(){u=!1})),t.declaration&&(s={version:"1.0",encoding:(r=t.declaration).encoding||"UTF-8"},r.standalone&&(s.standalone=r.standalone),g({"?xml":{_attr:s}}),l=l.replace("/>","?>")),e&&e.forEach?e.forEach((function(t,r){var i;r+1===e.length&&(i=_),g(t,i)})):g(e,_),a?(a.readable=!0,a):l},e.exports.element=e.exports.Element=function(){var e={_elem:n(Array.prototype.slice.call(arguments)),push:function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,r=this._elem.indent;o(this.append,n(e,r,this._elem.icount+(r?1:0)),(function(){t.append(!0)}))},close:function(e){void 0!==e&&this.push(e),this.end&&this.end()}};return e}},862:()=>{},964:()=>{}},t={};function r(i){var s=t[i];if(void 0!==s)return s.exports;var A=t[i]={exports:{}};return e[i](A,A.exports,r),A.exports}r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{r.r(i),r.d(i,{AbstractNumbering:()=>rn,Alignment:()=>Y,AlignmentAttributes:()=>z,AlignmentType:()=>Q,Attributes:()=>o,BaseEmphasisMark:()=>ue,BaseXmlComponent:()=>e,Body:()=>gi,Bookmark:()=>Qr,BookmarkEnd:()=>kr,BookmarkStart:()=>Mr,Border:()=>j,BorderElement:()=>X,BorderStyle:()=>M,Column:()=>mi,ColumnAttributes:()=>_i,ColumnBreak:()=>Cr,Columns:()=>jr,ColumnsAttributes:()=>Jr,ConcreteHyperlink:()=>Lr,ConcreteNumbering:()=>nn,DeletedTextRun:()=>po,DocGridAttributes:()=>Zr,Document:()=>Kn,DocumentAttributes:()=>fi,DocumentBackground:()=>Ci,DocumentBackgroundAttributes:()=>wi,DocumentDefaults:()=>kn,DocumentGrid:()=>qr,DotEmphasisMark:()=>pe,Drawing:()=>lr,DropCapType:()=>bi,EMPTY_OBJECT:()=>t,EmphasisMark:()=>de,EmphasisMarkType:()=>K,ExternalHyperlink:()=>Ur,File:()=>Kn,FootNoteReferenceRunAttributes:()=>ro,FootNotes:()=>HA,Footer:()=>to,FooterWrapper:()=>IA,FootnoteReference:()=>io,FootnoteReferenceRun:()=>so,FrameAnchorType:()=>Ti,FrameProperties:()=>Ri,FramePropertiesAttributes:()=>Pi,FrameWrap:()=>Ii,GridSpan:()=>Ds,Header:()=>eo,HeaderFooterReference:()=>Xr,HeaderFooterReferenceType:()=>je,HeaderFooterType:()=>Ze,HeaderWrapper:()=>kA,HeadingLevel:()=>Ke,HeightRule:()=>Js,HorizontalPosition:()=>ct,HorizontalPositionAlign:()=>_o,HorizontalPositionRelativeFrom:()=>Ne,HpsMeasureElement:()=>D,HyperlinkType:()=>Xe,IgnoreIfEmptyXmlComponent:()=>A,ImageRun:()=>hr,ImportDotx:()=>Ro,ImportedRootElementAttributes:()=>u,ImportedXmlComponent:()=>c,Indent:()=>ee,InitializableXmlComponent:()=>p,InsertedTextRun:()=>no,InternalHyperlink:()=>Dr,LeaderType:()=>$e,Level:()=>ZA,LevelBase:()=>jA,LevelForOverride:()=>qA,LevelFormat:()=>KA,LevelOverride:()=>an,LevelSuffix:()=>WA,LineNumberAttributes:()=>ei,LineNumberRestartFormat:()=>qe,LineNumberType:()=>ti,LineRuleType:()=>Ge,Math:()=>Oi,MathAccentCharacter:()=>Qi,MathAngledBrackets:()=>Es,MathBase:()=>Mi,MathCurlyBrackets:()=>Bs,MathDegree:()=>ns,MathDenominator:()=>Di,MathFraction:()=>Hi,MathFunction:()=>ds,MathFunctionName:()=>cs,MathFunctionProperties:()=>us,MathLimitLocation:()=>Vi,MathNArayProperties:()=>zi,MathNumerator:()=>Ui,MathPreSubSuperScript:()=>ss,MathPreSubSuperScriptProperties:()=>is,MathRadical:()=>hs,MathRadicalProperties:()=>ls,MathRoundBrackets:()=>ws,MathRun:()=>Li,MathSquareBrackets:()=>Cs,MathSubScript:()=>es,MathSubScriptElement:()=>Yi,MathSubScriptProperties:()=>qi,MathSubSuperScript:()=>rs,MathSubSuperScriptProperties:()=>ts,MathSum:()=>Ji,MathSuperScript:()=>Zi,MathSuperScriptElement:()=>Xi,MathSuperScriptProperties:()=>ji,Media:()=>VA,NumberFormat:()=>fo,NumberProperties:()=>Pr,NumberValueElement:()=>H,Numbering:()=>cn,OnOffElement:()=>L,OutlineLevel:()=>Vr,OverlapType:()=>Ws,Packer:()=>bo,PageBorderDisplay:()=>et,PageBorderOffsetFrom:()=>tt,PageBorderZOrder:()=>rt,PageBorders:()=>ii,PageBreak:()=>wr,PageBreakBefore:()=>Br,PageMargin:()=>Ai,PageMarginAttributes:()=>si,PageNumber:()=>$,PageNumberSeparator:()=>it,PageNumberType:()=>oi,PageNumberTypeAttributes:()=>ni,PageOrientation:()=>st,PageReference:()=>Wr,PageSize:()=>li,PageSizeAttributes:()=>ai,Paragraph:()=>xi,ParagraphProperties:()=>vi,ParagraphPropertiesDefaults:()=>Qn,RelativeHorizontalPosition:()=>zs,RelativeVerticalPosition:()=>Ys,Run:()=>Pe,RunFonts:()=>Ce,RunProperties:()=>be,RunPropertiesDefaults:()=>Mn,SectionProperties:()=>pi,SectionType:()=>At,SectionTypeAttributes:()=>hi,SequentialIdentifier:()=>dr,Shading:()=>ce,ShadingType:()=>G,SimpleField:()=>_r,SimpleMailMergeField:()=>mr,SimplePos:()=>ot,Spacing:()=>yr,StringContainer:()=>N,StringValueElement:()=>U,Style:()=>Sr,StyleForCharacter:()=>yn,StyleForParagraph:()=>En,StyleLevel:()=>qn,Styles:()=>Nn,SymbolRun:()=>Oe,TDirection:()=>Qs,Tab:()=>pr,TabAttributes:()=>Tr,TabStop:()=>br,TabStopItem:()=>Ir,TabStopPosition:()=>ze,TabStopType:()=>We,Table:()=>AA,TableAnchorType:()=>$s,TableBorders:()=>Ks,TableCell:()=>ks,TableCellBorders:()=>Fs,TableFloatOptionsAttributes:()=>eA,TableFloatProperties:()=>tA,TableLayout:()=>iA,TableLayoutType:()=>Xs,TableOfContents:()=>Zn,TableOverlap:()=>qs,TableProperties:()=>sA,TableRow:()=>lA,TableRowHeight:()=>oA,TableRowHeightAttributes:()=>nA,TableRowProperties:()=>aA,TableWidthElement:()=>xs,TextDirection:()=>Rs,TextRun:()=>Re,TextWrappingSide:()=>ke,TextWrappingType:()=>Me,ThematicBreak:()=>Z,Type:()=>ci,Underline:()=>Se,UnderlineType:()=>W,VerticalAlign:()=>Je,VerticalAlignAttributes:()=>$r,VerticalAlignElement:()=>zr,VerticalMerge:()=>Hs,VerticalMergeType:()=>Ps,VerticalPosition:()=>dt,VerticalPositionAlign:()=>mo,VerticalPositionRelativeFrom:()=>Qe,WORKAROUND:()=>Wn,WORKAROUND2:()=>GA,WORKAROUND3:()=>d,WORKAROUND4:()=>As,WidthType:()=>Ts,WrapNone:()=>Gt,WrapSquare:()=>Wt,WrapTight:()=>zt,WrapTopAndBottom:()=>Xt,XmlAttributeComponent:()=>n,XmlComponent:()=>s,convertInchesToTwip:()=>De,convertMillimetersToTwip:()=>Le,convertToXmlComponent:()=>l,dateTimeValue:()=>F,decimalNumber:()=>g,eighthPointMeasureValue:()=>x,hexColorValue:()=>S,hpsMeasureValue:()=>T,longHexNumber:()=>f,measurementOrPercentValue:()=>v,percentageValue:()=>R,pointMeasureValue:()=>O,positiveUniversalMeasureValue:()=>y,sectionMarginDefaults:()=>ui,sectionPageSizeDefaults:()=>di,shortHexNumber:()=>w,signedHpsMeasureValue:()=>I,signedTwipsMeasureValue:()=>b,twipsMeasureValue:()=>P,uCharHexNumber:()=>C,uniqueId:()=>He,uniqueNumericId:()=>Ue,universalMeasureValue:()=>B,unsignedDecimalNumber:()=>_});class e{constructor(e){this.rootKey=e}}const t=Object.seal({});class s extends e{constructor(e){super(e),this.root=new Array}prepForXml(r){var i;const s=this.root.map((t=>t instanceof e?t.prepForXml(r):t)).filter((e=>void 0!==e));return{[this.rootKey]:s.length?1===s.length&&(null===(i=s[0])||void 0===i?void 0:i._attr)?s[0]:s:t}}addChildElement(e){return this.root.push(e),this}}class A extends s{prepForXml(e){const t=super.prepForXml(e);if(t&&("object"!=typeof t[this.rootKey]||Object.keys(t[this.rootKey]).length))return t}}class n extends e{constructor(e){super("_attr"),this.root=e}prepForXml(e){const t={};return Object.keys(this.root).forEach((e=>{const r=this.root[e];if(void 0!==r){const i=this.xmlKeys&&this.xmlKeys[e]||e;t[i]=r}})),{_attr:t}}set(e){this.root=e}}class o extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"}}}var a=r(888);function l(e){switch(e.type){case void 0:case"element":const t=new c(e.name,e.attributes),r=e.elements||[];for(const e of r){const r=l(e);void 0!==r&&t.push(r)}return t;case"text":return e.text;default:return}}class h extends n{}class c extends s{static fromXmlString(e){return l((0,a.xml2js)(e,{compact:!1}))}constructor(e,t){super(e),t&&this.root.push(new h(t))}push(e){this.root.push(e)}}class u extends s{constructor(e){super(""),this._attr=e}prepForXml(e){return{_attr:this._attr}}}const d="";class p extends s{constructor(e,t){super(e),t&&(this.root=t.root)}}function g(e){if(isNaN(e))throw new Error(`Invalid value '${e}' specified. Must be an integer.`);return Math.floor(e)}function _(e){const t=g(e);if(t<0)throw new Error(`Invalid value '${e}' specified. Must be a positive integer.`);return t}function m(e,t){const r=2*t;if(e.length!==r||isNaN(Number("0x"+e)))throw new Error(`Invalid hex value '${e}'. Expected ${r} digit hex value`);return e}function f(e){return m(e,4)}function w(e){return m(e,2)}function C(e){return m(e,1)}function B(e){const t=e.slice(-2);if(!E.includes(t))throw new Error(`Invalid unit '${t}' specified. Valid units are ${E.join(", ")}`);const r=e.substring(0,e.length-2);if(isNaN(Number(r)))throw new Error(`Invalid value '${r}' specified. Expected a valid number.`);return`${Number(r)}${t}`}const E=["mm","cm","in","pt","pc","pi"];function y(e){const t=B(e);if(parseFloat(t)<0)throw new Error(`Invalid value '${t}' specified. Expected a positive number.`);return t}function S(e){return"auto"===e?e:m("#"===e.charAt(0)?e.substring(1):e,3)}function b(e){return"string"==typeof e?B(e):g(e)}function T(e){return"string"==typeof e?y(e):_(e)}function I(e){return"string"==typeof e?B(e):g(e)}function P(e){return"string"==typeof e?y(e):_(e)}function R(e){if("%"!==e.slice(-1))throw new Error(`Invalid value '${e}'. Expected percentage value (eg '55%')`);const t=e.substring(0,e.length-1);if(isNaN(Number(t)))throw new Error(`Invalid value '${t}' specified. Expected a valid number.`);return`${Number(t)}%`}function v(e){return"number"==typeof e?g(e):"%"===e.slice(-1)?R(e):B(e)}const x=_,O=_;function F(e){return e.toISOString()}class L extends s{constructor(e,t=!0){super(e),!0!==t&&this.root.push(new o({val:t}))}}class D extends s{constructor(e,t){super(e),this.root.push(new o({val:T(t)}))}}class U extends s{constructor(e,t){super(e),this.root.push(new o({val:t}))}}class H extends s{constructor(e,t){super(e),this.root.push(new o({val:t}))}}class N extends s{constructor(e,t){super(e),this.root.push(t)}}var Q,M,k,V,G,K,W,$;!function(e){e.START="start",e.END="end",e.CENTER="center",e.BOTH="both",e.JUSTIFIED="both",e.DISTRIBUTE="distribute",e.LEFT="left",e.RIGHT="right"}(Q||(Q={}));class z extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Y extends s{constructor(e){super("w:jc"),this.root.push(new z({val:e}))}}class X extends s{constructor(e,{color:t,size:r,space:i,style:s}){super(e),this.root.push(new J({style:s,color:void 0===t?void 0:S(t),size:void 0===r?void 0:x(r),space:void 0===i?void 0:O(i)}))}}class J extends n{constructor(){super(...arguments),this.xmlKeys={style:"w:val",color:"w:color",size:"w:sz",space:"w:space"}}}!function(e){e.SINGLE="single",e.DASH_DOT_STROKED="dashDotStroked",e.DASHED="dashed",e.DASH_SMALL_GAP="dashSmallGap",e.DOT_DASH="dotDash",e.DOT_DOT_DASH="dotDotDash",e.DOTTED="dotted",e.DOUBLE="double",e.DOUBLE_WAVE="doubleWave",e.INSET="inset",e.NIL="nil",e.NONE="none",e.OUTSET="outset",e.THICK="thick",e.THICK_THIN_LARGE_GAP="thickThinLargeGap",e.THICK_THIN_MEDIUM_GAP="thickThinMediumGap",e.THICK_THIN_SMALL_GAP="thickThinSmallGap",e.THIN_THICK_LARGE_GAP="thinThickLargeGap",e.THIN_THICK_MEDIUM_GAP="thinThickMediumGap",e.THIN_THICK_SMALL_GAP="thinThickSmallGap",e.THIN_THICK_THIN_LARGE_GAP="thinThickThinLargeGap",e.THIN_THICK_THIN_MEDIUM_GAP="thinThickThinMediumGap",e.THIN_THICK_THIN_SMALL_GAP="thinThickThinSmallGap",e.THREE_D_EMBOSS="threeDEmboss",e.THREE_D_ENGRAVE="threeDEngrave",e.TRIPLE="triple",e.WAVE="wave"}(M||(M={}));class j extends A{constructor(e){super("w:pBdr"),e.top&&this.root.push(new X("w:top",e.top)),e.bottom&&this.root.push(new X("w:bottom",e.bottom)),e.left&&this.root.push(new X("w:left",e.left)),e.right&&this.root.push(new X("w:right",e.right))}}class Z extends s{constructor(){super("w:pBdr");const e=new X("w:bottom",{color:"auto",space:1,style:M.SINGLE,size:6});this.root.push(e)}}class q extends n{constructor(){super(...arguments),this.xmlKeys={start:"w:start",end:"w:end",left:"w:left",right:"w:right",hanging:"w:hanging",firstLine:"w:firstLine"}}}class ee extends s{constructor({start:e,end:t,left:r,right:i,hanging:s,firstLine:A}){super("w:ind"),this.root.push(new q({start:void 0===e?void 0:b(e),end:void 0===t?void 0:b(t),left:void 0===r?void 0:b(r),right:void 0===i?void 0:b(i),hanging:void 0===s?void 0:P(s),firstLine:void 0===A?void 0:P(A)}))}}class te extends s{constructor(){super("w:br")}}!function(e){e.BEGIN="begin",e.END="end",e.SEPARATE="separate"}(k||(k={}));class re extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:fldCharType",dirty:"w:dirty"}}}class ie extends s{constructor(e){super("w:fldChar"),this.root.push(new re({type:k.BEGIN,dirty:e}))}}class se extends s{constructor(e){super("w:fldChar"),this.root.push(new re({type:k.SEPARATE,dirty:e}))}}class Ae extends s{constructor(e){super("w:fldChar"),this.root.push(new re({type:k.END,dirty:e}))}}!function(e){e.DEFAULT="default",e.PRESERVE="preserve"}(V||(V={}));class ne extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class oe extends s{constructor(){super("w:instrText"),this.root.push(new ne({space:V.PRESERVE})),this.root.push("PAGE")}}class ae extends s{constructor(){super("w:instrText"),this.root.push(new ne({space:V.PRESERVE})),this.root.push("NUMPAGES")}}class le extends s{constructor(){super("w:instrText"),this.root.push(new ne({space:V.PRESERVE})),this.root.push("SECTIONPAGES")}}class he extends n{constructor(){super(...arguments),this.xmlKeys={fill:"w:fill",color:"w:color",type:"w:val"}}}class ce extends s{constructor({fill:e,color:t,type:r}){super("w:shd"),this.root.push(new he({fill:void 0===e?void 0:S(e),color:void 0===t?void 0:S(t),type:r}))}}!function(e){e.CLEAR="clear",e.DIAGONAL_CROSS="diagCross",e.DIAGONAL_STRIPE="diagStripe",e.HORIZONTAL_CROSS="horzCross",e.HORIZONTAL_STRIPE="horzStripe",e.NIL="nil",e.PERCENT_5="pct5",e.PERCENT_10="pct10",e.PERCENT_12="pct12",e.PERCENT_15="pct15",e.PERCENT_20="pct20",e.PERCENT_25="pct25",e.PERCENT_30="pct30",e.PERCENT_35="pct35",e.PERCENT_37="pct37",e.PERCENT_40="pct40",e.PERCENT_45="pct45",e.PERCENT_50="pct50",e.PERCENT_55="pct55",e.PERCENT_60="pct60",e.PERCENT_62="pct62",e.PERCENT_65="pct65",e.PERCENT_70="pct70",e.PERCENT_75="pct75",e.PERCENT_80="pct80",e.PERCENT_85="pct85",e.PERCENT_87="pct87",e.PERCENT_90="pct90",e.PERCENT_95="pct95",e.REVERSE_DIAGONAL_STRIPE="reverseDiagStripe",e.SOLID="solid",e.THIN_DIAGONAL_CROSS="thinDiagCross",e.THIN_DIAGONAL_STRIPE="thinDiagStripe",e.THIN_HORIZONTAL_CROSS="thinHorzCross",e.THIN_REVERSE_DIAGONAL_STRIPE="thinReverseDiagStripe",e.THIN_VERTICAL_STRIPE="thinVertStripe",e.VERTICAL_STRIPE="vertStripe"}(G||(G={})),function(e){e.DOT="dot"}(K||(K={}));class ue extends s{constructor(e){super("w:em"),this.root.push(new o({val:e}))}}class de extends ue{constructor(e=K.DOT){super(e)}}class pe extends ue{constructor(){super(K.DOT)}}class ge extends s{constructor(e){super("w:spacing"),this.root.push(new o({val:b(e)}))}}class _e extends s{constructor(e){super("w:color"),this.root.push(new o({val:S(e)}))}}class me extends s{constructor(e){super("w:highlight"),this.root.push(new o({val:e}))}}class fe extends s{constructor(e){super("w:highlightCs"),this.root.push(new o({val:e}))}}class we extends n{constructor(){super(...arguments),this.xmlKeys={ascii:"w:ascii",cs:"w:cs",eastAsia:"w:eastAsia",hAnsi:"w:hAnsi",hint:"w:hint"}}}class Ce extends s{constructor(e,t){if(super("w:rFonts"),"string"==typeof e){const r=e;this.root.push(new we({ascii:r,cs:r,eastAsia:r,hAnsi:r,hint:t}))}else{const t=e;this.root.push(new we(t))}}}class Be extends s{constructor(e){super("w:vertAlign"),this.root.push(new o({val:e}))}}class Ee extends Be{constructor(){super("superscript")}}class ye extends Be{constructor(){super("subscript")}}!function(e){e.SINGLE="single",e.WORDS="words",e.DOUBLE="double",e.THICK="thick",e.DOTTED="dotted",e.DOTTEDHEAVY="dottedHeavy",e.DASH="dash",e.DASHEDHEAVY="dashedHeavy",e.DASHLONG="dashLong",e.DASHLONGHEAVY="dashLongHeavy",e.DOTDASH="dotDash",e.DASHDOTHEAVY="dashDotHeavy",e.DOTDOTDASH="dotDotDash",e.DASHDOTDOTHEAVY="dashDotDotHeavy",e.WAVE="wave",e.WAVYHEAVY="wavyHeavy",e.WAVYDOUBLE="wavyDouble"}(W||(W={}));class Se extends s{constructor(e=W.SINGLE,t){super("w:u"),this.root.push(new o({val:e,color:void 0===t?void 0:S(t)}))}}class be extends A{constructor(e){var t,r;if(super("w:rPr"),!e)return;void 0!==e.bold&&this.push(new L("w:b",e.bold)),(void 0===e.boldComplexScript&&void 0!==e.bold||e.boldComplexScript)&&this.push(new L("w:bCs",null!==(t=e.boldComplexScript)&&void 0!==t?t:e.bold)),void 0!==e.italics&&this.push(new L("w:i",e.italics)),(void 0===e.italicsComplexScript&&void 0!==e.italics||e.italicsComplexScript)&&this.push(new L("w:iCs",null!==(r=e.italicsComplexScript)&&void 0!==r?r:e.italics)),e.underline&&this.push(new Se(e.underline.type,e.underline.color)),e.emphasisMark&&this.push(new de(e.emphasisMark.type)),e.color&&this.push(new _e(e.color)),void 0!==e.size&&this.push(new D("w:sz",e.size));const i=void 0===e.sizeComplexScript||!0===e.sizeComplexScript?e.size:e.sizeComplexScript;i&&this.push(new D("w:szCs",i)),void 0!==e.rightToLeft&&this.push(new L("w:rtl",e.rightToLeft)),void 0!==e.smallCaps?this.push(new L("w:smallCaps",e.smallCaps)):void 0!==e.allCaps&&this.push(new L("w:caps",e.allCaps)),void 0!==e.strike&&this.push(new L("w:strike",e.strike)),void 0!==e.doubleStrike&&this.push(new L("w:dstrike",e.doubleStrike)),e.subScript&&this.push(new ye),e.superScript&&this.push(new Ee),e.style&&this.push(new U("w:rStyle",e.style)),e.font&&("string"==typeof e.font?this.push(new Ce(e.font)):"name"in e.font?this.push(new Ce(e.font.name,e.font.hint)):this.push(new Ce(e.font))),e.highlight&&this.push(new me(e.highlight));const s=void 0===e.highlightComplexScript||!0===e.highlightComplexScript?e.highlight:e.highlightComplexScript;s&&this.push(new fe(s)),e.characterSpacing&&this.push(new ge(e.characterSpacing)),void 0!==e.emboss&&this.push(new L("w:emboss",e.emboss)),void 0!==e.imprint&&this.push(new L("w:imprint",e.imprint)),e.shading&&this.push(new ce(e.shading))}push(e){this.root.push(e)}}class Te extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class Ie extends s{constructor(e){super("w:t"),this.root.push(new Te({space:V.PRESERVE})),this.root.push(e)}}!function(e){e.CURRENT="CURRENT",e.TOTAL_PAGES="TOTAL_PAGES",e.TOTAL_PAGES_IN_SECTION="TOTAL_PAGES_IN_SECTION"}($||($={}));class Pe extends s{constructor(e){if(super("w:r"),this.properties=new be(e),this.root.push(this.properties),e.break)for(let t=0;t<e.break;t++)this.root.push(new te);if(e.children)for(const t of e.children)if("string"!=typeof t)this.root.push(t);else switch(t){case $.CURRENT:this.root.push(new ie),this.root.push(new oe),this.root.push(new se),this.root.push(new Ae);break;case $.TOTAL_PAGES:this.root.push(new ie),this.root.push(new ae),this.root.push(new se),this.root.push(new Ae);break;case $.TOTAL_PAGES_IN_SECTION:this.root.push(new ie),this.root.push(new le),this.root.push(new se),this.root.push(new Ae);break;default:this.root.push(new Ie(t))}else e.text&&this.root.push(new Ie(e.text))}}class Re extends Pe{constructor(e){if("string"==typeof e)return super({}),this.root.push(new Ie(e)),this;super(e)}}class ve extends n{constructor(){super(...arguments),this.xmlKeys={char:"w:char",symbolfont:"w:font"}}}class xe extends s{constructor(e="",t="Wingdings"){super("w:sym"),this.root.push(new ve({char:e,symbolfont:t}))}}class Oe extends Pe{constructor(e){if("string"==typeof e)return super({}),void this.root.push(new xe(e));super(e),this.root.push(new xe(e.char,e.symbolfont))}}let Fe=0;const Le=e=>Math.floor(e/25.4*72*20),De=e=>Math.floor(72*e*20),Ue=()=>++Fe,He=()=>((e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})().toLowerCase();var Ne,Qe,Me,ke,Ve,Ge,Ke,We,$e,ze,Ye,Xe,Je,je,Ze,qe,et,tt,rt,it,st,At;!function(e){e.CHARACTER="character",e.COLUMN="column",e.INSIDE_MARGIN="insideMargin",e.LEFT_MARGIN="leftMargin",e.MARGIN="margin",e.OUTSIDE_MARGIN="outsideMargin",e.PAGE="page",e.RIGHT_MARGIN="rightMargin"}(Ne||(Ne={})),function(e){e.BOTTOM_MARGIN="bottomMargin",e.INSIDE_MARGIN="insideMargin",e.LINE="line",e.MARGIN="margin",e.OUTSIDE_MARGIN="outsideMargin",e.PAGE="page",e.PARAGRAPH="paragraph",e.TOP_MARGIN="topMargin"}(Qe||(Qe={}));class nt extends n{constructor(){super(...arguments),this.xmlKeys={x:"x",y:"y"}}}class ot extends s{constructor(){super("wp:simplePos"),this.root.push(new nt({x:0,y:0}))}}class at extends s{constructor(e){super("wp:align"),this.root.push(e)}}class lt extends s{constructor(e){super("wp:posOffset"),this.root.push(e.toString())}}class ht extends n{constructor(){super(...arguments),this.xmlKeys={relativeFrom:"relativeFrom"}}}class ct extends s{constructor(e){if(super("wp:positionH"),this.root.push(new ht({relativeFrom:e.relative||Ne.PAGE})),e.align)this.root.push(new at(e.align));else{if(void 0===e.offset)throw new Error("There is no configuration provided for floating position (Align or offset)");this.root.push(new lt(e.offset))}}}class ut extends n{constructor(){super(...arguments),this.xmlKeys={relativeFrom:"relativeFrom"}}}class dt extends s{constructor(e){if(super("wp:positionV"),this.root.push(new ut({relativeFrom:e.relative||Qe.PAGE})),e.align)this.root.push(new at(e.align));else{if(void 0===e.offset)throw new Error("There is no configuration provided for floating position (Align or offset)");this.root.push(new lt(e.offset))}}}class pt extends n{constructor(){super(...arguments),this.xmlKeys={uri:"uri"}}}class gt extends n{constructor(){super(...arguments),this.xmlKeys={embed:"r:embed",cstate:"cstate"}}}class _t extends s{constructor(e){super("a:blip"),this.root.push(new gt({embed:`rId{${e.fileName}}`,cstate:"none"}))}}class mt extends s{constructor(){super("a:srcRect")}}class ft extends s{constructor(){super("a:fillRect")}}class wt extends s{constructor(){super("a:stretch"),this.root.push(new ft)}}class Ct extends s{constructor(e){super("pic:blipFill"),this.root.push(new _t(e)),this.root.push(new mt),this.root.push(new wt)}}class Bt extends n{constructor(){super(...arguments),this.xmlKeys={noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"}}}class Et extends s{constructor(){super("a:picLocks"),this.root.push(new Bt({noChangeAspect:1,noChangeArrowheads:1}))}}class yt extends s{constructor(){super("pic:cNvPicPr"),this.root.push(new Et)}}class St extends n{constructor(){super(...arguments),this.xmlKeys={id:"id",name:"name",descr:"descr"}}}class bt extends s{constructor(){super("pic:cNvPr"),this.root.push(new St({id:0,name:"",descr:""}))}}class Tt extends s{constructor(){super("pic:nvPicPr"),this.root.push(new bt),this.root.push(new yt)}}class It extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns:pic"}}}class Pt extends n{constructor(){super(...arguments),this.xmlKeys={cx:"cx",cy:"cy"}}}class Rt extends s{constructor(e,t){super("a:ext"),this.attributes=new Pt({cx:e,cy:t}),this.root.push(this.attributes)}}class vt extends n{constructor(){super(...arguments),this.xmlKeys={x:"x",y:"y"}}}class xt extends s{constructor(){super("a:off"),this.root.push(new vt({x:0,y:0}))}}class Ot extends n{constructor(){super(...arguments),this.xmlKeys={flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"}}}class Ft extends s{constructor(e){var t,r;super("a:xfrm"),this.root.push(new Ot({flipVertical:null===(t=e.flip)||void 0===t?void 0:t.vertical,flipHorizontal:null===(r=e.flip)||void 0===r?void 0:r.horizontal,rotation:e.rotation})),this.extents=new Rt(e.emus.x,e.emus.y),this.root.push(new xt),this.root.push(this.extents)}}class Lt extends s{constructor(){super("a:avLst")}}class Dt extends n{constructor(){super(...arguments),this.xmlKeys={prst:"prst"}}}class Ut extends s{constructor(){super("a:prstGeom"),this.root.push(new Dt({prst:"rect"})),this.root.push(new Lt)}}class Ht extends n{constructor(){super(...arguments),this.xmlKeys={bwMode:"bwMode"}}}class Nt extends s{constructor(e){super("pic:spPr"),this.root.push(new Ht({bwMode:"auto"})),this.form=new Ft(e),this.root.push(this.form),this.root.push(new Ut)}}class Qt extends s{constructor(e,t){super("pic:pic"),this.root.push(new It({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new Tt),this.root.push(new Ct(e)),this.root.push(new Nt(t))}}class Mt extends s{constructor(e,t){super("a:graphicData"),this.root.push(new pt({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.pic=new Qt(e,t),this.root.push(this.pic)}}class kt extends n{constructor(){super(...arguments),this.xmlKeys={a:"xmlns:a"}}}class Vt extends s{constructor(e,t){super("a:graphic"),this.root.push(new kt({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new Mt(e,t),this.root.push(this.data)}}!function(e){e[e.NONE=0]="NONE",e[e.SQUARE=1]="SQUARE",e[e.TIGHT=2]="TIGHT",e[e.TOP_AND_BOTTOM=3]="TOP_AND_BOTTOM"}(Me||(Me={})),function(e){e.BOTH_SIDES="bothSides",e.LEFT="left",e.RIGHT="right",e.LARGEST="largest"}(ke||(ke={}));class Gt extends s{constructor(){super("wp:wrapNone")}}class Kt extends n{constructor(){super(...arguments),this.xmlKeys={distT:"distT",distB:"distB",distL:"distL",distR:"distR",wrapText:"wrapText"}}}class Wt extends s{constructor(e,t={top:0,bottom:0,left:0,right:0}){super("wp:wrapSquare"),this.root.push(new Kt({wrapText:e.side||ke.BOTH_SIDES,distT:t.top,distB:t.bottom,distL:t.left,distR:t.right}))}}class $t extends n{constructor(){super(...arguments),this.xmlKeys={distT:"distT",distB:"distB"}}}class zt extends s{constructor(e={top:0,bottom:0}){super("wp:wrapTight"),this.root.push(new $t({distT:e.top,distB:e.bottom}))}}class Yt extends n{constructor(){super(...arguments),this.xmlKeys={distT:"distT",distB:"distB"}}}class Xt extends s{constructor(e={top:0,bottom:0}){super("wp:wrapTopAndBottom"),this.root.push(new Yt({distT:e.top,distB:e.bottom}))}}class Jt extends n{constructor(){super(...arguments),this.xmlKeys={id:"id",name:"name",descr:"descr"}}}class jt extends s{constructor(){super("wp:docPr"),this.root.push(new Jt({id:0,name:"",descr:""}))}}class Zt extends n{constructor(){super(...arguments),this.xmlKeys={b:"b",l:"l",r:"r",t:"t"}}}class qt extends s{constructor(){super("wp:effectExtent"),this.root.push(new Zt({b:0,l:0,r:0,t:0}))}}class er extends n{constructor(){super(...arguments),this.xmlKeys={cx:"cx",cy:"cy"}}}class tr extends s{constructor(e,t){super("wp:extent"),this.attributes=new er({cx:e,cy:t}),this.root.push(this.attributes)}}class rr extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"}}}class ir extends s{constructor(){super("a:graphicFrameLocks"),this.root.push(new rr({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}}class sr extends s{constructor(){super("wp:cNvGraphicFramePr"),this.root.push(new ir)}}class Ar extends n{constructor(){super(...arguments),this.xmlKeys={distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"}}}class nr extends s{constructor(e,t,r){super("wp:anchor");const i=Object.assign({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},r.floating);if(this.root.push(new Ar({distT:i.margins&&i.margins.top||0,distB:i.margins&&i.margins.bottom||0,distL:i.margins&&i.margins.left||0,distR:i.margins&&i.margins.right||0,simplePos:"0",allowOverlap:!0===i.allowOverlap?"1":"0",behindDoc:!0===i.behindDocument?"1":"0",locked:!0===i.lockAnchor?"1":"0",layoutInCell:!0===i.layoutInCell?"1":"0",relativeHeight:i.zIndex?i.zIndex:t.emus.y})),this.root.push(new ot),this.root.push(new ct(i.horizontalPosition)),this.root.push(new dt(i.verticalPosition)),this.root.push(new tr(t.emus.x,t.emus.y)),this.root.push(new qt),void 0!==r.floating&&void 0!==r.floating.wrap)switch(r.floating.wrap.type){case Me.SQUARE:this.root.push(new Wt(r.floating.wrap,r.floating.margins));break;case Me.TIGHT:this.root.push(new zt(r.floating.margins));break;case Me.TOP_AND_BOTTOM:this.root.push(new Xt(r.floating.margins));break;case Me.NONE:default:this.root.push(new Gt)}else this.root.push(new Gt);this.root.push(new jt),this.root.push(new sr),this.root.push(new Vt(e,t))}}class or extends n{constructor(){super(...arguments),this.xmlKeys={distT:"distT",distB:"distB",distL:"distL",distR:"distR"}}}class ar extends s{constructor(e,t){super("wp:inline"),this.root.push(new or({distT:0,distB:0,distL:0,distR:0})),this.extent=new tr(t.emus.x,t.emus.y),this.graphic=new Vt(e,t),this.root.push(this.extent),this.root.push(new qt),this.root.push(new jt),this.root.push(new sr),this.root.push(this.graphic)}}class lr extends s{constructor(e,t={}){super("w:drawing"),t.floating?this.root.push(new nr(e,e.transformation,t)):(this.inline=new ar(e,e.transformation),this.root.push(this.inline))}}class hr extends Pe{constructor(e){super({}),this.key=`${He()}.png`;const t="string"==typeof e.data?this.convertDataURIToBinary(e.data):e.data;this.imageData={stream:t,fileName:this.key,transformation:{pixels:{x:Math.round(e.transformation.width),y:Math.round(e.transformation.height)},emus:{x:Math.round(9525*e.transformation.width),y:Math.round(9525*e.transformation.height)},flip:e.transformation.flip,rotation:e.transformation.rotation?6e4*e.transformation.rotation:void 0}};const r=new lr(this.imageData,{floating:e.floating});this.root.push(r)}prepForXml(e){return e.file.Media.addImage(this.key,this.imageData),super.prepForXml(e)}convertDataURIToBinary(e){const t=";base64,",i=e.indexOf(t)+t.length;return"function"==typeof atob?new Uint8Array(atob(e.substring(i)).split("").map((e=>e.charCodeAt(0)))):new(r(764).Buffer)(e,"base64")}}class cr extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class ur extends s{constructor(e){super("w:instrText"),this.root.push(new cr({space:V.PRESERVE})),this.root.push(`SEQ ${e}`)}}class dr extends Pe{constructor(e){super({}),this.root.push(new ie(!0)),this.root.push(new ur(e)),this.root.push(new se),this.root.push(new Ae)}}class pr extends s{constructor(){super("w:tab")}}class gr extends n{constructor(){super(...arguments),this.xmlKeys={instr:"w:instr"}}}class _r extends s{constructor(e,t){super("w:fldSimple"),this.root.push(new gr({instr:e})),void 0!==t&&this.root.push(new Re(t))}}class mr extends _r{constructor(e){super(` MERGEFIELD ${e} `,`«${e}»`)}}!function(e){e.COLUMN="column",e.PAGE="page"}(Ve||(Ve={}));class fr extends s{constructor(e){super("w:br"),this.root.push(new o({type:e}))}}class wr extends Pe{constructor(){super({}),this.root.push(new fr(Ve.PAGE))}}class Cr extends Pe{constructor(){super({}),this.root.push(new fr(Ve.COLUMN))}}class Br extends s{constructor(){super("w:pageBreakBefore")}}!function(e){e.AT_LEAST="atLeast",e.EXACTLY="exactly",e.AUTO="auto"}(Ge||(Ge={}));class Er extends n{constructor(){super(...arguments),this.xmlKeys={after:"w:after",before:"w:before",line:"w:line",lineRule:"w:lineRule"}}}class yr extends s{constructor(e){super("w:spacing"),this.root.push(new Er(e))}}!function(e){e.HEADING_1="Heading1",e.HEADING_2="Heading2",e.HEADING_3="Heading3",e.HEADING_4="Heading4",e.HEADING_5="Heading5",e.HEADING_6="Heading6",e.TITLE="Title"}(Ke||(Ke={}));class Sr extends s{constructor(e){super("w:pStyle"),this.root.push(new o({val:e}))}}class br extends s{constructor(e,t,r){super("w:tabs"),this.root.push(new Ir(e,t,r))}}!function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center",e.BAR="bar",e.CLEAR="clear",e.DECIMAL="decimal",e.END="end",e.NUM="num",e.START="start"}(We||(We={})),function(e){e.DOT="dot",e.HYPHEN="hyphen",e.MIDDLE_DOT="middleDot",e.NONE="none",e.UNDERSCORE="underscore"}($e||($e={})),function(e){e[e.MAX=9026]="MAX"}(ze||(ze={}));class Tr extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val",pos:"w:pos",leader:"w:leader"}}}class Ir extends s{constructor(e,t,r){super("w:tab"),this.root.push(new Tr({val:e,pos:t,leader:r}))}}class Pr extends s{constructor(e,t){super("w:numPr"),this.root.push(new Rr(t)),this.root.push(new vr(e))}}class Rr extends s{constructor(e){super("w:ilvl"),this.root.push(new o({val:e}))}}class vr extends s{constructor(e){super("w:numId"),this.root.push(new o({val:"string"==typeof e?`{${e}}`:e}))}}class xr extends n{constructor(){super(...arguments),this.xmlKeys={id:"Id",type:"Type",target:"Target",targetMode:"TargetMode"}}}!function(e){e.EXTERNAL="External"}(Ye||(Ye={}));class Or extends s{constructor(e,t,r,i){super("Relationship"),this.root.push(new xr({id:e,type:t,target:r,targetMode:i}))}}class Fr extends n{constructor(){super(...arguments),this.xmlKeys={id:"r:id",history:"w:history",anchor:"w:anchor"}}}!function(e){e.INTERNAL="INTERNAL",e.EXTERNAL="EXTERNAL"}(Xe||(Xe={}));class Lr extends s{constructor(e,t,r){super("w:hyperlink"),this.linkId=t;const i={history:1,anchor:r||void 0,id:r?void 0:`rId${this.linkId}`},s=new Fr(i);this.root.push(s),e.forEach((e=>{this.root.push(e)}))}}class Dr extends Lr{constructor(e){super(e.children,He(),e.anchor)}}class Ur{constructor(e){this.options=e}}class Hr extends n{constructor(){super(...arguments),this.xmlKeys={id:"w:id",name:"w:name"}}}class Nr extends n{constructor(){super(...arguments),this.xmlKeys={id:"w:id"}}}class Qr{constructor(e){const t=He();this.start=new Mr(e.id,t),this.children=e.children,this.end=new kr(t)}}class Mr extends s{constructor(e,t){super("w:bookmarkStart");const r=new Hr({name:e,id:t});this.root.push(r)}}class kr extends s{constructor(e){super("w:bookmarkEnd");const t=new Nr({id:e});this.root.push(t)}}class Vr extends s{constructor(e){super("w:outlineLvl"),this.level=e,this.root.push(new o({val:e}))}}class Gr extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class Kr extends s{constructor(e,t={}){super("w:instrText"),this.root.push(new Gr({space:V.PRESERVE}));let r=`PAGEREF ${e}`;t.hyperlink&&(r=`${r} \\h`),t.useRelativePosition&&(r=`${r} \\p`),this.root.push(r)}}class Wr extends Pe{constructor(e,t={}){super({children:[new ie(!0),new Kr(e,t),new Ae]})}}!function(e){e.BOTH="both",e.BOTTOM="bottom",e.CENTER="center",e.TOP="top"}(Je||(Je={}));class $r extends n{constructor(){super(...arguments),this.xmlKeys={verticalAlign:"w:val"}}}class zr extends s{constructor(e){super("w:vAlign"),this.root.push(new $r({verticalAlign:e}))}}!function(e){e.DEFAULT="default",e.FIRST="first",e.EVEN="even"}(je||(je={}));class Yr extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:type",id:"r:id"}}}!function(e){e.HEADER="w:headerReference",e.FOOTER="w:footerReference"}(Ze||(Ze={}));class Xr extends s{constructor(e,t){super(e),this.root.push(new Yr({type:t.type||je.DEFAULT,id:`rId${t.id}`}))}}class Jr extends n{constructor(){super(...arguments),this.xmlKeys={space:"w:space",count:"w:num",separate:"w:sep",equalWidth:"w:equalWidth"}}}class jr extends s{constructor({space:e,count:t,separate:r,equalWidth:i,children:s}){super("w:cols"),this.root.push(new Jr({space:void 0===e?void 0:P(e),count:void 0===t?void 0:g(t),separate:r,equalWidth:i})),!i&&s&&s.forEach((e=>this.addChildElement(e)))}}class Zr extends n{constructor(){super(...arguments),this.xmlKeys={linePitch:"w:linePitch"}}}class qr extends s{constructor(e){super("w:docGrid"),this.root.push(new Zr({linePitch:g(e)}))}}!function(e){e.NEW_PAGE="newPage",e.NEW_SECTION="newSection",e.CONTINUOUS="continuous"}(qe||(qe={}));class ei extends n{constructor(){super(...arguments),this.xmlKeys={countBy:"w:countBy",start:"w:start",restart:"w:restart",distance:"w:distance"}}}class ti extends s{constructor({countBy:e,start:t,restart:r,distance:i}){super("w:lnNumType"),this.root.push(new ei({countBy:void 0===e?void 0:g(e),start:void 0===t?void 0:g(t),restart:r,distance:void 0===i?void 0:P(i)}))}}!function(e){e.ALL_PAGES="allPages",e.FIRST_PAGE="firstPage",e.NOT_FIRST_PAGE="notFirstPage"}(et||(et={})),function(e){e.PAGE="page",e.TEXT="text"}(tt||(tt={})),function(e){e.BACK="back",e.FRONT="front"}(rt||(rt={}));class ri extends n{constructor(){super(...arguments),this.xmlKeys={display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"}}}class ii extends A{constructor(e){super("w:pgBorders"),e&&(e.pageBorders?this.root.push(new ri({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder})):this.root.push(new ri({})),e.pageBorderTop&&this.root.push(new X("w:top",e.pageBorderTop)),e.pageBorderLeft&&this.root.push(new X("w:left",e.pageBorderLeft)),e.pageBorderBottom&&this.root.push(new X("w:bottom",e.pageBorderBottom)),e.pageBorderRight&&this.root.push(new X("w:right",e.pageBorderRight)))}}class si extends n{constructor(){super(...arguments),this.xmlKeys={top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter"}}}class Ai extends s{constructor(e,t,r,i,s,A,n){super("w:pgMar"),this.root.push(new si({top:b(e),right:P(t),bottom:b(r),left:P(i),header:P(s),footer:P(A),gutter:P(n)}))}}!function(e){e.HYPHEN="hyphen",e.PERIOD="period",e.COLON="colon",e.EM_DASH="emDash",e.EN_DASH="endash"}(it||(it={}));class ni extends n{constructor(){super(...arguments),this.xmlKeys={start:"w:start",formatType:"w:fmt",separator:"w:chapSep"}}}class oi extends s{constructor({start:e,formatType:t,separator:r}){super("w:pgNumType"),this.root.push(new ni({start:void 0===e?void 0:g(e),formatType:t,separator:r}))}}!function(e){e.PORTRAIT="portrait",e.LANDSCAPE="landscape"}(st||(st={}));class ai extends n{constructor(){super(...arguments),this.xmlKeys={width:"w:w",height:"w:h",orientation:"w:orient"}}}class li extends s{constructor(e,t,r){super("w:pgSz");const i=r===st.LANDSCAPE,s=P(e),A=P(t);this.root.push(new ai({width:i?A:s,height:i?s:A,orientation:r}))}}!function(e){e.NEXT_PAGE="nextPage",e.NEXT_COLUMN="nextColumn",e.CONTINUOUS="continuous",e.EVEN_PAGE="evenPage",e.ODD_PAGE="oddPage"}(At||(At={}));class hi extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class ci extends s{constructor(e){super("w:type"),this.root.push(new hi({val:e}))}}const ui={TOP:"1in",RIGHT:"1in",BOTTOM:"1in",LEFT:"1in",HEADER:708,FOOTER:708,GUTTER:0},di={WIDTH:11906,HEIGHT:16838,ORIENTATION:st.PORTRAIT};class pi extends s{constructor({page:{size:{width:e=di.WIDTH,height:t=di.HEIGHT,orientation:r=di.ORIENTATION}={},margin:{top:i=ui.TOP,right:s=ui.RIGHT,bottom:A=ui.BOTTOM,left:n=ui.LEFT,header:o=ui.HEADER,footer:a=ui.FOOTER,gutter:l=ui.GUTTER}={},pageNumbers:h={},borders:c}={},grid:{linePitch:u=360}={},headerWrapperGroup:d={},footerWrapperGroup:p={},lineNumbers:g,titlePage:_,verticalAlign:m,column:f,type:w}={}){super("w:sectPr"),this.addHeaderFooterGroup(Ze.HEADER,d),this.addHeaderFooterGroup(Ze.FOOTER,p),w&&this.root.push(new ci(w)),this.root.push(new li(e,t,r)),this.root.push(new Ai(i,s,A,n,o,a,l)),c&&this.root.push(new ii(c)),g&&this.root.push(new ti(g)),this.root.push(new oi(h)),f&&this.root.push(new jr(f)),m&&this.root.push(new zr(m)),void 0!==_&&this.root.push(new L("w:titlePg",_)),this.root.push(new qr(u))}addHeaderFooterGroup(e,t){t.default&&this.root.push(new Xr(e,{type:je.DEFAULT,id:t.default.View.ReferenceId})),t.first&&this.root.push(new Xr(e,{type:je.FIRST,id:t.first.View.ReferenceId})),t.even&&this.root.push(new Xr(e,{type:je.EVEN,id:t.even.View.ReferenceId}))}}class gi extends s{constructor(){super("w:body"),this.sections=[]}addSection(e){const t=this.sections.pop();this.root.push(this.createSectionParagraph(t)),this.sections.push(new pi(e))}prepForXml(e){return 1===this.sections.length&&(this.root.splice(0,1),this.root.push(this.sections.pop())),super.prepForXml(e)}push(e){this.root.push(e)}createSectionParagraph(e){const t=new xi({}),r=new vi({});return r.push(e),t.addChildElement(r),t}}class _i extends n{constructor(){super(...arguments),this.xmlKeys={width:"w:w",space:"w:space"}}}class mi extends s{constructor({width:e,space:t}){super("w:col"),this.root.push(new _i({width:P(e),space:void 0===t?void 0:P(t)}))}}class fi extends n{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"}}}class wi extends n{constructor(){super(...arguments),this.xmlKeys={color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"}}}class Ci extends s{constructor(e){super("w:background"),this.root.push(new wi({color:S(e.color?e.color:"FFFFFF"),themeColor:e.themeColor,themeShade:void 0===e.themeShade?void 0:C(e.themeShade),themeTint:void 0===e.themeTint?void 0:C(e.themeTint)}))}}class Bi extends s{constructor(e){super("w:document"),this.root.push(new fi({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.body=new gi,this.root.push(new Ci(e.background)),this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}}class Ei extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns"}}}class yi extends s{constructor(){super("Relationships"),this.root.push(new Ei({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(e){this.root.push(e)}createRelationship(e,t,r,i){const s=new Or(`rId${e}`,t,r,i);return this.addRelationship(s),s}get RelationshipCount(){return this.root.length-1}}class Si{constructor(e){this.document=new Bi(e),this.relationships=new yi}get View(){return this.document}get Relationships(){return this.relationships}}var bi,Ti,Ii;!function(e){e.NONE="none",e.DROP="drop",e.MARGIN="margin"}(bi||(bi={})),function(e){e.MARGIN="margin",e.PAGE="page",e.TEXT="text"}(Ti||(Ti={})),function(e){e.AROUND="around",e.AUTO="auto",e.NONE="none",e.NOT_BESIDE="notBeside",e.THROUGH="through",e.TIGHT="tight"}(Ii||(Ii={}));class Pi extends n{constructor(){super(...arguments),this.xmlKeys={anchorLock:"w:anchorLock",dropCap:"w:dropCap",width:"w:w",height:"w:h",x:"w:x",y:"w:y",anchorHorizontal:"w:hAnchor",anchorVertical:"w:vAnchor",spaceHorizontal:"w:hSpace",spaceVertical:"w:vSpace",rule:"w:hRule",alignmentX:"w:xAlign",alignmentY:"w:yAlign",lines:"w:lines",wrap:"w:wrap"}}}class Ri extends s{constructor(e){var t,r;super("w:framePr"),this.root.push(new Pi({anchorLock:e.anchorLock,dropCap:e.dropCap,width:e.width,height:e.height,x:e.position.x,y:e.position.y,anchorHorizontal:e.anchor.horizontal,anchorVertical:e.anchor.vertical,spaceHorizontal:null===(t=e.space)||void 0===t?void 0:t.horizontal,spaceVertical:null===(r=e.space)||void 0===r?void 0:r.vertical,rule:e.rule,alignmentX:e.alignment.x,alignmentY:e.alignment.y,lines:e.lines,wrap:e.wrap}))}}class vi extends A{constructor(e){var t,r;if(super("w:pPr"),this.numberingReferences=[],!e)return this;if(e.heading&&this.push(new Sr(e.heading)),e.bullet&&this.push(new Sr("ListParagraph")),e.numbering&&(e.style||e.heading||e.numbering.custom||this.push(new Sr("ListParagraph"))),e.style&&this.push(new Sr(e.style)),void 0!==e.keepNext&&this.push(new L("w:keepNext",e.keepNext)),void 0!==e.keepLines&&this.push(new L("w:keepLines",e.keepLines)),e.pageBreakBefore&&this.push(new Br),e.frame&&this.push(new Ri(e.frame)),void 0!==e.widowControl&&this.push(new L("w:widowControl",e.widowControl)),e.bullet&&this.push(new Pr(1,e.bullet.level)),e.numbering&&(this.numberingReferences.push({reference:e.numbering.reference,instance:null!==(t=e.numbering.instance)&&void 0!==t?t:0}),this.push(new Pr(`${e.numbering.reference}-${null!==(r=e.numbering.instance)&&void 0!==r?r:0}`,e.numbering.level))),e.border&&this.push(new j(e.border)),e.thematicBreak&&this.push(new Z),e.shading&&this.push(new ce(e.shading)),e.rightTabStop&&this.push(new br(We.RIGHT,e.rightTabStop)),e.tabStops)for(const t of e.tabStops)this.push(new br(t.type,t.position,t.leader));e.leftTabStop&&this.push(new br(We.LEFT,e.leftTabStop)),void 0!==e.bidirectional&&this.push(new L("w:bidi",e.contextualSpacing)),e.spacing&&this.push(new yr(e.spacing)),e.indent&&this.push(new ee(e.indent)),void 0!==e.contextualSpacing&&this.push(new L("w:contextualSpacing",e.contextualSpacing)),e.alignment&&this.push(new Y(e.alignment)),void 0!==e.outlineLevel&&this.push(new Vr(e.outlineLevel)),void 0!==e.suppressLineNumbers&&this.push(new L("w:suppressLineNumbers",e.suppressLineNumbers))}push(e){this.root.push(e)}prepForXml(e){if(e.viewWrapper instanceof Si)for(const t of this.numberingReferences)e.file.Numbering.createConcreteNumberingInstance(t.reference,t.instance);return super.prepForXml(e)}}class xi extends s{constructor(e){if(super("w:p"),"string"==typeof e)return this.properties=new vi({}),this.root.push(this.properties),this.root.push(new Re(e)),this;if(this.properties=new vi(e),this.root.push(this.properties),e.text&&this.root.push(new Re(e.text)),e.children)for(const t of e.children)if(t instanceof Qr){this.root.push(t.start);for(const e of t.children)this.root.push(e);this.root.push(t.end)}else this.root.push(t)}prepForXml(e){for(const t of this.root)if(t instanceof Ur){const r=this.root.indexOf(t),i=new Lr(t.options.children,He());e.viewWrapper.Relationships.createRelationship(i.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",t.options.link,Ye.EXTERNAL),this.root[r]=i}return super.prepForXml(e)}addRunToFront(e){return this.root.splice(1,0,e),this}}class Oi extends s{constructor(e){super("m:oMath");for(const t of e.children)this.root.push(t)}}class Fi extends s{constructor(e){super("m:t"),this.root.push(e)}}class Li extends s{constructor(e){super("m:r"),this.root.push(new Fi(e))}}class Di extends s{constructor(e){super("m:den");for(const t of e)this.root.push(t)}}class Ui extends s{constructor(e){super("m:num");for(const t of e)this.root.push(t)}}class Hi extends s{constructor(e){super("m:f"),this.root.push(new Ui(e.numerator)),this.root.push(new Di(e.denominator))}}class Ni extends n{constructor(){super(...arguments),this.xmlKeys={accent:"m:val"}}}class Qi extends s{constructor(e){super("m:chr"),this.root.push(new Ni({accent:e}))}}class Mi extends s{constructor(e){super("m:e");for(const t of e)this.root.push(t)}}class ki extends n{constructor(){super(...arguments),this.xmlKeys={value:"m:val"}}}class Vi extends s{constructor(){super("m:limLoc"),this.root.push(new ki({value:"undOvr"}))}}class Gi extends n{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class Ki extends s{constructor(){super("m:subHide"),this.root.push(new Gi({hide:1}))}}class Wi extends n{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class $i extends s{constructor(){super("m:supHide"),this.root.push(new Wi({hide:1}))}}class zi extends s{constructor(e,t,r){super("m:naryPr"),this.root.push(new Qi(e)),this.root.push(new Vi),t||this.root.push(new $i),r||this.root.push(new Ki)}}class Yi extends s{constructor(e){super("m:sub");for(const t of e)this.root.push(t)}}class Xi extends s{constructor(e){super("m:sup");for(const t of e)this.root.push(t)}}class Ji extends s{constructor(e){super("m:nary"),this.root.push(new zi("∑",!!e.superScript,!!e.subScript)),e.subScript&&this.root.push(new Yi(e.subScript)),e.superScript&&this.root.push(new Xi(e.superScript)),this.root.push(new Mi(e.children))}}class ji extends s{constructor(){super("m:sSupPr")}}class Zi extends s{constructor(e){super("m:sSup"),this.root.push(new ji),this.root.push(new Mi(e.children)),this.root.push(new Xi(e.superScript))}}class qi extends s{constructor(){super("m:sSubPr")}}class es extends s{constructor(e){super("m:sSub"),this.root.push(new qi),this.root.push(new Mi(e.children)),this.root.push(new Yi(e.subScript))}}class ts extends s{constructor(){super("m:sSubSupPr")}}class rs extends s{constructor(e){super("m:sSubSup"),this.root.push(new ts),this.root.push(new Mi(e.children)),this.root.push(new Yi(e.subScript)),this.root.push(new Xi(e.superScript))}}class is extends s{constructor(){super("m:sPrePr")}}class ss extends s{constructor(e){super("m:sPre"),this.root.push(new is),this.root.push(new Mi(e.children)),this.root.push(new Yi(e.subScript)),this.root.push(new Xi(e.superScript))}}const As="";class ns extends s{constructor(e){if(super("m:deg"),e)for(const t of e)this.root.push(t)}}class os extends n{constructor(){super(...arguments),this.xmlKeys={hide:"m:val"}}}class as extends s{constructor(){super("m:degHide"),this.root.push(new os({hide:1}))}}class ls extends s{constructor(e){super("m:radPr"),e||this.root.push(new as)}}class hs extends s{constructor(e){super("m:rad"),this.root.push(new ls(!!e.degree)),this.root.push(new ns(e.degree)),this.root.push(new Mi(e.children))}}class cs extends s{constructor(e){super("m:fName");for(const t of e)this.root.push(t)}}class us extends s{constructor(){super("m:funcPr")}}class ds extends s{constructor(e){super("m:func"),this.root.push(new us),this.root.push(new cs(e.name)),this.root.push(new Mi(e.children))}}class ps extends n{constructor(){super(...arguments),this.xmlKeys={character:"m:val"}}}class gs extends s{constructor(e){super("m:begChr"),this.root.push(new ps({character:e}))}}class _s extends n{constructor(){super(...arguments),this.xmlKeys={character:"m:val"}}}class ms extends s{constructor(e){super("m:endChr"),this.root.push(new _s({character:e}))}}class fs extends s{constructor(e){super("m:dPr"),e&&(this.root.push(new gs(e.beginningCharacter)),this.root.push(new ms(e.endingCharacter)))}}class ws extends s{constructor(e){super("m:d"),this.root.push(new fs),this.root.push(new Mi(e.children))}}class Cs extends s{constructor(e){super("m:d"),this.root.push(new fs({beginningCharacter:"[",endingCharacter:"]"})),this.root.push(new Mi(e.children))}}class Bs extends s{constructor(e){super("m:d"),this.root.push(new fs({beginningCharacter:"{",endingCharacter:"}"})),this.root.push(new Mi(e.children))}}class Es extends s{constructor(e){super("m:d"),this.root.push(new fs({beginningCharacter:"〈",endingCharacter:"〉"})),this.root.push(new Mi(e.children))}}class ys extends s{constructor(e){super("w:tblGrid");for(const t of e)this.root.push(new bs(t))}}class Ss extends n{constructor(){super(...arguments),this.xmlKeys={w:"w:w"}}}class bs extends s{constructor(e){super("w:gridCol"),void 0!==e&&this.root.push(new Ss({w:P(e)}))}}var Ts,Is,Ps,Rs;!function(e){e.AUTO="auto",e.DXA="dxa",e.NIL="nil",e.PERCENTAGE="pct"}(Ts||(Ts={}));class vs extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:type",size:"w:w"}}}class xs extends s{constructor(e,{type:t=Ts.AUTO,size:r}){super(e);let i=r;t===Ts.PERCENTAGE&&"number"==typeof r&&(i=`${r}%`),this.root.push(new vs({type:t,size:v(i)}))}}!function(e){e.TABLE="w:tblCellMar",e.TABLE_CELL="w:tcMar"}(Is||(Is={}));class Os extends A{constructor(e,{marginUnitType:t=Ts.DXA,top:r,left:i,bottom:s,right:A}){super(e),void 0!==r&&this.root.push(new xs("w:top",{type:t,size:r})),void 0!==i&&this.root.push(new xs("w:left",{type:t,size:i})),void 0!==s&&this.root.push(new xs("w:bottom",{type:t,size:s})),void 0!==A&&this.root.push(new xs("w:right",{type:t,size:A}))}}class Fs extends A{constructor(e){super("w:tcBorders"),e.top&&this.root.push(new X("w:top",e.top)),e.start&&this.root.push(new X("w:start",e.start)),e.left&&this.root.push(new X("w:left",e.left)),e.bottom&&this.root.push(new X("w:bottom",e.bottom)),e.end&&this.root.push(new X("w:end",e.end)),e.right&&this.root.push(new X("w:right",e.right))}}class Ls extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Ds extends s{constructor(e){super("w:gridSpan"),this.root.push(new Ls({val:g(e)}))}}!function(e){e.CONTINUE="continue",e.RESTART="restart"}(Ps||(Ps={}));class Us extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Hs extends s{constructor(e){super("w:vMerge"),this.root.push(new Us({val:e}))}}!function(e){e.BOTTOM_TO_TOP_LEFT_TO_RIGHT="btLr",e.LEFT_TO_RIGHT_TOP_TO_BOTTOM="lrTb",e.TOP_TO_BOTTOM_RIGHT_TO_LEFT="tbRl"}(Rs||(Rs={}));class Ns extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class Qs extends s{constructor(e){super("w:textDirection"),this.root.push(new Ns({val:e}))}}class Ms extends A{constructor(e){super("w:tcPr"),e.width&&this.root.push(new xs("w:tcW",e.width)),e.columnSpan&&this.root.push(new Ds(e.columnSpan)),e.verticalMerge?this.root.push(new Hs(e.verticalMerge)):e.rowSpan&&e.rowSpan>1&&this.root.push(new Hs(Ps.RESTART)),e.borders&&this.root.push(new Fs(e.borders)),e.shading&&this.root.push(new ce(e.shading)),e.margins&&this.root.push(new Os(Is.TABLE_CELL,e.margins)),e.textDirection&&this.root.push(new Qs(e.textDirection)),e.verticalAlign&&this.root.push(new zr(e.verticalAlign))}}class ks extends s{constructor(e){super("w:tc"),this.options=e,this.root.push(new Ms(e));for(const t of e.children)this.root.push(t)}prepForXml(e){return this.root[this.root.length-1]instanceof xi||this.root.push(new xi({})),super.prepForXml(e)}}const Vs={style:M.NONE,size:0,color:"auto"},Gs={style:M.SINGLE,size:4,color:"auto"};class Ks extends s{constructor(e){super("w:tblBorders"),e.top?this.root.push(new X("w:top",e.top)):this.root.push(new X("w:top",Gs)),e.left?this.root.push(new X("w:left",e.left)):this.root.push(new X("w:left",Gs)),e.bottom?this.root.push(new X("w:bottom",e.bottom)):this.root.push(new X("w:bottom",Gs)),e.right?this.root.push(new X("w:right",e.right)):this.root.push(new X("w:right",Gs)),e.insideHorizontal?this.root.push(new X("w:insideH",e.insideHorizontal)):this.root.push(new X("w:insideH",Gs)),e.insideVertical?this.root.push(new X("w:insideV",e.insideVertical)):this.root.push(new X("w:insideV",Gs))}}var Ws,$s,zs,Ys,Xs,Js,js;Ks.NONE={top:Vs,bottom:Vs,left:Vs,right:Vs,insideHorizontal:Vs,insideVertical:Vs},function(e){e.NEVER="never",e.OVERLAP="overlap"}(Ws||(Ws={}));class Zs extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class qs extends s{constructor(e){super("w:tblOverlap"),this.root.push(new Zs({val:e}))}}!function(e){e.MARGIN="margin",e.PAGE="page",e.TEXT="text"}($s||($s={})),function(e){e.CENTER="center",e.INSIDE="inside",e.LEFT="left",e.OUTSIDE="outside",e.RIGHT="right"}(zs||(zs={})),function(e){e.CENTER="center",e.INSIDE="inside",e.BOTTOM="bottom",e.OUTSIDE="outside",e.INLINE="inline",e.TOP="top"}(Ys||(Ys={}));class eA extends n{constructor(){super(...arguments),this.xmlKeys={horizontalAnchor:"w:horzAnchor",verticalAnchor:"w:vertAnchor",absoluteHorizontalPosition:"w:tblpX",relativeHorizontalPosition:"w:tblpXSpec",absoluteVerticalPosition:"w:tblpY",relativeVerticalPosition:"w:tblpYSpec",bottomFromText:"w:bottomFromText",topFromText:"w:topFromText",leftFromText:"w:leftFromText",rightFromText:"w:rightFromText"}}}class tA extends s{constructor(e){var{leftFromText:t,rightFromText:r,topFromText:i,bottomFromText:s,absoluteHorizontalPosition:A,absoluteVerticalPosition:n}=e,o=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]])}return r}(e,["leftFromText","rightFromText","topFromText","bottomFromText","absoluteHorizontalPosition","absoluteVerticalPosition"]);super("w:tblpPr"),this.root.push(new eA(Object.assign({leftFromText:void 0===t?void 0:P(t),rightFromText:void 0===r?void 0:P(r),topFromText:void 0===i?void 0:P(i),bottomFromText:void 0===s?void 0:P(s),absoluteHorizontalPosition:void 0===A?void 0:b(A),absoluteVerticalPosition:void 0===n?void 0:b(n)},o))),o.overlap&&this.root.push(new qs(o.overlap))}}!function(e){e.AUTOFIT="autofit",e.FIXED="fixed"}(Xs||(Xs={}));class rA extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:type"}}}class iA extends s{constructor(e){super("w:tblLayout"),this.root.push(new rA({type:e}))}}class sA extends A{constructor(e){super("w:tblPr"),e.style&&this.root.push(new U("w:tblStyle",e.style)),e.float&&this.root.push(new tA(e.float)),void 0!==e.visuallyRightToLeft&&this.root.push(new L("w:bidiVisual",e.visuallyRightToLeft)),e.width&&this.root.push(new xs("w:tblW",e.width)),e.alignment&&this.root.push(new Y(e.alignment)),e.indent&&this.root.push(new xs("w:tblInd",e.indent)),e.borders&&this.root.push(new Ks(e.borders)),e.shading&&this.root.push(new ce(e.shading)),e.layout&&this.root.push(new iA(e.layout)),e.cellMargin&&this.root.push(new Os(Is.TABLE,e.cellMargin))}}class AA extends s{constructor({rows:e,width:t,columnWidths:r=Array(Math.max(...e.map((e=>e.CellCount)))).fill(100),margins:i,indent:s,float:A,layout:n,style:o,borders:a,alignment:l,visuallyRightToLeft:h}){super("w:tbl"),this.root.push(new sA({borders:null!=a?a:{},width:null!=t?t:{size:100},indent:s,float:A,layout:n,style:o,alignment:l,cellMargin:i,visuallyRightToLeft:h})),this.root.push(new ys(r));for(const t of e)this.root.push(t);e.forEach(((t,r)=>{if(r===e.length-1)return;let i=0;t.cells.forEach((t=>{if(t.options.rowSpan&&t.options.rowSpan>1){const s=new ks({rowSpan:t.options.rowSpan-1,columnSpan:t.options.columnSpan,borders:t.options.borders,children:[],verticalMerge:Ps.CONTINUE});e[r+1].addCellToColumnIndex(s,i)}i+=t.options.columnSpan||1}))}))}}!function(e){e.AUTO="auto",e.ATLEAST="atLeast",e.EXACT="exact"}(Js||(Js={}));class nA extends n{constructor(){super(...arguments),this.xmlKeys={value:"w:val",rule:"w:hRule"}}}class oA extends s{constructor(e,t){super("w:trHeight"),this.root.push(new nA({value:P(e),rule:t}))}}class aA extends A{constructor(e){super("w:trPr"),void 0!==e.cantSplit&&this.root.push(new L("w:cantSplit",e.cantSplit)),void 0!==e.tableHeader&&this.root.push(new L("w:tblHeader",e.tableHeader)),e.height&&this.root.push(new oA(e.height.value,e.height.rule))}}class lA extends s{constructor(e){super("w:tr"),this.options=e,this.root.push(new aA(e));for(const t of e.children)this.root.push(t)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter((e=>e instanceof ks))}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){const r=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,r-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw new Error("cell 'rootIndex' should between 1 to "+(this.root.length-1));let t=0;for(let r=1;r<e;r++)t+=this.root[r].options.columnSpan||1;return t}columnIndexToRootIndex(e,t=!1){if(e<0)throw new Error("cell 'columnIndex' should not less than zero");let r=0,i=1;for(;r<=e;){if(i>=this.root.length){if(t)return this.root.length;throw new Error("cell 'columnIndex' should not great than "+(r-1))}const e=this.root[i];i+=1,r+=e&&e.options.columnSpan||1}return i-1}}class hA extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns",vt:"xmlns:vt"}}}class cA extends s{constructor(){super("Properties"),this.root.push(new hA({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}}class uA extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns"}}}class dA extends n{constructor(){super(...arguments),this.xmlKeys={contentType:"ContentType",extension:"Extension"}}}class pA extends s{constructor(e,t){super("Default"),this.root.push(new dA({contentType:e,extension:t}))}}class gA extends n{constructor(){super(...arguments),this.xmlKeys={contentType:"ContentType",partName:"PartName"}}}class _A extends s{constructor(e,t){super("Override"),this.root.push(new gA({contentType:e,partName:t}))}}class mA extends s{constructor(){super("Types"),this.root.push(new uA({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(new pA("image/png","png")),this.root.push(new pA("image/jpeg","jpeg")),this.root.push(new pA("image/jpeg","jpg")),this.root.push(new pA("image/bmp","bmp")),this.root.push(new pA("image/gif","gif")),this.root.push(new pA("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(new pA("application/xml","xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(new _A("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml"))}addFooter(e){this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addHeader(e){this.root.push(new _A("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}}class fA extends s{constructor(e){super("cp:coreProperties"),this.root.push(new fi({cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"})),e.title&&this.root.push(new N("dc:title",e.title)),e.subject&&this.root.push(new N("dc:subject",e.subject)),e.creator&&this.root.push(new N("dc:creator",e.creator)),e.keywords&&this.root.push(new N("cp:keywords",e.keywords)),e.description&&this.root.push(new N("dc:description",e.description)),e.lastModifiedBy&&this.root.push(new N("cp:lastModifiedBy",e.lastModifiedBy)),e.revision&&this.root.push(new N("cp:revision",e.revision)),this.root.push(new wA("dcterms:created")),this.root.push(new wA("dcterms:modified"))}}class wA extends s{constructor(e){super(e),this.root.push(new fi({type:"dcterms:W3CDTF"})),this.root.push(F(new Date))}}class CA extends n{constructor(){super(...arguments),this.xmlKeys={xmlns:"xmlns",vt:"xmlns:vt"}}}class BA extends n{constructor(){super(...arguments),this.xmlKeys={fmtid:"fmtid",pid:"pid",name:"name"}}}class EA extends s{constructor(e,t){super("property"),this.root.push(new BA({fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new yA(t.value))}}class yA extends s{constructor(e){super("vt:lpwstr"),this.root.push(e)}}class SA extends s{constructor(e){super("Properties"),this.properties=[],this.root.push(new CA({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(const t of e)this.addCustomProperty(t)}prepForXml(e){return this.properties.forEach((e=>this.root.push(e))),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new EA(this.nextId++,e))}}class bA extends n{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"}}}class TA extends p{constructor(e,t){super("w:ftr",t),this.refId=e,t||this.root.push(new bA({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}}class IA{constructor(e,t,r){this.media=e,this.footer=new TA(t,r),this.relationships=new yi}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}}class PA extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:type",id:"w:id"}}}class RA extends s{constructor(){super("w:footnoteRef")}}class vA extends Pe{constructor(){super({style:"FootnoteReference"}),this.root.push(new RA)}}!function(e){e.SEPERATOR="separator",e.CONTINUATION_SEPERATOR="continuationSeparator"}(js||(js={}));class xA extends s{constructor(e){super("w:footnote"),this.root.push(new PA({type:e.type,id:e.id}));for(let t=0;t<e.children.length;t++){const r=e.children[t];0===t&&r.addRunToFront(new vA),this.root.push(r)}}}class OA extends s{constructor(){super("w:continuationSeparator")}}class FA extends Pe{constructor(){super({}),this.root.push(new OA)}}class LA extends s{constructor(){super("w:separator")}}class DA extends Pe{constructor(){super({}),this.root.push(new LA)}}class UA extends n{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"}}}class HA extends s{constructor(){super("w:footnotes"),this.root.push(new UA({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const e=new xA({id:-1,type:js.SEPERATOR,children:[new xi({spacing:{after:0,line:240,lineRule:Ge.AUTO},children:[new DA]})]});this.root.push(e);const t=new xA({id:0,type:js.CONTINUATION_SEPERATOR,children:[new xi({spacing:{after:0,line:240,lineRule:Ge.AUTO},children:[new FA]})]});this.root.push(t)}createFootNote(e,t){const r=new xA({id:e,children:t});this.root.push(r)}}class NA{constructor(){this.footnotess=new HA,this.relationships=new yi}get View(){return this.footnotess}get Relationships(){return this.relationships}}class QA extends n{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"}}}class MA extends p{constructor(e,t){super("w:hdr",t),this.refId=e,t||this.root.push(new QA({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}}class kA{constructor(e,t,r){this.media=e,this.header=new MA(t,r),this.relationships=new yi}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}}class VA{constructor(){this.map=new Map}addMedia(e,t){const r=`${He()}.png`,i={stream:"string"==typeof e?this.convertDataURIToBinary(e):e,fileName:r,transformation:{pixels:{x:Math.round(t.width),y:Math.round(t.height)},emus:{x:Math.round(9525*t.width),y:Math.round(9525*t.height)},flip:t.flip,rotation:t.rotation?6e4*t.rotation:void 0}};return this.map.set(r,i),i}addImage(e,t){this.map.set(e,t)}get Array(){return Array.from(this.map.values())}convertDataURIToBinary(e){const t=";base64,",i=e.indexOf(t)+t.length;return"function"==typeof atob?new Uint8Array(atob(e.substring(i)).split("").map((e=>e.charCodeAt(0)))):new(r(764).Buffer)(e,"base64")}}const GA="";var KA,WA;!function(e){e.BULLET="bullet",e.CARDINAL_TEXT="cardinalText",e.CHICAGO="chicago",e.DECIMAL="decimal",e.DECIMAL_ENCLOSED_CIRCLE="decimalEnclosedCircle",e.DECIMAL_ENCLOSED_FULLSTOP="decimalEnclosedFullstop",e.DECIMAL_ENCLOSED_PARENTHESES="decimalEnclosedParen",e.DECIMAL_ZERO="decimalZero",e.LOWER_LETTER="lowerLetter",e.LOWER_ROMAN="lowerRoman",e.NONE="none",e.ORDINAL_TEXT="ordinalText",e.UPPER_LETTER="upperLetter",e.UPPER_ROMAN="upperRoman"}(KA||(KA={}));class $A extends n{constructor(){super(...arguments),this.xmlKeys={ilvl:"w:ilvl",tentative:"w15:tentative"}}}class zA extends s{constructor(e){super("w:numFmt"),this.root.push(new o({val:e}))}}class YA extends s{constructor(e){super("w:lvlText"),this.root.push(new o({val:e}))}}class XA extends s{constructor(e){super("w:lvlJc"),this.root.push(new o({val:e}))}}!function(e){e.NOTHING="nothing",e.SPACE="space",e.TAB="tab"}(WA||(WA={}));class JA extends s{constructor(e){super("w:suff"),this.root.push(new o({val:e}))}}class jA extends s{constructor({level:e,format:t,text:r,alignment:i=Q.START,start:s=1,style:A,suffix:n}){super("w:lvl"),this.root.push(new H("w:start",g(s))),t&&this.root.push(new zA(t)),n&&this.root.push(new JA(n)),r&&this.root.push(new YA(r)),this.root.push(new XA(i)),this.paragraphProperties=new vi(A&&A.paragraph),this.runProperties=new be(A&&A.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),this.root.push(new $A({ilvl:g(e),tentative:1}))}}class ZA extends jA{constructor(e){super(e)}}class qA extends jA{}class en extends s{constructor(e){super("w:multiLevelType"),this.root.push(new o({val:e}))}}class tn extends n{constructor(){super(...arguments),this.xmlKeys={abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"}}}class rn extends s{constructor(e,t){super("w:abstractNum"),this.root.push(new tn({abstractNumId:g(e),restartNumberingAfterBreak:0})),this.root.push(new en("hybridMultilevel")),this.id=e;for(const e of t)this.root.push(new ZA(e))}}class sn extends s{constructor(e){super("w:abstractNumId"),this.root.push(new o({val:e}))}}class An extends n{constructor(){super(...arguments),this.xmlKeys={numId:"w:numId"}}}class nn extends s{constructor(e){super("w:num"),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.root.push(new An({numId:g(e.numId)})),this.root.push(new sn(g(e.abstractNumId))),e.overrideLevel&&this.root.push(new an(e.overrideLevel.num,e.overrideLevel.start))}}class on extends n{constructor(){super(...arguments),this.xmlKeys={ilvl:"w:ilvl"}}}class an extends s{constructor(e,t){super("w:lvlOverride"),this.root.push(new on({ilvl:e})),void 0!==t&&this.root.push(new hn(t))}}class ln extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class hn extends s{constructor(e){super("w:startOverride"),this.root.push(new ln({val:e}))}}class cn extends s{constructor(e){super("w:numbering"),this.abstractNumberingMap=new Map,this.concreteNumberingMap=new Map,this.referenceConfigMap=new Map,this.root.push(new fi({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));const t=new rn(Ue(),[{level:0,format:KA.BULLET,text:"●",alignment:Q.LEFT,style:{paragraph:{indent:{left:De(.5),hanging:De(.25)}}}},{level:1,format:KA.BULLET,text:"○",alignment:Q.LEFT,style:{paragraph:{indent:{left:De(1),hanging:De(.25)}}}},{level:2,format:KA.BULLET,text:"■",alignment:Q.LEFT,style:{paragraph:{indent:{left:2160,hanging:De(.25)}}}},{level:3,format:KA.BULLET,text:"●",alignment:Q.LEFT,style:{paragraph:{indent:{left:2880,hanging:De(.25)}}}},{level:4,format:KA.BULLET,text:"○",alignment:Q.LEFT,style:{paragraph:{indent:{left:3600,hanging:De(.25)}}}},{level:5,format:KA.BULLET,text:"■",alignment:Q.LEFT,style:{paragraph:{indent:{left:4320,hanging:De(.25)}}}},{level:6,format:KA.BULLET,text:"●",alignment:Q.LEFT,style:{paragraph:{indent:{left:5040,hanging:De(.25)}}}},{level:7,format:KA.BULLET,text:"●",alignment:Q.LEFT,style:{paragraph:{indent:{left:5760,hanging:De(.25)}}}},{level:8,format:KA.BULLET,text:"●",alignment:Q.LEFT,style:{paragraph:{indent:{left:6480,hanging:De(.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new nn({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevel:{num:0,start:1}})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(const t of e.config)this.abstractNumberingMap.set(t.reference,new rn(Ue(),t.levels)),this.referenceConfigMap.set(t.reference,t.levels)}prepForXml(e){for(const e of this.abstractNumberingMap.values())this.root.push(e);for(const e of this.concreteNumberingMap.values())this.root.push(e);return super.prepForXml(e)}createConcreteNumberingInstance(e,t){const r=this.abstractNumberingMap.get(e);if(!r)return;const i=`${e}-${t}`;if(this.concreteNumberingMap.has(i))return;const s={numId:Ue(),abstractNumId:r.id,reference:e,instance:t,overrideLevel:{num:0,start:1}},A=this.referenceConfigMap.get(e),n=A&&A[0].start;n&&Number.isInteger(n)&&(s.overrideLevel={num:0,start:n}),this.concreteNumberingMap.set(i,new nn(s))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}}class un extends n{constructor(){super(...arguments),this.xmlKeys={version:"w:val",name:"w:name",uri:"w:uri"}}}class dn extends s{constructor(e){super("w:compatSetting"),this.root.push(new un({version:e,uri:"http://schemas.microsoft.com/office/word",name:"compatibilityMode"}))}}class pn extends s{constructor(e){super("w:compat"),void 0!==e.doNotExpandShiftReturn&&this.root.push(new L("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn)),e.version&&this.root.push(new dn(e.version))}}class gn extends n{constructor(){super(...arguments),this.xmlKeys={wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"}}}class _n extends s{constructor(e){super("w:settings"),this.root.push(new gn({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new L("w:displayBackgroundShape",!0)),void 0!==e.trackRevisions&&this.root.push(new L("w:trackRevisions",e.trackRevisions)),void 0!==e.evenAndOddHeaders&&this.root.push(new L("w:evenAndOddHeaders",e.evenAndOddHeaders)),void 0!==e.updateFields&&this.root.push(new L("w:updateFields",e.updateFields)),this.root.push(new pn({version:e.compatabilityModeVersion||15}))}}class mn extends n{constructor(){super(...arguments),this.xmlKeys={val:"w:val"}}}class fn extends s{constructor(e){super("w:name"),this.root.push(new mn({val:e}))}}class wn extends s{constructor(e){super("w:uiPriority"),this.root.push(new mn({val:g(e)}))}}class Cn extends n{constructor(){super(...arguments),this.xmlKeys={type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"}}}class Bn extends s{constructor(e,t){super("w:style"),this.root.push(new Cn(e)),t.name&&this.root.push(new fn(t.name)),t.basedOn&&this.root.push(new U("w:basedOn",t.basedOn)),t.next&&this.root.push(new U("w:next",t.next)),t.link&&this.root.push(new U("w:link",t.link)),void 0!==t.uiPriority&&this.root.push(new wn(t.uiPriority)),void 0!==t.semiHidden&&this.root.push(new L("w:semiHidden",t.semiHidden)),void 0!==t.unhideWhenUsed&&this.root.push(new L("w:unhideWhenUsed",t.unhideWhenUsed)),void 0!==t.quickFormat&&this.root.push(new L("w:qFormat",t.quickFormat))}}class En extends Bn{constructor(e){super({type:"paragraph",styleId:e.id},e),this.paragraphProperties=new vi(e.paragraph),this.runProperties=new be(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}}class yn extends Bn{constructor(e){super({type:"character",styleId:e.id},Object.assign({uiPriority:99,unhideWhenUsed:!0},e)),this.runProperties=new be(e.run),this.root.push(this.runProperties)}}class Sn extends En{constructor(e){super(Object.assign(Object.assign({},e),{basedOn:"Normal",next:"Normal",quickFormat:!0}))}}class bn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Title",name:"Title"}))}}class Tn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading1",name:"Heading 1"}))}}class In extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading2",name:"Heading 2"}))}}class Pn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading3",name:"Heading 3"}))}}class Rn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading4",name:"Heading 4"}))}}class vn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading5",name:"Heading 5"}))}}class xn extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Heading6",name:"Heading 6"}))}}class On extends Sn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Strong",name:"Strong"}))}}class Fn extends En{constructor(e){super(Object.assign(Object.assign({},e),{id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0}))}}class Ln extends En{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Ge.AUTO}},run:{size:20}}))}}class Dn extends yn{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}}))}}class Un extends yn{constructor(e){super(Object.assign(Object.assign({},e),{id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}}))}}class Hn extends yn{constructor(e){super(Object.assign(Object.assign({},e),{id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:W.SINGLE}}}))}}class Nn extends s{constructor(e){if(super("w:styles"),e.initialStyles&&this.root.push(e.initialStyles),e.importedStyles)for(const t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(const t of e.paragraphStyles)this.root.push(new En(t));if(e.characterStyles)for(const t of e.characterStyles)this.root.push(new yn(t))}}class Qn extends s{constructor(e){super("w:pPrDefault"),this.root.push(new vi(e))}}class Mn extends s{constructor(e){super("w:rPrDefault"),this.root.push(new be(e))}}class kn extends s{constructor(e){super("w:docDefaults"),this.runPropertiesDefaults=new Mn(e.run),this.paragraphPropertiesDefaults=new Qn(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}}class Vn{newInstance(e){const t=(0,a.xml2js)(e,{compact:!1});let r;for(const e of t.elements||[])"w:styles"===e.name&&(r=e);if(void 0===r)throw new Error("can not find styles element");const i=r.elements||[];return new Nn({initialStyles:new u(r.attributes),importedStyles:i.map((e=>l(e)))})}}class Gn{newInstance(e={}){var t;return{initialStyles:new fi({mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",Ignorable:"w14 w15"}),importedStyles:[new kn(null!==(t=e.document)&&void 0!==t?t:{}),new bn(Object.assign({run:{size:56}},e.title)),new Tn(Object.assign({run:{color:"2E74B5",size:32}},e.heading1)),new In(Object.assign({run:{color:"2E74B5",size:26}},e.heading2)),new Pn(Object.assign({run:{color:"1F4D78",size:24}},e.heading3)),new Rn(Object.assign({run:{color:"2E74B5",italics:!0}},e.heading4)),new vn(Object.assign({run:{color:"2E74B5"}},e.heading5)),new xn(Object.assign({run:{color:"1F4D78"}},e.heading6)),new On(Object.assign({run:{bold:!0}},e.strong)),new Fn(e.listParagraph||{}),new Hn(e.hyperlink||{}),new Dn(e.footnoteReference||{}),new Ln(e.footnoteText||{}),new Un(e.footnoteTextChar||{})]}}}class Kn{constructor(e,t={}){var r,i,s,A,n,o;if(this.currentRelationshipId=1,this.headers=[],this.footers=[],this.coreProperties=new fA(Object.assign(Object.assign({},e),{creator:null!==(r=e.creator)&&void 0!==r?r:"Un-named",revision:null!==(i=e.revision)&&void 0!==i?i:"1",lastModifiedBy:null!==(s=e.lastModifiedBy)&&void 0!==s?s:"Un-named"})),this.numbering=new cn(e.numbering?e.numbering:{config:[]}),this.fileRelationships=new yi,this.customProperties=new SA(null!==(A=e.customProperties)&&void 0!==A?A:[]),this.appProperties=new cA,this.footnotesWrapper=new NA,this.contentTypes=new mA,this.documentWrapper=new Si({background:e.background||{}}),this.settings=new _n({compatabilityModeVersion:e.compatabilityModeVersion,evenAndOddHeaders:!!e.evenAndOddHeaderAndFooters,trackRevisions:null===(n=e.features)||void 0===n?void 0:n.trackRevisions,updateFields:null===(o=e.features)||void 0===o?void 0:o.updateFields}),this.media=t.template&&t.template.media?t.template.media:new VA,t.template&&(this.currentRelationshipId=t.template.currentRelationshipId+1),t.template&&e.externalStyles)throw Error("can not use both template and external styles");if(t.template){const e=new Vn;this.styles=e.newInstance(t.template.styles)}else if(e.externalStyles){const t=new Vn;this.styles=t.newInstance(e.externalStyles)}else if(e.styles){const t=(new Gn).newInstance(e.styles.default);this.styles=new Nn(Object.assign(Object.assign({},t),e.styles))}else{const e=new Gn;this.styles=new Nn(e.newInstance())}if(this.addDefaultRelationships(),t.template&&t.template.headers)for(const e of t.template.headers)this.addHeaderToDocument(e.header,e.type);if(t.template&&t.template.footers)for(const e of t.template.footers)this.addFooterToDocument(e.footer,e.type);for(const t of e.sections)this.addSection(t);if(e.footnotes)for(const t in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(t),e.footnotes[t].children)}addSection({headers:e={},footers:t={},children:r,properties:i}){this.documentWrapper.View.Body.addSection(Object.assign(Object.assign({},i),{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(const e of r)this.documentWrapper.View.add(e)}createHeader(e){const t=new kA(this.media,this.currentRelationshipId++);for(const r of e.options.children)t.add(r);return this.addHeaderToDocument(t),t}createFooter(e){const t=new IA(this.media,this.currentRelationshipId++);for(const r of e.options.children)t.add(r);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=je.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=je.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.createRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){this.fileRelationships.createRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.createRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.createRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.createRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.createRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml")}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map((e=>e.header))}get Footers(){return this.footers.map((e=>e.footer))}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Settings(){return this.settings}}const Wn="";class $n extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class zn extends s{constructor(e={}){super("w:instrText"),this.properties=e,this.root.push(new $n({space:V.PRESERVE}));let t="TOC";this.properties.captionLabel&&(t=`${t} \\a "${this.properties.captionLabel}"`),this.properties.entriesFromBookmark&&(t=`${t} \\b "${this.properties.entriesFromBookmark}"`),this.properties.captionLabelIncludingNumbers&&(t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`),this.properties.sequenceAndPageNumbersSeparator&&(t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`),this.properties.tcFieldIdentifier&&(t=`${t} \\f "${this.properties.tcFieldIdentifier}"`),this.properties.hyperlink&&(t=`${t} \\h`),this.properties.tcFieldLevelRange&&(t=`${t} \\l "${this.properties.tcFieldLevelRange}"`),this.properties.pageNumbersEntryLevelsRange&&(t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`),this.properties.headingStyleRange&&(t=`${t} \\o "${this.properties.headingStyleRange}"`),this.properties.entryAndPageNumberSeparator&&(t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`),this.properties.seqFieldIdentifierForPrefix&&(t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`),this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length&&(t=`${t} \\t "${this.properties.stylesWithLevels.map((e=>`${e.styleName},${e.level}`)).join(",")}"`),this.properties.useAppliedParagraphOutlineLevel&&(t=`${t} \\u`),this.properties.preserveTabInEntries&&(t=`${t} \\w`),this.properties.preserveNewLineInEntries&&(t=`${t} \\x`),this.properties.hideTabAndPageNumbersInWebView&&(t=`${t} \\z`),this.root.push(t)}}class Yn extends s{constructor(){super("w:sdtContent")}}class Xn extends n{constructor(){super(...arguments),this.xmlKeys={alias:"w:val"}}}class Jn extends s{constructor(e){super("w:alias"),this.root.push(new Xn({alias:e}))}}class jn extends s{constructor(e){super("w:sdtPr"),this.root.push(new Jn(e))}}class Zn extends s{constructor(e="Table of Contents",t){super("w:sdt"),this.root.push(new jn(e));const r=new Yn,i=new xi({children:[new Pe({children:[new ie(!0),new zn(t),new se]})]});r.addChildElement(i);const s=new xi({children:[new Pe({children:[new Ae]})]});r.addChildElement(s),this.root.push(r)}}class qn{constructor(e,t){this.styleName=e,this.level=t}}class eo{constructor(e={children:[]}){this.options=e}}class to{constructor(e={children:[]}){this.options=e}}class ro extends n{constructor(){super(...arguments),this.xmlKeys={id:"w:id"}}}class io extends s{constructor(e){super("w:footnoteReference"),this.root.push(new ro({id:e}))}}class so extends Pe{constructor(e){super({style:"FootnoteReference"}),this.root.push(new io(e))}}class Ao extends n{constructor(){super(...arguments),this.xmlKeys={id:"w:id",author:"w:author",date:"w:date"}}}class no extends s{constructor(e){super("w:ins"),this.root.push(new Ao({id:e.id,author:e.author,date:e.date})),this.addChildElement(new Re(e))}}class oo extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class ao extends s{constructor(){super("w:delInstrText"),this.root.push(new oo({space:V.PRESERVE})),this.root.push("PAGE")}}class lo extends s{constructor(){super("w:delInstrText"),this.root.push(new oo({space:V.PRESERVE})),this.root.push("NUMPAGES")}}class ho extends s{constructor(){super("w:delInstrText"),this.root.push(new oo({space:V.PRESERVE})),this.root.push("SECTIONPAGES")}}class co extends n{constructor(){super(...arguments),this.xmlKeys={space:"xml:space"}}}class uo extends s{constructor(e){super("w:delText"),this.root.push(new co({space:V.PRESERVE})),this.root.push(e)}}class po extends s{constructor(e){super("w:del"),this.root.push(new Ao({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new go(e),this.addChildElement(this.deletedTextRunWrapper)}}class go extends s{constructor(e){if(super("w:r"),this.root.push(new be(e)),e.children)for(const t of e.children)if("string"!=typeof t)this.root.push(t);else switch(t){case $.CURRENT:this.root.push(new ie),this.root.push(new ao),this.root.push(new se),this.root.push(new Ae);break;case $.TOTAL_PAGES:this.root.push(new ie),this.root.push(new lo),this.root.push(new se),this.root.push(new Ae);break;case $.TOTAL_PAGES_IN_SECTION:this.root.push(new ie),this.root.push(new ho),this.root.push(new se),this.root.push(new Ae);break;default:this.root.push(new uo(t))}else e.text&&this.root.push(new uo(e.text));if(e.break)for(let t=0;t<e.break;t++)this.root.splice(1,0,new te)}}var _o,mo,fo;!function(e){e.CENTER="center",e.INSIDE="inside",e.LEFT="left",e.OUTSIDE="outside",e.RIGHT="right"}(_o||(_o={})),function(e){e.BOTTOM="bottom",e.CENTER="center",e.INSIDE="inside",e.OUTSIDE="outside",e.TOP="top"}(mo||(mo={})),function(e){e.DECIMAL="decimal",e.UPPER_ROMAN="upperRoman",e.LOWER_ROMAN="lowerRoman",e.UPPER_LETTER="upperLetter",e.LOWER_LETTER="lowerLetter",e.ORDINAL="ordinal",e.CARDINAL_TEXT="cardinalText",e.ORDINAL_TEXT="ordinalText",e.HEX="hex",e.CHICAGO="chicago",e.IDEOGRAPH_DIGITAL="ideographDigital",e.JAPANESE_COUNTING="japaneseCounting",e.AIUEO="aiueo",e.IROHA="iroha",e.DECIMAL_FULL_WIDTH="decimalFullWidth",e.DECIMAL_HALF_WIDTH="decimalHalfWidth",e.JAPANESE_LEGAL="japaneseLegal",e.JAPANESE_DIGITAL_TEN_THOUSAND="japaneseDigitalTenThousand",e.DECIMAL_ENCLOSED_CIRCLE="decimalEnclosedCircle",e.DECIMAL_FULL_WIDTH_2="decimalFullWidth2",e.AIUEO_FULL_WIDTH="aiueoFullWidth",e.IROHA_FULL_WIDTH="irohaFullWidth",e.DECIMAL_ZERO="decimalZero",e.BULLET="bullet",e.GANADA="ganada",e.CHOSUNG="chosung",e.DECIMAL_ENCLOSED_FULL_STOP="decimalEnclosedFullstop",e.DECIMAL_ENCLOSED_PAREN="decimalEnclosedParen",e.DECIMAL_ENCLOSED_CIRCLE_CHINESE="decimalEnclosedCircleChinese",e.IDEOGRAPH_ENCLOSED_CIRCLE="ideographEnclosedCircle",e.IDEOGRAPH_TRADITIONAL="ideographTraditional",e.IDEOGRAPH_ZODIAC="ideographZodiac",e.IDEOGRAPH_ZODIAC_TRADITIONAL="ideographZodiacTraditional",e.TAIWANESE_COUNTING="taiwaneseCounting",e.IDEOGRAPH_LEGAL_TRADITIONAL="ideographLegalTraditional",e.TAIWANESE_COUNTING_THOUSAND="taiwaneseCountingThousand",e.TAIWANESE_DIGITAL="taiwaneseDigital",e.CHINESE_COUNTING="chineseCounting",e.CHINESE_LEGAL_SIMPLIFIED="chineseLegalSimplified",e.CHINESE_COUNTING_TEN_THOUSAND="chineseCountingThousand",e.KOREAN_DIGITAL="koreanDigital",e.KOREAN_COUNTING="koreanCounting",e.KOREAN_LEGAL="koreanLegal",e.KOREAN_DIGITAL_2="koreanDigital2",e.VIETNAMESE_COUNTING="vietnameseCounting",e.RUSSIAN_LOWER="russianLower",e.RUSSIAN_UPPER="russianUpper",e.NONE="none",e.NUMBER_IN_DASH="numberInDash",e.HEBREW_1="hebrew1",e.HEBREW_2="hebrew2",e.ARABIC_ALPHA="arabicAlpha",e.ARABIC_ABJAD="arabicAbjad",e.HINDI_VOWELS="hindiVowels",e.HINDI_CONSONANTS="hindiConsonants",e.HINDI_NUMBERS="hindiNumbers",e.HINDI_COUNTING="hindiCounting",e.THAI_LETTERS="thaiLetters",e.THAI_NUMBERS="thaiNumbers",e.THAI_COUNTING="thaiCounting",e.BAHT_TEXT="bahtText",e.DOLLAR_TEXT="dollarText"}(fo||(fo={}));var wo=r(733),Co=r(479);class Bo{format(e,t={}){const r=e.prepForXml(t);if(r)return r;throw Error("XMLComponent did not format correctly")}}class Eo{replace(e,t,r){let i=e;return t.forEach(((e,t)=>{i=i.replace(new RegExp(`{${e.fileName}}`,"g"),(r+t).toString())})),i}getMediaData(e,t){return t.Array.filter((t=>e.search(`{${t.fileName}}`)>0))}}class yo{replace(e,t){let r=e;for(const e of t)r=r.replace(new RegExp(`{${e.reference}-${e.instance}}`,"g"),e.numId.toString());return r}}var So=function(e,t,r,i){return new(r||(r=Promise))((function(s,A){function n(e){try{a(i.next(e))}catch(e){A(e)}}function o(e){try{a(i.throw(e))}catch(e){A(e)}}function a(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(n,o)}a((i=i.apply(e,t||[])).next())}))};class bo{static toBuffer(e,t){return So(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toBase64String(e,t){return So(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"base64",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}static toBlob(e,t){return So(this,void 0,void 0,(function*(){const r=this.compiler.compile(e,t);return yield r.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}))}}bo.compiler=new class{constructor(){this.formatter=new Bo,this.imageReplacer=new Eo,this.numberingReplacer=new yo}compile(e,t){const r=new wo,i=this.xmlifyFile(e,t);for(const e in i){if(!i[e])continue;const t=i[e];if(Array.isArray(t))for(const e of t)r.file(e.path,e.data);else r.file(t.path,t.data)}for(const t of e.Media.Array){const e=t.stream;r.file(`word/media/${t.fileName}`,e)}return r}xmlifyFile(e,t){const r=e.Document.Relationships.RelationshipCount+1,i=Co(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=this.imageReplacer.getMediaData(i,e.Media);return{Relationships:{data:(()=>(s.forEach(((t,i)=>{e.Document.Relationships.createRelationship(r+i,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${t.fileName}`)})),Co(this.formatter.format(e.Document.Relationships,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}})))(),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{const t=this.imageReplacer.replace(i,s,r);return this.numberingReplacer.replace(t,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{const r=Co(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(r,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:Co(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:Co(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:Co(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map(((r,i)=>{const s=Co(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(s,e.Media).forEach(((e,t)=>{r.Relationships.createRelationship(t,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${e.fileName}`)})),{data:Co(this.formatter.format(r.Relationships,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${i+1}.xml.rels`}})),FooterRelationships:e.Footers.map(((r,i)=>{const s=Co(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(s,e.Media).forEach(((e,t)=>{r.Relationships.createRelationship(t,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${e.fileName}`)})),{data:Co(this.formatter.format(r.Relationships,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${i+1}.xml.rels`}})),Headers:e.Headers.map(((r,i)=>{const s=Co(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),A=this.imageReplacer.getMediaData(s,e.Media);return{data:this.imageReplacer.replace(s,A,0),path:`word/header${i+1}.xml`}})),Footers:e.Footers.map(((r,i)=>{const s=Co(this.formatter.format(r.View,{viewWrapper:r,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),A=this.imageReplacer.getMediaData(s,e.Media);return{data:this.imageReplacer.replace(s,A,0),path:`word/footer${i+1}.xml`}})),ContentTypes:{data:Co(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:Co(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:Co(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:Co(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/footnotes.xml"},FootNotesRelationships:{data:Co(this.formatter.format(e.FootNotes.Relationships,{viewWrapper:e.FootNotes,file:e}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/footnotes.xml.rels"},Settings:{data:Co(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"}}}};var To=function(e,t,r,i){return new(r||(r=Promise))((function(s,A){function n(e){try{a(i.next(e))}catch(e){A(e)}}function o(e){try{a(i.throw(e))}catch(e){A(e)}}function a(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(n,o)}a((i=i.apply(e,t||[])).next())}))};const Io={"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header":"header","http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer":"footer","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image":"image","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink":"hyperlink"};var Po;!function(e){e.HEADER="header",e.FOOTER="footer",e.IMAGE="image",e.HYPERLINK="hyperlink"}(Po||(Po={}));class Ro{extract(e){return To(this,void 0,void 0,(function*(){const t=yield wo.loadAsync(e),r=yield t.files["word/document.xml"].async("text"),i=yield t.files["word/_rels/document.xml.rels"].async("text"),s=this.extractDocumentRefs(r),A=this.findReferenceFiles(i),n=new VA;return{headers:yield this.createHeaders(t,s,A,n,0),footers:yield this.createFooters(t,s,A,n,s.headers.length),currentRelationshipId:s.footers.length+s.headers.length,styles:yield t.files["word/styles.xml"].async("text"),titlePageIsDefined:this.checkIfTitlePageIsDefined(r),media:n}}))}createFooters(e,t,r,i,s){return To(this,void 0,void 0,(function*(){const A=t.footers.map(((t,A)=>To(this,void 0,void 0,(function*(){const n=r.find((e=>e.id===t.id));if(null===n||!n)throw new Error(`Can not find target file for id ${t.id}`);const o=yield e.files[`word/${n.target}`].async("text"),h=(0,a.xml2js)(o,{compact:!1,captureSpacesBetweenElements:!0});if(!h.elements)return;const c=l(h.elements.reduce(((e,t)=>"w:ftr"===t.name?t:e))),u=new IA(i,s+A,c);return yield this.addRelationshipToWrapper(n,e,u,i),{type:t.type,footer:u}})))).filter((e=>!!e));return Promise.all(A)}))}createHeaders(e,t,r,i,s){return To(this,void 0,void 0,(function*(){const A=t.headers.map(((t,A)=>To(this,void 0,void 0,(function*(){const n=r.find((e=>e.id===t.id));if(null===n||!n)throw new Error(`Can not find target file for id ${t.id}`);const o=yield e.files[`word/${n.target}`].async("text"),h=(0,a.xml2js)(o,{compact:!1,captureSpacesBetweenElements:!0});if(!h.elements)return;const c=l(h.elements.reduce(((e,t)=>"w:hdr"===t.name?t:e))),u=new kA(i,s+A,c);return yield this.addRelationshipToWrapper(n,e,u,i),{type:t.type,header:u}})))).filter((e=>!!e));return Promise.all(A)}))}addRelationshipToWrapper(e,t,r,i){return To(this,void 0,void 0,(function*(){const s=t.files[`word/_rels/${e.target}.rels`];if(!s)return;const A=yield s.async("text"),n=this.findReferenceFiles(A).filter((e=>e.type===Po.IMAGE)),o=this.findReferenceFiles(A).filter((e=>e.type===Po.HYPERLINK));for(const e of n){const s=yield t.files[`word/${e.target}`].async("nodebuffer"),A=i.addMedia(s,{width:100,height:100});r.Relationships.createRelationship(e.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${A.fileName}`)}for(const e of o)r.Relationships.createRelationship(e.id,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",e.target,Ye.EXTERNAL)}))}findReferenceFiles(e){const t=(0,a.xml2js)(e,{compact:!0});return(Array.isArray(t.Relationships.Relationship)?t.Relationships.Relationship:[t.Relationships.Relationship]).map((e=>{if(void 0===e._attributes)throw Error("relationship element has no attributes");return{id:this.parseRefId(e._attributes.Id),type:Io[e._attributes.Type],target:e._attributes.Target}})).filter((e=>null!==e.type))}extractDocumentRefs(e){const t=(0,a.xml2js)(e,{compact:!0})["w:document"]["w:body"]["w:sectPr"],r=t["w:headerReference"];let i;i=void 0===r?[]:Array.isArray(r)?r:[r];const s=i.map((e=>{if(void 0===e._attributes)throw Error("header reference element has no attributes");return{type:e._attributes["w:type"],id:this.parseRefId(e._attributes["r:id"])}})),A=t["w:footerReference"];let n;return n=void 0===A?[]:Array.isArray(A)?A:[A],{headers:s,footers:n.map((e=>{if(void 0===e._attributes)throw Error("footer reference element has no attributes");return{type:e._attributes["w:type"],id:this.parseRefId(e._attributes["r:id"])}}))}}checkIfTitlePageIsDefined(e){return void 0!==(0,a.xml2js)(e,{compact:!0})["w:document"]["w:body"]["w:sectPr"]["w:titlePg"]}parseRefId(e){const t=/^rId(\d+)$/.exec(e);if(null===t)throw new Error("Invalid ref id");return parseInt(t[1],10)}}})(),i})()}));class ImageLoader{constructor(){this._elements=[],this._images={},this._loadCount=0}get loaded(){return 0===this._elements.length}add(e,t){if(!(e in this._images)){const r=document.createElement("img");r.crossOrigin="anonymous",r.src=e,r.style.opacity=t,this._elements.push(r),this._images[e]=""}}get(e){return this._images[e]}load(e=3){if(this._loadCount<e){for(let e=this._elements.length-1;e>=0;e--){const t=this._elements[e];if(t.complete&&t.naturalHeight>0){const r=document.createElement("canvas"),i=r.getContext("2d"),s=parseFloat(t.style.opacity)||1;r.width=t.width,r.height=t.height,i.globalAlpha=s,i.drawImage(t,0,0);const A=r.toDataURL("image/png");this._images[t.src]=A,this._elements.splice(e,1)}}return this._loadCount++,0===this._elements.length}return!0}}const BORDER_TOP$1=0,BORDER_BOTTOM$1=1,BORDER_LEFT$1=2,BORDER_RIGHT$1=3,BORDER_STYLES$1=["borderTopStyle","borderBottomStyle","borderLeftStyle","borderRightStyle"],BORDER_COLORS$1=["borderTopColor","borderBottomColor","borderLeftColor","borderRightColor"];class DOCObject{}class DOCElement extends DOCObject{constructor(e,t,r){super(),this._dom=t,this._model=r;const i=this._elements=this.$_build(e,t,r)||[];if(r){const r=e.getBounds(t),s=getComputedStyle(t),A=ColorUtils.cssToColor(s.backgroundColor);for(let t=0;t<BORDER_STYLES$1.length;t++){const A=s[BORDER_STYLES$1[t]];if(A&&"none"!=A){let n,o,a,l;switch(t){case 0:n=r.x,a=r.x+r.width,o=l=r.y;break;case 1:n=r.x,a=r.x+r.width,o=l=r.y+r.height>>>0;break;case 2:n=a=r.x,o=r.y,l=r.y+r.height;break;case 3:n=a=r.x+r.width>>>0,o=r.y,l=r.y+r.height}const h=new DOCLineElement(e,n,o,a,l,A,s[BORDER_COLORS$1[t]]);i.unshift(h)}}if(A){const r=new DOCRectangle(e,t,null);r.color=A.color,r.alpha=A.alpha,i.unshift(r)}}}write(e){return this._doWrite(e,this._dom,this._model)}_doWrite(e,t,r){const i=[],s=this._elements;return null==s||s.forEach((t=>{t.write(e).forEach((e=>i.push(e)))})),i}$_build(e,t,r){return this._doBuild(e,t,r)}_doBuild(e,t,r){const i=[],s=t.children;for(let t=0;t<s.length;t++){const r=s[t],A=e.createDOCElements(r);Utils.isArray(A)?i.push(...A):A&&i.push(A)}return i}_fontName(e){if(e){const t=e.split(/,\s*/)[0];return t.startsWith('"')?t.substring(1,t.length-1):t}return"굴림"}_fontSize(e){return e?e.endsWith("px")?Math.round(72*parseInt(e)/96)+"pt":e.endsWith("pt")?e:e+"pt":"10px"}_toBold(e){return parseInt(e)>=700}_toUnderline(e){if(e&&e.indexOf("underline")>=0)return{}}_toColor(e){function t(e){return 1===(e=(+e).toString(16)).length?"0"+e:e}if(e.startsWith("#"))return e.substr(e.length-6);if(e.startsWith("rgb(")){const r=e.substring(4,e.length-1).split(/,\s*/);return r[2],t(r[0])+t(r[1])+t(r[2])}if(e.startsWith("rgba(")){const r=e.substring(5,e.length-1).split(/,\s*/);return r[3],t(r[0])+t(r[1])+t(r[2])}return"000000"}_toDoc(e){return 20*e*72/96>>0}_toPosition(e){return 914400*e/96>>0}_toSize(e){return e>>0}_toShading(e,t){return t<1?{fill:Utils.pad16(ColorUtils.lighten(e,t),6)}:{fill:Utils.pad16(e,6)}}_createText(e,t){return 1===e.length&&160===e.charCodeAt(0)&&(e=""),new build.TextRun({text:e,font:this._fontName(t.fontFamily),size:this._fontSize(t.fontSize),color:this._toColor(t.color),italics:"italic"===t.fontStyle,bold:this._toBold(t.fontWeight),underline:this._toUnderline(t.textDecoration)})}}class DOCRectangle extends DOCElement{constructor(){super(...arguments),this.alpha=1}_doWrite(e,t,r){const i=e.getBounds(t);return[new build.Paragraph({frame:{position:{x:this._toDoc(i.x),y:this._toDoc(i.y)},width:1*this._toDoc(i.width),height:1*this._toDoc(i.height),anchor:{horizontal:build.FrameAnchorType.PAGE,vertical:build.FrameAnchorType.PAGE},alignment:{x:build.HorizontalPositionAlign.CENTER,y:build.VerticalPositionAlign.CENTER}},shading:this._toShading(this.color,this.alpha),children:[]})]}_doBuild(e,t,r){}}class DOCTextElement extends DOCElement{_doWrite(e,t,r){const i=getComputedStyle(t),s=e.getBounds(t),A=t.textContent;return[new build.Paragraph({frame:{position:{x:this._toDoc(s.x),y:this._toDoc(s.y-.2*s.height)},width:1.05*this._toDoc(s.width),height:1*this._toDoc(s.height),anchor:{horizontal:build.FrameAnchorType.PAGE,vertical:build.FrameAnchorType.PAGE},alignment:{x:build.HorizontalPositionAlign.CENTER,y:build.VerticalPositionAlign.CENTER}},children:[this._createText(A,i)]})]}_doBuild(e,t,r){}}class DOCImage extends DOCElement{constructor(e,t,r){super(e,t,r)}_doBuild(e,t,r){const i=getComputedStyle(t),s=Utils.getImageUrl(i);s.startsWith("data:image")?this._data=s:s.startsWith("http")&&e.addImage(this._url=s,i.opacity)}_doWrite(e,t,r){const i=this._data||e.getImage(this._url)||new Uint8Array(0),s=e.getBounds(t);return[new build.Paragraph({children:[new build.ImageRun({data:i,transformation:{width:this._toSize(s.width),height:this._toSize(s.height)},floating:{horizontalPosition:{relative:build.HorizontalPositionRelativeFrom.PAGE,offset:this._toPosition(s.x)},verticalPosition:{relative:build.VerticalPositionRelativeFrom.PAGE,offset:this._toPosition(s.y)},allowOverlap:!0}})]})]}}class DOCSvgElement extends DOCElement{constructor(e,t,r,i){super(e,t,i);const s=new Blob([r],{type:"image/svg+xml;charset=utf-8"});this._svgData=(URL||webkitURL).createObjectURL(s),e.addImage(this._svgData,"1")}_doBuild(e,t,r){}_doWrite(e,t,r){const i=e.getImage(this._svgData+""),s=e.getBounds(t);return[new build.Paragraph({children:[new build.ImageRun({data:i||new Uint8Array(0),transformation:{width:this._toSize(s.width),height:this._toSize(s.height)},floating:{horizontalPosition:{relative:build.HorizontalPositionRelativeFrom.PAGE,offset:this._toPosition(s.x)},verticalPosition:{relative:build.VerticalPositionRelativeFrom.PAGE,offset:this._toPosition(s.y)},allowOverlap:!0}})]})]}}class DOCCanvasElement extends DOCElement{constructor(e,t,r){super(e,t,r)}_doBuild(e,t,r){this._data=t.toDataURL()}_doWrite(e,t,r){const i=e.getBounds(t);return[new build.Paragraph({children:[new build.ImageRun({data:this._data,transformation:{width:this._toSize(i.width),height:this._toSize(i.height)},floating:{horizontalPosition:{relative:build.HorizontalPositionRelativeFrom.PAGE,offset:this._toPosition(i.x)},verticalPosition:{relative:build.VerticalPositionRelativeFrom.PAGE,offset:this._toPosition(i.y)},allowOverlap:!0}})]})]}}class DOCBarElement extends DOCElement{}class DOCLineElement extends DOCElement{constructor(e,t,r,i,s,A,n){super(e,null,null),this._x1=Math.min(t,i),this._y1=Math.min(r,s),this._x2=Math.max(t,i),this._y2=Math.max(r,s),this._x11=t-this._x1,this._y11=r-this._y1,this._x22=i-this._x1,this._y22=s-this._y1,this._cssStyle=A,this._cssColor=n}static bulidLine(e,t,r,i,s,A){const n=document.createElement("canvas"),o=n.getContext("2d");switch(n.width=Math.max(1,Math.abs(r-e)),n.height=Math.max(1,Math.abs(i-t)),s){case"dashed":o.setLineDash([4,3]);break;case"dotted":o.setLineDash([2,2])}o.strokeStyle=A,o.beginPath(),o.moveTo(e,t),o.lineTo(r,i),o.stroke();return n.toDataURL()}static write(e,t,r,i,s){return[new build.Paragraph({children:[new build.ImageRun({data:e,transformation:{width:i,height:s},floating:{horizontalPosition:{relative:build.HorizontalPositionRelativeFrom.PAGE,offset:t},verticalPosition:{relative:build.VerticalPositionRelativeFrom.PAGE,offset:r},allowOverlap:!0}})]})]}_doBuild(e,t,r){}_doWrite(e,t,r){return this._data||(this._data=DOCLineElement.bulidLine(this._x11,this._y11,this._x22,this._y22,this._cssStyle,this._cssColor)),DOCLineElement.write(this._data,this._toPosition(this._x1),this._toPosition(this._y1),this._toSize(Math.max(1,this._x2-this._x1)),this._toSize(Math.max(1,this._y2-this._y1)))}}class DOCDiagonalLineElement extends DOCElement{constructor(e,t,r){super(e,t,r)}_doBuild(e,t,r){const i=t.getBoundingClientRect();r.reversed?this._data=DOCLineElement.bulidLine(0,i.height,i.width,0,"solid","black"):this._data=DOCLineElement.bulidLine(0,0,i.width,i.height,"solid","black")}_doWrite(e,t,r){const i=e.getBounds(t);return DOCLineElement.write(this._data,this._toPosition(i.x),this._toPosition(i.y),this._toSize(i.width),this._toSize(i.height))}}class DOCModel{constructor(e,t,r){this._pages=[],r.forEach((t=>{e.setPageDiv(t.page),this._pages.push(new DOCPage(e,t))}))}get pages(){return this._pages}}class DOCPage extends DOCObject{constructor(e,t){super(),this._page=t,this._elements=this.$_build(e)}write(e){const t=[];e.setPageDiv(this._page.page);for(let r of this._elements){const i=r.write(e);null==i||i.forEach((e=>t.push(e)))}return t}$_buildBackground(e,t){return new DOCElement(e,t,null)}$_buildForeground(e,t){return new DOCElement(e,t,null)}$_buildPageHeader(e,t){return new DOCElement(e,t,e.report.page.pageHeader)}$_buildPageFooter(e,t){return new DOCElement(e,t,e.report.page.pageFooter)}$_buildPageBody(e,t){const r=[];for(let i of t){const t=e.createDOCElements(i);Utils.isArray(t)?r.push(...t):t&&r.push(t)}return r}$_build(e){const t=this._page,r=[];return r.push(this.$_buildBackground(e,t.background)),r.push(this.$_buildPageHeader(e,t.pageHeader)),this.$_buildPageBody(e,t.contents).forEach((e=>e&&r.push(e))),r.push(this.$_buildPageFooter(e,t.pageFooter)),r.push(this.$_buildForeground(e,t.foreground)),r}}function extractBorderStyles(e,t){const r={};if(e.borderLeft){const e=t.borderLeftStyle,i=t.borderLeftColor;r.left={style:e,color:i}}if(e.borderRight){const e=t.borderRightStyle,i=t.borderRightColor;r.right={style:e,color:i}}if(e.borderTop){const e=t.borderTopStyle,i=t.borderTopColor;r.top={style:e,color:i}}if(e.borderBottom){const e=t.borderBottomStyle,i=t.borderBottomColor;r.bottom={style:e,color:i}}return Utils.isEmpty(r)?null:r}const _alignmets={l:build.AlignmentType.LEFT,c:build.AlignmentType.CENTER,r:build.AlignmentType.RIGHT};class DOCTable extends DOCElement{constructor(e,t,r){super(e,t,r)}_doBuild(e,t,r){}_doWrite(e,t,r){const i=t.firstChild.children,s=i.length,A=new Array(s),n=e.getBounds(t);for(let e=0;e<s;e++){const t=i[e];A[e]=this._toDoc(t.$_w)}return[new build.Table({float:{horizontalAnchor:build.TableAnchorType.PAGE,verticalAnchor:build.TableAnchorType.PAGE,overlap:build.OverlapType.OVERLAP,absoluteHorizontalPosition:this._toDoc(n.x),absoluteVerticalPosition:this._toDoc(n.y)},layout:build.TableLayoutType.FIXED,columnWidths:A,rows:this.$_writeRows(e,t.rows)})]}$_writeRows(e,t){const r=[];for(let i=0;i<t.length;i++)r.push(this.$_writeRow(e,t[i]));return r}$_writeRow(e,t){function r(e){if(e){if("none"===e.style)return{style:build.BorderStyle.NONE,size:0,color:"ffffff"};if(0===ColorUtils.cssToColor(e.color,!1).alpha)return{style:build.BorderStyle.NONE,size:0,color:"ffffff"}}}const i=t.cells,s=getComputedStyle(t),A=ColorUtils.cssToColor(s.backgroundColor),n=[];for(let e=0;e<i.length;e++){const t=i[e],s=getComputedStyle(t);if("none"===s.display)continue;const o=ColorUtils.cssToColor(s.backgroundColor)||A;let a=s;const l=t.getElementsByClassName(TextItemElementBase.SPAN)[0];l&&(a=getComputedStyle(l));const h=extractBorderStyles(t.style,s);let c;h&&(c={start:r(h.left),end:r(h.right),top:r(h.top),bottom:r(h.bottom)});const u=new build.TableCell({columnSpan:t.colSpan||1,rowSpan:t.rowSpan||1,children:[new build.Paragraph({children:[this._createText(t.textContent,a)],alignment:_alignmets[t.dataset._align]})],shading:o&&this._toShading(o.color,o.alpha),verticalAlign:build.VerticalAlign.CENTER,borders:c});n.push(u)}return new build.TableRow({height:{value:this._toDoc(t.clientHeight),rule:build.HeightRule.EXACT},children:n})}}class DOCFile{constructor(e,t){this._report=e,this._imageLoader=new ImageLoader,this._model=new DOCModel(this,e,t)}createDOCElements(e){const t=e instanceof HTMLElement&&this._report.models[e.dataset._m_];if(t instanceof ImageItem)return new DOCImage(this,e,t);if(t instanceof CheckItem){const r=e.getElementsByClassName(CheckItemElement.CHECK_CLASS)[0],i=new DOCImage(this,r,t),s=e.getElementsByClassName(CheckItemElement.TEXT_CLASS)[0];return[i,new DOCTextElement(this,s,t)]}if(t instanceof BarItem)return new DOCBarElement(this,e,t);if(t instanceof SvgItem){const r=e._svg_,i=r.substring(r.indexOf("<svg"));return new DOCSvgElement(this,e,i,t)}if(e instanceof HTMLTableElement)return new DOCTable(this,e,t);if(e instanceof HTMLSpanElement)return t instanceof DiagonalBoxContainer&&e.dataset.line?new DOCDiagonalLineElement(this,e,t):new DOCTextElement(this,e,t);if(e instanceof SVGSVGElement){const r=(new XMLSerializer).serializeToString(e);return new DOCSvgElement(this,e,r,t)}return e instanceof HTMLCanvasElement?new DOCCanvasElement(this,e,t):e instanceof HTMLElement?new DOCElement(this,e,t):void 0}setPageDiv(e){e!==this._pageDiv&&(this._pageDiv=e,this._pageRect=e.getBoundingClientRect())}getBounds(e){const t=e.getBoundingClientRect();return t.x-=this._pageRect.x,t.y-=this._pageRect.y,t}addImage(e,t){this._imageLoader.add(e,t)}getImage(e){return this._imageLoader.get(e)}get report(){return this._report}prepare(e){return this._imageLoader.load(e)}canExport(){return this._imageLoader.loaded}toBlob(e){const t=new build.Document({sections:this.$_buildSections()});build.Packer.toBlob(t).then(e)}toBuffer(e){const t=new build.Document({sections:this.$_buildSections()});build.Packer.toBuffer(t).then(e)}$_buildSection(){const e=this,t=[];return this._model.pages.forEach(((r,i)=>{const s=r.write(e);i>0&&s.unshift(new build.Paragraph({pageBreakBefore:!0,children:[]})),null==s||s.forEach((e=>t.push(e)))})),{properties:{page:{margin:{top:0,bottom:0,left:0,right:0}}},children:t}}$_buildSections(){const e=this,t={type:build.SectionType.NEXT_PAGE,page:{margin:{top:0,bottom:0,left:0,right:0}}},r=[];return this._model.pages.forEach(((i,s)=>{const A=i.write(e);r.push({properties:t,children:A})})),r}}class DOCExporter{constructor(){}exportBlob(e,t,r){if("function"!=typeof r)return;const i=()=>{A.canExport()||A.prepare(s)?A.toBlob(r):setTimeout((()=>{i()}),300)},s=5,A=new DOCFile(e,t);i()}export(e,t,r){if("function"!=typeof r)return;const i=()=>{A.canExport()||A.prepare(s)?A.toBuffer(r):setTimeout((()=>{i()}),300)},s=5,A=new DOCFile(e,t);i()}}const toHwpColor=function(e){return((255&e)<<16)+(65280&e)+((16711680&e)>>16)},toHwpAlpha=function(e){return 255*(1-e)>>0};var HWPLineType1;!function(e){e.Solid="Solid",e.Dash="Dash",e.Dot="Dot",e.DashDot="DashDot",e.DashDotDot="DashDotDot",e.LongDash="LongDash",e.Circle="Circle",e.DoubleSlim="DoubleSlim",e.SlimThick="SlimThick",e.ThickSlim="ThickSlim",e.SlimThickSlim="SlimThickSlim",e.None="None"}(HWPLineType1||(HWPLineType1={}));const toHwpLineType=function(e){switch(e){case"dot":return HWPLineType1.Dot;case"dashed":return HWPLineType1.Dash;default:return HWPLineType1.Solid}};var HWPLineType2,HWPLineType3,HWPNumberType1,HWPNumberType2,HWPAlignmentType1,HWPAlignmentType2,HWPArrowType,HWPArrowSize,HWPLangType,HWPHatchStyle,HWPInfillMode,HWPLineWrapType,HWPTextWrapType,HWPFieldType;!function(e){e.Solid="Solid",e.Dash="Dash",e.Dot="Dot",e.DashDot="DashDot",e.DashDotDot="DashDotDot",e.LongDash="LongDash",e.Circle="Circle",e.DoubleSlim="DoubleSlim",e.SlimThick="SlimThick",e.ThickSlim="ThickSlim",e.SlimThickSlim="SlimThickSlim"}(HWPLineType2||(HWPLineType2={})),function(e){e.Solid="Solid",e.Dot="Dot",e.Thick="Thick",e.Dash="Dash",e.DashDot="DashDot",e.DashDotDot="DashDotDot"}(HWPLineType3||(HWPLineType3={})),function(e){e.Digit="Digit",e.CircledDigit="CircledDigit",e.RomanCapital="RomanCapital",e.RomanSmall="RomanSmall",e.LatinCapital="LatinCapital",e.LatinSmall="LatinSmall",e.CircledLatinCapital="CircledLatinCapital",e.CircledLatinSmall="CircledLatinSmall",e.HangulSyllable="HangulSyllable",e.CircledHangulSyllable="CircledHangulSyllable",e.HangulJamo="HangulJamo",e.CircledHangulJamo="CircledHangulJamo",e.HangulPhonetic="HangulPhonetic",e.Ideograph="Ideograph",e.CircledIdeograph="CircledIdeograph"}(HWPNumberType1||(HWPNumberType1={})),function(e){e.Digit="Digit",e.CircledDigit="CircledDigit",e.RomanCapital="RomanCapital",e.RomanSmall="RomanSmall",e.LatinCapital="LatinCapital",e.LatinSmall="LatinSmall",e.CircledLatinCapital="CircledLatinCapital",e.CircledLatinSmall="CircledLatinSmall",e.HangulSyllable="HangulSyllable",e.CircledHangulSyllable="CircledHangulSyllable",e.HangulJamo="HangulJamo",e.CircledHangulJamo="CircledHangulJamo",e.HangulPhonetic="HangulPhonetic",e.Ideograph="Ideograph",e.CircledIdeograph="CircledIdeograph",e.DecagonCircle="DecagonCircle",e.DecagonCircleHanja="DecagonCircleHanja",e.Symbol="Symbol",e.UserChar="UserChar"}(HWPNumberType2||(HWPNumberType2={})),function(e){e.Justify="Justify",e.Left="Left",e.Right="Right",e.Center="Center",e.Distribute="Distribute",e.DistributeSpace="DistributeSpace"}(HWPAlignmentType1||(HWPAlignmentType1={})),function(e){e.Left="Left",e.Right="Right",e.Center="Center"}(HWPAlignmentType2||(HWPAlignmentType2={})),function(e){e.Normal="Normal",e.Arrow="Arrow",e.Spear="Spear",e.ConcaveArrow="ConcaveArrow",e.EmptyDiamond="EmptyDiamond",e.EmptyCircle="EmptyCircle",e.EmptyBox="EmptyBox",e.FilledDiamond="FilledDiamond",e.FilledCircle="FilledCircle",e.FilledBox="FilledBox"}(HWPArrowType||(HWPArrowType={})),function(e){e.SmallSmall="SmallSmall",e.SmallMedium="SmallMedium",e.SmallLarge="SmallLarge",e.MediumSmall="MediumSmall",e.MediumMedium="MediumMedium",e.MediumLarge="MediumLarge",e.LargeSmall="LargeSmall",e.LargeMedium="LargeMedium",e.LargeLarge="LargeLarge"}(HWPArrowSize||(HWPArrowSize={})),function(e){e.Hangul="Hangul",e.Latin="Latin",e.Hanja="Hanja",e.Japanese="Japanese",e.Other="Other",e.Symbol="Symbol",e.User="User"}(HWPLangType||(HWPLangType={})),function(e){e.Horizontal="Horizontal",e.Vertical="Vertical",e.BackSlash="BackSlash",e.Slash="Slash",e.Cross="Cross",e.CrossDiagonal="CrossDiagonal"}(HWPHatchStyle||(HWPHatchStyle={})),function(e){e.Tile="Tile",e.TileHorzTop="TileHorzTop",e.TileHorzBottom="TileHorzBottom",e.TileVertLeft="TileVertLeft",e.TileVertRight="TileVertRight",e.Total="Total",e.Center="Center",e.CenterTop="CenterTop",e.CenterBottom="CenterBottom",e.LeftCenter="LeftCenter",e.LeftTop="LeftTop",e.LeftBottom="LeftBottom",e.RightCenter="RightCenter",e.RightTop="RightTop",e.RightBottom="RightBottom",e.Zoom="Zoom"}(HWPInfillMode||(HWPInfillMode={})),function(e){e.Break="Break",e.Squeeze="Squeeze",e.Keep="Keep"}(HWPLineWrapType||(HWPLineWrapType={})),function(e){e.Square="Square",e.Tight="Tight",e.Through="Through",e.TopAndBottom="TopAndBottom",e.BehindText="BehindText",e.InFrontOfText="InFrontOfText"}(HWPTextWrapType||(HWPTextWrapType={})),function(e){e.Clickhere="Clickhere",e.Hyperlink="Hyperlink",e.Bookmark="Bookmark",e.Formula="Formula",e.Summery="Summery",e.UserInfo="UserInfo",e.Date="Date",e.DocDate="DocDate",e.Path="Path",e.Crossref="Crossref",e.Mailmerge="Mailmerge",e.Memo="Memo",e.RevisionChange="RevisionChange",e.RevisionSign="RevisionSign",e.RevisionDelete="RevisionDelete",e.RevisionAttach="RevisionAttach",e.RevisionClipping="RevisionClipping",e.RevisionSawtooth="RevisionSawtooth",e.RevisionThinking="RevisionThinking",e.RevisionPraise="RevisionPraise",e.RevisionLine="RevisionLine",e.RevisionSimpleChange="RevisionSimpleChange",e.RevisionHyperlink="RevisionHyperlink",e.RevisionLineAttach="RevisionLineAttach",e.RevisionLineLink="RevisionLineLink",e.RevisionLineTransfer="RevisionLineTransfer",e.RevisionRightmove="RevisionRightmove",e.RevisionLeftmove="RevisionLeftmove",e.RevisionTransfer="RevisionTransfer",e.RevisionSplit="RevisionSplit"}(HWPFieldType||(HWPFieldType={}));const _TAG_="TAG",_ORDERS_="ORDERS",_A_="A".charCodeAt(0),_Z_="Z".charCodeAt(0),UNDERLINE="_".charCodeAt(0),DOLLAR="$".charCodeAt(0);class HWPElement{constructor(e){if(e)for(let t in e)if(t in this){const r=t.charCodeAt(0);r>=_A_&&r<=_Z_&&(this[t]=e[t])}}static equals(e,t){if(e&&t&&e.constructor===t.constructor){for(let r in e){const i=r.charCodeAt(0);if(i>=_A_&&i<=_Z_&&e[r]!==t[r])return!1}for(let r in e){const i=e[r];if(i instanceof HWPElement&&!HWPElement.equals(i,t[r]))return!1}for(let r in t){if(t[r]instanceof HWPElement&&!(e[r]instanceof HWPElement))return!1}return!0}return!1}get tag(){return this.constructor.TAG}get text(){}getTagOrders(){}getContent(){let e=[];const t={};for(let r in this){const i=this[r];if(i instanceof HWPElement&&r.charCodeAt(0)!==DOLLAR)e.push(i);else{const s=r.charCodeAt(0);if(s>=_A_&&s<=_Z_)t[r]=i;else if(Utils.isArray(i)&&r.charCodeAt(0)==UNDERLINE)for(let t of i)e.push(t)}}const r=this.constructor.ORDERS;return r&&(e=e.sort(((e,t)=>(r[t.tag]||0)-(r[e.tag]||0)))),{elements:e,attrs:t}}}HWPElement.TAG="INVALID";class HWPListElement extends HWPElement{}class HWPShapeObject extends HWPElement{constructor(){super(...arguments),this._size=new HWPSize,this._position=new HWPPosition,this._outsideMargin=new HWPOutsideMargin,this.InstId=HWPShapeObject.Id++}setSize(e,t){return this._size.Width=e,this._size.Height=t,this}setPosition(e,t){return this._position.HorzOffset=e,this._position.VertOffset=t,this}}HWPShapeObject.TAG="SHAPEOBJECT",HWPShapeObject.Id=0;class HWPSize extends HWPElement{constructor(){super(...arguments),this.WidthRelTo="Absolute",this.HeightRelTo="Absolute",this.Protect=!1}}HWPSize.TAG="SIZE";class HWPPosition extends HWPElement{constructor(){super(...arguments),this.TreatAsChar=!1,this.VertRelTo="Paper",this.HorzRelTo="Paper",this.VertAlign="Top",this.HorzAlign="Left",this.VertOffset=0,this.HorzOffset=0,this.FlowWidthText=!0,this.AllowOverlap=!0}}HWPPosition.TAG="POSITION";class HWPOutsideMargin extends HWPElement{constructor(){super(...arguments),this.Left=0,this.Right=0,this.Top=0,this.Bottom=0}}HWPOutsideMargin.TAG="OUTSIDEMARGIN";class HWPInsideMargin extends HWPElement{constructor(){super(...arguments),this.Left=0,this.Right=0,this.Top=0,this.Bottom=0}}HWPInsideMargin.TAG="INSIDEMARGIN";class HWPImage extends HWPElement{constructor(){super(...arguments),this.Bright=0,this.Contrast=0,this.Effect="RealPic"}}HWPImage.TAG="IMAGE";class WindowBrush extends HWPElement{}WindowBrush.TAG="WINDOWBRUSH";class HWPFillBrush extends HWPElement{constructor(){super(...arguments),this._windowBrush=new WindowBrush,this._color=16777215,this._alpha=0}setColor(e,t){return this._windowBrush.FaceColor=toHwpColor(this._color=e),this._windowBrush.Alpha=toHwpAlpha(this._alpha=t),this}sameWithColor(e,t){return e===this._color&&t===this._alpha}}HWPFillBrush.TAG="FILLBRUSH";class Matrix extends HWPElement{constructor(){super(...arguments),this.E1=1,this.E2=0,this.E3=0,this.E4=0,this.E5=1,this.E6=0}}class TransMatrix extends Matrix{}TransMatrix.TAG="TRANSMATRIX";class ScaMatrix extends Matrix{}ScaMatrix.TAG="SCAMATRIX";class RotMatrix extends Matrix{}RotMatrix.TAG="ROTMATRIX";class RenderingInfo extends HWPElement{constructor(){super(...arguments),this._translate=new TransMatrix,this._scale=new ScaMatrix,this._rotate=new RotMatrix}}RenderingInfo.TAG="RENDERINGINFO";class ShapeComponent extends HWPElement{constructor(){super(...arguments),this._rendering=new RenderingInfo,this.XPos=0,this.YPos=0,this.GroupLevel=0,this.HorzFlip=!1,this.VertFlip=!1}setSize(e,t){this.OriWidth=e,this.OriHeight=t}}ShapeComponent.TAG="SHAPECOMPONENT";class TextMargin extends HWPElement{constructor(){super(...arguments),this.Left=0,this.Right=0,this.Top=0,this.Bottom=0}}TextMargin.TAG="TEXTMARGIN";class DrawText extends HWPElement{constructor(){super(...arguments),this._textMargin=new TextMargin,this._paraList=new HWPParaList,this.Editable=!1}setText(e,t){const r=this._paraList.add().addText(!1,!0),i=r.add(HWPChar);return r.CharShape=t,i.setText(e),this}}DrawText.TAG="DRAWTEXT";class HWPLineShape extends HWPElement{constructor(){super(...arguments),this.Width=33,this.Style=HWPLineType1.None,this.EndCap="Flat",this.HeadStyle=HWPArrowType.Normal,this.TailStyle=HWPArrowType.Normal,this.HeadSize=HWPArrowSize.SmallSmall,this.TailSize=HWPArrowSize.SmallSmall,this.OutlineStyle="Normal"}setStyle(e){return this.Style=toHwpLineType(e),this}setColor(e,t=1){return this.Color=toHwpColor(e),this.Alpha=toHwpAlpha(t),this}}HWPLineShape.TAG="LINESHAPE";class HWPDrawingObject extends HWPElement{constructor(e=!0,t=!0){super(),this._shapeComponent=new ShapeComponent,this._lineShape=new HWPLineShape,e&&(this._fillBrush=new HWPFillBrush),t&&(this._drawText=new DrawText)}get lineShape(){return this._lineShape}setText(e,t){return this._drawText.setText(e,t),this}setSize(e,t){return this._shapeComponent.setSize(e,t),this}setColor(e,t){return this._fillBrush||(this._fillBrush=new HWPFillBrush),this._fillBrush.setColor(e,t),this}setDebug(e){return e&&this._lineShape.Style===HWPLineType1.None&&(this._lineShape.Style=HWPLineType1.Solid,this._lineShape.Color=toHwpColor(13421772)),this}}HWPDrawingObject.TAG="DRAWINGOBJECT";class HWPText extends HWPElement{constructor(e,t,r){super(r),this._children=[],this.CharShape=0,e&&!t&&(this._secDef=new SecDef,this._colDef=new ColDef)}get secDef(){return this._secDef}get colDef(){return this._colDef}add(e){const t=new e;return this._children.push(t),t}addElement(e){e&&this._children.push(e)}addElements(e){null==e||e.forEach((e=>e&&this._children.push(e)))}}HWPText.TAG="TEXT",HWPText.ORDERS={SECDEF:10,COLDEF:9};class HWPPara extends HWPElement{constructor(){super(...arguments),this._texts=[]}addText(e=!1,t=!1){const r=new HWPText(e,t);return t&&(this.ParaShape=0),this._texts.push(r),r}get firstText(){return this._texts.length>0?this._texts[0]:void 0}}HWPPara.TAG="P";class HWPParaList extends HWPElement{constructor(){super(...arguments),this._paras=[],this.TextDirection=0,this.LineWrap=HWPLineWrapType.Keep,this.VertAlign="Center"}get count(){return this._paras.length}get first(){return this._paras.length>0?this._paras[0]:void 0}add(){const e=new HWPPara;return this._paras.push(e),e}}HWPParaList.TAG="PARALIST";class HWPTextElement extends HWPElement{static getFontSize(e){let t=parseInt(e)||10;return e.endsWith("px")&&(t=72*t/96>>0),t>>0}static getColor(e){let t=0;if(e.startsWith("#"))t=+e.substr(e.length-6),t=(255&t)<<16+(65280&t)+(16711680&t)>>16;else if(e.startsWith("rgb(")){const r=e.substring(4,e.length-1).split(/,\s*/);t=(+r[2]<<16)+(+r[1]<<8)+ +r[0]}else if(e.startsWith("rgba(")){const r=e.substring(5,e.length-1).split(/,\s*/);t=(+r[3]<<24)+(+r[2]<<16)+(+r[1]<<8)+ +r[0]}return t}static getFontBold(e){return+e>=700}_toHwpF(e){return 100*e*72/96}_toHwp(e){return Math.round(100*e*72/96)}_toColor(e){return(255&e)<<16+(65280&e)+(16711680&e)>>16}}class HWPChar extends HWPTextElement{setText(e){e=1===e.length&&160===e.charCodeAt(0)?"":Utils.escapeXML(e),this._value=e}get text(){return this._value}}HWPChar.TAG="CHAR";class PageMargin extends HWPTextElement{constructor(){super(...arguments),this.Left=0,this.Right=0,this.Top=0,this.Bottom=0,this.Header=0,this.Footer=0,this.Gutter=0}}PageMargin.TAG="PAGEMARGIN";class PageDef extends HWPTextElement{constructor(){super(...arguments),this._margin=new PageMargin,this.Landscape=0,this.Width=59528,this.Height=84188,this.GutterType="LeftOnly"}}PageDef.TAG="PAGEDEF";class SecDef extends HWPTextElement{constructor(){super(...arguments),this._pageDef=new PageDef,this._pageBorderFills=[],this.TabStop=8e3}}SecDef.TAG="SECDEF";class ColDef extends HWPTextElement{constructor(){super(...arguments),this.Type="Newspaper",this.Count=1,this.Layout="Left",this.SameSize=!0,this.SameGap=0}}ColDef.TAG="COLDEF";class ImageRect extends HWPElement{setBounds(e,t,r,i){return this.X0=e,this.Y0=t,this.X1=e+r,this.Y1=t,this.X2=e+r,this.Y2=t+i,this.X3=e,this.Y3=t+i,this}}ImageRect.TAG="IMAGERECT";class ImageClip extends HWPElement{constructor(){super(...arguments),this.Left=0,this.Top=0,this.Right=0,this.Bottom=0}}ImageClip.TAG="IMAGECLIP";class HWPPicture extends HWPTextElement{constructor(){super(...arguments),this._shapeObject=new HWPShapeObject,this._shapeComponent=new ShapeComponent,this._lineShape=new HWPLineShape,this._imageRect=new ImageRect,this._imageClip=new ImageClip,this._image=new HWPImage}init(){return this._shapeObject.ZOrder=1,this._shapeObject.NumberingType="Figure",this._shapeObject.TextWrap=HWPTextWrapType.Square,this._shapeObject.Lock=!1,this}setId(e){return this._image.BinItem=e,this}setBounds(e,t,r,i){return e=this._toHwp(e),t=this._toHwp(t),r=this._toHwp(r),i=this._toHwp(i),this._shapeObject.setSize(r,i).setPosition(e,t),this._shapeComponent.setSize(r,i),this._imageRect.setBounds(0,0,r,i),this}}HWPPicture.TAG="PICTURE";class HWPLine extends HWPTextElement{constructor(e,t,r,i){super(),this._shape=new HWPShapeObject,this._drawing=new HWPDrawingObject(!1,!1),this.IsReverseHV=!1;const s=this._toHwp(Math.min(e,r)),A=this._toHwp(Math.min(t,i)),n=this._toHwp(Math.max(e,r)),o=this._toHwp(Math.max(t,i)),a=Math.max(1,n-s),l=Math.max(1,o-A);this.StartX=0,this.StartY=0,this.EndX=a,this.EndY=l,this._shape.setPosition(s,A).setSize(a,l),this._drawing.setSize(a,l),this._drawing.lineShape.Style=HWPLineType1.Solid}setStyle(e){return this._drawing.lineShape.setStyle(e),this}setColor(e,t=1){return this._drawing.lineShape.setColor(e,t),this}}HWPLine.TAG="LINE";class HWPRectangle extends HWPTextElement{constructor(e=!0,t=!0,r){super(r),this._shape=new HWPShapeObject,this._drawing=new HWPDrawingObject(e,t)}setBounds(e,t,r,i){return r=this._toHwp(r),i=this._toHwp(i),this.X0=0,this.Y0=0,this.X1=0+r,this.Y1=0,this.X2=0+r,this.Y2=0+i,this.X3=0,this.Y3=0+i,this._shape.setSize(r,i).setPosition(this._toHwp(e),this._toHwp(t)),this._drawing.setSize(r,i),this}setZOrder(e){return this._shape.ZOrder=e,this}setText(e,t){return this._drawing.setText(e,t),this}setDebug(e=!0){this._drawing.setDebug(e)}setColor(e,t){return this._drawing.setColor(e,t),this}}HWPRectangle.TAG="RECTANGLE";class Cell extends HWPElement{constructor(){super(...arguments),this._paraList=new HWPParaList,this.ColAddr=0,this.RowAddr=0,this.ColSpan=1,this.RowSpan=1,this.Header=!1,this.HasMargin=!1,this.Protect=!1,this.Editable=!1,this.Dirty=!1}get textElement(){return this.$_text}add(e){const t=this.$_checkText();return this._paraList.LineWrap=HWPLineWrapType.Break,t.add(e)}setAlign(e,t){return this._paraList.first.ParaShape=e.head.addParaShape(t),this}setWrap(e){return this._paraList.first.ParaShape=e.head.addParaShapeWrap(),this}$_checkText(){if(!this.$_text){const e=this._paraList.add();this.$_text=e.addText()}return this.$_text}}Cell.TAG="CELL";class Row extends HWPElement{constructor(){super(...arguments),this._cells=[]}addCell(e){this._cells.push(e)}}Row.TAG="ROW";const _aligns={l:HWPAlignmentType1.Left,c:HWPAlignmentType1.Center,r:HWPAlignmentType1.Right};class HWPTable extends HWPTextElement{constructor(){super(...arguments),this._shapeObject=new HWPShapeObject,this._insideMargin=new HWPInsideMargin,this.PageBreak="Cell",this.RepeatHeader=!0,this.CellSpacing=0}setBounds(e,t,r,i){return e=this._toHwp(e),t=this._toHwp(t),r=this._toHwp(r),i=this._toHwp(i),this._shapeObject.setSize(r,i).setPosition(e,t),this}build(e,t){function r(e,t){if(1===t)return n[e];{let r=n[e];for(let i=1;i<t;i++)r+=n[e+i];return r}}const i=t.rows,s=t.firstChild.children,A=s.length,n=new Array(A);for(let e=0;e<A;e++){const t=s[e];n[e]=this._toHwp(t.$_w)}this.RowCount=i.length,this.ColCount=A,this._rows=[];for(let t=0,s=this.RowCount;t<s;t++){const s=i[t],n=getComputedStyle(s),o=ColorUtils.cssToColor(n.backgroundColor),a=s.cells,l=this._toHwp(s.offsetHeight),h=new Row;for(let i=0;i<A;i++){const s=a[i],A=s.style,n=getComputedStyle(s);if("none"===n.display)continue;const c=new Cell,u=ColorUtils.cssToColor(n.backgroundColor)||o,d=extractBorderStyles(A,n);c.RowAddr=t,c.ColAddr=i,c.RowSpan=s.rowSpan||1,c.ColSpan=s.colSpan||1,c.Width=r(i,c.ColSpan),c.Height=l,c.BorderFill=u&&d?e.getBorderFillByCell(u.color,d):u?e.getBorderFillByColor(ColorUtils.lighten(u.color,u.alpha),1):d?e.getBorderFillByBorders(d):2;c.add(HWPChar).setText(s.textContent);const p=s.getElementsByClassName(TextItemElementBase.SPAN)[0];if(p){const t=c.textElement,r=getComputedStyle(p),i=HWPTextElement.getFontSize(r.fontSize),A=HWPTextElement.getColor(r.color),n=HWPTextElement.getFontBold(r.fontWeight),o="italic"===r.fontStyle,a=r.textDecoration.indexOf("underline")>=0,l=e.addCharShape(0,i,A,n,o,a);t.CharShape=l,"pre-wrap"===r.whiteSpace?c.setWrap(e):c.setAlign(e,_aligns[s.dataset._align])}h.addCell(c)}this._rows.push(h)}return this}}HWPTable.TAG="TABLE";const BORDER_TOP=0,BORDER_BOTTOM=1,BORDER_LEFT=2,BORDER_RIGHT=3,BORDER_STYLES=["borderTopStyle","borderBottomStyle","borderLeftStyle","borderRightStyle"],BORDER_COLORS=["borderTopColor","borderBottomColor","borderLeftColor","borderRightColor"];class HWPBuilder{constructor(){}build(e,t,r){t.forEach(((t,i)=>{const s=this.$_buildPage(r.setPageDiv(t.page),e,t),A=r.body.section.addPara(),n=A.addText(0===i);s.forEach((e=>{e&&n.addElement(e)})),i>0&&(A.PageBreak=!0)}))}$_createBounds(e,t){let r=e.getDomBounds(t);const i=getComputedStyle(t),s=ColorUtils.cssToColor(i.backgroundColor),A=[];if(s){const i=new HWPRectangle(!0,!1);r=e.getDomBounds(t),i.setBounds(r.x,r.y,r.width,r.height).setZOrder(0).setColor(s.color,s.alpha),A.push(i)}return BORDER_STYLES.forEach(((s,n)=>{const o=i[s];if(o&&"none"!=o){let s,a,l,h;switch(r||(r=e.getDomBounds(t)),n){case 0:s=r.x,l=r.x+r.width,a=h=r.y;break;case 1:s=r.x,l=r.x+r.width,a=h=r.y+r.height;break;case 2:s=l=r.x,a=r.y,h=r.y+r.height;break;case 3:s=l=r.x+r.width,a=r.y,h=r.y+r.height}const c=ColorUtils.cssToColor(i[BORDER_COLORS[n]]),u=new HWPLine(s,a,l,h);u.setStyle(o).setColor(c.color,c.alpha),A.push(u)}})),A}$_createText(e,t){const r=t.textContent;if(r){const i=e.getDomBounds(t),s=new HWPRectangle(!1,!0),A=e.getCharShape(t);return s.setBounds(i.x,i.y,i.width,i.height).setText(r,A).setDebug(HWPBuilder.DEBUG),s}}$_createPicture(e,t){const r=e.getDomBounds(t),i=getComputedStyle(t),s=Utils.getImageUrl(i),A=e.addImage(s,i.opacity),n=new HWPPicture;return n.init().setId(A).setBounds(r.x,r.y,t.clientWidth,t.clientHeight),n}$_createCheck(e,t){const r=t.getElementsByClassName(CheckItemElement.CHECK_CLASS)[0],i=this.$_createPicture(e,r),s=t.getElementsByClassName(CheckItemElement.TEXT_CLASS)[0];return[i,this.$_createText(e,s)]}$_createSvg(e,t){let r,i=t instanceof SVGSVGElement?t:null;if(i)r=(new XMLSerializer).serializeToString(i);else{const e=t._svg_;r=e.substring(e.indexOf("<svg"))}const s=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),A=(window.URL||window.webkitURL).createObjectURL(s),n=e.addImage(A,"1"),o=new HWPPicture,a=e.getDomBounds(t);return o.init().setId(n).setBounds(a.x,a.y,a.width,a.height),o}$_createCanvas(e,t){const r=t.toDataURL(),i=e.addImage(r,"1"),s=new HWPPicture,A=e.getDomBounds(t);return s.init().setId(i).setBounds(A.x,A.y,A.width,A.height),s}$_createTable(e,t){const r=new HWPTable,i=e.getDomBounds(t);return r.BorderFill=2,r.setBounds(i.x,i.y,i.width,i.height),r.build(e,t),r}$_createDiagonalLine(e,t,r){const i=e.getDomBounds(t);return r?new HWPLine(i.x,i.y+i.height,i.x+i.width,i.y):new HWPLine(i.x,i.y,i.x+i.width,i.y+i.height)}$_buildItem(e,t,r,i){const s=r instanceof HTMLElement&&t.models[r.dataset._m_];if(s&&!(s instanceof DiagonalBoxContainer)){const t=this.$_createBounds(e,r);Utils.push(i,t)}if(s instanceof ImageItem)i.push(this.$_createPicture(e,r));else if(s instanceof SvgItem)i.push(this.$_createSvg(e,r));else if(s instanceof CheckItem)i.push(...this.$_createCheck(e,r));else if(r instanceof HTMLTableElement)i.push(this.$_createTable(e,r));else if(r instanceof HTMLSpanElement)s instanceof DiagonalBoxContainer&&r.dataset.line?i.push(this.$_createDiagonalLine(e,r,s.reversed)):i.push(this.$_createText(e,r));else if(r instanceof SVGSVGElement)i.push(this.$_createSvg(e,r));else if(r instanceof HTMLCanvasElement)i.push(this.$_createCanvas(e,r));else if(r instanceof HTMLElement){const s=r.children;for(let r=0;r<s.length;r++)s[r]instanceof Element&&this.$_buildItem(e,t,s[r],i)}}$_buildBackground(e,t,r,i){this.$_buildItem(e,t,r,i)}$_buildForeground(e,t,r,i){this.$_buildItem(e,t,r,i)}$_buildPageHeader(e,t,r,i){this.$_buildItem(e,t,r,i)}$_buildPageFooter(e,t,r,i){this.$_buildItem(e,t,r,i)}$_buildPageBody(e,t,r,i){for(let s of r)this.$_buildItem(e,t,s,i)}$_buildPage(e,t,r){const i=[];return this.$_buildBackground(e,t,r.background,i),this.$_buildPageHeader(e,t,r.pageHeader,i),this.$_buildPageBody(e,t,r.contents,i),this.$_buildPageFooter(e,t,r.pageFooter,i),this.$_buildForeground(e,t,r.foreground,i),i}}HWPBuilder.DEBUG=!1;const EOL="\r\n",$$_head='<?xml version="1.0" encoding="utf-8"?>\r\n',$$_escape=/\<|\>|\&|\"/;function escape(e){return $$_escape.test(e)?e.replace(/\&/g,"&amp;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;"):e}class XmlDoc{constructor(e){this._root=e}get root(){return this._root}addChild(e,t,r,i){const s={tag:t,attrs:r};return(e=e||this._root).children||(e.children=[]),e.children.push(s),s}setAttr(e,t,r){void 0!==r?(e.attrs||(e.attrs={}),e.attrs[t]=escape(String(r))):e.attrs&&delete e.attrs[t]}setValue(e,t){void 0!==t?e.value=t:delete e.value}toString(){let e=$$_head;return e+=`<!DOCTYPE ${this._root.tag}>\r\n`,e+=this.$_toStr(this._root),e}$_toStr(e){let t=`<${e.tag}`;for(let r in e.attrs)t+=` ${r}="${e.attrs[r]}"`;if(e.children||void 0!==e.value){if(t+=">",void 0!==e.value&&(t+=e.value),e.children){t+="\r\n";for(let r of e.children)t+=this.$_toStr(r)}t+=`</${e.tag}>`}else t+="/>";return`${t}\r\n`}}class HWPRoot extends HWPElement{constructor(){super(),this.Version="2.8",this.Style="embed",this.SubVersion="8.0.0.0",this._head=new HWPHead,this._body=new HWPBody,this._tail=new HWPTail}get head(){return this._head}get body(){return this._body}get tail(){return this._tail}addImageBin(e,t,r){this._head.addBin(e,t),this._tail.addImageBin(e,r)}get tag(){return"HWPML"}}HWPRoot.TAG="HWPML";class DocSummary extends HWPElement{}DocSummary.TAG="DOCSUMMARY";class BeginNumber extends HWPElement{constructor(){super(...arguments),this.Page=1,this.Footnote=1,this.Endnote=1,this.Picture=1,this.Table=1,this.Equation=1}}BeginNumber.TAG="BEGINNUMBER";class CaretPos extends HWPElement{}CaretPos.TAG="CARETPOS";class DocSetting extends HWPElement{constructor(){super(...arguments),this._beginNumber=new BeginNumber,this._caretPos=new CaretPos}}DocSetting.TAG="DOCSETTING";class BinItem extends HWPElement{constructor(){super(...arguments),this.Type="Embedding",this.Format="jpg"}}BinItem.TAG="BINITEM";class BinDataList extends HWPListElement{constructor(){super(...arguments),this._items=[],this.Count=0}add(e,t){const r=new BinItem;r.BinData=e,r.Format=t,this._items.push(r),this.Count++}get count(){return this.Count}}BinDataList.TAG="BINDATALIST";class TypeInfo extends HWPElement{constructor(){super(...arguments),this.FamilyType=2,this.SerifStyle=11,this.Weight=6,this.Proportion=0,this.Contrast=0,this.StrokeVariation=1,this.ArmStyle=1,this.LetterForm=1,this.MidLine=1,this.XHeight=1}}TypeInfo.TAG="TYPEINFO";class Font extends HWPElement{constructor(){super(...arguments),this._typeInfo=new TypeInfo}}Font.TAG="FONT";class FontFace extends HWPElement{constructor(){super(...arguments),this._fonts=[]}add(e){this._fonts.push(e)}}FontFace.TAG="FONTFACE";class FaceNameList extends HWPListElement{constructor(){super(),this._faces=[];const e=["맑은 고딕","굴림","바탕","돋움"];["Hangul","Latin","Hanja","Japanese","Other","Symbol","User"].forEach((t=>{const r=new FontFace;r.Lang=t,r.Count=e.length,e.forEach(((e,t)=>{const i=new Font;i.Id=t,i.Type="ttf",i.Name=e,r.add(i)})),this._faces.push(r)}))}get count(){return this._faces.length}}FaceNameList.TAG="FACENAMELIST";class Border extends HWPElement{constructor(){super(...arguments),this.Type=HWPLineType1.Solid,this.Width="0.12mm",this.Color=0}setStyles(e){const t=ColorUtils.cssToColor(e.color,!1),r=e.style;if(r)if("none"===r)this.Type=HWPLineType1.None;else this.Type=HWPLineType1.Solid;return t&&(0===t.alpha&&(this.Type=HWPLineType1.None),this.Color=toHwpColor(t.color)),this}sameWithStyles(e){const t=ColorUtils.cssToColor(e.color,!1),r=t&&0===t.alpha?"none":e.style;if(r)if("none"===r){if(this.Type!==HWPLineType1.None)return!1}else if(this.Type!==HWPLineType1.Solid)return!1;return!t||this.Color===toHwpColor(t.color)}}class BorderLeft extends Border{}BorderLeft.TAG="LEFTBORDER";class BorderRight extends Border{}BorderRight.TAG="RIGHTBORDER";class BorderTop extends Border{}BorderTop.TAG="TOPBORDER";class BorderBottom extends Border{}BorderBottom.TAG="BOTTOMBORDER";class BorderDiagonal extends Border{}BorderDiagonal.TAG="DIAGONAL";const DEF_BORDER={style:"solid",color:"rgb(0,0,0)"};class BorderFill extends HWPElement{constructor(){super(...arguments),this._leftBorder=new BorderLeft,this._rightBorder=new BorderRight,this._topBorder=new BorderTop,this._bottomBorder=new BorderBottom,this._diagonal=new BorderDiagonal,this.ThreeD=!1,this.Shadow=!1,this.Slash=0,this.BackSlash=0,this.CrookedSlash=0,this.CounterSlash=0,this.CounterBackSlash=0,this.BreakCellSeparateLine=0,this.$_borders=[this._leftBorder,this._rightBorder,this._topBorder,this._bottomBorder,this._diagonal]}setSimple(e,t="0.12mm"){return this.$_borders.forEach((r=>{r.Type=e,r.Width=t})),this}setFill(e,t){let r=this._fillBrush;return r||(r=this._fillBrush=new HWPFillBrush),r.setColor(e,t),this}sameFill(e,t){return this._fillBrush&&this._fillBrush.sameWithColor(e,t)}setBorders(e){return e.left&&this._leftBorder.setStyles(e.left),e.right&&this._rightBorder.setStyles(e.right),e.top&&this._topBorder.setStyles(e.top),e.bottom&&this._bottomBorder.setStyles(e.bottom),this}sameBorders(e){return!!this._leftBorder.sameWithStyles(e.left||DEF_BORDER)&&(!!this._rightBorder.sameWithStyles(e.right||DEF_BORDER)&&(!!this._topBorder.sameWithStyles(e.top||DEF_BORDER)&&!!this._bottomBorder.sameWithStyles(e.bottom||DEF_BORDER)))}}BorderFill.TAG="BORDERFILL";class BorderFillList extends HWPListElement{constructor(){super(),this._fills=[],this.Count=0,this.addSimple(HWPLineType1.None,"0.1mm"),this.addSimple(HWPLineType1.Solid,"0.12mm")}addSimple(e,t="0.12mm"){const r=new BorderFill;return r.setSimple(e,t),r.Id=++this.Count,this._fills.push(r),r}findByFill(e,t){for(let r of this._fills)if(r.sameFill(e,t))return r}findByBorders(e){for(let t of this._fills)if(t.sameBorders(e))return t}getByFill(e,t){let r=this.findByFill(e,t);return r||(r=(new BorderFill).setFill(e,t),r.Id=++this.Count,this._fills.push(r)),r.Id}getByBorders(e){let t=this.findByBorders(e);return t||(t=(new BorderFill).setBorders(e),t.Id=++this.Count,this._fills.push(t)),t.Id}getByCell(e,t){}get count(){return this.Count}}BorderFillList.TAG="BORDERFILLLIST";class FontId extends HWPElement{constructor(){super(...arguments),this.Hangul=0,this.Latin=0,this.Hanja=0,this.Japanese=0,this.Other=0,this.Symbol=0,this.User=0}static create(e){return(new FontId).setId(e)}setId(e){return this.Hangul=this.Latin=this.Hanja=this.Japanese=this.Other=this.Symbol=this.User=e,this}}FontId.TAG="FONTID";class Ratio extends HWPElement{constructor(){super(...arguments),this.Hangul=100,this.Latin=100,this.Hanja=100,this.Japanese=100,this.Other=100,this.Symbol=100,this.User=100}static create(e){const t=new Ratio;return t.Hangul=t.Latin=t.Hanja=t.Japanese=t.Other=t.Symbol=t.User=e,t}}Ratio.TAG="RATIO";class CharSpacing extends HWPElement{constructor(){super(...arguments),this.Hangul=0,this.Latin=0,this.Hanja=0,this.Japanese=0,this.Other=0,this.Symbol=0,this.User=0}static create(e){const t=new CharSpacing;return t.Hangul=t.Latin=t.Hanja=t.Japanese=t.Other=t.Symbol=t.User=e,t}}CharSpacing.TAG="CHARSPACING";class RelSize extends HWPElement{constructor(){super(...arguments),this.Hangul=100,this.Latin=100,this.Hanja=100,this.Japanese=100,this.Other=100,this.Symbol=100,this.User=100}static create(e){const t=new RelSize;return t.Hangul=t.Latin=t.Hanja=t.Japanese=t.Other=t.Symbol=t.User=e,t}}RelSize.TAG="RELSIZE";class CharOffset extends HWPElement{constructor(){super(...arguments),this.Hangul=0,this.Latin=0,this.Hanja=0,this.Japanese=0,this.Other=0,this.Symbol=0,this.User=0}static create(e){const t=new CharOffset;return t.Hangul=t.Latin=t.Hanja=t.Japanese=t.Other=t.Symbol=t.User=e,t}}CharOffset.TAG="CHAROFFSET";class Italic extends HWPElement{}Italic.TAG="ITALIC";class Bold extends HWPElement{}Bold.TAG="BOLD";class Underline extends HWPElement{constructor(){super(...arguments),this.Type="Bottom",this.Shape=HWPLineType2.Solid,this.Color=0}}Underline.TAG="UNDERLINE";class CharShape extends HWPElement{constructor(){super(...arguments),this.Height=1e3,this.TextColor=0,this.ShadeColor=4294967295,this.UseFontSpace=!1,this.UseKerning=!1,this.SymMark=0}static createSimple(e,t,r,i,s,A){const n=new CharShape;return n.Height=Math.round(100*t),n.TextColor=r,n._fontId=FontId.create(e),n._ratio=Ratio.create(100),n._charSpacing=CharSpacing.create(0),n._relSize=RelSize.create(100),n._charOffset=CharOffset.create(0),i&&(n._bold=new Bold),s&&(n._italic=new Italic),A&&(n._underline=new Underline),n}same(e,t,r,i,s,A){return this._fontId.Hangul===e&&Math.round(this.Height/100)===t&&this.TextColor===r&&(!(i&&!this._bold)&&(s===!!this._italic&&A===!!this._underline))}}CharShape.TAG="CHARSHAPE";class CharShapeList extends HWPListElement{constructor(){super(...arguments),this._charShapes=[],this.Count=0}add(e,t,r,i,s,A){let n;for(let o of this._charShapes)if(o.same(e,t,r,i,s,A)){n=o;break}return n||(n=CharShape.createSimple(e,t,r,i,s,A),n.Id=this.Count++,this._charShapes.push(n)),n.Id}get(e){return this._charShapes[e]}get count(){return this.Count}}CharShapeList.TAG="CHARSHAPELIST";class TabDef extends HWPElement{constructor(){super(...arguments),this.AutoTabLeft=!1,this.AutoTabRight=!1}}TabDef.TAG="TABDEF";class TabDefList extends HWPListElement{constructor(){super(...arguments),this._defs=[],this.Count=0}add(e){return this._defs.push(e),e.Id=this.Count++}addDef(e,t){const r=new TabDef;return r.AutoTabLeft=e,r.AutoTabRight=t,this.add(r),r}get(e){return this._defs[e]}get count(){return this.Count}}TabDefList.TAG="TABLELIST";class NumberingList extends HWPListElement{constructor(){super(...arguments),this._numberings=[],this.Count=0}get count(){return this.Count}}NumberingList.TAG="NUMBERINGLIST";class BulletList extends HWPListElement{constructor(){super(...arguments),this._bullets=[],this.Count=0}get count(){return this.Count}}BulletList.TAG="BULLETLIST";class ParaMargin extends HWPElement{constructor(){super(...arguments),this.Indent=0,this.Left=0,this.Right=0,this.Prev=0,this.Mext=0,this.LineSpacingType="Percent",this.LineSpacing=130}}ParaMargin.TAG="PARAMARGIN";class ParaShape extends HWPElement{constructor(){super(...arguments),this.Align=HWPAlignmentType1.Justify,this.VertAlign="Baseline",this.HeadingType="None",this.Level=0,this.BreakLatinWord="KeepWord",this.BreakNonLatinWord=!0,this.Condense=0,this.WindowOrphan=!1,this.KeepWithNext=!1,this.KeepLines=!1,this.PageBreakBefore=!1,this.FontLineHeight=!1,this.SnapToGrid=!0,this.LineWrap=HWPLineWrapType.Break,this.AutoSpaceEAsianEng=!0,this.AutoSpaceEAsianNum=!0}static create(e,t,r){const i=new ParaShape(r);return i._margin=e,i._border=t,i}sameWith(){return!1}}ParaShape.TAG="PARASHAPE";class ParaShapeList extends HWPListElement{constructor(){super(),this._shapes=[],this.Count=0,this.add(HWPAlignmentType1.Left)}get(e){return this._shapes[e]}add(e){for(let t of this._shapes)if(t.Align===e)return t;const t=new ParaShape;return t.Id=this.Count++,t.Align=e,this._shapes.push(t),t}addWrap(){if(!this._wrap){const e=this._wrap=ParaShape.create(new ParaMargin,null,null);e.Id=this.Count++,e.Align=HWPAlignmentType1.Center,this._shapes.push(e)}return this._wrap}get count(){return this.Count}}ParaShapeList.TAG="PARASHAPELIST";class StyleList extends HWPListElement{constructor(){super(...arguments),this._styles=[],this.Count=0}add(e){return this._styles.push(e),e.Id=this.Count++}get count(){return this.Count}}StyleList.TAG="STYLELIST";class MemoShapeList extends HWPListElement{constructor(){super(...arguments),this._memos=[],this.Count=0}get count(){return this.Count}}MemoShapeList.TAG="MEMOSHAPELIST";class MappingTable extends HWPElement{constructor(){super(),this._binDataList=new BinDataList,this._faceNameList=new FaceNameList,this._borderFillList=new BorderFillList,this._charShapeList=new CharShapeList,this._tabDefList=new TabDefList,this._numberingList=new NumberingList,this._bulletList=new BulletList,this._paraShapeList=new ParaShapeList,this._styleList=new StyleList,this._memoShapeList=new MemoShapeList}get borderFillList(){return this._borderFillList}get charShapeList(){return this._charShapeList}get paraShapeList(){return this._paraShapeList}addBin(e,t){this._binDataList.add(e,t)}}MappingTable.TAG="MAPPINGTABLE";class HWPHead extends HWPElement{constructor(){super(),this._docSummary=new DocSummary,this._docSetting=new DocSetting,this._mappingTable=new MappingTable}get docSummary(){return this._docSummary}get docSetting(){return this._docSetting}get mappingTable(){return this._mappingTable}addBin(e,t){this._mappingTable.addBin(e,t)}addCharShape(e,t,r,i,s,A){return this._mappingTable.charShapeList.add(e,t,r,i,s,A)}addParaShape(e){return this._mappingTable.paraShapeList.add(e).Id}addParaShapeWrap(){return this._mappingTable.paraShapeList.addWrap().Id}}HWPHead.TAG="HEAD";class Section extends HWPElement{constructor(){super(...arguments),this._paras=[]}addPara(e=!1){const t=new HWPPara;return e&&t.addText(!1,!1),this._paras.push(t),t}}Section.TAG="SECTION";class HWPBody extends HWPElement{constructor(){super(),this._sections=[];const e=new Section;e.Id=0,this._sections.push(e)}get section(){return this._sections[0]}}HWPBody.TAG="BODY";class BinData extends HWPElement{constructor(){super(...arguments),this.Encoding="Base64"}get text(){return this._text}}BinData.TAG="BINDATA";class BinDataStorage extends HWPElement{constructor(){super(...arguments),this._data=[]}addImage(e,t){const r=new BinData;return r.Id=e,r.Size=t.length,r._text=t,this._data.push(r),r}}BinDataStorage.TAG="BINDATASTORAGE";class HWPTail extends HWPElement{constructor(){super(...arguments),this._bindDataStorage=new BinDataStorage}getBinData(e){return this._bindDataStorage[e]}addImageBin(e,t){return this._bindDataStorage.addImage(e,t)}}HWPTail.TAG="TAIL";class HWPFile{constructor(e=!1){this._imgId=1,this._imgMap={},this.debug=e,this._imageLoader=new ImageLoader,this._root=new HWPRoot}static write(e,t,r){const{elements:i,attrs:s}=t.getContent();for(let t in s)e.setAttr(r,t,s[t]);const A=t.text;A&&e.setValue(r,A);for(let t of i)if(!(t instanceof HWPListElement)||t.count>0){const i=e.addChild(r,t.tag);this.write(e,t,i)}}static toXml(e){const t=new XmlDoc({tag:e.tag});return this.write(t,e,t.root),t.toString()}get body(){return this._root.body}get head(){return this._root.head}get tail(){return this._root.tail}addImage(e,t){let r=this._imgMap[e];if(!r){e.indexOf("base64,")<0&&this._imageLoader.add(e,t),r=this._imgMap[e]=String(this._imgId++)}return+r}getBorderFillByColor(e,t){return this.head.mappingTable.borderFillList.getByFill(e,t)}getBorderFillByBorders(e){return this.head.mappingTable.borderFillList.getByBorders(e)}getBorderFillByCell(e,t){return this.head.mappingTable.borderFillList.getByCell(e,t)}getCharShape(e){const t=getComputedStyle(e),r=HWPTextElement.getFontSize(t.fontSize),i=HWPTextElement.getColor(t.color),s=HWPTextElement.getFontBold(t.fontWeight),A="italic"===t.fontStyle,n=t.textDecoration.indexOf("underline")>=0;return this.addCharShape(0,r,i,s,A,n)}addCharShape(e,t,r,i,s,A){return this._root.head.addCharShape(e,t,r,i,s,A)}prepare(e){return this._imageLoader.load(e)}canExport(){return this._imageLoader.loaded}toXml(){const e=this._root,t=new XmlDoc({tag:"HWPML",attrs:{Version:"2.1"}});for(let t in this._imgMap){const r=+this._imgMap[t];let i;i=this._imageLoader.get(t)||t;let s=i.indexOf("base64,");s>=0&&(i=i.substring(s+7)),e.addImageBin(r,"png",i)}return HWPFile.write(t,e,t.root),t}setPageDiv(e){return e!==this._pageDiv&&(this._pageDiv=e,this._pageRect=e.getBoundingClientRect()),this}getDomBounds(e){const t=e.getBoundingClientRect();return t.x-=this._pageRect.x,t.y-=this._pageRect.y,t}}class HWPExporter{constructor(){}export(e,t,r){if("function"!=typeof r)return;const i=()=>{if(A.canExport()||A.prepare(s)){const e=A.toXml().toString(),t=(new TextEncoder).encode(e);null==r||r(t)}else setTimeout((()=>{i()}),300)},s=5,A=this.$_build(e,t);i()}$_build(e,t){const r=new HWPFile(!0);if(t){(new HWPBuilder).build(e,t,r)}return r}}class DocumentExporter extends Base{constructor(){super()}_doDispose(){super._doDispose()}export(e,t,r){console.log("export to document",r);const i=r.type||"hwp",s=r.fileName||"realreport";try{if("hwp"===i){(new HWPExporter).export(e,t,(e=>{download(e,s+".hwp")}))}else if("docx"===i){(new DOCExporter).exportBlob(e,t,(e=>{download(e,s+".docx")}))}}catch(e){console.error(e),alert("내보내기 실패: "+e)}}}const pxpt=72/Dimension.HTMLDPI;class PdfModel extends Base{constructor(e,t,r){super(),this._report=e,this.elementCreator=r,this._imageLoader=new ImageLoader,this._pages=this.$_build(e,t)}_doDispose(){super._doDispose()}getModel(e){return this._report.models[e.dataset._m_]}getParent(e){for(;e;){if(e instanceof HTMLElement){if(this._report.models[e.dataset._m_])return e}e=e.parentElement}}addImage(e,t){this._imageLoader.add(e,t)}getImage(e){return this._imageLoader.get(e)}prepare(e){return this._imageLoader.load(e)}canExport(){return this._imageLoader.loaded}write(e,t,r){this._doc=e,this._font=t,this._fontBold=r;for(let t=0;t<this._pages.length;t++){const r=this._pages[t];this._offsetX=r.offsetX,this._offsetY=r.offsetY,r.write(this),t<this._pages.length-1&&e.addPage()}}getBounds(e){const t=e.getBoundingClientRect();return t.x-=this._offsetX,t.y-=this._offsetY,t.x*=pxpt,t.y*=pxpt,t.width*=pxpt,t.height*=pxpt,t}getBox(e){const t=e.getBBox();return t.x*=pxpt,t.y*=pxpt,t.width*=pxpt,t.height*=pxpt,t}text(e,t,r,i,s){e=this.$_css(e);const A=this._doc,n=e.textDecoration,o=this.$_color(e.color),a=e.fontSize;let l=parseFloat(a);if(s={lineBreak:!1,lineGap:l<13?-1:-2,...s},"italic"===e.fontStyle&&(s.oblique=!0),isNaN(l)?l=PdfModel.FONT_SIZE:a.endsWith("px")&&(Utils.isMac?l=Math.floor(l*pxpt)-(l<13?1:0):l*=pxpt),A.save(),A.fontSize(l),parseFloat(e.fontWeight)>=700?A.font(this._fontBold):A.font(this._font),o&&A.fillColor(o.color,o.opacity),0!=i&&A.rotate(i,{origin:[t.x+t.width/2,t.y+t.height/2]}),t.y-=.15*l,A.text(r,t.x,t.y,s),n&&n.startsWith("underline")){const e=A.widthOfString(r),i=A.currentLineHeight()-1;A.underline(t.x,t.y,e,i,{color:"black"})}return A.restore(),this}save(){return this._doc.save(),this}restore(){return this._doc.restore(),this}transformSvg(e){return this._doc.transform(e.a,e.b,e.c,e.d,e.e*pxpt,e.f*pxpt),this}translate(e,t){return this._doc.translate(e,t),this}scale(e,t){return this._doc.scale(e,t),this}clip(e){const t=this.getBounds(e);return this._doc.rect(t.x,t.y,t.width,t.height).clip(),this}clipRect(e){return this._doc.rect(e.x,e.y,e.width,e.height).clip(),this}path(e,t){return this.$_render(e,((e,r)=>{const i=this.$_color(r.fill),s=this.$_color(r.stroke),A=parseFloat(r.strokeWidth);(i||s&&A>0)&&(s&&A>0&&e.path(t).lineWidth(A).strokeColor(s.color,s.opacity).stroke(),i&&e.path(t).fillColor(i.color,i.opacity).fill())})),this}dline(e,t,r,i,s){return this.$_render(e,((e,A)=>{this.$_border(A,"top")&&e.moveTo(t,r).lineTo(i,s).stroke()})),this}rect(e,t,r=!1){return this.$_render(e,((e,i)=>{const s=this.$_color(r?i.fill:i.backgroundColor);s&&(e.fillColor(s.color,s.opacity),e.rect(t.x,t.y,t.width,t.height).fill())})),this}polygon(e,t){return this.$_render(e,((e,r)=>{const i=parseFloat(r.strokeWidth),s=this.$_color(r.fill);if(s&&(e.fillColor(s.color,s.opacity),e.polygon(...t).fill()),i>0){const s=this.$_color(r.stroke);s&&(e.strokeColor(s.color,s.opacity).lineWidth(i*pxpt),e.polygon(...t).stroke())}})),this}border(e,t){return this.$_render(e,((e,r)=>{this.$_border(r,"top")&&e.moveTo(t.x,t.y).lineTo(t.x+t.width,t.y).stroke(),this.$_border(r,"bottom")&&e.moveTo(t.x,t.y+t.height).lineTo(t.x+t.width,t.y+t.height).stroke(),this.$_border(r,"left")&&e.moveTo(t.x,t.y).lineTo(t.x,t.y+t.height).stroke(),this.$_border(r,"right")&&e.moveTo(t.x+t.width,t.y).lineTo(t.x+t.width,t.y+t.height).stroke()})),this}image(e,t,r){return this.$_render(e,((e,i)=>{e.image(t,r.x,r.y,{width:r.width,height:r.height})})),this}$_build(e,t){const r=[];for(let e of t){const t=new PdfPage(this,e);r.push(t)}return r}$_render(e,t){e=this.$_css(e),this._doc.save(),t(this._doc,e),this._doc.restore()}$_css(e){return e instanceof Element&&(e=getComputedStyle(e)),e}$_color(e){let t=e,r=1;if(e.startsWith("#"));else{if(!e.startsWith("rgb"))return null;{const i=e.substring(e.startsWith("rgb(")?4:5,e.length-1).split(/\s*\,\s*/g);t="#";for(let e=0;e<3;e++)t+=Utils.pad16(parseInt(i[e]),2);i.length>3&&(r=parseFloat(i[3]))}}return r>0?{color:t,opacity:r}:null}$_border(e,t){const r="border"+Utils.capitalize(t),i=parseFloat(e[r+"Width"]);if(i>0){const t=this.$_color(e[r+"Color"]);if(t){const s=e[r+"Style"],A="dotted"===s?1:"dashed"===s?2:0;return this._doc.strokeColor(t.color,t.opacity).lineWidth(i*pxpt),A>0&&this._doc.dash(A),!0}}}}PdfModel.FONT_SIZE=10;class PdfObject{}class PdfPage extends PdfObject{constructor(e,t){super();const r=t.page.getBoundingClientRect();this.offsetX=r.x,this.offsetY=r.y,this._page=t,this._elements=this.$_build(e)}write(e){for(let t of this._elements)t.write(e)}$_build(e){const t=this._page,r=[];r.push(new PdfElement(e,t.background)),r.push(new PdfElement(e,t.pageHeader));for(let i of t.contents){const t=i instanceof HTMLElement&&e.getModel(i),s=e.elementCreator(e,t,i);s&&r.push(s)}return r.push(new PdfElement(e,t.pageFooter)),r.push(new PdfElement(e,t.foreground)),r}}class PdfElement extends PdfObject{constructor(e,t){super(),this._dom=t,this._elements=this._build(e,t)}write(e){if(this._doBeginWrite(e,this._dom),this._doWrite(e,this._dom),this._elements)for(let t of this._elements)t.write(e);this._doEndWrite(e,this._dom)}_doBeginWrite(e,t){}_doEndWrite(e,t){}_doWrite(e,t){const r=e.getModel(t),i=e.getBounds(t),s=getComputedStyle(t);if(t instanceof HTMLSpanElement){let A=t.textContent;A&&(r instanceof TextItem&&r.wrap?e.text(s,i,A,0,{width:i.width+2,align:s.textAlign}):"right"===s.textAlign?e.text(s,i,A,0,{width:i.width,align:"right"}):e.text(s,i,A,0))}else(r instanceof ReportGroupItem||r instanceof TextItem||r instanceof BarItem)&&e.rect(s,i).border(s,i)}_build(e,t){const r=[],i=t.children;for(let t=0;t<i.length;t++){const s=i[t],A=s instanceof HTMLElement&&e.getModel(s),n=e.elementCreator(e,A,s);n&&r.push(n)}return r}}class PdfBoundedElement extends PdfElement{_needClip(){return!1}_doBeginWrite(e,t){this._needClip()&&(e.save(),e.clip(t))}_doEndWrite(e,t){this._needClip()&&e.restore()}_doWrite(e,t){const r=e.getBounds(t),i=getComputedStyle(t);e.rect(i,r),e.border(i,r)}}class PdfBarElement extends PdfElement{constructor(e,t,r){super(e,t),this._model=r}_build(e,t){}_doWrite(e,t){const r=e.getBounds(t);e.rect(t,r)}}class PdfCanvasElement extends PdfElement{constructor(e,t){super(e,t)}_build(e,t){}_doWrite(e,t){const r=t.toDataURL();if(r){const i=e.getBounds(t);e.image(t,r,i)}}}const _checked_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAP0QAAD9EBVjAapAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d1nmG11eb/x+7G3RFM0Go2ixt67EVRQAQFRigqCEsWKgD0kxlhjibFSLLEEe0NREEFQaQLRvwVb7ChW7Aoi0s55/i/WHnKEc6btvedZa/3uzzvxnJnvdeHlumdm72ciM5EkSW25XPUASZK09gwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIkrQGIuKKEfHX1TsWGACSJM1ZRFwdOAo4NSKuX70HIDKzeoMkSaM1+ar/aOBuk390BrBVZv6obpUBIEnS3ETEjYBjgVtc6r86ky4CzlzrTQv8EYAkSXMQEbcFTuOyD3+AzYCTIuKmazpqAwaAJEkzFhFbAJ8G/naRP3ZDugi4+dqs+lMGgCRJMxQRDwaOA661jD9+fboIuNV8V12WASBJ0oxExN7A4cBVV/DXrgucOPmRwZoxACRJmoGIeDbwVuDyq/jr1wFOiIg7znbVpvkuAEmSphARAbwGeOoMPtxvgG0y8wsz+FiLMgAkSVqliLgi8HbgETP8sL8DHpiZn53hx7wMA0CSpFWIiGsAHwK2mcOHPwfYLjNPm8PHBgwASZJWbCPX/ebhXGCHzDx5Hh/cFwFKkrQCEbEZcCrzffgDXAM4JiLuN48PbgBIkrRMEXE7uof/Wh3vuRpwVETM/McMBoAkScsQEfcGTmbx637zcFXgyIjYYZYf1ACQJGkJEfEQln/dbx6uDBw+2TETBoAkSYuIiMfRvdr/KsVTrgQcFhG7zuKDBfAfs/hAkiQB64ADM/MX1UNmISL+FXhJ9Y5LuRh4VGa+b5oPEoDvA5QkzcIFwCMz84PVQ6Y1ue53ILB/9ZZNWAc8JjPfudoPYABIkmbhHGCnzDyhesi0IuJKdNf9dq/esoT1wOMy89DV/GUDQJI0rZ/TXa07vXrItCbX/Q4Htq7eskwJPCkz37TSv2gASJKmcQawbWaeUT1kWhFxbbrrfnet3rJCCeyfma9byV/yXQCSpNU6Hdh8JA//zegO/Azt4Q/dF/OHRMTTV/KXDABJ0mqcAGyZmT+vHjKtiLg9cBpws+otU3p1RByw3D9sAEiSVuqDdD/zP6d6yLQi4j501/2uV71lRl4eEc9Zzh80ACRJK/EGYLfMvKB6yLQiYifgWOCa1Vtm7MUR8cKl/pABIElarhdk5pMzc331kGlFxOPpvpNRfd1vXp4XES9d7A/4LgBJ0lLWA/tm5hurh8zC5FvkL67esUZelZnP2th/YQBIkhZzAbBnZn6oesi0IuJydNf99qvessYOysynXvofGgCSpE05B3hIZp5YPWRak+t+7wB2q95S5A1038W55JlvAEiSNuZndK/0/1L1kGlNrvt9GHhA9ZZibwGesBABBoAk6dLOALbJzO9VD5nW5LrfMcBdqrf0xNuBvTNzvQEgSdrQF+m+8h/8r/ONiBvTvc1v6Ad+Zu09wF5XqF4hSeqN4+l+o9/vq4dMKyLuQPeV/1gO/MzSHkB6B0CSBHAY3Vf+Y3j43xc4CR/+m3Ie8B4DQJL0emD3zLywesi0ImJn4OOM77rfrPwW2DozjzYAJKltz8vMfUdy3e8JdN/JGOt1v2mdBdw3M08D8DUAktSm9cA+mfmm6iGzEBHPBV5UvaPHvkv3zo7vL/wDA0CS2nMBsEdmHl49ZFqT634HAftWb+mx04EHXvqdHQaAJLXlbLrrfidVD5nW5LrfO4GHV2/psZOAB2/sVzcbAJLUjp/RfSX45eoh04qIP6O77nf/6i09dgTdizvP39h/6YsAJakN3wXuNZKH/3WAE/Hhv5hDgV039fAHA0CSWvAFYPMNXwA2VJPrfqcCd67e0mOvyMy9M3PdYn/IAJCkcfsUsNVITvveATgN+PvqLT12QGYesJw/aABI0nh9ANh+ZNf9rlu9pafW0f2Sn1cs9y8YAJI0TocAjxjJdb9d6H6pj9f9Nu58up/3H7qSv2QASNL4PDcz9x/Jdb8n0l33u3L1lp46h+6dHUes9C/6NkBJGo91dNf93lw9ZBYi4nnAC6t39NjP6X6B0+mr+csGgCSNw/l03/L/SPWQaU2u+x0MPLl6S499n+6073dX+wEMAEkavrPprr2dXD1kWpPrfu8CHla9pce+CmybmWdN80EMAEkatrPofgb8leoh05pc9/sIcL/qLT12GvCgzPzttB/IFwFK0nB9h+663xge/gvX/Xz4b9rRwNazePiDASBJQ/V5uut+Z1YPmVZE3ITuK1uv+23au+h+idN5s/qABoAkDc8n6K77/bJ6yLQi4o50p31vWr2lxw4E9srMi2f5QQ0ASRqW99H9DPjc6iHTiogt8brfUv4tM5+WmTnrD2wASNJwHAzsMZLrfrsCHwf+vHpLT60HnpSZL5nXJzAAJGkYnpOZT5nHV4JrLSKeRPd7Crzut3EXArtl5n/N85P4NkBJ6rd1dF8JvqV6yCxExPOBF1Tv6LFzgZ0z85Pz/kQGgCT11/nA7qu58943k+t+hwD7VG/psV/R/fbGz63FJzMAJKmffkd33e/T1UOmFRFXpnsb20Ort/TYj+hO+35zrT6hASBJ/fNTuut+X60eMq2I+HO6635bVW/psW/QPfx/vJaf1ACQpH75Nt2d9zOrh0wrIv4GOAa4U/WWHvt/dN/2//Vaf2LfBSBJ/fE5xnPd76Z0B358+G/aJ4D7VTz8wQCQpL44ju5h8KvqIdOKiDvhdb+lfIDuoNMfqgYYAJJU772M57rfVnS/1Odviqf02RuAR1QfdDIAJKnWgcCemXlR9ZBpRcRD6X7m73W/Tfv3zHxyZq6vHjKGFwGeDjy5eoQkrcKFmfnF6hGzEBH70L3P3y8sNy6Bp2bmwdVDFowhAM7JzM9Uj5CkVkXEC4DnV+/osYuAR2fme6qHbGgMASBJKjC57vc64EnVW3rsPOChmXlM9ZBLMwAkSSs2ue73bmDX6i099ltgh8z8n+ohG2MASJJWZHLd7whgy+IpffZTuut+/1s9ZFMMAEnSskXEdele6X/H6i099h26h/+Z1UMW46s1JUnLssF1Px/+m/ZFYIu+P/zBAJAkLcMG1/1uUr2lx04EtsrMX1QPWQ4DQJK0qIi4H3ASXvdbzIfpfoPjOdVDlssAkCRtUkQ8jO5n/n9WvaXH3go8LDMvqB6yEgaAJGmjIuLJwPuAK1Vv6bGXZ+bjMnNd9ZCVMgAkSZcRES+kO/Ljc2LjEnhWZv5L9ZDV8m2AkqRLTK77vR54YvWWHrsYeFxmvr16yDQMAEkScMl1v/cAu1Rv6bHzgd0y88jqIdMyACRJC9f9jgTuW72lx84GHpyZJ1cPmQUDQJIaN7nu93HgDtVbeuznwLaZ+eXqIbNiAEhSwyLi74HjgBtXb+mx79Gd9j2jesgs+epOSWpURNyZ7rqfD/9N+wrdad9RPfzBAJCkJkXE/elO116neEqfnQLcNzPPqh4yDwaAJDUmIh4OHI3X/RZzFN23/X9XPWReDABJakhE7Au8F6/7LeadwM6Z+cfqIfNkAEhSIyLiRcAh+P/9i3kN8I+ZeXH1kHnzXQCSNHIRcXm6635PqN7Sc8/JzJdWj1grBoAkjVhEXIXuut/O1Vt6bD3wpMx8c/WQtWQASNJIRcQ1gSPwut9iLgD2zMwPVQ9ZawaAJI1QRFwPOAav+y3m98BOmXl89ZAKBoAkjUxE3Aw4Fg/8LOaXwPaZ+fnqIVUMAEkakYi4C917/D3ws2k/pHuP/7eqh1TyrSCSNBIR8QDgBHz4L+brwOatP/zBAJCkUYiI3YCP4XW/xXwWuHdm/rh6SB8YAJI0cBGxH91b/bzut2nHAvfPzN9UD+kLA0CSBiwi/h04GP//fDHvA3bMzD9UD+kTXwQoSQM0ue73BuDx1Vt67nXAUzJzffWQvjEAJGlgJtf93gvsVL2l516YmS+oHtFXBoAkDcjkut+RwH2qt/TYerqv+l9XPaTPDABJGojJdb+PA7ev3tJjFwF7Zeb7qof0nQEgSQMwue53HLBZ8ZQ++wOwa2YeWz1kCAwASeq5iLgr3XW/a1dv6bHfADtk5meqhwyFbxuRpB6LiK3prvv58N+0n9Ad+PHhvwIGgCT1VETsDhwFXKN6S499m+6079erhwyNASBJPRQR++N1v6V8AdgiM39QPWSIDABJ6pmIeAlwEBDVW3rseGCrzPxl9ZCh8kWAktQTk+t+bwQeV72l5w4H9sjMC6qHDJkBIEk9MLnu9z7gIdVbeu7NwD6Zua56yND5IwBJKhYR16J7j78P/8W9LDOf4MN/NvwOgCQVioi/pbvud7vqLT2WwDMz8zXVQ8bEAJCkIhFxc7rfU79Z8ZQ+uxh4bGa+o3rI2BgAklQgIu4GfAwP/Czmj8DDM/Oo6iFjZABI0hqbXPc7HA/8LOZ3wI6ZeUr1kLHyRYCStIYi4hF0X/n78N+0nwH39eE/XwaAJK2RiHgK8G7gitVbeuwMutO+X6keMnYGgCStgYh4KXAgXvdbzJfpTvt+r3pIC3wNgCTN0eS6338Bj63e0nOfpvuZ/9nVQ1phAEjSnETEVemu+z24ekvPfZTu1f7nVw9piT8CkKQ52OC6nw//xb0d2MWH/9ozACRpxibX/T4NbFG9pedeBTwmMy+uHtIiA0CSZigibgGcBty2ekvPPTszn5WZWT2kVb4GQJJmZHLd72jgr6u39Ng64EmZ+ZbqIa0zACRpBiJiG7rrflev3tJjFwCPyMwPVw+RPwKQpKlFxB7AUfjwX8zvge18+PeHASBJU4iIpwHvwut+i/klsGVmnlA9RP/HAJCkVYqIlwGvwet+i/kB3XW/L1YP0Z/yNQCStEKT635vBh5TvaXn/hfYNjN/Uj1El2UASNIKTK77vR/YsXpLz/0P8KDM/E31EG2cASBJyxQRf0F3tnbz6i0993Fg18w8r3qINs3XAEjSMkTE9YGT8eG/lPcCD/bh338GgCQtwet+y3YIsGdmXlQ9REszACRpERFxd+AU4IbVW3ru+Zm5v6d9h8PXAEjSJkTEtsCH8MDPYtYD+2fm66uHaGUMAEnaiIjYEzgUD/ws5kJgr8x8f/UQrZw/ApCkS4mIpwPvxIf/Yv4A7OjDf7j8DoAkbSAi/gP45+odPfdrYIfM/Gz1EK2eASBJQERcge6636OLp/Tdj4FtMvMb1UM0HQNAUvMm1/0+ADyoekvPfYvu4f/D6iGangEgqWmT635HAfeq3tJzn6f7db6/qh6i2fBFgJKaNbnu92l8+C/lU8BWPvzHxQCQ1KSIuCXddb/bVG/puQ8C22fmudVDNFsGgKTmRMQ98LrfcrwJ2C0zL6weotkzACQ1JSIeSPct7b+q3tJzL8nMJ2bm+uohmg8DQFIzIuKRwJF42ncxCTw9M/+teojmywCQ1ISIeAbwDrzut5iL6U77vrZ6iObPAJA0ehHxcuBVQFRv6bE/Ajtl5ruqh0wrIq5VvWEIDABJoxURV4iItwEHVG/pud8BW2fmx6qHTCsibkv3Gxy1BA8BSRqlyXW/w4Adqrf03FnAtpn51eoh04qIe9EddfpF9ZYh8DsAkkYnIv4S+CQ+/JfyXWDzkTz8twM+AfxF9ZahMAAkjUpE3ACv+y3Hl4AtMvP71UOmFRF7AEcAV6veMiQGgKTRiIhb0V33u3X1lp47GbhvZv68esi0ImI/4F347o4VMwAkjUJE3JPuK/+/q97Sc0fQ/cz/nOoh04qIFwIH47s7VsUAkDR4k5//et1vaYcCu2bm+dVDphERl4uI1wHPq94yZAaApEGLiEfRXffz57+Le2Vm7p2Z66qHTCMirgi8G3hy9ZahMwAkDVZEPBN4O76leSn/nJn/VD1iWhFxdeCjwO7VW8bAABARsWNEXKN6h7Rc0flP4JX489/FrAMem5n/WT1kWhu8tXPb6i1jYQA0LiL2pntR0DFGgIYgIq4AvA0Y/Fe0c3Y+8NDM/O/qIdOKiOvTvXPhntVbxsQAaNjk4f8Wuq+gtgA+HhF/VrtK2rSIuBpdsO5VvaXnzgG2y8yPVA+ZVkTcDDgVuE31lrExABp1qYf/gs3pvhNgBKh3NvgW8PbVW3ruF8CWmXli9ZBpRcSdgVOAG1VvGSMDoEGbePgv2By/E6Ce2eC63z9Ub+m5M+mu+51ePWRaEbElcAJwneIpo2UANGaJh/+Ce2EEqCe87rdsX6O76/+d6iHTioidgGOAP6/eMmYGQEOW+fBfcC/gWCNAlSbX/U7B635LOQ24T2b+tHrItCLiMcAHgatUbxk7A6ARK3z4L/gHugiwwrXmImJ7uut+f1m9peeOAbbOzN9WD5lWRPwT8N/A5au3tMAAaMAqH/4LjACtuYjYC3+723K8G3hIZp5XPWRaEfFyYPD3CobEABi5KR/+C+6JEaA1EhHPonufv9f9FncQ8KjMvKh6yDQi4vIR8VbggOotrTEARmxGD/8F9wSOMwI0L5Prfq8EXoHX/Zby3Mx8amZm9ZBpRMSVgcOAvau3tMgAGKkZP/wX3IMuAq45w48pLVz3ezvwzOotPbce2CczX1w9ZFqTFxgfA+xcvaVVBsAIzenhv+AedD8OMAI0E5PrfkcCj6re0nMXArtn5hurh0wrIq4NnAhsVTylaQbAyMz54b/A7wRoJibX/T4FbFe9pefOBXbIzMOqh0wrIm5E99bOO1dvaZ0BMCJr9PBfcHeMAE0hIv6O7kHgL3hZ3K+B+2XmJ6uHTCsibk131//m1VtkAIzGGj/8F9wd+IQRoJWaPAhOA25VvaXnfkR32vdz1UOmFRH3oDvnfP3qLeoYACNQ9PBfcDe6CLhWwefWAEXEP9A9CG5QvaXnvkl32veb1UOmFRHb4FGn3jEABq744b/ACNCyRMQOdL/RzwfB4j5H95X/j6qHTCsidgOOAq5evUV/ygAYsJ48/BfcFSNAi4iIfwQ+gtf9lvJJup/5/7p6yLQiYh/gPcAVq7fosgyAgerZw3+BEaCNmtx4PxSv+y3lMLpX+59bPWRaEfFc4PX4nOkt/8UMUE8f/gvuCnwyIv6ieojqTa77vYruxnsf//faJ2+ke5//hdVDpjH5d34Q8KLqLVqcATAwPX/4L7gL3XcCjICGRcQVgXcAz6jeMgAvzsx9MnN99ZBpTP6dvxPYv3qLlmYADMhAHv4L7oLfCWhWRFyd7rf5PbJ6S88l8NTMfG71kGlNLjp+BNizeouWxwAYiIE9/BfcGSOgORHxV3jdbzkuovttfgdVD5nW5HU/nwC2r96i5TMABmCgD/8FdwY+NTn5qpGLiBvSXfe7R/WWnjsPeEhmvrt6yLQi4nrAycC9qrdoZQyAnhv4w3/Bnei+E2AEjFhE3IbuzOstq7f03G+BrTPzmOoh04qIm9L9O79d9RatnAHQYyN5+C8wAkYsIu6F1/2W46fAfTLztOoh04qIO9I9/G9cvUWrYwD01Mge/gvuhD8OGJ2IeBDd8Rpf67G479Cd9v1a9ZBpRcS96X6d798UT9EUDIAeGunDf8Ed6SLgr6qHaHoR8Wjgw8BVi6f03el0p33PrB4yrYjYETgO8JeADZwB0DMjf/gvMAJGICIOwOt+y3EisGVm/qJ6yLQiYi/gcOAq1Vs0PQOgRxp5+C+4A0bAIE0uvb0aeHn1lgH4CLBdZp5TPWRaEfEM4G0YfKNhAPREYw//BXcAjo+Iv64eouXZ4NLb06u3DMB/Aw/NzPOrh0wrIl4KvIq2/v9p9AyAHoiIe9Dew3/B7em+E2AE9Nzkut+ReOltOf4zMx+bmeuqh0wjIi4XEW8Cnl29RbNnAPRAZn4WOLB6RyEjoOcmP6o5Hnhg9ZaeS+CfMvOfq4dMKyKuBHwAeHz1Fs2HAdATmfl04LXVOwrdHn8c0EsbXPe7e/WWnlsH7J2Zr6weMq2IuAZwNLBr9RbNjwHQI0YAt6OLgGtXD1Fnct3vNLzut5TzgV0y823VQ2bkKOD+1SM0XwZAzxgBRkBfRMTmdNf9rl+9pefOBrbNzCOrh8yQwdcAA6CHjABuixFQanLs5RN43W8pP6d7j//J1UOklTIAesoIMAKqRMRj8Lrfcnyf7rTvl6qHSKthAPSYEcBtgRMi4jrVQ1oREf9C9/71y1dv6bmv0j38z6geIq2WAdBzkwho+S2Ct6H7ToARMEeT636vAV5WvWUATqX7jX5nVQ+RpmEADEBmPg0jwO8EzMnkut+7gKdVbxmAjwFbZ+bvqodI0zIABsII4NZ0EeCvH52hyXW/jwJ7VG8ZgHcBO2XmH6uHSLNgAAyIEcCt6X4cYATMwOTo0vHAttVbBuC1wF6ZeXH1EGlWDICBMQL8TsAsRMSN8Lrfcj0nM5+emVk9RJolA2CAjABuhRGwahFxW7rrfreo3tJz64EnZuZLq4dI82AADJQRcEkEXLd6yJBExBZ01/3+tnpLz10I7JaZb6oeIs2LATBgRoARsBIR8WDgOOBa1Vt67lxg+8z8YPUQaZ4MgIEzArglRsCSImJv4HC87reUXwFbZeanqodI82YAjIARwC2BEyPietVD+iging28Fa/7LeWHwBaZ+fnqIdJaMABGwgjgFnTfCTACJibX/V4L+CK2pX2D7rTvt6qHSGvFABgRI8AIWDC57vdu4KnVWwbgs8C9M/PH1UOktWQAjIwRwC3ofhzQ7KvcI+IawFHAI6q3DMBxwP0z89fVQ6S1ZgCMkBHAzem+E9BcBGxw3W+b6i0D8H5gx8z8Q/UQqYIBMFJGQHsRMLnudypwt+otA/B6YI/MvLB6iFTFABgxI4Cb08iPAyLidnTX/W5evWUAXpSZ+2bm+uohUiUDYOQmEXBQ9Y5CN6OLgOtXD5mXiLg3cDJe91tKAvtn5vOrh0h9YAA0IDOfihEwygiIiIfgdb/luAjYMzMPqR4i9YUB0AgjgL9nZBEQEY8FPgRcpXpLz50HPDgz31s9ROoTA6AhRsAlEXCD6iHTioh/Bd6C1/2W8hu6t/l9vHqI1DcGQGOMgGFHwOS634HAS6q3DMBPgPtk5meqh0h9ZAA0yAjgpgwwAibX/d4DPKV6ywB8m+607/9WD5H6ygBolBFwSQT8XfWQ5Zhc9/sYsHv1lgH4It0v9flB9RCpzwyAhhkBw4iAiLg2cAKwdfWWATgB2DIzf1k9ROo7A6BxRgA3occREBGbAacAd61dMgiHA9tl5u+rh0hDYADICPi/CLhh9ZANRcTt8brfcr0FeHhmXlA9RBoKA0CAEUDPImBy3e8koPlfbbwM/5GZj8/MddVDpCExAHQJI4Ab04MIiIid8LrfciTwzMx8dvUQaYgMAP0JI+CSCLhRxSePiMcBH8Trfku5GHhMZr66eog0VAaALsMIqImAiHgO8Ga87reUPwK7ZObbq4dIQ2YAaKOMADZjjSIgIi4XEQcBL5735xqBs4FtM/Oj1UOkoTMAtElGwCURsNm8PkFEXInuut/+8/ocI/Iz4L6Z+enqIdIYGABa1CQCDq7eUWgz5hQBG1z3223WH3uEvkd32vfL1UOksTAAtKTMfAptR8CNmHEETK77nQg8YFYfc8S+Qvfw/171EGlMDAAtixHAjYCTIuLG036gycc4FbjL1KvG7xS63+j3s+oh0tgYAFo2I4Ab0n0nYNURMLnudypws5mtGq+jgG0y8+zqIdIYGQBaESNg9REQEfcBTsbrfsvxDmDnzPxj9RBprAwArZgRcEkE3GS5fyEidgaOBa45t1Xj8Wrg0Zl5cfUQacwMAK2KEbD8CIiIxwOH4XW/5fjXzHxmZmb1EGnsDACtmhHA37FEBETEvwFvwut+S1kHPD4zX1Y9RGqFAaCpGAGXRMBNN/yHk+t+BwP/XjNrUC6g+1W+b6keIrXEANDUjIA/jYDJdb/3AvuVrhqG3wPbZ+bh1UOk1hgAmgkjgBvQRcCdgKOBhxfvGYJfAltl5vHVQ6QWXaF6gMYjM58SEdDuXfsbAF8AonrIAPyA7j3+364eIrXK7wBopvxOgA//Zfg63WlfH/5SIQNAM2cEaBGfAe6dmT+pHiK1zgDQXBgB2ohjgQdk5m+qh0gyADRHRoA28F5gx8z8Q/UQSR0DQHM1iYBDqneo1CHAnpl5UfUQSf/HANDcZeb+GAGtekFm7u9pX6l/fBug1kRm7j95i6DHcdqwHtg/M19fPUTSxhkAWjNGQDMuAh6Vme+vHiJp0wwArSkjYPT+AOySmcdVD5G0OANAa84IGK3f0N31/2z1EElL80WAKuELA0fnx3QHfnz4SwNhAKiMETAa36I77fv16iGSls8AUCkjYPA+D2yRmT+sHiJpZQwAlTMCBut44H6Z+avqIZJWzgBQLxgBg/Mhuhf8/b56iKTVMQDUG0bAYLwJeHhmXlA9RNLqGQDqFSOg916amU/MzPXVQyRNxzsA6h3vBPRSAs/IzNdWD5E0GwaAeskI6JWLgb0z853VQyTNjgGg3jICeuGPwMMy82PVQyTNlgGgXptEQAD7Vm9p0O+AHTPzlOohkmbPAFDvZeZ+k+8EGAFr5yzggZn5leohkubDdwFoEDJzP+B11TsacQbdaV8f/tKIGQAaDCNgTXyJ7uH//eohkubLANCgGAFzdTKwZWb+vHqIpPkzADQ4RsBcHAlsm5lnVw+RtDYMAA2SETBTbwN2yczzq4dIWjsGgAbLCJiJV9Ed+VlXPUTS2jIANGhGwFT+JTOflZlZPUTS2vMOgAbPOwErtg54Yma+tXqIpDoGgEbBCFi2C4DdM/Mj1UMk1TIANBpGwJLOAR6SmSdWD5FUzwDQqBgBm/QLYLvM/GL1EEn94IwjvAAABmFJREFU4IsANTq+MPAyzgS28OEvaUMGgEbJCLjE1+hO+36neoikfjEANFpGAP8D3Cczf1o9RFL/GAAatUkEvL56R4FjgAdk5m+rh0jqJwNAo5eZ+9JWBLyH7tX+51UPkdRfBoCa0FAEHAw8MjMvqh4iqd8MADWjgQh4XmY+xdO+kpbDOwBqSmbuO7kT8OTqLTO0HtgvM99QPUTScBgAas7IIuBC4FGZ+YHqIZKGxQBQk0YSAecCu2TmJ6qHSBoeA0DNGngE/BrYPjP/X/UQScPkiwDVtIG+MPBHwL19+EuahgGg5g0sAr5Jd9r3G9VDJA2bASB1hnAx8HN0X/n/qHqIpOEzACRg8t75PkfAJ4H7ZeavqodIGgcDQJrocQQcBuyQmedWD5E0HgaAtIEeRsB/Abtn5oXVQySNiwEgXUqPIuDFmfmkzFxfvEPSCHkHQNqIzMyI2G/yH9f6TkACT8/MA9f480pqiAEgbcIGERDAPmv0aS8GHp2Z716jzyepUQaAtIhJBOw7+Y/zjoDzgIdl5tFz/jySZABIS1mjCPgt8KDMPG1OH1+S/oQBIC3DnCPgLGCbzPzajD+uJG2S7wKQlmny7oB9gTfM8MN+l+60rw9/SWvKAJBWYMYRcDrdw//7M/hYkrQiBoC0QjOKgJOALTPzF7NZJUkrYwBIqzBlBBwBPDAzz5ntKklaPgNAWqVVRsChwK6Zef58VknS8hgA0hRWGAGvyMy9M3PdnGdJ0pIMAGlKy4yAAzLzgDWaJElL8g6ANAOL3AlYBzw+Mw8tmCVJm2QASDOykQg4n+5X+R5ROEuSNsoAkGZogwg4D/hoZp5UvUmSNsYAkGZs8pqAZ1XvkKTF+CJASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAZdoXrADNwgIp5WPUKSRuRq1QM0fwFk9QhJkmboW5l5y+oRfeePACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBhkAkiQ1yACQJKlBVwB2rh4hSdIM/b56wBBEZlZvkCRJa8wfAUiS1CADQJKkBhkAkiQ1yACQJKlBBoAkSQ0yACRJapABIElSgwwASZIaZABIktQgA0CSpAYZAJIkNcgAkCSpQQaAJEkNMgAkSWqQASBJUoMMAEmSGmQASJLUIANAkqQGGQCSJDXIAJAkqUEGgCRJDTIAJElqkAEgSVKDDABJkhpkAEiS1CADQJKkBv1/W+egEDHxZx0AAAAASUVORK5CYII=",_unchecked_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAACXBIWXMAAA/XAAAP1wHWM14/AAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDYwLCAyMDIwLzA1LzEyLTE2OjA0OjE3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIxLTAzLTMwVDE5OjA2OjQzKzA5OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMS0wMy0zMFQxOTowNzozMCswOTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMS0wMy0zMFQxOTowNzozMCswOTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1ZmUyOTFjMy1iNTM0LTIwNGMtODYyNC0wMTE3MmEzYjJhZTMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NWZlMjkxYzMtYjUzNC0yMDRjLTg2MjQtMDExNzJhM2IyYWUzIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6NWZlMjkxYzMtYjUzNC0yMDRjLTg2MjQtMDExNzJhM2IyYWUzIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo1ZmUyOTFjMy1iNTM0LTIwNGMtODYyNC0wMTE3MmEzYjJhZTMiIHN0RXZ0OndoZW49IjIwMjEtMDMtMzBUMTk6MDY6NDMrMDk6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMS4yIChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7vzoxhAAAOmElEQVR4nO3d3+v2d0HH8dd7u9fWXKkD++Eii7DsF4QdFBvVrHApZUoHri2CgiBnRgQdhVEnUUEHY2FiURGRkVMcTHIOm2ZBsHL9PMicSgc21y83JbzV7d3B9ZXcD+/d9319v/f7e31ej8df8Dr7PK/r+rzf15hzBgDoctnqAQDApScAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACo0kv7Z6BACb8ViS2+ecD68ewrmNJHP1CAA24WySH5tz3rl6CM/szOoBAGzCo0leOee8b/UQzo8AAGBfH0vysjnnA6uHcP4EAAD7eDDJTXPOB1cP4cI4BQDAxXogyQ0e/odJAABwMe5LcuOc82Orh3BxBAAAF+rO7H7zf3T1EC6eAADgQvx2klfPOc+uHsJ+BAAA5+uX55y3zTkfXz2E/TkFAMAzeTzJa+ecb1w9hOMjAAA4l7NJbp1zvnX1EI6XAADgC3k0yQ/POd+zegjHTwAA8HQeyu5N/79bPYSTIQAAeLIHk7x0zvmh1UM4OU4BAPD53p/keg//7RMAAHzOn2d3u9/Dq4dw8gQAAEnylux+8//E6iFcGgIAgDckuXnO+enVQ7h0BABAt1+ac77W7X59nAIA6PR4ktfMOd+0eghrCACAPmeT3DLnfNvqIawjAAC6PJLd7X7vXT2EtQQAQI+HkvzAnPPvVw9hPQEA0OGD2d3u9+HVQzgdnAIA2L6/TXKDhz+fTwAAbNu7k7zE7X48mQAA2K4/TfJyt/vxdAQAwDb9VpIfdbsfX4gAANie1885X+d2P87FKQCA7Xgsu9v9fmf1EE4/AQCwDZ/K7iv/t68ewmEQAACH75Ekr5hz/sXqIRwOAQBw2P49u9v9/mH1EA6LAAA4XP+a3e1+H1k9hMPjFADAYfqb7G73+8jqIRwmAQBweO7N7na//1g9hMMlAAAOy58k+cE55ydXD+GwCQCAw3FHklvc7sdxEAAAh+EX55w/O+ecq4ewDU4BAJxujyX56Tnn764ewrYIAIDT61NJbp5z3rV6CNsjAABOp49nd7vf+1YPYZsEAMDp89Hsbvf7x9VD2C4BAHC6fCDJTS744aQ5BQBwetwft/txiQgAgNPhXUm+d875n6uH0EEAAKz35rjdj0tMAACsdXuSW+ecn1k9hC5beAnwgSS3rR4BcBE+Ped8/+oRdNpCADw65/zr1SMA4JD4CQAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAAA4pzHGWL2B43dm9QAATqfPPfjnnHP1Fo6fbwAAeIoxxpXzyOotnAwBAMATjDGePec8u3oHJ0sAAJAkGWNcPsZ4/pzzkdVbOHkCAICMMa5K8tVzzo+u3rKvMcZzVm84BAIAoNwY47lJnj/n/PDqLfsaY3xLkreu3nEInAIANmmMMbzAdm5Hb/lfl+SyOeeHVu/Z1xjj+iR3J3l49ZZD4BsAYHPGGFcned7qHQfgG5J8ds75b6uH7GuM8bIk9yZ57uoth0IAAJty9Kn2hUm+dPWW02rsvDjJw3POh1bv2dcY45YkdyW5evWWQyIAgE05+tr/n5N8fPGUU2mMcVmSG5J8YM7536v37GuM8TNJ/ijJFau3HBoBAGzOnPOzSf7r6GHHkTHGmSTfn+T+OecnV+/Z1xjjV5LckcRVxRfBS4DAJh19E+AlwCNHx/xuTHLvnPOxxXP2chR2dyS5bfWWQyYAADZujPHFSb57zvnO1Vv2Nca4IskfJrl59ZZDJwAANmyMcU2Sb59z3rN6y77GGM/K7oz/Tau3bIEAANioowfmN84537t6y77GGNcmeUeS71y9ZSsEAMAGHX3y/5o55/2rt+xrjHFdknuSfPPqLVsiAAA25uiFv6+Yc/7T6i37GmO8MLsLfl6wesvWOCIDsCFHL8ldO+f84Oot+zq6rOgv4+F/IgQAwEaMMS5Pcs1G/tHvxiT3JfmytUu2SwAAbMDR2fgr55z/s3rLvsYYr0zyZ3Gd84kSAAAH7uj/Dy6fc/7v6i37GmP8RJI7k1y1esvWCQCAwzfmnJ9ZPWJfY4xfSPJ7SS5fvaWBAAA4cHPOx1dv2NcY49eT/MbqHU0cAwRgmaMXF9+U5CdXb2kjAABYYoxxZZI3J3nV6i2NBAAAl9wY40uS3JXkJau3tBIAAFxSY4znJXlnkhev3tJMAABwyYwxXpDkXUm+fvWWdk4BAHBJjDG+KclfxcP/VBAAAJy4McZ3JHlfkutWb2FHAABwosYYL03y7iTXrt7C/xMAAJyYMcark9yd5Fmrt/BEAgCAEzHGeE2SP05yxeotPJUAAODYjTFen+QN8Zw5tRwDBODYHP0z4e1JXrd6C+cmAAA4FmOMK5L8fpJbV2/hmQkAAPY2xrg6yVuSvHz1Fs6PAABgL2OM5yR5R5LrF0/hAggAAC7aGOMrk9yT5FtXb+HCCAAALsoY4+uS3Jvka1dv4cI5ngHABRtjfFt29/p7+B8oAQDABRljfFeS9yT58sVT2IMAAOC8jTF+KLu/83326i3sRwAAcF7GGD+e5G1Jrlq9hf0JAACe0Rjj55P8Qbw8vhkCAIBzGmP8apLfTDJWb+H4KDkAntYY47Ikb0zyU6u3cPwEAABPMcb4ouz+yvdHVm/hZAgAAJ5gjHFNkrcn+b7FUzhBAgCAJ7s7yfesHsHJ8hIgAE/2otUDOHkCAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACp1ZPeAYfNUY4+dWjwDYkKtXD+DkjSRz9QgAOEb/Mud80eoRp52fAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACp1J8qrVIwDgGH1i9YBDMOacqzcAAJeYnwAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBCAgAACgkAACgkAACgkAAAgEICAAAKCQAAKCQAAKCQAACAQgIAAAoJAAAoJAAAoJAAAIBC/wcVCcUnTpFFpAAAAABJRU5ErkJggg==",_empty_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAACXBIWXMAAA/XAAAP1wHWM14/AAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDYwLCAyMDIwLzA1LzEyLTE2OjA0OjE3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMiAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIxLTAzLTMwVDE5OjA2OjQzKzA5OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMS0wMy0zMFQxOTowOTowNCswOTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMS0wMy0zMFQxOTowOTowNCswOTowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpiMzI0ZTM5OS1iZmU1LTA5NDAtOGFjOS1hYzc2YWZmYTU0NWUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6YjMyNGUzOTktYmZlNS0wOTQwLThhYzktYWM3NmFmZmE1NDVlIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6YjMyNGUzOTktYmZlNS0wOTQwLThhYzktYWM3NmFmZmE1NDVlIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpiMzI0ZTM5OS1iZmU1LTA5NDAtOGFjOS1hYzc2YWZmYTU0NWUiIHN0RXZ0OndoZW49IjIwMjEtMDMtMzBUMTk6MDY6NDMrMDk6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyMS4yIChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7jm/kdAAAVl0lEQVR4nO3dvY8l2VkH4LfnYwdsvDK7CBBgI2PYtu8KAYYAZAnWJBCtWJGQkRghUgKEhEREAEgkgLBwiMgcICQSCBD4T7Dlwhe0AsmkuzIIix0vM03Q0zs9PdPd9+PU+XqfJ117uvreqvP7nbfq3j45OzsLACCXO60PAACoTwEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgIQUAABISAEAgITubZflrPVBADCdk5Y//HSzafnjh2ACAEBpTcOf3SgAAJQk/AehAABQivAfiAIAQAnCfzAKAADHEv4DUgAAOIbwH5QCAMChhP/AFAAADiH8B3ev9QEAMBTBPwkTAAB2JfwnogAAsAvhPxkFAIDbCP8JKQAA3ET4T0oBAOA6wn9iCgAALyL8J6cAAHDV0OF/utm0PoQhKAAAXCb8k1AAALgg/BPxTYAADB38EcL/ECYAALkJ/6RMAADyGjr8Bf9xTAAAchL+ySkAAPkIfxQAgGSEPxHhGQCATIYNf8FfngkAQA7Cn2coAADzE/48RwEAmJvw54U8AwAwJ8HPjUwAAOYzbPhTjwkAwFyGDX87/7pMAADmIfzZmQIAMAfhz14UAIDxCX/2pgAAjE34cxAFAGBcwp+DKQAAYxL+HEUBABiP8OdovgcAYBzDBn+E8O+NCQDAGIQ/RSkAAP0T/hSnAAD0TfizCgUAoF/Cn9UoAAB9Ev6sSgEA6I/wZ3UKAEBfhD9VKAAA/RD+VOOLgAD6MGz4C/4xKQAAbQ0b/BHCf2SzFIChLyCAEQn/sXkGAIC9Cf/xKQAA7EX4z0EBAGBnwn8eszwDAMCKBP98TAAAICETAACuZec/LxMAAF5I+M9NAQDgOcJ/fgoAAM8Q/jkoAAB8QPjn4SFAAAR/QiYAAMkJ/5xMAACSEvy5KQAwsdsW+O2yVDoSeiP8UQBgAhZz9uF8IUIBgCFYsCnBecRlCgB0xALNWpxbXKUAAExM8HMdBQAqshhTk/ONmygAkNjlgPCJgHkIfnahAMABZlxgZ/yd9jFLAcr+PrI7BQBuYUGd2yzBH+FcZT8KAOlZNJmB85h9KQCkYYHkMjt/svPHgAAGJvw5lAkAw7HgcYiZdvwRrgOOpwDQNYscPM91QQkKAF2woMFuXCuUogBQhUWLFoz94XoKAEVZoGAdri1KUwA4mAWJ3sy247/gWmMNCgC3svhAG6491qQAYJGBDrkuWZsCkICFhNnNNvp3zVKDAtCQixy4zJpATQoA0L3ZdvgvIvypTQEAaEjw04o/BgTQiPCnJQUAoAHhT2sKAEBlwp8eeAYAoBLBT09MAAAqEP70RgEAWJnwryvDx0ZLcAsA6NboC7ngr2/0c6YmEwCAFQj/+oT/fkwAgO6MvpAL//pGP2daMAEAKEj41yf8D2MCADQ3ywIu/Oub5dxpwQQAoADhX5/wP44JAMABBH5bwv94CgDAjoR+e4K/HAUAaGaExVzo92OE82UkngEAuIbw74fwL88EAKiu98Vc8Pej93NlZCYAAJcI/34I/3WZAACrGW0BF/79GO3cGZEJAEAI/54I/zpMAIDUBH8/BH9dJgBAWsK/H8K/PhMA4CijLtzCvw+jnj8zMAEA0hH+fRD+bSkAQCrCvw/Cvz23AICDjLiAC//2RjxvZqUAADsbefEW/u2NfP7MyC0AYHrCvz3h3x8TAIpxgd9MCLXhdW/LutAvBYCjucB3c/l16jmUvJ+U4lzqmwLAQVzYjKDnojU7a0T/FAB25oIu5+K1FFDr8dq2YZ0YhwIwKBcZXE/4t2FdGosCMBgX2FxaTAJmP4eEf32zn1OzUgASuGlBdOEyE+FfnzVkXArAAA65wHZdCK/+71zMjEr412e9GJsCMJljF8GL/78Lu67tsgiwI3jt6rI+zEEB6Ng+F1npBfB0s3GRT2D291Dw1zf7OZWJAjC4NRdA0wB6Iuzbsg7MRwHo1C4XW60F0TSgjl1uA2R6HwR+PzKdd5koAIOqvTgqAdQg9Pvimp+bAjCg3hbJXY7HQrKbzA8DZv29e+R6zUEB6MxtF17LRfLyFGDf4/A8AdcR/H2Z5Bo9i4iT1gfROwVgID0slKU+ZhgxzULDEXo4p3lqkmvyrPUBjOJO6wPgqZsuvhkXyhl/pxImWYRv5f3vx3ZZTiY574T/HkwAGprkgjuKhwuv53Whhu2y3I2IR62PowDhvycTgAHMvlOa/fc7xOzh7z3vw3ZZXg7hn5YC0LksC2WW3xPvdQ+ejPw/FRH/3fpYChD+B1IAOpZtocz2+0IL22W5FxFvRsTXWx9LAcL/CApAp4QhUNp2Wb4rIn43Iv629bEc6SyE/9EUALqi+MzN+9vOdlk+GRH/ExF/0PpYjiT4C/EpgA5ZJIFStstyJyJ+PiL+qfGhlCD8CzIBAJjUdlm+MyJ+M4Q/L6AAdMbu32sAx3rylP8PRMQfRcQXWh9PAcJ/BW4BdETwMTPndx3bZTmJiJ+J83v9v9T4cEoQ/isxAQCYxJNv9fu1iPirEP7cQgHohN3Rs7we85n92w1b2y7LhyPi9yPizyPi040PpwThvzK3AAAGt12W742IP4mIX42IDzU+nBKEfwUKQAfsdoFDbZflE3H+oN8vRsRLjQ+nBOFfiQLQmPAHDvHkYb/XI+JP4/xz/jOs58K/Is8A0CX3i+fkfS3qMxHxxRD+HGiGk2ZYdv/Avp7s/H82Iv4szkvA6Bs5wd+IAgAwiCfh/9k4v+f/440PpwTh39DozXFYdv9k5TbAYZ6E/y+E8KcQBYDuCIg+nW42xYqr9/ggPxcRfxHCn0LcAmjA7p/e3XSOvui/CfR1bZflNM7v+c+weAj/TigAwAcOLacX/79di4ASvLvtsnwkIv4wIn669bEUIPw74hYAXbGTbKPUeF+wl/Xkvv+vR8RbrY+lAOHfGROAyiyQ1xP+9a1xPt42DXAN7OVH4/y7/Ucn/DtkAgCs4pqgP6l9HKPaLstLEfFvrY+jAOHfKQUAEir5RP9tP+eS7z7dbITBDp6M/r/d+jgK8H53TAGoyOjzesb/9TQ6Dz8aEd9s8YMHNUNwzvA7TM0zAHThcigpA+toVUCf/NxvNvnhA5rg/Bf8g1AA6M7VoJpgQWzO9GkME5zrwn8gCgDd2/cz5jwl+Mcxwfkt/AfjGYBKLMTH8xrux+s1DuFPCwpAJRNc4F2o9fT6yLxGY5lgbRD+g1IAKrEgU4PzjMqE/8AUAIYk6J7nNRnLdllG3/0L/8EpAAxL4J0z8h/P4MEfIfynoAAwtOzBl/33H5HwpxcKAAxK+I9H+NMTBYDhZQtCI/8xCX96owBUMsHFTwcE/3gmeNgvQvhPyTcBwiCE/3gEPz0zAWAKs4fj7L8fXRL+k1MAoHPCf0yD7/6FfwIKQEWDLwg0IPyBtSgA0CnhPy5lnxF4CBA6I/iBGkwAKrMz4CbCf3yucUahAEAnhP/4hD8jUQAasEhwlfAHavMMAOlcDtseypjwn0MP5xLsQwFoZLssFv5Kbnqdr/632ou4c2AOwp8RKQANKQHlvGgBPuS1rTkd8N7PQfgzKs8ANGbxWEeJcF0zoIU/0JoJAFMpHawX/17Joib856HAMzITgA5M8udCm7l47UbYsQv/ebhmGd3J17/2tRn+6MNJ6wMoSUj065hF3/s6jwThP3wunG42U+XCGkwAoALhP48E4U8SCkCH3BLo17GfLADohQLQsYsioAz0ZZ9AF/5zcS0yE58CGMTVheeGL7C5f7rZvF/nqLiJ8J+L8Gc2CsCgbliM3t8uy8npZjP8Qzw9O91sbgwE4Q/0zi2AOQn/hoT/fOz+mZECAAUJ//n0Hv6nm43zjoMoAJPqfdGCEfR8HQl+jqUAwIGuLr4W47n0HP5QgocAoQDhTw3OM0oyAZiYHUwdFuX5jHbtjHa89EEBmJyFYV3Cfz49XjPu97MGBSCBHhc0ANpSAJJQAuB2vV0ndv6sSQEAiP7CH9bmUwCJXCxwdhTwrN7C3zVKDQpAQooAPNVT+LsmqcktgMR6WvgAqEsBSE4JILNezv9jHvbr5XdgPAoAkJLgJDvPABDbZXHvkVR6CH/XHK2ZABARfSyIUINzHc6ZAABp9BD+dv70wgSAD/SwOAJQhwLAM5QAZtX63Pa1vvRGAeA5rRdKKK3lOS346ZUCwAspAczCuQwvpgBwLQsno7Pzh+spANxICQCYk48BAlNqVV7t+hmFCQC3MgUAmI8JADCd2qXVrp8RmQCwE1MARlHzXPWgHyNTAAAgIQWAnZkC0DvnKOxOAWAvFlh65dyE/XgIkL1tl8V9T7pSK/yd98zEBCCZUguY3Ra9WPtcvHjQT/gzGwUgoVKLmRJAa9nPwey/P8dxCyCJtXYvFwuQ3RG11dj5w8wUgInVXMA8F0ANdrxQjgKQ2NXAPnZxPXQasF2Wk4i4d7rZvH/UATAtwQ/lKQA3sKM9zIsW68uv5UXgR8RHIuJjEfHpiPjWdln+7nSzOat0mHTKH/GBOhQAPnCxAK6xAF/8m2dnZ791cnLyckR8f0R8PCJ+OCJejYh/jIi/j4hvF//hDMNOH+pRAKjq5OTkC48fP37nzp07DyLipYi4GxFnEfGpiPi+iPhGy+OjnRbhb9dPZj4GyHPW/szznTt3Xn348OH9iLgf5+fg3Yj4oYj4zGo/lK7Z+UN9CgBNPHjw4ME77777X2dnH9zyfzUi3tguy/2Gh0UDrXb+dv9kpwBwrbUXyVdfeeWjy7L8++PHjyMiviMiPhsRP7baDyQ9wQ9PKQA09frrr//IP3/5y1959OjR3Yj4ZET8ynZZPJuSwHZZjP6hIQWAW629a/rcG2/8xNtvv/2NiHg5It6MiJ9c7YfRBcEP7SkAdOG11177+KNHj07i/DsBPr9dlldaHxPrEP7QB6NWdnbly3yK//t37969FxGPI+KXI+JftsvyxdPN5n+L/yBScK8fbmYCQG/uRMQPRsRvRMRb22V50Ph4KKjG7t+DfrAbBYCDrLzI3o+I04j47Yh4c7ssH1rrB1GP0T/0xS0AjrLi1wffj/OvBf69iHhluyxfOt1s3i39Q6ij1s4f2J0CQM9eioj3I+J3IuIT22X564j419PNxt8LADiSAkARK08CHsf5MwE/FRFf2i7LP0TEf55uNo9L/zDKWnvnb9cPh1MAGMGdOP+DQZ+L848Jfiwi/jgivtXyoGhH8MPxFIAbbJfFQrOnFT8qeBLnJeB7IuLDEfF/Jf9xyvPQH/RNAWA1K9wWOImIdyLiP+L82QA6tVb4K+RQjgLAaF6NiLfifBpAh0qHv9CHdSgArK7UJOBSEPzNcUfEWoz9YRy+CIhq7OTmtkb4O2dgPQoAcDQ7fxiPAgAcRfjDmBQA4GDCH8blIcBb+C6Ask43G6ExiRLvo2sL2jEBAICEFACq8/fax2eKA+NTAHZgsYNz22VxPcAkFAAASEgBoBm3AcZi598X7wfH8ikA4FYFv8YZ6IQJAE0Jhv7ZacKcFADgWsIf5qUAAC8k/GFungGgOd8O2B/f8gfzMwEAnqGMQQ4KAF3w7YB9EP6QhwIARITwh2wUgB1ZHJmZ8xvyUQDoilsB9Ql/yEkBgMSEP+SlANAlU4D1Cf8x+YuMlKIAQEICBFAA6JbnAdYh/IEIBWAvFk5GVnN0rLhB/3wVMN0TJgDlmQBAAqZXwFUKAExO+AMvogDAxIQ/cB0FYE8WVEbQ8rPintmAMSgAMBklFdiFAgATEf7ArnwMECbROvyN/tfX+j1mLiYAMAHBAOzLBAAG1kvw2/3DeEwAYFC9hD8wJhMAGIzgB0owAYCB9Bj+xv8wJgUABtFj+APjcgsABtBj+Nv5w9hMAKBzPYY/9TkPKM0EADrV84Jv9w/jMwGADvUc/sAcFADojPAHanALADoxQvAb/cM8TACgAyOEPzAXEwDogJ01UJsJAAAkpAAAdM4tItagAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACTkjwExLF+PWp4/SgR5KACA4IeE3AIAgIRMACAxO3/ISwFgWMeEl+cHgOwUAEjIzh/wDAAAJGQCAEnY9QOXKQCkJAyB7NwCAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAICEFAAASEgBAOjYdllaHwKTUgAAICEFAAASutf6AABqMU6HpxQAYEjCHI6jAADdEe6wPgUAqEKoQ18UAKAIAQ9jUQCAZwhyyEEBgASEOnCVAgADEujAsRQAaECAA60pAHANIQ3MTAFgWgIc4HoKAMMQ6ADlKAB0Q8AD1KMAsCqhDtAnfw4YABIyAeAodvgAY1IAuJZwB5iXApCYgAfISwGYgCAHYF8KwAAEPAClKQCNCXcAWlAAKhL2APRCAViZ0AegRwrAnk43m2v/m7AHYBQKwJGEPgAjUgD2JPABmIG/BQAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACSkAAJCQAgAACd1rfQCFnLU+AAAYiQkAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAABAQgoAACSkAAAwlYcPH561PoYRKAAATOO999575ytf/epftj6OEZycnSlKAJCNCQAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBCCgAAJKQAAEBC/w+cQjvNwRAEYgAAAABJRU5ErkJggg==";class PdfCheckElement extends PdfElement{constructor(e,t,r){super(e,t),this._model=r}_build(e,t){}_doWrite(e,t){const r=e.getBounds(t),i=this._model.getChecked(this._model.checked),s="0"===i?_unchecked_:"-1"===i?_empty_:_checked_;e.image(t,s,r)}}class PdfDBoxElement extends PdfElement{constructor(e,t){super(e,t)}_build(e,t){}_doWrite(e,t){const r=e.getModel(t),i=e.getBounds(t);r.reversed?e.dline(t,i.x+i.width,i.y,i.x,i.y+i.height):e.dline(t,i.x,i.y,i.x+i.width,i.y+i.height)}}class PdfImageElement extends PdfElement{constructor(e,t){super(e,t)}_build(e,t){const r=getComputedStyle(t),i=Utils.getImageUrl(r);i.startsWith("data:image")?this._data=i:i.startsWith("http")&&e.addImage(this._url=i,r.opacity)}_doWrite(e,t){const r=this._data||e.getImage(this._url);if(r){const i=e.getBounds(t);e.image(t,r,i)}}}class PdfSvgElement extends PdfElement{constructor(e,t,r,i=!1){super(e,t||e.getParent(r)),this._svg=r,this._hidden=i}_build(e,t){}_doWrite(e,t){e.save();const r=e.getBounds(t);if(this._hidden){const i=t.getBoundingClientRect(),s=this._svg.getBBox(),A=i.width/s.width,n=i.height/s.height,o=Math.min(A,n),a=(i.width-s.width*o)/2*pxpt,l=(i.height-s.height*o)/2*pxpt;e.translate(r.x+a,r.y+l),e.scale(o,o)}else e.translate(r.x,r.y);this.$_write(e,this._svg),e.restore()}$_write(e,t){const r=t.children;for(let t=0;t<r.length;t++){const i=r[t];if(i instanceof SVGGraphicsElement){e.save();const t=i.transform.baseVal,r=t.length>0?t.getItem(0):null;r&&e.transformSvg(r.matrix),"g"===i.tagName?this.$_write(e,i):i instanceof SVGTextElement?this.$_text(e,i):i instanceof SVGPathElement?this.$_path(e,i):i instanceof SVGRectElement?this.$_rect(e,i):i instanceof SVGLineElement?this.$_line(e,i):i instanceof SVGPolygonElement&&this.$_polygon(e,i),e.restore()}}}$_rotation(e){const t=e.split("(")[1].split(")")[0].split(","),r=+t[0],i=+t[1];return Math.round(Math.atan2(i,r)*(180/Math.PI))}$_text(e,t){const r=t.textContent;if(r){const i=getComputedStyle(t),s=e.getBox(t),A={},n=i.transform&&i.transform.startsWith("matrix(")&&this.$_rotation(i.transform)||0;e.text(i,s,r,n,A)}}$_path(e,t){const r=t.getAttribute("d");if(r){const i=getComputedStyle(t);e.scale(pxpt,pxpt),e.path(i,r)}}$_rect(e,t){const r=e.getBox(t),i=getComputedStyle(t);e.rect(i,r,!0)}$_line(e,t){}$_polygon(e,t){const r=getComputedStyle(t),i=t.points,s=[];e.scale(pxpt,pxpt);for(let e=0;e<i.length;e++){const t=i.getItem(e);s.push([t.x,t.y])}e.polygon(r,s)}}class PdfTableCellElement extends PdfBoundedElement{_needClip(){return!0}}class PdfTableElement extends PdfElement{constructor(e,t){super(e,t)}_doWrite(e,t){const r=e.getBounds(t);e.getModel(t);const i=getComputedStyle(t);e.border(i,r);const s=t.rows;for(let t=0;t<s.length;t++)this.$_writeRow(e,s[t])}$_writeRow(e,t){const r=e.getBounds(t),i=t.cells,s=getComputedStyle(t);e.rect(t,r),e.border(s,r);for(let t=0;t<i.length;t++)this.$_writeCell(e,i[t])}$_writeCell(e,t){const r=getComputedStyle(t);if("none"!==r.display){const i=e.getBounds(t);e.rect(t,i),e.border(r,i)}}}class PdfExporter extends Base{constructor(){super(),this._elementCreator=(e,t,r)=>{let i;if(t instanceof ImageItem)r.style.opacity=t.styles.opcaity,i=new PdfImageElement(e,r);else if(t instanceof SvgItem){const t=r._svg_;r.innerHTML=t.substring(t.indexOf("<svg")),this._svgs.push(r);const s=r.firstElementChild;s.style.visibility="hidden",i=new PdfSvgElement(e,r,s,!0)}else r instanceof HTMLSpanElement?i=t instanceof CheckItem?new PdfCheckElement(e,r,t):t instanceof BarItem?new PdfBarElement(e,r,t):t instanceof DiagonalBoxContainer?new PdfDBoxElement(e,r):new PdfElement(e,r):r instanceof HTMLTableElement?i=new PdfTableElement(e,r):r instanceof HTMLTableCellElement?i=new PdfTableCellElement(e,r):r instanceof SVGSVGElement?i=new PdfSvgElement(e,null,r):r instanceof HTMLCanvasElement?i=new PdfCanvasElement(e,r):r instanceof HTMLElement&&(i=new PdfElement(e,r));return i}}_doDispose(){super._doDispose()}_base64ToArrayBuffer(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=t.charCodeAt(s);return i.buffer}export(e,t,r,i,s){const A=()=>{n.canExport()||n.prepare(o)?this.$_export(e,n,r,i,s):setTimeout((()=>{A()}),300)};this._svgs=[];const n=new PdfModel(e,t,this._elementCreator),o=5;A()}$_export(e,t,r,i,s){const A=new window.PDFDocument({size:e.paper.size,layout:e.paper.orientation}),n=A.pipe(i||new window.blobStream);let o,a;if(!(r&&r.length>0))throw new Error("Pdf 출력용 폰트가 설정돼야 합니다.");for(let e of r)e.content&&A.registerFont(e.name,this._base64ToArrayBuffer(e.content));o=r[0].name,a=r[1].name||o,t.write(A,o,a);for(let e of this._svgs)e.removeChild(e.firstElementChild);A.end(),i?null==s||s(i):n.on("finish",(function(){const t=n.toBlob("application/pdf");let r=document.createElement("a"),i=window.URL.createObjectURL(t);document.body.appendChild(r),r.href=i,r.download=(e.info.name||"rrpt")+".pdf",r.style.position="fixed",r.target="_blank",r.click(),document.body.removeChild(r)}))}}var REPORT_OPTIONS={zoom:1},ReportViewer=function(e){function t(t,r,i,s){void 0===s&&(s=REPORT_OPTIONS);var A=e.call(this)||this;return t||error$1(213,!0),A._container=new PrintContainer(t),A._container&&(A._container.zoom=s.zoom,A.reportSource=r,A.dataSet=i),A}return __extends$1(t,e),Object.defineProperty(t.prototype,"zoom",{get:function(){return this._container.zoom},set:function(e){this._container.zoom=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCount",{get:function(){return this._container.pageCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this._container.page},set:function(e){e!==this._container.page&&(this._container.page=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reportSource",{get:function(){return this._reportSource},set:function(e){this._report&&(this._report=null),this._reportSource=e,this._report=(new Report).load(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataSet",{get:function(){return this._dataSet},set:function(e){this._reportData&&(this._reportData=null),this._dataSet=e,this._reportData=(new ReportDataProvider).load(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reportHtml",{get:function(){return this._checkReport(),this._container.getPrintHtml()},enumerable:!1,configurable:!0}),t.prototype.preview=function(){var e;this._checkReport(),null===(e=this._container)||void 0===e||e.print(this._report,this._reportData,!0)},t.prototype.getHtml=function(){return this._checkReport(),this._container.getPrintHtml()},t.prototype.first=function(){this._checkPrintContainer(),this._container.page=0},t.prototype.prev=function(){this._checkPrintContainer(),this._container.page--},t.prototype.next=function(){this._checkPrintContainer(),this._container.page++},t.prototype.last=function(){this._checkPrintContainer(),this._container.page=this._container.pageCount-1},t.prototype.zoomIn=function(e){void 0===e&&(e=.1),this._checkPrintContainer(),this._container.zoom+=e},t.prototype.zoomOut=function(e){void 0===e&&(e=.1),this._checkPrintContainer(),this._container.zoom-=e},t.prototype.fitToHeight=function(){this._checkPrintContainer(),this._container.fitToHeight()},t.prototype.fitToPage=function(){this._checkPrintContainer(),this._container.fitToPage()},t.prototype.fitToWidth=function(){this._checkPrintContainer(),this._container.fitToWidth()},t.prototype.exportPdf=function(e){this._checkPrintContainer(),(new PdfExporter).export(this._report,this._container.pages,e)},t.prototype.exportImage=function(e){void 0===e&&(e={type:"png"}),this._checkPrintContainer(),(new ImageExporter).export(this._report,this._container.pages,e)},t.prototype.exportDocument=function(e){void 0===e&&(e={type:"hwp"}),this._checkPrintContainer(),(new DocumentExporter).export(this._report,this._container.pages,e)},t.prototype._checkPrintContainer=function(){this._container.pages||error$1(217,!0,"Page does not exist in the viewer")},t.prototype._checkReport=function(){this._report||error$1(216,!0,"RealReport did not load")},t}(ReportViewBase$1);export{ReportViewer};