From 453414604803833aba0df7b2a4d0eda376a8f864 Mon Sep 17 00:00:00 2001 From: Marco Pagani Date: Tue, 17 Nov 2020 23:30:37 -0500 Subject: [PATCH 1/9] converted moment to external dependency --- gulpfile.js | 9 +-------- package.json | 5 +++-- src/js/global-dependencies.js | 4 +++- static/index.html | 5 +++-- static/js/moment.min.js | 2 -- 5 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 static/js/moment.min.js diff --git a/gulpfile.js b/gulpfile.js index 5b0b491e2..8e2f85e14 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,14 +12,7 @@ sass.compiler = require("dart-sass"); let eslintConfig = { parser: "babel-eslint", - globals: [ - "jQuery", - "$", - "firebase", - "moment", - "html2canvas", - "ClipboardItem", - ], + globals: ["jQuery", "$", "firebase", "html2canvas", "ClipboardItem"], envs: ["es6", "browser", "node"], rules: { "constructor-super": "error", diff --git a/package.json b/package.json index 35d9c14af..061174e45 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "deploy:live": "npm run build && firebase deploy -P live" }, "engines": { - "node": "10" + "node": ">=10" }, "devDependencies": { "@babel/core": "^7.12.3", @@ -45,6 +45,7 @@ "@babel/runtime": "^7.12.5", "chart.js": "^2.9.4", "chartjs-plugin-annotation": "^0.5.7", - "chartjs-plugin-trendline": "^0.2.2" + "chartjs-plugin-trendline": "^0.2.2", + "moment": "^2.29.1" } } diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index 1d699615f..bcc034777 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,9 +1,11 @@ -//this file should be concatenated at the top of the legacy js files +// this file should be concatenated at the top of the legacy js files import Chart from "chart.js"; import chartTrendline from "chartjs-plugin-trendline"; import chartAnnotation from "chartjs-plugin-annotation"; +import moment from "moment"; + Chart.plugins.register(chartTrendline); Chart.plugins.register(chartAnnotation); diff --git a/static/index.html b/static/index.html index d860a09ba..07ce4ec8d 100644 --- a/static/index.html +++ b/static/index.html @@ -947,7 +947,9 @@
-
60
+
+
60
+
60
@@ -3430,7 +3432,6 @@ - diff --git a/static/js/moment.min.js b/static/js/moment.min.js deleted file mode 100644 index 07a184c3f..000000000 --- a/static/js/moment.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e=null;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11xe(n[pe],n[ve])?ke:n[Me]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0 Date: Wed, 18 Nov 2020 00:27:36 -0500 Subject: [PATCH 2/9] replaced jquery and html2canvas with external deps --- gulpfile.js | 2 +- package-lock.json | 44 +++++ package.json | 8 +- src/js/global-dependencies.js | 13 +- static/index.html | 5 - static/js/easing.js | 250 --------------------------- static/js/html2canvas.min.js | 6 - static/js/jquery-3.5.1.min.js | 2 - static/js/jquery.color.min.js | 3 - static/js/jquery.cookie-1.4.1.min.js | 2 - 10 files changed, 60 insertions(+), 275 deletions(-) delete mode 100644 static/js/easing.js delete mode 100644 static/js/html2canvas.min.js delete mode 100644 static/js/jquery-3.5.1.min.js delete mode 100644 static/js/jquery.color.min.js delete mode 100644 static/js/jquery.cookie-1.4.1.min.js diff --git a/gulpfile.js b/gulpfile.js index 8e2f85e14..7c2120073 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,7 +12,7 @@ sass.compiler = require("dart-sass"); let eslintConfig = { parser: "babel-eslint", - globals: ["jQuery", "$", "firebase", "html2canvas", "ClipboardItem"], + globals: ["firebase", "ClipboardItem"], envs: ["es6", "browser", "node"], rules: { "constructor-super": "error", diff --git a/package-lock.json b/package-lock.json index 584327ddd..b35fbb786 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1777,6 +1777,11 @@ } } }, + "base64-arraybuffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", + "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==" + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2648,6 +2653,14 @@ "randomfill": "^1.0.3" } }, + "css-line-break": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz", + "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==", + "requires": { + "base64-arraybuffer": "^0.2.0" + } + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -4775,6 +4788,14 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "html2canvas": { + "version": "1.0.0-rc.7", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.7.tgz", + "integrity": "sha512-yvPNZGejB2KOyKleZspjK/NruXVQuowu8NnV2HYG7gW7ytzl+umffbtUI62v2dCHQLDdsK6HIDtyJZ0W3neerA==", + "requires": { + "css-line-break": "1.1.1" + } + }, "htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", @@ -5390,6 +5411,29 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + }, + "jquery-color": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/jquery-color/-/jquery-color-2.2.0.tgz", + "integrity": "sha512-4VoxsLMw860EQGNT/TmP3Lbr7/1OCQlBPS4ILj7bxRApJrPQfpqzdIOTY8Ll9nGY7UHtWqDuzR7cUcS1lcWjVw==" + }, + "jquery-easing": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jquery-easing/-/jquery-easing-0.0.1.tgz", + "integrity": "sha1-s8N1JbVXNNwe4a0JtsM3MYdodxU=", + "requires": { + "jquery": "*" + } + }, + "jquery.cookie": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jquery.cookie/-/jquery.cookie-1.4.1.tgz", + "integrity": "sha1-1j3OIJ6raR/mMxbbCMqeR+D5OFs=" + }, "js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", diff --git a/package.json b/package.json index 061174e45..e78c254aa 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,6 @@ "deploy:live:functions": "npm run build && firebase deploy -P live --only functions", "deploy:live": "npm run build && firebase deploy -P live" }, - "engines": { - "node": ">=10" - }, "devDependencies": { "@babel/core": "^7.12.3", "@babel/plugin-transform-runtime": "^7.12.1", @@ -46,6 +43,11 @@ "chart.js": "^2.9.4", "chartjs-plugin-annotation": "^0.5.7", "chartjs-plugin-trendline": "^0.2.2", + "html2canvas": "^1.0.0-rc.7", + "jquery": "^3.5.1", + "jquery-color": "^2.2.0", + "jquery-easing": "0.0.1", + "jquery.cookie": "^1.4.1", "moment": "^2.29.1" } } diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index bcc034777..635cebe07 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,14 +1,21 @@ // this file should be concatenated at the top of the legacy js files +// this refuses to work with ES6 syntax, TODO +var $, jQuery; +$ = jQuery = require("jquery"); +import "jquery-color"; +import "jquery-easing"; +import "jquery.cookie"; + import Chart from "chart.js"; import chartTrendline from "chartjs-plugin-trendline"; import chartAnnotation from "chartjs-plugin-annotation"; - -import moment from "moment"; - Chart.plugins.register(chartTrendline); Chart.plugins.register(chartAnnotation); +import moment from "moment"; +import html2canvas from "html2canvas"; + import { db_getSnapshot, db_setSnapshot, diff --git a/static/index.html b/static/index.html index 07ce4ec8d..20e1f68d8 100644 --- a/static/index.html +++ b/static/index.html @@ -3428,10 +3428,5 @@ src="https://kit.fontawesome.com/f3f87d89b4.js" crossorigin="anonymous" > - - - - - diff --git a/static/js/easing.js b/static/js/easing.js deleted file mode 100644 index 072d82d06..000000000 --- a/static/js/easing.js +++ /dev/null @@ -1,250 +0,0 @@ -/* - * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ - * - * Uses the built in easing capabilities added In jQuery 1.1 - * to offer multiple easing options - * - * TERMS OF USE - jQuery Easing - * - * Open source under the BSD License. - * - * Copyright © 2008 George McGinley Smith - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -// t: current time, b: begInnIng value, c: change In value, d: duration -jQuery.easing["jswing"] = jQuery.easing["swing"]; - -jQuery.extend(jQuery.easing, { - def: "easeOutQuad", - swing: function (x, t, b, c, d) { - //alert(jQuery.easing.default); - return jQuery.easing[jQuery.easing.def](x, t, b, c, d); - }, - easeInQuad: function (x, t, b, c, d) { - return c * (t /= d) * t + b; - }, - easeOutQuad: function (x, t, b, c, d) { - return -c * (t /= d) * (t - 2) + b; - }, - easeInOutQuad: function (x, t, b, c, d) { - if ((t /= d / 2) < 1) return (c / 2) * t * t + b; - return (-c / 2) * (--t * (t - 2) - 1) + b; - }, - easeInCubic: function (x, t, b, c, d) { - return c * (t /= d) * t * t + b; - }, - easeOutCubic: function (x, t, b, c, d) { - return c * ((t = t / d - 1) * t * t + 1) + b; - }, - easeInOutCubic: function (x, t, b, c, d) { - if ((t /= d / 2) < 1) return (c / 2) * t * t * t + b; - return (c / 2) * ((t -= 2) * t * t + 2) + b; - }, - easeInQuart: function (x, t, b, c, d) { - return c * (t /= d) * t * t * t + b; - }, - easeOutQuart: function (x, t, b, c, d) { - return -c * ((t = t / d - 1) * t * t * t - 1) + b; - }, - easeInOutQuart: function (x, t, b, c, d) { - if ((t /= d / 2) < 1) return (c / 2) * t * t * t * t + b; - return (-c / 2) * ((t -= 2) * t * t * t - 2) + b; - }, - easeInQuint: function (x, t, b, c, d) { - return c * (t /= d) * t * t * t * t + b; - }, - easeOutQuint: function (x, t, b, c, d) { - return c * ((t = t / d - 1) * t * t * t * t + 1) + b; - }, - easeInOutQuint: function (x, t, b, c, d) { - if ((t /= d / 2) < 1) return (c / 2) * t * t * t * t * t + b; - return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b; - }, - easeInSine: function (x, t, b, c, d) { - return -c * Math.cos((t / d) * (Math.PI / 2)) + c + b; - }, - easeOutSine: function (x, t, b, c, d) { - return c * Math.sin((t / d) * (Math.PI / 2)) + b; - }, - easeInOutSine: function (x, t, b, c, d) { - return (-c / 2) * (Math.cos((Math.PI * t) / d) - 1) + b; - }, - easeInExpo: function (x, t, b, c, d) { - return t == 0 ? b : c * Math.pow(2, 10 * (t / d - 1)) + b; - }, - easeOutExpo: function (x, t, b, c, d) { - return t == d ? b + c : c * (-Math.pow(2, (-10 * t) / d) + 1) + b; - }, - easeInOutExpo: function (x, t, b, c, d) { - if (t == 0) return b; - if (t == d) return b + c; - if ((t /= d / 2) < 1) return (c / 2) * Math.pow(2, 10 * (t - 1)) + b; - return (c / 2) * (-Math.pow(2, -10 * --t) + 2) + b; - }, - easeInCirc: function (x, t, b, c, d) { - return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b; - }, - easeOutCirc: function (x, t, b, c, d) { - return c * Math.sqrt(1 - (t = t / d - 1) * t) + b; - }, - easeInOutCirc: function (x, t, b, c, d) { - if ((t /= d / 2) < 1) return (-c / 2) * (Math.sqrt(1 - t * t) - 1) + b; - return (c / 2) * (Math.sqrt(1 - (t -= 2) * t) + 1) + b; - }, - easeInElastic: function (x, t, b, c, d) { - var s = 1.70158; - var p = 0; - var a = c; - if (t == 0) return b; - if ((t /= d) == 1) return b + c; - if (!p) p = d * 0.3; - if (a < Math.abs(c)) { - a = c; - var s = p / 4; - } else var s = (p / (2 * Math.PI)) * Math.asin(c / a); - return ( - -( - a * - Math.pow(2, 10 * (t -= 1)) * - Math.sin(((t * d - s) * (2 * Math.PI)) / p) - ) + b - ); - }, - easeOutElastic: function (x, t, b, c, d) { - var s = 1.70158; - var p = 0; - var a = c; - if (t == 0) return b; - if ((t /= d) == 1) return b + c; - if (!p) p = d * 0.3; - if (a < Math.abs(c)) { - a = c; - var s = p / 4; - } else var s = (p / (2 * Math.PI)) * Math.asin(c / a); - return ( - a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) + - c + - b - ); - }, - easeInOutElastic: function (x, t, b, c, d) { - var s = 1.70158; - var p = 0; - var a = c; - if (t == 0) return b; - if ((t /= d / 2) == 2) return b + c; - if (!p) p = d * (0.3 * 1.5); - if (a < Math.abs(c)) { - a = c; - var s = p / 4; - } else var s = (p / (2 * Math.PI)) * Math.asin(c / a); - if (t < 1) - return ( - -0.5 * - (a * - Math.pow(2, 10 * (t -= 1)) * - Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + - b - ); - return ( - a * - Math.pow(2, -10 * (t -= 1)) * - Math.sin(((t * d - s) * (2 * Math.PI)) / p) * - 0.5 + - c + - b - ); - }, - easeInBack: function (x, t, b, c, d, s) { - if (s == undefined) s = 1.70158; - return c * (t /= d) * t * ((s + 1) * t - s) + b; - }, - easeOutBack: function (x, t, b, c, d, s) { - if (s == undefined) s = 1.70158; - return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; - }, - easeInOutBack: function (x, t, b, c, d, s) { - if (s == undefined) s = 1.70158; - if ((t /= d / 2) < 1) - return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b; - return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b; - }, - easeInBounce: function (x, t, b, c, d) { - return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b; - }, - easeOutBounce: function (x, t, b, c, d) { - if ((t /= d) < 1 / 2.75) { - return c * (7.5625 * t * t) + b; - } else if (t < 2 / 2.75) { - return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b; - } else if (t < 2.5 / 2.75) { - return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b; - } else { - return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b; - } - }, - easeInOutBounce: function (x, t, b, c, d) { - if (t < d / 2) - return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * 0.5 + b; - return ( - jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b - ); - }, -}); - -/* - * - * TERMS OF USE - EASING EQUATIONS - * - * Open source under the BSD License. - * - * Copyright © 2001 Robert Penner - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * Neither the name of the author nor the names of contributors may be used to endorse - * or promote products derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ diff --git a/static/js/html2canvas.min.js b/static/js/html2canvas.min.js deleted file mode 100644 index 35355822f..000000000 --- a/static/js/html2canvas.min.js +++ /dev/null @@ -1,6 +0,0 @@ -(function(A,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(A=A||self,A.html2canvas=e())})(this,function(){"use strict";function A(A,e){function t(){this.constructor=A}B(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}function e(A,e,t,r){return new(t||(t=Promise))(function(n,B){function s(A){try{i(r.next(A))}catch(A){B(A)}}function o(A){try{i(r.throw(A))}catch(A){B(A)}}function i(A){A.done?n(A.value):new t(function(e){e(A.value)}).then(s,o)}i((r=r.apply(A,e||[])).next())})}function t(A,e){function t(A){return function(e){return r([A,e])}}function r(t){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,B&&(s=2&t[0]?B.return:t[0]?B.throw||((s=B.return)&&s.call(B),0):B.next)&&!(s=s.call(B,t[1])).done)return s;switch(B=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return i.label++,{value:t[1],done:!1};case 5:i.label++,B=t[1],t=[0];continue;case 7:t=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(6===t[0]||2===t[0])){i=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]=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}function n(A){return A.type!==l.FUNCTION||Qn[A.name]}for(var B=function(A,e){return B=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])},B(A,e)},s=function(){return s=Object.assign||function(A){for(var e,t=1,r=arguments.length;t=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},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="undefined"==typeof Uint8Array?[]:new Uint8Array(256),U=0;U>4,c[i++]=(15&r)<<4|n>>2,c[i++]=(3&n)<<6|63&B;return a},g=function(A){for(var e=A.length,t=[],r=0;r>F,p=1<>F,I=f+K,T=I,m=32,R=T+m,L=65536>>h,O=1<=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>F],e=(e<>F)],e=(e<>h),e=this.index[e],e+=A>>F&v,e=this.index[e],e=(e<_?(n.push(!0),s-=_):n.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(B),t.push(AA);if(s===z||s===Y){if(0===B)return r.push(B),t.push(UA);var o=t[B-1];return-1===SA.indexOf(o)?(r.push(r[B-1]),t.push(o)):(r.push(B),t.push(UA))}return r.push(B),s===lA?t.push("strict"===e?BA:HA):s===KA?t.push(UA):s===wA?t.push(UA):s===IA?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(HA):t.push(UA):void t.push(s)}),[r,t,n]},PA=function(A,e,t,r){var n=r[t];if(Array.isArray(A)?-1!==A.indexOf(n):A===n)for(var B=t;B<=r.length;){B++;var s=r[B];if(s===e)return!0;if(s!==W)break}if(n===W)for(B=t;B>0;){B--;var o=r[B];if(Array.isArray(A)?-1!==A.indexOf(o):A===o)for(var i=t;i<=r.length;){i++;s=r[i];if(s===e)return!0;if(s!==W)break}if(o!==W)break}return!1},xA=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==W)return r;t--}return 0},VA=function(A,e,t,r,n){if(0===t[r])return mA;var B=r-1;if(Array.isArray(n)&&!0===n[B])return mA;var s=B-1,o=B+1,i=e[B],a=s>=0?e[s]:0,c=e[o];if(i===x&&c===V)return mA;if(-1!==vA.indexOf(i))return TA;if(-1!==vA.indexOf(c))return mA;if(-1!==DA.indexOf(c))return mA;if(xA(B,e)===G)return RA;if(LA.get(A[B])===Y&&(c===HA||c===CA||c===gA))return mA;if(i===J||c===J)return mA;if(i===k)return mA;if(-1===[W,Z,$].indexOf(i)&&c===k)return mA;if(-1!==[eA,tA,rA,iA,uA].indexOf(c))return mA;if(xA(B,e)===sA)return mA;if(PA(oA,sA,B,e))return mA;if(PA([eA,tA],BA,B,e))return mA;if(PA(q,q,B,e))return mA;if(i===W)return RA;if(i===oA||c===oA)return mA;if(c===AA||i===AA)return RA;if(-1!==[Z,$,BA].indexOf(c)||i===j)return mA;if(a===hA&&-1!==yA.indexOf(i))return mA;if(i===uA&&c===hA)return mA;if(c===nA&&-1!==OA.concat(nA,rA,aA,HA,CA,gA).indexOf(i))return mA;if(-1!==OA.indexOf(c)&&i===aA||-1!==OA.indexOf(i)&&c===aA)return mA;if(i===QA&&-1!==[HA,CA,gA].indexOf(c)||-1!==[HA,CA,gA].indexOf(i)&&c===cA)return mA;if(-1!==OA.indexOf(i)&&-1!==bA.indexOf(c)||-1!==bA.indexOf(i)&&-1!==OA.indexOf(c))return mA;if(-1!==[QA,cA].indexOf(i)&&(c===aA||-1!==[sA,$].indexOf(c)&&e[o+1]===aA)||-1!==[sA,$].indexOf(i)&&c===aA||i===aA&&-1!==[aA,uA,iA].indexOf(c))return mA;if(-1!==[aA,uA,iA,eA,tA].indexOf(c))for(var Q=B;Q>=0;){var u=e[Q];if(u===aA)return mA;if(-1===[uA,iA].indexOf(u))break;Q--}if(-1!==[QA,cA].indexOf(c))for(Q=-1!==[eA,tA].indexOf(i)?s:B;Q>=0;){u=e[Q];if(u===aA)return mA;if(-1===[uA,iA].indexOf(u))break;Q--}if(dA===i&&-1!==[dA,fA,EA,FA].indexOf(c)||-1!==[fA,EA].indexOf(i)&&-1!==[fA,pA].indexOf(c)||-1!==[pA,FA].indexOf(i)&&c===pA)return mA;if(-1!==MA.indexOf(i)&&-1!==[nA,cA].indexOf(c)||-1!==MA.indexOf(c)&&i===QA)return mA;if(-1!==OA.indexOf(i)&&-1!==OA.indexOf(c))return mA;if(i===iA&&-1!==OA.indexOf(c))return mA;if(-1!==OA.concat(aA).indexOf(i)&&c===sA||-1!==OA.concat(aA).indexOf(c)&&i===tA)return mA;if(i===NA&&c===NA){for(var w=t[B],U=1;w>0&&(w--,e[w]===NA);)U++;if(U%2!=0)return mA}return i===CA&&c===gA?mA:RA},zA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=_A(A,e.lineBreak),r=t[0],n=t[1],B=t[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(n=n.map(function(A){return-1!==[aA,UA,KA].indexOf(A)?HA:A}));var s="keep-all"===e.wordBreak?B.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0;return[r,n,s]},XA=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===TA,this.start=t,this.end=r}return A.prototype.slice=function(){return Q.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),JA=function(A,e){var t=c(A),r=zA(t,e),n=r[0],B=r[1],s=r[2],o=t.length,i=0,a=0;return{next:function(){if(a>=o)return{done:!0,value:null};for(var A=mA;a=Pe&&A<=57},je=function(A){return A>=55296&&A<=57343},$e=function(A){return Ze(A)||A>=Ge&&A<=We||A>=xe&&A<=ze},At=function(A){return A>=xe&&A<=Je},et=function(A){return A>=Ge&&A<=qe},tt=function(A){return At(A)||et(A)},rt=function(A){return A>=Ne},nt=function(A){return A===jA||A===ee||A===te},Bt=function(A){return tt(A)||rt(A)||A===Qe},st=function(A){return Bt(A)||Ze(A)||A===ue},ot=function(A){return A>=ve&&A<=De||A===be||A>=Se&&A<=Me||A===ye},it=function(A,e){return A===Ae&&e!==jA},at=function(A,e,t){return A===ue?Bt(e)||it(e,t):!!Bt(A)||!(A!==Ae||!it(A,e))},ct=function(A,e,t){return A===Te||A===ue?!!Ze(e)||e===Oe&&Ze(t):Ze(A===Oe?e:A)},Qt=function(A){var e=0,t=1;A[e]!==Te&&A[e]!==ue||(A[e]===ue&&(t=-1),e++);for(var r=[];Ze(A[e]);)r.push(A[e++]);var n=r.length?parseInt(Q.apply(void 0,r),10):0;A[e]===Oe&&e++;for(var B=[];Ze(A[e]);)B.push(A[e++]);var s=B.length,o=s?parseInt(Q.apply(void 0,B),10):0;A[e]!==ke&&A[e]!==Ve||e++;var i=1;A[e]!==Te&&A[e]!==ue||(A[e]===ue&&(i=-1),e++);for(var a=[];Ze(A[e]);)a.push(A[e++]);var c=a.length?parseInt(Q.apply(void 0,a),10):0;return t*(n+o*Math.pow(10,-s))*Math.pow(10,i*c)},ut={type:l.LEFT_PARENTHESIS_TOKEN},wt={type:l.RIGHT_PARENTHESIS_TOKEN},Ut={type:l.COMMA_TOKEN},lt={type:l.SUFFIX_MATCH_TOKEN},Ct={type:l.PREFIX_MATCH_TOKEN},gt={type:l.COLUMN_TOKEN},Et={type:l.DASH_MATCH_TOKEN},Ft={type:l.INCLUDE_MATCH_TOKEN},ht={type:l.LEFT_CURLY_BRACKET_TOKEN},Ht={type:l.RIGHT_CURLY_BRACKET_TOKEN},dt={type:l.SUBSTRING_MATCH_TOKEN},ft={type:l.BAD_URL_TOKEN},pt={type:l.BAD_STRING_TOKEN},Nt={type:l.CDO_TOKEN},Kt={type:l.CDC_TOKEN},It={type:l.COLON_TOKEN},Tt={type:l.SEMICOLON_TOKEN},mt={type:l.LEFT_SQUARE_BRACKET_TOKEN},Rt={type:l.RIGHT_SQUARE_BRACKET_TOKEN},Lt={type:l.WHITESPACE_TOKEN},Ot={type:l.EOF_TOKEN},vt=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(c(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==Ot;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case re:return this.consumeStringToken(re);case Be:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(st(e)||it(t,r)){var n=at(e,t,r)?YA:WA,B=this.consumeName();return{type:l.HASH_TOKEN,value:B,flags:n}}break;case se:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),lt;break;case ie:return this.consumeStringToken(ie);case ae:return ut;case ce:return wt;case Ie:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),dt;break;case Te:if(ct(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case me:return Ut;case ue:var s=A,o=this.peekCodePoint(0),i=this.peekCodePoint(1);if(ct(s,o,i))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(at(s,o,i))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(o===ue&&i===le)return this.consumeCodePoint(),this.consumeCodePoint(),Kt;break;case Oe:if(ct(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case $A:if(this.peekCodePoint(0)===Ie)for(this.consumeCodePoint();;){var a=this.consumeCodePoint();if(a===Ie&&(a=this.consumeCodePoint(),a===$A))return this.consumeToken();if(a===_e)return this.consumeToken()}break;case Re:return It;case Le:return Tt;case Ue:if(this.peekCodePoint(0)===we&&this.peekCodePoint(1)===ue&&this.peekCodePoint(2)===ue)return this.consumeCodePoint(),this.consumeCodePoint(),Nt;break;case Ce:var c=this.peekCodePoint(0),u=this.peekCodePoint(1),w=this.peekCodePoint(2);if(at(c,u,w)){B=this.consumeName();return{type:l.AT_KEYWORD_TOKEN,value:B}}break;case ge:return mt;case Ae:if(it(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case Ee:return Rt;case Fe:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Ct;break;case he:return ht;case de:return Ht;case Xe:case Ye:var U=this.peekCodePoint(0),C=this.peekCodePoint(1);return U!==Te||!$e(C)&&C!==He||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case fe:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Et;if(this.peekCodePoint(0)===fe)return this.consumeCodePoint(),gt;break;case pe:if(this.peekCodePoint(0)===ne)return this.consumeCodePoint(),Ft;break;case _e:return Ot}return nt(A)?(this.consumeWhiteSpace(),Lt):Ze(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):Bt(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:l.DELIM_TOKEN,value:Q(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();$e(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;e===He&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(Q.apply(void 0,A.map(function(A){return A===He?Pe:A})),16),n=parseInt(Q.apply(void 0,A.map(function(A){return A===He?We:A})),16);return{type:l.UNICODE_RANGE_TOKEN,start:r,end:n}}var B=parseInt(Q.apply(void 0,A),16);if(this.peekCodePoint(0)===ue&&$e(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var s=[];$e(e)&&s.length<6;)s.push(e),e=this.consumeCodePoint();n=parseInt(Q.apply(void 0,s),16);return{type:l.UNICODE_RANGE_TOKEN,start:B,end:n}}return{type:l.UNICODE_RANGE_TOKEN,start:B,end:B}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&this.peekCodePoint(0)===ae?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ae?(this.consumeCodePoint(),{type:l.FUNCTION_TOKEN,value:A}):{type:l.IDENT_TOKEN,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===_e)return{type:l.URL_TOKEN,value:""};var e=this.peekCodePoint(0);if(e===ie||e===re){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===l.STRING_TOKEN&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===_e||this.peekCodePoint(0)===ce)?(this.consumeCodePoint(),{type:l.URL_TOKEN,value:t.value}):(this.consumeBadUrlRemnants(),ft)}for(;;){var r=this.consumeCodePoint();if(r===_e||r===ce)return{type:l.URL_TOKEN,value:Q.apply(void 0,A)};if(nt(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===_e||this.peekCodePoint(0)===ce?(this.consumeCodePoint(),{type:l.URL_TOKEN,value:Q.apply(void 0,A)}):(this.consumeBadUrlRemnants(),ft);if(r===re||r===ie||r===ae||ot(r))return this.consumeBadUrlRemnants(),ft;if(r===Ae){if(!it(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),ft;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;nt(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===ce||A===_e)return;it(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e=6e4,t="";A>0;){var r=Math.min(e,A);t+=Q.apply(void 0,this._value.splice(0,r)),A-=r}return this._value.shift(),t},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(r===_e||void 0===r||r===A)return e+=this.consumeStringSlice(t),{type:l.STRING_TOKEN,value:e};if(r===jA)return this._value.splice(0,t),pt;if(r===Ae){var n=this._value[t+1];n!==_e&&void 0!==n&&(n===jA?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):it(r,n)&&(e+=this.consumeStringSlice(t),e+=Q(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=qA,t=this.peekCodePoint(0);for(t!==Te&&t!==ue||A.push(this.consumeCodePoint());Ze(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(t===Oe&&Ze(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=ZA;Ze(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((t===ke||t===Ve)&&((r===Te||r===ue)&&Ze(n)||Ze(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=ZA;Ze(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[Qt(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(at(r,n,B)){var s=this.consumeName();return{type:l.DIMENSION_TOKEN,number:e,flags:t,unit:s}}return r===oe?(this.consumeCodePoint(),{type:l.PERCENTAGE_TOKEN,number:e,flags:t}):{type:l.NUMBER_TOKEN,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if($e(A)){for(var e=Q(A);$e(this.peekCodePoint(0))&&e.length<6;)e+=Q(this.consumeCodePoint());nt(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||je(t)||t>1114111?Ke:t}return A===_e?Ke:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(st(e))A+=Q(e);else{if(!it(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=Q(this.consumeEscapedCodePoint())}}},A}(),Dt=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new vt;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===l.WHITESPACE_TOKEN;)A=this.consumeToken();if(A.type===l.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===l.WHITESPACE_TOKEN);if(A.type===l.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===l.EOF_TOKEN)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case l.LEFT_CURLY_BRACKET_TOKEN:case l.LEFT_SQUARE_BRACKET_TOKEN:case l.LEFT_PARENTHESIS_TOKEN:return this.consumeSimpleBlock(A.type);case l.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===l.EOF_TOKEN||zt(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:l.FUNCTION};;){var t=this.consumeToken();if(t.type===l.EOF_TOKEN||t.type===l.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?Ot:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),bt=function(A){return A.type===l.DIMENSION_TOKEN},St=function(A){return A.type===l.NUMBER_TOKEN},Mt=function(A){return A.type===l.IDENT_TOKEN},yt=function(A){return A.type===l.STRING_TOKEN},_t=function(A,e){return Mt(A)&&A.value===e},Pt=function(A){return A.type!==l.WHITESPACE_TOKEN},xt=function(A){return A.type!==l.WHITESPACE_TOKEN&&A.type!==l.COMMA_TOKEN},Vt=function(A){var e=[],t=[];return A.forEach(function(A){if(A.type===l.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!==l.WHITESPACE_TOKEN&&t.push(A)}),t.length&&e.push(t),e},zt=function(A,e){return e===l.LEFT_CURLY_BRACKET_TOKEN&&A.type===l.RIGHT_CURLY_BRACKET_TOKEN||(e===l.LEFT_SQUARE_BRACKET_TOKEN&&A.type===l.RIGHT_SQUARE_BRACKET_TOKEN||e===l.LEFT_PARENTHESIS_TOKEN&&A.type===l.RIGHT_PARENTHESIS_TOKEN)},Xt=function(A){return A.type===l.NUMBER_TOKEN||A.type===l.DIMENSION_TOKEN},Jt=function(A){return A.type===l.PERCENTAGE_TOKEN||Xt(A)},Gt=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},kt={type:l.NUMBER_TOKEN,number:0,flags:qA},Wt={type:l.PERCENTAGE_TOKEN,number:50,flags:qA},Yt={type:l.PERCENTAGE_TOKEN,number:100,flags:qA},qt=function(A,e,t){var r=A[0],n=A[1];return[Zt(r,e),Zt(void 0!==n?n:r,t)]},Zt=function(A,e){if(A.type===l.PERCENTAGE_TOKEN)return A.number/100*e;if(bt(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},jt="deg",$t="grad",Ar="rad",er="turn",tr={name:"angle",parse:function(A){if(A.type===l.DIMENSION_TOKEN)switch(A.unit){case jt:return Math.PI*A.number/180;case $t:return Math.PI/200*A.number;case Ar:return A.number;case er:return 2*Math.PI*A.number}throw new Error("Unsupported angle type")}},rr=function(A){return A.type===l.DIMENSION_TOKEN&&(A.unit===jt||A.unit===$t||A.unit===Ar||A.unit===er)},nr=function(A){var e=A.filter(Mt).map(function(A){return A.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[kt,kt];case"to top":case"bottom":return Br(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[kt,Yt];case"to right":case"left":return Br(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Yt,Yt];case"to bottom":case"top":return Br(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Yt,kt];case"to left":case"right":return Br(270)}return 0},Br=function(A){return Math.PI*A/180},sr={name:"color",parse:function(A){if(A.type===l.FUNCTION){var e=wr[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===l.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 ar(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 ar(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 ar(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 ar(parseInt(t,16),parseInt(r,16),parseInt(n,16),parseInt(B,16)/255)}}if(A.type===l.IDENT_TOKEN){var s=Ur[A.value.toUpperCase()];if(void 0!==s)return s}return Ur.TRANSPARENT}},or=function(A){return 0==(255&A)},ir=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+")"},ar=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},cr=function(A,e){if(A.type===l.NUMBER_TOKEN)return A.number;if(A.type===l.PERCENTAGE_TOKEN){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},Qr=function(A){var e=A.filter(xt);if(3===e.length){var t=e.map(cr),r=t[0],n=t[1],B=t[2];return ar(r,n,B,1)}if(4===e.length){var s=e.map(cr),o=(r=s[0],n=s[1],B=s[2],s[3]);return ar(r,n,B,o)}return 0},ur=function(A){var e=A.filter(xt),t=e[0],n=e[1],B=e[2],s=e[3],o=(t.type===l.NUMBER_TOKEN?Br(t.number):tr.parse(t))/(2*Math.PI),i=Jt(n)?n.number/100:0,a=Jt(B)?B.number/100:0,c=void 0!==s&&Jt(s)?Zt(s,1):1;if(0===i)return ar(255*a,255*a,255*a,1);var Q=a<=.5?a*(i+1):a+i-a*i,u=2*a-Q,w=r(u,Q,o+1/3),U=r(u,Q,o),C=r(u,Q,o-1/3);return ar(255*w,255*U,255*C,c)},wr={hsl:ur,hsla:ur,rgb:Qr,rgba:Qr},Ur={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"})(GA||(GA={})),function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(kA||(kA={}));var lr,Cr={name:"background-clip",initialValue:"border-box",prefix:!1,type:GA.LIST,parse:function(A){return A.map(function(A){if(Mt(A))switch(A.value){case"padding-box":return kA.PADDING_BOX;case"content-box":return kA.CONTENT_BOX}return kA.BORDER_BOX})}},gr={name:"background-color",initialValue:"transparent",prefix:!1,type:GA.TYPE_VALUE,format:"color"},Er=function(A){var e=sr.parse(A[0]),t=A[1];return t&&Jt(t)?{color:e,stop:t}:{color:e,stop:null}},Fr=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=kt),null===r.stop&&(r.stop=Yt);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},pr=function(A,e,t,r,n){var B=0,s=0;switch(A.size){case Bn.CLOSEST_SIDE:A.shape===nn.CIRCLE?B=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(B=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-n)));break;case Bn.CLOSEST_CORNER:if(A.shape===nn.CIRCLE)B=s=Math.min(dr(e,t),dr(e,t-n),dr(e-r,t),dr(e-r,t-n));else if(A.shape===nn.ELLIPSE){var o=Math.min(Math.abs(t),Math.abs(t-n))/Math.min(Math.abs(e),Math.abs(e-r)),i=fr(r,n,e,t,!0),a=i[0],c=i[1];B=dr(a-e,(c-t)/o),s=o*B}break;case Bn.FARTHEST_SIDE:A.shape===nn.CIRCLE?B=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-n)):A.shape===nn.ELLIPSE&&(B=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-n)));break;case Bn.FARTHEST_CORNER:if(A.shape===nn.CIRCLE)B=s=Math.max(dr(e,t),dr(e,t-n),dr(e-r,t),dr(e-r,t-n));else if(A.shape===nn.ELLIPSE){o=Math.max(Math.abs(t),Math.abs(t-n))/Math.max(Math.abs(e),Math.abs(e-r));var Q=fr(r,n,e,t,!1);a=Q[0],c=Q[1];B=dr(a-e,(c-t)/o),s=o*B}}return Array.isArray(A.size)&&(B=Zt(A.size[0],r),s=2===A.size.length?Zt(A.size[1],n):B),[B,s]},Nr=function(A){var e=Br(180),t=[];return Vt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===l.IDENT_TOKEN&&"to"===n.value)return void(e=nr(A));if(rr(n))return void(e=tr.parse(n))}var B=Er(A);t.push(B)}),{angle:e,stops:t,type:lr.LINEAR_GRADIENT}},Kr=function(A){var e=Br(180),t=[];return Vt(A).forEach(function(A,r){if(0===r){var n=A[0];if(n.type===l.IDENT_TOKEN&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(e=nr(A));if(rr(n))return void(e=(tr.parse(n)+Br(270))%Br(360))}var B=Er(A);t.push(B)}),{angle:e,stops:t,type:lr.LINEAR_GRADIENT}},Ir=function(A){var e=123;if(A.createRange){var t=A.createRange();if(t.getBoundingClientRect){var r=A.createElement("boundtest");r.style.height=e+"px",r.style.display="block",A.body.appendChild(r),t.selectNode(r);var n=t.getBoundingClientRect(),B=Math.round(n.height);if(A.body.removeChild(r),B===e)return!0}}return!1},Tr=function(){return void 0!==(new Image).crossOrigin},mr=function(){return"string"==typeof(new XMLHttpRequest).responseType},Rr=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},Lr=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},Or=function(A){var e=A.createElement("canvas"),t=100;e.width=t,e.height=t;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,t,t);var n=new Image,B=e.toDataURL();n.src=B;var s=vr(t,t,0,0,n);return r.fillStyle="red",r.fillRect(0,0,t,t),Dr(s).then(function(e){r.drawImage(e,0,0);var n=r.getImageData(0,0,t,t).data;r.fillStyle="red",r.fillRect(0,0,t,t);var s=A.createElement("div");return s.style.backgroundImage="url("+B+")",s.style.height=t+"px",Lr(n)?Dr(vr(t,t,0,0,s)):Promise.reject(!1)}).then(function(A){return r.drawImage(A,0,0),Lr(r.getImageData(0,0,t,t).data)}).catch(function(){return!1})},vr=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},Dr=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))})},br={get SUPPORT_RANGE_BOUNDS(){var A=Ir(document);return Object.defineProperty(br,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=Rr(document);return Object.defineProperty(br,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?Or(document):Promise.resolve(!1);return Object.defineProperty(br,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=Tr();return Object.defineProperty(br,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A=mr();return Object.defineProperty(br,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(br,"SUPPORT_CORS_XHR",{value:A}),A}},Sr=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,t.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=br.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}(),_r=/^data:image\/svg\+xml/i,Pr=/^data:image\/.*;base64,/i,xr=/^data:image\/.*/i,Vr=function(A){return br.SUPPORT_SVG_DRAWING||!Gr(A)},zr=function(A){return xr.test(A)},Xr=function(A){return Pr.test(A)},Jr=function(A){return"blob"===A.substr(0,4)},Gr=function(A){return"svg"===A.substr(-3).toLowerCase()||_r.test(A)},kr=function(A){var e=Br(180),t=[],r=lr.LINEAR_GRADIENT,n=nn.CIRCLE,B=Bn.FARTHEST_CORNER,s=[];return Vt(A).forEach(function(A,e){var n=A[0];if(0===e){if(Mt(n)&&"linear"===n.value)return void(r=lr.LINEAR_GRADIENT);if(Mt(n)&&"radial"===n.value)return void(r=lr.RADIAL_GRADIENT)}if(n.type===l.FUNCTION)if("from"===n.name){var B=sr.parse(n.values[0]);t.push({stop:kt,color:B})}else if("to"===n.name){B=sr.parse(n.values[0]);t.push({stop:Yt,color:B})}else if("color-stop"===n.name){var s=n.values.filter(xt);if(2===s.length){B=sr.parse(s[1]);var o=s[0];St(o)&&t.push({stop:{type:l.PERCENTAGE_TOKEN,number:100*o.number,flags:o.flags},color:B})}}}),r===lr.LINEAR_GRADIENT?{angle:(e+Br(180))%Br(360),stops:t,type:r}:{size:B,shape:n,stops:t,position:s,type:r}},Wr="closest-side",Yr="farthest-side",qr="closest-corner",Zr="farthest-corner",jr="circle",$r="ellipse",An="cover",en="contain",tn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return Vt(A).forEach(function(A,B){var s=!0;if(0===B){var o=!1;s=A.reduce(function(A,r){if(o)if(Mt(r))switch(r.value){case"center":return n.push(Wt),A;case"top":case"left":return n.push(kt),A;case"right":case"bottom":return n.push(Yt),A}else(Jt(r)||Xt(r))&&n.push(r);else if(Mt(r))switch(r.value){case jr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case"at":return o=!0,!1;case Wr:return t=Bn.CLOSEST_SIDE,!1;case An:case Yr:return t=Bn.FARTHEST_SIDE,!1;case en:case qr:return t=Bn.CLOSEST_CORNER,!1;case Zr:return t=Bn.FARTHEST_CORNER,!1}else if(Xt(r)||Jt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)}if(s){var i=Er(A);r.push(i)}}),{size:t,shape:e,stops:r,position:n,type:lr.RADIAL_GRADIENT}},rn=function(A){var e=nn.CIRCLE,t=Bn.FARTHEST_CORNER,r=[],n=[];return Vt(A).forEach(function(A,B){var s=!0;if(0===B?s=A.reduce(function(A,e){if(Mt(e))switch(e.value){case"center":return n.push(Wt),!1;case"top":case"left":return n.push(kt),!1;case"right":case"bottom":return n.push(Yt),!1}else if(Jt(e)||Xt(e))return n.push(e),!1;return A},s):1===B&&(s=A.reduce(function(A,r){if(Mt(r))switch(r.value){case jr:return e=nn.CIRCLE,!1;case $r:return e=nn.ELLIPSE,!1;case en:case Wr:return t=Bn.CLOSEST_SIDE,!1;case Yr:return t=Bn.FARTHEST_SIDE,!1;case qr:return t=Bn.CLOSEST_CORNER,!1;case An:case Zr:return t=Bn.FARTHEST_CORNER,!1}else if(Xt(r)||Jt(r))return Array.isArray(t)||(t=[]),t.push(r),!1;return A},s)),s){var o=Er(A);r.push(o)}}),{size:t,shape:e,stops:r,position:n,type:lr.RADIAL_GRADIENT}};(function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"})(lr||(lr={}));var nn,Bn,sn=function(A){return A.type===lr.LINEAR_GRADIENT},on=function(A){return A.type===lr.RADIAL_GRADIENT};(function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"})(nn||(nn={})),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"}(Bn||(Bn={}));var an,cn={name:"image",parse:function(A){if(A.type===l.URL_TOKEN){var e={url:A.value,type:lr.URL};return Mr.getInstance().addImage(A.value),e}if(A.type===l.FUNCTION){var t=Qn[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")}},Qn={"linear-gradient":Nr,"-moz-linear-gradient":Kr,"-ms-linear-gradient":Kr,"-o-linear-gradient":Kr,"-webkit-linear-gradient":Kr,"radial-gradient":tn,"-moz-radial-gradient":rn,"-ms-radial-gradient":rn,"-o-radial-gradient":rn,"-webkit-radial-gradient":rn,"-webkit-gradient":kr},un={name:"background-image",initialValue:"none",type:GA.LIST,prefix:!1,parse:function(A){if(0===A.length)return[];var e=A[0];return e.type===l.IDENT_TOKEN&&"none"===e.value?[]:A.filter(function(A){return xt(A)&&n(A)}).map(cn.parse)}},wn={name:"background-origin",initialValue:"border-box",prefix:!1,type:GA.LIST,parse:function(A){return A.map(function(A){if(Mt(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Un={name:"background-position",initialValue:"0% 0%",type:GA.LIST,prefix:!1,parse:function(A){return Vt(A).map(function(A){return A.filter(Jt)}).map(Gt)}};(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"})(an||(an={}));var ln,Cn={name:"background-repeat",initialValue:"repeat",prefix:!1,type:GA.LIST,parse:function(A){return Vt(A).map(function(A){return A.filter(Mt).map(function(A){return A.value}).join(" ")}).map(gn)}},gn=function(A){switch(A){case"no-repeat":return an.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return an.REPEAT_X;case"repeat-y":case"no-repeat repeat":return an.REPEAT_Y;case"repeat":default:return an.REPEAT}};(function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"})(ln||(ln={}));var En,Fn={name:"background-size",initialValue:"0",prefix:!1,type:GA.LIST,parse:function(A){return Vt(A).map(function(A){return A.filter(hn)})}},hn=function(A){return Mt(A)||Jt(A)},Hn=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:GA.TYPE_VALUE,format:"color"}},dn=Hn("top"),fn=Hn("right"),pn=Hn("bottom"),Nn=Hn("left"),Kn=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:GA.LIST,parse:function(A){return Gt(A.filter(Jt))}}},In=Kn("top-left"),Tn=Kn("top-right"),mn=Kn("bottom-right"),Rn=Kn("bottom-left");(function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID"})(En||(En={}));var Ln,On=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"none":return En.NONE}return En.SOLID}}},vn=On("top"),Dn=On("right"),bn=On("bottom"),Sn=On("left"),Mn=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:GA.VALUE,prefix:!1,parse:function(A){return bt(A)?A.number:0}}},yn=Mn("top"),_n=Mn("right"),Pn=Mn("bottom"),xn=Mn("left"),Vn={name:"color",initialValue:"transparent",prefix:!1,type:GA.TYPE_VALUE,format:"color"},zn={name:"display",initialValue:"inline-block",prefix:!1,type:GA.LIST,parse:function(A){return A.filter(Mt).reduce(function(A,e){return A|Xn(e.value)},0)}},Xn=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"})(Ln||(Ln={}));var Jn,Gn={name:"float",initialValue:"none",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"left":return Ln.LEFT;case"right":return Ln.RIGHT;case"inline-start":return Ln.INLINE_START;case"inline-end":return Ln.INLINE_END}return Ln.NONE}},kn={name:"letter-spacing",initialValue:"0",prefix:!1,type:GA.VALUE,parse:function(A){return A.type===l.IDENT_TOKEN&&"normal"===A.value?0:A.type===l.NUMBER_TOKEN?A.number:A.type===l.DIMENSION_TOKEN?A.number:0}};(function(A){A.NORMAL="normal",A.STRICT="strict"})(Jn||(Jn={}));var Wn,Yn={name:"line-break",initialValue:"normal",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"strict":return Jn.STRICT;case"normal":default:return Jn.NORMAL}}},qn={name:"line-height",initialValue:"normal",prefix:!1,type:GA.TOKEN_VALUE},Zn=function(A,e){return Mt(A)&&"normal"===A.value?1.2*e:A.type===l.NUMBER_TOKEN?e*A.number:Jt(A)?Zt(A,e):e},jn={name:"list-style-image",initialValue:"none",type:GA.VALUE,prefix:!1,parse:function(A){return A.type===l.IDENT_TOKEN&&"none"===A.value?null:cn.parse(A)}};(function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"})(Wn||(Wn={}));var $n,AB={name:"list-style-position",initialValue:"outside",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"inside":return Wn.INSIDE;case"outside":default:return Wn.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"})($n||($n={}));var eB,tB={name:"list-style-type",initialValue:"none",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"disc":return $n.DISC;case"circle":return $n.CIRCLE;case"square":return $n.SQUARE;case"decimal":return $n.DECIMAL;case"cjk-decimal":return $n.CJK_DECIMAL;case"decimal-leading-zero":return $n.DECIMAL_LEADING_ZERO;case"lower-roman":return $n.LOWER_ROMAN;case"upper-roman":return $n.UPPER_ROMAN;case"lower-greek":return $n.LOWER_GREEK;case"lower-alpha":return $n.LOWER_ALPHA;case"upper-alpha":return $n.UPPER_ALPHA;case"arabic-indic":return $n.ARABIC_INDIC;case"armenian":return $n.ARMENIAN;case"bengali":return $n.BENGALI;case"cambodian":return $n.CAMBODIAN;case"cjk-earthly-branch":return $n.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return $n.CJK_HEAVENLY_STEM;case"cjk-ideographic":return $n.CJK_IDEOGRAPHIC;case"devanagari":return $n.DEVANAGARI;case"ethiopic-numeric":return $n.ETHIOPIC_NUMERIC;case"georgian":return $n.GEORGIAN;case"gujarati":return $n.GUJARATI;case"gurmukhi":return $n.GURMUKHI;case"hebrew":return $n.HEBREW;case"hiragana":return $n.HIRAGANA;case"hiragana-iroha":return $n.HIRAGANA_IROHA;case"japanese-formal":return $n.JAPANESE_FORMAL;case"japanese-informal":return $n.JAPANESE_INFORMAL;case"kannada":return $n.KANNADA;case"katakana":return $n.KATAKANA;case"katakana-iroha":return $n.KATAKANA_IROHA;case"khmer":return $n.KHMER;case"korean-hangul-formal":return $n.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return $n.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return $n.KOREAN_HANJA_INFORMAL;case"lao":return $n.LAO;case"lower-armenian":return $n.LOWER_ARMENIAN;case"malayalam":return $n.MALAYALAM;case"mongolian":return $n.MONGOLIAN;case"myanmar":return $n.MYANMAR;case"oriya":return $n.ORIYA;case"persian":return $n.PERSIAN;case"simp-chinese-formal":return $n.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return $n.SIMP_CHINESE_INFORMAL;case"tamil":return $n.TAMIL;case"telugu":return $n.TELUGU;case"thai":return $n.THAI;case"tibetan":return $n.TIBETAN;case"trad-chinese-formal":return $n.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return $n.TRAD_CHINESE_INFORMAL;case"upper-armenian":return $n.UPPER_ARMENIAN;case"disclosure-open":return $n.DISCLOSURE_OPEN;case"disclosure-closed":return $n.DISCLOSURE_CLOSED;case"none":default:return $n.NONE}}},rB=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:GA.TOKEN_VALUE}},nB=rB("top"),BB=rB("right"),sB=rB("bottom"),oB=rB("left");(function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.AUTO=3]="AUTO"})(eB||(eB={}));var iB,aB={name:"overflow",initialValue:"visible",prefix:!1,type:GA.LIST,parse:function(A){return A.filter(Mt).map(function(A){switch(A.value){case"hidden":return eB.HIDDEN;case"scroll":return eB.SCROLL;case"auto":return eB.AUTO;case"visible":default:return eB.VISIBLE}})}};(function(A){A.NORMAL="normal",A.BREAK_WORD="break-word"})(iB||(iB={}));var cB,QB={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"break-word":return iB.BREAK_WORD;case"normal":default:return iB.NORMAL}}},uB=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:GA.TYPE_VALUE,format:"length-percentage"}},wB=uB("top"),UB=uB("right"),lB=uB("bottom"),CB=uB("left");(function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"})(cB||(cB={}));var gB,EB={name:"text-align",initialValue:"left",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"right":return cB.RIGHT;case"center":case"justify":return cB.CENTER;case"left":default:return cB.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"})(gB||(gB={}));var FB,hB={name:"position",initialValue:"static",prefix:!1,type:GA.IDENT_VALUE,parse:function(A){switch(A){case"relative":return gB.RELATIVE;case"absolute":return gB.ABSOLUTE;case"fixed":return gB.FIXED;case"sticky":return gB.STICKY}return gB.STATIC}},HB={name:"text-shadow",initialValue:"none",type:GA.LIST,prefix:!1,parse:function(A){return 1===A.length&&_t(A[0],"none")?[]:Vt(A).map(function(A){for(var e={color:Ur.TRANSPARENT,offsetX:kt,offsetY:kt,blur:kt},t=0,r=0;r1?1:0],this.overflowWrap=ts(QB,A.overflowWrap),this.paddingTop=ts(wB,A.paddingTop),this.paddingRight=ts(UB,A.paddingRight),this.paddingBottom=ts(lB,A.paddingBottom),this.paddingLeft=ts(CB,A.paddingLeft),this.position=ts(hB,A.position),this.textAlign=ts(EB,A.textAlign),this.textDecorationColor=ts(MB,A.textDecorationColor||A.color),this.textDecorationLine=ts(yB,A.textDecorationLine),this.textShadow=ts(HB,A.textShadow),this.textTransform=ts(fB,A.textTransform),this.transform=ts(pB,A.transform),this.transformOrigin=ts(RB,A.transformOrigin),this.visibility=ts(OB,A.visibility),this.wordBreak=ts(DB,A.wordBreak),this.zIndex=ts(bB,A.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===dB.VISIBLE},A.prototype.isTransparent=function(){return or(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==gB.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==Ln.NONE},A.prototype.isInlineLevel=function(){return GB(this.display,4)||GB(this.display,33554432)||GB(this.display,268435456)||GB(this.display,536870912)||GB(this.display,67108864)||GB(this.display,134217728)},A}(),As=function(){function A(A){this.content=ts(kB,A.content),this.quotes=ts(qB,A.quotes)}return A}(),es=function(){function A(A){this.counterIncrement=ts(WB,A.counterIncrement),this.counterReset=ts(YB,A.counterReset)}return A}(),ts=function(A,e){var t=new vt,r=null!=e?e.toString():A.initialValue;t.write(r);var n=new Dt(t.read());switch(A.type){case GA.IDENT_VALUE:var B=n.parseComponentValue();return A.parse(Mt(B)?B.value:A.initialValue);case GA.VALUE:return A.parse(n.parseComponentValue());case GA.LIST:return A.parse(n.parseComponentValues());case GA.TOKEN_VALUE:return n.parseComponentValue();case GA.TYPE_VALUE:switch(A.format){case"angle":return tr.parse(n.parseComponentValue());case"color":return sr.parse(n.parseComponentValue());case"image":return cn.parse(n.parseComponentValue());case"length":var s=n.parseComponentValue();return Xt(s)?s:kt;case"length-percentage":var o=n.parseComponentValue();return Jt(o)?o:kt}}throw new Error("Attempting to parse unsupported css format type "+A.format)},rs=function(){function A(A){this.styles=new $B(window.getComputedStyle(A,null)),this.textNodes=[],this.elements=[],null!==this.styles.transform&&Ps(A)&&(A.style.transform="none"),this.bounds=i(A),this.flags=0}return A}(),ns=function(){function A(A,e){this.text=A,this.bounds=e}return A}(),Bs=function(A,e,t){var r=is(A,e),n=[],B=0;return r.forEach(function(A){if(e.textDecorationLine.length||A.trim().length>0)if(br.SUPPORT_RANGE_BOUNDS)n.push(new ns(A,os(t,B,A.length)));else{var r=t.splitText(A.length);n.push(new ns(A,ss(t))),t=r}else br.SUPPORT_RANGE_BOUNDS||(t=t.splitText(A.length));B+=A.length}),n},ss=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=i(t);return t.firstChild&&r.replaceChild(t.firstChild,t),n}}return new o(0,0,0,0)},os=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),o.fromClientRect(n.getBoundingClientRect())},is=function(A,e){return 0!==e.letterSpacing?c(A).map(function(A){return Q(A)}):as(A,e)},as=function(A,e){for(var t,r=JA(A,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap===iB.BREAK_WORD?"break-word":e.wordBreak}),n=[];!(t=r.next()).done;)t.value&&n.push(t.value.slice());return n},cs=function(){function A(A,e){this.text=Qs(A.data,e.textTransform),this.textBounds=Bs(this.text,e,A)}return A}(),Qs=function(A,e){switch(e){case FB.LOWERCASE:return A.toLowerCase();case FB.CAPITALIZE:return A.replace(us,ws);case FB.UPPERCASE:return A.toUpperCase();default:return A}},us=/(^|\s|:|-|\(|\))([a-z])/g,ws=function(A,e,t){return A.length>0?e+t.toUpperCase():A},Us=function(e){function t(A){var t=e.call(this,A)||this;return t.src=A.currentSrc||A.src,t.intrinsicWidth=A.naturalWidth,t.intrinsicHeight=A.naturalHeight,Mr.getInstance().addImage(t.src),t}return A(t,e),t}(rs),ls=function(e){function t(A){var t=e.call(this,A)||this;return t.canvas=A,t.intrinsicWidth=A.width,t.intrinsicHeight=A.height,t}return A(t,e),t}(rs),Cs=function(e){function t(A){var t=e.call(this,A)||this,r=new XMLSerializer;return t.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(A)),t.intrinsicWidth=A.width.baseVal.value,t.intrinsicHeight=A.height.baseVal.value,Mr.getInstance().addImage(t.svg),t}return A(t,e),t}(rs),gs=function(e){function t(A){var t=e.call(this,A)||this;return t.value=A.value,t}return A(t,e),t}(rs),Es=function(e){function t(A){var t=e.call(this,A)||this;return t.start=A.start,t.reversed="boolean"==typeof A.reversed&&!0===A.reversed,t}return A(t,e),t}(rs),Fs=[{type:l.DIMENSION_TOKEN,flags:0,unit:"px",number:3}],hs=[{type:l.PERCENTAGE_TOKEN,flags:0,number:50}],Hs=function(A){return A.width>A.height?new o(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width0)e.textNodes.push(new cs(r,e.styles));else if(_s(r)){var B=Ds(r);B.styles.isVisible()&&(Ss(r,B,t)?B.flags|=4:Ms(B.styles)&&(B.flags|=2),-1!==Os.indexOf(r.tagName)&&(B.flags|=8),e.elements.push(B),$s(r)||Gs(r)||Ao(r)||vs(r,B,t))}},Ds=function(A){return Ys(A)?new Us(A):Ws(A)?new ls(A):Gs(A)?new Cs(A):Vs(A)?new gs(A):zs(A)?new Es(A):Xs(A)?new Is(A):Ao(A)?new Ts(A):$s(A)?new ms(A):qs(A)?new Ls(A):new rs(A)},bs=function(A){var e=Ds(A);return e.flags|=4,vs(A,e,e),e},Ss=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||ks(A)&&t.styles.isTransparent()},Ms=function(A){return A.isPositioned()||A.isFloating()},ys=function(A){return A.nodeType===Node.TEXT_NODE},_s=function(A){return A.nodeType===Node.ELEMENT_NODE},Ps=function(A){return void 0!==A.style},xs=function(A){return"object"==typeof A.className},Vs=function(A){return"LI"===A.tagName},zs=function(A){return"OL"===A.tagName},Xs=function(A){return"INPUT"===A.tagName},Js=function(A){return"HTML"===A.tagName},Gs=function(A){return"svg"===A.tagName},ks=function(A){return"BODY"===A.tagName},Ws=function(A){return"CANVAS"===A.tagName},Ys=function(A){return"IMG"===A.tagName},qs=function(A){return"IFRAME"===A.tagName},Zs=function(A){return"STYLE"===A.tagName},js=function(A){return"SCRIPT"===A.tagName},$s=function(A){return"TEXTAREA"===A.tagName},Ao=function(A){return"SELECT"===A.tagName},eo=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}(),to={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"]},ro={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},no={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Bo={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},so=function(A,e,t,r,n,B){return At?Fo(A,n,B.length>0):r.integers.reduce(function(e,t,n){for(;A>=t;)A-=t,e+=r.values[n];return e},"")+B},oo=function(A,e,t,r){var n="";do{t||A--,n=r(A)+n,A/=e}while(A*e>=e);return n},io=function(A,e,t,r,n){var B=t-e+1;return(A<0?"-":"")+(oo(Math.abs(A),B,r,function(A){return Q(Math.floor(A%B)+e)})+n)},ao=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return oo(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},co=1,Qo=2,uo=4,wo=8,Uo=function(A,e,t,r,n,B){if(A<-9999||A>9999)return Fo(A,$n.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&&GB(B,co)&&""!==o?o=e[a]+o:a>1||1===a&&0===i||1===a&&1===i&&GB(B,Qo)||1===a&&1===i&&GB(B,uo)&&A>100||1===a&&i>1&&GB(B,wo)?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},lo="十百千萬",Co="拾佰仟萬",go="マイナス",Eo="마이너스",Fo=function(A,e,t){var r=t?". ":"",n=t?"、":"",B=t?", ":"",s=t?" ":"";switch(e){case $n.DISC:return"•"+s;case $n.CIRCLE:return"◦"+s;case $n.SQUARE:return"◾"+s;case $n.DECIMAL_LEADING_ZERO:var o=io(A,48,57,!0,r);return o.length<4?"0"+o:o;case $n.CJK_DECIMAL:return ao(A,"〇一二三四五六七八九",n);case $n.LOWER_ROMAN:return so(A,1,3999,to,$n.DECIMAL,r).toLowerCase();case $n.UPPER_ROMAN:return so(A,1,3999,to,$n.DECIMAL,r);case $n.LOWER_GREEK:return io(A,945,969,!1,r);case $n.LOWER_ALPHA:return io(A,97,122,!1,r);case $n.UPPER_ALPHA:return io(A,65,90,!1,r);case $n.ARABIC_INDIC:return io(A,1632,1641,!0,r);case $n.ARMENIAN:case $n.UPPER_ARMENIAN:return so(A,1,9999,ro,$n.DECIMAL,r);case $n.LOWER_ARMENIAN:return so(A,1,9999,ro,$n.DECIMAL,r).toLowerCase();case $n.BENGALI:return io(A,2534,2543,!0,r);case $n.CAMBODIAN:case $n.KHMER:return io(A,6112,6121,!0,r);case $n.CJK_EARTHLY_BRANCH:return ao(A,"子丑寅卯辰巳午未申酉戌亥",n);case $n.CJK_HEAVENLY_STEM:return ao(A,"甲乙丙丁戊己庚辛壬癸",n);case $n.CJK_IDEOGRAPHIC:case $n.TRAD_CHINESE_INFORMAL:return Uo(A,"零一二三四五六七八九",lo,"負",n,Qo|uo|wo);case $n.TRAD_CHINESE_FORMAL:return Uo(A,"零壹貳參肆伍陸柒捌玖",Co,"負",n,co|Qo|uo|wo);case $n.SIMP_CHINESE_INFORMAL:return Uo(A,"零一二三四五六七八九",lo,"负",n,Qo|uo|wo);case $n.SIMP_CHINESE_FORMAL:return Uo(A,"零壹贰叁肆伍陆柒捌玖",Co,"负",n,co|Qo|uo|wo);case $n.JAPANESE_INFORMAL:return Uo(A,"〇一二三四五六七八九","十百千万",go,n,0);case $n.JAPANESE_FORMAL:return Uo(A,"零壱弐参四伍六七八九","拾百千万",go,n,co|Qo|uo);case $n.KOREAN_HANGUL_FORMAL:return Uo(A,"영일이삼사오육칠팔구","십백천만",Eo,B,co|Qo|uo);case $n.KOREAN_HANJA_INFORMAL:return Uo(A,"零一二三四五六七八九","十百千萬",Eo,B,0);case $n.KOREAN_HANJA_FORMAL:return Uo(A,"零壹貳參四五六七八九","拾百千",Eo,B,co|Qo|uo);case $n.DEVANAGARI:return io(A,2406,2415,!0,r);case $n.GEORGIAN:return so(A,1,19999,Bo,$n.DECIMAL,r);case $n.GUJARATI:return io(A,2790,2799,!0,r);case $n.GURMUKHI:return io(A,2662,2671,!0,r);case $n.HEBREW:return so(A,1,10999,no,$n.DECIMAL,r);case $n.HIRAGANA:return ao(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case $n.HIRAGANA_IROHA:return ao(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case $n.KANNADA:return io(A,3302,3311,!0,r);case $n.KATAKANA:return ao(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case $n.KATAKANA_IROHA:return ao(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case $n.LAO:return io(A,3792,3801,!0,r);case $n.MONGOLIAN:return io(A,6160,6169,!0,r);case $n.MYANMAR:return io(A,4160,4169,!0,r);case $n.ORIYA:return io(A,2918,2927,!0,r);case $n.PERSIAN:return io(A,1776,1785,!0,r);case $n.TAMIL:return io(A,3046,3055,!0,r);case $n.TELUGU:return io(A,3174,3183,!0,r);case $n.THAI:return io(A,3664,3673,!0,r);case $n.TIBETAN:return io(A,3872,3881,!0,r);case $n.DECIMAL:default:return io(A,48,57,!0,r)}},ho="data-html2canvas-ignore",Ho=function(){function A(A,e){if(this.options=e,this.scrolledElements=[],this.referenceElement=A,this.counters=new eo,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,r){var n=this,B=po(A,r);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=No(B).then(function(){return e(n,void 0,void 0,function(){var A;return t(this,function(e){switch(e.label){case 0:return this.scrolledElements.forEach(mo),i&&(i.scrollTo(r.left,r.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===r.top&&i.scrollX===r.left||(a.documentElement.style.top=-r.top+"px",a.documentElement.style.left=-r.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:e.sent(),e.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(Io(document.doctype)+""),To(this.referenceElement.ownerDocument,s,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),c},A.prototype.createElementClone=function(A){return Ws(A)?this.createCanvasClone(A):Zs(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(Sr.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){Sr.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(ys(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(Ps(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),ks(t)&&bo(t);for(var s=this.counters.parse(new es(r)),o=this.resolvePseudoContent(A,t,n,XB.BEFORE),i=A.firstChild;i;i=i.nextSibling)_s(i)&&(js(i)||i.hasAttribute(ho)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&_s(i)&&Zs(i)||t.appendChild(this.cloneNode(i));o&&t.insertBefore(o,t.firstChild);var a=this.resolvePseudoContent(A,t,B,XB.AFTER);return a&&t.appendChild(a),this.counters.pop(s),r&&this.options.copyStyles&&!qs(A)&&Ko(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),($s(A)||Ao(A))&&($s(t)||Ao(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 es(t));var o=new As(t),i=s.createElement("html2canvaspseudoelement");Ko(t,i),o.content.forEach(function(e){if(e.type===l.STRING_TOKEN)i.appendChild(s.createTextNode(e.value));else if(e.type===l.URL_TOKEN){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(e.type===l.FUNCTION){if("attr"===e.name){var r=e.values.filter(Mt);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var B=e.values.filter(xt),a=B[0],c=B[1];if(a&&Mt(a)){var Q=n.counters.getCounterValue(a.value),u=c&&Mt(c)?tB.parse(c.value):$n.DECIMAL;i.appendChild(s.createTextNode(Fo(Q,u,!1)))}}else if("counters"===e.name){var w=e.values.filter(xt),U=(a=w[0],w[1]);c=w[2];if(a&&Mt(a)){var C=n.counters.getCounterValues(a.value),g=c&&Mt(c)?tB.parse(c.value):$n.DECIMAL,E=U&&U.type===l.STRING_TOKEN?U.value:"",F=C.map(function(A){return Fo(A,g,!1)}).join(E);i.appendChild(s.createTextNode(F))}}}else if(e.type===l.IDENT_TOKEN)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(ZB(o.quotes,n.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(ZB(o.quotes,--n.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}}),i.className=Oo+" "+vo;var a=r===XB.BEFORE?" "+Oo:" "+vo;return xs(e)?e.className.baseValue+=a:e.className+=a,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"})(XB||(XB={}));var fo,po=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(ho,"true"),A.body.appendChild(t),t},No=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)}})},Ko=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},Io=function(A){var e="";return A&&(e+=""),e},To=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},mo=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},Ro=":before",Lo=":after",Oo="___html2canvas___pseudoelement_before",vo="___html2canvas___pseudoelement_after",Do='{\n content: "" !important;\n display: none !important;\n}',bo=function(A){So(A,"."+Oo+Ro+Do+"\n ."+vo+Lo+Do)},So=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"})(fo||(fo={}));var Mo,yo=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},_o=function(A,e,t,r,n){return A.map(function(A,B){switch(B){case 0:return A.add(e,t);case 1:return A.add(e+r,t);case 2:return A.add(e+r,t+n);case 3:return A.add(e,t+n)}return A})},Po=function(){function A(A,e){this.type=fo.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),xo=function(A,e,t){return new Po(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Vo=function(){function A(A,e,t,r){this.type=fo.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=xo(this.start,this.startControl,e),n=xo(this.startControl,this.endControl,e),B=xo(this.endControl,this.end,e),s=xo(r,n,e),o=xo(n,B,e),i=xo(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}(),zo=function(A){return A.type===fo.BEZIER_CURVE},Xo=function(){function A(A){var e=A.styles,t=A.bounds,r=qt(e.borderTopLeftRadius,t.width,t.height),n=r[0],B=r[1],s=qt(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],a=qt(e.borderBottomRightRadius,t.width,t.height),c=a[0],Q=a[1],u=qt(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=Zt(e.paddingTop,A.bounds.width),K=Zt(e.paddingRight,A.bounds.width),I=Zt(e.paddingBottom,A.bounds.width),T=Zt(e.paddingLeft,A.bounds.width);this.topLeftBorderBox=n>0||B>0?Jo(t.left,t.top,n,B,Mo.TOP_LEFT):new Po(t.left,t.top),this.topRightBorderBox=o>0||i>0?Jo(t.left+g,t.top,o,i,Mo.TOP_RIGHT):new Po(t.left+t.width,t.top),this.bottomRightBorderBox=c>0||Q>0?Jo(t.left+F,t.top+E,c,Q,Mo.BOTTOM_RIGHT):new Po(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=w>0||U>0?Jo(t.left,t.top+h,w,U,Mo.BOTTOM_LEFT):new Po(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||B>0?Jo(t.left+p,t.top+H,Math.max(0,n-p),Math.max(0,B-H),Mo.TOP_LEFT):new Po(t.left+p,t.top+H),this.topRightPaddingBox=o>0||i>0?Jo(t.left+Math.min(g,t.width+p),t.top+H,g>t.width+p?0:o-p,i-H,Mo.TOP_RIGHT):new Po(t.left+t.width-d,t.top+H),this.bottomRightPaddingBox=c>0||Q>0?Jo(t.left+Math.min(F,t.width-p),t.top+Math.min(E,t.height+H),Math.max(0,c-d),Q-f,Mo.BOTTOM_RIGHT):new Po(t.left+t.width-d,t.top+t.height-f),this.bottomLeftPaddingBox=w>0||U>0?Jo(t.left+p,t.top+h,Math.max(0,w-p),U-f,Mo.BOTTOM_LEFT):new Po(t.left+p,t.top+t.height-f),this.topLeftContentBox=n>0||B>0?Jo(t.left+p+T,t.top+H+N,Math.max(0,n-(p+T)),Math.max(0,B-(H+N)),Mo.TOP_LEFT):new Po(t.left+p+T,t.top+H+N),this.topRightContentBox=o>0||i>0?Jo(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),Mo.TOP_RIGHT):new Po(t.left+t.width-(d+K),t.top+H+N),this.bottomRightContentBox=c>0||Q>0?Jo(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),Mo.BOTTOM_RIGHT):new Po(t.left+t.width-(d+K),t.top+t.height-(f+I)),this.bottomLeftContentBox=w>0||U>0?Jo(t.left+p+T,t.top+h,Math.max(0,w-(p+T)),U-(f+I),Mo.BOTTOM_LEFT):new Po(t.left+p+T,t.top+t.height-(f+I))}return A}();(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"})(Mo||(Mo={}));var Jo=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 Mo.TOP_LEFT:return new Vo(new Po(A,a),new Po(A,a-o),new Po(i-s,e),new Po(i,e));case Mo.TOP_RIGHT:return new Vo(new Po(A,e),new Po(A+s,e),new Po(i,a-o),new Po(i,a));case Mo.BOTTOM_RIGHT:return new Vo(new Po(i,e),new Po(i,e+o),new Po(A+s,a),new Po(A,a));case Mo.BOTTOM_LEFT:default:return new Vo(new Po(i,a),new Po(i-s,a),new Po(A,e+o),new Po(A,e))}},Go=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},ko=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},Wo=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},Yo=function(){function A(A,e,t){this.type=0,this.offsetX=A,this.offsetY=e,this.matrix=t,this.target=6}return A}(),qo=function(){function A(A,e){this.type=1,this.target=e,this.path=A}return A}(),Zo=function(A){return 0===A.type},jo=function(A){return 1===A.type},$o=function(){function A(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),Ai=function(){function A(A,e){if(this.container=A,this.effects=e.slice(0),this.curves=new Xo(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 Yo(t,r,n))}if(A.styles.overflowX!==eB.VISIBLE){var B=Go(this.curves),s=Wo(this.curves);yo(B,s)?this.effects.push(new qo(B,6)):(this.effects.push(new qo(B,2)),this.effects.push(new qo(s,4)))}}return A.prototype.getParentEffects=function(){var A=this.effects.slice(0);if(this.container.styles.overflowX!==eB.VISIBLE){var e=Go(this.curves),t=Wo(this.curves);yo(e,t)||A.push(new qo(t,6))}return A},A}(),ei=function(A,e,t,r){A.container.elements.forEach(function(n){var B=GB(n.flags,4),s=GB(n.flags,2),o=new Ai(n,A.getParentEffects());GB(n.styles.display,2048)&&r.push(o);var i=GB(n.flags,8)?[]:r;if(B||s){var a=B||n.styles.isPositioned()?t:e,c=new $o(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);ei(o,c,B?c:t,i)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),ei(o,e,t,i);GB(n.flags,8)&&ti(n,i)})},ti=function(A,e){for(var t=A instanceof Es?A.start:1,r=A instanceof Es&&A.reversed,n=0;n-1===A.indexOf(" ")?A:`"${A}"`).join(", ");var r=bt(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,e,A.fontWeight,r,t].join(" "),t,r]},A.prototype.renderTextNode=function(A,r){return e(this,void 0,void 0,function(){var e,n,B,s,o=this;return t(this,function(t){return e=this.createFontStyle(r),n=e[0],B=e[1],s=e[2],this.ctx.font=n,A.textBounds.forEach(function(A){o.ctx.fillStyle=ir(r.color),o.renderTextWithLetterSpacing(A,r.letterSpacing);var e=r.textShadow;e.length&&A.text.trim().length&&(e.slice(0).reverse().forEach(function(e){o.ctx.shadowColor=ir(e.color),o.ctx.shadowOffsetX=e.offsetX.number*o.options.scale,o.ctx.shadowOffsetY=e.offsetY.number*o.options.scale,o.ctx.shadowBlur=e.blur.number,o.ctx.fillText(A.text,A.bounds.left,A.bounds.top+A.bounds.height)}),o.ctx.shadowColor="",o.ctx.shadowOffsetX=0,o.ctx.shadowOffsetY=0,o.ctx.shadowBlur=0),r.textDecorationLine.length&&(o.ctx.fillStyle=ir(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(e){switch(e){case 1:var t=o.fontMetrics.getMetrics(B,s).baseline;o.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top+t),A.bounds.width,1);break;case 2:o.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1);break;case 3:var r=o.fontMetrics.getMetrics(B,s).middle;o.ctx.fillRect(A.bounds.left,Math.ceil(A.bounds.top+r),A.bounds.width,1)}}))}),[2]})})},A.prototype.renderReplacedElement=function(A,e,t){if(t&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var r=oi(A),n=Wo(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(r){return e(this,void 0,void 0,function(){var e,n,B,s,i,a,c,Q,u,w,U,l,C,g,E;return t(this,function(t){switch(t.label){case 0:this.applyEffects(r.effects,4),e=r.container,n=r.curves,B=e.styles,s=0,i=e.textNodes,t.label=1;case 1:return s0&&p>0&&(E=n.ctx.createPattern(l,"repeat"),n.renderRepeat(h,E,K,I))):on(r)&&(F=ci(A,e,[null,null,null]),h=F[0],H=F[1],d=F[2],f=F[3],p=F[4],N=0===r.position.length?[Wt]:r.position,K=Zt(N[0],f),I=Zt(N[N.length-1],p),T=pr(r,K,I,f,p),m=T[0],R=T[1],m>0&&m>0&&(L=n.ctx.createRadialGradient(H+K,d+I,0,H+K,d+I,m),Fr(r.stops,2*m).forEach(function(A){return L.addColorStop(A.stop,ir(A.color))}),n.path(h),n.ctx.fillStyle=L,m!==R?(O=A.bounds.left+.5*A.bounds.width,v=A.bounds.top+.5*A.bounds.height,D=R/m,b=1/D,n.ctx.save(),n.ctx.translate(O,v),n.ctx.transform(1,0,0,D,0,0),n.ctx.translate(-O,-v),n.ctx.fillRect(H,b*(d-v)+v,f,p*b),n.ctx.restore()):n.ctx.fill())),t.label=6;case 6:return e--,[2]}})},n=this,B=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return B+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0")[0],g=l.each;function x(r){return null==r?r+"":"object"==typeof r?t[n.call(r)]||"object":typeof r}function y(r,n,t){var e=b[n.type]||{};return null==r?t||!n.def?null:n.def:(r=e.floor?~~r:parseFloat(r),isNaN(r)?n.def:e.mod?(r+e.mod)%e.mod:Math.min(e.max,Math.max(0,r)))}function s(i){var s=d(),u=s._rgba=[];return i=i.toLowerCase(),g(r,function(r,n){var t,e=n.re.exec(i),o=e&&n.parse(e),a=n.space||"rgba";if(o)return t=s[a](o),s[h[a].cache]=t[h[a].cache],u=s._rgba=t._rgba,!1}),u.length?("0,0,0,0"===u.join()&&l.extend(u,c.transparent),s):c[i]}function u(r,n,t){return 6*(t=(t+1)%1)<1?r+(n-r)*t*6:2*t<1?n:3*t<2?r+(n-r)*(2/3-t)*6:r}e.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=-1n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); \ No newline at end of file From 225d6d14bf42f8ebe9c81f7c1c4ac514a4dd2edd Mon Sep 17 00:00:00 2001 From: Marco Pagani Date: Wed, 18 Nov 2020 10:28:11 -0500 Subject: [PATCH 3/9] fixed import statement for jquery --- src/js/global-dependencies.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index 635cebe07..6d2794032 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,8 +1,6 @@ // this file should be concatenated at the top of the legacy js files -// this refuses to work with ES6 syntax, TODO -var $, jQuery; -$ = jQuery = require("jquery"); +import $ from "jquery"; import "jquery-color"; import "jquery-easing"; import "jquery.cookie"; From f3274c22b3566414d7023cb1fd938b2a7b77d627 Mon Sep 17 00:00:00 2001 From: Marco Pagani Date: Tue, 17 Nov 2020 23:30:37 -0500 Subject: [PATCH 4/9] converted moment to external dependency --- gulpfile.js | 9 +- package.json | 5 +- src/js/global-dependencies.js | 4 +- static/index.html | 6012 +++++++++++++++------------------ static/js/moment.min.js | 2 - 5 files changed, 2740 insertions(+), 3292 deletions(-) delete mode 100644 static/js/moment.min.js diff --git a/gulpfile.js b/gulpfile.js index 5b0b491e2..8e2f85e14 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,14 +12,7 @@ sass.compiler = require("dart-sass"); let eslintConfig = { parser: "babel-eslint", - globals: [ - "jQuery", - "$", - "firebase", - "moment", - "html2canvas", - "ClipboardItem", - ], + globals: ["jQuery", "$", "firebase", "html2canvas", "ClipboardItem"], envs: ["es6", "browser", "node"], rules: { "constructor-super": "error", diff --git a/package.json b/package.json index 35d9c14af..061174e45 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "deploy:live": "npm run build && firebase deploy -P live" }, "engines": { - "node": "10" + "node": ">=10" }, "devDependencies": { "@babel/core": "^7.12.3", @@ -45,6 +45,7 @@ "@babel/runtime": "^7.12.5", "chart.js": "^2.9.4", "chartjs-plugin-annotation": "^0.5.7", - "chartjs-plugin-trendline": "^0.2.2" + "chartjs-plugin-trendline": "^0.2.2", + "moment": "^2.29.1" } } diff --git a/src/js/global-dependencies.js b/src/js/global-dependencies.js index 1d699615f..bcc034777 100644 --- a/src/js/global-dependencies.js +++ b/src/js/global-dependencies.js @@ -1,9 +1,11 @@ -//this file should be concatenated at the top of the legacy js files +// this file should be concatenated at the top of the legacy js files import Chart from "chart.js"; import chartTrendline from "chartjs-plugin-trendline"; import chartAnnotation from "chartjs-plugin-annotation"; +import moment from "moment"; + Chart.plugins.register(chartTrendline); Chart.plugins.register(chartAnnotation); diff --git a/static/index.html b/static/index.html index 75fb3db43..872feee20 100644 --- a/static/index.html +++ b/static/index.html @@ -1,807 +1,781 @@ - - - - Monkeytype - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + Monkeytype + + + + + + + + + + + + + + + + + + + + + + + + + + + -
Signed in
+ "> + Important information about your account. Please click this message. +
+
Signed in
- + -