/* * Mapbox Print Pdf - Printing PDFs with high resolution mapbox maps * Copyright (c) 2015-2018 Matthew Petroff * Copyright (c) 2018 Eddie Larsson * Copyright (c) 2019 Simon Boustedt * Copyright (c) 2000-2020 SuperMap Software Co. Ltd * version 0.4.4 * github: https://github.com/SuperMap/mapbox-print-pdf/tree/enhance */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.mapboxgl || (g.mapboxgl = {})).mapPrint = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=0)||!!check.isObject(t)&&!!(t.hasOwnProperty("top")&&t.hasOwnProperty("bottom")&&t.hasOwnProperty("right")&&t.hasOwnProperty("left"))&&!(!check.isNumber(t.top)||t.top<0||!check.isNumber(t.bottom)||t.bottom<0||!check.isNumber(t.left)||t.left<0||!check.isNumber(t.right)||t.right<0)}(t)?check.isNumber(t)?new Margin({top:t,left:t,right:t,bottom:t},n):new Margin(t,n):null},t}(),Size=function(t,n){this.to=function(i){return new Size(Dimens.to(t,n,i),i)},this.value=function(){return t},this.unit=function(){return n}};Size.from=function(t,n){return n=n||"value",t.hasOwnProperty(n)&&t.hasOwnProperty("unit")?!check.isNumber(t[n])||t[n]<0||-1==UNITS.Enumerated.indexOf(t.unit)?null:new Size(t[n],t.unit):null},module.exports={Dimens:Dimens,Margin:Margin,Size:Size,UNITS:UNITS}; },{"./type-check.js":7}],2:[function(require,module,exports){ var dimensions=require("./dimensions.js"),Dimens=dimensions.Dimens,UNITS=dimensions.UNITS,FormatConfig=function(){var n={a0:new Dimens(2383.94,3370.39,UNITS.Points),a1:new Dimens(1683.78,2383.94,UNITS.Points),a2:new Dimens(1190.55,1683.78,UNITS.Points),a3:new Dimens(841.89,1190.55,UNITS.Points),a4:new Dimens(595.28,841.89,UNITS.Points),a5:new Dimens(419.53,595.28,UNITS.Points),a6:new Dimens(297.64,419.53,UNITS.Points),a7:new Dimens(209.76,297.64,UNITS.Points),a8:new Dimens(147.4,209.76,UNITS.Points),a9:new Dimens(104.88,147.4,UNITS.Points),a10:new Dimens(73.7,104.88,UNITS.Points),b0:new Dimens(2834.65,4008.19,UNITS.Points),b1:new Dimens(2004.09,2834.65,UNITS.Points),b2:new Dimens(1417.32,2004.09,UNITS.Points),b3:new Dimens(1000.63,1417.32,UNITS.Points),b4:new Dimens(708.66,1000.63,UNITS.Points),b5:new Dimens(498.9,708.66,UNITS.Points),b6:new Dimens(354.33,498.9,UNITS.Points),b7:new Dimens(249.45,354.33,UNITS.Points),b8:new Dimens(175.75,249.45,UNITS.Points),b9:new Dimens(124.72,175.75,UNITS.Points),b10:new Dimens(87.87,124.72,UNITS.Points),c0:new Dimens(2599.37,3676.54,UNITS.Points),c1:new Dimens(1836.85,2599.37,UNITS.Points),c2:new Dimens(1298.27,1836.85,UNITS.Points),c3:new Dimens(918.43,1298.27,UNITS.Points),c4:new Dimens(649.13,918.43,UNITS.Points),c5:new Dimens(459.21,649.13,UNITS.Points),c6:new Dimens(323.15,459.21,UNITS.Points),c7:new Dimens(229.61,323.15,UNITS.Points),c8:new Dimens(161.57,229.61,UNITS.Points),c9:new Dimens(113.39,161.57,UNITS.Points),c10:new Dimens(79.37,113.39,UNITS.Points),dl:new Dimens(311.81,623.62,UNITS.Points),letter:new Dimens(612,792,UNITS.Points),"government-letter":new Dimens(576,756,UNITS.Points),legal:new Dimens(612,1008,UNITS.Points),"junior-legal":new Dimens(576,360,UNITS.Points),ledger:new Dimens(1224,792,UNITS.Points),tabloid:new Dimens(792,1224,UNITS.Points),"credit-card":new Dimens(153,243,UNITS.Points)},e={};return{getFormats:function(){var i,s={};for(i in n)n.hasOwnProperty(i)&&(s[i]=n[i]);for(i in e)e.hasOwnProperty(i)&&(s[i]=e[i]);return s},isDefaultFormat:function(i){return function(i){return!e.hasOwnProperty(i)&&n.hasOwnProperty(i)}(i.toLowerCase())},addFormat:function(n,i,s,o){return function(n,i){return e.hasOwnProperty(n)?{error:"Format "+n+" already exists"}:Dimens.isValidPdfDimensionObject(i)?(e[n]=Dimens.toPdfDimension(i),{success:!0}):{error:"Dimensions are of an invalid type"}}(n.toLowerCase(),i)},getFormat:function(i){return function(i){return e.hasOwnProperty(i)?e[i]:n.hasOwnProperty(i)?n[i]:(console.error("The format "+i+" doesn't exist."),null)}(i.toLowerCase())},formatExists:function(i){return function(i){return e.hasOwnProperty(i)||n.hasOwnProperty(i)}(i.toLowerCase())}}}();module.exports=FormatConfig; },{"./dimensions.js":1}],3:[function(require,module,exports){ var check=require("./type-check.js"),dimensions=require("./dimensions.js"),cssInitials=require("css-initials"),Dimens=dimensions.Dimens,UNITS=dimensions.UNITS,CONTAINER_CLASS="__mapbox-print-pdf-container__",ATTR_PRESERVE_CSS="data-mpp-preserve",DEFAULT_FONT='"Times New Roman", Times, serif',scaleElement=require("./scale-element.js"),canvg=require("canvg"),HIDDEN_CONTAINER_STYLE={overflow:"hidden",height:0,width:0,position:"fixed",top:0,left:0},HtmlObject=function(){var e=function(e,t,r){r=check.isObject(r)?r:{},this.html=function(){return e},this.baseline=function(){return t},this.handlers=function(){return r}};return e.from=function(e,t){if(!e.hasOwnProperty("html")||!e.hasOwnProperty("baseline"))return console.error("Missing a required property in the html object"),null;var r=createOrReturnHTML(e.html);if(null===r)return console.error("Html property couldn't be parsed to an html object"),console.error(e.baseline),null;var n=function(e,t){var r=null;return check.isObject(e)&&e.hasOwnProperty("format")&&(check.isString(e.format)||Dimens.isValidDimensionObject(e.format))?(r=check.isString(e.format)?t.getFormat(e.format):Dimens.toDimension(e.format),"l"===e.orientation&&(r=new Dimens(r.height(),r.width(),r.unit()))):check.isString(e)&&t.formatExists(e)&&(r=t.getFormat(e)),r}(e.baseline,t);return null===n?(console.error("Couldn't parse the baseline property of the html object"),console.error(e.baseline),null):new HtmlObject(r,n,e.handlers)},e}(),cloneObject=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},buildStyleStringFromObject=function(e,t){var r="";for(var n in e=cloneObject(e),t)t.hasOwnProperty(n)&&(e[n]=t[n]);for(n in e)e.hasOwnProperty(n)&&(r+=n+": "+e[n]+";");return r},createOrReturnHTML=function(e){if(check.isString(e)){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild}return check.isHTMLElement(e)?e.cloneNode(!0):(console.error(e+" is not a html element or string"),null)},removeStylesExceptMapbox=function(e,t){for(var r=Array.prototype.slice.call(e.getElementsByTagName("LINK")),n=0;n1&&(e.maxWidthPercent/=100),!0))))}function calculateMaxSize(e){var t=-1;if(e&&e.loaded()){var r=e.getCanvas().getContext("experimental-webgl");t=r.getParameter(r.MAX_RENDERBUFFER_SIZE)}return t}function getDpiForSize(e,t){var r=calculateMaxSize(t);return r<=0?{error:"Couldn't calculate the maximum size of the render buffer"}:{result:r/e.to(UNITS.Inches).value()}}function calculateMaximumDpi(e,t,r){var n=getDpiForSize(e,t);return n.error?(console.error("Error when calculating dpi for size: "+n.error),r):n.result}function waitForMapToRender(e){var t=!1;return new Promise(function(r){var n=function(){t&&e.loaded()&&e.isStyleLoaded()&&e.areTilesLoaded()?(e.off("render",a),r(e)):(t=!0,setTimeout(n,QUIESCE_TIMEOUT))},a=function(){t=!1};e.on("render",a),n()})}function addMarkers(e,t=[],r){return new Promise(function(n,a){try{t.forEach(t=>{new r.Marker({element:t.getElement().cloneNode(!0),anchor:t._anchor,offset:t.getOffset(),color:t._color,draggable:t.isDraggable()}).setLngLat(t.getLngLat()).addTo(e)}),n(e)}catch(e){a(e)}})}function addScale(e,t,r){return new Promise(function(n,a){try{t&&e.addControl(new r.ScaleControl({maxWidth:t.maxWidthPercent*e._container.scrollWidth,unit:t.unit})),n(e)}catch(e){a(e)}})}function setBounds(e,t){return new Promise(function(r,n){try{t&&e.fitBounds(t),r(e)}catch(e){n(e)}})}function createPrintMap(e,t,r){return new Promise(function(n,a){const i={container:r,center:e.getCenter(),style:e.getStyle(),bearing:e.getBearing(),maxZoom:24,pitch:e.getPitch(),interactive:!1,attributionControl:!1,preserveDrawingBuffer:!0};e.getCRS&&(i.crs=e.getCRS());try{var c=new t.Map(i);c.fitBounds(e.getBounds()),n(c)}catch(e){a(e)}})}module.exports={calculateMaximumDpi:calculateMaximumDpi,createPrintMap:createPrintMap,isValidScaleObject:isValidScaleObject,addScale:addScale,addMarkers:addMarkers,setBounds:setBounds,waitForMapToRender:waitForMapToRender}; },{"./dimensions.js":1,"./type-check.js":7}],5:[function(require,module,exports){ var jsPDF=require("jspdf"),html2canvas=require("html2canvas"),check=require("./type-check.js"),dimensions=require("./dimensions.js"),Html=require("./html-container.js"),FormatConfig=require("./format-config.js"),mapUtils=require("./map-utils.js"),Dimens=dimensions.Dimens,Margin=dimensions.Margin,Size=dimensions.Size,HtmlObject=Html.HtmlObject,UNITS=dimensions.UNITS,RENDER_SCALE=2;function getOrientedDimensions(e,t){return"l"==t?new Dimens(e.height(),e.width(),e.unit()):e}function getRenderFormat(e,t,n){return getOrientedDimensions(FormatConfig.getFormat(e),t).subtractMargin(n)}var PdfBuilder=function(){var e="a4",t=300,n="p",i=null,r=null,o=null,a=null,s=[],l=-1,c=Margin.createPDFMargin(0,UNITS.Points),u=null,m=this,d=function(e){e.remove();var t=i.parentNode;t.parentNode.removeChild(t),i=null,r=null,o=null,Object.defineProperty(window,"devicePixelRatio",{get:function(){return l}})},f=function(){return new Promise(function(t,r){var o=FormatConfig.getFormat(e),a=c.to(o.unit()),l=new jsPDF({unit:o.unit(),format:FormatConfig.isDefaultFormat(e)?e:[o.width(),o.height()],orientation:n,compress:!0});html2canvas(i,{letterRendering:!0,useCORS:!0,scale:RENDER_SCALE,allowTaint:!0,onclone:function(e){Html.removeStylesExceptMapbox(e,s),Html.clearBodyExceptContainer(e)}}).then(function(i){var o=getRenderFormat(e,n,a);try{l.addImage(i.toDataURL("image/jpeg",1),"JPEG",a.left(),a.top(),o.width(),o.height(),null,"FAST"),t(l)}catch(e){r(e)}},r)})},h=function(a){l=window.devicePixelRatio,Object.defineProperty(window,"devicePixelRatio",{get:function(){return t/96}});var s=getRenderFormat(e,n,c);i=Html.createDocumentContainer(s),Html.addHTMLObject(r,i,s);var u=Html.createMapContainer(i);return Html.addHTMLObject(o,i,s),function(e,n){e=e.to(UNITS.Pixels);var r=Math.min(mapUtils.calculateMaximumDpi(new Size(e.width(),UNITS.Pixels),n,t),mapUtils.calculateMaximumDpi(new Size(e.height(),UNITS.Pixels),n,t));if(r=1e4?i(new Error("The maps style took too long to load.")):setTimeout(r,100)};r()})})(e).then(function(){m.print(e,t).then(n,i)},i)})}};module.exports={formats:FormatConfig,build:function(){return new PdfBuilder}},window.mapboxgl&&(mapboxgl.MapPdfBuilder=PdfBuilder); },{"./dimensions.js":1,"./format-config.js":2,"./html-container.js":3,"./map-utils.js":4,"./type-check.js":7,"html2canvas":191,"jspdf":192}],6:[function(require,module,exports){ var check=require("./type-check.js"),Dimens=require("./dimensions.js").Dimens,SUPPORTED_UNITS=["px","pt","rem","cm","mm","in","pc"],ATTR_SCALE_WIDTH="data-scale-width",ATTR_SCALE_HEIGHT="data-scale-height",ATTR_SCALE_SUM="data-scale-sum",ATTR_HANDLER="data-scale-handler",UNITS_REGEX=makePropertyRegex(SUPPORTED_UNITS);function toSnakeCase(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function toCamelCase(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}function makePropertyRegex(e){return new RegExp("^(\\d+\\.?\\d*)("+e.join("|")+")$")}var StyleSize=function(e){return{fromString:function(t,n){for(var r=t.split(" "),i=[],a=!1,l=0;l0&&(e+=" "),check.isString(t[n])?e+=t[n]:e+=t[n].size+t[n].unit;return e}}(i):null}}}(SUPPORTED_UNITS);function getStyle(e){return e.currentStyle?{style:e.currentStyle,snakeCase:!1}:e.ownerDocument.defaultView&&e.ownerDocument.defaultView.getComputedStyle?{style:e.ownerDocument.defaultView.getComputedStyle(e),snakeCase:!0}:null}function scaleSingleElement(e,t,n,r){var i=getStyle(e);if(i)for(var a=0;a~\.\[:]+)/g,classRegex=/(\.[^\s\+>~\.\[:]+)/g,pseudoElementRegex=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,pseudoClassWithBracketsRegex=/(:[\w-]+\([^\)]*\))/gi,pseudoClassRegex=/(:[^\s\+>~\.\[:]+)/g,elementRegex=/([^\s\+>~\.\[:]+)/g;function findSelectorMatch(t,e){var r=t.match(e);return r?[t.replace(e," "),r.length]:[t,0]}function getSelectorSpecificity(t){var e=[0,0,0],r=t.replace(/:not\(([^\)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0,i=findSelectorMatch(r,attributeRegex),a=_slicedToArray(i,2);r=a[0],n=a[1],e[1]+=n;var s=findSelectorMatch(r,idRegex),o=_slicedToArray(s,2);r=o[0],n=o[1],e[0]+=n;var l=findSelectorMatch(r,classRegex),u=_slicedToArray(l,2);r=u[0],n=u[1],e[1]+=n;var h=findSelectorMatch(r,pseudoElementRegex),c=_slicedToArray(h,2);r=c[0],n=c[1],e[2]+=n;var g=findSelectorMatch(r,pseudoClassWithBracketsRegex),f=_slicedToArray(g,2);r=f[0],n=f[1],e[1]+=n;var p=findSelectorMatch(r,pseudoClassRegex),y=_slicedToArray(p,2);r=y[0],n=y[1],e[1]+=n;var d=findSelectorMatch(r=r.replace(/[\*\s\+>~]/g," ").replace(/[#\.]/g," "),elementRegex),m=_slicedToArray(d,2);return r=m[0],n=m[1],e[2]+=n,e.join("")}var PSEUDO_ZERO=1e-8;function vectorMagnitude(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function vectorsRatio(t,e){return(t[0]*e[0]+t[1]*e[1])/(vectorMagnitude(t)*vectorMagnitude(e))}function vectorsAngle(t,e){return(t[0]*e[1]=0;--a){var s=this.tryEntries[a],o=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),u=n.call(s,"finallyLoc");if(l&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}),Property=function(){function t(e,r,n){_classCallCheck(this,t),this.document=e,this.name=r,this.value=n}return _createClass(t,[{key:"hasValue",value:function(){var t=this.value;return null!==t&&""!==t&&0!==t&&void 0!==t}},{key:"isString",value:function(t){var e=this.value,r="string"==typeof e;return r&&t?t.test(e):r}},{key:"isUrlDefinition",value:function(){return this.isString(/^url\(/)}},{key:"isPixels",value:function(){if(!this.hasValue())return!1;var t=this.getString();switch(!0){case/px$/.test(t):case/^[0-9]+$/.test(t):return!0;default:return!1}}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getValue",value:function(t){return void 0===t||this.hasValue()?this.value:t}},{key:"getNumber",value:function(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);var e=this.value,r=parseFloat(e);return this.isString(/%$/)&&(r/=100),r}},{key:"getString",value:function(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}},{key:"getDpi",value:function(){return 96}},{key:"getRem",value:function(){return this.document.rootEmSize}},{key:"getEm",value:function(){return this.document.emSize}},{key:"getUnits",value:function(){return this.getString().replace(/[0-9\.\-]/g,"")}},{key:"getPixels",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var r=_slicedToArray("boolean"==typeof t?[void 0,t]:[t],2),n=r[0],i=r[1],a=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&i:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(n);default:var s=this.getNumber();return e&&s<1?s*a.computeSize(n):s}}},{key:"getMilliseconds",value:function(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}},{key:"getRadians",value:function(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}},{key:"getDefinition",value:function(){var t=this.getString(),e=t.match(/#([^\)'"]+)/);return e&&(e=e[1]),e||(e=t),this.document.definitions[e]}},{key:"getFillStyleDefinition",value:function(t,e){var r=this.getDefinition();if(!r)return null;if("function"==typeof r.createGradient)return r.createGradient(this.document.ctx,t,e);if("function"==typeof r.createPattern){if(r.getHrefAttribute().hasValue()){var n=r.getAttribute("patternTransform");r=r.getHrefAttribute().getDefinition(),n.hasValue()&&r.getAttribute("patternTransform",!0).setValue(n.value)}return r.createPattern(this.document.ctx,t,e)}return null}},{key:"getTextBaseline",value:function(){return this.hasValue()?t.textBaselineMapping[this.getString()]:null}},{key:"addOpacity",value:function(e){for(var r=this.value,n=r.length,i=0,a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=toNumbers(e),i=_slicedToArray(n,2),a=i[0],s=void 0===a?r:a,o=i[1];return new t(s,void 0===o?r:o)}},{key:"parseScale",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=toNumbers(e),i=_slicedToArray(n,2),a=i[0],s=void 0===a?r:a,o=i[1];return new t(s,void 0===o?s:o)}},{key:"parsePath",value:function(e){for(var r=toNumbers(e),n=r.length,i=[],a=0;a0}},{key:"runEvents",value:function(){if(this.working){var t=this.screen,e=this.events,r=this.eventElements,n=t.ctx.canvas.style;n&&(n.cursor=""),e.forEach(function(t,e){for(var n=t.run,i=r[e];i;)n(i),i=i.parent}),this.events=[],this.eventElements=[]}}},{key:"checkPath",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var a=r.x,s=r.y;!n[i]&&e.isPointInPath&&e.isPointInPath(a,s)&&(n[i]=t)})}}},{key:"checkBoundingBox",value:function(t,e){if(this.working&&e){var r=this.events,n=this.eventElements;r.forEach(function(r,i){var a=r.x,s=r.y;!n[i]&&e.isPointInBox(a,s)&&(n[i]=t)})}}},{key:"mapXY",value:function(t,e){for(var r=this.screen,n=r.window,i=r.ctx,a=new Point(t,e),s=i.canvas;s;)a.x-=s.offsetLeft,a.y-=s.offsetTop,s=s.offsetParent;return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}},{key:"onClick",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onclick",x:r,y:n,run:function(t){t.onClick&&t.onClick()}})}},{key:"onMouseMove",value:function(t){var e=this.mapXY((t||event).clientX,(t||event).clientY),r=e.x,n=e.y;this.events.push({type:"onmousemove",x:r,y:n,run:function(t){t.onMouseMove&&t.onMouseMove()}})}}]),t}(),defaultWindow="undefined"!=typeof window?window:null,defaultFetch="undefined"!=typeof fetch?fetch.bind(void 0):null,Screen=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.fetch,i=void 0===n?defaultFetch:n,a=r.window,s=void 0===a?defaultWindow:a;_classCallCheck(this,t),this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new ViewPort,this.mouse=new Mouse(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=s,this.fetch=i}return _createClass(t,[{key:"wait",value:function(t){this.waits.push(t)}},{key:"ready",value:function(){return this.readyPromise?this.readyPromise:Promise.resolve()}},{key:"isReady",value:function(){if(this.isReadyLock)return!0;var t=this.waits.every(function(t){return t()});return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}},{key:"setDefaults",value:function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}},{key:"setViewBox",value:function(t){var e=t.document,r=t.ctx,n=t.aspectRatio,i=t.width,a=t.desiredWidth,s=t.height,o=t.desiredHeight,l=t.minX,u=void 0===l?0:l,h=t.minY,c=void 0===h?0:h,g=t.refX,f=t.refY,p=t.clip,y=void 0!==p&&p,d=t.clipX,m=void 0===d?0:d,v=t.clipY,x=void 0===v?0:v,b=compressSpaces(n).replace(/^defer\s/,"").split(" "),k=_slicedToArray(b,2),C=k[0],P=k[1],S=C||"xMidYMid",w=P||"meet",E=i/a,_=s/o,A=Math.min(E,_),T=Math.max(E,_),M=a,V=o;"meet"===w&&(M*=A,V*=A),"slice"===w&&(M*=T,V*=T);var R=new Property(e,"refX",g),O=new Property(e,"refY",f),B=R.hasValue()&&O.hasValue();if(B&&r.translate(-A*R.getPixels("x"),-A*O.getPixels("y")),y){var D=A*m,N=A*x;r.beginPath(),r.moveTo(D,N),r.lineTo(i,N),r.lineTo(i,s),r.lineTo(D,s),r.closePath(),r.clip()}if(!B){var L="meet"===w&&A===_,F="slice"===w&&T===_,z="meet"===w&&A===E,j="slice"===w&&T===E;/^xMid/.test(S)&&(L||F)&&r.translate(i/2-M/2,0),/YMid$/.test(S)&&(z||j)&&r.translate(0,s/2-V/2),/^xMax/.test(S)&&(L||F)&&r.translate(i-M,0),/YMax$/.test(S)&&(z||j)&&r.translate(0,s-V)}switch(!0){case"none"===S:r.scale(E,_);break;case"meet"===w:r.scale(A,A);break;case"slice"===w:r.scale(T,T)}r.translate(-u,-c)}},{key:"start",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.enableRedraw,i=void 0!==n&&n,a=r.ignoreMouse,s=void 0!==a&&a,o=r.ignoreAnimation,l=void 0!==o&&o,u=r.ignoreDimensions,h=void 0!==u&&u,c=r.ignoreClear,g=void 0!==c&&c,f=r.forceRedraw,p=r.scaleWidth,y=r.scaleHeight,d=r.offsetX,m=r.offsetY,v=this.FRAMERATE,x=this.mouse,b=1e3/v;if(this.frameDuration=b,this.readyPromise=new Promise(function(t){e.resolveReady=t}),this.isReady()&&this.render(t,h,g,p,y,d,m),i){var k=Date.now(),C=k,P=0;s||x.start(),this.intervalId=requestAnimationFrame(function r(){k=Date.now(),(P=k-C)>=b&&(C=k-P%b,e.shouldUpdate(l,f)&&(e.render(t,h,g,p,y,d,m),x.runEvents())),e.intervalId=requestAnimationFrame(r)})}}},{key:"stop",value:function(){this.intervalId&&(requestAnimationFrame.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}},{key:"shouldUpdate",value:function(t,e){if(!t){var r=this.frameDuration,n=this.animations.reduce(function(t,e){return e.update(r)||t},!1);if(n)return!0}return!("function"!=typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}},{key:"render",value:function(t,e,r,n,i,a,s){var o=this.CLIENT_WIDTH,l=this.CLIENT_HEIGHT,u=this.viewPort,h=this.ctx,c=this.isFirstRender,g=h.canvas;u.clear(),g.width&&g.height?u.setCurrent(g.width,g.height):u.setCurrent(o,l);var f=t.getStyle("width"),p=t.getStyle("height");!e&&(c||"number"!=typeof n&&"number"!=typeof i)&&(f.hasValue()&&(g.width=f.getPixels("x"),g.style&&(g.style.width="".concat(g.width,"px"))),p.hasValue()&&(g.height=p.getPixels("y"),g.style&&(g.style.height="".concat(g.height,"px"))));var y=g.clientWidth||g.width,d=g.clientHeight||g.height;if(e&&f.hasValue()&&p.hasValue()&&(y=f.getPixels("x"),d=p.getPixels("y")),u.setCurrent(y,d),"number"==typeof a&&t.getAttribute("x",!0).setValue(a),"number"==typeof s&&t.getAttribute("y",!0).setValue(s),"number"==typeof n||"number"==typeof i){var m=toNumbers(t.getAttribute("viewBox").getString()),v=0,x=0;if("number"==typeof n){var b=t.getStyle("width");b.hasValue()?v=b.getPixels("x")/n:isNaN(m[2])||(v=m[2]/n)}if("number"==typeof i){var k=t.getStyle("height");k.hasValue()?x=k.getPixels("y")/i:isNaN(m[3])||(x=m[3]/i)}v||(v=x),x||(x=v),t.getAttribute("width",!0).setValue(n),t.getAttribute("height",!0).setValue(i);var C=t.getStyle("transform",!0,!0);C.setValue("".concat(C.getString()," scale(").concat(1/v,", ").concat(1/x,")"))}r||h.clearRect(0,0,y,d),t.render(h),c&&(this.isFirstRender=!1)}}]),t}();Screen.defaultWindow=defaultWindow,Screen.defaultFetch=defaultFetch;var defaultFetch$1=Screen.defaultFetch,DefaultDOMParser="undefined"!=typeof DOMParser?DOMParser:null,Parser=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.fetch,n=void 0===r?defaultFetch$1:r,i=e.DOMParser,a=void 0===i?DefaultDOMParser:i;_classCallCheck(this,t),this.fetch=n,this.DOMParser=a}return _createClass(t,[{key:"parse",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(e){return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!/^2&&void 0!==arguments[2]&&arguments[2];if(_classCallCheck(this,t),this.document=e,this.node=r,this.captureTextNodes=i,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],r&&1===r.nodeType){if(Array.from(r.attributes).forEach(function(t){var r=normalizeAttributeName(t.nodeName);n.attributes[r]=new Property(e,r,t.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue())this.getAttribute("style").getString().split(";").map(function(t){return t.trim()}).forEach(function(t){if(t){var r=t.split(":"),i=_slicedToArray(r,2),a=i[0],s=i[1];n.styles[a]=new Property(e,a.trim(),s.trim())}});var a=e.definitions,s=this.getAttribute("id");s.hasValue()&&(a[s.getValue()]||(a[s.getValue()]=this)),Array.from(r.childNodes).forEach(function(t){if(1===t.nodeType)n.addChild(t);else if(i&&(3===t.nodeType||4===t.nodeType)){var r=e.createTextNode(t);r.getText().length>0&&n.addChild(r)}})}}return _createClass(t,[{key:"getAttribute",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.attributes[t];if(!r&&e){var n=new Property(this.document,t,"");return this.attributes[t]=n,n}return r||Property.empty(this.document)}},{key:"getHrefAttribute",value:function(){for(var t in this.attributes)if("href"===t||/:href$/.test(t))return this.attributes[t];return Property.empty(this.document)}},{key:"getStyle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.styles[t];if(n)return n;var i=this.getAttribute(t);if(i&&i.hasValue())return this.styles[t]=i,i;if(!r){var a=this.parent;if(a){var s=a.getStyle(t);if(s&&s.hasValue())return s}}if(e){var o=new Property(this.document,t,"");return this.styles[t]=o,o}return n||Property.empty(this.document)}},{key:"render",value:function(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){var e=this.getStyle("mask").getDefinition();e&&e.apply(t,this)}else if("none"!==this.getStyle("filter").getValue("none")){var r=this.getStyle("filter").getDefinition();r&&r.apply(t,this)}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}},{key:"setContext",value:function(t){}},{key:"clearContext",value:function(t){}},{key:"renderChildren",value:function(t){this.children.forEach(function(e){e.render(t)})}},{key:"addChild",value:function(e){var r=e instanceof t?e:this.document.createElement(e);r.parent=this,t.ignoreChildTypes.includes(r.type)||this.children.push(r)}},{key:"matchesSelector",value:function(t){var e=this.node;if("function"==typeof e.matches)return e.matches(t);var r=e.getAttribute("class");return!(!r||""===r)&&r.split(" ").some(function(e){if(".".concat(e)===t)return!0})}},{key:"addStylesFromStyleDefinition",value:function(){var t=this.document,e=t.styles,r=t.stylesSpecificity;for(var n in e)if("@"!==n[0]&&this.matchesSelector(n)){var i=e[n],a=r[n];if(i)for(var s in i){var o=this.stylesSpecificity[s];void 0===o&&(o="000"),a>=o&&(this.styles[s]=i[s],this.stylesSpecificity[s]=a)}}}}]),t}();Element.ignoreChildTypes=["title"];var UnknownElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n)),console.warn("Element ".concat(r.nodeName," not yet implemented.")),i}return _inherits(e,Element),e}();function wrapFontFamily(t){var e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function prepareFontFamily(t){return"undefined"==typeof process?t:t.trim().split(",").map(wrapFontFamily).join(",")}function prepareFontStyle(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function prepareFontWeight(t){if(!t)return"";var e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}var Font=function(){function t(e,r,n,i,a,s){_classCallCheck(this,t);var o=s?"string"==typeof s?t.parse(s):s:{};this.fontFamily=a||o.fontFamily,this.fontSize=i||o.fontSize,this.fontStyle=e||o.fontStyle,this.fontWeight=n||o.fontWeight,this.fontVariant=r||o.fontVariant}return _createClass(t,[{key:"toString",value:function(){return[prepareFontStyle(this.fontStyle),this.fontVariant,prepareFontWeight(this.fontWeight),this.fontSize,prepareFontFamily(this.fontFamily)].join(" ").trim()}}],[{key:"parse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n="",i="",a="",s="",o="",l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return compressSpaces(e).trim().split(" ").forEach(function(e){switch(!0){case!l.fontStyle&&t.styles.includes(e):"inherit"!==e&&(n=e),l.fontStyle=!0;break;case!l.fontVariant&&t.variants.includes(e):"inherit"!==e&&(i=e),l.fontStyle=!0,l.fontVariant=!0;break;case!l.fontWeight&&t.weights.includes(e):"inherit"!==e&&(a=e),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:if("inherit"!==e){var r=e.split("/"),u=_slicedToArray(r,1);s=u[0]}l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:"inherit"!==e&&(o+=e)}}),new t(n,i,a,s,o,r)}}]),t}();Font.styles="normal|italic|oblique|inherit",Font.variants="normal|small-caps|inherit",Font.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";var BoundingBox=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.NaN,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.NaN,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Number.NaN;_classCallCheck(this,t),this.x1=e,this.y1=r,this.x2=n,this.y2=i,this.addPoint(e,r),this.addPoint(n,i)}return _createClass(t,[{key:"addPoint",value:function(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),tthis.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))}},{key:"addX",value:function(t){this.addPoint(t,null)}},{key:"addY",value:function(t){this.addPoint(null,t)}},{key:"addBoundingBox",value:function(t){if(t){var e=t.x1,r=t.y1,n=t.x2,i=t.y2;this.addPoint(e,r),this.addPoint(n,i)}}},{key:"sumCubic",value:function(t,e,r,n,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*r+3*(1-t)*Math.pow(t,2)*n+Math.pow(t,3)*i}},{key:"bezierCurveAdd",value:function(t,e,r,n,i){var a=6*e-12*r+6*n,s=-3*e+9*r-9*n+3*i,o=3*r-3*e;if(0!==s){var l=Math.pow(a,2)-4*o*s;if(!(l<0)){var u=(-a+Math.sqrt(l))/(2*s);02&&void 0!==arguments[2]?arguments[2]:[];_classCallCheck(this,t),this.type="rotate",this.angle=null,this.cx=0,this.cy=0;var i=toNumbers(r);this.angle=new Property(e,"angle",i[0]),this.cx=(i[1]||0)+(n[0]||0),this.cy=(i[2]||0)+(n[1]||0)}return _createClass(t,[{key:"apply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(n.getRadians()),t.translate(-e,-r)}},{key:"unapply",value:function(t){var e=this.cx,r=this.cy,n=this.angle;t.translate(e,r),t.rotate(-1*n.getRadians()),t.translate(-e,-r)}},{key:"applyToPoint",value:function(t){var e=this.cx,r=this.cy,n=this.angle.getRadians();t.applyTransform([1,0,0,1,e||0,r||0]),t.applyTransform([Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0]),t.applyTransform([1,0,0,1,-e||0,-r||0])}}]),t}(),Scale=function(){function t(e,r){_classCallCheck(this,t),this.type="scale",this.scale=null;var n=Point.parseScale(r);0!==n.x&&0!==n.y||(n.x=PSEUDO_ZERO,n.y=PSEUDO_ZERO),this.scale=n}return _createClass(t,[{key:"apply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(r,n||r)}},{key:"unapply",value:function(t){var e=this.scale,r=e.x,n=e.y;t.scale(1/r,1/n||r)}},{key:"applyToPoint",value:function(t){var e=this.scale,r=e.x,n=e.y;t.applyTransform([r||0,0,0,n||0,0,0])}}]),t}(),Matrix=function(){function t(e,r){_classCallCheck(this,t),this.type="matrix",this.matrix=[],this.matrix=toNumbers(r)}return _createClass(t,[{key:"apply",value:function(t){var e=this.matrix;t.transform(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"unapply",value:function(t){var e=this.matrix,r=e[0],n=e[2],i=e[4],a=e[1],s=e[3],o=e[5],l=1/(r*(1*s-0*o)-n*(1*a-0*o)+i*(0*a-0*s));t.transform(l*(1*s-0*o),l*(0*o-1*a),l*(0*i-1*n),l*(1*r-0*i),l*(n*o-i*s),l*(i*a-r*o))}},{key:"applyToPoint",value:function(t){t.applyTransform(this.matrix)}}]),t}(),Skew=function(t){function e(t,r){var n;return _classCallCheck(this,e),(n=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r))).type="skew",n.angle=null,n.angle=new Property(t,"angle",r),n}return _inherits(e,Matrix),e}(),SkewX=function(t){function e(t,r){var n;return _classCallCheck(this,e),(n=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r))).type="skewX",n.matrix=[1,0,Math.tan(n.angle.getRadians()),1,0,0],n}return _inherits(e,Skew),e}(),SkewY=function(t){function e(t,r){var n;return _classCallCheck(this,e),(n=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r))).type="skewY",n.matrix=[1,Math.tan(n.angle.getRadians()),0,1,0,0],n}return _inherits(e,Skew),e}();function parseTransforms(t){return compressSpaces(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function parseTransform(t){var e=t.split("("),r=_slicedToArray(e,2),n=r[0],i=r[1];return[n.trim(),i.trim().replace(")","")]}var Transform=function(){function t(e,r,n){var i=this;_classCallCheck(this,t),this.document=e,this.transforms=[];var a=parseTransforms(r),s=n?toNumbers(n):[];a.forEach(function(e){if("none"!==e){var r=parseTransform(e),n=_slicedToArray(r,2),a=n[0],o=n[1],l=t.transformTypes[a];void 0!==l&&i.transforms.push(new l(i.document,o,s))}})}return _createClass(t,[{key:"apply",value:function(t){for(var e=this.transforms,r=e.length,n=0;n=0;r--)e[r].unapply(t)}},{key:"applyToPoint",value:function(t){for(var e=this.transforms,r=e.length,n=0;n1&&void 0!==arguments[1]&&arguments[1])){var e=this.getStyle("fill"),r=this.getStyle("fill-opacity"),n=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(e.isUrlDefinition()){var a=e.getFillStyleDefinition(this,r);a&&(t.fillStyle=a)}else if(e.hasValue()){"currentColor"===e.getString()&&e.setValue(this.getStyle("color").getValue());var s=e.getString();"inherit"!==s&&(t.fillStyle="none"===s?"rgba(0,0,0,0)":s)}if(r.hasValue()){var o=new Property(this.document,"fill",t.fillStyle).addOpacity(r).getString();t.fillStyle=o}if(n.isUrlDefinition()){var l=n.getFillStyleDefinition(this,i);l&&(t.strokeStyle=l)}else if(n.hasValue()){"currentColor"===n.getString()&&n.setValue(this.getStyle("color").getValue());var u=n.getString();"inherit"!==u&&(t.strokeStyle="none"===u?"rgba(0,0,0,0)":u)}if(i.hasValue()){var h=new Property(this.document,"stroke",t.strokeStyle).addOpacity(i).getString();t.strokeStyle=h}var c=this.getStyle("stroke-width");if(c.hasValue()){var g=c.getPixels();t.lineWidth=g||PSEUDO_ZERO}var f=this.getStyle("stroke-linecap"),p=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),d=this.getStyle("paint-order"),m=this.getStyle("stroke-dasharray"),v=this.getStyle("stroke-dashoffset");if(f.hasValue()&&(t.lineCap=f.getString()),p.hasValue()&&(t.lineJoin=p.getString()),y.hasValue()&&(t.miterLimit=y.getNumber()),d.hasValue()&&(t.paintOrder=d.getValue()),m.hasValue()&&"none"!==m.getString()){var x=toNumbers(m.getString());void 0!==t.setLineDash?t.setLineDash(x):void 0!==t.webkitLineDash?t.webkitLineDash=x:void 0===t.mozDash||1===x.length&&0===x[0]||(t.mozDash=x);var b=v.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=b:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=b:void 0!==t.mozDashOffset&&(t.mozDashOffset=b)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){var k=this.getStyle("font"),C=this.getStyle("font-style"),P=this.getStyle("font-variant"),S=this.getStyle("font-weight"),w=this.getStyle("font-size"),E=this.getStyle("font-family"),_=new Font(C.getString(),P.getString(),S.getString(),w.hasValue()?"".concat(w.getPixels(!0),"px"):"",E.getString(),Font.parse(k.getString(),t.font));C.setValue(_.fontStyle),P.setValue(_.fontVariant),S.setValue(_.fontWeight),w.setValue(_.fontSize),E.setValue(_.fontFamily),t.font=_.toString(),w.isPixels()&&(this.document.emSize=w.getPixels(),this.modifiedEmSizeStack=!0)}var A=Transform.fromElement(this.document,this);A&&A.apply(t);var T=this.getStyle("clip-path",!1,!0);if(T.hasValue()){var M=T.getDefinition();M&&M.apply(t)}t.globalAlpha=this.calculateOpacity()}},{key:"clearContext",value:function(t){_get(_getPrototypeOf(e.prototype),"clearContext",this).call(this,t),this.modifiedEmSizeStack&&this.document.popEmSize()}}]),e}(),TextElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,(this instanceof e?this.constructor:void 0)===e||n))).type="text",i.x=0,i.y=0,i.measureCache=-1,i}return _inherits(e,RenderedElement),_createClass(e,[{key:"setContext",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_get(_getPrototypeOf(e.prototype),"setContext",this).call(this,t,r);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}},{key:"initializeCoordinates",value:function(t){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var e=this.getAttribute("dx"),r=this.getAttribute("dy");e.hasValue()&&(this.x+=e.getPixels("x")),r.hasValue()&&(this.y+=r.getPixels("y")),this.x+=this.getAnchorDelta(t,this,0)}},{key:"getBoundingBox",value:function(t){var e=this;if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(t);var r=null;return this.children.forEach(function(n,i){var a=e.getChildBoundingBox(t,e,e,i);r?r.addBoundingBox(a):r=a}),r}},{key:"getFontSize",value:function(){var t=this.document,e=this.parent,r=Font.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(r)}},{key:"getTElementBoundingBox",value:function(t){var e=this.getFontSize();return new BoundingBox(this.x,this.y-e,this.x+this.measureText(t),this.y)}},{key:"getGlyph",value:function(t,e,r){var n=e[r],i=null;if(t.isArabic){var a=e.length,s=e[r-1],o=e[r+1],l="isolated";(0===r||" "===s)&&r0&&" "!==s&&r0&&" "!==s&&(r===a-1||" "===o)&&(l="initial"),void 0!==t.glyphs[n]&&((i=t.glyphs[n][l])||"glyph"!==t.glyphs[n].type||(i=t.glyphs[n]))}else i=t.glyphs[n];return i||(i=t.missingGlyph),i}},{key:"getText",value:function(){return""}},{key:"getTextFromNode",value:function(t){var e=t||this.node,r=Array.from(e.parentNode.childNodes),n=r.indexOf(e),i=r.length-1,a=compressSpaces(e.value||e.text||e.textContent||"");return 0===n&&(a=trimLeft(a)),n===i&&(a=trimRight(a)),a}},{key:"renderChildren",value:function(t){var e=this;if("text"===this.type){this.initializeCoordinates(t),this.children.forEach(function(r,n){e.renderChild(t,e,e,n)});var r=this.document.screen.mouse;r.isWorking()&&r.checkBoundingBox(this,this.getBoundingBox(t))}else this.renderTElementChildren(t)}},{key:"renderTElementChildren",value:function(t){var e=this.document,r=this.parent,n=this.getText(),i=r.getStyle("font-family").getDefinition();if(i)for(var a=i.fontFace.unitsPerEm,s=Font.parse(e.ctx.font),o=r.getStyle("font-size").getNumber(s.fontSize),l=r.getStyle("font-style").getString(s.fontStyle),u=o/a,h=i.isRTL?n.split("").reverse().join(""):n,c=toNumbers(r.getAttribute("dx").getString()),g=h.length,f=0;fr&&s.getAttribute("x").hasValue()||s.getAttribute("text-anchor").hasValue()));l++)o+=s.measureTextRecursive(t);return-1*("end"===n?o:o/2)}return 0}},{key:"adjustChildCoordinates",value:function(t,e,r,n){var i=r.children[n];if("function"!=typeof i.measureText)return i;var a=i.getAttribute("x"),s=i.getAttribute("y"),o=i.getAttribute("dx"),l=i.getAttribute("dy"),u=i.getAttribute("text-anchor").getString("start");if(0===n&&"textNode"!==i.type&&(a.hasValue()||a.setValue(e.getAttribute("x").getValue("0")),s.hasValue()||s.setValue(e.getAttribute("y").getValue("0")),o.hasValue()||o.setValue(e.getAttribute("dx").getValue("0")),l.hasValue()||l.setValue(e.getAttribute("dy").getValue("0"))),a.hasValue()){if(i.x=a.getPixels("x")+e.getAnchorDelta(t,r,n),"start"!==u){var h=i.measureTextRecursive(t);i.x+=-1*("end"===u?h:h/2)}o.hasValue()&&(i.x+=o.getPixels("x"))}else{if("start"!==u){var c=i.measureTextRecursive(t);e.x+=-1*("end"===u?c:c/2)}o.hasValue()&&(e.x+=o.getPixels("x")),i.x=e.x}return e.x=i.x+i.measureText(t),s.hasValue()?(i.y=s.getPixels("y"),l.hasValue()&&(i.y+=l.getPixels("y"))):(l.hasValue()&&(e.y+=l.getPixels("y")),i.y=e.y),e.y=i.y,i}},{key:"getChildBoundingBox",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n),a=i.getBoundingBox(t);return a?(i.children.forEach(function(r,n){var s=e.getChildBoundingBox(t,e,i,n);a.addBoundingBox(s)}),a):null}},{key:"renderChild",value:function(t,e,r,n){var i=this.adjustChildCoordinates(t,e,r,n);i.render(t),i.children.forEach(function(r,n){e.renderChild(t,e,i,n)})}},{key:"measureTextRecursive",value:function(t){return this.children.reduce(function(e,r){return e+r.measureTextRecursive(t)},this.measureText(t))}},{key:"measureText",value:function(t){var e=this.measureCache;if(~e)return e;var r=this.getText(),n=this.measureTargetText(t,r);return this.measureCache=n,n}},{key:"measureTargetText",value:function(t,e){if(!e.length)return 0;var r=this.parent,n=r.getStyle("font-family").getDefinition();if(n){for(var i=this.getFontSize(),a=n.isRTL?e.split("").reverse().join(""):e,s=toNumbers(r.getAttribute("dx").getString()),o=a.length,l=0,u=0;u0?"":i.getTextFromNode(),i}return _inherits(e,TextElement),_createClass(e,[{key:"getText",value:function(){return this.text}}]),e}(),TextNode=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="textNode",t}return _inherits(e,TSpanElement),e}();function preparePath(t){return compressSpaces(t.replace(/,/gm," ").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2").replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2").replace(/([0-9])([+\-])/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/(\.[0-9]*)(\.)/gm,"$1 $2").replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ")).trim()}var PathParser=function(){function t(e){_classCallCheck(this,t),this.control=null,this.start=null,this.current=null,this.command="",this.tokens=[],this.i=-1,this.previousCommand="",this.points=[],this.angles=[],this.tokens=preparePath(e).split(" ")}return _createClass(t,[{key:"reset",value:function(){this.i=-1,this.command="",this.previousCommand="",this.start=new Point(0,0),this.control=new Point(0,0),this.current=new Point(0,0),this.points=[],this.angles=[]}},{key:"isEnd",value:function(){return this.i>=this.tokens.length-1}},{key:"isCommandOrEnd",value:function(){if(this.isEnd())return!0;var t=this.i,e=this.tokens;return/^[A-Za-z]$/.test(e[t+1])}},{key:"isRelativeCommand",value:function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0;default:return!1}}},{key:"getToken",value:function(){return this.i++,this.tokens[this.i]}},{key:"getScalar",value:function(){return parseFloat(this.getToken())}},{key:"nextCommand",value:function(){this.previousCommand=this.command,this.command=this.getToken()}},{key:"getPoint",value:function(){var t=new Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)}},{key:"getAsControlPoint",value:function(){var t=this.getPoint();return this.control=t,t}},{key:"getAsCurrentPoint",value:function(){var t=this.getPoint();return this.current=t,t}},{key:"getReflectedControlPoint",value:function(){var t=this.previousCommand.toLowerCase();if("c"!==t&&"s"!==t&&"q"!==t&&"t"!==t)return this.current;var e=this.current,r=e.x,n=e.y,i=this.control,a=i.x,s=i.y;return new Point(2*r-a,2*n-s)}},{key:"makeAbsolute",value:function(t){if(this.isRelativeCommand()){var e=this.current,r=e.x,n=e.y;t.x+=r,t.y+=n}return t}},{key:"addMarker",value:function(t,e,r){var n=this.points,i=this.angles;r&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=n[n.length-1].angleTo(r)),this.addMarkerAngle(t,e?e.angleTo(t):null)}},{key:"addMarkerAngle",value:function(t,e){this.points.push(t),this.angles.push(e)}},{key:"getMarkerPoints",value:function(){return this.points}},{key:"getMarkerAngles",value:function(){for(var t=this.angles,e=t.length,r=0;r1&&(i*=Math.sqrt(c),a*=Math.sqrt(c));var g=(o===l?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(h.y,2)-Math.pow(a,2)*Math.pow(h.x,2))/(Math.pow(i,2)*Math.pow(h.y,2)+Math.pow(a,2)*Math.pow(h.x,2)));isNaN(g)&&(g=0);var f=new Point(g*i*h.y/a,g*-a*h.x/i),p=new Point((n.x+u.x)/2+Math.cos(s)*f.x-Math.sin(s)*f.y,(n.y+u.y)/2+Math.sin(s)*f.x+Math.cos(s)*f.y),y=vectorsAngle([1,0],[(h.x-f.x)/i,(h.y-f.y)/a]),d=[(h.x-f.x)/i,(h.y-f.y)/a],m=[(-h.x-f.x)/i,(-h.y-f.y)/a],v=vectorsAngle(d,m);vectorsRatio(d,m)<=-1&&(v=Math.PI),vectorsRatio(d,m)>=1&&(v=0);var x=1-l?1:-1,b=y+x*(v/2),k=new Point(p.x+i*Math.cos(b),p.y+a*Math.sin(b));if(r.addMarkerAngle(k,b-x*Math.PI/2),r.addMarkerAngle(u,b-x*Math.PI),e.addPoint(u.x,u.y),t&&!isNaN(y)&&!isNaN(v)){var C=i>a?i:a,P=i>a?1:i/a,S=i>a?a/i:1;t.translate(p.x,p.y),t.rotate(s),t.scale(P,S),t.arc(0,0,C,y,y+v,Boolean(1-l)),t.scale(1/P,1/S),t.rotate(-s),t.translate(-p.x,-p.y)}}}},{key:"pathZ",value:function(t,e){var r=this.pathParser;t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath(),r.current=r.start}}]),e}(),SVGElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="svg",t.root=!1,t}return _inherits(e,RenderedElement),_createClass(e,[{key:"clearContext",value:function(t){_get(_getPrototypeOf(e.prototype),"clearContext",this).call(this,t),this.document.screen.viewPort.removeCurrent()}},{key:"setContext",value:function(t){var r=this.document,n=r.screen,i=r.window,a=t.canvas;if(n.setDefaults(t),a.style&&void 0!==t.font&&i&&void 0!==i.getComputedStyle){t.font=i.getComputedStyle(a).getPropertyValue("font");var s=new Property(r,"fontSize",Font.parse(t.font).fontSize);s.hasValue()&&(r.rootEmSize=s.getPixels("y"),r.emSize=r.rootEmSize)}_get(_getPrototypeOf(e.prototype),"setContext",this).call(this,t),this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y"));var o=n.viewPort,l=o.width,u=o.height;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%");var h=this.getAttribute("refX"),c=this.getAttribute("refY"),g=this.getAttribute("viewBox"),f=g.hasValue()?toNumbers(g.getString()):null,p=!this.root&&"visible"!==this.getAttribute("overflow").getValue("hidden"),y=0,d=0,m=0,v=0;f&&(y=f[0],d=f[1]),this.root||(l=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=y,v=d,y=0,d=0)),n.viewPort.setCurrent(l,u),f&&(l=f[2],u=f[3]),r.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:n.viewPort.width,desiredWidth:l,height:n.viewPort.height,desiredHeight:u,minX:y,minY:d,refX:h.getValue(),refY:c.getValue(),clip:p,clipX:m,clipY:v}),f&&(n.viewPort.removeCurrent(),n.viewPort.setCurrent(l,u))}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getAttribute("width",!0),i=this.getAttribute("height",!0),a=this.getAttribute("viewBox"),s=this.getAttribute("style"),o=n.getNumber(0),l=i.getNumber(0);if(r)if("string"==typeof r)this.getAttribute("preserveAspectRatio",!0).setValue(r);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(n.setValue(t),i.setValue(e),a.hasValue()||a.setValue("0 0 ".concat(o||t," ").concat(l||e)),s.hasValue()){var h=this.getStyle("width"),c=this.getStyle("height");h.hasValue()&&h.setValue("".concat(t,"px")),c.hasValue()&&c.setValue("".concat(e,"px"))}}}]),e}(),RectElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="rect",t}return _inherits(e,PathElement),_createClass(e,[{key:"path",value:function(t){var e=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y"),a=this.getAttribute("rx"),s=this.getAttribute("ry"),o=a.getPixels("x"),l=s.getPixels("y");if(a.hasValue()&&!s.hasValue()&&(l=o),s.hasValue()&&!a.hasValue()&&(o=l),o=Math.min(o,n/2),l=Math.min(l,i/2),t){var u=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&n>0&&(t.moveTo(e+o,r),t.lineTo(e+n-o,r),t.bezierCurveTo(e+n-o+u*o,r,e+n,r+l-u*l,e+n,r+l),t.lineTo(e+n,r+i-l),t.bezierCurveTo(e+n,r+i-l+u*l,e+n-o+u*o,r+i,e+n-o,r+i),t.lineTo(e+o,r+i),t.bezierCurveTo(e+o-u*o,r+i,e,r+i-l+u*l,e,r+i-l),t.lineTo(e,r+l),t.bezierCurveTo(e,r+l-u*l,e+o-u*o,r,e+o,r),t.closePath())}return new BoundingBox(e,r,e+n,r+i)}},{key:"getMarkers",value:function(){return null}}]),e}(),CircleElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="circle",t}return _inherits(e,PathElement),_createClass(e,[{key:"path",value:function(t){var e=this.getAttribute("cx").getPixels("x"),r=this.getAttribute("cy").getPixels("y"),n=this.getAttribute("r").getPixels();return t&&n>0&&(t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()),new BoundingBox(e-n,r-n,e+n,r+n)}},{key:"getMarkers",value:function(){return null}}]),e}(),EllipseElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="ellipse",t}return _inherits(e,PathElement),_createClass(e,[{key:"path",value:function(t){var e=(Math.sqrt(2)-1)/3*4,r=this.getAttribute("rx").getPixels("x"),n=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),a=this.getAttribute("cy").getPixels("y");return t&&(t.beginPath(),t.moveTo(i+r,a),t.bezierCurveTo(i+r,a+e*n,i+e*r,a+n,i,a+n),t.bezierCurveTo(i-e*r,a+n,i-r,a+e*n,i-r,a),t.bezierCurveTo(i-r,a-e*n,i-e*r,a-n,i,a-n),t.bezierCurveTo(i+e*r,a-n,i+r,a-e*n,i+r,a),t.closePath()),new BoundingBox(i-r,a-n,i+r,a+n)}},{key:"getMarkers",value:function(){return null}}]),e}(),LineElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="line",t}return _inherits(e,PathElement),_createClass(e,[{key:"getPoints",value:function(){return[new Point(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Point(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}},{key:"path",value:function(t){var e=this.getPoints(),r=_slicedToArray(e,2),n=r[0],i=n.x,a=n.y,s=r[1],o=s.x,l=s.y;return t&&(t.beginPath(),t.moveTo(i,a),t.lineTo(o,l)),new BoundingBox(i,a,o,l)}},{key:"getMarkers",value:function(){var t=this.getPoints(),e=_slicedToArray(t,2),r=e[0],n=e[1],i=r.angleTo(n);return[[r,i],[n,i]]}}]),e}(),PolylineElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="polyline",i.points=[],i.points=Point.parsePath(i.getAttribute("points").getString()),i}return _inherits(e,PathElement),_createClass(e,[{key:"path",value:function(t){var e=this.points,r=_slicedToArray(e,1)[0],n=r.x,i=r.y,a=new BoundingBox(n,i);return t&&(t.beginPath(),t.moveTo(n,i)),e.forEach(function(e){var r=e.x,n=e.y;a.addPoint(r,n),t&&t.lineTo(r,n)}),a}},{key:"getMarkers",value:function(){var t=this.points,e=t.length-1,r=[];return t.forEach(function(n,i){i!==e&&r.push([n,n.angleTo(t[i+1])])}),r.length>0&&r.push([t[t.length-1],r[r.length-1][1]]),r}}]),e}(),PolygonElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="polygon",t}return _inherits(e,PolylineElement),_createClass(e,[{key:"path",value:function(t){var r=_get(_getPrototypeOf(e.prototype),"path",this).call(this,t),n=_slicedToArray(this.points,1)[0],i=n.x,a=n.y;return t&&(t.lineTo(i,a),t.closePath()),r}}]),e}(),PatternElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="pattern",t}return _inherits(e,Element),_createClass(e,[{key:"createPattern",value:function(t,e,r){var n=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),a=new SVGElement(this.document,null);a.attributes.viewBox=new Property(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.width=new Property(this.document,"width","".concat(n,"px")),a.attributes.height=new Property(this.document,"height","".concat(i,"px")),a.attributes.transform=new Property(this.document,"transform",this.getAttribute("patternTransform").getValue()),a.children=this.children;var s=this.document.createCanvas(n,i),o=s.getContext("2d"),l=this.getAttribute("x"),u=this.getAttribute("y");l.hasValue()&&u.hasValue()&&o.translate(l.getPixels("x",!0),u.getPixels("y",!0)),r.hasValue()?this.styles["fill-opacity"]=r:Reflect.deleteProperty(this.styles,"fill-opacity");for(var h=-1;h<=1;h++)for(var c=-1;c<=1;c++)o.save(),a.attributes.x=new Property(this.document,"x",h*s.width),a.attributes.y=new Property(this.document,"y",c*s.height),a.render(o),o.restore();return t.createPattern(s,"repeat")}}]),e}(),MarkerElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="marker",t}return _inherits(e,Element),_createClass(e,[{key:"render",value:function(t,e,r){if(e){var n=e.x,i=e.y,a=this.getAttribute("orient").getValue("auto"),s=this.getAttribute("markerUnits").getValue("strokeWidth");t.translate(n,i),"auto"===a&&t.rotate(r),"strokeWidth"===s&&t.scale(t.lineWidth,t.lineWidth),t.save();var o=new SVGElement(this.document,null);o.type=this.type,o.attributes.viewBox=new Property(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new Property(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new Property(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new Property(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new Property(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new Property(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new Property(this.document,"fill",this.getAttribute("fill").getValue("black")),o.attributes.stroke=new Property(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),"strokeWidth"===s&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===a&&t.rotate(-r),t.translate(-n,-i)}}}]),e}(),DefsElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="defs",t}return _inherits(e,Element),_createClass(e,[{key:"render",value:function(){}}]),e}(),GElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="g",t}return _inherits(e,RenderedElement),_createClass(e,[{key:"getBoundingBox",value:function(t){var e=new BoundingBox;return this.children.forEach(function(r){e.addBoundingBox(r.getBoundingBox(t))}),e}}]),e}(),GradientElement=function(t){function e(t,r,n){var i;_classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).attributesToInherit=["gradientUnits"],i.stops=[];var a=_assertThisInitialized(i),s=a.stops;return a.children.forEach(function(t){"stop"===t.type&&s.push(t)}),i}return _inherits(e,Element),_createClass(e,[{key:"getGradientUnits",value:function(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}},{key:"createGradient",value:function(t,e,r){var n=this,i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var a=i.stops,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(r,a[a.length-1].color);if(a.forEach(function(t){s.addColorStop(t.offset,n.addParentOpacity(r,t.color))}),this.getAttribute("gradientTransform").hasValue()){var o=this.document,l=o.screen,u=l.MAX_VIRTUAL_PIXELS,h=l.viewPort,c=_slicedToArray(h.viewPorts,1)[0],g=new RectElement(o,null);g.attributes.x=new Property(o,"x",-u/3),g.attributes.y=new Property(o,"y",-u/3),g.attributes.width=new Property(o,"width",u),g.attributes.height=new Property(o,"height",u);var f=new GElement(o,null);f.attributes.transform=new Property(o,"transform",this.getAttribute("gradientTransform").getValue()),f.children=[g];var p=new SVGElement(o,null);p.attributes.x=new Property(o,"x",0),p.attributes.y=new Property(o,"y",0),p.attributes.width=new Property(o,"width",c.width),p.attributes.height=new Property(o,"height",c.height),p.children=[f];var y=o.createCanvas(c.width,c.height),d=y.getContext("2d");return d.fillStyle=s,p.render(d),d.createPattern(y,"no-repeat")}return s}},{key:"inheritStopContainer",value:function(t){var e=this;this.attributesToInherit.forEach(function(r){!e.getAttribute(r).hasValue()&&t.getAttribute(r).hasValue()&&e.getAttribute(r,!0).setValue(t.getAttribute(r).getValue())})}},{key:"addParentOpacity",value:function(t,e){return t.hasValue()?new Property(this.document,"color",e).addOpacity(t).getString():e}}]),e}(),LinearGradientElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="linearGradient",i.attributesToInherit.push("x1","y1","x2","y2"),i}return _inherits(e,GradientElement),_createClass(e,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=r?e.getBoundingBox(t):null;if(r&&!n)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var i=r?n.x+n.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),a=r?n.y+n.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=r?n.x+n.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=r?n.y+n.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===s&&a===o?null:t.createLinearGradient(i,a,s,o)}}]),e}(),RadialGradientElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="radialGradient",i.attributesToInherit.push("cx","cy","r","fx","fy","fr"),i}return _inherits(e,GradientElement),_createClass(e,[{key:"getGradient",value:function(t,e){var r="objectBoundingBox"===this.getGradientUnits(),n=e.getBoundingBox(t);if(r&&!n)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var i=r?n.x+n.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),a=r?n.y+n.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=i,o=a;this.getAttribute("fx").hasValue()&&(s=r?n.x+n.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=r?n.y+n.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=r?(n.width+n.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return t.createRadialGradient(s,o,u,i,a,l)}}]),e}(),StopElement=function(t){function e(t,r,n){var i;_classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="stop";var a=Math.max(0,Math.min(1,i.getAttribute("offset").getNumber())),s=i.getStyle("stop-opacity"),o=i.getStyle("stop-color",!0);return""===o.getString()&&o.setValue("#000"),s.hasValue()&&(o=o.addOpacity(s)),i.offset=a,i.color=o.getString(),i}return _inherits(e,Element),e}(),AnimateElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="animate",i.duration=0,i.initialValue=null,i.initialUnits="",i.removed=!1,i.frozen=!1,t.screen.animations.push(_assertThisInitialized(i)),i.begin=i.getAttribute("begin").getMilliseconds(),i.maxDuration=i.begin+i.getAttribute("dur").getMilliseconds(),i.from=i.getAttribute("from"),i.to=i.getAttribute("to"),i.values=i.getAttribute("values"),i.values.hasValue()&&i.values.setValue(i.values.getString().split(";")),i}return _inherits(e,Element),_createClass(e,[{key:"getProperty",value:function(){var t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}},{key:"calcValue",value:function(){var t=this.initialUnits,e=this.getProgress(),r=e.progress,n=e.from,i=e.to,a=n.getNumber()+(i.getNumber()-n.getNumber())*r;return"%"===t&&(a*=100),"".concat(a).concat(t)}},{key:"update",value:function(t){var e=this.parent,r=this.getProperty();if(this.initialValue||(this.initialValue=r.getString(),this.initialUnits=r.getUnits()),this.duration>this.maxDuration){var n=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==n||this.frozen){if("remove"===n&&!this.removed)return this.removed=!0,r.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e.animationFrozen=!0,e.animationFrozenValue=r.getString();return!1}this.duration+=t;var i=!1;if(this.begin0&&Array.from(a).every(function(t){return 3===t.nodeType});return i.hasText=o,i.text=o?i.getTextFromNode(s):"",i}return _inherits(e,TextElement),_createClass(e,[{key:"getText",value:function(){return this.text}},{key:"renderChildren",value:function(t){if(this.hasText){_get(_getPrototypeOf(e.prototype),"renderChildren",this).call(this,t);var r=this.document,n=this.x,i=this.y,a=r.screen.mouse,s=new Property(r,"fontSize",Font.parse(r.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new BoundingBox(n,i-s.getPixels("y"),n+this.measureText(t),i))}else if(this.children.length>0){var o=new GElement(this.document,null);o.children=this.children,o.parent=this,o.render(t)}}},{key:"onClick",value:function(){var t=this.document.window;t&&t.open(this.getHrefAttribute().getString())}},{key:"onMouseMove",value:function(){this.document.ctx.canvas.style.cursor="pointer"}}]),e}(),TextPathElement=function(t){function e(t,r,n){var i;_classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="textPath",i.textWidth=0,i.textHeight=0,i.pathLength=-1,i.glyphInfo=null,i.letterSpacingCache=[],i.measuresCache=new Map([["",0]]);var a=i.getHrefAttribute().getDefinition();return i.text=i.getTextFromNode(),i.dataArray=i.parsePathData(a),i}return _inherits(e,TextElement),_createClass(e,[{key:"getText",value:function(){return this.text}},{key:"path",value:function(t){var e=this.dataArray;t&&t.beginPath(),e.forEach(function(e){var r=e.command,n=e.points;switch(r){case"L":t&&t.lineTo(n[0],n[1]);break;case"M":t&&t.moveTo(n[0],n[1]);break;case"C":t&&t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"Q":t&&t.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case"A":var i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],h=n[6],c=n[7],g=s>o?s:o,f=s>o?1:s/o,p=s>o?o/s:1;t&&(t.translate(i,a),t.rotate(h),t.scale(f,p),t.arc(0,0,g,l,l+u,Boolean(1-c)),t.scale(1/f,1/p),t.rotate(-h),t.translate(-i,-a));break;case"z":t&&t.closePath()}})}},{key:"renderChildren",value:function(t){this.setTextData(t),t.save();var e=this.parent.getStyle("text-decoration").getString(),r=this.getFontSize(),n=this.glyphInfo,i=t.fillStyle;"underline"===e&&t.beginPath(),n.forEach(function(i,a){var s=i.p0,o=i.p1,l=i.text;t.save(),t.translate(s.x,s.y),t.rotate(n[a].rotation),t.fillStyle&&t.fillText(l,0,0),t.strokeStyle&&t.strokeText(l,0,0),t.restore(),"underline"===e&&(0===a&&t.moveTo(s.x,s.y+r/8),t.lineTo(o.x,o.y+r/5))}),"underline"===e&&(t.lineWidth=r/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}},{key:"getLetterSpacingAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}},{key:"findSegmentToFitChar",value:function(t,e,r,n,i,a,s,o){var l=a,u=this.measureText(t,s);" "===s&&"justify"===e&&r-1&&(l+=this.getLetterSpacingAt(o));var h=this.textHeight/20,c={p0:this.getEquidistantPointOnPath(l,h),p1:this.getEquidistantPointOnPath(l+u,h)};return{offset:l+=u,segment:c}}},{key:"measureText",value:function(t,e){var r=this.measuresCache,n=e||this.getText();if(r.has(n))return r.get(n);var i=this.measureTargetText(t,n);return r.set(n,i),i}},{key:"setTextData",value:function(t){var e=this;if(!this.glyphInfo){var r=this.getText(),n=r.split(""),i=r.split(" ").length-1,a=toNumbers(this.parent.getAttribute("dx").getString("0")),s=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),u=0;o.hasValue()&&"inherit"!==o.getValue()?o.hasValue()&&"initial"!==o.getValue()&&"unset"!==o.getValue()&&(u=o.getPixels()):u=l.getPixels();var h=[],c=r.length;this.letterSpacingCache=h;for(var g=0;g1&&(r*=Math.sqrt(u),n*=Math.sqrt(u));var h=(a===s?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(n,2)-Math.pow(r,2)*Math.pow(l.y,2)-Math.pow(n,2)*Math.pow(l.x,2))/(Math.pow(r,2)*Math.pow(l.y,2)+Math.pow(n,2)*Math.pow(l.x,2)));isNaN(h)&&(h=0);var c=new Point(h*r*l.y/n,h*-n*l.x/r),g=new Point((e.x+o.x)/2+Math.cos(i)*c.x-Math.sin(i)*c.y,(e.y+o.y)/2+Math.sin(i)*c.x+Math.cos(i)*c.y),f=vectorsAngle([1,0],[(l.x-c.x)/r,(l.y-c.y)/n]),p=[(l.x-c.x)/r,(l.y-c.y)/n],y=[(-l.x-c.x)/r,(-l.y-c.y)/n],d=vectorsAngle(p,y);return vectorsRatio(p,y)<=-1&&(d=Math.PI),vectorsRatio(p,y)>=1&&(d=0),0===s&&d>0&&(d-=2*Math.PI),1===s&&d<0&&(d+=2*Math.PI),[g.x,g.y,r,n,f,d,i,s]}}},{key:"calcLength",value:function(t,e,r,n){var i=0,a=null,s=null,o=0;switch(r){case"L":return this.getLineLength(t,e,n[0],n[1]);case"C":for(i=0,a=this.getPointOnCubicBezier(0,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),o=.01;o<=1;o+=.01)s=this.getPointOnCubicBezier(o,t,e,n[0],n[1],n[2],n[3],n[4],n[5]),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case"Q":for(i=0,a=this.getPointOnQuadraticBezier(0,t,e,n[0],n[1],n[2],n[3]),o=.01;o<=1;o+=.01)s=this.getPointOnQuadraticBezier(o,t,e,n[0],n[1],n[2],n[3]),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;return i;case"A":i=0;var l=n[4],u=n[5],h=n[4]+u,c=Math.PI/180;if(Math.abs(l-h)h;o-=c)s=this.getPointOnEllipticalArc(n[0],n[1],n[2],n[3],o,0),i+=this.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(o=l+c;o5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:r,o=(i-r)/(n-e+PSEUDO_ZERO),l=Math.sqrt(t*t/(1+o*o));ne)return null;var i=this.dataArray,a=!0,s=!1,o=void 0;try{for(var l,u=i[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var h=l.value;if(!h||!(h.pathLength<5e-5||r+h.pathLength+5e-5=0&&g>y)break;n=this.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],g,h.points[6]);break;case"C":(g=c/h.pathLength)>1&&(g=1),n=this.getPointOnCubicBezier(g,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3],h.points[4],h.points[5]);break;case"Q":(g=c/h.pathLength)>1&&(g=1),n=this.getPointOnQuadraticBezier(g,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3])}if(n)return n;break}r+=h.pathLength}}catch(t){s=!0,o=t}finally{try{a||null==u.return||u.return()}finally{if(s)throw o}}return null}},{key:"getLineLength",value:function(t,e,r,n){return Math.sqrt((r-t)*(r-t)+(n-e)*(n-e))}},{key:"getPathLength",value:function(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(function(t,e){return e.pathLength>0?t+e.pathLength:t},0)),this.pathLength}},{key:"getPointOnCubicBezier",value:function(t,e,r,n,i,a,s,o,l){return{x:o*CB1(t)+a*CB2(t)+n*CB3(t)+e*CB4(t),y:l*CB1(t)+s*CB2(t)+i*CB3(t)+r*CB4(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,e,r,n,i,a,s){return{x:a*QB1(t)+n*QB2(t)+e*QB3(t),y:s*QB1(t)+i*QB2(t)+r*QB3(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,r,n,i,a){var s=Math.cos(a),o=Math.sin(a),l=r*Math.cos(i),u=n*Math.sin(i);return{x:t+(l*s-u*o),y:e+(l*o+u*s)}}},{key:"buildEquidistantCache",value:function(t,e){var r=this.getPathLength(),n=e||.25,i=t||r/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==n){this.equidistantCache={step:i,precision:n,points:[]};for(var a=0,s=0;s<=r;s+=n){var o=this.getPointOnPath(s),l=this.getPointOnPath(s+n);o&&l&&((a+=this.getLineLength(o.x,o.y,l.x,l.y))>=i&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:s}),a-=i))}}}},{key:"getEquidistantPointOnPath",value:function(t,e,r){if(this.buildEquidistantCache(e,r),t<0||t-this.getPathLength()>5e-5)return null;var n=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[n]||null}}]),e}(),ImageElement=function(t){function e(t,r,n){var i;_classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="image",i.loaded=!1;var a=i.getHrefAttribute().getString();if(!a)return _possibleConstructorReturn(i);var s=/\.svg$/.test(a);return t.images.push(_assertThisInitialized(i)),s?i.loadSvg(a):i.loadImage(a),i.isSvg=s,i}return _inherits(e,RenderedElement),_createClass(e,[{key:"loadImage",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(e){var r;return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.createImage(e);case 3:r=t.sent,this.image=r,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error('ERROR: image "'.concat(e,'" not found'),t.t0);case 10:this.loaded=!0;case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"loadSvg",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(e){var r,n;return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.document.fetch(e);case 3:return r=t.sent,t.next=6,r.text();case 6:n=t.sent,this.image=n,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.error('ERROR: image "'.concat(e,'" not found'),t.t0);case 13:this.loaded=!0;case 14:case"end":return t.stop()}},t,this,[[0,10]])}));return function(e){return t.apply(this,arguments)}}()},{key:"renderChildren",value:function(t){var e=this.document,r=this.image,n=this.loaded,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(n&&r&&s&&o){if(t.save(),this.isSvg)e.canvg.forkString(t,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:i,offsetY:a,scaleWidth:s,scaleHeight:o}).render();else{var l=this.image;t.translate(i,a),e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:l.width,height:o,desiredHeight:l.height}),this.loaded&&(void 0===l.complete||l.complete)&&t.drawImage(l,0,0)}t.restore()}}},{key:"getBoundingBox",value:function(){var t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),r=this.getStyle("width").getPixels("x"),n=this.getStyle("height").getPixels("y");return new BoundingBox(t,e,t+r,e+n)}}]),e}(),SymbolElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="symbol",t}return _inherits(e,RenderedElement),_createClass(e,[{key:"render",value:function(t){}}]),e}(),SVGFontLoader=function(){function t(e){_classCallCheck(this,t),this.document=e,this.loaded=!1,e.fonts.push(this)}return _createClass(t,[{key:"load",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(e,r){var n,i,a;return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this.document,t.next=4,n.canvg.parser.load(r);case 4:i=t.sent,a=i.getElementsByTagName("font"),Array.from(a).forEach(function(t){var r=n.createElement(t);n.definitions[e]=r}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error('ERROR: font "'.concat(r,'" not found'),t.t0);case 12:this.loaded=!0;case 13:case"end":return t.stop()}},t,this,[[0,9]])}));return function(e,r){return t.apply(this,arguments)}}()}]),t}(),StyleElement=function(t){function e(t,r,n){var i;return _classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="style",compressSpaces(Array.from(r.childNodes).map(function(t){return t.data}).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"")).split("}").forEach(function(e){var r=e.trim();if(r){var n=r.split("{"),i=n[0].split(","),a=n[1].split(";");i.forEach(function(e){var r=e.trim();if(r){var n=t.styles[r]||{};if(a.forEach(function(e){var r=e.indexOf(":"),i=e.substr(0,r).trim(),a=e.substr(r+1,e.length-r).trim();i&&a&&(n[i]=new Property(t,i,a))}),t.styles[r]=n,t.stylesSpecificity[r]=getSelectorSpecificity(r),"@font-face"===r){var i=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach(function(e){if(e.indexOf('format("svg")')>0){var r=parseExternalUrl(e);r&&new SVGFontLoader(t).load(i,r)}})}}})}}),i}return _inherits(e,Element),e}();StyleElement.parseExternalUrl=parseExternalUrl;var UseElement=function(t){function e(){var t;return _classCallCheck(this,e),(t=_possibleConstructorReturn(this,_getPrototypeOf(e).apply(this,arguments))).type="use",t}return _inherits(e,RenderedElement),_createClass(e,[{key:"setContext",value:function(t){_get(_getPrototypeOf(e.prototype),"setContext",this).call(this,t);var r=this.getAttribute("x"),n=this.getAttribute("y");r.hasValue()&&t.translate(r.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}},{key:"path",value:function(t){var e=this.element;e&&e.path(t)}},{key:"renderChildren",value:function(t){var e=this.document,r=this.element;if(r){var n=r;if("symbol"===r.type&&((n=new SVGElement(e,null)).attributes.viewBox=new Property(e,"viewBox",r.getAttribute("viewBox").getString()),n.attributes.preserveAspectRatio=new Property(e,"preserveAspectRatio",r.getAttribute("preserveAspectRatio").getString()),n.attributes.overflow=new Property(e,"overflow",r.getAttribute("overflow").getString()),n.children=r.children),"svg"===n.type){var i=this.getStyle("width",!1,!0),a=this.getStyle("height",!1,!0);i.hasValue()&&(n.attributes.width=new Property(e,"width",i.getString())),a.hasValue()&&(n.attributes.height=new Property(e,"height",a.getString()))}var s=n.parent;n.parent=null,n.render(t),n.parent=s}}},{key:"getBoundingBox",value:function(t){var e=this.element;return e?e.getBoundingBox(t):null}},{key:"elementTransform",value:function(){var t=this.document,e=this.element;return Transform.fromElement(t,e)}},{key:"element",get:function(){return this._element||(this._element=this.getHrefAttribute().getDefinition()),this._element}}]),e}();function imGet(t,e,r,n,i,a){return t[r*n*4+4*e+a]}function imSet(t,e,r,n,i,a,s){t[r*n*4+4*e+a]=s}function m(t,e,r){var n=t[e];return n*(n<0?r-255:r)}function c(t,e,r,n){return e+Math.cos(t)*r+Math.sin(t)*n}var FeColorMatrixElement=function(t){function e(t,r,n){var i;_classCallCheck(this,e),(i=_possibleConstructorReturn(this,_getPrototypeOf(e).call(this,t,r,n))).type="feColorMatrix";var a=toNumbers(i.getAttribute("values").getString());switch(i.getAttribute("type").getString("matrix")){case"saturate":var s=a[0];a=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":var o=a[0]*Math.PI/180;a=[c(o,.213,.787,-.213),c(o,.715,-.715,-.715),c(o,.072,-.072,.928),0,0,c(o,.213,-.213,.143),c(o,.715,.285,.14),c(o,.072,-.072,-.283),0,0,c(o,.213,-.213,-.787),c(o,.715,-.715,.715),c(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}return i.matrix=a,i.includeOpacity=i.getAttribute("includeOpacity").hasValue(),i}return _inherits(e,Element),_createClass(e,[{key:"apply",value:function(t,e,r,n,i){for(var a=this.includeOpacity,s=this.matrix,o=t.getImageData(0,0,n,i),l=0;l1&&void 0!==i[1]&&i[1],n=document.createElement("img"),r&&(n.crossOrigin="Anonymous"),t.abrupt("return",new Promise(function(t,r){n.onload=function(){t(n)},n.onerror=function(){r()},n.src=e}));case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}var Document=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.rootEmSize,i=void 0===n?12:n,a=r.emSize,s=void 0===a?12:a,o=r.createCanvas,l=void 0===o?t.createCanvas:o,u=r.createImage,h=void 0===u?t.createImage:u,c=r.anonymousCrossOrigin;_classCallCheck(this,t),this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=i,this.emSize=s,this.createCanvas=l,this.createImage=this.bindCreateImage(h,c),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}return _createClass(t,[{key:"bindCreateImage",value:function(t,e){return"boolean"==typeof e?function(r,n){return t(r,"boolean"==typeof n?n:e)}:t}},{key:"popEmSize",value:function(){this.emSizeStack.pop()}},{key:"getUniqueId",value:function(){return"canvg".concat(++this.uniqueId)}},{key:"isImagesLoaded",value:function(){return this.images.every(function(t){return t.loaded})}},{key:"isFontsLoaded",value:function(){return this.fonts.every(function(t){return t.loaded})}},{key:"createDocumentElement",value:function(t){var e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}},{key:"createElement",value:function(e){var r=e.nodeName.replace(/^[^:]+:/,""),n=t.elementTypes[r];return void 0!==n?new n(this,e):new UnknownElement(this,e)}},{key:"createTextNode",value:function(t){return new TextNode(this,t)}},{key:"setViewBox",value:function(t){this.screen.setViewBox(_objectSpread({document:this},t))}},{key:"window",get:function(){return this.screen.window}},{key:"fetch",get:function(){return this.screen.fetch}},{key:"ctx",get:function(){return this.screen.ctx}},{key:"emSize",get:function(){var t=this.emSizeStack;return t[t.length-1]},set:function(t){this.emSizeStack.push(t)}}]),t}();function ownKeys$1(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function _objectSpread$1(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,t),this.parser=new Parser(n),this.screen=new Screen(e,n),this.options=n;var i=new Document(this,n),a=i.createDocumentElement(r);this.document=i,this.documentElement=a}return _createClass(t,[{key:"fork",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.from(e,r,_objectSpread$1({},this.options,{},n))}},{key:"forkString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.fromString(e,r,_objectSpread$1({},this.options,{},n))}},{key:"ready",value:function(){return this.screen.ready()}},{key:"isReady",value:function(){return this.screen.isReady()}},{key:"render",value:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(){var e,r=arguments;return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.start(_objectSpread$1({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},e)),t.next=4,this.ready();case 4:this.stop();case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.documentElement,r=this.screen,n=this.options;r.start(e,_objectSpread$1({enableRedraw:!0},n,{},t))}},{key:"stop",value:function(){this.screen.stop()}},{key:"resize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,r)}}],[{key:"from",value:function(){var e=_asyncToGenerator(_regeneratorRuntime.mark(function e(r,n){var i,a,s,o=arguments;return _regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.length>2&&void 0!==o[2]?o[2]:{},a=new Parser(i),e.next=4,a.parse(n);case 4:return s=e.sent,e.abrupt("return",new t(r,s,i));case 6:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"fromString",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new t(e,new Parser(n).parseFromString(r),n)}}]),t}();function offscreen(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).DOMParser,e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:function(t,e){return new OffscreenCanvas(t,e)},createImage:function(){var t=_asyncToGenerator(_regeneratorRuntime.mark(function t(e){var r,n,i;return _regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e);case 2:return r=t.sent,t.next=5,r.blob();case 5:return n=t.sent,t.next=8,createImageBitmap(n);case 8:return i=t.sent,t.abrupt("return",i);case 10:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()};return"undefined"==typeof DOMParser&&void 0!==t||Reflect.deleteProperty(e,"DOMParser"),e}function node(t){var e=t.DOMParser,r=t.canvas;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:t.fetch,createCanvas:r.createCanvas,createImage:r.loadImage}}var index=Object.freeze({__proto__:null,offscreen:offscreen,node:node});exports.AElement=AElement,exports.AnimateColorElement=AnimateColorElement,exports.AnimateElement=AnimateElement,exports.AnimateTransformElement=AnimateTransformElement,exports.BoundingBox=BoundingBox,exports.CB1=CB1,exports.CB2=CB2,exports.CB3=CB3,exports.CB4=CB4,exports.Canvg=Canvg,exports.CircleElement=CircleElement,exports.ClipPathElement=ClipPathElement,exports.DefsElement=DefsElement,exports.DescElement=DescElement,exports.Document=Document,exports.Element=Element,exports.EllipseElement=EllipseElement,exports.FeColorMatrixElement=FeColorMatrixElement,exports.FeCompositeElement=FeCompositeElement,exports.FeDropShadowElement=FeDropShadowElement,exports.FeGaussianBlurElement=FeGaussianBlurElement,exports.FeMorphologyElement=FeMorphologyElement,exports.FilterElement=FilterElement,exports.Font=Font,exports.FontElement=FontElement,exports.FontFaceElement=FontFaceElement,exports.GElement=GElement,exports.GlyphElement=GlyphElement,exports.GradientElement=GradientElement,exports.ImageElement=ImageElement,exports.LineElement=LineElement,exports.LinearGradientElement=LinearGradientElement,exports.MarkerElement=MarkerElement,exports.MaskElement=MaskElement,exports.Matrix=Matrix,exports.MissingGlyphElement=MissingGlyphElement,exports.Mouse=Mouse,exports.PSEUDO_ZERO=PSEUDO_ZERO,exports.Parser=Parser,exports.PathElement=PathElement,exports.PathParser=PathParser,exports.PatternElement=PatternElement,exports.Point=Point,exports.PolygonElement=PolygonElement,exports.PolylineElement=PolylineElement,exports.Property=Property,exports.QB1=QB1,exports.QB2=QB2,exports.QB3=QB3,exports.RadialGradientElement=RadialGradientElement,exports.RectElement=RectElement,exports.RenderedElement=RenderedElement,exports.Rotate=Rotate,exports.SVGElement=SVGElement,exports.SVGFontLoader=SVGFontLoader,exports.Scale=Scale,exports.Screen=Screen,exports.Skew=Skew,exports.SkewX=SkewX,exports.SkewY=SkewY,exports.StopElement=StopElement,exports.StyleElement=StyleElement,exports.SymbolElement=SymbolElement,exports.TRefElement=TRefElement,exports.TSpanElement=TSpanElement,exports.TextElement=TextElement,exports.TextPathElement=TextPathElement,exports.TitleElement=TitleElement,exports.Transform=Transform,exports.Translate=Translate,exports.UnknownElement=UnknownElement,exports.UseElement=UseElement,exports.ViewPort=ViewPort,exports.compressSpaces=compressSpaces,exports.default=Canvg,exports.getSelectorSpecificity=getSelectorSpecificity,exports.normalizeAttributeName=normalizeAttributeName,exports.parseExternalUrl=parseExternalUrl,exports.presets=index,exports.toNumbers=toNumbers,exports.trimLeft=trimLeft,exports.trimRight=trimRight,exports.vectorMagnitude=vectorMagnitude,exports.vectorsAngle=vectorsAngle,exports.vectorsRatio=vectorsRatio; }).call(this,require('_process')) },{"@babel/runtime/helpers/assertThisInitialized":9,"@babel/runtime/helpers/asyncToGenerator":10,"@babel/runtime/helpers/classCallCheck":11,"@babel/runtime/helpers/createClass":12,"@babel/runtime/helpers/defineProperty":13,"@babel/runtime/helpers/get":14,"@babel/runtime/helpers/getPrototypeOf":15,"@babel/runtime/helpers/inherits":16,"@babel/runtime/helpers/possibleConstructorReturn":19,"@babel/runtime/helpers/slicedToArray":21,"@babel/runtime/regenerator":24,"_process":194,"core-js/modules/es.array.concat":146,"core-js/modules/es.array.every":147,"core-js/modules/es.array.fill":148,"core-js/modules/es.array.filter":149,"core-js/modules/es.array.for-each":150,"core-js/modules/es.array.from":151,"core-js/modules/es.array.includes":152,"core-js/modules/es.array.index-of":153,"core-js/modules/es.array.iterator":154,"core-js/modules/es.array.join":155,"core-js/modules/es.array.map":156,"core-js/modules/es.array.reduce":157,"core-js/modules/es.array.reverse":158,"core-js/modules/es.array.some":159,"core-js/modules/es.date.to-string":160,"core-js/modules/es.function.name":161,"core-js/modules/es.map":162,"core-js/modules/es.number.constructor":163,"core-js/modules/es.object.define-properties":164,"core-js/modules/es.object.define-property":165,"core-js/modules/es.object.get-own-property-descriptor":166,"core-js/modules/es.object.get-own-property-descriptors":167,"core-js/modules/es.object.keys":168,"core-js/modules/es.object.to-string":169,"core-js/modules/es.parse-float":170,"core-js/modules/es.parse-int":171,"core-js/modules/es.promise":172,"core-js/modules/es.reflect.apply":173,"core-js/modules/es.reflect.delete-property":174,"core-js/modules/es.reflect.get-prototype-of":175,"core-js/modules/es.regexp.exec":176,"core-js/modules/es.regexp.to-string":177,"core-js/modules/es.string.includes":178,"core-js/modules/es.string.iterator":179,"core-js/modules/es.string.match":180,"core-js/modules/es.string.replace":181,"core-js/modules/es.string.split":182,"core-js/modules/es.string.trim":183,"core-js/modules/es.symbol":186,"core-js/modules/es.symbol.description":184,"core-js/modules/es.symbol.iterator":185,"core-js/modules/web.dom-collections.for-each":187,"core-js/modules/web.dom-collections.iterator":188,"raf":195,"rgbcolor":197,"stackblur-canvas":198}],26:[function(require,module,exports){ module.exports=function(n){if("function"!=typeof n)throw TypeError(String(n)+" is not a function");return n}; },{}],27:[function(require,module,exports){ var isObject=require("../internals/is-object");module.exports=function(r){if(!isObject(r)&&null!==r)throw TypeError("Can't set "+String(r)+" as a prototype");return r}; },{"../internals/is-object":85}],28:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol"),create=require("../internals/object-create"),definePropertyModule=require("../internals/object-define-property"),UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;void 0==ArrayPrototype[UNSCOPABLES]&&definePropertyModule.f(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create(null)}),module.exports=function(e){ArrayPrototype[UNSCOPABLES][e]=!0}; },{"../internals/object-create":99,"../internals/object-define-property":101,"../internals/well-known-symbol":144}],29:[function(require,module,exports){ "use strict";var charAt=require("../internals/string-multibyte").charAt;module.exports=function(t,r,e){return r+(e?charAt(t,r).length:1)}; },{"../internals/string-multibyte":130}],30:[function(require,module,exports){ module.exports=function(o,r,n){if(!(o instanceof r))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return o}; },{}],31:[function(require,module,exports){ var isObject=require("../internals/is-object");module.exports=function(r){if(!isObject(r))throw TypeError(String(r)+" is not an object");return r}; },{"../internals/is-object":85}],32:[function(require,module,exports){ "use strict";var toObject=require("../internals/to-object"),toAbsoluteIndex=require("../internals/to-absolute-index"),toLength=require("../internals/to-length");module.exports=function(t){for(var e=toObject(this),o=toLength(e.length),n=arguments.length,r=toAbsoluteIndex(n>1?arguments[1]:void 0,o),i=n>2?arguments[2]:void 0,l=void 0===i?o:toAbsoluteIndex(i,o);l>r;)e[r++]=t;return e}; },{"../internals/to-absolute-index":134,"../internals/to-length":137,"../internals/to-object":138}],33:[function(require,module,exports){ "use strict";var $forEach=require("../internals/array-iteration").forEach,arrayMethodIsStrict=require("../internals/array-method-is-strict"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),STRICT_METHOD=arrayMethodIsStrict("forEach"),USES_TO_LENGTH=arrayMethodUsesToLength("forEach");module.exports=STRICT_METHOD&&USES_TO_LENGTH?[].forEach:function(r){return $forEach(this,r,arguments.length>1?arguments[1]:void 0)}; },{"../internals/array-iteration":36,"../internals/array-method-is-strict":38,"../internals/array-method-uses-to-length":39}],34:[function(require,module,exports){ "use strict";var bind=require("../internals/function-bind-context"),toObject=require("../internals/to-object"),callWithSafeIterationClosing=require("../internals/call-with-safe-iteration-closing"),isArrayIteratorMethod=require("../internals/is-array-iterator-method"),toLength=require("../internals/to-length"),createProperty=require("../internals/create-property"),getIteratorMethod=require("../internals/get-iterator-method");module.exports=function(e){var t,r,i,o,n,a,l=toObject(e),s="function"==typeof this?this:Array,c=arguments.length,h=c>1?arguments[1]:void 0,d=void 0!==h,u=getIteratorMethod(l),g=0;if(d&&(h=bind(h,c>2?arguments[2]:void 0,2)),void 0==u||s==Array&&isArrayIteratorMethod(u))for(r=new s(t=toLength(l.length));t>g;g++)a=d?h(l[g],g):l[g],createProperty(r,g,a);else for(n=(o=u.call(l)).next,r=new s;!(i=n.call(o)).done;g++)a=d?callWithSafeIterationClosing(o,h,[i.value,g],!0):i.value,createProperty(r,g,a);return r.length=g,r}; },{"../internals/call-with-safe-iteration-closing":42,"../internals/create-property":54,"../internals/function-bind-context":68,"../internals/get-iterator-method":70,"../internals/is-array-iterator-method":82,"../internals/to-length":137,"../internals/to-object":138}],35:[function(require,module,exports){ var toIndexedObject=require("../internals/to-indexed-object"),toLength=require("../internals/to-length"),toAbsoluteIndex=require("../internals/to-absolute-index"),createMethod=function(e){return function(t,n,r){var o,i=toIndexedObject(t),d=toLength(i.length),u=toAbsoluteIndex(r,d);if(e&&n!=n){for(;d>u;)if((o=i[u++])!=o)return!0}else for(;d>u;u++)if((e||u in i)&&i[u]===n)return e||u||0;return!e&&-1}};module.exports={includes:createMethod(!0),indexOf:createMethod(!1)}; },{"../internals/to-absolute-index":134,"../internals/to-indexed-object":135,"../internals/to-length":137}],36:[function(require,module,exports){ var bind=require("../internals/function-bind-context"),IndexedObject=require("../internals/indexed-object"),toObject=require("../internals/to-object"),toLength=require("../internals/to-length"),arraySpeciesCreate=require("../internals/array-species-create"),push=[].push,createMethod=function(e){var t=1==e,r=2==e,n=3==e,a=4==e,i=6==e,c=5==e||i;return function(o,d,s,u){for(var h,l,f=toObject(o),b=IndexedObject(f),p=bind(d,s,3),M=toLength(b.length),j=0,x=u||arraySpeciesCreate,q=t?x(o,M):r?x(o,0):void 0;M>j;j++)if((c||j in b)&&(l=p(h=b[j],j,f),e))if(t)q[j]=l;else if(l)switch(e){case 3:return!0;case 5:return h;case 6:return j;case 2:push.call(q,h)}else if(a)return!1;return i?-1:n||a?a:q}};module.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}; },{"../internals/array-species-create":41,"../internals/function-bind-context":68,"../internals/indexed-object":77,"../internals/to-length":137,"../internals/to-object":138}],37:[function(require,module,exports){ var fails=require("../internals/fails"),wellKnownSymbol=require("../internals/well-known-symbol"),V8_VERSION=require("../internals/engine-v8-version"),SPECIES=wellKnownSymbol("species");module.exports=function(n){return V8_VERSION>=51||!fails(function(){var e=[];return(e.constructor={})[SPECIES]=function(){return{foo:1}},1!==e[n](Boolean).foo})}; },{"../internals/engine-v8-version":62,"../internals/fails":65,"../internals/well-known-symbol":144}],38:[function(require,module,exports){ "use strict";var fails=require("../internals/fails");module.exports=function(n,r){var i=[][n];return!!i&&fails(function(){i.call(null,r||function(){throw 1},1)})}; },{"../internals/fails":65}],39:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),fails=require("../internals/fails"),has=require("../internals/has"),defineProperty=Object.defineProperty,cache={},thrower=function(e){throw e};module.exports=function(e,r){if(has(cache,e))return cache[e];r||(r={});var a=[][e],t=!!has(r,"ACCESSORS")&&r.ACCESSORS,n=has(r,0)?r[0]:thrower,i=has(r,1)?r[1]:void 0;return cache[e]=!!a&&!fails(function(){if(t&&!DESCRIPTORS)return!0;var e={length:-1};t?defineProperty(e,1,{enumerable:!0,get:thrower}):e[1]=1,a.call(e,n,i)})}; },{"../internals/descriptors":57,"../internals/fails":65,"../internals/has":72}],40:[function(require,module,exports){ var aFunction=require("../internals/a-function"),toObject=require("../internals/to-object"),IndexedObject=require("../internals/indexed-object"),toLength=require("../internals/to-length"),createMethod=function(e){return function(t,r,n,i){aFunction(r);var o=toObject(t),a=IndexedObject(o),c=toLength(o.length),u=e?c-1:0,d=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=d;break}if(u+=d,e?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:c>u;u+=d)u in a&&(i=r(i,a[u],u,o));return i}};module.exports={left:createMethod(!1),right:createMethod(!0)}; },{"../internals/a-function":26,"../internals/indexed-object":77,"../internals/to-length":137,"../internals/to-object":138}],41:[function(require,module,exports){ var isObject=require("../internals/is-object"),isArray=require("../internals/is-array"),wellKnownSymbol=require("../internals/well-known-symbol"),SPECIES=wellKnownSymbol("species");module.exports=function(r,e){var n;return isArray(r)&&("function"!=typeof(n=r.constructor)||n!==Array&&!isArray(n.prototype)?isObject(n)&&null===(n=n[SPECIES])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}; },{"../internals/is-array":83,"../internals/is-object":85,"../internals/well-known-symbol":144}],42:[function(require,module,exports){ var anObject=require("../internals/an-object");module.exports=function(r,t,e,n){try{return n?t(anObject(e)[0],e[1]):t(e)}catch(t){var a=r.return;throw void 0!==a&&anObject(a.call(r)),t}}; },{"../internals/an-object":31}],43:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol"),ITERATOR=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(r){}module.exports=function(r,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var e={};e[ITERATOR]=function(){return{next:function(){return{done:n=!0}}}},r(e)}catch(r){}return n}; },{"../internals/well-known-symbol":144}],44:[function(require,module,exports){ var toString={}.toString;module.exports=function(t){return toString.call(t).slice(8,-1)}; },{}],45:[function(require,module,exports){ var TO_STRING_TAG_SUPPORT=require("../internals/to-string-tag-support"),classofRaw=require("../internals/classof-raw"),wellKnownSymbol=require("../internals/well-known-symbol"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(n,t){try{return n[t]}catch(n){}};module.exports=TO_STRING_TAG_SUPPORT?classofRaw:function(n){var t,e,r;return void 0===n?"Undefined":null===n?"Null":"string"==typeof(e=tryGet(t=Object(n),TO_STRING_TAG))?e:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(r=classofRaw(t))&&"function"==typeof t.callee?"Arguments":r}; },{"../internals/classof-raw":44,"../internals/to-string-tag-support":140,"../internals/well-known-symbol":144}],46:[function(require,module,exports){ "use strict";var defineProperty=require("../internals/object-define-property").f,create=require("../internals/object-create"),redefineAll=require("../internals/redefine-all"),bind=require("../internals/function-bind-context"),anInstance=require("../internals/an-instance"),iterate=require("../internals/iterate"),defineIterator=require("../internals/define-iterator"),setSpecies=require("../internals/set-species"),DESCRIPTORS=require("../internals/descriptors"),fastKey=require("../internals/internal-metadata").fastKey,InternalStateModule=require("../internals/internal-state"),setInternalState=InternalStateModule.set,internalStateGetterFor=InternalStateModule.getterFor;module.exports={getConstructor:function(e,t,r,n){var i=e(function(e,a){anInstance(e,i,t),setInternalState(e,{type:t,index:create(null),first:void 0,last:void 0,size:0}),DESCRIPTORS||(e.size=0),void 0!=a&&iterate(a,e[n],e,r)}),a=internalStateGetterFor(t),s=function(e,t,r){var n,i,s=a(e),u=o(e,t);return u?u.value=r:(s.last=u={index:i=fastKey(t,!0),key:t,value:r,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=u),n&&(n.next=u),DESCRIPTORS?s.size++:e.size++,"F"!==i&&(s.index[i]=u)),e},o=function(e,t){var r,n=a(e),i=fastKey(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return redefineAll(i.prototype,{clear:function(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,DESCRIPTORS?e.size=0:this.size=0},delete:function(e){var t=a(this),r=o(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=n),n&&(n.previous=i),t.first==r&&(t.first=n),t.last==r&&(t.last=i),DESCRIPTORS?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=a(this),n=bind(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!o(this,e)}}),redefineAll(i.prototype,r?{get:function(e){var t=o(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),DESCRIPTORS&&defineProperty(i.prototype,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=internalStateGetterFor(t),a=internalStateGetterFor(n);defineIterator(e,t,function(e,t){setInternalState(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),setSpecies(t)}}; },{"../internals/an-instance":30,"../internals/define-iterator":55,"../internals/descriptors":57,"../internals/function-bind-context":68,"../internals/internal-metadata":80,"../internals/internal-state":81,"../internals/iterate":88,"../internals/object-create":99,"../internals/object-define-property":101,"../internals/redefine-all":116,"../internals/set-species":124}],47:[function(require,module,exports){ "use strict";var $=require("../internals/export"),global=require("../internals/global"),isForced=require("../internals/is-forced"),redefine=require("../internals/redefine"),InternalMetadataModule=require("../internals/internal-metadata"),iterate=require("../internals/iterate"),anInstance=require("../internals/an-instance"),isObject=require("../internals/is-object"),fails=require("../internals/fails"),checkCorrectnessOfIteration=require("../internals/check-correctness-of-iteration"),setToStringTag=require("../internals/set-to-string-tag"),inheritIfRequired=require("../internals/inherit-if-required");module.exports=function(e,t,r){var n=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=n?"set":"add",s=global[e],o=s&&s.prototype,c=s,l={},u=function(e){var t=o[e];redefine(o,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!isObject(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return i&&!isObject(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!isObject(e))&&t.call(this,0===e?0:e)}:function(e,r){return t.call(this,0===e?0:e,r),this})};if(isForced(e,"function"!=typeof s||!(i||o.forEach&&!fails(function(){(new s).entries().next()}))))c=r.getConstructor(t,e,n,a),InternalMetadataModule.REQUIRED=!0;else if(isForced(e,!0)){var f=new c,d=f[a](i?{}:-0,1)!=f,h=fails(function(){f.has(1)}),q=checkCorrectnessOfIteration(function(e){new s(e)}),g=!i&&fails(function(){for(var e=new s,t=5;t--;)e[a](t,t);return!e.has(-0)});q||((c=t(function(t,r){anInstance(t,c,e);var i=inheritIfRequired(new s,t,c);return void 0!=r&&iterate(r,i[a],i,n),i})).prototype=o,o.constructor=c),(h||g)&&(u("delete"),u("has"),n&&u("get")),(g||d)&&u(a),i&&o.clear&&delete o.clear}return l[e]=c,$({global:!0,forced:c!=s},l),setToStringTag(c,e),i||r.setStrong(c,e,n),c}; },{"../internals/an-instance":30,"../internals/check-correctness-of-iteration":43,"../internals/export":64,"../internals/fails":65,"../internals/global":71,"../internals/inherit-if-required":78,"../internals/internal-metadata":80,"../internals/is-forced":84,"../internals/is-object":85,"../internals/iterate":88,"../internals/redefine":117,"../internals/set-to-string-tag":125}],48:[function(require,module,exports){ var has=require("../internals/has"),ownKeys=require("../internals/own-keys"),getOwnPropertyDescriptorModule=require("../internals/object-get-own-property-descriptor"),definePropertyModule=require("../internals/object-define-property");module.exports=function(e,r){for(var o=ownKeys(r),t=definePropertyModule.f,n=getOwnPropertyDescriptorModule.f,i=0;i=74)&&(match=userAgent.match(/Chrome\/(\d+)/))&&(version=match[1]),module.exports=version&&+version; },{"../internals/engine-user-agent":61,"../internals/global":71}],63:[function(require,module,exports){ module.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]; },{}],64:[function(require,module,exports){ var global=require("../internals/global"),getOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),redefine=require("../internals/redefine"),setGlobal=require("../internals/set-global"),copyConstructorProperties=require("../internals/copy-constructor-properties"),isForced=require("../internals/is-forced");module.exports=function(e,r){var o,t,n,i,a,l=e.target,s=e.global,p=e.stat;if(o=s?global:p?global[l]||setGlobal(l,{}):(global[l]||{}).prototype)for(t in r){if(i=r[t],n=e.noTargetGet?(a=getOwnPropertyDescriptor(o,t))&&a.value:o[t],!isForced(s?t:l+(p?".":"#")+t,e.forced)&&void 0!==n){if(typeof i==typeof n)continue;copyConstructorProperties(i,n)}(e.sham||n&&n.sham)&&createNonEnumerableProperty(i,"sham",!0),redefine(o,t,i,e)}}; },{"../internals/copy-constructor-properties":48,"../internals/create-non-enumerable-property":52,"../internals/global":71,"../internals/is-forced":84,"../internals/object-get-own-property-descriptor":102,"../internals/redefine":117,"../internals/set-global":123}],65:[function(require,module,exports){ module.exports=function(r){try{return!!r()}catch(r){return!0}}; },{}],66:[function(require,module,exports){ "use strict";require("../modules/es.regexp.exec");var redefine=require("../internals/redefine"),fails=require("../internals/fails"),wellKnownSymbol=require("../internals/well-known-symbol"),regexpExec=require("../internals/regexp-exec"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),SPECIES=wellKnownSymbol("species"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}),REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REPLACE=wellKnownSymbol("replace"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var E="ab".split(e);return 2!==E.length||"a"!==E[0]||"b"!==E[1]});module.exports=function(e,r,E,n){var t=wellKnownSymbol(e),l=!fails(function(){var r={};return r[t]=function(){return 7},7!=""[e](r)}),a=l&&!fails(function(){var r=!1,E=/a/;return"split"===e&&((E={}).constructor={},E.constructor[SPECIES]=function(){return E},E.flags="",E[t]=/./[t]),E.exec=function(){return r=!0,null},E[t](""),!r});if(!l||!a||"replace"===e&&(!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE)||"split"===e&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var o=/./[t],i=E(t,""[e],function(e,r,E,n,t){return r.exec===regexpExec?l&&!t?{done:!0,value:o.call(r,E,n)}:{done:!0,value:e.call(E,r,n)}:{done:!1}},{REPLACE_KEEPS_$0:REPLACE_KEEPS_$0,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE}),u=i[0],c=i[1];redefine(String.prototype,e,u),redefine(RegExp.prototype,t,2==r?function(e,r){return c.call(e,this,r)}:function(e){return c.call(e,this)})}n&&createNonEnumerableProperty(RegExp.prototype[t],"sham",!0)}; },{"../internals/create-non-enumerable-property":52,"../internals/fails":65,"../internals/redefine":117,"../internals/regexp-exec":119,"../internals/well-known-symbol":144,"../modules/es.regexp.exec":176}],67:[function(require,module,exports){ var fails=require("../internals/fails");module.exports=!fails(function(){return Object.isExtensible(Object.preventExtensions({}))}); },{"../internals/fails":65}],68:[function(require,module,exports){ var aFunction=require("../internals/a-function");module.exports=function(n,r,t){if(aFunction(n),void 0===r)return n;switch(t){case 0:return function(){return n.call(r)};case 1:return function(t){return n.call(r,t)};case 2:return function(t,u){return n.call(r,t,u)};case 3:return function(t,u,e){return n.call(r,t,u,e)}}return function(){return n.apply(r,arguments)}}; },{"../internals/a-function":26}],69:[function(require,module,exports){ var path=require("../internals/path"),global=require("../internals/global"),aFunction=function(n){return"function"==typeof n?n:void 0};module.exports=function(n,t){return arguments.length<2?aFunction(path[n])||aFunction(global[n]):path[n]&&path[n][t]||global[n]&&global[n][t]}; },{"../internals/global":71,"../internals/path":113}],70:[function(require,module,exports){ var classof=require("../internals/classof"),Iterators=require("../internals/iterators"),wellKnownSymbol=require("../internals/well-known-symbol"),ITERATOR=wellKnownSymbol("iterator");module.exports=function(r){if(void 0!=r)return r[ITERATOR]||r["@@iterator"]||Iterators[classof(r)]}; },{"../internals/classof":45,"../internals/iterators":90,"../internals/well-known-symbol":144}],71:[function(require,module,exports){ (function (global){ var check=function(e){return e&&e.Math==Math&&e};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")(); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],72:[function(require,module,exports){ var hasOwnProperty={}.hasOwnProperty;module.exports=function(r,e){return hasOwnProperty.call(r,e)}; },{}],73:[function(require,module,exports){ module.exports={}; },{}],74:[function(require,module,exports){ var global=require("../internals/global");module.exports=function(r,o){var e=global.console;e&&e.error&&(1===arguments.length?e.error(r):e.error(r,o))}; },{"../internals/global":71}],75:[function(require,module,exports){ var getBuiltIn=require("../internals/get-built-in");module.exports=getBuiltIn("document","documentElement"); },{"../internals/get-built-in":69}],76:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),fails=require("../internals/fails"),createElement=require("../internals/document-create-element");module.exports=!DESCRIPTORS&&!fails(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}); },{"../internals/descriptors":57,"../internals/document-create-element":58,"../internals/fails":65}],77:[function(require,module,exports){ var fails=require("../internals/fails"),classof=require("../internals/classof-raw"),split="".split;module.exports=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(r){return"String"==classof(r)?split.call(r,""):Object(r)}:Object; },{"../internals/classof-raw":44,"../internals/fails":65}],78:[function(require,module,exports){ var isObject=require("../internals/is-object"),setPrototypeOf=require("../internals/object-set-prototype-of");module.exports=function(t,e,o){var r,p;return setPrototypeOf&&"function"==typeof(r=e.constructor)&&r!==o&&isObject(p=r.prototype)&&p!==o.prototype&&setPrototypeOf(t,p),t}; },{"../internals/is-object":85,"../internals/object-set-prototype-of":110}],79:[function(require,module,exports){ var store=require("../internals/shared-store"),functionToString=Function.toString;"function"!=typeof store.inspectSource&&(store.inspectSource=function(t){return functionToString.call(t)}),module.exports=store.inspectSource; },{"../internals/shared-store":127}],80:[function(require,module,exports){ var hiddenKeys=require("../internals/hidden-keys"),isObject=require("../internals/is-object"),has=require("../internals/has"),defineProperty=require("../internals/object-define-property").f,uid=require("../internals/uid"),FREEZING=require("../internals/freezing"),METADATA=uid("meta"),id=0,isExtensible=Object.isExtensible||function(){return!0},setMetadata=function(e){defineProperty(e,METADATA,{value:{objectID:"O"+ ++id,weakData:{}}})},fastKey=function(e,t){if(!isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!has(e,METADATA)){if(!isExtensible(e))return"F";if(!t)return"E";setMetadata(e)}return e[METADATA].objectID},getWeakData=function(e,t){if(!has(e,METADATA)){if(!isExtensible(e))return!0;if(!t)return!1;setMetadata(e)}return e[METADATA].weakData},onFreeze=function(e){return FREEZING&&meta.REQUIRED&&isExtensible(e)&&!has(e,METADATA)&&setMetadata(e),e},meta=module.exports={REQUIRED:!1,fastKey:fastKey,getWeakData:getWeakData,onFreeze:onFreeze};hiddenKeys[METADATA]=!0; },{"../internals/freezing":67,"../internals/has":72,"../internals/hidden-keys":73,"../internals/is-object":85,"../internals/object-define-property":101,"../internals/uid":141}],81:[function(require,module,exports){ var set,get,has,NATIVE_WEAK_MAP=require("../internals/native-weak-map"),global=require("../internals/global"),isObject=require("../internals/is-object"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),objectHas=require("../internals/has"),sharedKey=require("../internals/shared-key"),hiddenKeys=require("../internals/hidden-keys"),WeakMap=global.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(e){return function(r){var t;if(!isObject(r)||(t=get(r)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return t}};if(NATIVE_WEAK_MAP){var store=new WeakMap,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(e,r){return wmset.call(store,e,r),r},get=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(e,r){return createNonEnumerableProperty(e,STATE,r),r},get=function(e){return objectHas(e,STATE)?e[STATE]:{}},has=function(e){return objectHas(e,STATE)}}module.exports={set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}; },{"../internals/create-non-enumerable-property":52,"../internals/global":71,"../internals/has":72,"../internals/hidden-keys":73,"../internals/is-object":85,"../internals/native-weak-map":94,"../internals/shared-key":126}],82:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol"),Iterators=require("../internals/iterators"),ITERATOR=wellKnownSymbol("iterator"),ArrayPrototype=Array.prototype;module.exports=function(r){return void 0!==r&&(Iterators.Array===r||ArrayPrototype[ITERATOR]===r)}; },{"../internals/iterators":90,"../internals/well-known-symbol":144}],83:[function(require,module,exports){ var classof=require("../internals/classof-raw");module.exports=Array.isArray||function(r){return"Array"==classof(r)}; },{"../internals/classof-raw":44}],84:[function(require,module,exports){ var fails=require("../internals/fails"),replacement=/#|\.prototype\./,isForced=function(e,r){var a=data[normalize(e)];return a==POLYFILL||a!=NATIVE&&("function"==typeof r?fails(r):!!r)},normalize=isForced.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P";module.exports=isForced; },{"../internals/fails":65}],85:[function(require,module,exports){ module.exports=function(o){return"object"==typeof o?null!==o:"function"==typeof o}; },{}],86:[function(require,module,exports){ module.exports=!1; },{}],87:[function(require,module,exports){ var isObject=require("../internals/is-object"),classof=require("../internals/classof-raw"),wellKnownSymbol=require("../internals/well-known-symbol"),MATCH=wellKnownSymbol("match");module.exports=function(e){var l;return isObject(e)&&(void 0!==(l=e[MATCH])?!!l:"RegExp"==classof(e))}; },{"../internals/classof-raw":44,"../internals/is-object":85,"../internals/well-known-symbol":144}],88:[function(require,module,exports){ var anObject=require("../internals/an-object"),isArrayIteratorMethod=require("../internals/is-array-iterator-method"),toLength=require("../internals/to-length"),bind=require("../internals/function-bind-context"),getIteratorMethod=require("../internals/get-iterator-method"),callWithSafeIterationClosing=require("../internals/call-with-safe-iteration-closing"),Result=function(t,e){this.stopped=t,this.result=e},iterate=module.exports=function(t,e,r,n,i){var o,a,l,s,u,f,c,h=bind(e,r,n?2:1);if(i)o=t;else{if("function"!=typeof(a=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(a)){for(l=0,s=toLength(t.length);s>l;l++)if((u=n?h(anObject(c=t[l])[0],c[1]):h(t[l]))&&u instanceof Result)return u;return new Result(!1)}o=a.call(t)}for(f=o.next;!(c=f.call(o)).done;)if("object"==typeof(u=callWithSafeIterationClosing(o,h,c.value,n))&&u&&u instanceof Result)return u;return new Result(!1)};iterate.stop=function(t){return new Result(!0,t)}; },{"../internals/an-object":31,"../internals/call-with-safe-iteration-closing":42,"../internals/function-bind-context":68,"../internals/get-iterator-method":70,"../internals/is-array-iterator-method":82,"../internals/to-length":137}],89:[function(require,module,exports){ "use strict";var IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator,getPrototypeOf=require("../internals/object-get-prototype-of"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),has=require("../internals/has"),wellKnownSymbol=require("../internals/well-known-symbol"),IS_PURE=require("../internals/is-pure"),ITERATOR=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,returnThis=function(){return this};[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf(getPrototypeOf(arrayIterator)))!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS=!0),void 0==IteratorPrototype&&(IteratorPrototype={}),IS_PURE||has(IteratorPrototype,ITERATOR)||createNonEnumerableProperty(IteratorPrototype,ITERATOR,returnThis),module.exports={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS}; },{"../internals/create-non-enumerable-property":52,"../internals/has":72,"../internals/is-pure":86,"../internals/object-get-prototype-of":106,"../internals/well-known-symbol":144}],90:[function(require,module,exports){ module.exports={}; },{}],91:[function(require,module,exports){ var flush,head,last,notify,toggle,node,promise,then,global=require("../internals/global"),getOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,classof=require("../internals/classof-raw"),macrotask=require("../internals/task").set,IS_IOS=require("../internals/engine-is-ios"),MutationObserver=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,IS_NODE="process"==classof(process),queueMicrotaskDescriptor=getOwnPropertyDescriptor(global,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;queueMicrotask||(flush=function(){var e,o;for(IS_NODE&&(e=process.domain)&&e.exit();head;){o=head.fn,head=head.next;try{o()}catch(e){throw head?notify():last=void 0,e}}last=void 0,e&&e.enter()},IS_NODE?notify=function(){process.nextTick(flush)}:MutationObserver&&!IS_IOS?(toggle=!0,node=document.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}):Promise&&Promise.resolve?(promise=Promise.resolve(void 0),then=promise.then,notify=function(){then.call(promise,flush)}):notify=function(){macrotask.call(global,flush)}),module.exports=queueMicrotask||function(e){var o={fn:e,next:void 0};last&&(last.next=o),head||(head=o,notify()),last=o}; },{"../internals/classof-raw":44,"../internals/engine-is-ios":60,"../internals/global":71,"../internals/object-get-own-property-descriptor":102,"../internals/task":133}],92:[function(require,module,exports){ var global=require("../internals/global");module.exports=global.Promise; },{"../internals/global":71}],93:[function(require,module,exports){ var fails=require("../internals/fails");module.exports=!!Object.getOwnPropertySymbols&&!fails(function(){return!String(Symbol())}); },{"../internals/fails":65}],94:[function(require,module,exports){ var global=require("../internals/global"),inspectSource=require("../internals/inspect-source"),WeakMap=global.WeakMap;module.exports="function"==typeof WeakMap&&/native code/.test(inspectSource(WeakMap)); },{"../internals/global":71,"../internals/inspect-source":79}],95:[function(require,module,exports){ "use strict";var aFunction=require("../internals/a-function"),PromiseCapability=function(i){var r,t;this.promise=new i(function(i,n){if(void 0!==r||void 0!==t)throw TypeError("Bad Promise constructor");r=i,t=n}),this.resolve=aFunction(r),this.reject=aFunction(t)};module.exports.f=function(i){return new PromiseCapability(i)}; },{"../internals/a-function":26}],96:[function(require,module,exports){ var isRegExp=require("../internals/is-regexp");module.exports=function(e){if(isRegExp(e))throw TypeError("The method doesn't accept regular expressions");return e}; },{"../internals/is-regexp":87}],97:[function(require,module,exports){ var global=require("../internals/global"),trim=require("../internals/string-trim").trim,whitespaces=require("../internals/whitespaces"),$parseFloat=global.parseFloat,FORCED=1/$parseFloat(whitespaces+"-0")!=-1/0;module.exports=FORCED?function(r){var e=trim(String(r)),a=$parseFloat(e);return 0===a&&"-"==e.charAt(0)?-0:a}:$parseFloat; },{"../internals/global":71,"../internals/string-trim":132,"../internals/whitespaces":145}],98:[function(require,module,exports){ var global=require("../internals/global"),trim=require("../internals/string-trim").trim,whitespaces=require("../internals/whitespaces"),$parseInt=global.parseInt,hex=/^[+-]?0[Xx]/,FORCED=8!==$parseInt(whitespaces+"08")||22!==$parseInt(whitespaces+"0x16");module.exports=FORCED?function(e,r){var t=trim(String(e));return $parseInt(t,r>>>0||(hex.test(t)?16:10))}:$parseInt; },{"../internals/global":71,"../internals/string-trim":132,"../internals/whitespaces":145}],99:[function(require,module,exports){ var activeXDocument,anObject=require("../internals/an-object"),defineProperties=require("../internals/object-define-properties"),enumBugKeys=require("../internals/enum-bug-keys"),hiddenKeys=require("../internals/hidden-keys"),html=require("../internals/html"),documentCreateElement=require("../internals/document-create-element"),sharedKey=require("../internals/shared-key"),GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),r="java"+SCRIPT+":";return t.style.display="none",html.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},NullProtoObject=function(){try{activeXDocument=document.domain&&new ActiveXObject("htmlfile")}catch(e){}NullProtoObject=activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()};hiddenKeys[IE_PROTO]=!0,module.exports=Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO]=e):r=NullProtoObject(),void 0===t?r:defineProperties(r,t)}; },{"../internals/an-object":31,"../internals/document-create-element":58,"../internals/enum-bug-keys":63,"../internals/hidden-keys":73,"../internals/html":75,"../internals/object-define-properties":100,"../internals/shared-key":126}],100:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),definePropertyModule=require("../internals/object-define-property"),anObject=require("../internals/an-object"),objectKeys=require("../internals/object-keys");module.exports=DESCRIPTORS?Object.defineProperties:function(e,r){anObject(e);for(var t,n=objectKeys(r),o=n.length,i=0;o>i;)definePropertyModule.f(e,t=n[i++],r[t]);return e}; },{"../internals/an-object":31,"../internals/descriptors":57,"../internals/object-define-property":101,"../internals/object-keys":108}],101:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),IE8_DOM_DEFINE=require("../internals/ie8-dom-define"),anObject=require("../internals/an-object"),toPrimitive=require("../internals/to-primitive"),nativeDefineProperty=Object.defineProperty;exports.f=DESCRIPTORS?nativeDefineProperty:function(e,r,t){if(anObject(e),r=toPrimitive(r,!0),anObject(t),IE8_DOM_DEFINE)try{return nativeDefineProperty(e,r,t)}catch(e){}if("get"in t||"set"in t)throw TypeError("Accessors not supported");return"value"in t&&(e[r]=t.value),e}; },{"../internals/an-object":31,"../internals/descriptors":57,"../internals/ie8-dom-define":76,"../internals/to-primitive":139}],102:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),propertyIsEnumerableModule=require("../internals/object-property-is-enumerable"),createPropertyDescriptor=require("../internals/create-property-descriptor"),toIndexedObject=require("../internals/to-indexed-object"),toPrimitive=require("../internals/to-primitive"),has=require("../internals/has"),IE8_DOM_DEFINE=require("../internals/ie8-dom-define"),nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;exports.f=DESCRIPTORS?nativeGetOwnPropertyDescriptor:function(e,r){if(e=toIndexedObject(e),r=toPrimitive(r,!0),IE8_DOM_DEFINE)try{return nativeGetOwnPropertyDescriptor(e,r)}catch(e){}if(has(e,r))return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(e,r),e[r])}; },{"../internals/create-property-descriptor":53,"../internals/descriptors":57,"../internals/has":72,"../internals/ie8-dom-define":76,"../internals/object-property-is-enumerable":109,"../internals/to-indexed-object":135,"../internals/to-primitive":139}],103:[function(require,module,exports){ var toIndexedObject=require("../internals/to-indexed-object"),nativeGetOwnPropertyNames=require("../internals/object-get-own-property-names").f,toString={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return nativeGetOwnPropertyNames(e)}catch(e){return windowNames.slice()}};module.exports.f=function(e){return windowNames&&"[object Window]"==toString.call(e)?getWindowNames(e):nativeGetOwnPropertyNames(toIndexedObject(e))}; },{"../internals/object-get-own-property-names":104,"../internals/to-indexed-object":135}],104:[function(require,module,exports){ var internalObjectKeys=require("../internals/object-keys-internal"),enumBugKeys=require("../internals/enum-bug-keys"),hiddenKeys=enumBugKeys.concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys)}; },{"../internals/enum-bug-keys":63,"../internals/object-keys-internal":107}],105:[function(require,module,exports){ exports.f=Object.getOwnPropertySymbols; },{}],106:[function(require,module,exports){ var has=require("../internals/has"),toObject=require("../internals/to-object"),sharedKey=require("../internals/shared-key"),CORRECT_PROTOTYPE_GETTER=require("../internals/correct-prototype-getter"),IE_PROTO=sharedKey("IE_PROTO"),ObjectPrototype=Object.prototype;module.exports=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,IE_PROTO)?t[IE_PROTO]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ObjectPrototype:null}; },{"../internals/correct-prototype-getter":50,"../internals/has":72,"../internals/shared-key":126,"../internals/to-object":138}],107:[function(require,module,exports){ var has=require("../internals/has"),toIndexedObject=require("../internals/to-indexed-object"),indexOf=require("../internals/array-includes").indexOf,hiddenKeys=require("../internals/hidden-keys");module.exports=function(e,n){var r,i=toIndexedObject(e),d=0,s=[];for(r in i)!has(hiddenKeys,r)&&has(i,r)&&s.push(r);for(;n.length>d;)has(i,r=n[d++])&&(~indexOf(s,r)||s.push(r));return s}; },{"../internals/array-includes":35,"../internals/has":72,"../internals/hidden-keys":73,"../internals/to-indexed-object":135}],108:[function(require,module,exports){ var internalObjectKeys=require("../internals/object-keys-internal"),enumBugKeys=require("../internals/enum-bug-keys");module.exports=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys)}; },{"../internals/enum-bug-keys":63,"../internals/object-keys-internal":107}],109:[function(require,module,exports){ "use strict";var nativePropertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1);exports.f=NASHORN_BUG?function(r){var e=getOwnPropertyDescriptor(this,r);return!!e&&e.enumerable}:nativePropertyIsEnumerable; },{}],110:[function(require,module,exports){ var anObject=require("../internals/an-object"),aPossiblePrototype=require("../internals/a-possible-prototype");module.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,o={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(o,[]),e=o instanceof Array}catch(t){}return function(o,r){return anObject(o),aPossiblePrototype(r),e?t.call(o,r):o.__proto__=r,o}}():void 0); },{"../internals/a-possible-prototype":27,"../internals/an-object":31}],111:[function(require,module,exports){ "use strict";var TO_STRING_TAG_SUPPORT=require("../internals/to-string-tag-support"),classof=require("../internals/classof");module.exports=TO_STRING_TAG_SUPPORT?{}.toString:function(){return"[object "+classof(this)+"]"}; },{"../internals/classof":45,"../internals/to-string-tag-support":140}],112:[function(require,module,exports){ var getBuiltIn=require("../internals/get-built-in"),getOwnPropertyNamesModule=require("../internals/object-get-own-property-names"),getOwnPropertySymbolsModule=require("../internals/object-get-own-property-symbols"),anObject=require("../internals/an-object");module.exports=getBuiltIn("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject(e)),r=getOwnPropertySymbolsModule.f;return r?t.concat(r(e)):t}; },{"../internals/an-object":31,"../internals/get-built-in":69,"../internals/object-get-own-property-names":104,"../internals/object-get-own-property-symbols":105}],113:[function(require,module,exports){ var global=require("../internals/global");module.exports=global; },{"../internals/global":71}],114:[function(require,module,exports){ module.exports=function(r){try{return{error:!1,value:r()}}catch(r){return{error:!0,value:r}}}; },{}],115:[function(require,module,exports){ var anObject=require("../internals/an-object"),isObject=require("../internals/is-object"),newPromiseCapability=require("../internals/new-promise-capability");module.exports=function(e,r){if(anObject(e),isObject(r)&&r.constructor===e)return r;var i=newPromiseCapability.f(e);return(0,i.resolve)(r),i.promise}; },{"../internals/an-object":31,"../internals/is-object":85,"../internals/new-promise-capability":95}],116:[function(require,module,exports){ var redefine=require("../internals/redefine");module.exports=function(e,r,n){for(var i in r)redefine(e,i,r[i],n);return e}; },{"../internals/redefine":117}],117:[function(require,module,exports){ var global=require("../internals/global"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),has=require("../internals/has"),setGlobal=require("../internals/set-global"),inspectSource=require("../internals/inspect-source"),InternalStateModule=require("../internals/internal-state"),getInternalState=InternalStateModule.get,enforceInternalState=InternalStateModule.enforce,TEMPLATE=String(String).split("String");(module.exports=function(e,t,n,r){var a=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,l=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||has(n,"name")||createNonEnumerableProperty(n,"name",t),enforceInternalState(n).source=TEMPLATE.join("string"==typeof t?t:"")),e!==global?(a?!l&&e[t]&&(o=!0):delete e[t],o?e[t]=n:createNonEnumerableProperty(e,t,n)):o?e[t]=n:setGlobal(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&getInternalState(this).source||inspectSource(this)}); },{"../internals/create-non-enumerable-property":52,"../internals/global":71,"../internals/has":72,"../internals/inspect-source":79,"../internals/internal-state":81,"../internals/set-global":123}],118:[function(require,module,exports){ var classof=require("./classof-raw"),regexpExec=require("./regexp-exec");module.exports=function(e,r){var o=e.exec;if("function"==typeof o){var c=o.call(e,r);if("object"!=typeof c)throw TypeError("RegExp exec method returned something other than an Object or null");return c}if("RegExp"!==classof(e))throw TypeError("RegExp#exec called on incompatible receiver");return regexpExec.call(e,r)}; },{"./classof-raw":44,"./regexp-exec":119}],119:[function(require,module,exports){ "use strict";var regexpFlags=require("./regexp-flags"),stickyHelpers=require("./regexp-sticky-helpers"),nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return nativeExec.call(e,"a"),nativeExec.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y||stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y;PATCH&&(patchedExec=function(e){var t,l,n,a,i=this,c=UNSUPPORTED_Y&&i.sticky,s=regexpFlags.call(i),x=i.source,r=0,E=e;return c&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),E=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(x="(?: "+x+")",E=" "+E,r++),l=new RegExp("^(?:"+x+")",s)),NPCG_INCLUDED&&(l=new RegExp("^"+x+"$(?!\\s)",s)),UPDATES_LAST_INDEX_WRONG&&(t=i.lastIndex),n=nativeExec.call(c?l:i,E),c?n?(n.input=n.input.slice(r),n[0]=n[0].slice(r),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),NPCG_INCLUDED&&n&&n.length>1&&nativeReplace.call(n[0],l,function(){for(a=1;a=a?e?"":void 0:(c=i.charCodeAt(n))<55296||c>56319||n+1===a||(o=i.charCodeAt(n+1))<56320||o>57343?e?i.charAt(n):c:e?i.slice(n,n+2):o-56320+(c-55296<<10)+65536}};module.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}; },{"../internals/require-object-coercible":122,"../internals/to-integer":136}],131:[function(require,module,exports){ var fails=require("../internals/fails"),whitespaces=require("../internals/whitespaces"),non="​…᠎";module.exports=function(e){return fails(function(){return!!whitespaces[e]()||non[e]()!=non||whitespaces[e].name!==e})}; },{"../internals/fails":65,"../internals/whitespaces":145}],132:[function(require,module,exports){ var requireObjectCoercible=require("../internals/require-object-coercible"),whitespaces=require("../internals/whitespaces"),whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod=function(e){return function(r){var t=String(requireObjectCoercible(r));return 1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t}};module.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}; },{"../internals/require-object-coercible":122,"../internals/whitespaces":145}],133:[function(require,module,exports){ var defer,channel,port,global=require("../internals/global"),fails=require("../internals/fails"),classof=require("../internals/classof-raw"),bind=require("../internals/function-bind-context"),html=require("../internals/html"),createElement=require("../internals/document-create-element"),IS_IOS=require("../internals/engine-is-ios"),location=global.location,set=global.setImmediate,clear=global.clearImmediate,process=global.process,MessageChannel=global.MessageChannel,Dispatch=global.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(e){if(queue.hasOwnProperty(e)){var n=queue[e];delete queue[e],n()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global.postMessage(e+"",location.protocol+"//"+location.host)};set&&clear||(set=function(e){for(var n=[],t=1;arguments.length>t;)n.push(arguments[t++]);return queue[++counter]=function(){("function"==typeof e?e:Function(e)).apply(void 0,n)},defer(counter),counter},clear=function(e){delete queue[e]},"process"==classof(process)?defer=function(e){process.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bind(port.postMessage,port,1)):!global.addEventListener||"function"!=typeof postMessage||global.importScripts||fails(post)?defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}:(defer=post,global.addEventListener("message",listener,!1))),module.exports={set:set,clear:clear}; },{"../internals/classof-raw":44,"../internals/document-create-element":58,"../internals/engine-is-ios":60,"../internals/fails":65,"../internals/function-bind-context":68,"../internals/global":71,"../internals/html":75}],134:[function(require,module,exports){ var toInteger=require("../internals/to-integer"),max=Math.max,min=Math.min;module.exports=function(e,t){var n=toInteger(e);return n<0?max(n+t,0):min(n,t)}; },{"../internals/to-integer":136}],135:[function(require,module,exports){ var IndexedObject=require("../internals/indexed-object"),requireObjectCoercible=require("../internals/require-object-coercible");module.exports=function(e){return IndexedObject(requireObjectCoercible(e))}; },{"../internals/indexed-object":77,"../internals/require-object-coercible":122}],136:[function(require,module,exports){ var ceil=Math.ceil,floor=Math.floor;module.exports=function(o){return isNaN(o=+o)?0:(o>0?floor:ceil)(o)}; },{}],137:[function(require,module,exports){ var toInteger=require("../internals/to-integer"),min=Math.min;module.exports=function(e){return e>0?min(toInteger(e),9007199254740991):0}; },{"../internals/to-integer":136}],138:[function(require,module,exports){ var requireObjectCoercible=require("../internals/require-object-coercible");module.exports=function(e){return Object(requireObjectCoercible(e))}; },{"../internals/require-object-coercible":122}],139:[function(require,module,exports){ var isObject=require("../internals/is-object");module.exports=function(t,e){if(!isObject(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!isObject(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!isObject(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!isObject(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}; },{"../internals/is-object":85}],140:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG]="z",module.exports="[object z]"===String(test); },{"../internals/well-known-symbol":144}],141:[function(require,module,exports){ var id=0,postfix=Math.random();module.exports=function(o){return"Symbol("+String(void 0===o?"":o)+")_"+(++id+postfix).toString(36)}; },{}],142:[function(require,module,exports){ var NATIVE_SYMBOL=require("../internals/native-symbol");module.exports=NATIVE_SYMBOL&&!Symbol.sham&&"symbol"==typeof Symbol.iterator; },{"../internals/native-symbol":93}],143:[function(require,module,exports){ var wellKnownSymbol=require("../internals/well-known-symbol");exports.f=wellKnownSymbol; },{"../internals/well-known-symbol":144}],144:[function(require,module,exports){ var global=require("../internals/global"),shared=require("../internals/shared"),has=require("../internals/has"),uid=require("../internals/uid"),NATIVE_SYMBOL=require("../internals/native-symbol"),USE_SYMBOL_AS_UID=require("../internals/use-symbol-as-uid"),WellKnownSymbolsStore=shared("wks"),Symbol=global.Symbol,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol:Symbol&&Symbol.withoutSetter||uid;module.exports=function(e){return has(WellKnownSymbolsStore,e)||(NATIVE_SYMBOL&&has(Symbol,e)?WellKnownSymbolsStore[e]=Symbol[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]}; },{"../internals/global":71,"../internals/has":72,"../internals/native-symbol":93,"../internals/shared":128,"../internals/uid":141,"../internals/use-symbol-as-uid":142}],145:[function(require,module,exports){ module.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"; },{}],146:[function(require,module,exports){ "use strict";var $=require("../internals/export"),fails=require("../internals/fails"),isArray=require("../internals/is-array"),isObject=require("../internals/is-object"),toObject=require("../internals/to-object"),toLength=require("../internals/to-length"),createProperty=require("../internals/create-property"),arraySpeciesCreate=require("../internals/array-species-create"),arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support"),wellKnownSymbol=require("../internals/well-known-symbol"),V8_VERSION=require("../internals/engine-v8-version"),IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION>=51||!fails(function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var r=e[IS_CONCAT_SPREADABLE];return void 0!==r?!!r:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;$({target:"Array",proto:!0,forced:FORCED},{concat:function(e){var r,t,a,i,n,E=toObject(this),o=arraySpeciesCreate(E,0),s=0;for(r=-1,a=arguments.length;rMAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(t=0;t=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(o,s++,n)}return o.length=s,o}}); },{"../internals/array-method-has-species-support":37,"../internals/array-species-create":41,"../internals/create-property":54,"../internals/engine-v8-version":62,"../internals/export":64,"../internals/fails":65,"../internals/is-array":83,"../internals/is-object":85,"../internals/to-length":137,"../internals/to-object":138,"../internals/well-known-symbol":144}],147:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$every=require("../internals/array-iteration").every,arrayMethodIsStrict=require("../internals/array-method-is-strict"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),STRICT_METHOD=arrayMethodIsStrict("every"),USES_TO_LENGTH=arrayMethodUsesToLength("every");$({target:"Array",proto:!0,forced:!STRICT_METHOD||!USES_TO_LENGTH},{every:function(r){return $every(this,r,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-iteration":36,"../internals/array-method-is-strict":38,"../internals/array-method-uses-to-length":39,"../internals/export":64}],148:[function(require,module,exports){ var $=require("../internals/export"),fill=require("../internals/array-fill"),addToUnscopables=require("../internals/add-to-unscopables");$({target:"Array",proto:!0},{fill:fill}),addToUnscopables("fill"); },{"../internals/add-to-unscopables":28,"../internals/array-fill":32,"../internals/export":64}],149:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$filter=require("../internals/array-iteration").filter,arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("filter"),USES_TO_LENGTH=arrayMethodUsesToLength("filter");$({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT||!USES_TO_LENGTH},{filter:function(r){return $filter(this,r,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-iteration":36,"../internals/array-method-has-species-support":37,"../internals/array-method-uses-to-length":39,"../internals/export":64}],150:[function(require,module,exports){ "use strict";var $=require("../internals/export"),forEach=require("../internals/array-for-each");$({target:"Array",proto:!0,forced:[].forEach!=forEach},{forEach:forEach}); },{"../internals/array-for-each":33,"../internals/export":64}],151:[function(require,module,exports){ var $=require("../internals/export"),from=require("../internals/array-from"),checkCorrectnessOfIteration=require("../internals/check-correctness-of-iteration"),INCORRECT_ITERATION=!checkCorrectnessOfIteration(function(r){Array.from(r)});$({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from}); },{"../internals/array-from":34,"../internals/check-correctness-of-iteration":43,"../internals/export":64}],152:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$includes=require("../internals/array-includes").includes,addToUnscopables=require("../internals/add-to-unscopables"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),USES_TO_LENGTH=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});$({target:"Array",proto:!0,forced:!USES_TO_LENGTH},{includes:function(e){return $includes(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes"); },{"../internals/add-to-unscopables":28,"../internals/array-includes":35,"../internals/array-method-uses-to-length":39,"../internals/export":64}],153:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$indexOf=require("../internals/array-includes").indexOf,arrayMethodIsStrict=require("../internals/array-method-is-strict"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),nativeIndexOf=[].indexOf,NEGATIVE_ZERO=!!nativeIndexOf&&1/[1].indexOf(1,-0)<0,STRICT_METHOD=arrayMethodIsStrict("indexOf"),USES_TO_LENGTH=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});$({target:"Array",proto:!0,forced:NEGATIVE_ZERO||!STRICT_METHOD||!USES_TO_LENGTH},{indexOf:function(e){return NEGATIVE_ZERO?nativeIndexOf.apply(this,arguments)||0:$indexOf(this,e,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-includes":35,"../internals/array-method-is-strict":38,"../internals/array-method-uses-to-length":39,"../internals/export":64}],154:[function(require,module,exports){ "use strict";var toIndexedObject=require("../internals/to-indexed-object"),addToUnscopables=require("../internals/add-to-unscopables"),Iterators=require("../internals/iterators"),InternalStateModule=require("../internals/internal-state"),defineIterator=require("../internals/define-iterator"),ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR);module.exports=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,r=e.kind,a=e.index++;return!t||a>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:a,done:!1}:"values"==r?{value:t[a],done:!1}:{value:[a,t[a]],done:!1}},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"); },{"../internals/add-to-unscopables":28,"../internals/define-iterator":55,"../internals/internal-state":81,"../internals/iterators":90,"../internals/to-indexed-object":135}],155:[function(require,module,exports){ "use strict";var $=require("../internals/export"),IndexedObject=require("../internals/indexed-object"),toIndexedObject=require("../internals/to-indexed-object"),arrayMethodIsStrict=require("../internals/array-method-is-strict"),nativeJoin=[].join,ES3_STRINGS=IndexedObject!=Object,STRICT_METHOD=arrayMethodIsStrict("join",",");$({target:"Array",proto:!0,forced:ES3_STRINGS||!STRICT_METHOD},{join:function(e){return nativeJoin.call(toIndexedObject(this),void 0===e?",":e)}}); },{"../internals/array-method-is-strict":38,"../internals/export":64,"../internals/indexed-object":77,"../internals/to-indexed-object":135}],156:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$map=require("../internals/array-iteration").map,arrayMethodHasSpeciesSupport=require("../internals/array-method-has-species-support"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("map"),USES_TO_LENGTH=arrayMethodUsesToLength("map");$({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT||!USES_TO_LENGTH},{map:function(r){return $map(this,r,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-iteration":36,"../internals/array-method-has-species-support":37,"../internals/array-method-uses-to-length":39,"../internals/export":64}],157:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$reduce=require("../internals/array-reduce").left,arrayMethodIsStrict=require("../internals/array-method-is-strict"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),STRICT_METHOD=arrayMethodIsStrict("reduce"),USES_TO_LENGTH=arrayMethodUsesToLength("reduce",{1:0});$({target:"Array",proto:!0,forced:!STRICT_METHOD||!USES_TO_LENGTH},{reduce:function(r){return $reduce(this,r,arguments.length,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-method-is-strict":38,"../internals/array-method-uses-to-length":39,"../internals/array-reduce":40,"../internals/export":64}],158:[function(require,module,exports){ "use strict";var $=require("../internals/export"),isArray=require("../internals/is-array"),nativeReverse=[].reverse,test=[1,2];$({target:"Array",proto:!0,forced:String(test)===String(test.reverse())},{reverse:function(){return isArray(this)&&(this.length=this.length),nativeReverse.call(this)}}); },{"../internals/export":64,"../internals/is-array":83}],159:[function(require,module,exports){ "use strict";var $=require("../internals/export"),$some=require("../internals/array-iteration").some,arrayMethodIsStrict=require("../internals/array-method-is-strict"),arrayMethodUsesToLength=require("../internals/array-method-uses-to-length"),STRICT_METHOD=arrayMethodIsStrict("some"),USES_TO_LENGTH=arrayMethodUsesToLength("some");$({target:"Array",proto:!0,forced:!STRICT_METHOD||!USES_TO_LENGTH},{some:function(r){return $some(this,r,arguments.length>1?arguments[1]:void 0)}}); },{"../internals/array-iteration":36,"../internals/array-method-is-strict":38,"../internals/array-method-uses-to-length":39,"../internals/export":64}],160:[function(require,module,exports){ var redefine=require("../internals/redefine"),DatePrototype=Date.prototype,INVALID_DATE="Invalid Date",TO_STRING="toString",nativeDateToString=DatePrototype[TO_STRING],getTime=DatePrototype.getTime;new Date(NaN)+""!=INVALID_DATE&&redefine(DatePrototype,TO_STRING,function(){var e=getTime.call(this);return e==e?nativeDateToString.call(this):INVALID_DATE}); },{"../internals/redefine":117}],161:[function(require,module,exports){ var DESCRIPTORS=require("../internals/descriptors"),defineProperty=require("../internals/object-define-property").f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME="name";!DESCRIPTORS||NAME in FunctionPrototype||defineProperty(FunctionPrototype,NAME,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(t){return""}}}); },{"../internals/descriptors":57,"../internals/object-define-property":101}],162:[function(require,module,exports){ "use strict";var collection=require("../internals/collection"),collectionStrong=require("../internals/collection-strong");module.exports=collection("Map",function(n){return function(){return n(this,arguments.length?arguments[0]:void 0)}},collectionStrong); },{"../internals/collection":47,"../internals/collection-strong":46}],163:[function(require,module,exports){ "use strict";var DESCRIPTORS=require("../internals/descriptors"),global=require("../internals/global"),isForced=require("../internals/is-forced"),redefine=require("../internals/redefine"),has=require("../internals/has"),classof=require("../internals/classof-raw"),inheritIfRequired=require("../internals/inherit-if-required"),toPrimitive=require("../internals/to-primitive"),fails=require("../internals/fails"),create=require("../internals/object-create"),getOwnPropertyNames=require("../internals/object-get-own-property-names").f,getOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,defineProperty=require("../internals/object-define-property").f,trim=require("../internals/string-trim").trim,NUMBER="Number",NativeNumber=global[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classof(create(NumberPrototype))==NUMBER,toNumber=function(e){var r,t,i,a,n,s,o,N,u=toPrimitive(e,!1);if("string"==typeof u&&u.length>2)if(43===(r=(u=trim(u)).charCodeAt(0))||45===r){if(88===(t=u.charCodeAt(2))||120===t)return NaN}else if(48===r){switch(u.charCodeAt(1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+u}for(s=(n=u.slice(2)).length,o=0;oa)return NaN;return parseInt(n,i)}return+u};if(isForced(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var key,NumberWrapper=function(e){var r=arguments.length<1?0:e,t=this;return t instanceof NumberWrapper&&(BROKEN_CLASSOF?fails(function(){NumberPrototype.valueOf.call(t)}):classof(t)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(r)),t,NumberWrapper):toNumber(r)},keys=DESCRIPTORS?getOwnPropertyNames(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;keys.length>j;j++)has(NativeNumber,key=keys[j])&&!has(NumberWrapper,key)&&defineProperty(NumberWrapper,key,getOwnPropertyDescriptor(NativeNumber,key));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global,NUMBER,NumberWrapper)} },{"../internals/classof-raw":44,"../internals/descriptors":57,"../internals/fails":65,"../internals/global":71,"../internals/has":72,"../internals/inherit-if-required":78,"../internals/is-forced":84,"../internals/object-create":99,"../internals/object-define-property":101,"../internals/object-get-own-property-descriptor":102,"../internals/object-get-own-property-names":104,"../internals/redefine":117,"../internals/string-trim":132,"../internals/to-primitive":139}],164:[function(require,module,exports){ var $=require("../internals/export"),DESCRIPTORS=require("../internals/descriptors"),defineProperties=require("../internals/object-define-properties");$({target:"Object",stat:!0,forced:!DESCRIPTORS,sham:!DESCRIPTORS},{defineProperties:defineProperties}); },{"../internals/descriptors":57,"../internals/export":64,"../internals/object-define-properties":100}],165:[function(require,module,exports){ var $=require("../internals/export"),DESCRIPTORS=require("../internals/descriptors"),objectDefinePropertyModile=require("../internals/object-define-property");$({target:"Object",stat:!0,forced:!DESCRIPTORS,sham:!DESCRIPTORS},{defineProperty:objectDefinePropertyModile.f}); },{"../internals/descriptors":57,"../internals/export":64,"../internals/object-define-property":101}],166:[function(require,module,exports){ var $=require("../internals/export"),fails=require("../internals/fails"),toIndexedObject=require("../internals/to-indexed-object"),nativeGetOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f,DESCRIPTORS=require("../internals/descriptors"),FAILS_ON_PRIMITIVES=fails(function(){nativeGetOwnPropertyDescriptor(1)}),FORCED=!DESCRIPTORS||FAILS_ON_PRIMITIVES;$({target:"Object",stat:!0,forced:FORCED,sham:!DESCRIPTORS},{getOwnPropertyDescriptor:function(e,r){return nativeGetOwnPropertyDescriptor(toIndexedObject(e),r)}}); },{"../internals/descriptors":57,"../internals/export":64,"../internals/fails":65,"../internals/object-get-own-property-descriptor":102,"../internals/to-indexed-object":135}],167:[function(require,module,exports){ var $=require("../internals/export"),DESCRIPTORS=require("../internals/descriptors"),ownKeys=require("../internals/own-keys"),toIndexedObject=require("../internals/to-indexed-object"),getOwnPropertyDescriptorModule=require("../internals/object-get-own-property-descriptor"),createProperty=require("../internals/create-property");$({target:"Object",stat:!0,sham:!DESCRIPTORS},{getOwnPropertyDescriptors:function(e){for(var r,t,o=toIndexedObject(e),n=getOwnPropertyDescriptorModule.f,i=ownKeys(o),s={},p=0;i.length>p;)void 0!==(t=n(o,r=i[p++]))&&createProperty(s,r,t);return s}}); },{"../internals/create-property":54,"../internals/descriptors":57,"../internals/export":64,"../internals/object-get-own-property-descriptor":102,"../internals/own-keys":112,"../internals/to-indexed-object":135}],168:[function(require,module,exports){ var $=require("../internals/export"),toObject=require("../internals/to-object"),nativeKeys=require("../internals/object-keys"),fails=require("../internals/fails"),FAILS_ON_PRIMITIVES=fails(function(){nativeKeys(1)});$({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{keys:function(e){return nativeKeys(toObject(e))}}); },{"../internals/export":64,"../internals/fails":65,"../internals/object-keys":108,"../internals/to-object":138}],169:[function(require,module,exports){ var TO_STRING_TAG_SUPPORT=require("../internals/to-string-tag-support"),redefine=require("../internals/redefine"),toString=require("../internals/object-to-string");TO_STRING_TAG_SUPPORT||redefine(Object.prototype,"toString",toString,{unsafe:!0}); },{"../internals/object-to-string":111,"../internals/redefine":117,"../internals/to-string-tag-support":140}],170:[function(require,module,exports){ var $=require("../internals/export"),parseFloatImplementation=require("../internals/number-parse-float");$({global:!0,forced:parseFloat!=parseFloatImplementation},{parseFloat:parseFloatImplementation}); },{"../internals/export":64,"../internals/number-parse-float":97}],171:[function(require,module,exports){ var $=require("../internals/export"),parseIntImplementation=require("../internals/number-parse-int");$({global:!0,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation}); },{"../internals/export":64,"../internals/number-parse-int":98}],172:[function(require,module,exports){ "use strict";var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,$=require("../internals/export"),IS_PURE=require("../internals/is-pure"),global=require("../internals/global"),getBuiltIn=require("../internals/get-built-in"),NativePromise=require("../internals/native-promise-constructor"),redefine=require("../internals/redefine"),redefineAll=require("../internals/redefine-all"),setToStringTag=require("../internals/set-to-string-tag"),setSpecies=require("../internals/set-species"),isObject=require("../internals/is-object"),aFunction=require("../internals/a-function"),anInstance=require("../internals/an-instance"),classof=require("../internals/classof-raw"),inspectSource=require("../internals/inspect-source"),iterate=require("../internals/iterate"),checkCorrectnessOfIteration=require("../internals/check-correctness-of-iteration"),speciesConstructor=require("../internals/species-constructor"),task=require("../internals/task").set,microtask=require("../internals/microtask"),promiseResolve=require("../internals/promise-resolve"),hostReportErrors=require("../internals/host-report-errors"),newPromiseCapabilityModule=require("../internals/new-promise-capability"),perform=require("../internals/perform"),InternalStateModule=require("../internals/internal-state"),isForced=require("../internals/is-forced"),wellKnownSymbol=require("../internals/well-known-symbol"),V8_VERSION=require("../internals/engine-v8-version"),SPECIES=wellKnownSymbol("species"),PROMISE="Promise",getInternalState=InternalStateModule.get,setInternalState=InternalStateModule.set,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),PromiseConstructor=NativePromise,TypeError=global.TypeError,document=global.document,process=global.process,$fetch=getBuiltIn("fetch"),newPromiseCapability=newPromiseCapabilityModule.f,newGenericPromiseCapability=newPromiseCapability,IS_NODE="process"==classof(process),DISPATCH_EVENT=!!(document&&document.createEvent&&global.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,FORCED=isForced(PROMISE,function(){if(!(inspectSource(PromiseConstructor)!==String(PromiseConstructor))){if(66===V8_VERSION)return!0;if(!IS_NODE&&"function"!=typeof PromiseRejectionEvent)return!0}if(IS_PURE&&!PromiseConstructor.prototype.finally)return!0;if(V8_VERSION>=51&&/native code/.test(PromiseConstructor))return!1;var e=PromiseConstructor.resolve(1),t=function(e){e(function(){},function(){})};return(e.constructor={})[SPECIES]=t,!(e.then(function(){})instanceof t)}),INCORRECT_ITERATION=FORCED||!checkCorrectnessOfIteration(function(e){PromiseConstructor.all(e).catch(function(){})}),isThenable=function(e){var t;return!(!isObject(e)||"function"!=typeof(t=e.then))&&t},notify=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;microtask(function(){for(var i=t.value,o=t.state==FULFILLED,a=0;r.length>a;){var s,c,l,u=r[a++],f=o?u.ok:u.fail,p=u.resolve,E=u.reject,m=u.domain;try{f?(o||(t.rejection===UNHANDLED&&onHandleUnhandled(e,t),t.rejection=HANDLED),!0===f?s=i:(m&&m.enter(),s=f(i),m&&(m.exit(),l=!0)),s===u.promise?E(TypeError("Promise-chain cycle")):(c=isThenable(s))?c.call(s,p,E):p(s)):E(i)}catch(e){m&&!l&&m.exit(),E(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&onUnhandled(e,t)})}},dispatchEvent=function(e,t,n){var r,i;DISPATCH_EVENT?((r=document.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),global.dispatchEvent(r)):r={promise:t,reason:n},(i=global["on"+e])?i(r):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(e,t){task.call(global,function(){var n,r=t.value;if(isUnhandled(t)&&(n=perform(function(){IS_NODE?process.emit("unhandledRejection",r,e):dispatchEvent(UNHANDLED_REJECTION,e,r)}),t.rejection=IS_NODE||isUnhandled(t)?UNHANDLED:HANDLED,n.error))throw n.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e,t){task.call(global,function(){IS_NODE?process.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind=function(e,t,n,r){return function(i){e(t,n,i,r)}},internalReject=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=REJECTED,notify(e,t,!0))},internalResolve=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw TypeError("Promise can't be resolved itself");var i=isThenable(n);i?microtask(function(){var r={done:!1};try{i.call(n,bind(internalResolve,e,r,t),bind(internalReject,e,r,t))}catch(n){internalReject(e,r,n,t)}}):(t.value=n,t.state=FULFILLED,notify(e,t,!1))}catch(n){internalReject(e,{done:!1},n,t)}}};FORCED&&(PromiseConstructor=function(e){anInstance(this,PromiseConstructor,PROMISE),aFunction(e),Internal.call(this);var t=getInternalState(this);try{e(bind(internalResolve,this,t),bind(internalReject,this,t))}catch(e){internalReject(this,t,e)}},(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})}).prototype=redefineAll(PromiseConstructor.prototype,{then:function(e,t){var n=getInternalPromiseState(this),r=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=IS_NODE?process.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=PENDING&¬ify(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalState(e);this.promise=e,this.resolve=bind(internalResolve,e,t),this.reject=bind(internalReject,e,t)},newPromiseCapabilityModule.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},IS_PURE||"function"!=typeof NativePromise||(nativeThen=NativePromise.prototype.then,redefine(NativePromise.prototype,"then",function(e,t){var n=this;return new PromiseConstructor(function(e,t){nativeThen.call(n,e,t)}).then(e,t)},{unsafe:!0}),"function"==typeof $fetch&&$({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return promiseResolve(PromiseConstructor,$fetch.apply(global,arguments))}}))),$({global:!0,wrap:!0,forced:FORCED},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1,!0),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),$({target:PROMISE,stat:!0,forced:FORCED},{reject:function(e){var t=newPromiseCapability(this);return t.reject.call(void 0,e),t.promise}}),$({target:PROMISE,stat:!0,forced:IS_PURE||FORCED},{resolve:function(e){return promiseResolve(IS_PURE&&this===PromiseWrapper?PromiseConstructor:this,e)}}),$({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function(e){var t=this,n=newPromiseCapability(t),r=n.resolve,i=n.reject,o=perform(function(){var n=aFunction(t.resolve),o=[],a=0,s=1;iterate(e,function(e){var c=a++,l=!1;o.push(void 0),s++,n.call(t,e).then(function(e){l||(l=!0,o[c]=e,--s||r(o))},i)}),--s||r(o)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=newPromiseCapability(t),r=n.reject,i=perform(function(){var i=aFunction(t.resolve);iterate(e,function(e){i.call(t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}}); },{"../internals/a-function":26,"../internals/an-instance":30,"../internals/check-correctness-of-iteration":43,"../internals/classof-raw":44,"../internals/engine-v8-version":62,"../internals/export":64,"../internals/get-built-in":69,"../internals/global":71,"../internals/host-report-errors":74,"../internals/inspect-source":79,"../internals/internal-state":81,"../internals/is-forced":84,"../internals/is-object":85,"../internals/is-pure":86,"../internals/iterate":88,"../internals/microtask":91,"../internals/native-promise-constructor":92,"../internals/new-promise-capability":95,"../internals/perform":114,"../internals/promise-resolve":115,"../internals/redefine":117,"../internals/redefine-all":116,"../internals/set-species":124,"../internals/set-to-string-tag":125,"../internals/species-constructor":129,"../internals/task":133,"../internals/well-known-symbol":144}],173:[function(require,module,exports){ var $=require("../internals/export"),getBuiltIn=require("../internals/get-built-in"),aFunction=require("../internals/a-function"),anObject=require("../internals/an-object"),fails=require("../internals/fails"),nativeApply=getBuiltIn("Reflect","apply"),functionApply=Function.apply,OPTIONAL_ARGUMENTS_LIST=!fails(function(){nativeApply(function(){})});$({target:"Reflect",stat:!0,forced:OPTIONAL_ARGUMENTS_LIST},{apply:function(n,t,e){return aFunction(n),anObject(e),nativeApply?nativeApply(n,t,e):functionApply.call(n,t,e)}}); },{"../internals/a-function":26,"../internals/an-object":31,"../internals/export":64,"../internals/fails":65,"../internals/get-built-in":69}],174:[function(require,module,exports){ var $=require("../internals/export"),anObject=require("../internals/an-object"),getOwnPropertyDescriptor=require("../internals/object-get-own-property-descriptor").f;$({target:"Reflect",stat:!0},{deleteProperty:function(e,r){var t=getOwnPropertyDescriptor(anObject(e),r);return!(t&&!t.configurable)&&delete e[r]}}); },{"../internals/an-object":31,"../internals/export":64,"../internals/object-get-own-property-descriptor":102}],175:[function(require,module,exports){ var $=require("../internals/export"),anObject=require("../internals/an-object"),objectGetPrototypeOf=require("../internals/object-get-prototype-of"),CORRECT_PROTOTYPE_GETTER=require("../internals/correct-prototype-getter");$({target:"Reflect",stat:!0,sham:!CORRECT_PROTOTYPE_GETTER},{getPrototypeOf:function(e){return objectGetPrototypeOf(anObject(e))}}); },{"../internals/an-object":31,"../internals/correct-prototype-getter":50,"../internals/export":64,"../internals/object-get-prototype-of":106}],176:[function(require,module,exports){ "use strict";var $=require("../internals/export"),exec=require("../internals/regexp-exec");$({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}); },{"../internals/export":64,"../internals/regexp-exec":119}],177:[function(require,module,exports){ "use strict";var redefine=require("../internals/redefine"),anObject=require("../internals/an-object"),fails=require("../internals/fails"),flags=require("../internals/regexp-flags"),TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails(function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,function(){var e=anObject(this),r=String(e.source),t=e.flags;return"/"+r+"/"+String(void 0===t&&e instanceof RegExp&&!("flags"in RegExpPrototype)?flags.call(e):t)},{unsafe:!0}); },{"../internals/an-object":31,"../internals/fails":65,"../internals/redefine":117,"../internals/regexp-flags":120}],178:[function(require,module,exports){ "use strict";var $=require("../internals/export"),notARegExp=require("../internals/not-a-regexp"),requireObjectCoercible=require("../internals/require-object-coercible"),correctIsRegExpLogic=require("../internals/correct-is-regexp-logic");$({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~String(requireObjectCoercible(this)).indexOf(notARegExp(e),arguments.length>1?arguments[1]:void 0)}}); },{"../internals/correct-is-regexp-logic":49,"../internals/export":64,"../internals/not-a-regexp":96,"../internals/require-object-coercible":122}],179:[function(require,module,exports){ "use strict";var charAt=require("../internals/string-multibyte").charAt,InternalStateModule=require("../internals/internal-state"),defineIterator=require("../internals/define-iterator"),STRING_ITERATOR="String Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(t){setInternalState(this,{type:STRING_ITERATOR,string:String(t),index:0})},function(){var t,e=getInternalState(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=charAt(n,r),e.index+=t.length,{value:t,done:!1})}); },{"../internals/define-iterator":55,"../internals/internal-state":81,"../internals/string-multibyte":130}],180:[function(require,module,exports){ "use strict";var fixRegExpWellKnownSymbolLogic=require("../internals/fix-regexp-well-known-symbol-logic"),anObject=require("../internals/an-object"),toLength=require("../internals/to-length"),requireObjectCoercible=require("../internals/require-object-coercible"),advanceStringIndex=require("../internals/advance-string-index"),regExpExec=require("../internals/regexp-exec-abstract");fixRegExpWellKnownSymbolLogic("match",1,function(e,r,n){return[function(r){var n=requireObjectCoercible(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},function(e){var i=n(r,e,this);if(i.done)return i.value;var t=anObject(e),l=String(this);if(!t.global)return regExpExec(t,l);var a=t.unicode;t.lastIndex=0;for(var c,o=[],u=0;null!==(c=regExpExec(t,l));){var g=String(c[0]);o[u]=g,""===g&&(t.lastIndex=advanceStringIndex(l,toLength(t.lastIndex),a)),u++}return 0===u?null:o}]}); },{"../internals/advance-string-index":29,"../internals/an-object":31,"../internals/fix-regexp-well-known-symbol-logic":66,"../internals/regexp-exec-abstract":118,"../internals/require-object-coercible":122,"../internals/to-length":137}],181:[function(require,module,exports){ "use strict";var fixRegExpWellKnownSymbolLogic=require("../internals/fix-regexp-well-known-symbol-logic"),anObject=require("../internals/an-object"),toObject=require("../internals/to-object"),toLength=require("../internals/to-length"),toInteger=require("../internals/to-integer"),requireObjectCoercible=require("../internals/require-object-coercible"),advanceStringIndex=require("../internals/advance-string-index"),regExpExec=require("../internals/regexp-exec-abstract"),max=Math.max,min=Math.min,floor=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d\d?)/g,maybeToString=function(e){return void 0===e?e:String(e)};fixRegExpWellKnownSymbolLogic("replace",2,function(e,r,n,t){var i=t.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=t.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(n,t){var i=requireObjectCoercible(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,t):r.call(String(i),n,t)},function(e,t){if(!i&&a||"string"==typeof t&&-1===t.indexOf(o)){var c=n(r,e,this,t);if(c.done)return c.value}var u=anObject(e),g=String(this),s="function"==typeof t;s||(t=String(t));var S=u.global;if(S){var v=u.unicode;u.lastIndex=0}for(var f=[];;){var d=regExpExec(u,g);if(null===d)break;if(f.push(d),!S)break;""===String(d[0])&&(u.lastIndex=advanceStringIndex(g,toLength(u.lastIndex),v))}for(var x="",b=0,h=0;h=b&&(x+=g.slice(b,T)+U,b=T+E.length)}return x+g.slice(b)}];function l(e,n,t,i,a,o){var l=t+e.length,c=i.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==a&&(a=toObject(a),u=SUBSTITUTION_SYMBOLS),r.call(o,u,function(r,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,t);case"'":return n.slice(l);case"<":u=a[o.slice(1,-1)];break;default:var g=+o;if(0===g)return r;if(g>c){var s=floor(g/10);return 0===s?r:s<=c?void 0===i[s-1]?o.charAt(1):i[s-1]+o.charAt(1):r}u=i[g-1]}return void 0===u?"":u})}}); },{"../internals/advance-string-index":29,"../internals/an-object":31,"../internals/fix-regexp-well-known-symbol-logic":66,"../internals/regexp-exec-abstract":118,"../internals/require-object-coercible":122,"../internals/to-integer":136,"../internals/to-length":137,"../internals/to-object":138}],182:[function(require,module,exports){ "use strict";var fixRegExpWellKnownSymbolLogic=require("../internals/fix-regexp-well-known-symbol-logic"),isRegExp=require("../internals/is-regexp"),anObject=require("../internals/an-object"),requireObjectCoercible=require("../internals/require-object-coercible"),speciesConstructor=require("../internals/species-constructor"),advanceStringIndex=require("../internals/advance-string-index"),toLength=require("../internals/to-length"),callRegExpExec=require("../internals/regexp-exec-abstract"),regexpExec=require("../internals/regexp-exec"),fails=require("../internals/fails"),arrayPush=[].push,min=Math.min,MAX_UINT32=4294967295,SUPPORTS_Y=!fails(function(){return!RegExp(MAX_UINT32,"y")});fixRegExpWellKnownSymbolLogic("split",2,function(e,n,i){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,i){var r=String(requireObjectCoercible(this)),t=void 0===i?MAX_UINT32:i>>>0;if(0===t)return[];if(void 0===e)return[r];if(!isRegExp(e))return n.call(r,e,t);for(var l,s,c,a=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,o=new RegExp(e.source,u+"g");(l=regexpExec.call(o,r))&&!((s=o.lastIndex)>g&&(a.push(r.slice(g,l.index)),l.length>1&&l.index=t));)o.lastIndex===l.index&&o.lastIndex++;return g===r.length?!c&&o.test("")||a.push(""):a.push(r.slice(g)),a.length>t?a.slice(0,t):a}:"0".split(void 0,0).length?function(e,i){return void 0===e&&0===i?[]:n.call(this,e,i)}:n,[function(n,i){var t=requireObjectCoercible(this),l=void 0==n?void 0:n[e];return void 0!==l?l.call(n,t,i):r.call(String(t),n,i)},function(e,t){var l=i(r,e,this,t,r!==n);if(l.done)return l.value;var s=anObject(e),c=String(this),a=speciesConstructor(s,RegExp),u=s.unicode,g=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),o=new a(SUPPORTS_Y?s:"^(?:"+s.source+")",g),x=void 0===t?MAX_UINT32:t>>>0;if(0===x)return[];if(0===c.length)return null===callRegExpExec(o,c)?[c]:[];for(var h=0,p=0,d=[];pi;)o.push(arguments[i++]);if(n=t,(isObject(t)||void 0!==e)&&!isSymbol(e))return isArray(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!isSymbol(t))return t}),o[1]=t,$stringify.apply(null,o)}})}$Symbol[PROTOTYPE][TO_PRIMITIVE]||createNonEnumerableProperty($Symbol[PROTOTYPE],TO_PRIMITIVE,$Symbol[PROTOTYPE].valueOf),setToStringTag($Symbol,SYMBOL),hiddenKeys[HIDDEN]=!0; },{"../internals/an-object":31,"../internals/array-iteration":36,"../internals/create-non-enumerable-property":52,"../internals/create-property-descriptor":53,"../internals/define-well-known-symbol":56,"../internals/descriptors":57,"../internals/export":64,"../internals/fails":65,"../internals/get-built-in":69,"../internals/global":71,"../internals/has":72,"../internals/hidden-keys":73,"../internals/internal-state":81,"../internals/is-array":83,"../internals/is-object":85,"../internals/is-pure":86,"../internals/native-symbol":93,"../internals/object-create":99,"../internals/object-define-property":101,"../internals/object-get-own-property-descriptor":102,"../internals/object-get-own-property-names":104,"../internals/object-get-own-property-names-external":103,"../internals/object-get-own-property-symbols":105,"../internals/object-keys":108,"../internals/object-property-is-enumerable":109,"../internals/redefine":117,"../internals/set-to-string-tag":125,"../internals/shared":128,"../internals/shared-key":126,"../internals/to-indexed-object":135,"../internals/to-object":138,"../internals/to-primitive":139,"../internals/uid":141,"../internals/use-symbol-as-uid":142,"../internals/well-known-symbol":144,"../internals/well-known-symbol-wrapped":143}],187:[function(require,module,exports){ var global=require("../internals/global"),DOMIterables=require("../internals/dom-iterables"),forEach=require("../internals/array-for-each"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property");for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(e){CollectionPrototype.forEach=forEach}} },{"../internals/array-for-each":33,"../internals/create-non-enumerable-property":52,"../internals/dom-iterables":59,"../internals/global":71}],188:[function(require,module,exports){ var global=require("../internals/global"),DOMIterables=require("../internals/dom-iterables"),ArrayIteratorMethods=require("../modules/es.array.iterator"),createNonEnumerableProperty=require("../internals/create-non-enumerable-property"),wellKnownSymbol=require("../internals/well-known-symbol"),ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values;for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch(e){CollectionPrototype[ITERATOR]=ArrayValues}if(CollectionPrototype[TO_STRING_TAG]||createNonEnumerableProperty(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),DOMIterables[COLLECTION_NAME])for(var METHOD_NAME in ArrayIteratorMethods)if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME])}catch(e){CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME]}}} },{"../internals/create-non-enumerable-property":52,"../internals/dom-iterables":59,"../internals/global":71,"../internals/well-known-symbol":144,"../modules/es.array.iterator":154}],189:[function(require,module,exports){ module.exports={"align-content":"stretch","align-items":"stretch","align-self":"auto","animation-delay":"0s","animation-direction":"normal","animation-duration":"0s","animation-fill-mode":"none","animation-iteration-count":"1","animation-name":"none","animation-play-state":"running","animation-timing-function":"ease",azimuth:"center","backface-visibility":"visible","background-attachment":"scroll","background-blend-mode":"normal","background-clip":"border-box","background-color":"transparent","background-image":"none","background-origin":"padding-box","background-position":"0% 0%","background-repeat":"repeat","background-size":"auto auto","block-size":"auto","border-block-end-color":"currentcolor","border-block-end-style":"none","border-block-end-width":"medium","border-block-start-color":"currentcolor","border-block-start-style":"none","border-block-start-width":"medium","border-bottom-color":"currentcolor","border-bottom-left-radius":"0","border-bottom-right-radius":"0","border-bottom-style":"none","border-bottom-width":"medium","border-collapse":"separate","border-image-outset":"0s","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-inline-end-color":"currentcolor","border-inline-end-style":"none","border-inline-end-width":"medium","border-inline-start-color":"currentcolor","border-inline-start-style":"none","border-inline-start-width":"medium","border-left-color":"currentcolor","border-left-style":"none","border-left-width":"medium","border-right-color":"currentcolor","border-right-style":"none","border-right-width":"medium","border-spacing":"0","border-top-color":"currentcolor","border-top-left-radius":"0","border-top-right-radius":"0","border-top-style":"none","border-top-width":"medium",bottom:"auto","box-decoration-break":"slice","box-shadow":"none","box-sizing":"content-box","break-after":"auto","break-before":"auto","break-inside":"auto","caption-side":"top","caret-color":"auto",clear:"none",clip:"auto","clip-path":"none",color:"initial","column-count":"auto","column-fill":"balance","column-gap":"normal","column-rule-color":"currentcolor","column-rule-style":"none","column-rule-width":"medium","column-span":"none","column-width":"auto",content:"normal","counter-increment":"none","counter-reset":"none",cursor:"auto",display:"inline","empty-cells":"show",filter:"none","flex-basis":"auto","flex-direction":"row","flex-grow":"0","flex-shrink":"1","flex-wrap":"nowrap",float:"none","font-family":"initial","font-feature-settings":"normal","font-kerning":"auto","font-language-override":"normal","font-size":"medium","font-size-adjust":"none","font-stretch":"normal","font-style":"normal","font-synthesis":"weight style","font-variant":"normal","font-variant-alternates":"normal","font-variant-caps":"normal","font-variant-east-asian":"normal","font-variant-ligatures":"normal","font-variant-numeric":"normal","font-variant-position":"normal","font-weight":"normal","grid-auto-columns":"auto","grid-auto-flow":"row","grid-auto-rows":"auto","grid-column-end":"auto","grid-column-gap":"0","grid-column-start":"auto","grid-row-end":"auto","grid-row-gap":"0","grid-row-start":"auto","grid-template-areas":"none","grid-template-columns":"none","grid-template-rows":"none",height:"auto",hyphens:"manual","image-orientation":"0deg","image-rendering":"auto","image-resolution":"1dppx","ime-mode":"auto","inline-size":"auto",isolation:"auto","justify-content":"flex-start",left:"auto","letter-spacing":"normal","line-break":"auto","line-height":"normal","list-style-image":"none","list-style-position":"outside","list-style-type":"disc","margin-block-end":"0","margin-block-start":"0","margin-bottom":"0","margin-inline-end":"0","margin-inline-start":"0","margin-left":"0","margin-right":"0","margin-top":"0","mask-clip":"border-box","mask-composite":"add","mask-image":"none","mask-mode":"match-source","mask-origin":"border-box","mask-position":"0% 0%","mask-repeat":"repeat","mask-size":"auto","mask-type":"luminance","max-height":"none","max-width":"none","min-block-size":"0","min-height":"0","min-inline-size":"0","min-width":"0","mix-blend-mode":"normal","object-fit":"fill","object-position":"50% 50%","offset-block-end":"auto","offset-block-start":"auto","offset-inline-end":"auto","offset-inline-start":"auto",opacity:"1.0",order:"0",orphans:"2","outline-color":"initial","outline-offset":"0","outline-style":"none","outline-width":"medium",overflow:"visible","overflow-wrap":"normal","overflow-x":"visible","overflow-y":"visible","padding-block-end":"0","padding-block-start":"0","padding-bottom":"0","padding-inline-end":"0","padding-inline-start":"0","padding-left":"0","padding-right":"0","padding-top":"0","page-break-after":"auto","page-break-before":"auto","page-break-inside":"auto",perspective:"none","perspective-origin":"50% 50%","pointer-events":"auto",position:"static",quotes:"initial",resize:"none",right:"auto","ruby-align":"space-around","ruby-merge":"separate","ruby-position":"over","scroll-behavior":"auto","scroll-snap-coordinate":"none","scroll-snap-destination":"0px 0px","scroll-snap-points-x":"none","scroll-snap-points-y":"none","scroll-snap-type":"none","shape-image-threshold":"0.0","shape-margin":"0","shape-outside":"none","tab-size":"8","table-layout":"auto","text-align":"initial","text-align-last":"auto","text-combine-upright":"none","text-decoration-color":"currentcolor","text-decoration-line":"none","text-decoration-style":"solid","text-emphasis-color":"currentcolor","text-emphasis-position":"over right","text-emphasis-style":"none","text-indent":"0","text-justify":"auto","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-transform":"none","text-underline-position":"auto",top:"auto","touch-action":"auto",transform:"none","transform-box":"border-box ","transform-origin":"50% 50% 0","transform-style":"flat","transition-delay":"0s","transition-duration":"0s","transition-property":"all","transition-timing-function":"ease","vertical-align":"baseline",visibility:"visible","white-space":"normal",widows:"2",width:"auto","will-change":"auto","word-break":"normal","word-spacing":"normal","word-wrap":"normal","writing-mode":"horizontal-tb","z-index":"auto","-webkit-appearance":"none","-moz-appearance":"none","-ms-appearance":"none",appearance:"none"}; },{}],190:[function(require,module,exports){ module.exports=require("./all"); },{"./all":189}],191:[function(require,module,exports){ !function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A=A||self).html2canvas=e()}(this,function(){"use strict";var A=function(e,t){return(A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(e,t)};function e(e,t){function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var t=function(){return(t=Object.assign||function(A){for(var e,t=1,r=arguments.length;t0&&n[n.length-1])&&(6===B[0]||2===B[0])){s=0;continue}if(3===B[0]&&(!n||B[1]>n[0]&&B[1]=55296&&n<=56319&&t>10),s%1024+56320)),(n+1===t||r.length>16384)&&(B+=String.fromCharCode.apply(String,r),r.length=0)}return B},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Q=0;Q=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),l=10,C=13,g=15,E=17,F=18,h=19,H=20,d=21,f=22,p=24,N=25,K=26,I=27,T=28,m=30,R=32,L=33,O=34,v=35,D=37,b=38,S=39,M=40,y=42,_="!",P=function(A){var e,t,r,n=function(A){var e,t,r,n,B,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),Q=Array.isArray(a)?a:new Uint8Array(a);for(e=0;e>4,Q[i++]=(15&r)<<4|n>>2,Q[i++]=(3&n)<<6|63&B;return a}(A),B=Array.isArray(n)?function(A){for(var e=A.length,t=[],r=0;r0;){var s=r[--B];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==l)break}if(s!==l)break}return!1},Y=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==l)return r;t--}return 0},q=function(A,e,t,r,n){if(0===t[r])return"×";var B=r-1;if(Array.isArray(n)&&!0===n[B])return"×";var s=B-1,o=B+1,i=e[B],a=s>=0?e[s]:0,c=e[o];if(2===i&&3===c)return"×";if(-1!==V.indexOf(i))return _;if(-1!==V.indexOf(c))return"×";if(-1!==z.indexOf(c))return"×";if(8===Y(B,e))return"÷";if(11===P.get(A[B])&&(c===D||c===R||c===L))return"×";if(7===i||7===c)return"×";if(9===i)return"×";if(-1===[l,C,g].indexOf(i)&&9===c)return"×";if(-1!==[E,F,h,p,T].indexOf(c))return"×";if(Y(B,e)===f)return"×";if(W(23,f,B,e))return"×";if(W([E,F],d,B,e))return"×";if(W(12,12,B,e))return"×";if(i===l)return"÷";if(23===i||23===c)return"×";if(16===c||16===i)return"÷";if(-1!==[C,g,d].indexOf(c)||14===i)return"×";if(36===a&&-1!==k.indexOf(i))return"×";if(i===T&&36===c)return"×";if(c===H&&-1!==x.concat(H,h,N,D,R,L).indexOf(i))return"×";if(-1!==x.indexOf(c)&&i===N||-1!==x.indexOf(i)&&c===N)return"×";if(i===I&&-1!==[D,R,L].indexOf(c)||-1!==[D,R,L].indexOf(i)&&c===K)return"×";if(-1!==x.indexOf(i)&&-1!==X.indexOf(c)||-1!==X.indexOf(i)&&-1!==x.indexOf(c))return"×";if(-1!==[I,K].indexOf(i)&&(c===N||-1!==[f,g].indexOf(c)&&e[o+1]===N)||-1!==[f,g].indexOf(i)&&c===N||i===N&&-1!==[N,T,p].indexOf(c))return"×";if(-1!==[N,T,p,E,F].indexOf(c))for(var Q=B;Q>=0;){if((u=e[Q])===N)return"×";if(-1===[T,p].indexOf(u))break;Q--}if(-1!==[I,K].indexOf(c))for(Q=-1!==[E,F].indexOf(i)?s:B;Q>=0;){var u;if((u=e[Q])===N)return"×";if(-1===[T,p].indexOf(u))break;Q--}if(b===i&&-1!==[b,S,O,v].indexOf(c)||-1!==[S,O].indexOf(i)&&-1!==[S,M].indexOf(c)||-1!==[M,v].indexOf(i)&&c===M)return"×";if(-1!==G.indexOf(i)&&-1!==[H,K].indexOf(c)||-1!==G.indexOf(c)&&i===I)return"×";if(-1!==x.indexOf(i)&&-1!==x.indexOf(c))return"×";if(i===p&&-1!==x.indexOf(c))return"×";if(-1!==x.concat(N).indexOf(i)&&c===f||-1!==x.concat(N).indexOf(c)&&i===F)return"×";if(41===i&&41===c){for(var w=t[B],U=1;w>0&&41===e[--w];)U++;if(U%2!=0)return"×"}return i===R&&c===L?"×":"÷"},Z=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],n=[];return A.forEach(function(A,B){var s=P.get(A);if(s>50?(n.push(!0),s-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(B),t.push(16);if(4===s||11===s){if(0===B)return r.push(B),t.push(m);var o=t[B-1];return-1===J.indexOf(o)?(r.push(r[B-1]),t.push(o)):(r.push(B),t.push(m))}return r.push(B),31===s?t.push("strict"===e?d:D):s===y?t.push(m):29===s?t.push(m):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(D):t.push(m):void t.push(s)}),[r,t,n]}(A,e.lineBreak),r=t[0],n=t[1],B=t[2];return"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map(function(A){return-1!==[N,m,y].indexOf(A)?D:A})),[r,n,"keep-all"===e.wordBreak?B.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0]},j=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===_,this.start=t,this.end=r}return A.prototype.slice=function(){return i.apply(void 0,this.codePoints.slice(this.start,this.end))},A}();!function(A){A[A.STRING_TOKEN=0]="STRING_TOKEN",A[A.BAD_STRING_TOKEN=1]="BAD_STRING_TOKEN",A[A.LEFT_PARENTHESIS_TOKEN=2]="LEFT_PARENTHESIS_TOKEN",A[A.RIGHT_PARENTHESIS_TOKEN=3]="RIGHT_PARENTHESIS_TOKEN",A[A.COMMA_TOKEN=4]="COMMA_TOKEN",A[A.HASH_TOKEN=5]="HASH_TOKEN",A[A.DELIM_TOKEN=6]="DELIM_TOKEN",A[A.AT_KEYWORD_TOKEN=7]="AT_KEYWORD_TOKEN",A[A.PREFIX_MATCH_TOKEN=8]="PREFIX_MATCH_TOKEN",A[A.DASH_MATCH_TOKEN=9]="DASH_MATCH_TOKEN",A[A.INCLUDE_MATCH_TOKEN=10]="INCLUDE_MATCH_TOKEN",A[A.LEFT_CURLY_BRACKET_TOKEN=11]="LEFT_CURLY_BRACKET_TOKEN",A[A.RIGHT_CURLY_BRACKET_TOKEN=12]="RIGHT_CURLY_BRACKET_TOKEN",A[A.SUFFIX_MATCH_TOKEN=13]="SUFFIX_MATCH_TOKEN",A[A.SUBSTRING_MATCH_TOKEN=14]="SUBSTRING_MATCH_TOKEN",A[A.DIMENSION_TOKEN=15]="DIMENSION_TOKEN",A[A.PERCENTAGE_TOKEN=16]="PERCENTAGE_TOKEN",A[A.NUMBER_TOKEN=17]="NUMBER_TOKEN",A[A.FUNCTION=18]="FUNCTION",A[A.FUNCTION_TOKEN=19]="FUNCTION_TOKEN",A[A.IDENT_TOKEN=20]="IDENT_TOKEN",A[A.COLUMN_TOKEN=21]="COLUMN_TOKEN",A[A.URL_TOKEN=22]="URL_TOKEN",A[A.BAD_URL_TOKEN=23]="BAD_URL_TOKEN",A[A.CDC_TOKEN=24]="CDC_TOKEN",A[A.CDO_TOKEN=25]="CDO_TOKEN",A[A.COLON_TOKEN=26]="COLON_TOKEN",A[A.SEMICOLON_TOKEN=27]="SEMICOLON_TOKEN",A[A.LEFT_SQUARE_BRACKET_TOKEN=28]="LEFT_SQUARE_BRACKET_TOKEN",A[A.RIGHT_SQUARE_BRACKET_TOKEN=29]="RIGHT_SQUARE_BRACKET_TOKEN",A[A.UNICODE_RANGE_TOKEN=30]="UNICODE_RANGE_TOKEN",A[A.WHITESPACE_TOKEN=31]="WHITESPACE_TOKEN",A[A.EOF_TOKEN=32]="EOF_TOKEN"}(u||(u={}));var $=function(A){return A>=48&&A<=57},AA=function(A){return $(A)||A>=65&&A<=70||A>=97&&A<=102},eA=function(A){return 10===A||9===A||32===A},tA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},rA=function(A){return tA(A)||$(A)||45===A},nA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},BA=function(A,e){return 92===A&&10!==e},sA=function(A,e,t){return 45===A?tA(e)||BA(e,t):!!tA(A)||!(92!==A||!BA(A,e))},oA=function(A,e,t){return 43===A||45===A?!!$(e)||46===e&&$(t):$(46===A?e:A)},iA={type:u.LEFT_PARENTHESIS_TOKEN},aA={type:u.RIGHT_PARENTHESIS_TOKEN},cA={type:u.COMMA_TOKEN},QA={type:u.SUFFIX_MATCH_TOKEN},uA={type:u.PREFIX_MATCH_TOKEN},wA={type:u.COLUMN_TOKEN},UA={type:u.DASH_MATCH_TOKEN},lA={type:u.INCLUDE_MATCH_TOKEN},CA={type:u.LEFT_CURLY_BRACKET_TOKEN},gA={type:u.RIGHT_CURLY_BRACKET_TOKEN},EA={type:u.SUBSTRING_MATCH_TOKEN},FA={type:u.BAD_URL_TOKEN},hA={type:u.BAD_STRING_TOKEN},HA={type:u.CDO_TOKEN},dA={type:u.CDC_TOKEN},fA={type:u.COLON_TOKEN},pA={type:u.SEMICOLON_TOKEN},NA={type:u.LEFT_SQUARE_BRACKET_TOKEN},KA={type:u.RIGHT_SQUARE_BRACKET_TOKEN},IA={type:u.WHITESPACE_TOKEN},TA={type:u.EOF_TOKEN},mA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(o(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==TA;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(rA(e)||BA(t,r)){var n=sA(e,t,r)?2:1,B=this.consumeName();return{type:u.HASH_TOKEN,value:B,flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),QA;break;case 39:return this.consumeStringToken(39);case 40:return iA;case 41:return aA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),EA;break;case 43:if(oA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return cA;case 45:var s=A,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(oA(s,o,a))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(sA(s,o,a))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===o&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),dA;break;case 46:if(oA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(42===c&&47===(c=this.consumeCodePoint()))return this.consumeToken();if(-1===c)return this.consumeToken()}break;case 58:return fA;case 59:return pA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),HA;break;case 64:var Q=this.peekCodePoint(0),w=this.peekCodePoint(1),U=this.peekCodePoint(2);if(sA(Q,w,U)){B=this.consumeName();return{type:u.AT_KEYWORD_TOKEN,value:B}}break;case 91:return NA;case 92:if(BA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return KA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),uA;break;case 123:return CA;case 125:return gA;case 117:case 85:var l=this.peekCodePoint(0),C=this.peekCodePoint(1);return 43!==l||!AA(C)&&63!==C||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),UA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),wA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),lA;break;case-1:return TA}return eA(A)?(this.consumeWhiteSpace(),IA):$(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):tA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:u.DELIM_TOKEN,value:i(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();AA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(i.apply(void 0,A.map(function(A){return 63===A?48:A})),16),n=parseInt(i.apply(void 0,A.map(function(A){return 63===A?70:A})),16);return{type:u.UNICODE_RANGE_TOKEN,start:r,end:n}}var B=parseInt(i.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&AA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var s=[];AA(e)&&s.length<6;)s.push(e),e=this.consumeCodePoint();n=parseInt(i.apply(void 0,s),16);return{type:u.UNICODE_RANGE_TOKEN,start:B,end:n}}return{type:u.UNICODE_RANGE_TOKEN,start:B,end:B}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:u.FUNCTION_TOKEN,value:A}):{type:u.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:u.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===u.STRING_TOKEN&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),FA)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:u.URL_TOKEN,value:i.apply(void 0,A)};if(eA(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:u.URL_TOKEN,value:i.apply(void 0,A)}):(this.consumeBadUrlRemnants(),FA);if(34===r||39===r||40===r||nA(r))return this.consumeBadUrlRemnants(),FA;if(92===r){if(!BA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),FA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;eA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;BA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(6e4,A);e+=i.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(-1===r||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:u.STRING_TOKEN,value:e};if(10===r)return this._value.splice(0,t),hA;if(92===r){var n=this._value[t+1];-1!==n&&void 0!==n&&(10===n?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):BA(r,n)&&(e+=this.consumeStringSlice(t),e+=i(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(43!==t&&45!==t||A.push(this.consumeCodePoint());$(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&$(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;$(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===t||101===t)&&((43===r||45===r)&&$(n)||$(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;$(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[function(A){var e=0,t=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++);for(var r=[];$(A[e]);)r.push(A[e++]);var n=r.length?parseInt(i.apply(void 0,r),10):0;46===A[e]&&e++;for(var B=[];$(A[e]);)B.push(A[e++]);var s=B.length,o=s?parseInt(i.apply(void 0,B),10):0;69!==A[e]&&101!==A[e]||e++;var a=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(a=-1),e++);for(var c=[];$(A[e]);)c.push(A[e++]);var Q=c.length?parseInt(i.apply(void 0,c),10):0;return t*(n+o*Math.pow(10,-s))*Math.pow(10,a*Q)}(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),B=this.peekCodePoint(2);if(sA(r,n,B)){var s=this.consumeName();return{type:u.DIMENSION_TOKEN,number:e,flags:t,unit:s}}return 37===r?(this.consumeCodePoint(),{type:u.PERCENTAGE_TOKEN,number:e,flags:t}):{type:u.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(AA(A)){for(var e=i(A);AA(this.peekCodePoint(0))&&e.length<6;)e+=i(this.consumeCodePoint());eA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return-1===A?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(rA(e))A+=i(e);else{if(!BA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=i(this.consumeEscapedCodePoint())}}},A}(),RA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new mA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===u.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===u.EOF_TOKEN)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(A.type===u.WHITESPACE_TOKEN);if(A.type===u.EOF_TOKEN)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===u.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case u.LEFT_CURLY_BRACKET_TOKEN:case u.LEFT_SQUARE_BRACKET_TOKEN:case u.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case u.FUNCTION_TOKEN:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===u.EOF_TOKEN||_A(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:u.FUNCTION};;){var t=this.consumeToken();if(t.type===u.EOF_TOKEN||t.type===u.RIGHT_PARENTHESIS_TOKEN)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?TA:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),LA=function(A){return A.type===u.DIMENSION_TOKEN},OA=function(A){return A.type===u.NUMBER_TOKEN},vA=function(A){return A.type===u.IDENT_TOKEN},DA=function(A){return A.type===u.STRING_TOKEN},bA=function(A,e){return vA(A)&&A.value===e},SA=function(A){return A.type!==u.WHITESPACE_TOKEN},MA=function(A){return A.type!==u.WHITESPACE_TOKEN&&A.type!==u.COMMA_TOKEN},yA=function(A){var e=[],t=[];return A.forEach(function(A){if(A.type===u.COMMA_TOKEN){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}A.type!==u.WHITESPACE_TOKEN&&t.push(A)}),t.length&&e.push(t),e},_A=function(A,e){return e===u.LEFT_CURLY_BRACKET_TOKEN&&A.type===u.RIGHT_CURLY_BRACKET_TOKEN||(e===u.LEFT_SQUARE_BRACKET_TOKEN&&A.type===u.RIGHT_SQUARE_BRACKET_TOKEN||e===u.LEFT_PARENTHESIS_TOKEN&&A.type===u.RIGHT_PARENTHESIS_TOKEN)},PA=function(A){return A.type===u.NUMBER_TOKEN||A.type===u.DIMENSION_TOKEN},xA=function(A){return A.type===u.PERCENTAGE_TOKEN||PA(A)},VA=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},zA={type:u.NUMBER_TOKEN,number:0,flags:4},XA={type:u.PERCENTAGE_TOKEN,number:50,flags:4},JA={type:u.PERCENTAGE_TOKEN,number:100,flags:4},GA=function(A,e,t){var r=A[0],n=A[1];return[kA(r,e),kA(void 0!==n?n:r,t)]},kA=function(A,e){if(A.type===u.PERCENTAGE_TOKEN)return A.number/100*e;if(LA(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},WA=function(A){if(A.type===u.DIMENSION_TOKEN)switch(A.unit){case"deg":return Math.PI*A.number/180;case"grad":return Math.PI/200*A.number;case"rad":return A.number;case"turn":return 2*Math.PI*A.number}throw new Error("Unsupported angle type")},YA=function(A){return A.type===u.DIMENSION_TOKEN&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)},qA=function(A){switch(A.filter(vA).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zA,zA];case"to top":case"bottom":return ZA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zA,JA];case"to right":case"left":return ZA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[JA,JA];case"to bottom":case"top":return ZA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[JA,zA];case"to left":case"right":return ZA(270)}return 0},ZA=function(A){return Math.PI*A/180},jA=function(A){if(A.type===u.FUNCTION){var e=ie[A.name];if(void 0===e)throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(A.values)}if(A.type===u.HASH_TOKEN){if(3===A.value.length){var t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);return ee(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),1)}if(4===A.value.length){t=A.value.substring(0,1),r=A.value.substring(1,2),n=A.value.substring(2,3);var B=A.value.substring(3,4);return ee(parseInt(t+t,16),parseInt(r+r,16),parseInt(n+n,16),parseInt(B+B,16)/255)}if(6===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6);return ee(parseInt(t,16),parseInt(r,16),parseInt(n,16),1)}if(8===A.value.length){t=A.value.substring(0,2),r=A.value.substring(2,4),n=A.value.substring(4,6),B=A.value.substring(6,8);return ee(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(B,16)/255)}}if(A.type===u.IDENT_TOKEN){var s=ae[A.value.toUpperCase()];if(void 0!==s)return s}return ae.TRANSPARENT},$A=function(A){return 0==(255&A)},Ae=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,n=255&A>>24;return e<255?"rgba("+n+","+r+","+t+","+e/255+")":"rgb("+n+","+r+","+t+")"},ee=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},te=function(A,e){if(A.type===u.NUMBER_TOKEN)return A.number;if(A.type===u.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},re=function(A){var e=A.filter(MA);if(3===e.length){var t=e.map(te),r=t[0],n=t[1],B=t[2];return ee(r,n,B,1)}if(4===e.length){var s=e.map(te),o=(r=s[0],n=s[1],B=s[2],s[3]);return ee(r,n,B,o)}return 0};function ne(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var Be,se,oe=function(A){var e=A.filter(MA),t=e[0],r=e[1],n=e[2],B=e[3],s=(t.type===u.NUMBER_TOKEN?ZA(t.number):WA(t))/(2*Math.PI),o=xA(r)?r.number/100:0,i=xA(n)?n.number/100:0,a=void 0!==B&&xA(B)?kA(B,1):1;if(0===o)return ee(255*i,255*i,255*i,1);var c=i<=.5?i*(o+1):i+o-i*o,Q=2*i-c,w=ne(Q,c,s+1/3),U=ne(Q,c,s),l=ne(Q,c,s-1/3);return ee(255*w,255*U,255*l,a)},ie={hsl:oe,hsla:oe,rgb:re,rgba:re},ae={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(A){A[A.VALUE=0]="VALUE",A[A.LIST=1]="LIST",A[A.IDENT_VALUE=2]="IDENT_VALUE",A[A.TYPE_VALUE=3]="TYPE_VALUE",A[A.TOKEN_VALUE=4]="TOKEN_VALUE"}(Be||(Be={})),function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(se||(se={}));var ce,Qe={name:"background-clip",initialValue:"border-box",prefix:!1,type:Be.LIST,parse:function(A){return A.map(function(A){if(vA(A))switch(A.value){case"padding-box":return se.PADDING_BOX;case"content-box":return se.CONTENT_BOX}return se.BORDER_BOX})}},ue={name:"background-color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"},we=function(A){var e=jA(A[0]),t=A[1];return t&&xA(t)?{color:e,stop:t}:{color:e,stop:null}},Ue=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=zA),null===r.stop&&(r.stop=JA);for(var n=[],B=0,s=0;sB?n.push(i):n.push(B),B=i}else n.push(null)}var a=null;for(s=0;sA.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Ee=function(A){var e=ZA(180),t=[];return yA(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(e=qA(A));if(YA(n))return void(e=(WA(n)+ZA(270))%ZA(360))}var B=we(A);t.push(B)}),{angle:e,stops:t,type:ce.LINEAR_GRADIENT}},Fe=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},he=function(A,e,t,r,n){var B="http://www.w3.org/2000/svg",s=document.createElementNS(B,"svg"),o=document.createElementNS(B,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(n),s},He=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},de={get SUPPORT_RANGE_BOUNDS(){var A=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest");t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t);var r=e.getBoundingClientRect(),n=Math.round(r.height);if(A.body.removeChild(t),123===n)return!0}}return!1}(document);return Object.defineProperty(de,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(de,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas");e.width=100,e.height=100;var t=e.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,100,100);var r=new Image,n=e.toDataURL();r.src=n;var B=he(100,100,0,0,r);return t.fillStyle="red",t.fillRect(0,0,100,100),He(B).then(function(e){t.drawImage(e,0,0);var r=t.getImageData(0,0,100,100).data;t.fillStyle="red",t.fillRect(0,0,100,100);var B=A.createElement("div");return B.style.backgroundImage="url("+n+")",B.style.height="100px",Fe(r)?He(he(100,100,0,0,B)):Promise.reject(!1)}).then(function(A){return t.drawImage(A,0,0),Fe(t.getImageData(0,0,100,100).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(de,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(de,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(de,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(de,"SUPPORT_CORS_XHR",{value:A}),A}},fe=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e0&&setTimeout(function(){return e("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,n.sent()]}})})},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(n,B){var s=de.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;if(o.onload=function(){if(200===o.status)if("text"===s)n(o.response);else{var A=new FileReader;A.addEventListener("load",function(){return n(A.result)},!1),A.addEventListener("error",function(A){return B(A)},!1),A.readAsDataURL(o.response)}else B("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=B,o.open("GET",t+"?url="+encodeURIComponent(A)+"&responseType="+s),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var i=e._options.imageTimeout;o.timeout=i,o.ontimeout=function(){return B("Timed out ("+i+"ms) proxying "+r)}}o.send()})},A}(),Ke=/^data:image\/svg\+xml/i,Ie=/^data:image\/.*;base64,/i,Te=/^data:image\/.*/i,me=function(A){return de.SUPPORT_SVG_DRAWING||!ve(A)},Re=function(A){return Te.test(A)},Le=function(A){return Ie.test(A)},Oe=function(A){return"blob"===A.substr(0,4)},ve=function(A){return"svg"===A.substr(-3).toLowerCase()||Ke.test(A)},De=function(A){var e=be.CIRCLE,t=Se.FARTHEST_CORNER,r=[],n=[];return yA(A).forEach(function(A,B){var s=!0;if(0===B?s=A.reduce(function(A,e){if(vA(e))switch(e.value){case"center":return n.push(XA),!1;case"top":case"left":return n.push(zA),!1;case"right":case"bottom":return n.push(JA),!1}else if(xA(e)||PA(e))return n.push(e),!1;return A},s):1===B&&(s=A.reduce(function(A,r){if(vA(r))switch(r.value){case"circle":return e=be.CIRCLE,!1;case"ellipse":return e=be.ELLIPSE,!1;case"contain":case"closest-side":return t=Se.CLOSEST_SIDE,!1;case"farthest-side":return t=Se.FARTHEST_SIDE,!1;case"closest-corner":return t=Se.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return t=Se.FARTHEST_CORNER,!1}else if(PA(r)||xA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)),s){var o=we(A);r.push(o)}}),{size:t,shape:e,stops:r,position:n,type:ce.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(ce||(ce={}));var be,Se;!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(be||(be={})),function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Se||(Se={}));var Me=function(A){if(A.type===u.URL_TOKEN){var e={url:A.value,type:ce.URL};return pe.getInstance().addImage(A.value),e}if(A.type===u.FUNCTION){var t=_e[A.name];if(void 0===t)throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(A.values)}throw new Error("Unsupported image type")};var ye,_e={"linear-gradient":function(A){var e=ZA(180),t=[];return yA(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===u.IDENT_TOKEN&&"to"===n.value)return void(e=qA(A));if(YA(n))return void(e=WA(n))}var B=we(A);t.push(B)}),{angle:e,stops:t,type:ce.LINEAR_GRADIENT}},"-moz-linear-gradient":Ee,"-ms-linear-gradient":Ee,"-o-linear-gradient":Ee,"-webkit-linear-gradient":Ee,"radial-gradient":function(A){var e=be.CIRCLE,t=Se.FARTHEST_CORNER,r=[],n=[];return yA(A).forEach(function(A,B){var s=!0;if(0===B){var o=!1;s=A.reduce(function(A,r){if(o)if(vA(r))switch(r.value){case"center":return n.push(XA),A;case"top":case"left":return n.push(zA),A;case"right":case"bottom":return n.push(JA),A}else(xA(r)||PA(r))&&n.push(r);else if(vA(r))switch(r.value){case"circle":return e=be.CIRCLE,!1;case"ellipse":return e=be.ELLIPSE,!1;case"at":return o=!0,!1;case"closest-side":return t=Se.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return t=Se.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return t=Se.CLOSEST_CORNER,!1;case"farthest-corner":return t=Se.FARTHEST_CORNER,!1}else if(PA(r)||xA(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)}if(s){var i=we(A);r.push(i)}}),{size:t,shape:e,stops:r,position:n,type:ce.RADIAL_GRADIENT}},"-moz-radial-gradient":De,"-ms-radial-gradient":De,"-o-radial-gradient":De,"-webkit-radial-gradient":De,"-webkit-gradient":function(A){var e=ZA(180),t=[],r=ce.LINEAR_GRADIENT,n=be.CIRCLE,B=Se.FARTHEST_CORNER;return yA(A).forEach(function(A,e){var n=A[0];if(0===e){if(vA(n)&&"linear"===n.value)return void(r=ce.LINEAR_GRADIENT);if(vA(n)&&"radial"===n.value)return void(r=ce.RADIAL_GRADIENT)}if(n.type===u.FUNCTION)if("from"===n.name){var B=jA(n.values[0]);t.push({stop:zA,color:B})}else if("to"===n.name)B=jA(n.values[0]),t.push({stop:JA,color:B});else if("color-stop"===n.name){var s=n.values.filter(MA);if(2===s.length){B=jA(s[1]);var o=s[0];OA(o)&&t.push({stop:{type:u.PERCENTAGE_TOKEN,number:100*o.number,flags:o.flags},color:B})}}}),r===ce.LINEAR_GRADIENT?{angle:(e+ZA(180))%ZA(360),stops:t,type:r}:{size:B,shape:n,stops:t,position:[],type:r}}},Pe={name:"background-image",initialValue:"none",type:Be.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===u.IDENT_TOKEN&&"none"===e.value?[]:A.filter(function(A){return MA(A)&&function(A){return A.type!==u.FUNCTION||_e[A.name]}(A)}).map(Me)}},xe={name:"background-origin",initialValue:"border-box",prefix:!1,type:Be.LIST,parse:function(A){return A.map(function(A){if(vA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ve={name:"background-position",initialValue:"0% 0%",type:Be.LIST,prefix:!1,parse:function(A){return yA(A).map(function(A){return A.filter(xA)}).map(VA)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}(ye||(ye={}));var ze,Xe={name:"background-repeat",initialValue:"repeat",prefix:!1,type:Be.LIST,parse:function(A){return yA(A).map(function(A){return A.filter(vA).map(function(A){return A.value}).join(" ")}).map(Je)}},Je=function(A){switch(A){case"no-repeat":return ye.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return ye.REPEAT_X;case"repeat-y":case"no-repeat repeat":return ye.REPEAT_Y;case"repeat":default:return ye.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(ze||(ze={}));var Ge,ke={name:"background-size",initialValue:"0",prefix:!1,type:Be.LIST,parse:function(A){return yA(A).map(function(A){return A.filter(We)})}},We=function(A){return vA(A)||xA(A)},Ye=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"}},qe=Ye("top"),Ze=Ye("right"),je=Ye("bottom"),$e=Ye("left"),At=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:Be.LIST,parse:function(A){return VA(A.filter(xA))}}},et=At("top-left"),tt=At("top-right"),rt=At("bottom-right"),nt=At("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"}(Ge||(Ge={}));var Bt,st=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"none":return Ge.NONE}return Ge.SOLID}}},ot=st("top"),it=st("right"),at=st("bottom"),ct=st("left"),Qt=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:Be.VALUE,prefix:!1,parse:function(A){return LA(A)?A.number:0}}},ut=Qt("top"),wt=Qt("right"),Ut=Qt("bottom"),lt=Qt("left"),Ct={name:"color",initialValue:"transparent",prefix:!1,type:Be.TYPE_VALUE,format:"color"},gt={name:"display",initialValue:"inline-block",prefix:!1,type:Be.LIST,parse:function(A){return A.filter(vA).reduce(function(A,e){return A|Et(e.value)},0)}},Et=function(A){switch(A){case"block":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(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(Bt||(Bt={}));var Ft,ht={name:"float",initialValue:"none",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"left":return Bt.LEFT;case"right":return Bt.RIGHT;case"inline-start":return Bt.INLINE_START;case"inline-end":return Bt.INLINE_END}return Bt.NONE}},Ht={name:"letter-spacing",initialValue:"0",prefix:!1,type:Be.VALUE,parse:function(A){return A.type===u.IDENT_TOKEN&&"normal"===A.value?0:A.type===u.NUMBER_TOKEN?A.number:A.type===u.DIMENSION_TOKEN?A.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(Ft||(Ft={}));var dt,ft={name:"line-break",initialValue:"normal",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"strict":return Ft.STRICT;case"normal":default:return Ft.NORMAL}}},pt={name:"line-height",initialValue:"normal",prefix:!1,type:Be.TOKEN_VALUE},Nt={name:"list-style-image",initialValue:"none",type:Be.VALUE,prefix:!1,parse:function(A){return A.type===u.IDENT_TOKEN&&"none"===A.value?null:Me(A)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(dt||(dt={}));var Kt,It={name:"list-style-position",initialValue:"outside",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"inside":return dt.INSIDE;case"outside":default:return dt.OUTSIDE}}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(Kt||(Kt={}));var Tt,mt={name:"list-style-type",initialValue:"none",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"disc":return Kt.DISC;case"circle":return Kt.CIRCLE;case"square":return Kt.SQUARE;case"decimal":return Kt.DECIMAL;case"cjk-decimal":return Kt.CJK_DECIMAL;case"decimal-leading-zero":return Kt.DECIMAL_LEADING_ZERO;case"lower-roman":return Kt.LOWER_ROMAN;case"upper-roman":return Kt.UPPER_ROMAN;case"lower-greek":return Kt.LOWER_GREEK;case"lower-alpha":return Kt.LOWER_ALPHA;case"upper-alpha":return Kt.UPPER_ALPHA;case"arabic-indic":return Kt.ARABIC_INDIC;case"armenian":return Kt.ARMENIAN;case"bengali":return Kt.BENGALI;case"cambodian":return Kt.CAMBODIAN;case"cjk-earthly-branch":return Kt.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return Kt.CJK_HEAVENLY_STEM;case"cjk-ideographic":return Kt.CJK_IDEOGRAPHIC;case"devanagari":return Kt.DEVANAGARI;case"ethiopic-numeric":return Kt.ETHIOPIC_NUMERIC;case"georgian":return Kt.GEORGIAN;case"gujarati":return Kt.GUJARATI;case"gurmukhi":return Kt.GURMUKHI;case"hebrew":return Kt.HEBREW;case"hiragana":return Kt.HIRAGANA;case"hiragana-iroha":return Kt.HIRAGANA_IROHA;case"japanese-formal":return Kt.JAPANESE_FORMAL;case"japanese-informal":return Kt.JAPANESE_INFORMAL;case"kannada":return Kt.KANNADA;case"katakana":return Kt.KATAKANA;case"katakana-iroha":return Kt.KATAKANA_IROHA;case"khmer":return Kt.KHMER;case"korean-hangul-formal":return Kt.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return Kt.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return Kt.KOREAN_HANJA_INFORMAL;case"lao":return Kt.LAO;case"lower-armenian":return Kt.LOWER_ARMENIAN;case"malayalam":return Kt.MALAYALAM;case"mongolian":return Kt.MONGOLIAN;case"myanmar":return Kt.MYANMAR;case"oriya":return Kt.ORIYA;case"persian":return Kt.PERSIAN;case"simp-chinese-formal":return Kt.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return Kt.SIMP_CHINESE_INFORMAL;case"tamil":return Kt.TAMIL;case"telugu":return Kt.TELUGU;case"thai":return Kt.THAI;case"tibetan":return Kt.TIBETAN;case"trad-chinese-formal":return Kt.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return Kt.TRAD_CHINESE_INFORMAL;case"upper-armenian":return Kt.UPPER_ARMENIAN;case"disclosure-open":return Kt.DISCLOSURE_OPEN;case"disclosure-closed":return Kt.DISCLOSURE_CLOSED;case"none":default:return Kt.NONE}}},Rt=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:Be.TOKEN_VALUE}},Lt=Rt("top"),Ot=Rt("right"),vt=Rt("bottom"),Dt=Rt("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"}(Tt||(Tt={}));var bt,St={name:"overflow",initialValue:"visible",prefix:!1,type:Be.LIST,parse:function(A){return A.filter(vA).map(function(A){switch(A.value){case"hidden":return Tt.HIDDEN;case"scroll":return Tt.SCROLL;case"auto":return Tt.AUTO;case"visible":default:return Tt.VISIBLE}})}};!function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"}(bt||(bt={}));var Mt,yt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"break-word":return bt.BREAK_WORD;case"normal":default:return bt.NORMAL}}},_t=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:Be.TYPE_VALUE,format:"length-percentage"}},Pt=_t("top"),xt=_t("right"),Vt=_t("bottom"),zt=_t("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(Mt||(Mt={}));var Xt,Jt={name:"text-align",initialValue:"left",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"right":return Mt.RIGHT;case"center":case"justify":return Mt.CENTER;case"left":default:return Mt.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(Xt||(Xt={}));var Gt,kt={name:"position",initialValue:"static",prefix:!1,type:Be.IDENT_VALUE,parse:function(A){switch(A){case"relative":return Xt.RELATIVE;case"absolute":return Xt.ABSOLUTE;case"fixed":return Xt.FIXED;case"sticky":return Xt.STICKY}return Xt.STATIC}},Wt={name:"text-shadow",initialValue:"none",type:Be.LIST,prefix:!1,parse:function(A){return 1===A.length&&bA(A[0],"none")?[]:yA(A).map(function(A){for(var e={color:ae.TRANSPARENT,offsetX:zA,offsetY:zA,blur:zA},t=0,r=0;r1?1:0],this.overflowWrap=Ir(yt,A.overflowWrap),this.paddingTop=Ir(Pt,A.paddingTop),this.paddingRight=Ir(xt,A.paddingRight),this.paddingBottom=Ir(Vt,A.paddingBottom),this.paddingLeft=Ir(zt,A.paddingLeft),this.position=Ir(kt,A.position),this.textAlign=Ir(Jt,A.textAlign),this.textDecorationColor=Ir(ir,A.textDecorationColor||A.color),this.textDecorationLine=Ir(ar,A.textDecorationLine),this.textShadow=Ir(Wt,A.textShadow),this.textTransform=Ir(qt,A.textTransform),this.transform=Ir(Zt,A.transform),this.transformOrigin=Ir(er,A.transformOrigin),this.visibility=Ir(rr,A.visibility),this.wordBreak=Ir(Br,A.wordBreak),this.zIndex=Ir(sr,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Yt.VISIBLE},A.prototype.isTransparent=function(){return $A(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==Xt.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==Bt.NONE},A.prototype.isInlineLevel=function(){return gr(this.display,4)||gr(this.display,33554432)||gr(this.display,268435456)||gr(this.display,536870912)||gr(this.display,67108864)||gr(this.display,134217728)},A}(),Nr=function(){return function(A){this.content=Ir(Er,A.content),this.quotes=Ir(Hr,A.quotes)}}(),Kr=function(){return function(A){this.counterIncrement=Ir(Fr,A.counterIncrement),this.counterReset=Ir(hr,A.counterReset)}}(),Ir=function(A,e){var t=new mA,r=null!==e&&void 0!==e?e.toString():A.initialValue;t.write(r);var n=new RA(t.read());switch(A.type){case Be.IDENT_VALUE:var B=n.parseComponentValue();return A.parse(vA(B)?B.value:A.initialValue);case Be.VALUE:return A.parse(n.parseComponentValue());case Be.LIST:return A.parse(n.parseComponentValues());case Be.TOKEN_VALUE:return n.parseComponentValue();case Be.TYPE_VALUE:switch(A.format){case"angle":return WA(n.parseComponentValue());case"color":return jA(n.parseComponentValue());case"image":return Me(n.parseComponentValue());case"length":var s=n.parseComponentValue();return PA(s)?s:zA;case"length-percentage":var o=n.parseComponentValue();return xA(o)?o:zA}}throw new Error("Attempting to parse unsupported css format type "+A.format)},Tr=function(){return function(A){this.styles=new pr(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&Qn(A)&&(A.style.transform="none"),this.bounds=s(A),this.flags=0}}(),mr=function(){return function(A,e){this.text=A,this.bounds=e}}(),Rr=function(A,e,t){var r=[],n=0;return vr(A,e).forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(de.SUPPORT_RANGE_BOUNDS)r.push(new mr(A,Or(t,n,A.length)));else{var B=t.splitText(A.length);r.push(new mr(A,Lr(t))),t=B}else de.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));n+=A.length}),r},Lr=function(A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var n=s(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new B(0,0,0,0)},Or=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(A,e),n.setEnd(A,e+t),B.fromClientRect(n.getBoundingClientRect())},vr=function(A,e){return 0!==e.letterSpacing?o(A).map(function(A){return i(A)}):Dr(A,e)},Dr=function(A,e){for(var t,r=function(A,e){var t=o(A),r=Z(t,e),n=r[0],B=r[1],s=r[2],i=t.length,a=0,c=0;return{next:function(){if(c>=i)return{done:!0,value:null};for(var A="×";c0?e+t.toUpperCase():A},_r=function(A){function t(e){var t=A.call(this,e)||this;return t.src=e.currentSrc||e.src,t.intrinsicWidth=e.naturalWidth,t.intrinsicHeight=e.naturalHeight,pe.getInstance().addImage(t.src),t}return e(t,A),t}(Tr),Pr=function(A){function t(e){var t=A.call(this,e)||this;return t.canvas=e,t.intrinsicWidth=e.width,t.intrinsicHeight=e.height,t}return e(t,A),t}(Tr),xr=function(A){function t(e){var t=A.call(this,e)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(e)),t.intrinsicWidth=e.width.baseVal.value,t.intrinsicHeight=e.height.baseVal.value,pe.getInstance().addImage(t.svg),t}return e(t,A),t}(Tr),Vr=function(A){function t(e){var t=A.call(this,e)||this;return t.value=e.value,t}return e(t,A),t}(Tr),zr=function(A){function t(e){var t=A.call(this,e)||this;return t.start=e.start,t.reversed="boolean"==typeof e.reversed&&!0===e.reversed,t}return e(t,A),t}(Tr),Xr=[{type:u.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],Jr=[{type:u.PERCENTAGE_TOKEN,flags:0,number:50}],Gr=function(A){return A.width>A.height?new B(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)e.textNodes.push(new br(r,e.styles));else if(cn(r)){var B=nn(r);B.styles.isVisible()&&(sn(r,B,t)?B.flags|=4:on(B.styles)&&(B.flags|=2),-1!==tn.indexOf(r.tagName)&&(B.flags|=8),e.elements.push(B),dn(r)||ln(r)||fn(r)||rn(r,B,t))}},nn=function(A){return En(A)?new _r(A):gn(A)?new Pr(A):ln(A)?new xr(A):un(A)?new Vr(A):wn(A)?new zr(A):Un(A)?new Zr(A):fn(A)?new jr(A):dn(A)?new $r(A):Fn(A)?new en(A):new Tr(A)},Bn=function(A){var e=nn(A);return e.flags|=4,rn(A,e,e),e},sn=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Cn(A)&&t.styles.isTransparent()},on=function(A){return A.isPositioned()||A.isFloating()},an=function(A){return A.nodeType===Node.TEXT_NODE},cn=function(A){return A.nodeType===Node.ELEMENT_NODE},Qn=function(A){return void 0!==A.style},un=function(A){return"LI"===A.tagName},wn=function(A){return"OL"===A.tagName},Un=function(A){return"INPUT"===A.tagName},ln=function(A){return"svg"===A.tagName},Cn=function(A){return"BODY"===A.tagName},gn=function(A){return"CANVAS"===A.tagName},En=function(A){return"IMG"===A.tagName},Fn=function(A){return"IFRAME"===A.tagName},hn=function(A){return"STYLE"===A.tagName},Hn=function(A){return"SCRIPT"===A.tagName},dn=function(A){return"TEXTAREA"===A.tagName},fn=function(A){return"SELECT"===A.tagName},pn=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,n=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(n=!1,t[Math.max(0,t.length-1)]+=A.increment)});var B=[];return n&&r.forEach(function(A){var t=e.counters[A.counter];B.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),B},A}(),Nn={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"]},Kn={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},In={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Tn={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},mn=function(A,e,t,r,n,B){return At?Dn(A,n,B.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+B},Rn=function(A,e,t,r){var n="";do{t||A--,n=r(A)+n,A/=e}while(A*e>=e);return n},Ln=function(A,e,t,r,n){var B=t-e+1;return(A<0?"-":"")+(Rn(Math.abs(A),B,r,function(A){return i(Math.floor(A%B)+e)})+n)},On=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return Rn(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},vn=function(A,e,t,r,n,B){if(A<-9999||A>9999)return Dn(A,Kt.CJK_DECIMAL,n.length>0);var s=Math.abs(A),o=n;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var a=s%10;0===a&&gr(B,1)&&""!==o?o=e[a]+o:a>1||1===a&&0===i||1===a&&1===i&&gr(B,2)||1===a&&1===i&&gr(B,4)&&A>100||1===a&&i>1&&gr(B,8)?o=e[a]+(i>0?t[i-1]:"")+o:1===a&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},Dn=function(A,e,t){var r=t?". ":"",n=t?"、":"",B=t?", ":"",s=t?" ":"";switch(e){case Kt.DISC:return"•"+s;case Kt.CIRCLE:return"◦"+s;case Kt.SQUARE:return"◾"+s;case Kt.DECIMAL_LEADING_ZERO:var o=Ln(A,48,57,!0,r);return o.length<4?"0"+o:o;case Kt.CJK_DECIMAL:return On(A,"〇一二三四五六七八九",n);case Kt.LOWER_ROMAN:return mn(A,1,3999,Nn,Kt.DECIMAL,r).toLowerCase();case Kt.UPPER_ROMAN:return mn(A,1,3999,Nn,Kt.DECIMAL,r);case Kt.LOWER_GREEK:return Ln(A,945,969,!1,r);case Kt.LOWER_ALPHA:return Ln(A,97,122,!1,r);case Kt.UPPER_ALPHA:return Ln(A,65,90,!1,r);case Kt.ARABIC_INDIC:return Ln(A,1632,1641,!0,r);case Kt.ARMENIAN:case Kt.UPPER_ARMENIAN:return mn(A,1,9999,Kn,Kt.DECIMAL,r);case Kt.LOWER_ARMENIAN:return mn(A,1,9999,Kn,Kt.DECIMAL,r).toLowerCase();case Kt.BENGALI:return Ln(A,2534,2543,!0,r);case Kt.CAMBODIAN:case Kt.KHMER:return Ln(A,6112,6121,!0,r);case Kt.CJK_EARTHLY_BRANCH:return On(A,"子丑寅卯辰巳午未申酉戌亥",n);case Kt.CJK_HEAVENLY_STEM:return On(A,"甲乙丙丁戊己庚辛壬癸",n);case Kt.CJK_IDEOGRAPHIC:case Kt.TRAD_CHINESE_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","負",n,14);case Kt.TRAD_CHINESE_FORMAL:return vn(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",n,15);case Kt.SIMP_CHINESE_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","负",n,14);case Kt.SIMP_CHINESE_FORMAL:return vn(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",n,15);case Kt.JAPANESE_INFORMAL:return vn(A,"〇一二三四五六七八九","十百千万","マイナス",n,0);case Kt.JAPANESE_FORMAL:return vn(A,"零壱弐参四伍六七八九","拾百千万","マイナス",n,7);case Kt.KOREAN_HANGUL_FORMAL:return vn(A,"영일이삼사오육칠팔구","십백천만","마이너스",B,7);case Kt.KOREAN_HANJA_INFORMAL:return vn(A,"零一二三四五六七八九","十百千萬","마이너스",B,0);case Kt.KOREAN_HANJA_FORMAL:return vn(A,"零壹貳參四五六七八九","拾百千","마이너스",B,7);case Kt.DEVANAGARI:return Ln(A,2406,2415,!0,r);case Kt.GEORGIAN:return mn(A,1,19999,Tn,Kt.DECIMAL,r);case Kt.GUJARATI:return Ln(A,2790,2799,!0,r);case Kt.GURMUKHI:return Ln(A,2662,2671,!0,r);case Kt.HEBREW:return mn(A,1,10999,In,Kt.DECIMAL,r);case Kt.HIRAGANA:return On(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case Kt.HIRAGANA_IROHA:return On(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case Kt.KANNADA:return Ln(A,3302,3311,!0,r);case Kt.KATAKANA:return On(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case Kt.KATAKANA_IROHA:return On(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case Kt.LAO:return Ln(A,3792,3801,!0,r);case Kt.MONGOLIAN:return Ln(A,6160,6169,!0,r);case Kt.MYANMAR:return Ln(A,4160,4169,!0,r);case Kt.ORIYA:return Ln(A,2918,2927,!0,r);case Kt.PERSIAN:return Ln(A,1776,1785,!0,r);case Kt.TAMIL:return Ln(A,3046,3055,!0,r);case Kt.TELUGU:return Ln(A,3174,3183,!0,r);case Kt.THAI:return Ln(A,3664,3673,!0,r);case Kt.TIBETAN:return Ln(A,3872,3881,!0,r);case Kt.DECIMAL:default:return Ln(A,48,57,!0,r)}},bn=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new pn,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,e){var t=this,B=Mn(A,e);if(!B.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,o=A.defaultView.pageYOffset,i=B.contentWindow,a=i.document,c=yn(B).then(function(){return r(t,void 0,void 0,function(){var A;return n(this,function(t){switch(t.label){case 0:return this.scrolledElements.forEach(Vn),i&&(i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(a.documentElement.style.top=-e.top+"px",a.documentElement.style.left=-e.left+"px",a.documentElement.style.position="absolute")),A=this.options.onclone,void 0===this.clonedReferenceElement?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:t.sent(),t.label=2;case 2:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(a)}).then(function(){return B})]:[2,B]}})})});return a.open(),a.write(Pn(document.doctype)+""),xn(this.referenceElement.ownerDocument,s,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){return gn(A)?this.createCanvasClone(A):hn(A)?this.createStyleClone(A):A.cloneNode(!1)},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(A){if(fe.getInstance(this.options.id).error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){if(this.options.inlineImages&&A.ownerDocument){var e=A.ownerDocument.createElement("img");try{return e.src=A.toDataURL(),e}catch(A){fe.getInstance(this.options.id).info("Unable to clone canvas contents, canvas is tainted")}}var t=A.cloneNode(!1);try{t.width=A.width,t.height=A.height;var r=A.getContext("2d"),n=t.getContext("2d");return n&&(r?n.putImageData(r.getImageData(0,0,A.width,A.height),0,0):n.drawImage(A,0,0)),t}catch(A){}return t},A.prototype.cloneNode=function(A){if(an(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(Qn(A)&&e){var t=this.createElementClone(A),r=e.getComputedStyle(A),n=e.getComputedStyle(A,":before"),B=e.getComputedStyle(A,":after");this.referenceElement===A&&(this.clonedReferenceElement=t),Cn(t)&&Jn(t);for(var s=this.counters.parse(new Kr(r)),o=this.resolvePseudoContent(A,t,n,lr.BEFORE),i=A.firstChild;i;i=i.nextSibling)cn(i)&&(Hn(i)||i.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&cn(i)&&hn(i)||t.appendChild(this.cloneNode(i));o&&t.insertBefore(o,t.firstChild);var a=this.resolvePseudoContent(A,t,B,lr.AFTER);return a&&t.appendChild(a),this.counters.pop(s),r&&this.options.copyStyles&&!Fn(A)&&_n(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),(dn(A)||fn(A))&&(dn(t)||fn(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var n=this;if(t){var B=t.content,s=e.ownerDocument;if(s&&B&&"none"!==B&&"-moz-alt-content"!==B&&"none"!==t.display){this.counters.parse(new Kr(t));var o=new Nr(t),i=s.createElement("html2canvaspseudoelement");return _n(t,i),o.content.forEach(function(e){if(e.type===u.STRING_TOKEN)i.appendChild(s.createTextNode(e.value));else if(e.type===u.URL_TOKEN){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(e.type===u.FUNCTION){if("attr"===e.name){var r=e.values.filter(vA);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var B=e.values.filter(MA),a=B[0],c=B[1];if(a&&vA(a)){var Q=n.counters.getCounterValue(a.value),w=c&&vA(c)?mt.parse(c.value):Kt.DECIMAL;i.appendChild(s.createTextNode(Dn(Q,w,!1)))}}else if("counters"===e.name){var U=e.values.filter(MA),l=(a=U[0],U[1]);c=U[2];if(a&&vA(a)){var C=n.counters.getCounterValues(a.value),g=c&&vA(c)?mt.parse(c.value):Kt.DECIMAL,E=l&&l.type===u.STRING_TOKEN?l.value:"",F=C.map(function(A){return Dn(A,g,!1)}).join(E);i.appendChild(s.createTextNode(F))}}}else if(e.type===u.IDENT_TOKEN)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(dr(o.quotes,n.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(dr(o.quotes,--n.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}}),i.className=zn+" "+Xn,e.className+=r===lr.BEFORE?" "+zn:" "+Xn,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(lr||(lr={}));var Sn,Mn=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute("data-html2canvas-ignore","true"),A.body.appendChild(t),t},yn=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var n=r.document;r.onload=A.onload=n.onreadystatechange=function(){r.onload=A.onload=n.onreadystatechange=null;var t=setInterval(function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(t),e(A))},50)}})},_n=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);"content"!==r&&e.style.setProperty(r,A.getPropertyValue(r))}return e},Pn=function(A){var e="";return A&&(e+=""),e},xn=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},Vn=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},zn="___html2canvas___pseudoelement_before",Xn="___html2canvas___pseudoelement_after",Jn=function(A){Gn(A,"."+zn+':before{\n content: "" !important;\n display: none !important;\n}\n .'+Xn+':after{\n content: "" !important;\n display: none !important;\n}')},Gn=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}(Sn||(Sn={}));var kn,Wn=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},Yn=function(){function A(A,e){this.type=Sn.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),qn=function(A,e,t){return new Yn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Zn=function(){function A(A,e,t,r){this.type=Sn.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=qn(this.start,this.startControl,e),n=qn(this.startControl,this.endControl,e),B=qn(this.endControl,this.end,e),s=qn(r,n,e),o=qn(n,B,e),i=qn(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,B,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),jn=function(A){return A.type===Sn.BEZIER_CURVE},$n=function(){return function(A){var e=A.styles,t=A.bounds,r=GA(e.borderTopLeftRadius,t.width,t.height),n=r[0],B=r[1],s=GA(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],a=GA(e.borderBottomRightRadius,t.width,t.height),c=a[0],Q=a[1],u=GA(e.borderBottomLeftRadius,t.width,t.height),w=u[0],U=u[1],l=[];l.push((n+o)/t.width),l.push((w+c)/t.width),l.push((B+U)/t.height),l.push((i+Q)/t.height);var C=Math.max.apply(Math,l);C>1&&(n/=C,B/=C,o/=C,i/=C,c/=C,Q/=C,w/=C,U/=C);var g=t.width-o,E=t.height-Q,F=t.width-c,h=t.height-U,H=e.borderTopWidth,d=e.borderRightWidth,f=e.borderBottomWidth,p=e.borderLeftWidth,N=kA(e.paddingTop,A.bounds.width),K=kA(e.paddingRight,A.bounds.width),I=kA(e.paddingBottom,A.bounds.width),T=kA(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||B>0?AB(t.left,t.top,n,B,kn.TOP_LEFT):new Yn(t.left,t.top),this.topRightBorderBox=o>0||i>0?AB(t.left+g,t.top,o,i,kn.TOP_RIGHT):new Yn(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||Q>0?AB(t.left+F,t.top+E,c,Q,kn.BOTTOM_RIGHT):new Yn(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=w>0||U>0?AB(t.left,t.top+h,w,U,kn.BOTTOM_LEFT):new Yn(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||B>0?AB(t.left+p,t.top+H,Math.max(0,n-p),Math.max(0,B-H),kn.TOP_LEFT):new Yn(t.left+p,t.top+H),this.topRightPaddingBox=o>0||i>0?AB(t.left+Math.min(g,t.width+p),t.top+H,g>t.width+p?0:o-p,i-H,kn.TOP_RIGHT):new Yn(t.left+t.width-d,t.top+H),this.bottomRightPaddingBox=c>0||Q>0?AB(t.left+Math.min(F,t.width-p),t.top+Math.min(E,t.height+H),Math.max(0,c-d),Q-f,kn.BOTTOM_RIGHT):new Yn(t.left+t.width-d,t.top+t.height-f),this.bottomLeftPaddingBox=w>0||U>0?AB(t.left+p,t.top+h,Math.max(0,w-p),U-f,kn.BOTTOM_LEFT):new Yn(t.left+p,t.top+t.height-f),this.topLeftContentBox=n>0||B>0?AB(t.left+p+T,t.top+H+N,Math.max(0,n-(p+T)),Math.max(0,B-(H+N)),kn.TOP_LEFT):new Yn(t.left+p+T,t.top+H+N),this.topRightContentBox=o>0||i>0?AB(t.left+Math.min(g,t.width+p+T),t.top+H+N,g>t.width+p+T?0:o-p+T,i-(H+N),kn.TOP_RIGHT):new Yn(t.left+t.width-(d+K),t.top+H+N),this.bottomRightContentBox=c>0||Q>0?AB(t.left+Math.min(F,t.width-(p+T)),t.top+Math.min(E,t.height+H+N),Math.max(0,c-(d+K)),Q-(f+I),kn.BOTTOM_RIGHT):new Yn(t.left+t.width-(d+K),t.top+t.height-(f+I)),this.bottomLeftContentBox=w>0||U>0?AB(t.left+p+T,t.top+h,Math.max(0,w-(p+T)),U-(f+I),kn.BOTTOM_LEFT):new Yn(t.left+p+T,t.top+t.height-(f+I))}}();!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(kn||(kn={}));var AB=function(A,e,t,r,n){var B=(Math.sqrt(2)-1)/3*4,s=t*B,o=r*B,i=A+t,a=e+r;switch(n){case kn.TOP_LEFT:return new Zn(new Yn(A,a),new Yn(A,a-o),new Yn(i-s,e),new Yn(i,e));case kn.TOP_RIGHT:return new Zn(new Yn(A,e),new Yn(A+s,e),new Yn(i,a-o),new Yn(i,a));case kn.BOTTOM_RIGHT:return new Zn(new Yn(i,e),new Yn(i,e+o),new Yn(A+s,a),new Yn(A,a));case kn.BOTTOM_LEFT:default:return new Zn(new Yn(i,a),new Yn(i-s,a),new Yn(A,e+o),new Yn(A,e))}},eB=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},tB=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},rB=function(){return function(A,e,t){this.type=0,this.offsetX=A,this.offsetY=e,this.matrix=t,this.target=6}}(),nB=function(){return function(A,e){this.type=1,this.target=e,this.path=A}}(),BB=function(){return function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),sB=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new $n(A),null!==A.styles.transform){var t=A.bounds.left+A.styles.transformOrigin[0].number,r=A.bounds.top+A.styles.transformOrigin[1].number,n=A.styles.transform;this.effects.push(new rB(t,r,n))}if(A.styles.overflowX!==Tt.VISIBLE){var B=eB(this.curves),s=tB(this.curves);Wn(B,s)?this.effects.push(new nB(B,6)):(this.effects.push(new nB(B,2)),this.effects.push(new nB(s,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==Tt.VISIBLE){var e=eB(this.curves),t=tB(this.curves);Wn(e,t)||A.push(new nB(t,6))}return A},A}(),oB=function(A,e,t,r){A.container.elements.forEach(function(n){var B=gr(n.flags,4),s=gr(n.flags,2),o=new sB(n,A.getParentEffects());gr(n.styles.display,2048)&&r.push(o);var i=gr(n.flags,8)?[]:r;if(B||s){var a=B||n.styles.isPositioned()?t:e,c=new BB(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var Q=n.styles.zIndex.order;if(Q<0){var u=0;a.negativeZIndex.some(function(A,e){return Q>A.element.container.styles.zIndex.order?(u=e,!1):u>0}),a.negativeZIndex.splice(u,0,c)}else if(Q>0){var w=0;a.positiveZIndex.some(function(A,e){return Q>A.element.container.styles.zIndex.order?(w=e+1,!1):w>0}),a.positiveZIndex.splice(w,0,c)}else a.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?a.nonPositionedFloats.push(c):a.nonPositionedInlineLevel.push(c);oB(o,c,B?c:t,i)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),oB(o,e,t,i);gr(n.flags,8)&&iB(n,i)})},iB=function(A,e){for(var t=A instanceof zr?A.start:1,r=A instanceof zr&&A.reversed,n=0;n0&&A.intrinsicHeight>0){var r=QB(A),n=tB(e);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,function(){var t,r,s,o,i,a,c,Q,w,U,l,C,g,E;return n(this,function(n){switch(n.label){case 0:this.applyEffects(e.effects,4),t=e.container,r=e.curves,s=t.styles,o=0,i=t.textNodes,n.label=1;case 1:return o0&&p>0&&(E=r.ctx.createPattern(l,"repeat"),r.renderRepeat(h,E,K,I))):function(A){return A.type===ce.RADIAL_GRADIENT}(t)&&(F=uB(A,e,[null,null,null]),h=F[0],H=F[1],d=F[2],f=F[3],p=F[4],N=0===t.position.length?[XA]:t.position,K=kA(N[0],f),I=kA(N[N.length-1],p),T=function(A,e,t,r,n){var B=0,s=0;switch(A.size){case Se.CLOSEST_SIDE:A.shape===be.CIRCLE?B=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===be.ELLIPSE&&(B=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-n)));break;case Se.CLOSEST_CORNER:if(A.shape===be.CIRCLE)B=s=Math.min(Ce(e,t),Ce(e,t-n),Ce(e-r,t),Ce(e-r,t-n));else if(A.shape===be.ELLIPSE){var o=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),i=ge(r,n,e,t,!0),a=i[0],c=i[1];s=o*(B=Ce(a-e,(c-t)/o))}break;case Se.FARTHEST_SIDE:A.shape===be.CIRCLE?B=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===be.ELLIPSE&&(B=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-n)));break;case Se.FARTHEST_CORNER:if(A.shape===be.CIRCLE)B=s=Math.max(Ce(e,t),Ce(e,t-n),Ce(e-r,t),Ce(e-r,t-n));else if(A.shape===be.ELLIPSE){o=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r));var Q=ge(r,n,e,t,!1);a=Q[0],c=Q[1],s=o*(B=Ce(a-e,(c-t)/o))}}return Array.isArray(A.size)&&(B=kA(A.size[0],r),s=2===A.size.length?kA(A.size[1],n):B),[B,s]}(t,K,I,f,p),m=T[0],R=T[1],m>0&&m>0&&(L=r.ctx.createRadialGradient(H+K,d+I,0,H+K,d+I,m),Ue(t.stops,2*m).forEach(function(A){return L.addColorStop(A.stop,Ae(A.color))}),r.path(h),r.ctx.fillStyle=L,m!==R?(O=A.bounds.left+.5*A.bounds.width,v=A.bounds.top+.5*A.bounds.height,b=1/(D=R/m),r.ctx.save(),r.ctx.translate(O,v),r.ctx.transform(1,0,0,D,0,0),r.ctx.translate(-O,-v),r.ctx.fillRect(H,b*(d-v)+v,f,p*b),r.ctx.restore()):r.ctx.fill())),n.label=6;case 6:return e--,[2]}})},r=this,B=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return B>18&63,n=o>>12&63,r=o>>6&63,i=63&o,h[s++]=f.charAt(e)+f.charAt(n)+f.charAt(r)+f.charAt(i),a>16&255,n=a>>8&255,r=255&a,h[l++]=64==i?String.fromCharCode(e):64==o?String.fromCharCode(e,n):String.fromCharCode(e,n,r),s>>0,r=new Array(n),i=1>>0,i=0;i>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i>16&255,i=h>>8&255,o=255&h}if(void 0===i||void 0===a&&r===i&&i===o)if("string"==typeof r)n=r+" "+s[0];else switch(e.precision){case 2:n=w(r/255)+" "+s[0];break;case 3:default:n=b(r/255)+" "+s[0]}else if(void 0===a||"object"===t(a)){if(a&&!isNaN(a.a)&&0===a.a)return["1.000","1.000","1.000",s[1]].join(" ");if("string"==typeof r)n=[r,i,o,s[1]].join(" ");else switch(e.precision){case 2:n=[w(r/255),w(i/255),w(o/255),s[1]].join(" ");break;default:case 3:n=[b(r/255),b(i/255),b(o/255),s[1]].join(" ")}}else if("string"==typeof r)n=[r,i,o,a,s[2]].join(" ");else switch(e.precision){case 2:n=[w(r/255),w(i/255),w(o/255),w(a/255),s[2]].join(" ");break;case 3:default:n=[b(r/255),b(i/255),b(o/255),b(a/255),s[2]].join(" ")}return n},gt=p.__private__.getFilters=function(){return h},mt=p.__private__.putStream=function(t){var e,n=(t=t||{}).data||"",i=t.filters||gt(),o=t.alreadyAppliedFilters||[],a=t.addLength1||!1,s=n.length;!0===i&&(i=["FlateEncode"]);var l=t.additionalKeyValues||[],h=(e=void 0!==r.API.processDataByFilters?r.API.processDataByFilters(n,i):{data:n,reverseChain:[]}).reverseChain+(Array.isArray(o)?o.join(" "):o.toString());0!==e.data.length&&(l.push({key:"Length",value:e.data.length}),!0===a&&l.push({key:"Length1",value:s})),0!=h.length&&(h.split("/").length-1==1?l.push({key:"Filter",value:h}):l.push({key:"Filter",value:"["+h+"]"})),U("<<");for(var u=0;u>"),0!==e.data.length&&(U("stream"),U(e.data),U("endstream"))},yt=p.__private__.putPage=function(t){t.mediaBox;var e=t.number,n=t.data,r=t.objId,i=t.contentsObjId;ht(r,!0),rt[P].mediaBox.topRightX,rt[P].mediaBox.bottomLeftX,rt[P].mediaBox.topRightY,rt[P].mediaBox.bottomLeftY,U("<>"),U("endobj");var o=n.join("\n");return ht(i,!0),mt({data:o,filters:gt()}),U("endobj"),r},vt=p.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=nt;t++)rt[t].objId=lt(),rt[t].contentsObjId=lt();for(t=1;t<=nt;t++)n.push(yt({number:t,data:T[t],objId:rt[t].objId,contentsObjId:rt[t].contentsObjId,mediaBox:rt[t].mediaBox,cropBox:rt[t].cropBox,bleedBox:rt[t].bleedBox,trimBox:rt[t].trimBox,artBox:rt[t].artBox,userUnit:rt[t].userUnit,rootDictionaryObjId:ct,resourceDictionaryObjId:ft}));ht(ct,!0),U("<>"),U("endobj"),ot.publish("postPutPages")},wt=function(t,e,n){et.hasOwnProperty(e)||(et[e]={}),et[e][n]=t},bt=function(t,e,n,r,i){i=i||!1;var o="F"+(Object.keys(tt).length+1).toString(10),a={id:o,postScriptName:t,fontName:e,fontStyle:n,encoding:r,isStandardFont:i,metadata:{}};return ot.publish("addFont",{font:a,instance:this}),void 0!==o&&(tt[o]=a,wt(o,e,n)),o},xt=p.__private__.pdfEscape=p.pdfEscape=function(t,e){return function(t,e){var n,r,i,o,a,s,l,h,u;if(i=(e=e||{}).sourceEncoding||"Unicode",a=e.outputEncoding,(e.autoencode||a)&&tt[j].metadata&&tt[j].metadata[i]&&tt[j].metadata[i].encoding&&(o=tt[j].metadata[i].encoding,!a&&tt[j].encoding&&(a=tt[j].encoding),!a&&o.codePages&&(a=o.codePages[0]),"string"==typeof a&&(a=o[a]),a)){for(l=!1,s=[],n=0,r=t.length;n>8&&(l=!0);t=s.join("")}for(n=t.length;void 0===l&&0!==n;)t.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(h-(u<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Nt=p.__private__.beginPage=function(t,e){var n,r="string"==typeof e&&e.toLowerCase();if("string"==typeof t&&(n=y(t.toLowerCase()))&&(t=n[0],e=n[1]),Array.isArray(t)&&(e=t[1],t=t[0]),(isNaN(t)||isNaN(e))&&(t=a[0],e=a[1]),r){switch(r.substr(0,1)){case"l":t>"),U("endobj")},kt=p.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||ct;switch(st(),U("<<"),U("/Type /Catalog"),U("/Pages "+e+" 0 R"),I||(I="fullwidth"),I){case"fullwidth":U("/OpenAction [3 0 R /FitH null]");break;case"fullheight":U("/OpenAction [3 0 R /FitV null]");break;case"fullpage":U("/OpenAction [3 0 R /Fit]");break;case"original":U("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+I;"%"===n.substr(n.length-1)&&(I=parseInt(I)/100),"number"==typeof I&&U("/OpenAction [3 0 R /XYZ null null "+w(I)+"]")}switch(B||(B="continuous"),B){case"continuous":U("/PageLayout /OneColumn");break;case"single":U("/PageLayout /SinglePage");break;case"two":case"twoleft":U("/PageLayout /TwoColumnLeft");break;case"tworight":U("/PageLayout /TwoColumnRight")}C&&U("/PageMode /"+C),ot.publish("putCatalog"),U(">>"),U("endobj")},It=p.__private__.putTrailer=function(){U("trailer"),U("<<"),U("/Size "+(Q+1)),U("/Root "+Q+" 0 R"),U("/Info "+(Q-1)+" 0 R"),U("/ID [ <"+x+"> <"+x+"> ]"),U(">>")},Ct=p.__private__.putHeader=function(){U("%PDF-"+d),U("%ºß¬à")},Bt=p.__private__.putXRef=function(){var t=1,e="0000000000";for(U("xref"),U("0 "+(Q+1)),U("0000000000 65535 f "),t=1;t<=Q;t++)"function"==typeof $[t]?U((e+$[t]()).slice(-10)+" 00000 n "):void 0!==$[t]?U((e+$[t]).slice(-10)+" 00000 n "):U("0000000000 00000 n ")},jt=p.__private__.buildDocument=function(){q=!1,D=Q=0,R=[],$=[],it=[],ct=lt(),ft=lt(),ot.publish("buildDocument"),Ct(),vt(),function(){ot.publish("putAdditionalObjects");for(var t=0;t>"),U("endobj")));var e}(),ot.publish("putResources"),ht(ft,!0),U("<<"),function(){for(var t in U("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),U("/Font <<"),tt)tt.hasOwnProperty(t)&&(!1===c||!0===c&&f.hasOwnProperty(t))&&U("/"+t+" "+tt[t].objectNumber+" 0 R");U(">>"),U("/XObject <<"),ot.publish("putXobjectDict"),U(">>")}(),U(">>"),U("endobj"),ot.publish("postPutResources"),Pt(),kt();var t=D;return Bt(),It(),U("startxref"),U(""+t),U("%%EOF"),q=!0,R.join("\n")},Et=p.__private__.getBlob=function(t){return new Blob([H(t)],{type:"application/pdf"})},Mt=p.output=p.__private__.output=((M=function(t,n){n=n||{};var r=jt();switch("string"==typeof n?n={filename:n}:n.filename=n.filename||"generated.pdf",t){case void 0:return r;case"save":p.save(n.filename);break;case"arraybuffer":return H(r);case"blob":return Et(r);case"bloburi":case"bloburl":if(void 0!==e.URL&&"function"==typeof e.URL.createObjectURL)return e.URL&&e.URL.createObjectURL(Et(r))||void 0;console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":return"data:application/pdf;filename="+n.filename+";base64,"+btoa(r);case"dataurlnewwindow":var i='',o=e.open();if(null!==o&&o.document.write(i),o||"undefined"==typeof safari)return o;case"datauri":case"dataurl":return e.document.location.href="data:application/pdf;filename="+n.filename+";base64,"+btoa(r);default:return null}}).foo=function(){try{return M.apply(this,arguments)}catch(r){var t=r.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var n="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message;if(!e.console)throw new Error(n);e.console.error(n,r),e.alert&&alert(n)}},(M.foo.bar=M).foo),Ot=function(t){return!0===Array.isArray(at)&&-1":")"),et=1):(Z=Jt(n),Q=Xt(r),$=(h?"<":"(")+N[K]+(h?">":")")),void 0!==H&&void 0!==H[K]&&(nt=H[K]+" Tw\n"),0!==k.length&&0===K?e.push(nt+k.join(" ")+" "+Z.toFixed(2)+" "+Q.toFixed(2)+" Tm\n"+$):1===et||0===et&&0===K?e.push(nt+Z.toFixed(2)+" "+Q.toFixed(2)+" Td\n"+$):e.push(nt+$);e=0===et?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var rt="BT\n/"+j+" "+V+" Tf\n"+(V*c).toFixed(2)+" TL\n"+te+"\n";return rt+=u,rt+=e,U(rt+="ET"),f[j]=!0,p},p.__private__.lstext=p.lstext=function(t,e,n,r){return console.warn("jsPDF.lstext is deprecated"),this.text(t,e,n,{charSpace:r})},p.__private__.clip=p.clip=function(t){U("evenodd"===t?"W*":"W"),U("n")},p.__private__.clip_fixed=p.clip_fixed=function(t){console.log("clip_fixed is deprecated"),p.clip(t)};var Dt=p.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","F","DF","FD","f","f*","B","B*"].indexOf(t)&&(e=!0),e},Ut=p.__private__.getStyle=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e};p.__private__.line=p.line=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[n-t,r-e]],t,e)},p.__private__.lines=p.lines=function(t,e,n,r,i,o){var a,s,l,h,u,c,f,p,d,g,m,y;if("number"==typeof t&&(y=n,n=e,e=t,t=y),r=r||[1,1],o=o||!1,isNaN(e)||isNaN(n)||!Array.isArray(t)||!Array.isArray(r)||!Dt(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(U(b(Jt(e))+" "+b(Xt(n))+" m "),a=r[0],s=r[1],h=t.length,g=e,m=n,l=0;l=a.length-1;if(A&&!S){w+=" ";continue}if(A||S){if(S)y=L;else if(t.multiline&&h<(f+2)*(b+2)+2)continue t}else{if(!t.multiline)continue t;if(h<(f+2)*(b+2)+2)continue t;y=L}for(var _="",F=m;F<=y;F++)_+=a[F]+" ";switch(_=" "==_.substr(_.length-1)?_.substr(0,_.length-1):_,v=N(_,t,l).width,t.textAlign){case"right":d=u-v-2;break;case"center":d=(u-v)/2;break;case"left":default:d=2}e+=s(d)+" "+s(g)+" Td\n",e+="("+o(_)+") Tj\n",e+=-s(d)+" 0 Td\n",g=-(l+2),v=0,m=y+1,b++,w=""}break}return i.text=e,i.fontSize=l,i},N=function(t,e,n){var i=r.internal.getFont(e.fontName,e.fontStyle),o=r.getStringUnitWidth(t,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:r.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:o}},L={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},A=function(){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];n.objId=void 0,n.hasAnnotation&&S.call(r,n)}},S=function(t){var e={type:"reference",object:t};void 0===r.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===e.type&&t.object===e.object})&&r.internal.getPageInfo(t.page).pageContext.annotations.push(e)},_=function(){if(void 0===r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},F=function(){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0},P=function(e){var n=!e;for(var i in e||(r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||r.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(i)){var o=e[i],a=[],s=o.Rect;if(o.Rect&&(o.Rect=w.call(this,o.Rect)),r.internal.newObjectDeferredBegin(o.objId,!0),o.DA=J.createDefaultAppearanceStream(o),"object"===t(o)&&"function"==typeof o.getKeyValueListForStream&&(a=o.getKeyValueListForStream()),o.Rect=s,o.hasAppearanceStream&&!o.appearanceStreamContent){var l=b.call(this,o);a.push({key:"AP",value:"<>"}),r.internal.acroformPlugin.xForms.push(l)}if(o.appearanceStreamContent){var h="";for(var u in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(u)){var c=o.appearanceStreamContent[u];if(h+="/"+u+" ",h+="<<",1<=Object.keys(c).length||Array.isArray(c))for(var i in c){var f;c.hasOwnProperty(i)&&("function"==typeof(f=c[i])&&(f=f.call(this,o)),h+="/"+i+" "+f+" ",0<=r.internal.acroformPlugin.xForms.indexOf(f)||r.internal.acroformPlugin.xForms.push(f))}else"function"==typeof(f=c)&&(f=f.call(this,o)),h+="/"+i+" "+f,0<=r.internal.acroformPlugin.xForms.indexOf(f)||r.internal.acroformPlugin.xForms.push(f);h+=">>"}a.push({key:"AP",value:"<<\n"+h+">>"})}r.internal.putStream({additionalKeyValues:a}),r.internal.out("endobj")}n&&k.call(this,r.internal.acroformPlugin.xForms)},k=function(e){for(var n in e)if(e.hasOwnProperty(n)){var i=n,o=e[n];r.internal.newObjectDeferredBegin(o&&o.objId,!0),"object"===t(o)&&"function"==typeof o.putStream&&o.putStream(),delete e[i]}},I=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(r=this,O.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(L)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");i=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new M,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",F),r.internal.events.subscribe("buildDocument",A),r.internal.events.subscribe("putCatalog",_),r.internal.events.subscribe("postPutPages",P),r.internal.acroformPlugin.isInitialized=!0}},C=e.__acroform__.arrayToPdfArray=function(e){if(Array.isArray(e)){for(var n="[",r=0;r>"),e.join("\n")}},set:function(e){"object"===t(e)&&(n=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};h(U,O);var z=function(){U.call(this),this.pushButton=!0};h(z,U);var H=function(){U.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};h(H,U);var W=function(){var e,n;O.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t}});var r,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t,e=[];for(t in e.push("<<"),i)e.push("/"+t+" ("+i[t]+")");return e.push(">>"),e.join("\n")},set:function(e){"object"===t(e)&&(i=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}}),this.optionName=name,this.caption="l",this.appearanceState="Off",this._AppearanceType=J.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(name)};h(W,O),H.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},H.prototype.createOption=function(t){this.Kids.length;var e=new W;return e.Parent=this,e.optionName=t,this.Kids.push(e),X.call(this,e),e};var V=function(){U.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=J.CheckBox.createAppearanceStream()};h(V,U);var G=function(){O.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,13):this.Ff=v(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,21):this.Ff=v(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,23):this.Ff=v(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,24):this.Ff=v(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,25):this.Ff=v(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,26):this.Ff=v(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};h(G,O);var Y=function(){G.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=y(this.Ff,14):this.Ff=v(this.Ff,14)}}),this.password=!0};h(Y,G);var J={CheckBox:{createAppearanceStream:function(){return{N:{On:J.CheckBox.YesNormal},D:{On:J.CheckBox.YesPushDown,Off:J.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=f(t),n=[],i=r.internal.getFont(t.fontName,t.fontStyle).id,o=r.__private__.encodeColorString(t.color),a=x(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+s(J.internal.getWidth(t))+" "+s(J.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+s(a.fontSize)+" Tf "+o),n.push("BT"),n.push(a.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join("\n"),e},YesNormal:function(t){var e=f(t),n=r.internal.getFont(t.fontName,t.fontStyle).id,i=r.__private__.encodeColorString(t.color),o=[],a=J.internal.getHeight(t),l=J.internal.getWidth(t),h=x(t,t.caption);return o.push("1 g"),o.push("0 0 "+s(l)+" "+s(a)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+s(l-1)+" "+s(a-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+n+" "+s(h.fontSize)+" Tf "+i),o.push(h.text),o.push("ET"),o.push("Q"),e.stream=o.join("\n"),e},OffPushDown:function(t){var e=f(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+s(J.internal.getWidth(t))+" "+s(J.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:J.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=J.RadioButton.Circle.YesNormal,e.D[t]=J.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=f(t),n=[],r=J.internal.getWidth(t)<=J.internal.getHeight(t)?J.internal.getWidth(t)/4:J.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=J.internal.Bezier_C,o=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+l(J.internal.getWidth(t)/2)+" "+l(J.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=f(t),n=[],r=J.internal.getWidth(t)<=J.internal.getHeight(t)?J.internal.getWidth(t)/4:J.internal.getHeight(t)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*J.internal.Bezier_C).toFixed(5)),a=Number((r*J.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+l(J.internal.getWidth(t)/2)+" "+l(J.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+l(J.internal.getWidth(t)/2)+" "+l(J.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=f(t),n=[],r=J.internal.getWidth(t)<=J.internal.getHeight(t)?J.internal.getWidth(t)/4:J.internal.getHeight(t)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*J.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+l(J.internal.getWidth(t)/2)+" "+l(J.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:J.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=J.RadioButton.Cross.YesNormal,e.D[t]=J.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=f(t),n=[],r=J.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+s(J.internal.getWidth(t)-2)+" "+s(J.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(s(r.x1.x)+" "+s(r.x1.y)+" m"),n.push(s(r.x2.x)+" "+s(r.x2.y)+" l"),n.push(s(r.x4.x)+" "+s(r.x4.y)+" m"),n.push(s(r.x3.x)+" "+s(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=f(t),n=J.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+s(J.internal.getWidth(t))+" "+s(J.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+s(J.internal.getWidth(t)-2)+" "+s(J.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(s(n.x1.x)+" "+s(n.x1.y)+" m"),r.push(s(n.x2.x)+" "+s(n.x2.y)+" l"),r.push(s(n.x4.x)+" "+s(n.x4.y)+" m"),r.push(s(n.x3.x)+" "+s(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=f(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+s(J.internal.getWidth(t))+" "+s(J.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=r.internal.getFont(t.fontName,t.fontStyle).id,n=r.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};J.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=J.internal.getWidth(t),n=J.internal.getHeight(t),r=Math.min(e,n);return{x1:{x:(e-r)/2,y:(n-r)/2+r},x2:{x:(e-r)/2+r,y:(n-r)/2},x3:{x:(e-r)/2,y:(n-r)/2},x4:{x:(e-r)/2+r,y:(n-r)/2+r}}}},J.internal.getWidth=function(e){var n=0;return"object"===t(e)&&(n=u(e.Rect[2])),n},J.internal.getHeight=function(e){var n=0;return"object"===t(e)&&(n=u(e.Rect[3])),n};var X=e.addField=function(t){if(I.call(this),!(t instanceof O))throw new Error("Invalid argument passed to jsPDF.addField.");return function(t){r.internal.acroformPlugin.printedOut&&(r.internal.acroformPlugin.printedOut=!1,r.internal.acroformPlugin.acroFormDictionaryRoot=null),r.internal.acroformPlugin.acroFormDictionaryRoot||I.call(r),r.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)}.call(this,t),t.page=r.internal.getCurrentPageInfo().pageNumber,this};e.addButton=function(t){if(t instanceof U==0)throw new Error("Invalid argument passed to jsPDF.addButton.");return X.call(this,t)},e.addTextField=function(t){if(t instanceof G==0)throw new Error("Invalid argument passed to jsPDF.addTextField.");return X.call(this,t)},e.addChoiceField=function(t){if(t instanceof q==0)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return X.call(this,t)},"object"==t(n)&&void 0===n.ChoiceField&&void 0===n.ListBox&&void 0===n.ComboBox&&void 0===n.EditBox&&void 0===n.Button&&void 0===n.PushButton&&void 0===n.RadioButton&&void 0===n.CheckBox&&void 0===n.TextField&&void 0===n.PasswordField?(n.ChoiceField=q,n.ListBox=T,n.ComboBox=R,n.EditBox=D,n.Button=U,n.PushButton=z,n.RadioButton=H,n.CheckBox=V,n.TextField=G,n.PasswordField=Y,n.AcroForm={Appearance:J}):console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already."),e.AcroFormChoiceField=q,e.AcroFormListBox=T,e.AcroFormComboBox=R,e.AcroFormEditBox=D,e.AcroFormButton=U,e.AcroFormPushButton=z,e.AcroFormRadioButton=H,e.AcroFormCheckBox=V,e.AcroFormTextField=G,e.AcroFormPasswordField=Y,e.AcroFormAppearance=J,e.AcroForm={ChoiceField:q,ListBox:T,ComboBox:R,EditBox:D,Button:U,PushButton:z,RadioButton:H,CheckBox:V,TextField:G,PasswordField:Y,Appearance:J}})((window.tmp=ht).API,"undefined"!=typeof window&&window||"undefined"!=typeof global&&global),function(e){var n="addImage_",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.getImageFileTypeByImageData=function(t,n){var i,o;n=n||"UNKNOWN";var a,s,l,h="UNKNOWN";for(l in e.isArrayBufferView(t)&&(t=e.arrayBufferToBinaryString(t)),r)for(a=r[l],i=0;i>"}),"trns"in e&&e.trns.constructor==Array){for(var s="",l=0,h=e.trns.length;l>18]+r[(258048&e)>>12]+r[(4032&e)>>6]+r[63&e];return 1==a?n+=r[(252&(e=i[s]))>>2]+r[(3&e)<<4]+"==":2==a&&(n+=r[(64512&(e=i[s]<<8|i[s+1]))>>10]+r[(1008&e)>>4]+r[(15&e)<<2]+"="),n},e.createImageInfo=function(t,e,n,r,i,o,a,s,l,h,u,c,f){var p={alias:s,w:e,h:n,cs:r,bpc:i,i:a,data:t};return o&&(p.f=o),l&&(p.dp=l),h&&(p.trns=h),u&&(p.pal=u),c&&(p.smask=c),f&&(p.p=f),p},e.addImage=function(r,i,o,f,p,d,g,m,y){var v="";if("string"!=typeof i){var w=d;d=p,p=f,f=o,o=i,i=w}if("object"===t(r)&&!h(r)&&"imageData"in r){var b=r;r=b.imageData,i=b.format||i||"UNKNOWN",o=b.x||o||0,f=b.y||f||0,p=b.w||p,d=b.h||d,g=b.alias||g,m=b.compression||m,y=b.rotation||b.angle||y}var x=this.internal.getFilters();if(void 0===m&&-1!==x.indexOf("FlateEncode")&&(m="SLOW"),"string"==typeof r&&(r=unescape(r)),isNaN(o)||isNaN(f))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var N,L,A,S,_,F,P,k=function(){var t=this.internal.collections[n+"images"];return t||(this.internal.collections[n+"images"]=t={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",s)),t}.call(this);if(!((N=c(r,k))||(h(r)&&(r=u(r,i)),(null==(P=g)||0===P.length)&&(g="string"==typeof(F=r)?e.sHashCode(F):e.isArrayBufferView(F)?e.sHashCode(e.arrayBufferToBinaryString(F)):null),N=c(g,k)))){if(this.isString(r)&&(""!==(v=this.convertStringToImageData(r))?r=v:void 0!==(v=e.loadFile(r))&&(r=v)),i=this.getImageFileTypeByImageData(r,i),!l(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if(this.supportsArrayBuffer()&&(r instanceof Uint8Array||(L=r,r=this.binaryStringToUint8Array(r))),!(N=this["process"+i.toUpperCase()](r,(_=0,(S=k)&&(_=Object.keys?Object.keys(S).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(S)),_),g,((A=m)&&"string"==typeof A&&(A=A.toUpperCase()),A in e.image_compression?A:e.image_compression.NONE),L)))throw new Error("An unknown error occurred whilst processing the image")}return function(t,e,n,r,i,o,a,s){var l=function(t,e,n){return t||e||(e=t=-96),t<0&&(t=-1*n.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]}.call(this,n,r,i),h=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;if(n=l[0],r=l[1],a[o]=i,s){s*=Math.PI/180;var c=Math.cos(s),f=Math.sin(s),p=function(t){return t.toFixed(4)},d=[p(c),p(f),p(-1*f),p(c),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,h(t),u(e+r),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([h(n),"0","0",h(r),"0","0","cm"].join(" "))):this.internal.write([h(n),"0","0",h(r),h(t),u(e+r),"cm"].join(" ")),this.internal.write("/I"+i.i+" Do"),this.internal.write("Q")}.call(this,o,f,p,d,N,N.i,k,y),this},e.convertStringToImageData=function(t){var n,r="";if(this.isString(t)){var i;n=null!==(i=this.extractImageFromDataUrl(t))?i.data:t;try{r=atob(n)}catch(t){throw e.validateStringAsBase64(n)?new Error("atob-Error in jsPDF.convertStringToImageData "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ")}}return r};var f=function(t,e){return t.subarray(e,e+5)};e.processJPEG=function(t,e,n,r,o,a){var s,l=this.decode.DCT_DECODE;if(!this.isString(t)&&!this.isArrayBuffer(t)&&!this.isArrayBufferView(t))return null;if(this.isString(t)&&(s=function(t){var e;if("JPEG"!==i(t))throw new Error("getJpegSize requires a binary string jpeg file");for(var n=256*t.charCodeAt(4)+t.charCodeAt(5),r=4,o=t.length;r>",h.content=m;var f=h.objId+" 0 R";m="<>";else if(l.options.pageNumber)switch(m="<>",this.internal.write(m))}}this.internal.write("]")}}]),e.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},e.link=function(t,e,n,r,i){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:t,y:e,w:n,h:r,options:i,type:"link"})},e.textWithLink=function(t,e,n,r){var i=this.getTextWidth(t),o=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(t,e,n),n+=.2*o,this.link(e,n-o,i,o,r),i},e.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var o=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},a=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},s=t.__arabicParser__.isArabicEndLetter=function(t){return a(t)&&o(t)&&e[t.charCodeAt(0)].length<=2},l=t.__arabicParser__.isArabicAlfLetter=function(t){return a(t)&&0<=i.indexOf(t.charCodeAt(0))},h=(t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return a(t)&&o(t)&&1<=e[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasFinalForm=function(t){return a(t)&&o(t)&&2<=e[t.charCodeAt(0)].length}),u=(t.__arabicParser__.arabicLetterHasInitialForm=function(t){return a(t)&&o(t)&&3<=e[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasMedialForm=function(t){return a(t)&&o(t)&&4==e[t.charCodeAt(0)].length}),c=t.__arabicParser__.resolveLigatures=function(t){var e=0,r=n,i=0,o="",a=0;for(e=0;e>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},n=ht.API,(r=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(t){n=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(t){r=t}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"parentNode",{get:function(){return!1}})}).prototype.getContext=function(t,e){var n;if("2d"!==(t=t||"2d"))return null;for(n in e)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=e[n]);return(this.pdf.context2d._canvas=this).pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}]),i=ht.API,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,l=function(t,e,n,r,i){a={x:t,y:e,w:n,h:r,ln:i}},h=function(){return a},u={left:0,top:0,bottom:0},i.setHeaderFunction=function(t){o=t},i.getTextDimensions=function(t,e){var n=this.table_font_size||this.internal.getFontSize(),r=(this.internal.getFont().fontStyle,(e=e||{}).scaleFactor||this.internal.scaleFactor),i=0,o=0,a=0;if("string"==typeof t)0!=(i=this.getStringUnitWidth(t)*n)&&(o=1);else{if("[object Array]"!==Object.prototype.toString.call(t))throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings.");for(var s=0;s=this.internal.pageSize.getHeight()-f.bottom&&(this.cellAddPage(),c=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(o,!0)),e=h().y+h().h,c&&(e=23)}if(void 0!==i[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===a){i instanceof Array||(i=[i]);for(var p=0;p=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:n,startAngle:r,endAngle:i,counterclockwise:o})},h.prototype.arcTo=function(t,e,n,r,i){throw new Error("arcTo not implemented.")},h.prototype.rect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.lineTo(t+n,e),this.lineTo(t,e)},h.prototype.fillRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!c.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,n,r),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},h.prototype.strokeRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");f.call(this)||(this.beginPath(),this.rect(t,e,n,r),this.stroke())},h.prototype.clearRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,n,r))},h.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n"},p=function(t){var e,n,r,i,o,a=String,s="length",l="charCodeAt",h="slice",u="replace";for(t[h](-2),t=t[h](0,-2)[u](/\s/g,"")[u]("z","!!!!!"),r=[],i=0,o=(t+=e="uuuuu"[h](t[s]%5||5))[s];i>24,255&n>>16,255&n>>8,255&n);return function(t,n){for(var r=e[s];0"},g=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var n="",r=0;r>8&255,n>>16&255,n>>24&255]),t.length+2),String.fromCharCode.apply(null,i)},c.processDataByFilters=function(t,e){var n=0,r=t||"",i=[];for("string"==typeof(e=e||[])&&(e=[e]),n=0;n>"),this.internal.out("endobj"),A=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+S+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==L&&void 0!==A&&this.internal.out("/Names <>")}),this},(_=ht.API).events.push(["postPutResources",function(){var t=this,e=/^(\d+) 0 obj$/;if(0> endobj")}var c=t.internal.newObject();for(t.internal.write("<< /Names [ "),r=0;r>","endobj"),t.internal.newObject(),t.internal.write("<< /Dests "+c+" 0 R"),t.internal.write(">>","endobj")}}]),_.events.push(["putCatalog",function(){0> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var n=0;n>>24&255,f[c++]=s>>>16&255,f[c++]=s>>>8&255,f[c++]=255&s,F.arrayBufferToBinaryString(f)},I=function(t,e){var n=Math.LOG2E*Math.log(32768)-8<<4|8,r=n<<8;return r|=Math.min(3,(e-1&255)>>1)<<6,r|=0,[n,255&(r+=31-r%31)]},C=function(t,e){for(var n,r=1,i=0,o=t.length,a=0;0>>0},B=function(t,e,n,r){for(var i,o,a,s=t.length/e,l=new Uint8Array(t.length+s),h=R(),u=0;u>>1)&255;return o},q=function(t,e,n){var r,i,o,a,s=[],l=0,h=t.length;for(s[0]=4;l>>d&255,d+=o.bits;y[w]=x>>>d&255}if(16===o.bits){g=(_=new Uint32Array(o.decodePixels().buffer)).length,m=new Uint8Array(g*(32/o.pixelBitlength)*o.colors),y=new Uint8Array(g*(32/o.pixelBitlength));for(var x,N=1>>0&255,N&&(m[b++]=x>>>16&255,x=_[w++],m[b++]=x>>>0&255),y[L++]=x>>>16&255;p=8}r!==F.image_compression.NONE&&P()?(t=k(m,o.width*o.colors,o.colors,r),u=k(y,o.width,1,r)):(t=m,u=y,f=null)}if(3===o.colorType&&(c=this.color_spaces.INDEXED,h=o.palette,o.transparency.indexed)){var A=o.transparency.indexed,S=0;for(w=0,g=A.length;wr&&(i.push(t.slice(l,o)),s=0,l=o),s+=e[o],o++;return l!==o&&i.push(t.slice(l,o)),i},X=function(t,e,n){n||(n={});var r,i,o,a,s,l,h=[],u=[h],c=n.textIndent||0,f=0,p=0,d=t.split(" "),g=V.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?d[0].length+2:n.lineIndent||0){var m=Array(l).join(" "),y=[];d.map(function(t){1<(t=t.split(/\s*\n/)).length?y=y.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):y.push(t[0])}),d=y,l=Y.apply(this,[m,n])}for(o=0,a=d.length;o>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},rt=ht.API,at=ot=it="",rt.addMetadata=function(t,e){return ot=e||"http://jspdf.default.namespaceuri/",it=t,this.internal.events.subscribe("postPutResources",function(){if(it){var t='',e=unescape(encodeURIComponent('')),n=unescape(encodeURIComponent(t)),r=unescape(encodeURIComponent(it)),i=unescape(encodeURIComponent("")),o=unescape(encodeURIComponent("")),a=n.length+r.length+i.length+e.length+o.length;at=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(e+n+r+i+o),this.internal.write("endstream"),this.internal.write("endobj")}else at=""}),this.internal.events.subscribe("putCatalog",function(){at&&this.internal.write("/Metadata "+at+" 0 R")}),this},function(t,e){var n=t.API,r=n.pdfEscape16=function(t,e){for(var n,r=e.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=t.length;a<"+i+">");return r.length&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),o+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};n.events.push(["putFont",function(e){!function(e,n,r,o){if(e.metadata instanceof t.API.TTFFont&&"Identity-H"===e.encoding){for(var a=e.metadata.Unicode.widths,s=e.metadata.subset.encode(e.metadata.glyIdsUsed,1),l="",h=0;h>"),n("endobj");var p=r();n("<<"),n("/Type /Font"),n("/BaseFont /"+e.fontName),n("/FontDescriptor "+f+" 0 R"),n("/W "+t.API.PDFObject.convert(a)),n("/CIDToGIDMap /Identity"),n("/DW 1000"),n("/Subtype /CIDFontType2"),n("/CIDSystemInfo"),n("<<"),n("/Supplement 0"),n("/Registry (Adobe)"),n("/Ordering ("+e.encoding+")"),n(">>"),n(">>"),n("endobj"),e.objectNumber=r(),n("<<"),n("/Type /Font"),n("/Subtype /Type0"),n("/ToUnicode "+c+" 0 R"),n("/BaseFont /"+e.fontName),n("/Encoding /"+e.encoding),n("/DescendantFonts ["+p+" 0 R]"),n(">>"),n("endobj"),e.isAlreadyPutted=!0}}(e.font,e.out,e.newObject,e.putStream)}]),n.events.push(["putFont",function(e){!function(e,n,r,o){if(e.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===e.encoding){e.metadata.Unicode.widths;for(var a=e.metadata.rawData,s="",l=0;l>"),n("endobj"),e.objectNumber=r(),l=0;l>"),n("endobj"),e.isAlreadyPutted=!0}}(e.font,e.out,e.newObject,e.putStream)}]);var o=function(t){var e,n,i=t.text||"",o=t.x,a=t.y,s=t.options||{},l=t.mutex||{},h=l.pdfEscape,u=l.activeFontKey,c=l.fonts,f=(l.activeFontSize,""),p=0,d="",g=c[n=u].encoding;if("Identity-H"!==c[n].encoding)return{text:i,x:o,y:a,options:s,mutex:l};for(d=i,n=u,"[object Array]"===Object.prototype.toString.call(i)&&(d=i[0]),p=0;pl-h.top-h.bottom&&r.pagesplit){var d=function(t,e,n,i,o){var a=document.createElement("canvas");a.height=o,a.width=i;var s=a.getContext("2d");return s.mozImageSmoothingEnabled=!1,s.webkitImageSmoothingEnabled=!1,s.msImageSmoothingEnabled=!1,s.imageSmoothingEnabled=!1,s.fillStyle=r.backgroundColor||"#ffffff",s.fillRect(0,0,i,o),s.drawImage(t,e,n,i,o,0,0,i,o),a},g=function(){for(var r,o,u=0,g=0,m={},y=!1;;){var v;if(g=0,m.top=0!==u?h.top:n,m.left=0!==u?h.left:e,y=(s-h.left-h.right)*a=t.width)break;this.addPage()}else w=[v=d(t,0,u,r,o),m.left,m.top,v.width/a,v.height/a,f,null,p],this.addImage.apply(this,w);if((u+=o)>=t.height)break;this.addPage()}i(c,u,null,w)}.bind(this);if("CANVAS"===t.nodeName){var m=new Image;m.onload=g,m.src=t.toDataURL("image/png"),t=m}else g()}else{var y=Math.random().toString(35),v=[t,e,n,c,u,f,y,p];this.addImage.apply(this,v),i(c,u,y,v)}}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)return html2canvas(t,r);if("undefined"==typeof rasterizeHTML)return null;var h="drawDocument";return"string"==typeof t&&(h=/^http/.test(t)?"drawURL":"drawHTML"),r.width=r.width||s*a,rasterizeHTML[h](t,void 0,r).then(function(t){r.onrendered(t.image)},function(t){i(null,t)})},function(e){var n,r,i,o,a,s,l,h,u,c,f,p,d,g,m,y,v,w,b,x;n=function(){return function(e){return t.prototype=e,new t};function t(){}}(),c=function(t){var e,n,r,i,o,a,s;for(n=0,r=t.length,e=void 0,a=i=!1;!i&&n!==r;)(e=t[n]=t[n].trimLeft())&&(i=!0),n++;for(n=r-1;r&&!a&&-1!==n;)(e=t[n]=t[n].trimRight())&&(a=!0),n--;for(o=/\s+$/g,s=!0,n=0;n!==r;)"\u2028"!=t[n]&&(e=t[n].replace(/\s+/g," "),s&&(e=e.trimLeft()),e&&(s=o.test(e)),t[n]=e),n++;return t},p=function(t){var e,n,r;for(e=void 0,n=(r=t.split(",")).shift();!e&&n;)e=i[n.trim().toLowerCase()],n=r.shift();return e},d=function(t){var e;return-1<(t="auto"===t?"0px":t).indexOf("em")&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),-1i.pdf.margins_doc.top&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top,i.executeWatchFunctions(a));var k=u(a),I=i.x,C=12/i.pdf.internal.scaleFactor,B=(k["margin-left"]+k["padding-left"])*C,j=(k["margin-right"]+k["padding-right"])*C,E=(k["margin-top"]+k["padding-top"])*C,M=(k["margin-bottom"]+k["padding-bottom"])*C;void 0!==k.float&&"right"===k.float?I+=i.settings.width-a.width-j:I+=B,i.pdf.addImage(F,I,i.y+E,a.width,a.height),F=void 0,"right"===k.float||"left"===k.float?(i.watchFunctions.push(function(t,e,n,r){return i.y>=e?(i.x+=t,i.settings.width+=n,!0):!!(r&&1===r.nodeType&&!N[r.nodeName]&&i.x+r.width>i.pdf.margins_doc.left+i.pdf.margins_doc.width)&&(i.x+=t,i.y=e,i.settings.width+=n,!0)}.bind(this,"left"===k.float?-a.width-B-j:0,i.y+a.height+E+M,a.width)),i.watchFunctions.push(function(t,e,n){return!(i.y]*?>/gi,""),u="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(h=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",h.innerHTML='