@kne-components/react-file 0.1.35 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +22 -20
- package/build/index.html +1 -1
- package/build/remoteEntry.js +1 -1
- package/build/remoteEntry.js.map +1 -1
- package/build/static/css/{511.901a4718.chunk.css → 776.e7e6d018.chunk.css} +2 -2
- package/build/static/css/776.e7e6d018.chunk.css.map +1 -0
- package/build/static/js/151.b276c881.chunk.js +3 -0
- package/build/static/js/151.b276c881.chunk.js.map +1 -0
- package/build/static/js/258.b3ee8f02.chunk.js +2 -0
- package/build/static/js/258.b3ee8f02.chunk.js.map +1 -0
- package/build/static/js/{72.4bacf538.chunk.js → 72.5c6903b0.chunk.js} +2 -2
- package/build/static/js/{72.4bacf538.chunk.js.map → 72.5c6903b0.chunk.js.map} +1 -1
- package/build/static/js/776.d98d1437.chunk.js +9 -0
- package/build/static/js/776.d98d1437.chunk.js.map +1 -0
- package/build/static/js/{784.bb2153da.chunk.js → 784.aeeb864e.chunk.js} +2 -2
- package/build/static/js/{784.bb2153da.chunk.js.map → 784.aeeb864e.chunk.js.map} +1 -1
- package/build/static/js/872.a5a26e7d.chunk.js +2 -0
- package/build/static/js/872.a5a26e7d.chunk.js.map +1 -0
- package/build/static/js/main.caa69af7.js +2 -0
- package/build/static/js/main.caa69af7.js.map +1 -0
- package/build/static/media/check~elxgVvVe.d6bb9a199bf3a5853749ecea3ce6a127.svg +3 -0
- package/build/static/media/collapse~vphRLfPi.378d83c01100d172e79c04ba3179be58.svg +6 -0
- package/build/static/media/copy~drOLfxzP.5880fbbaf59db852794c06f32786d138.svg +4 -0
- package/build/static/media/expand~blSbUwvt.8a0d1f9fb3339d7da34c3117df14b545.svg +6 -0
- package/package.json +1 -1
- package/build/static/css/511.901a4718.chunk.css.map +0 -1
- package/build/static/css/892.901a4718.chunk.css +0 -2
- package/build/static/css/892.901a4718.chunk.css.map +0 -1
- package/build/static/js/151.ba88b4c8.chunk.js +0 -3
- package/build/static/js/151.ba88b4c8.chunk.js.map +0 -1
- package/build/static/js/258.26b6de58.chunk.js +0 -2
- package/build/static/js/258.26b6de58.chunk.js.map +0 -1
- package/build/static/js/418.0e897104.chunk.js +0 -9
- package/build/static/js/418.0e897104.chunk.js.map +0 -1
- package/build/static/js/872.47e0183e.chunk.js +0 -2
- package/build/static/js/872.47e0183e.chunk.js.map +0 -1
- package/build/static/js/main.882fe1b6.js +0 -2
- package/build/static/js/main.882fe1b6.js.map +0 -1
- /package/build/static/js/{151.ba88b4c8.chunk.js.LICENSE.txt → 151.b276c881.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{418.0e897104.chunk.js.LICENSE.txt → 776.d98d1437.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 418.0e897104.chunk.js.LICENSE.txt */
|
|
2
|
-
(globalThis.webpackChunk_kne_components_react_file=globalThis.webpackChunk_kne_components_react_file||[]).push([[418],{80036(t,e,n){"use strict";n.d(e,{A:()=>Ct});var r=n(68102),i=n(3141);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}function o(t,e,n){return(e=a(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var c=n(94922),h=n(54159),d=n.n(h);const u=Math.round;function p(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(t=>parseFloat(t));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const f=(t,e,n)=>0===n?t:t/100;function m(t,e){const n=e||255;return t>n?n:t<0?0:t}class g{constructor(t){function e(e){return e[0]in t&&e[1]in t&&e[2]in t}if(o(this,"isValid",!0),o(this,"r",0),o(this,"g",0),o(this,"b",0),o(this,"a",1),o(this,"_h",void 0),o(this,"_s",void 0),o(this,"_l",void 0),o(this,"_v",void 0),o(this,"_max",void 0),o(this,"_min",void 0),o(this,"_brightness",void 0),t)if("string"===typeof t){const n=t.trim();function r(t){return n.startsWith(t)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):r("rgb")?this.fromRgbString(n):r("hsl")?this.fromHslString(n):(r("hsv")||r("hsb"))&&this.fromHsvString(n)}else if(t instanceof g)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(e("rgb"))this.r=m(t.r),this.g=m(t.g),this.b=m(t.b),this.a="number"===typeof t.a?m(t.a,1):1;else if(e("hsl"))this.fromHsl(t);else{if(!e("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t));this.fromHsv(t)}else;}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const e=this.toHsv();return e.h=t,this._c(e)}getLuminance(){function t(t){const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}return.2126*t(this.r)+.7152*t(this.g)+.0722*t(this.b)}getHue(){if("undefined"===typeof this._h){const t=this.getMax()-this.getMin();this._h=0===t?0:u(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if("undefined"===typeof this._s){const t=this.getMax()-this.getMin();this._s=0===t?0:t/this.getMax()}return this._s}getLightness(){return"undefined"===typeof this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return"undefined"===typeof this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return"undefined"===typeof this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const e=this.getHue(),n=this.getSaturation();let r=this.getLightness()-t/100;return r<0&&(r=0),this._c({h:e,s:n,l:r,a:this.a})}lighten(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const e=this.getHue(),n=this.getSaturation();let r=this.getLightness()+t/100;return r>1&&(r=1),this._c({h:e,s:n,l:r,a:this.a})}mix(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;const n=this._c(t),r=e/100,i=t=>(n[t]-this[t])*r+this[t],s={r:u(i("r")),g:u(i("g")),b:u(i("b")),a:u(100*i("a"))/100};return this._c(s)}tint(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:255,g:255,b:255,a:1},t)}shade(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const e=this._c(t),n=this.a+e.a*(1-this.a),r=t=>u((this[t]*this.a+e[t]*e.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const e=(this.r||0).toString(16);t+=2===e.length?e:"0"+e;const n=(this.g||0).toString(16);t+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(t+=2===r.length?r:"0"+r,"number"===typeof this.a&&this.a>=0&&this.a<1){const e=u(255*this.a).toString(16);t+=2===e.length?e:"0"+e}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),e=u(100*this.getSaturation()),n=u(100*this.getLightness());return 1!==this.a?`hsla(${t},${e}%,${n}%,${this.a})`:`hsl(${t},${e}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,e,n){const r=this.clone();return r[t]=m(e,n),r}_c(t){return new this.constructor(t)}getMax(){return"undefined"===typeof this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return"undefined"===typeof this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const e=t.replace("#","");function n(t,n){return parseInt(e[t]+e[n||t],16)}e.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=e[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=e[6]?n(6,7)/255:1)}fromHsl(t){let{h:e,s:n,l:r,a:i}=t;if(this._h=e%360,this._s=n,this._l=r,this.a="number"===typeof i?i:1,n<=0){const t=u(255*r);this.r=t,this.g=t,this.b=t}let s=0,a=0,o=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,h=c*(1-Math.abs(l%2-1));l>=0&&l<1?(s=c,a=h):l>=1&&l<2?(s=h,a=c):l>=2&&l<3?(a=c,o=h):l>=3&&l<4?(a=h,o=c):l>=4&&l<5?(s=h,o=c):l>=5&&l<6&&(s=c,o=h);const d=r-c/2;this.r=u(255*(s+d)),this.g=u(255*(a+d)),this.b=u(255*(o+d))}fromHsv(t){let{h:e,s:n,v:r,a:i}=t;this._h=e%360,this._s=n,this._v=r,this.a="number"===typeof i?i:1;const s=u(255*r);if(this.r=s,this.g=s,this.b=s,n<=0)return;const a=e/60,o=Math.floor(a),l=a-o,c=u(r*(1-n)*255),h=u(r*(1-n*l)*255),d=u(r*(1-n*(1-l))*255);switch(o){case 0:this.g=d,this.b=c;break;case 1:this.r=h,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=h;break;case 4:this.r=d,this.g=c;break;default:this.g=c,this.b=h}}fromHsvString(t){const e=p(t,f);this.fromHsv({h:e[0],s:e[1],v:e[2],a:e[3]})}fromHslString(t){const e=p(t,f);this.fromHsl({h:e[0],s:e[1],l:e[2],a:e[3]})}fromRgbString(t){const e=p(t,(t,e)=>e.includes("%")?u(t/100*255):t);this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3]}}var v=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function b(t,e,n){var r;return(r=Math.round(t.h)>=60&&Math.round(t.h)<=240?n?Math.round(t.h)-2*e:Math.round(t.h)+2*e:n?Math.round(t.h)+2*e:Math.round(t.h)-2*e)<0?r+=360:r>=360&&(r-=360),r}function y(t,e,n){return 0===t.h&&0===t.s?t.s:((r=n?t.s-.16*e:4===e?t.s+.16:t.s+.05*e)>1&&(r=1),n&&5===e&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(100*r)/100);var r}function w(t,e,n){var r;return r=n?t.v+.05*e:t.v-.15*e,r=Math.max(0,Math.min(1,r)),Math.round(100*r)/100}var _=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];_.primary=_[5];var A=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];A.primary=A[5];var x=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];x.primary=x[5];var E=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];E.primary=E[5];var k=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];k.primary=k[5];var C=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];C.primary=C[5];var S=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];S.primary=S[5];var T=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];T.primary=T[5];var D=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];D.primary=D[5];var M=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];M.primary=M[5];var P=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];P.primary=P[5];var I=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];I.primary=I[5];var F=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];F.primary=F[5];var R=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];R.primary=R[5];var N=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];N.primary=N[5];var L=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];L.primary=L[5];var O=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];O.primary=O[5];var B=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];B.primary=B[5];var $=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];$.primary=$[5];var z=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];z.primary=z[5];var j=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];j.primary=j[5];var U=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];U.primary=U[5];var H=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];H.primary=H[5];var V=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];V.primary=V[5];var q=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];q.primary=q[5];var W=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];W.primary=W[5];const G=(0,c.createContext)({});function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function X(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(Object(n),!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var Y="data-rc-order",Z="data-rc-priority",J=new Map;function Q(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return t?t.startsWith("data-")?t:"data-".concat(t):"rc-util-key"}function tt(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function et(t){return Array.from((J.get(t)||t).children).filter(function(t){return"STYLE"===t.tagName})}function nt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"===typeof window||!window.document||!window.document.createElement)return null;var n=e.csp,r=e.prepend,i=e.priority,s=void 0===i?0:i,a=function(t){return"queue"===t?"prependQueue":t?"prepend":"append"}(r),o="prependQueue"===a,l=document.createElement("style");l.setAttribute(Y,a),o&&s&&l.setAttribute(Z,"".concat(s)),null!==n&&void 0!==n&&n.nonce&&(l.nonce=null===n||void 0===n?void 0:n.nonce),l.innerHTML=t;var c=tt(e),h=c.firstChild;if(r){if(o){var d=(e.styles||et(c)).filter(function(t){if(!["prepend","prependQueue"].includes(t.getAttribute(Y)))return!1;var e=Number(t.getAttribute(Z)||0);return s>=e});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,h)}else c.appendChild(l);return l}function rt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=tt(e);return(e.styles||et(n)).find(function(n){return n.getAttribute(Q(e))===t})}function it(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=tt(n),i=et(r),s=X(X({},n),{},{styles:i});!function(t,e){var n=J.get(t);if(!n||!function(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}(document,n)){var r=nt("",e),i=r.parentNode;J.set(t,i),t.removeChild(r)}}(r,s);var a=rt(e,s);if(a){var o,l,c;if(null!==(o=s.csp)&&void 0!==o&&o.nonce&&a.nonce!==(null===(l=s.csp)||void 0===l?void 0:l.nonce))a.nonce=null===(c=s.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==t&&(a.innerHTML=t),a}var h=nt(t,s);return h.setAttribute(Q(s),e),h}function st(t){var e;return null===t||void 0===t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}function at(t){return function(t){return st(t)instanceof ShadowRoot}(t)?st(t):null}var ot={},lt=[];function ct(t,e){}function ht(t,e){}function dt(t,e,n){e||ot[n]||(t(!1,n),ot[n]=!0)}function ut(t,e){dt(ct,t,e)}ut.preMessage=function(t){lt.push(t)},ut.resetWarned=function(){ot={}},ut.noteOnce=function(t,e){dt(ht,t,e)};const pt=ut;function ft(t){return"object"===s(t)&&"string"===typeof t.name&&"string"===typeof t.theme&&("object"===s(t.icon)||"function"===typeof t.icon)}function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r,i=t[n];if("class"===n)e.className=i,delete e.class;else delete e[n],e[r=n,r.replace(/-(.)/g,function(t,e){return e.toUpperCase()})]=i;return e},{})}function gt(t,e,n){return n?c.createElement(t.tag,X(X({key:e},mt(t.attrs)),n),(t.children||[]).map(function(n,r){return gt(n,"".concat(e,"-").concat(t.tag,"-").concat(r))})):c.createElement(t.tag,X({key:e},mt(t.attrs)),(t.children||[]).map(function(n,r){return gt(n,"".concat(e,"-").concat(t.tag,"-").concat(r))}))}function vt(t){return function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=new g(t),i=r.toHsv(),s=5;s>0;s-=1){var a=new g({h:b(i,s,!0),s:y(i,s,!0),v:w(i,s,!0)});n.push(a)}n.push(r);for(var o=1;o<=4;o+=1){var l=new g({h:b(i,o),s:y(i,o),v:w(i,o)});n.push(l)}return"dark"===e.theme?v.map(function(t){var r=t.index,i=t.amount;return new g(e.backgroundColor||"#141414").mix(n[r],i).toHexString()}):n.map(function(t){return t.toHexString()})}(t)[0]}function bt(t){return t?Array.isArray(t)?t:[t]:[]}var yt=["icon","className","onClick","style","primaryColor","secondaryColor"],wt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var _t=function(t){var e,n,r=t.icon,i=t.className,s=t.onClick,a=t.style,o=t.primaryColor,h=t.secondaryColor,d=l(t,yt),u=c.useRef(),p=wt;if(o&&(p={primaryColor:o,secondaryColor:h||vt(o)}),function(t){var e=(0,c.useContext)(G),n=e.csp,r=e.prefixCls,i=e.layer,s="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(s=s.replace(/anticon/g,r)),i&&(s="@layer ".concat(i," {\n").concat(s,"\n}")),(0,c.useEffect)(function(){var e=at(t.current);it(s,"@ant-design-icons",{prepend:!i,csp:n,attachTo:e})},[])}(u),e=ft(r),n="icon should be icon definiton, but got ".concat(r),pt(e,"[@ant-design/icons] ".concat(n)),!ft(r))return null;var f=r;return f&&"function"===typeof f.icon&&(f=X(X({},f),{},{icon:f.icon(p.primaryColor,p.secondaryColor)})),gt(f.icon,"svg-".concat(f.name),X(X({className:i,onClick:s,style:a,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:u}))};_t.displayName="IconReact",_t.getTwoToneColors=function(){return X({},wt)},_t.setTwoToneColors=function(t){var e=t.primaryColor,n=t.secondaryColor;wt.primaryColor=e,wt.secondaryColor=n||vt(e),wt.calculated=!!n};const At=_t;function xt(t){var e=bt(t),n=(0,i.A)(e,2),r=n[0],s=n[1];return At.setTwoToneColors({primaryColor:r,secondaryColor:s})}var Et=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];xt(D.primary);var kt=c.forwardRef(function(t,e){var n=t.className,s=t.icon,a=t.spin,h=t.rotate,u=t.tabIndex,p=t.onClick,f=t.twoToneColor,m=l(t,Et),g=c.useContext(G),v=g.prefixCls,b=void 0===v?"anticon":v,y=g.rootClassName,w=d()(y,b,o(o({},"".concat(b,"-").concat(s.name),!!s.name),"".concat(b,"-spin"),!!a||"loading"===s.name),n),_=u;void 0===_&&p&&(_=-1);var A=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,x=bt(f),E=(0,i.A)(x,2),k=E[0],C=E[1];return c.createElement("span",(0,r.A)({role:"img","aria-label":s.name},m,{ref:e,tabIndex:_,onClick:p,className:w}),c.createElement(At,{icon:s,primaryColor:k,secondaryColor:C,style:A}))});kt.displayName="AntdIcon",kt.getTwoToneColor=function(){var t=At.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor},kt.setTwoToneColor=xt;const Ct=kt},79111(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},12791(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},15032(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},56859(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},2683(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},45816(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M820 436h-40c-4.4 0-8 3.6-8 8v40c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-40c0-4.4-3.6-8-8-8zm32-104H732V120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM360 180h304v152H360V180zm304 664H360V568h304v276zm200-140H732V500H292v204H160V412c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v292z"}}]},name:"printer",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},58882(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(68102),i=n(94922);const s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};var a=n(80036);const o=i.forwardRef(function(t,e){return i.createElement(a.A,(0,r.A)({},t,{ref:e,icon:s}))})},38930(t,e,n){"use strict";n.d(e,{ZF:()=>N,lV:()=>C});var r=n(94922),i=n(55199),s=n(78678),a=n(68102);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var l=n(80036);const c=r.forwardRef(function(t,e){return r.createElement(l.A,(0,a.A)({},t,{ref:e,icon:o}))});const h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const d=r.forwardRef(function(t,e){return r.createElement(l.A,(0,a.A)({},t,{ref:e,icon:h}))});const u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const p=r.forwardRef(function(t,e){return r.createElement(l.A,(0,a.A)({},t,{ref:e,icon:u}))});var f=n(54159),m=n.n(f),g=n(20274),v=(n(16052),n(50805)),b=n(26938),y=n.n(b),w=n(73075),_=n.n(w);n(85714),n(98771);function A(){return A=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},A.apply(null,arguments)}function x(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}const E=["onClick","children","loading"],k=t=>{const[e,n]=(0,r.useState)(!1),i=(0,s.A)(function(){return n(!0),Promise.resolve(t&&t(...arguments)).then(()=>{n(!1)}).catch(t=>{n(!1),console.error(t)})});return{isLoading:e,setIsLoading:n,callback:i}},C=t=>{let{onClick:e,children:n,loading:s}=t,a=x(t,E);const{isLoading:o,callback:l}=k(e);return r.createElement(i.Button,A({},a,{loading:s||o,onClick:l}),"function"===typeof n?n(s||o):n)};var S="_zIHFy",T="_R-IrF",D="_F1kMl",M="_Iee0d",P="_aGBVE",I="_0oW1K";const F={message:"\u786e\u5b9a\u8981\u5220\u9664\u5417\uff1f",confirm:"\u786e\u5b9a",delete:"\u5220\u9664",cancel:"\u53d6\u6d88",more:"\u66f4\u591a"},R=["title","message","isDelete","showCancel","cancelText","onCancel","isModal","okText","placement","children","onClick","getContainer","renderModal"],N=(0,g.createWithIntlProvider)("zh-CN",F,"button-group")(t=>{const{formatMessage:e}=(0,g.useIntl)(),n=Object.assign({},t),{title:a,message:o,isDelete:l,showCancel:h,cancelText:d,onCancel:u,isModal:p,okText:f,placement:v,children:b,onClick:y,getContainer:w,renderModal:_}=n,E=x(n,R),[C,F]=(0,r.useState)(!1),{isLoading:N,callback:L}=k(y),O=(0,s.A)(()=>{F(!0)}),B=r.createElement(i.Flex,{className:D,vertical:!0,gap:8,onClick:t=>{t.stopPropagation()}},a&&r.createElement(i.Flex,{align:"flex-start",gap:8,className:M},l&&r.createElement(c,{className:"title-icon"}),a),r.createElement(i.Flex,{align:"flex-start",gap:8,className:m()(P,{[I]:a})},!a&&l?r.createElement(c,{className:"title-icon"}):null,o||e({id:"message"}))),$=()=>"function"===typeof b?b(A({},E,{onClick:O},l&&{style:A({color:"#ff4d4f"},E.style)})):r.createElement(i.Button,A({},E,{loading:N,onClick:()=>{O()}}),b);if(p){const t={open:C,onCancel:()=>{F(!1),u&&u()},wrapClassName:T,okText:f||e(l?{id:"delete"}:{id:"confirm"}),cancelText:d||e({id:"cancel"}),onOk:t=>(F(!1),L(t)),closable:!1,okButtonProps:{danger:l},getContainer:w,children:B};return r.createElement(r.Fragment,null,"function"===typeof _?_(t):r.createElement(i.Modal,t),$())}return r.createElement(i.Popconfirm,{overlayClassName:m()(S),okButtonProps:{danger:l},title:B,open:C,getPopupContainer:w,onCancel:u,placement:v,showCancel:h,okText:f||e(l?{id:"delete"}:{id:"confirm"}),cancelText:d||e({id:"cancel"}),onOpenChange:F,onConfirm:t=>{L(t)}},$())}),L=_()(t=>{let{amountWidth:e,moreBtnWidth:n,buttonWidthList:r,spaceProps:i,compact:s}=t;const a=s?0:["small","middle","large"].indexOf(i.size)>-1?8*(["small","middle","large"].indexOf(i.size)+1):Number.isInteger(i.size)?i.size:8;let o=0,l=0;for(;e>=l+r[o]+o*a&&o<r.length;)l+=r[o],o+=1;for(;e<l+(o-1)*a+(o<r.length?n+a:0)&&o>0;)l-=r[o-1],o-=1;return o},t=>{let{amountWidth:e,moreBtnWidth:n,buttonWidthList:r,spaceProps:i,compact:s}=t;return`${e}${n}${r.join(",")}${Object.values(i).join(",")}${s&&s.toString()}`});var O={"width-container":"_V58ju","hidden-container":"_XN3o6","hidden-inner":"_-depB","more-link-btn":"_Hh4Wb","menu-list":"_juFTd"};const B=["list","more","moreType","compact","showLength","getPopupContainer","trigger","itemClassName"],$=["className","confirm","buttonComponent","tooltipProps","hidden","isDelete","isModal"];(0,g.createWithIntlProvider)("zh-CN",F,"button-group")(t=>{const{formatMessage:e}=(0,g.useIntl)(),n=Object.assign({},t),{list:a,more:o,moreType:l,compact:c,showLength:h,getPopupContainer:u,trigger:f,itemClassName:b}=n,w=x(n,B),_=(0,r.useMemo)(()=>a.filter(t=>!(null!=t&&t.hidden)),[a]),E=y()(w,["size","split","align","style"]),[k,S]=(0,r.useState)(_.length&&1),T=Number.isInteger(h)?h:k,D=(0,s.A)(()=>{const t=P.current,e=I.current,n=M.current;if(!t)return;const i=t.querySelectorAll(".button-group-item");if(!i)return;if(0===i.length)return;const s=n.clientWidth,a=e.clientWidth,o=[].map.call(i,t=>t.offsetWidth),l=L({amountWidth:s,moreBtnWidth:a,buttonWidthList:o,spaceProps:E,compact:c});(0,r.startTransition)(()=>{S(l)})}),M=(0,v.A)(D),P=(0,v.A)(D),I=(0,v.A)(D),F=_.slice(T),R=(t,e,n)=>{if("function"===typeof t)return t({key:e,className:m()("button-group-item",O["btn-item"],b)},{isDropdown:n});const{className:s,confirm:a,buttonComponent:o,tooltipProps:l,isDelete:c,isModal:h}=t,d=x(t,$),u=a||!!d.message||c,p=o||(u?N:C),f=r.createElement(p,A({danger:u&&!1!==c,isDelete:!(u&&!1===c)},Object.assign({},d,u&&(h||n)?{isModal:!0}:{},n?{type:"default"}:{}),{key:e,className:m()("button-group-item",s,b)}));return l?r.createElement(i.Tooltip,l,f):f},z=o||("link"===l?r.createElement(i.Button,{type:"link",className:m()("button-group-item",b,O["more-link-btn"])},r.createElement(d,{style:{fontSize:"16px"}})):r.createElement(i.Button,null,e({id:"more"}),r.createElement(p,null))),j=c?i.Space.Compact:i.Space;return r.createElement(r.Fragment,null,r.createElement("div",{className:O["width-container"],ref:M}),r.createElement("div",{className:O["hidden-container"]},r.createElement("div",{className:O["hidden-inner"],ref:I},z),r.createElement("div",{className:O["hidden-inner"],ref:P},r.createElement(j,E,_.map((t,e)=>r.createElement(r.Fragment,{key:e},R(t,e,!1)))))),r.createElement(j,E,_.slice(0,T).map((t,e)=>r.createElement(r.Fragment,{key:e},R(t,e,!1))),F.length>0&&r.createElement(i.Dropdown,{getPopupContainer:u,trigger:f,rootClassName:O["menu-list"],menu:{items:F.map((t,e)=>({key:e,label:R(t,e,!0)}))}},z)))})},79461(t,e,n){"use strict";n.d(e,{A:()=>r});const r=t=>{const e=[];let n=0;const r=()=>{if(0!==e.length){if(n<t){const t=e.shift();n+=1,t().finally(()=>{n-=1,r()})}}else n=0};return t=>new Promise(n=>{e.push(()=>{const e=Promise.resolve().then(()=>t());return n(e),e}),r()})}},36580(t,e,n){"use strict";n.d(e,{A:()=>z});var r,i=0,s=!1,a=!1,o="[iFrameSizer]",l=null,c=window.requestAnimationFrame,h=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),d={},u=null,p=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){w("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}});function f(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function m(t,e,n){t.addEventListener(e,n,!1)}function g(t,e,n){t.removeEventListener(e,n,!1)}function v(t){return o+"["+function(t){var e="Host page: "+t;return window.top!==window.self&&(e=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+t:"Nested host page: "+t),e}(t)+"]"}function b(t){return d[t]?d[t].log:s}function y(t,e){_("log",t,e,b(t))}function w(t,e){_("warn",t,e,!0)}function _(t,e,n,r){!0===r&&"object"===typeof window.console&&console[t](v(e),n)}function A(t){function e(){i("Height"),i("Width"),P(function(){M(A),S(E),f("onResized",A)},A,"init")}function n(t){return"border-box"!==t.boxSizing?0:(t.paddingTop?parseInt(t.paddingTop,10):0)+(t.paddingBottom?parseInt(t.paddingBottom,10):0)}function r(t){return"border-box"!==t.boxSizing?0:(t.borderTopWidth?parseInt(t.borderTopWidth,10):0)+(t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0)}function i(t){var e=Number(d[E]["max"+t]),n=Number(d[E]["min"+t]),r=t.toLowerCase(),i=Number(A[r]);y(E,"Checking "+r+" is in range "+n+"-"+e),i<n&&(i=n,y(E,"Set "+r+" to min value")),i>e&&(i=e,y(E,"Set "+r+" to max value")),A[r]=""+i}function s(t){return v.slice(v.indexOf(":")+7+t)}function a(t,e){var n,r,i;n=function(){I("Send Page Info","pageInfo:"+function(){var t=document.body.getBoundingClientRect(),e=A.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:e.height,iframeWidth:e.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(e.top-t.top,10),offsetLeft:parseInt(e.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}(),t,e)},r=32,L[i=e]||(L[i]=setTimeout(function(){L[i]=null,n()},r))}function c(t){var e=t.getBoundingClientRect();return C(E),{x:Math.floor(Number(e.left)+Number(l.x)),y:Math.floor(Number(e.top)+Number(l.y))}}function h(t){var e=t?c(A.iframe):{x:0,y:0},n={x:Number(A.width)+e.x,y:Number(A.height)+e.y};y(E,"Reposition requested from iFrame (offset x:"+e.x+" y:"+e.y+")"),window.top===window.self?(l=n,u(),y(E,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(t?"Offset":"")](n.x,n.y):w(E,"Unable to scroll to requested position, window.parentIFrame not found")}function u(){!1===f("onScroll",l)?T():S(E)}function p(t){var e={};if(0===Number(A.width)&&0===Number(A.height)){var n=s(9).split(":");e={x:n[1],y:n[0]}}else e={x:A.width,y:A.height};f(t,{iframe:A.iframe,screenX:Number(e.x),screenY:Number(e.y),type:A.type})}function f(t,e){return x(E,t,e)}var v=t.data,A={},E=null;"[iFrameResizerChild]Ready"===v?function(){for(var t in d)I("iFrame requested init",F(t),d[t].iframe,t)}():o===(""+v).slice(0,13)&&v.slice(13).split(":")[0]in d?(A=function(){var t=v.slice(13).split(":"),e=t[1]?parseInt(t[1],10):0,i=d[t[0]]&&d[t[0]].iframe,s=getComputedStyle(i);return{iframe:i,id:t[0],height:e+n(s)+r(s),width:t[2],type:t[3]}}(),E=A.id,d[E]&&(d[E].loaded=!0),!function(){var t=A.type in{true:1,false:1,undefined:1};return t&&y(E,"Ignoring init message from meta parent page"),t}()&&function(t){var e=!0;return d[t]||(e=!1,w(A.type+" No settings for "+t+". Message was: "+v)),e}(E)&&(y(E,"Received: "+v),function(){var t=!0;return null===A.iframe&&(w(E,"IFrame ("+A.id+") not found"),t=!1),t}()&&function(){var e=t.origin,n=d[E]&&d[E].checkOrigin;if(n&&""+e!=="null"&&!(n.constructor===Array?function(){var t=0,r=!1;for(y(E,"Checking connection is from allowed list of origins: "+n);t<n.length;t++)if(n[t]===e){r=!0;break}return r}():function(){var t=d[E]&&d[E].remoteHost;return y(E,"Checking connection is from: "+t),e===t}()))throw new Error("Unexpected message received from: "+e+" for "+A.iframe.id+". Message was: "+t.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(d[E]&&d[E].firstRun&&d[E]&&(d[E].firstRun=!1),A.type){case"close":k(A.iframe);break;case"message":t=s(6),y(E,"onMessage passed: {iframe: "+A.iframe.id+", message: "+t+"}"),f("onMessage",{iframe:A.iframe,message:JSON.parse(t)}),y(E,"--");break;case"mouseenter":p("onMouseEnter");break;case"mouseleave":p("onMouseLeave");break;case"autoResize":d[E].autoResize=JSON.parse(s(9));break;case"scrollTo":h(!1);break;case"scrollToOffset":h(!0);break;case"pageInfo":a(d[E]&&d[E].iframe,E),function(){function t(t,r){function i(){d[n]?a(d[n].iframe,n):e()}["scroll","resize"].forEach(function(e){y(n,t+e+" listener for sendPageInfo"),r(window,e,i)})}function e(){t("Remove ",g)}var n=E;t("Add ",m),d[n]&&(d[n].stopPageInfo=e)}();break;case"pageInfoStop":d[E]&&d[E].stopPageInfo&&(d[E].stopPageInfo(),delete d[E].stopPageInfo);break;case"inPageLink":!function(t){var e=t.split("#")[1]||"",n=decodeURIComponent(e),r=document.getElementById(n)||document.getElementsByName(n)[0];r?function(){var t=c(r);y(E,"Moving to in page link (#"+e+") at x: "+t.x+" y: "+t.y),l={x:t.x,y:t.y},u(),y(E,"--")}():window.top===window.self?y(E,"In page link #"+e+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(e):y(E,"In page link #"+e+" not found and window.parentIFrame not found")}(s(9));break;case"reset":D(A);break;case"init":e(),f("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?w("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):e()}var t}())):function(t,e){_("info",t,e,b(t))}(E,"Ignored: "+v)}function x(t,e,n){var r=null,i=null;if(d[t]){if("function"!==typeof(r=d[t][e]))throw new TypeError(e+" on iFrame["+t+"] is not a function");i=r(n)}return i}function E(t){var e=t.id;delete d[e]}function k(t){var e=t.id;if(!1!==x(e,"onClose",e)){y(e,"Removing iFrame: "+e);try{t.parentNode&&t.parentNode.removeChild(t)}catch(n){w(n)}x(e,"onClosed",e),y(e,"--"),E(t),r&&(r.disconnect(),r=null)}else y(e,"Close iframe cancelled by onClose event")}function C(t){null===l&&y(t,"Get page position: "+(l={x:void 0===window.pageXOffset?document.documentElement.scrollLeft:window.pageXOffset,y:void 0===window.pageYOffset?document.documentElement.scrollTop:window.pageYOffset}).x+","+l.y)}function S(t){null!==l&&(window.scrollTo(l.x,l.y),y(t,"Set page position: "+l.x+","+l.y),T())}function T(){l=null}function D(t){y(t.id,"Size reset requested by "+("init"===t.type?"host page":"iFrame")),C(t.id),P(function(){M(t),I("reset","reset",t.iframe,t.id)},t,"reset")}function M(t){function e(e){a||"0"!==t[e]||(a=!0,y(r,"Hidden iFrame detected, creating visibility listener"),function(){function t(){function t(t){function e(e){return"0px"===(d[t]&&d[t].iframe.style[e])}function n(t){return null!==t.offsetParent}d[t]&&n(d[t].iframe)&&(e("height")||e("width"))&&I("Visibility change","resize",d[t].iframe,t)}Object.keys(d).forEach(function(e){t(e)})}function e(e){y("window","Mutation observed: "+e[0].target+" "+e[0].type),N(t,16)}function n(){var t=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new r(e).observe(t,n)}var r=f();r&&n()}())}function n(n){!function(e){t.id?(t.iframe.style[e]=t[e]+"px",y(t.id,"IFrame ("+r+") "+e+" set to "+t[e]+"px")):y("undefined","messageData id not set")}(n),e(n)}var r=t.iframe.id;d[r]&&(d[r].sizeHeight&&n("height"),d[r].sizeWidth&&n("width"))}function P(t,e,n){n!==e.type&&c&&!window.jasmine?(y(e.id,"Requesting animation frame"),c(t)):t()}function I(t,e,n,r,i){var s=!1;r=r||n.id,d[r]&&(n&&"contentWindow"in n&&null!==n.contentWindow?function(){var i=d[r]&&d[r].targetOrigin;y(r,"["+t+"] Sending msg to iframe["+r+"] ("+e+") targetOrigin: "+i),n.contentWindow.postMessage(o+e,i)}():w(r,"["+t+"] IFrame("+r+") not found"),i&&d[r]&&d[r].warningTimeout&&(d[r].msgTimeout=setTimeout(function(){!d[r]||d[r].loaded||s||(s=!0,w(r,"IFrame has not responded within "+d[r].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},d[r].warningTimeout)))}function F(t){return t+":"+d[t].bodyMarginV1+":"+d[t].sizeWidth+":"+d[t].log+":"+d[t].interval+":"+d[t].enablePublicMethods+":"+d[t].autoResize+":"+d[t].bodyMargin+":"+d[t].heightCalculationMethod+":"+d[t].bodyBackground+":"+d[t].bodyPadding+":"+d[t].tolerance+":"+d[t].inPageLinks+":"+d[t].resizeFrom+":"+d[t].widthCalculationMethod+":"+d[t].mouseEvents}function R(t,e){function n(t){var e=t.split("Callback");if(2===e.length){var n="on"+e[0].charAt(0).toUpperCase()+e[0].slice(1);this[n]=this[t],delete this[t],w(a,"Deprecated: '"+t+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a=function(n){if("string"!==typeof n)throw new TypeError("Invaild id for iFrame. Expected String");return""===n&&(t.id=n=function(){var t=e&&e.id||p.id+i++;return null!==document.getElementById(t)&&(t+=i++),t}(),s=(e||{}).log,y(n,"Added missing iframe ID: "+n+" ("+t.src+")")),n}(t.id);a in d&&"iFrameResizer"in t?w(a,"Ignored iFrame, already setup."):(!function(e){var r;e=e||{},d[a]=Object.create(null),d[a].iframe=t,d[a].firstRun=!0,d[a].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(t){if("object"!==typeof t)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(n,e),function(t){for(var e in p)Object.prototype.hasOwnProperty.call(p,e)&&(d[a][e]=Object.prototype.hasOwnProperty.call(t,e)?t[e]:p[e])}(e),d[a]&&(d[a].targetOrigin=!0===d[a].checkOrigin?""===(r=d[a].remoteHost)||null!==r.match(/^(about:blank|javascript:|file:\/\/)/)?"*":r:"*")}(e),function(){switch(y(a,"IFrame scrolling "+(d[a]&&d[a].scrolling?"enabled":"disabled")+" for "+a),t.style.overflow=!1===(d[a]&&d[a].scrolling)?"hidden":"auto",d[a]&&d[a].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=d[a]?d[a].scrolling:"no"}}(),function(){function e(e){var n=d[a][e];1/0!==n&&0!==n&&(t.style[e]="number"===typeof n?n+"px":n,y(a,"Set "+e+" = "+t.style[e]))}function n(t){if(d[a]["min"+t]>d[a]["max"+t])throw new Error("Value for min"+t+" can not be greater than max"+t)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!==typeof(d[a]&&d[a].bodyMargin)&&"0"!==(d[a]&&d[a].bodyMargin)||(d[a].bodyMarginV1=d[a].bodyMargin,d[a].bodyMargin=d[a].bodyMargin+"px"),function(e){var n=f();n&&(r=function(e){if(!t.parentNode)return null;var n=new e(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes).forEach(function(e){e===t&&k(t)})})});return n.observe(t.parentNode,{childList:!0}),n}(n)),m(t,"load",function(){I("iFrame.onload",e,t,void 0,!0),function(){var e=d[a]&&d[a].firstRun,n=d[a]&&d[a].heightCalculationMethod in h;!e&&n&&D({iframe:t,height:0,width:0,type:"init"})}()}),I("init",e,t,void 0,!0)}(F(a)),d[a]&&(d[a].iframe.iFrameResizer={close:k.bind(null,d[a].iframe),removeListeners:E.bind(null,d[a].iframe),resize:I.bind(null,"Window resize","resize",d[a].iframe),moveToAnchor:function(t){I("Move to anchor","moveToAnchor:"+t,d[a].iframe,a)},sendMessage:function(t){I("Send Message","message:"+(t=JSON.stringify(t)),d[a].iframe,a)}}))}function N(t,e){null===u&&(u=setTimeout(function(){u=null,t()},e))}var L={};function O(){"hidden"!==document.visibilityState&&(y("document","Trigger event: Visibility change"),N(function(){B("Tab Visible","resize")},16))}function B(t,e){Object.keys(d).forEach(function(n){(function(t){return d[t]&&"parent"===d[t].resizeFrom&&d[t].autoResize&&!d[t].firstRun})(n)&&I(t,e,d[n].iframe,n)})}function $(){m(window,"message",A),m(window,"resize",function(){var t;y("window","Trigger event: "+(t="resize")),N(function(){B("Window "+t,"resize")},16)}),m(document,"visibilitychange",O),m(document,"-webkit-visibilitychange",O)}var z=function(){function t(t,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),R(n,t),e.push(n))}var e;return function(){var t,e=["moz","webkit","o","ms"];for(t=0;t<e.length&&!c;t+=1)c=window[e[t]+"RequestAnimationFrame"];c?c=c.bind(window):y("setup","RequestAnimationFrame not supported")}(),$(),function(n,r){switch(e=[],function(t){t&&t.enablePublicMethods&&w("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(n),typeof r){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),t.bind(void 0,n));break;case"object":t(n,r);break;default:throw new TypeError("Unexpected data type ("+typeof r+")")}return e}}()},62064(t,e,n){"use strict";n.d(e,{Ay:()=>$i});var r={};n.r(r),n.d(r,{decode:()=>h,encode:()=>p,format:()=>f,parse:()=>S});var i={};n.r(i),n.d(i,{Any:()=>M,Cc:()=>P,Cf:()=>I,P:()=>T,S:()=>D,Z:()=>F});var s={};n.r(s),n.d(s,{arrayReplaceAt:()=>ot,assign:()=>at,escapeHtml:()=>yt,escapeRE:()=>_t,fromCodePoint:()=>ct,has:()=>st,isMdAsciiPunct:()=>kt,isPunctChar:()=>Et,isSpace:()=>At,isString:()=>rt,isValidEntityCode:()=>lt,isWhiteSpace:()=>xt,lib:()=>St,normalizeReference:()=>Ct,unescapeAll:()=>ft,unescapeMd:()=>pt});var a={};n.r(a),n.d(a,{parseLinkDestination:()=>Dt,parseLinkLabel:()=>Tt,parseLinkTitle:()=>Mt});var o=n(94922);const l={};function c(t,e){"string"!==typeof e&&(e=c.defaultChars);const n=function(t){let e=l[t];if(e)return e;e=l[t]=[];for(let n=0;n<128;n++){const t=String.fromCharCode(n);e.push(t)}for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return e}(e);return t.replace(/(%[a-f0-9]{2})+/gi,function(t){let e="";for(let r=0,i=t.length;r<i;r+=3){const s=parseInt(t.slice(r+1,r+3),16);if(s<128)e+=n[s];else{if(192===(224&s)&&r+3<i){const n=parseInt(t.slice(r+4,r+6),16);if(128===(192&n)){const t=s<<6&1984|63&n;e+=t<128?"\ufffd\ufffd":String.fromCharCode(t),r+=3;continue}}if(224===(240&s)&&r+6<i){const n=parseInt(t.slice(r+4,r+6),16),i=parseInt(t.slice(r+7,r+9),16);if(128===(192&n)&&128===(192&i)){const t=s<<12&61440|n<<6&4032|63&i;e+=t<2048||t>=55296&&t<=57343?"\ufffd\ufffd\ufffd":String.fromCharCode(t),r+=6;continue}}if(240===(248&s)&&r+9<i){const n=parseInt(t.slice(r+4,r+6),16),i=parseInt(t.slice(r+7,r+9),16),a=parseInt(t.slice(r+10,r+12),16);if(128===(192&n)&&128===(192&i)&&128===(192&a)){let t=s<<18&1835008|n<<12&258048|i<<6&4032|63&a;t<65536||t>1114111?e+="\ufffd\ufffd\ufffd\ufffd":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),r+=9;continue}}e+="\ufffd"}}return e})}c.defaultChars=";/?:@&=+$,#",c.componentChars="";const h=c,d={};function u(t,e,n){"string"!==typeof e&&(n=e,e=u.defaultChars),"undefined"===typeof n&&(n=!0);const r=function(t){let e=d[t];if(e)return e;e=d[t]=[];for(let n=0;n<128;n++){const t=String.fromCharCode(n);/^[0-9a-z]$/i.test(t)?e.push(t):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<t.length;n++)e[t.charCodeAt(n)]=t[n];return e}(e);let i="";for(let s=0,a=t.length;s<a;s++){const e=t.charCodeAt(s);if(n&&37===e&&s+2<a&&/^[0-9a-f]{2}$/i.test(t.slice(s+1,s+3)))i+=t.slice(s,s+3),s+=2;else if(e<128)i+=r[e];else if(e>=55296&&e<=57343){if(e>=55296&&e<=56319&&s+1<a){const e=t.charCodeAt(s+1);if(e>=56320&&e<=57343){i+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(t[s])}return i}u.defaultChars=";/?:@&=+$,-_.!~*'()#",u.componentChars="-_.!~*'()";const p=u;function f(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function m(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const g=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,b=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),w=["'"].concat(y),_=["%","/","?",";","#"].concat(w),A=["/","?","#"],x=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,k={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};m.prototype.parse=function(t,e){let n,r,i,s=t;if(s=s.trim(),!e&&1===t.split("#").length){const t=b.exec(s);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let a=g.exec(s);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,s=s.substr(a.length)),(e||a||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===s.substr(0,2),!i||a&&k[a]||(s=s.substr(2),this.slashes=!0)),!k[a]&&(i||a&&!C[a])){let t,e,n=-1;for(let o=0;o<A.length;o++)r=s.indexOf(A[o]),-1!==r&&(-1===n||r<n)&&(n=r);e=-1===n?s.lastIndexOf("@"):s.lastIndexOf("@",n),-1!==e&&(t=s.slice(0,e),s=s.slice(e+1),this.auth=t),n=-1;for(let o=0;o<_.length;o++)r=s.indexOf(_[o]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=s.length),":"===s[n-1]&&n--;const i=s.slice(0,n);s=s.slice(n),this.parseHost(i),this.hostname=this.hostname||"";const a="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!a){const t=this.hostname.split(/\./);for(let e=0,n=t.length;e<n;e++){const n=t[e];if(n&&!n.match(x)){let r="";for(let t=0,e=n.length;t<e;t++)n.charCodeAt(t)>127?r+="x":r+=n[t];if(!r.match(x)){const r=t.slice(0,e),i=t.slice(e+1),a=n.match(E);a&&(r.push(a[1]),i.unshift(a[2])),i.length&&(s=i.join(".")+s),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),a&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const o=s.indexOf("#");-1!==o&&(this.hash=s.substr(o),s=s.slice(0,o));const l=s.indexOf("?");return-1!==l&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),C[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},m.prototype.parseHost=function(t){let e=v.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const S=function(t,e){if(t&&t instanceof m)return t;const n=new m;return n.parse(t,e),n},T=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,D=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,M=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,P=/[\0-\x1F\x7F-\x9F]/,I=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,F=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,R=new Uint16Array('\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c'.split("").map(t=>t.charCodeAt(0))),N=new Uint16Array("\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var L;const O=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),B=null!==(L=String.fromCodePoint)&&void 0!==L?L:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};function $(t){var e;return t>=55296&&t<=57343||t>1114111?65533:null!==(e=O.get(t))&&void 0!==e?e:t}var z;!function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(z||(z={}));var j,U,H;function V(t){return t>=z.ZERO&&t<=z.NINE}function q(t){return t>=z.UPPER_A&&t<=z.UPPER_F||t>=z.LOWER_A&&t<=z.LOWER_F}function W(t){return t===z.EQUALS||function(t){return t>=z.UPPER_A&&t<=z.UPPER_Z||t>=z.LOWER_A&&t<=z.LOWER_Z||V(t)}(t)}!function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(j||(j={})),function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(U||(U={})),function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"}(H||(H={}));class G{constructor(t,e,n){this.decodeTree=t,this.emitCodePoint=e,this.errors=n,this.state=U.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=H.Strict}startEntity(t){this.decodeMode=t,this.state=U.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case U.EntityStart:return t.charCodeAt(e)===z.NUM?(this.state=U.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=U.NamedEntity,this.stateNamedEntity(t,e));case U.NumericStart:return this.stateNumericStart(t,e);case U.NumericDecimal:return this.stateNumericDecimal(t,e);case U.NumericHex:return this.stateNumericHex(t,e);case U.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===z.LOWER_X?(this.state=U.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=U.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,n,r){if(e!==n){const i=n-e;this.result=this.result*Math.pow(r,i)+parseInt(t.substr(e,i),r),this.consumed+=i}}stateNumericHex(t,e){const n=e;for(;e<t.length;){const r=t.charCodeAt(e);if(!V(r)&&!q(r))return this.addToNumericResult(t,n,e,16),this.emitNumericEntity(r,3);e+=1}return this.addToNumericResult(t,n,e,16),-1}stateNumericDecimal(t,e){const n=e;for(;e<t.length;){const r=t.charCodeAt(e);if(!V(r))return this.addToNumericResult(t,n,e,10),this.emitNumericEntity(r,2);e+=1}return this.addToNumericResult(t,n,e,10),-1}emitNumericEntity(t,e){var n;if(this.consumed<=e)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===z.SEMI)this.consumed+=1;else if(this.decodeMode===H.Strict)return 0;return this.emitCodePoint($(this.result),this.consumed),this.errors&&(t!==z.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:n}=this;let r=n[this.treeIndex],i=(r&j.VALUE_LENGTH)>>14;for(;e<t.length;e++,this.excess++){const s=t.charCodeAt(e);if(this.treeIndex=X(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return 0===this.result||this.decodeMode===H.Attribute&&(0===i||W(s))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&j.VALUE_LENGTH)>>14,0!==i){if(s===z.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==H.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:n}=this,r=(n[e]&j.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,r,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,n){const{decodeTree:r}=this;return this.emitCodePoint(1===e?r[t]&~j.VALUE_LENGTH:r[t+1],n),3===e&&this.emitCodePoint(r[t+2],n),n}end(){var t;switch(this.state){case U.NamedEntity:return 0===this.result||this.decodeMode===H.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case U.NumericDecimal:return this.emitNumericEntity(0,2);case U.NumericHex:return this.emitNumericEntity(0,3);case U.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case U.EntityStart:return 0}}}function K(t){let e="";const n=new G(t,t=>e+=B(t));return function(t,r){let i=0,s=0;for(;(s=t.indexOf("&",s))>=0;){e+=t.slice(i,s),n.startEntity(r);const a=n.write(t,s+1);if(a<0){i=s+n.end();break}i=s+a,s=0===a?i+1:i}const a=e+t.slice(i);return e="",a}}function X(t,e,n,r){const i=(e&j.BRANCH_LENGTH)>>7,s=e&j.JUMP_TABLE;if(0===i)return 0!==s&&r===s?n:-1;if(s){const e=r-s;return e<0||e>=i?-1:t[n+e]-1}let a=n,o=a+i-1;for(;a<=o;){const e=a+o>>>1,n=t[e];if(n<r)a=e+1;else{if(!(n>r))return t[e+i];o=e-1}}return-1}const Y=K(R);K(N);function Z(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H.Legacy;return Y(t,e)}function J(t){for(let e=1;e<t.length;e++)t[e][0]+=t[e-1][0]+1;return t}new Map(J([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(J([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(J([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(J([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]));const Q=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);String.prototype.codePointAt;function tt(t,e){return function(n){let r,i=0,s="";for(;r=t.exec(n);)i!==r.index&&(s+=n.substring(i,r.index)),s+=e.get(r[0].charCodeAt(0)),i=r.index+1;return s+n.substring(i)}}tt(/[&<>'"]/g,Q),tt(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),tt(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var et,nt;function rt(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)}!function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"}(et||(et={})),function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"}(nt||(nt={}));const it=Object.prototype.hasOwnProperty;function st(t,e){return it.call(t,e)}function at(t){return Array.prototype.slice.call(arguments,1).forEach(function(e){if(e){if("object"!==typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach(function(n){t[n]=e[n]})}}),t}function ot(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function lt(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(65535!==(65535&t)&&65534!==(65535&t)&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function ct(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const ht=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,dt=new RegExp(ht.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),ut=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function pt(t){return t.indexOf("\\")<0?t:t.replace(ht,"$1")}function ft(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(dt,function(t,e,n){return e||function(t,e){if(35===e.charCodeAt(0)&&ut.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return lt(n)?ct(n):t}const n=Z(t);return n!==t?n:t}(t,n)})}const mt=/[&<>"]/,gt=/[&<>"]/g,vt={"&":"&","<":"<",">":">",'"':"""};function bt(t){return vt[t]}function yt(t){return mt.test(t)?t.replace(gt,bt):t}const wt=/[.?*+^$[\]\\(){}|-]/g;function _t(t){return t.replace(wt,"\\$&")}function At(t){switch(t){case 9:case 32:return!0}return!1}function xt(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Et(t){return T.test(t)||D.test(t)}function kt(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ct(t){return t=t.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(t=t.replace(/\u1e9e/g,"\xdf")),t.toLowerCase().toUpperCase()}const St={mdurl:r,ucmicro:i};function Tt(t,e,n){let r,i,s,a;const o=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos<o;){if(s=t.src.charCodeAt(t.pos),93===s&&(r--,0===r)){i=!0;break}if(a=t.pos,t.md.inline.skipToken(t),91===s)if(a===t.pos-1)r++;else if(n)return t.pos=l,-1}let c=-1;return i&&(c=t.pos),t.pos=l,c}function Dt(t,e,n){let r,i=e;const s={ok:!1,pos:0,str:""};if(60===t.charCodeAt(i)){for(i++;i<n;){if(r=t.charCodeAt(i),10===r)return s;if(60===r)return s;if(62===r)return s.pos=i+1,s.str=ft(t.slice(e+1,i)),s.ok=!0,s;92===r&&i+1<n?i+=2:i++}return s}let a=0;for(;i<n&&(r=t.charCodeAt(i),32!==r)&&!(r<32||127===r);)if(92===r&&i+1<n){if(32===t.charCodeAt(i+1))break;i+=2}else{if(40===r&&(a++,a>32))return s;if(41===r){if(0===a)break;a--}i++}return e===i||0!==a||(s.str=ft(t.slice(e,i)),s.pos=i,s.ok=!0),s}function Mt(t,e,n,r){let i,s=e;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(s>=n)return a;let r=t.charCodeAt(s);if(34!==r&&39!==r&&40!==r)return a;e++,s++,40===r&&(r=41),a.marker=r}for(;s<n;){if(i=t.charCodeAt(s),i===a.marker)return a.pos=s+1,a.str+=ft(t.slice(e,s)),a.ok=!0,a;if(40===i&&41===a.marker)return a;92===i&&s+1<n&&s++,s++}return a.can_continue=!0,a.str+=ft(t.slice(e,s)),a}const Pt={};function It(){this.rules=at({},Pt)}Pt.code_inline=function(t,e,n,r,i){const s=t[e];return"<code"+i.renderAttrs(s)+">"+yt(s.content)+"</code>"},Pt.code_block=function(t,e,n,r,i){const s=t[e];return"<pre"+i.renderAttrs(s)+"><code>"+yt(t[e].content)+"</code></pre>\n"},Pt.fence=function(t,e,n,r,i){const s=t[e],a=s.info?ft(s.info).trim():"";let o,l="",c="";if(a){const t=a.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(o=n.highlight&&n.highlight(s.content,l,c)||yt(s.content),0===o.indexOf("<pre"))return o+"\n";if(a){const t=s.attrIndex("class"),e=s.attrs?s.attrs.slice():[];t<0?e.push(["class",n.langPrefix+l]):(e[t]=e[t].slice(),e[t][1]+=" "+n.langPrefix+l);const r={attrs:e};return`<pre><code${i.renderAttrs(r)}>${o}</code></pre>\n`}return`<pre><code${i.renderAttrs(s)}>${o}</code></pre>\n`},Pt.image=function(t,e,n,r,i){const s=t[e];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(t,e,n)},Pt.hardbreak=function(t,e,n){return n.xhtmlOut?"<br />\n":"<br>\n"},Pt.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},Pt.text=function(t,e){return yt(t[e].content)},Pt.html_block=function(t,e){return t[e].content},Pt.html_inline=function(t,e){return t[e].content},It.prototype.renderAttrs=function(t){let e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e<n;e++)r+=" "+yt(t.attrs[e][0])+'="'+yt(t.attrs[e][1])+'"';return r},It.prototype.renderToken=function(t,e,n){const r=t[e];let i="";if(r.hidden)return"";r.block&&-1!==r.nesting&&e&&t[e-1].hidden&&(i+="\n"),i+=(-1===r.nesting?"</":"<")+r.tag,i+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(i+=" /");let s=!1;if(r.block&&(s=!0,1===r.nesting&&e+1<t.length)){const n=t[e+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(s=!1)}return i+=s?">\n":">",i},It.prototype.renderInline=function(t,e,n){let r="";const i=this.rules;for(let s=0,a=t.length;s<a;s++){const a=t[s].type;"undefined"!==typeof i[a]?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e)}return r},It.prototype.renderInlineAsText=function(t,e,n){let r="";for(let i=0,s=t.length;i<s;i++)switch(t[i].type){case"text":case"html_inline":case"html_block":r+=t[i].content;break;case"image":r+=this.renderInlineAsText(t[i].children,e,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},It.prototype.render=function(t,e,n){let r="";const i=this.rules;for(let s=0,a=t.length;s<a;s++){const a=t[s].type;"inline"===a?r+=this.renderInline(t[s].children,e,n):"undefined"!==typeof i[a]?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e,n)}return r};const Ft=It;function Rt(){this.__rules__=[],this.__cache__=null}Rt.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},Rt.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(t){e.indexOf(t)<0&&e.push(t)})}),t.__cache__={},e.forEach(function(e){t.__cache__[e]=[],t.__rules__.forEach(function(n){n.enabled&&(e&&n.alt.indexOf(e)<0||t.__cache__[e].push(n.fn))})})},Rt.prototype.at=function(t,e,n){const r=this.__find__(t),i=n||{};if(-1===r)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=i.alt||[],this.__cache__=null},Rt.prototype.before=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(-1===i)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},Rt.prototype.after=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(-1===i)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i+1,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null},Rt.prototype.push=function(t,e,n){const r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null},Rt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(t){const r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!0,n.push(t)},this),this.__cache__=null,n},Rt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(t,e)},Rt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(t){const r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!1,n.push(t)},this),this.__cache__=null,n},Rt.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]};const Nt=Rt;function Lt(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Lt.prototype.attrIndex=function(t){if(!this.attrs)return-1;const e=this.attrs;for(let n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},Lt.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},Lt.prototype.attrSet=function(t,e){const n=this.attrIndex(t),r=[t,e];n<0?this.attrPush(r):this.attrs[n]=r},Lt.prototype.attrGet=function(t){const e=this.attrIndex(t);let n=null;return e>=0&&(n=this.attrs[e][1]),n},Lt.prototype.attrJoin=function(t,e){const n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e};const Ot=Lt;function Bt(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}Bt.prototype.Token=Ot;const $t=Bt,zt=/\r\n?|\n/g,jt=/\0/g;function Ut(t){return/^<a[>\s]/i.test(t)}function Ht(t){return/^<\/a\s*>/i.test(t)}const Vt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,qt=/\((c|tm|r)\)/i,Wt=/\((c|tm|r)\)/gi,Gt={c:"\xa9",r:"\xae",tm:"\u2122"};function Kt(t,e){return Gt[e.toLowerCase()]}function Xt(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||(r.content=r.content.replace(Wt,Kt)),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}function Yt(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||Vt.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1\u2014").replace(/(^|\s)--(?=\s|$)/gm,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1\u2013")),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}const Zt=/['"]/,Jt=/['"]/g;function Qt(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function te(t,e){let n;const r=[];for(let i=0;i<t.length;i++){const s=t[i],a=t[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(r.length=n+1,"text"!==s.type)continue;let o=s.content,l=0,c=o.length;t:for(;l<c;){Jt.lastIndex=l;const h=Jt.exec(o);if(!h)break;let d=!0,u=!0;l=h.index+1;const p="'"===h[0];let f=32;if(h.index-1>=0)f=o.charCodeAt(h.index-1);else for(n=i-1;n>=0&&("softbreak"!==t[n].type&&"hardbreak"!==t[n].type);n--)if(t[n].content){f=t[n].content.charCodeAt(t[n].content.length-1);break}let m=32;if(l<c)m=o.charCodeAt(l);else for(n=i+1;n<t.length&&("softbreak"!==t[n].type&&"hardbreak"!==t[n].type);n++)if(t[n].content){m=t[n].content.charCodeAt(0);break}const g=kt(f)||Et(String.fromCharCode(f)),v=kt(m)||Et(String.fromCharCode(m)),b=xt(f),y=xt(m);if(y?d=!1:v&&(b||g||(d=!1)),b?u=!1:g&&(y||v||(u=!1)),34===m&&'"'===h[0]&&f>=48&&f<=57&&(u=d=!1),d&&u&&(d=g,u=v),d||u){if(u)for(n=r.length-1;n>=0;n--){let d=r[n];if(r[n].level<a)break;if(d.single===p&&r[n].level===a){let a,u;d=r[n],p?(a=e.md.options.quotes[2],u=e.md.options.quotes[3]):(a=e.md.options.quotes[0],u=e.md.options.quotes[1]),s.content=Qt(s.content,h.index,u),t[d.token].content=Qt(t[d.token].content,d.pos,a),l+=u.length-1,d.token===i&&(l+=a.length-1),o=s.content,c=o.length,r.length=n;continue t}}d?r.push({token:i,pos:h.index,single:p,level:a}):u&&p&&(s.content=Qt(s.content,h.index,"\u2019"))}else p&&(s.content=Qt(s.content,h.index,"\u2019"))}}}const ee=[["normalize",function(t){let e;e=t.src.replace(zt,"\n"),e=e.replace(jt,"\ufffd"),t.src=e}],["block",function(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}],["inline",function(t){const e=t.tokens;for(let n=0,r=e.length;n<r;n++){const r=e[n];"inline"===r.type&&t.md.inline.parse(r.content,t.md,t.env,r.children)}}],["linkify",function(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,r=e.length;n<r;n++){if("inline"!==e[n].type||!t.md.linkify.pretest(e[n].content))continue;let r=e[n].children,i=0;for(let s=r.length-1;s>=0;s--){const a=r[s];if("link_close"!==a.type){if("html_inline"===a.type&&(Ut(a.content)&&i>0&&i--,Ht(a.content)&&i++),!(i>0)&&"text"===a.type&&t.md.linkify.test(a.content)){const i=a.content;let o=t.md.linkify.match(i);const l=[];let c=a.level,h=0;o.length>0&&0===o[0].index&&s>0&&"text_special"===r[s-1].type&&(o=o.slice(1));for(let e=0;e<o.length;e++){const n=o[e].url,r=t.md.normalizeLink(n);if(!t.md.validateLink(r))continue;let s=o[e].text;s=o[e].schema?"mailto:"!==o[e].schema||/^mailto:/i.test(s)?t.md.normalizeLinkText(s):t.md.normalizeLinkText("mailto:"+s).replace(/^mailto:/,""):t.md.normalizeLinkText("http://"+s).replace(/^http:\/\//,"");const a=o[e].index;if(a>h){const e=new t.Token("text","",0);e.content=i.slice(h,a),e.level=c,l.push(e)}const d=new t.Token("link_open","a",1);d.attrs=[["href",r]],d.level=c++,d.markup="linkify",d.info="auto",l.push(d);const u=new t.Token("text","",0);u.content=s,u.level=c,l.push(u);const p=new t.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),h=o[e].lastIndex}if(h<i.length){const e=new t.Token("text","",0);e.content=i.slice(h),e.level=c,l.push(e)}e[n].children=r=ot(r,s,l)}}else for(s--;r[s].level!==a.level&&"link_open"!==r[s].type;)s--}}}],["replacements",function(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&(qt.test(t.tokens[e].content)&&Xt(t.tokens[e].children),Vt.test(t.tokens[e].content)&&Yt(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Zt.test(t.tokens[e].content)&&te(t.tokens[e].children,t)}],["text_join",function(t){let e,n;const r=t.tokens,i=r.length;for(let s=0;s<i;s++){if("inline"!==r[s].type)continue;const t=r[s].children,i=t.length;for(e=0;e<i;e++)"text_special"===t[e].type&&(t[e].type="text");for(e=n=0;e<i;e++)"text"===t[e].type&&e+1<i&&"text"===t[e+1].type?t[e+1].content=t[e].content+t[e+1].content:(e!==n&&(t[n]=t[e]),n++);e!==n&&(t.length=n)}}]];function ne(){this.ruler=new Nt;for(let t=0;t<ee.length;t++)this.ruler.push(ee[t][0],ee[t][1])}ne.prototype.process=function(t){const e=this.ruler.getRules("");for(let n=0,r=e.length;n<r;n++)e[n](t)},ne.prototype.State=$t;const re=ne;function ie(t,e,n,r){this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let s=0,a=0,o=0,l=0,c=i.length,h=!1;a<c;a++){const t=i.charCodeAt(a);if(!h){if(At(t)){o++,9===t?l+=4-l%4:l++;continue}h=!0}10!==t&&a!==c-1||(10!==t&&a++,this.bMarks.push(s),this.eMarks.push(a),this.tShift.push(o),this.sCount.push(l),this.bsCount.push(0),h=!1,o=0,l=0,s=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}ie.prototype.push=function(t,e,n){const r=new Ot(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},ie.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},ie.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;t<e&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},ie.prototype.skipSpaces=function(t){for(let e=this.src.length;t<e;t++){if(!At(this.src.charCodeAt(t)))break}return t},ie.prototype.skipSpacesBack=function(t,e){if(t<=e)return t;for(;t>e;)if(!At(this.src.charCodeAt(--t)))return t+1;return t},ie.prototype.skipChars=function(t,e){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===e;t++);return t},ie.prototype.skipCharsBack=function(t,e,n){if(t<=n)return t;for(;t>n;)if(e!==this.src.charCodeAt(--t))return t+1;return t},ie.prototype.getLines=function(t,e,n,r){if(t>=e)return"";const i=new Array(e-t);for(let s=0,a=t;a<e;a++,s++){let t=0;const o=this.bMarks[a];let l,c=o;for(l=a+1<e||r?this.eMarks[a]+1:this.eMarks[a];c<l&&t<n;){const e=this.src.charCodeAt(c);if(At(e))9===e?t+=4-(t+this.bsCount[a])%4:t++;else{if(!(c-o<this.tShift[a]))break;t++}c++}i[s]=t>n?new Array(t-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},ie.prototype.Token=Ot;const se=ie;function ae(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function oe(t){const e=[],n=t.length;let r=0,i=t.charCodeAt(r),s=!1,a=0,o="";for(;r<n;)124===i&&(s?(o+=t.substring(a,r-1),a=r):(e.push(o+t.substring(a,r)),o="",a=r+1)),s=92===i,r++,i=t.charCodeAt(r);return e.push(o+t.substring(a)),e}function le(t,e){const n=t.eMarks[e];let r=t.bMarks[e]+t.tShift[e];const i=t.src.charCodeAt(r++);if(42!==i&&45!==i&&43!==i)return-1;if(r<n){if(!At(t.src.charCodeAt(r)))return-1}return r}function ce(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];let i=n;if(i+1>=r)return-1;let s=t.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=r)return-1;if(s=t.src.charCodeAt(i++),!(s>=48&&s<=57)){if(41===s||46===s)break;return-1}if(i-n>=10)return-1}return i<r&&(s=t.src.charCodeAt(i),!At(s))?-1:i}const he="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",de="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ue=new RegExp("^(?:"+he+"|"+de+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),pe=new RegExp("^(?:"+he+"|"+de+")"),fe=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(pe.source+"\\s*$"),/^$/,!1]];const me=[["table",function(t,e,n,r){if(e+2>n)return!1;let i=e+1;if(t.sCount[i]<t.blkIndent)return!1;if(t.sCount[i]-t.blkIndent>=4)return!1;let s=t.bMarks[i]+t.tShift[i];if(s>=t.eMarks[i])return!1;const a=t.src.charCodeAt(s++);if(124!==a&&45!==a&&58!==a)return!1;if(s>=t.eMarks[i])return!1;const o=t.src.charCodeAt(s++);if(124!==o&&45!==o&&58!==o&&!At(o))return!1;if(45===a&&At(o))return!1;for(;s<t.eMarks[i];){const e=t.src.charCodeAt(s);if(124!==e&&45!==e&&58!==e&&!At(e))return!1;s++}let l=ae(t,e+1),c=l.split("|");const h=[];for(let v=0;v<c.length;v++){const t=c[v].trim();if(!t){if(0===v||v===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?h.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?h.push("left"):h.push("")}if(l=ae(t,e).trim(),-1===l.indexOf("|"))return!1;if(t.sCount[e]-t.blkIndent>=4)return!1;c=oe(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const d=c.length;if(0===d||d!==h.length)return!1;if(r)return!0;const u=t.parentType;t.parentType="table";const p=t.md.block.ruler.getRules("blockquote"),f=[e,0];t.push("table_open","table",1).map=f,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let v=0;v<c.length;v++){const e=t.push("th_open","th",1);h[v]&&(e.attrs=[["style","text-align:"+h[v]]]);const n=t.push("inline","",0);n.content=c[v].trim(),n.children=[],t.push("th_close","th",-1)}let m;t.push("tr_close","tr",-1),t.push("thead_close","thead",-1);let g=0;for(i=e+2;i<n&&!(t.sCount[i]<t.blkIndent);i++){let r=!1;for(let e=0,s=p.length;e<s;e++)if(p[e](t,i,n,!0)){r=!0;break}if(r)break;if(l=ae(t,i).trim(),!l)break;if(t.sCount[i]-t.blkIndent>=4)break;if(c=oe(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=d-c.length,g>65536)break;if(i===e+2){t.push("tbody_open","tbody",1).map=m=[e+2,0]}t.push("tr_open","tr",1).map=[i,i+1];for(let e=0;e<d;e++){const n=t.push("td_open","td",1);h[e]&&(n.attrs=[["style","text-align:"+h[e]]]);const r=t.push("inline","",0);r.content=c[e]?c[e].trim():"",r.children=[],t.push("td_close","td",-1)}t.push("tr_close","tr",-1)}return m&&(t.push("tbody_close","tbody",-1),m[1]=i),t.push("table_close","table",-1),f[1]=i,t.parentType=u,t.line=i,!0},["paragraph","reference"]],["code",function(t,e,n){if(t.sCount[e]-t.blkIndent<4)return!1;let r=e+1,i=r;for(;r<n;)if(t.isEmpty(r))r++;else{if(!(t.sCount[r]-t.blkIndent>=4))break;r++,i=r}t.line=i;const s=t.push("code_block","code",0);return s.content=t.getLines(e,i,4+t.blkIndent,!1)+"\n",s.map=[e,t.line],!0}],["fence",function(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(i+3>s)return!1;const a=t.src.charCodeAt(i);if(126!==a&&96!==a)return!1;let o=i;i=t.skipChars(i,a);let l=i-o;if(l<3)return!1;const c=t.src.slice(o,i),h=t.src.slice(i,s);if(96===a&&h.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let d=e,u=!1;for(;(d++,!(d>=n))&&(i=o=t.bMarks[d]+t.tShift[d],s=t.eMarks[d],!(i<s&&t.sCount[d]<t.blkIndent));)if(t.src.charCodeAt(i)===a&&!(t.sCount[d]-t.blkIndent>=4)&&(i=t.skipChars(i,a),!(i-o<l)&&(i=t.skipSpaces(i),!(i<s)))){u=!0;break}l=t.sCount[e],t.line=d+(u?1:0);const p=t.push("fence","code",0);return p.info=h,p.content=t.getLines(e+1,d,l,!0),p.markup=c,p.map=[e,t.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];const a=t.lineMax;if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(i))return!1;if(r)return!0;const o=[],l=[],c=[],h=[],d=t.md.block.ruler.getRules("blockquote"),u=t.parentType;t.parentType="blockquote";let p,f=!1;for(p=e;p<n;p++){const e=t.sCount[p]<t.blkIndent;if(i=t.bMarks[p]+t.tShift[p],s=t.eMarks[p],i>=s)break;if(62===t.src.charCodeAt(i++)&&!e){let e,n,r=t.sCount[p]+1;32===t.src.charCodeAt(i)?(i++,r++,n=!1,e=!0):9===t.src.charCodeAt(i)?(e=!0,(t.bsCount[p]+r)%4===3?(i++,r++,n=!1):n=!0):e=!1;let a=r;for(o.push(t.bMarks[p]),t.bMarks[p]=i;i<s;){const e=t.src.charCodeAt(i);if(!At(e))break;9===e?a+=4-(a+t.bsCount[p]+(n?1:0))%4:a++,i++}f=i>=s,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(e?1:0),c.push(t.sCount[p]),t.sCount[p]=a-r,h.push(t.tShift[p]),t.tShift[p]=i-t.bMarks[p];continue}if(f)break;let r=!1;for(let i=0,s=d.length;i<s;i++)if(d[i](t,p,n,!0)){r=!0;break}if(r){t.lineMax=p,0!==t.blkIndent&&(o.push(t.bMarks[p]),l.push(t.bsCount[p]),h.push(t.tShift[p]),c.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}o.push(t.bMarks[p]),l.push(t.bsCount[p]),h.push(t.tShift[p]),c.push(t.sCount[p]),t.sCount[p]=-1}const m=t.blkIndent;t.blkIndent=0;const g=t.push("blockquote_open","blockquote",1);g.markup=">";const v=[e,0];g.map=v,t.md.block.tokenize(t,e,p),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=a,t.parentType=u,v[1]=t.line;for(let b=0;b<h.length;b++)t.bMarks[b+e]=o[b],t.tShift[b+e]=h[b],t.sCount[b+e]=c[b],t.bsCount[b+e]=l[b];return t.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(t,e,n,r){const i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let s=t.bMarks[e]+t.tShift[e];const a=t.src.charCodeAt(s++);if(42!==a&&45!==a&&95!==a)return!1;let o=1;for(;s<i;){const e=t.src.charCodeAt(s++);if(e!==a&&!At(e))return!1;e===a&&o++}if(o<3)return!1;if(r)return!0;t.line=e+1;const l=t.push("hr","hr",0);return l.map=[e,t.line],l.markup=Array(o+1).join(String.fromCharCode(a)),!0},["paragraph","reference","blockquote","list"]],["list",function(t,e,n,r){let i,s,a,o,l=e,c=!0;if(t.sCount[l]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]<t.blkIndent)return!1;let h,d,u,p=!1;if(r&&"paragraph"===t.parentType&&t.sCount[l]>=t.blkIndent&&(p=!0),(u=ce(t,l))>=0){if(h=!0,a=t.bMarks[l]+t.tShift[l],d=Number(t.src.slice(a,u-1)),p&&1!==d)return!1}else{if(!((u=le(t,l))>=0))return!1;h=!1}if(p&&t.skipSpaces(u)>=t.eMarks[l])return!1;if(r)return!0;const f=t.src.charCodeAt(u-1),m=t.tokens.length;h?(o=t.push("ordered_list_open","ol",1),1!==d&&(o.attrs=[["start",d]])):o=t.push("bullet_list_open","ul",1);const g=[l,0];o.map=g,o.markup=String.fromCharCode(f);let v=!1;const b=t.md.block.ruler.getRules("list"),y=t.parentType;for(t.parentType="list";l<n;){s=u,i=t.eMarks[l];const e=t.sCount[l]+u-(t.bMarks[l]+t.tShift[l]);let r=e;for(;s<i;){const e=t.src.charCodeAt(s);if(9===e)r+=4-(r+t.bsCount[l])%4;else{if(32!==e)break;r++}s++}const d=s;let p;p=d>=i?1:r-e,p>4&&(p=1);const m=e+p;o=t.push("list_item_open","li",1),o.markup=String.fromCharCode(f);const g=[l,0];o.map=g,h&&(o.info=t.src.slice(a,u-1));const y=t.tight,w=t.tShift[l],_=t.sCount[l],A=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=d-t.bMarks[l],t.sCount[l]=r,d>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),t.tight&&!v||(c=!1),v=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=A,t.tShift[l]=w,t.sCount[l]=_,t.tight=y,o=t.push("list_item_close","li",-1),o.markup=String.fromCharCode(f),l=t.line,g[1]=l,l>=n)break;if(t.sCount[l]<t.blkIndent)break;if(t.sCount[l]-t.blkIndent>=4)break;let x=!1;for(let i=0,s=b.length;i<s;i++)if(b[i](t,l,n,!0)){x=!0;break}if(x)break;if(h){if(u=ce(t,l),u<0)break;a=t.bMarks[l]+t.tShift[l]}else if(u=le(t,l),u<0)break;if(f!==t.src.charCodeAt(u-1))break}return o=h?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(f),g[1]=l,t.line=l,t.parentType=y,c&&function(t,e){const n=t.level+2;for(let r=e+2,i=t.tokens.length-2;r<i;r++)t.tokens[r].level===n&&"paragraph_open"===t.tokens[r].type&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}(t,m),!0},["paragraph","reference","blockquote"]],["reference",function(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e],a=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(i))return!1;function o(e){const n=t.lineMax;if(e>=n||t.isEmpty(e))return null;let r=!1;if(t.sCount[e]-t.blkIndent>3&&(r=!0),t.sCount[e]<0&&(r=!0),!r){const r=t.md.block.ruler.getRules("reference"),i=t.parentType;t.parentType="reference";let s=!1;for(let a=0,o=r.length;a<o;a++)if(r[a](t,e,n,!0)){s=!0;break}if(t.parentType=i,s)return null}const i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];return t.src.slice(i,s+1)}let l=t.src.slice(i,s+1);s=l.length;let c=-1;for(i=1;i<s;i++){const t=l.charCodeAt(i);if(91===t)return!1;if(93===t){c=i;break}if(10===t){const t=o(a);null!==t&&(l+=t,s=l.length,a++)}else if(92===t&&(i++,i<s&&10===l.charCodeAt(i))){const t=o(a);null!==t&&(l+=t,s=l.length,a++)}}if(c<0||58!==l.charCodeAt(c+1))return!1;for(i=c+2;i<s;i++){const t=l.charCodeAt(i);if(10===t){const t=o(a);null!==t&&(l+=t,s=l.length,a++)}else if(!At(t))break}const h=t.md.helpers.parseLinkDestination(l,i,s);if(!h.ok)return!1;const d=t.md.normalizeLink(h.str);if(!t.md.validateLink(d))return!1;i=h.pos;const u=i,p=a,f=i;for(;i<s;i++){const t=l.charCodeAt(i);if(10===t){const t=o(a);null!==t&&(l+=t,s=l.length,a++)}else if(!At(t))break}let m,g=t.md.helpers.parseLinkTitle(l,i,s);for(;g.can_continue;){const e=o(a);if(null===e)break;l+=e,i=s,s=l.length,a++,g=t.md.helpers.parseLinkTitle(l,i,s,g)}for(i<s&&f!==i&&g.ok?(m=g.str,i=g.pos):(m="",i=u,a=p);i<s;){if(!At(l.charCodeAt(i)))break;i++}if(i<s&&10!==l.charCodeAt(i)&&m)for(m="",i=u,a=p;i<s;){if(!At(l.charCodeAt(i)))break;i++}if(i<s&&10!==l.charCodeAt(i))return!1;const v=Ct(l.slice(1,c));return!!v&&(r||("undefined"===typeof t.env.references&&(t.env.references={}),"undefined"===typeof t.env.references[v]&&(t.env.references[v]={title:m,href:d}),t.line=a),!0)}],["html_block",function(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(i))return!1;let a=t.src.slice(i,s),o=0;for(;o<fe.length&&!fe[o][0].test(a);o++);if(o===fe.length)return!1;if(r)return fe[o][2];let l=e+1;if(!fe[o][1].test(a))for(;l<n&&!(t.sCount[l]<t.blkIndent);l++)if(i=t.bMarks[l]+t.tShift[l],s=t.eMarks[l],a=t.src.slice(i,s),fe[o][1].test(a)){0!==a.length&&l++;break}t.line=l;const c=t.push("html_block","",0);return c.map=[e,l],c.content=t.getLines(e,l,t.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let a=t.src.charCodeAt(i);if(35!==a||i>=s)return!1;let o=1;for(a=t.src.charCodeAt(++i);35===a&&i<s&&o<=6;)o++,a=t.src.charCodeAt(++i);if(o>6||i<s&&!At(a))return!1;if(r)return!0;s=t.skipSpacesBack(s,i);const l=t.skipCharsBack(s,35,i);l>i&&At(t.src.charCodeAt(l-1))&&(s=l),t.line=e+1;const c=t.push("heading_open","h"+String(o),1);c.markup="########".slice(0,o),c.map=[e,t.line];const h=t.push("inline","",0);return h.content=t.src.slice(i,s).trim(),h.map=[e,t.line],h.children=[],t.push("heading_close","h"+String(o),-1).markup="########".slice(0,o),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let s,a=0,o=e+1;for(;o<n&&!t.isEmpty(o);o++){if(t.sCount[o]-t.blkIndent>3)continue;if(t.sCount[o]>=t.blkIndent){let e=t.bMarks[o]+t.tShift[o];const n=t.eMarks[o];if(e<n&&(s=t.src.charCodeAt(e),(45===s||61===s)&&(e=t.skipChars(e,s),e=t.skipSpaces(e),e>=n))){a=61===s?1:2;break}}if(t.sCount[o]<0)continue;let e=!1;for(let i=0,s=r.length;i<s;i++)if(r[i](t,o,n,!0)){e=!0;break}if(e)break}if(!a)return!1;const l=t.getLines(e,o,t.blkIndent,!1).trim();t.line=o+1;const c=t.push("heading_open","h"+String(a),1);c.markup=String.fromCharCode(s),c.map=[e,t.line];const h=t.push("inline","",0);return h.content=l,h.map=[e,t.line-1],h.children=[],t.push("heading_close","h"+String(a),-1).markup=String.fromCharCode(s),t.parentType=i,!0}],["paragraph",function(t,e,n){const r=t.md.block.ruler.getRules("paragraph"),i=t.parentType;let s=e+1;for(t.parentType="paragraph";s<n&&!t.isEmpty(s);s++){if(t.sCount[s]-t.blkIndent>3)continue;if(t.sCount[s]<0)continue;let e=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](t,s,n,!0)){e=!0;break}if(e)break}const a=t.getLines(e,s,t.blkIndent,!1).trim();t.line=s,t.push("paragraph_open","p",1).map=[e,t.line];const o=t.push("inline","",0);return o.content=a,o.map=[e,t.line],o.children=[],t.push("paragraph_close","p",-1),t.parentType=i,!0}]];function ge(){this.ruler=new Nt;for(let t=0;t<me.length;t++)this.ruler.push(me[t][0],me[t][1],{alt:(me[t][2]||[]).slice()})}ge.prototype.tokenize=function(t,e,n){const r=this.ruler.getRules(""),i=r.length,s=t.md.options.maxNesting;let a=e,o=!1;for(;a<n&&(t.line=a=t.skipEmptyLines(a),!(a>=n))&&!(t.sCount[a]<t.blkIndent);){if(t.level>=s){t.line=n;break}const e=t.line;let l=!1;for(let s=0;s<i;s++)if(l=r[s](t,a,n,!1),l){if(e>=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!o,t.isEmpty(t.line-1)&&(o=!0),a=t.line,a<n&&t.isEmpty(a)&&(o=!0,a++,t.line=a)}},ge.prototype.parse=function(t,e,n,r){if(!t)return;const i=new this.State(t,e,n,r);this.tokenize(i,i.line,i.lineMax)},ge.prototype.State=se;const ve=ge;function be(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}be.prototype.pushPending=function(){const t=new Ot("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},be.prototype.push=function(t,e,n){this.pending&&this.pushPending();const r=new Ot(t,e,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},be.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let s=t;for(;s<n&&this.src.charCodeAt(s)===r;)s++;const a=s-t,o=s<n?this.src.charCodeAt(s):32,l=kt(i)||Et(String.fromCharCode(i)),c=kt(o)||Et(String.fromCharCode(o)),h=xt(i),d=xt(o),u=!d&&(!c||h||l),p=!h&&(!l||d||c);return{can_open:u&&(e||!p||l),can_close:p&&(e||!u||c),length:a}},be.prototype.Token=Ot;const ye=be;function we(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}const _e=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const Ae=[];for(let zi=0;zi<256;zi++)Ae.push(0);function xe(t,e){let n;const r=[],i=e.length;for(let s=0;s<i;s++){const i=e[s];if(126!==i.marker)continue;if(-1===i.end)continue;const a=e[i.end];n=t.tokens[i.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=t.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===t.tokens[a.token-1].type&&"~"===t.tokens[a.token-1].content&&r.push(a.token-1)}for(;r.length;){const e=r.pop();let i=e+1;for(;i<t.tokens.length&&"s_close"===t.tokens[i].type;)i++;i--,e!==i&&(n=t.tokens[i],t.tokens[i]=t.tokens[e],t.tokens[e]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){Ae[t.charCodeAt(0)]=1});const Ee={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(126!==r)return!1;const i=t.scanDelims(t.pos,!0);let s=i.length;const a=String.fromCharCode(r);if(s<2)return!1;let o;s%2&&(o=t.push("text","",0),o.content=a,s--);for(let l=0;l<s;l+=2)o=t.push("text","",0),o.content=a+a,t.delimiters.push({marker:r,length:0,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return t.pos+=i.length,!0},postProcess:function(t){const e=t.tokens_meta,n=t.tokens_meta.length;xe(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&xe(t,e[r].delimiters)}};function ke(t,e){for(let n=e.length-1;n>=0;n--){const r=e[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const i=e[r.end],s=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===i.token+1,a=String.fromCharCode(r.marker),o=t.tokens[r.token];o.type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="";const l=t.tokens[i.token];l.type=s?"strong_close":"em_close",l.tag=s?"strong":"em",l.nesting=-1,l.markup=s?a+a:a,l.content="",s&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--)}}const Ce={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(95!==r&&42!==r)return!1;const i=t.scanDelims(t.pos,42===r);for(let s=0;s<i.length;s++){t.push("text","",0).content=String.fromCharCode(r),t.delimiters.push({marker:r,length:i.length,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return t.pos+=i.length,!0},postProcess:function(t){const e=t.tokens_meta,n=t.tokens_meta.length;ke(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&ke(t,e[r].delimiters)}};const Se=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Te=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const De=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Me=/^&([a-z][a-z0-9]{1,31});/i;function Pe(t){const e={},n=t.length;if(!n)return;let r=0,i=-2;const s=[];for(let a=0;a<n;a++){const n=t[a];if(s.push(0),t[r].marker===n.marker&&i===n.token-1||(r=a),i=n.token,n.length=n.length||0,!n.close)continue;e.hasOwnProperty(n.marker)||(e[n.marker]=[-1,-1,-1,-1,-1,-1]);const o=e[n.marker][(n.open?3:0)+n.length%3];let l=r-s[r]-1,c=l;for(;l>o;l-=s[l]+1){const e=t[l];if(e.marker===n.marker&&(e.open&&e.end<0)){let r=!1;if((e.close||n.open)&&(e.length+n.length)%3===0&&(e.length%3===0&&n.length%3===0||(r=!0)),!r){const r=l>0&&!t[l-1].open?s[l-1]+1:0;s[a]=a-l+r,s[l]=r,n.open=!1,e.end=a,e.close=!1,c=-1,i=-2;break}}}-1!==c&&(e[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const Ie=[["text",function(t,e){let n=t.pos;for(;n<t.posMax&&!we(t.src.charCodeAt(n));)n++;return n!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}],["linkify",function(t,e){if(!t.md.options.linkify)return!1;if(t.linkLevel>0)return!1;const n=t.pos;if(n+3>t.posMax)return!1;if(58!==t.src.charCodeAt(n))return!1;if(47!==t.src.charCodeAt(n+1))return!1;if(47!==t.src.charCodeAt(n+2))return!1;const r=t.pending.match(_e);if(!r)return!1;const i=r[1],s=t.md.linkify.matchAtStart(t.src.slice(n-i.length));if(!s)return!1;let a=s.url;if(a.length<=i.length)return!1;let o=a.length;for(;o>0&&42===a.charCodeAt(o-1);)o--;o!==a.length&&(a=a.slice(0,o));const l=t.md.normalizeLink(a);if(!t.md.validateLink(l))return!1;if(!e){t.pending=t.pending.slice(0,-i.length);const e=t.push("link_open","a",1);e.attrs=[["href",l]],e.markup="linkify",e.info="auto";t.push("text","",0).content=t.md.normalizeLinkText(a);const n=t.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return t.pos+=a.length-i.length,!0}],["newline",function(t,e){let n=t.pos;if(10!==t.src.charCodeAt(n))return!1;const r=t.pending.length-1,i=t.posMax;if(!e)if(r>=0&&32===t.pending.charCodeAt(r))if(r>=1&&32===t.pending.charCodeAt(r-1)){let e=r-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n<i&&At(t.src.charCodeAt(n));)n++;return t.pos=n,!0}],["escape",function(t,e){let n=t.pos;const r=t.posMax;if(92!==t.src.charCodeAt(n))return!1;if(n++,n>=r)return!1;let i=t.src.charCodeAt(n);if(10===i){for(e||t.push("hardbreak","br",0),n++;n<r&&(i=t.src.charCodeAt(n),At(i));)n++;return t.pos=n,!0}let s=t.src[n];if(i>=55296&&i<=56319&&n+1<r){const e=t.src.charCodeAt(n+1);e>=56320&&e<=57343&&(s+=t.src[n+1],n++)}const a="\\"+s;if(!e){const e=t.push("text_special","",0);i<256&&0!==Ae[i]?e.content=s:e.content=a,e.markup=a,e.info="escape"}return t.pos=n+1,!0}],["backticks",function(t,e){let n=t.pos;if(96!==t.src.charCodeAt(n))return!1;const r=n;n++;const i=t.posMax;for(;n<i&&96===t.src.charCodeAt(n);)n++;const s=t.src.slice(r,n),a=s.length;if(t.backticksScanned&&(t.backticks[a]||0)<=r)return e||(t.pending+=s),t.pos+=a,!0;let o,l=n;for(;-1!==(o=t.src.indexOf("`",l));){for(l=o+1;l<i&&96===t.src.charCodeAt(l);)l++;const r=l-o;if(r===a){if(!e){const e=t.push("code_inline","code",0);e.markup=s,e.content=t.src.slice(n,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return t.pos=l,!0}t.backticks[r]=o}return t.backticksScanned=!0,e||(t.pending+=s),t.pos+=a,!0}],["strikethrough",Ee.tokenize],["emphasis",Ce.tokenize],["link",function(t,e){let n,r,i,s,a="",o="",l=t.pos,c=!0;if(91!==t.src.charCodeAt(t.pos))return!1;const h=t.pos,d=t.posMax,u=t.pos+1,p=t.md.helpers.parseLinkLabel(t,t.pos,!0);if(p<0)return!1;let f=p+1;if(f<d&&40===t.src.charCodeAt(f)){for(c=!1,f++;f<d&&(n=t.src.charCodeAt(f),At(n)||10===n);f++);if(f>=d)return!1;if(l=f,i=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),i.ok){for(a=t.md.normalizeLink(i.str),t.md.validateLink(a)?f=i.pos:a="",l=f;f<d&&(n=t.src.charCodeAt(f),At(n)||10===n);f++);if(i=t.md.helpers.parseLinkTitle(t.src,f,t.posMax),f<d&&l!==f&&i.ok)for(o=i.str,f=i.pos;f<d&&(n=t.src.charCodeAt(f),At(n)||10===n);f++);}(f>=d||41!==t.src.charCodeAt(f))&&(c=!0),f++}if(c){if("undefined"===typeof t.env.references)return!1;if(f<d&&91===t.src.charCodeAt(f)?(l=f+1,f=t.md.helpers.parseLinkLabel(t,f),f>=0?r=t.src.slice(l,f++):f=p+1):f=p+1,r||(r=t.src.slice(u,p)),s=t.env.references[Ct(r)],!s)return t.pos=h,!1;a=s.href,o=s.title}if(!e){t.pos=u,t.posMax=p;const e=[["href",a]];t.push("link_open","a",1).attrs=e,o&&e.push(["title",o]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=f,t.posMax=d,!0}],["image",function(t,e){let n,r,i,s,a,o,l,c,h="";const d=t.pos,u=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const p=t.pos+2,f=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(f<0)return!1;if(s=f+1,s<u&&40===t.src.charCodeAt(s)){for(s++;s<u&&(n=t.src.charCodeAt(s),At(n)||10===n);s++);if(s>=u)return!1;for(c=s,o=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),o.ok&&(h=t.md.normalizeLink(o.str),t.md.validateLink(h)?s=o.pos:h=""),c=s;s<u&&(n=t.src.charCodeAt(s),At(n)||10===n);s++);if(o=t.md.helpers.parseLinkTitle(t.src,s,t.posMax),s<u&&c!==s&&o.ok)for(l=o.str,s=o.pos;s<u&&(n=t.src.charCodeAt(s),At(n)||10===n);s++);else l="";if(s>=u||41!==t.src.charCodeAt(s))return t.pos=d,!1;s++}else{if("undefined"===typeof t.env.references)return!1;if(s<u&&91===t.src.charCodeAt(s)?(c=s+1,s=t.md.helpers.parseLinkLabel(t,s),s>=0?i=t.src.slice(c,s++):s=f+1):s=f+1,i||(i=t.src.slice(p,f)),a=t.env.references[Ct(i)],!a)return t.pos=d,!1;h=a.href,l=a.title}if(!e){r=t.src.slice(p,f);const e=[];t.md.inline.parse(r,t.md,t.env,e);const n=t.push("image","img",0),i=[["src",h],["alt",""]];n.attrs=i,n.children=e,n.content=r,l&&i.push(["title",l])}return t.pos=s,t.posMax=u,!0}],["autolink",function(t,e){let n=t.pos;if(60!==t.src.charCodeAt(n))return!1;const r=t.pos,i=t.posMax;for(;;){if(++n>=i)return!1;const e=t.src.charCodeAt(n);if(60===e)return!1;if(62===e)break}const s=t.src.slice(r+1,n);if(Te.test(s)){const n=t.md.normalizeLink(s);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto";t.push("text","",0).content=t.md.normalizeLinkText(s);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=s.length+2,!0}if(Se.test(s)){const n=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto";t.push("text","",0).content=t.md.normalizeLinkText(s);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=s.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(60!==t.src.charCodeAt(r)||r+2>=n)return!1;const i=t.src.charCodeAt(r+1);if(33!==i&&63!==i&&47!==i&&!function(t){const e=32|t;return e>=97&&e<=122}(i))return!1;const s=t.src.slice(r).match(ue);if(!s)return!1;if(!e){const e=t.push("html_inline","",0);e.content=s[0],function(t){return/^<a[>\s]/i.test(t)}(e.content)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}],["entity",function(t,e){const n=t.pos,r=t.posMax;if(38!==t.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===t.src.charCodeAt(n+1)){const r=t.src.slice(n).match(De);if(r){if(!e){const e="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=t.push("text_special","",0);n.content=lt(e)?ct(e):ct(65533),n.markup=r[0],n.info="entity"}return t.pos+=r[0].length,!0}}else{const r=t.src.slice(n).match(Me);if(r){const n=Z(r[0]);if(n!==r[0]){if(!e){const e=t.push("text_special","",0);e.content=n,e.markup=r[0],e.info="entity"}return t.pos+=r[0].length,!0}}}return!1}]],Fe=[["balance_pairs",function(t){const e=t.tokens_meta,n=t.tokens_meta.length;Pe(t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Pe(e[r].delimiters)}],["strikethrough",Ee.postProcess],["emphasis",Ce.postProcess],["fragments_join",function(t){let e,n,r=0;const i=t.tokens,s=t.tokens.length;for(e=n=0;e<s;e++)i[e].nesting<0&&r--,i[e].level=r,i[e].nesting>0&&r++,"text"===i[e].type&&e+1<s&&"text"===i[e+1].type?i[e+1].content=i[e].content+i[e+1].content:(e!==n&&(i[n]=i[e]),n++);e!==n&&(i.length=n)}]];function Re(){this.ruler=new Nt;for(let t=0;t<Ie.length;t++)this.ruler.push(Ie[t][0],Ie[t][1]);this.ruler2=new Nt;for(let t=0;t<Fe.length;t++)this.ruler2.push(Fe[t][0],Fe[t][1])}Re.prototype.skipToken=function(t){const e=t.pos,n=this.ruler.getRules(""),r=n.length,i=t.md.options.maxNesting,s=t.cache;if("undefined"!==typeof s[e])return void(t.pos=s[e]);let a=!1;if(t.level<i){for(let o=0;o<r;o++)if(t.level++,a=n[o](t,!0),t.level--,a){if(e>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;a||t.pos++,s[e]=t.pos},Re.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,i=t.md.options.maxNesting;for(;t.pos<r;){const s=t.pos;let a=!1;if(t.level<i)for(let r=0;r<n;r++)if(a=e[r](t,!1),a){if(s>=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(a){if(t.pos>=r)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},Re.prototype.parse=function(t,e,n,r){const i=new this.State(t,e,n,r);this.tokenize(i);const s=this.ruler2.getRules(""),a=s.length;for(let o=0;o<a;o++)s[o](i)},Re.prototype.State=ye;const Ne=Re;function Le(t){return Array.prototype.slice.call(arguments,1).forEach(function(e){e&&Object.keys(e).forEach(function(n){t[n]=e[n]})}),t}function Oe(t){return Object.prototype.toString.call(t)}function Be(t){return"[object Function]"===Oe(t)}function $e(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const ze={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const je={"http:":{validate:function(t,e,n){const r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){const r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){const r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Ue="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function He(t){const e=t.re=function(t){const e={};t=t||{},e.src_Any=M.source,e.src_Cc=P.source,e.src_Z=F.source,e.src_P=T.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const n="[><\uff5c]";return e.src_pseudo_letter="(?:(?![><\uff5c]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><\uff5c]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+n+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><\uff5c]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+e.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|"+e.src_ZPCc+"))((?![$+<=>^`|\uff5c])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}(t.__opts__),n=t.__tlds__.slice();function r(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(e.src_xn),e.src_tlds=n.join("|"),e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const i=[];function s(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){const n=t.__schemas__[e];if(null===n)return;const r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===Oe(n))return!function(t){return"[object RegExp]"===Oe(t)}(n.validate)?Be(n.validate)?r.validate=n.validate:s(e,n):r.validate=function(t){return function(e,n){const r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(Be(n.normalize)?r.normalize=n.normalize:n.normalize?s(e,n):r.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===Oe(t)}(n)?s(e,n):i.push(e)}),i.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};const a=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map($e).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><\uff5c]|"+e.src_ZPCc+"))("+a+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><\uff5c]|"+e.src_ZPCc+"))("+a+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function Ve(t,e){const n=t.__index__,r=t.__last_index__,i=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=i,this.text=i,this.url=i}function qe(t,e){const n=new Ve(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function We(t,e){if(!(this instanceof We))return new We(t,e);var n;e||(n=t,Object.keys(n||{}).reduce(function(t,e){return t||ze.hasOwnProperty(e)},!1)&&(e=t,t={})),this.__opts__=Le({},ze,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Le({},je,t),this.__compiled__={},this.__tlds__=Ue,this.__tlds_replaced__=!1,this.re={},He(this)}We.prototype.add=function(t,e){return this.__schemas__[t]=e,He(this),this},We.prototype.set=function(t){return this.__opts__=Le(this.__opts__,t),this},We.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let e,n,r,i,s,a,o,l,c;if(this.re.schema_test.test(t))for(o=this.re.schema_search,o.lastIndex=0;null!==(e=o.exec(t));)if(i=this.testSchemaAt(t,e[2],o.lastIndex),i){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&null!==(r=t.match(this.re.email_fuzzy))&&(s=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0},We.prototype.pretest=function(t){return this.re.pretest.test(t)},We.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},We.prototype.match=function(t){const e=[];let n=0;this.__index__>=0&&this.__text_cache__===t&&(e.push(qe(this,n)),n=this.__last_index__);let r=n?t.slice(n):t;for(;this.test(r);)e.push(qe(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return e.length?e:null},We.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const n=this.testSchemaAt(t,e[2],e[0].length);return n?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+n,qe(this,0)):null},We.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(t,e,n){return t!==n[e-1]}).reverse(),He(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,He(this),this)},We.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},We.prototype.onCompile=function(){};const Ge=We,Ke=2147483647,Xe=36,Ye=/^xn--/,Ze=/[^\0-\x7F]/,Je=/[\x2E\u3002\uFF0E\uFF61]/g,Qe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},tn=Math.floor,en=String.fromCharCode;function nn(t){throw new RangeError(Qe[t])}function rn(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]);const i=function(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}((t=t.replace(Je,".")).split("."),e).join(".");return r+i}function sn(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const r=t.charCodeAt(n++);56320==(64512&r)?e.push(((1023&i)<<10)+(1023&r)+65536):(e.push(i),n--)}else e.push(i)}return e}const an=function(t){return t>=48&&t<58?t-48+26:t>=65&&t<91?t-65:t>=97&&t<123?t-97:Xe},on=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},ln=function(t,e,n){let r=0;for(t=n?tn(t/700):t>>1,t+=tn(t/e);t>455;r+=Xe)t=tn(t/35);return tn(r+36*t/(t+38))},cn=function(t){const e=[],n=t.length;let r=0,i=128,s=72,a=t.lastIndexOf("-");a<0&&(a=0);for(let o=0;o<a;++o)t.charCodeAt(o)>=128&&nn("not-basic"),e.push(t.charCodeAt(o));for(let o=a>0?a+1:0;o<n;){const a=r;for(let e=1,i=Xe;;i+=Xe){o>=n&&nn("invalid-input");const a=an(t.charCodeAt(o++));a>=Xe&&nn("invalid-input"),a>tn((Ke-r)/e)&&nn("overflow"),r+=a*e;const l=i<=s?1:i>=s+26?26:i-s;if(a<l)break;const c=Xe-l;e>tn(Ke/c)&&nn("overflow"),e*=c}const l=e.length+1;s=ln(r-a,l,0==a),tn(r/l)>Ke-i&&nn("overflow"),i+=tn(r/l),r%=l,e.splice(r++,0,i)}return String.fromCodePoint(...e)},hn=function(t){const e=[],n=(t=sn(t)).length;let r=128,i=0,s=72;for(const l of t)l<128&&e.push(en(l));const a=e.length;let o=a;for(a&&e.push("-");o<n;){let n=Ke;for(const e of t)e>=r&&e<n&&(n=e);const l=o+1;n-r>tn((Ke-i)/l)&&nn("overflow"),i+=(n-r)*l,r=n;for(const c of t)if(c<r&&++i>Ke&&nn("overflow"),c===r){let t=i;for(let n=Xe;;n+=Xe){const r=n<=s?1:n>=s+26?26:n-s;if(t<r)break;const i=t-r,a=Xe-r;e.push(en(on(r+i%a,0))),t=tn(i/a)}e.push(en(on(t,0))),s=ln(i,l,o===a),i=0,++o}++i,++r}return e.join("")},dn={version:"2.3.1",ucs2:{decode:sn,encode:t=>String.fromCodePoint(...t)},decode:cn,encode:hn,toASCII:function(t){return rn(t,function(t){return Ze.test(t)?"xn--"+hn(t):t})},toUnicode:function(t){return rn(t,function(t){return Ye.test(t)?cn(t.slice(4).toLowerCase()):t})}},un={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},pn=/^(vbscript|javascript|file|data):/,fn=/^data:image\/(gif|png|jpeg|webp);/;function mn(t){const e=t.trim().toLowerCase();return!pn.test(e)||fn.test(e)}const gn=["http:","https:","mailto:"];function vn(t){const e=S(t,!0);if(e.hostname&&(!e.protocol||gn.indexOf(e.protocol)>=0))try{e.hostname=dn.toASCII(e.hostname)}catch(n){}return p(f(e))}function bn(t){const e=S(t,!0);if(e.hostname&&(!e.protocol||gn.indexOf(e.protocol)>=0))try{e.hostname=dn.toUnicode(e.hostname)}catch(n){}return h(f(e),h.defaultChars+"%")}function yn(t,e){if(!(this instanceof yn))return new yn(t,e);e||rt(t)||(e=t||{},t="default"),this.inline=new Ne,this.block=new ve,this.core=new re,this.renderer=new Ft,this.linkify=new Ge,this.validateLink=mn,this.normalizeLink=vn,this.normalizeLinkText=bn,this.utils=s,this.helpers=at({},a),this.options={},this.configure(t),e&&this.set(e)}yn.prototype.set=function(t){return at(this.options,t),this},yn.prototype.configure=function(t){const e=this;if(rt(t)){const e=t;if(!(t=un[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this},yn.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(e){n=n.concat(this[e].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter(function(t){return n.indexOf(t)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},yn.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(e){n=n.concat(this[e].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter(function(t){return n.indexOf(t)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},yn.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},yn.prototype.parse=function(t,e){if("string"!==typeof t)throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},yn.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},yn.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},yn.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const wn=yn;function _n(t){return"undefined"===typeof t||null===t}var An={isNothing:_n,isObject:function(t){return"object"===typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:_n(t)?[]:[t]},repeat:function(t,e){var n,r="";for(n=0;n<e;n+=1)r+=t;return r},isNegativeZero:function(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,e){var n,r,i,s;if(e)for(n=0,r=(s=Object.keys(e)).length;n<r;n+=1)t[i=s[n]]=e[i];return t}};function xn(t,e){var n="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(n+='in "'+t.mark.name+'" '),n+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(n+="\n\n"+t.mark.snippet),r+" "+n):r}function En(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=xn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}En.prototype=Object.create(Error.prototype),En.prototype.constructor=En,En.prototype.toString=function(t){return this.name+": "+xn(this,t)};var kn=En;function Cn(t,e,n,r,i){var s="",a="",o=Math.floor(i/2)-1;return r-e>o&&(e=r-o+(s=" ... ").length),n-r>o&&(n=r+o-(a=" ...").length),{str:s+t.slice(e,n).replace(/\t/g,"\u2192")+a,pos:r-e+s.length}}function Sn(t,e){return An.repeat(" ",e-t.length)+t}var Tn=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!==typeof e.indent&&(e.indent=1),"number"!==typeof e.linesBefore&&(e.linesBefore=3),"number"!==typeof e.linesAfter&&(e.linesAfter=2);for(var n,r=/\r?\n|\r|\0/g,i=[0],s=[],a=-1;n=r.exec(t.buffer);)s.push(n.index),i.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o,l,c="",h=Math.min(t.line+e.linesAfter,s.length).toString().length,d=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(a-o<0);o++)l=Cn(t.buffer,i[a-o],s[a-o],t.position-(i[a]-i[a-o]),d),c=An.repeat(" ",e.indent)+Sn((t.line-o+1).toString(),h)+" | "+l.str+"\n"+c;for(l=Cn(t.buffer,i[a],s[a],t.position,d),c+=An.repeat(" ",e.indent)+Sn((t.line+1).toString(),h)+" | "+l.str+"\n",c+=An.repeat("-",e.indent+h+3+l.pos)+"^\n",o=1;o<=e.linesAfter&&!(a+o>=s.length);o++)l=Cn(t.buffer,i[a+o],s[a+o],t.position-(i[a]-i[a+o]),d),c+=An.repeat(" ",e.indent)+Sn((t.line+o+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")},Dn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Mn=["scalar","sequence","mapping"];var Pn=function(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===Dn.indexOf(e))throw new kn('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}(e.styleAliases||null),-1===Mn.indexOf(this.kind))throw new kn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function In(t,e){var n=[];return t[e].forEach(function(t){var e=n.length;n.forEach(function(n,r){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=r)}),n[e]=t}),n}function Fn(t){return this.extend(t)}Fn.prototype.extend=function(t){var e=[],n=[];if(t instanceof Pn)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new kn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof Pn))throw new kn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new kn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new kn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(t){if(!(t instanceof Pn))throw new kn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(Fn.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=In(r,"implicit"),r.compiledExplicit=In(r,"explicit"),r.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(r);return n}(r.compiledImplicit,r.compiledExplicit),r};var Rn=Fn,Nn=new Pn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),Ln=new Pn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),On=new Pn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}}),Bn=new Rn({explicit:[Nn,Ln,On]});var $n=new Pn("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var zn=new Pn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)},construct:function(t){return"true"===t||"True"===t||"TRUE"===t},predicate:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function jn(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Un(t){return 48<=t&&t<=55}function Hn(t){return 48<=t&&t<=57}var Vn=new Pn("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n=t.length,r=0,i=!1;if(!n)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===n)return!0;if("b"===(e=t[++r])){for(r++;r<n;r++)if("_"!==(e=t[r])){if("0"!==e&&"1"!==e)return!1;i=!0}return i&&"_"!==e}if("x"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!jn(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}if("o"===e){for(r++;r<n;r++)if("_"!==(e=t[r])){if(!Un(t.charCodeAt(r)))return!1;i=!0}return i&&"_"!==e}}if("_"===e)return!1;for(;r<n;r++)if("_"!==(e=t[r])){if(!Hn(t.charCodeAt(r)))return!1;i=!0}return!(!i||"_"===e)},construct:function(t){var e,n=t,r=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(e=n[0])&&"+"!==e||("-"===e&&(r=-1),e=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===e){if("b"===n[1])return r*parseInt(n.slice(2),2);if("x"===n[1])return r*parseInt(n.slice(2),16);if("o"===n[1])return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1===0&&!An.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),qn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Wn=/^[-+]?[0-9]+e/;var Gn=new Pn("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!qn.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!==0||An.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(An.isNegativeZero(t))return"-0.0";return n=t.toString(10),Wn.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),Kn=Bn.extend({implicit:[$n,zn,Vn,Gn]}),Xn=Kn,Yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Jn=new Pn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Yn.exec(t)||null!==Zn.exec(t))},construct:function(t){var e,n,r,i,s,a,o,l,c=0,h=null;if(null===(e=Yn.exec(t))&&(e=Zn.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(n,r,i,s,a,o,c)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var Qn=new Pn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var er=new Pn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,r=0,i=t.length,s=tr;for(n=0;n<i;n++)if(!((e=s.indexOf(t.charAt(n)))>64)){if(e<0)return!1;r+=6}return r%8===0},construct:function(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,s=tr,a=0,o=[];for(e=0;e<i;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)),a=a<<6|s.indexOf(r.charAt(e));return 0===(n=i%4*6)?(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)):18===n?(o.push(a>>10&255),o.push(a>>2&255)):12===n&&o.push(a>>4&255),new Uint8Array(o)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,r="",i=0,s=t.length,a=tr;for(e=0;e<s;e++)e%3===0&&e&&(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+t[e];return 0===(n=s%3)?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}}),nr=Object.prototype.hasOwnProperty,rr=Object.prototype.toString;var ir=new Pn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,r,i,s,a=[],o=t;for(e=0,n=o.length;e<n;e+=1){if(r=o[e],s=!1,"[object Object]"!==rr.call(r))return!1;for(i in r)if(nr.call(r,i)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0},construct:function(t){return null!==t?t:[]}}),sr=Object.prototype.toString;var ar=new Pn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,r,i,s,a=t;for(s=new Array(a.length),e=0,n=a.length;e<n;e+=1){if(r=a[e],"[object Object]"!==sr.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;s[e]=[i[0],r[i[0]]]}return!0},construct:function(t){if(null===t)return[];var e,n,r,i,s,a=t;for(s=new Array(a.length),e=0,n=a.length;e<n;e+=1)r=a[e],i=Object.keys(r),s[e]=[i[0],r[i[0]]];return s}}),or=Object.prototype.hasOwnProperty;var lr=new Pn("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,n=t;for(e in n)if(or.call(n,e)&&null!==n[e])return!1;return!0},construct:function(t){return null!==t?t:{}}}),cr=Xn.extend({implicit:[Jn,Qn],explicit:[er,ir,ar,lr]}),hr=Object.prototype.hasOwnProperty,dr=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ur=/[\x85\u2028\u2029]/,pr=/[,\[\]\{\}]/,fr=/^(?:!|!!|![a-z\-]+!)$/i,mr=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function gr(t){return Object.prototype.toString.call(t)}function vr(t){return 10===t||13===t}function br(t){return 9===t||32===t}function yr(t){return 9===t||32===t||10===t||13===t}function wr(t){return 44===t||91===t||93===t||123===t||125===t}function _r(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function Ar(t){return 120===t?2:117===t?4:85===t?8:0}function xr(t){return 48<=t&&t<=57?t-48:-1}function Er(t){return 48===t?"\0":97===t?"\x07":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\x1b":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\x85":95===t?"\xa0":76===t?"\u2028":80===t?"\u2029":""}function kr(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Cr(t,e,n){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:n}):t[e]=n}for(var Sr=new Array(256),Tr=new Array(256),Dr=0;Dr<256;Dr++)Sr[Dr]=Er(Dr)?1:0,Tr[Dr]=Er(Dr);function Mr(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||cr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Pr(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Tn(n),new kn(e,n)}function Ir(t,e){throw Pr(t,e)}function Fr(t,e){t.onWarning&&t.onWarning.call(null,Pr(t,e))}var Rr={YAML:function(t,e,n){var r,i,s;null!==t.version&&Ir(t,"duplication of %YAML directive"),1!==n.length&&Ir(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Ir(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),s=parseInt(r[2],10),1!==i&&Ir(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,1!==s&&2!==s&&Fr(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var r,i;2!==n.length&&Ir(t,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],fr.test(r)||Ir(t,"ill-formed tag handle (first argument) of the TAG directive"),hr.call(t.tagMap,r)&&Ir(t,'there is a previously declared suffix for "'+r+'" tag handle'),mr.test(i)||Ir(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(s){Ir(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i}};function Nr(t,e,n,r){var i,s,a,o;if(e<n){if(o=t.input.slice(e,n),r)for(i=0,s=o.length;i<s;i+=1)9===(a=o.charCodeAt(i))||32<=a&&a<=1114111||Ir(t,"expected valid JSON character");else dr.test(o)&&Ir(t,"the stream contains non-printable characters");t.result+=o}}function Lr(t,e,n,r){var i,s,a,o;for(An.isObject(n)||Ir(t,"cannot merge mappings; the provided source object is unacceptable"),a=0,o=(i=Object.keys(n)).length;a<o;a+=1)s=i[a],hr.call(e,s)||(Cr(e,s,n[s]),r[s]=!0)}function Or(t,e,n,r,i,s,a,o,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&Ir(t,"nested arrays are not supported inside keys"),"object"===typeof i&&"[object Object]"===gr(i[c])&&(i[c]="[object Object]");if("object"===typeof i&&"[object Object]"===gr(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(s))for(c=0,h=s.length;c<h;c+=1)Lr(t,e,s[c],n);else Lr(t,e,s,n);else t.json||hr.call(n,i)||!hr.call(e,i)||(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Ir(t,"duplicated mapping key")),Cr(e,i,s),delete n[i];return e}function Br(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Ir(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function $r(t,e,n){for(var r=0,i=t.input.charCodeAt(t.position);0!==i;){for(;br(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!vr(i))break;for(Br(t),i=t.input.charCodeAt(t.position),r++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==n&&0!==r&&t.lineIndent<n&&Fr(t,"deficient indentation"),r}function zr(t){var e,n=t.position;return!(45!==(e=t.input.charCodeAt(n))&&46!==e||e!==t.input.charCodeAt(n+1)||e!==t.input.charCodeAt(n+2)||(n+=3,0!==(e=t.input.charCodeAt(n))&&!yr(e)))}function jr(t,e){1===e?t.result+=" ":e>1&&(t.result+=An.repeat("\n",e-1))}function Ur(t,e){var n,r,i=t.tag,s=t.anchor,a=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Ir(t,"tab characters must not be used in indentation")),45===r)&&yr(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,$r(t,!0,-1)&&t.lineIndent<=e)a.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,qr(t,e,3,!1,!0),a.push(t.result),$r(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)Ir(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!o&&(t.tag=i,t.anchor=s,t.kind="sequence",t.result=a,!0)}function Hr(t){var e,n,r,i,s=!1,a=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Ir(t,"duplication of a tag property"),60===(i=t.input.charCodeAt(++t.position))?(s=!0,i=t.input.charCodeAt(++t.position)):33===i?(a=!0,n="!!",i=t.input.charCodeAt(++t.position)):n="!",e=t.position,s){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(r=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):Ir(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==i&&!yr(i);)33===i&&(a?Ir(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),fr.test(n)||Ir(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);r=t.input.slice(e,t.position),pr.test(r)&&Ir(t,"tag suffix cannot contain flow indicator characters")}r&&!mr.test(r)&&Ir(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(o){Ir(t,"tag name is malformed: "+r)}return s?t.tag=r:hr.call(t.tagMap,n)?t.tag=t.tagMap[n]+r:"!"===n?t.tag="!"+r:"!!"===n?t.tag="tag:yaml.org,2002:"+r:Ir(t,'undeclared tag handle "'+n+'"'),!0}function Vr(t){var e,n;if(38!==(n=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Ir(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!yr(n)&&!wr(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Ir(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function qr(t,e,n,r,i){var s,a,o,l,c,h,d,u,p,f=1,m=!1,g=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=4===n||3===n,r&&$r(t,!0,-1)&&(m=!0,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)),1===f)for(;Hr(t)||Vr(t);)$r(t,!0,-1)?(m=!0,o=s,t.lineIndent>e?f=1:t.lineIndent===e?f=0:t.lineIndent<e&&(f=-1)):o=!1;if(o&&(o=m||i),1!==f&&4!==n||(u=1===n||2===n?e:e+1,p=t.position-t.lineStart,1===f?o&&(Ur(t,p)||function(t,e,n){var r,i,s,a,o,l,c,h=t.tag,d=t.anchor,u={},p=Object.create(null),f=null,m=null,g=null,v=!1,b=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),c=t.input.charCodeAt(t.position);0!==c;){if(v||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Ir(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),s=t.line,63!==c&&58!==c||!yr(r)){if(a=t.line,o=t.lineStart,l=t.position,!qr(t,n,2,!1,!0))break;if(t.line===s){for(c=t.input.charCodeAt(t.position);br(c);)c=t.input.charCodeAt(++t.position);if(58===c)yr(c=t.input.charCodeAt(++t.position))||Ir(t,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Or(t,u,p,f,m,null,a,o,l),f=m=g=null),b=!0,v=!1,i=!1,f=t.tag,m=t.result;else{if(!b)return t.tag=h,t.anchor=d,!0;Ir(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return t.tag=h,t.anchor=d,!0;Ir(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(v&&(Or(t,u,p,f,m,null,a,o,l),f=m=g=null),b=!0,v=!0,i=!0):v?(v=!1,i=!0):Ir(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=r;if((t.line===s||t.lineIndent>e)&&(v&&(a=t.line,o=t.lineStart,l=t.position),qr(t,e,4,!0,i)&&(v?m=t.result:g=t.result),v||(Or(t,u,p,f,m,g,a,o,l),f=m=g=null),$r(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&0!==c)Ir(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return v&&Or(t,u,p,f,m,null,a,o,l),b&&(t.tag=h,t.anchor=d,t.kind="mapping",t.result=u),b}(t,p,u))||function(t,e){var n,r,i,s,a,o,l,c,h,d,u,p,f=!0,m=t.tag,g=t.anchor,v=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,c=!1,s=[];else{if(123!==p)return!1;a=125,c=!0,s={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),p=t.input.charCodeAt(++t.position);0!==p;){if($r(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=m,t.anchor=g,t.kind=c?"mapping":"sequence",t.result=s,!0;f?44===p&&Ir(t,"expected the node content, but found ','"):Ir(t,"missed comma between flow collection entries"),u=null,o=l=!1,63===p&&yr(t.input.charCodeAt(t.position+1))&&(o=l=!0,t.position++,$r(t,!0,e)),n=t.line,r=t.lineStart,i=t.position,qr(t,e,1,!1,!0),d=t.tag,h=t.result,$r(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==n||58!==p||(o=!0,p=t.input.charCodeAt(++t.position),$r(t,!0,e),qr(t,e,1,!1,!0),u=t.result),c?Or(t,s,v,d,h,u,n,r,i):o?s.push(Or(t,null,v,d,h,u,n,r,i)):s.push(h),$r(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Ir(t,"unexpected end of the stream within a flow collection")}(t,u)?g=!0:(a&&function(t,e){var n,r,i,s,a=1,o=!1,l=!1,c=e,h=0,d=!1;if(124===(s=t.input.charCodeAt(t.position)))r=!1;else{if(62!==s)return!1;r=!0}for(t.kind="scalar",t.result="";0!==s;)if(43===(s=t.input.charCodeAt(++t.position))||45===s)1===a?a=43===s?3:2:Ir(t,"repeat of a chomping mode identifier");else{if(!((i=xr(s))>=0))break;0===i?Ir(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ir(t,"repeat of an indentation width identifier"):(c=e+i-1,l=!0)}if(br(s)){do{s=t.input.charCodeAt(++t.position)}while(br(s));if(35===s)do{s=t.input.charCodeAt(++t.position)}while(!vr(s)&&0!==s)}for(;0!==s;){for(Br(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndent<c)&&32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>c&&(c=t.lineIndent),vr(s))h++;else{if(t.lineIndent<c){3===a?t.result+=An.repeat("\n",o?1+h:h):1===a&&o&&(t.result+="\n");break}for(r?br(s)?(d=!0,t.result+=An.repeat("\n",o?1+h:h)):d?(d=!1,t.result+=An.repeat("\n",h+1)):0===h?o&&(t.result+=" "):t.result+=An.repeat("\n",h):t.result+=An.repeat("\n",o?1+h:h),o=!0,l=!0,h=0,n=t.position;!vr(s)&&0!==s;)s=t.input.charCodeAt(++t.position);Nr(t,n,t.position,!1)}}return!0}(t,u)||function(t,e){var n,r,i;if(39!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(Nr(t,r,t.position,!0),39!==(n=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else vr(n)?(Nr(t,r,i,!0),jr(t,$r(t,!1,e)),r=i=t.position):t.position===t.lineStart&&zr(t)?Ir(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Ir(t,"unexpected end of the stream within a single quoted scalar")}(t,u)||function(t,e){var n,r,i,s,a,o;if(34!==(o=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return Nr(t,n,t.position,!0),t.position++,!0;if(92===o){if(Nr(t,n,t.position,!0),vr(o=t.input.charCodeAt(++t.position)))$r(t,!1,e);else if(o<256&&Sr[o])t.result+=Tr[o],t.position++;else if((a=Ar(o))>0){for(i=a,s=0;i>0;i--)(a=_r(o=t.input.charCodeAt(++t.position)))>=0?s=(s<<4)+a:Ir(t,"expected hexadecimal character");t.result+=kr(s),t.position++}else Ir(t,"unknown escape sequence");n=r=t.position}else vr(o)?(Nr(t,n,r,!0),jr(t,$r(t,!1,e)),n=r=t.position):t.position===t.lineStart&&zr(t)?Ir(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Ir(t,"unexpected end of the stream within a double quoted scalar")}(t,u)?g=!0:!function(t){var e,n,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!yr(r)&&!wr(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Ir(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),hr.call(t.anchorMap,n)||Ir(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],$r(t,!0,-1),!0}(t)?function(t,e,n){var r,i,s,a,o,l,c,h,d=t.kind,u=t.result;if(yr(h=t.input.charCodeAt(t.position))||wr(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(yr(r=t.input.charCodeAt(t.position+1))||n&&wr(r)))return!1;for(t.kind="scalar",t.result="",i=s=t.position,a=!1;0!==h;){if(58===h){if(yr(r=t.input.charCodeAt(t.position+1))||n&&wr(r))break}else if(35===h){if(yr(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&zr(t)||n&&wr(h))break;if(vr(h)){if(o=t.line,l=t.lineStart,c=t.lineIndent,$r(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=s,t.line=o,t.lineStart=l,t.lineIndent=c;break}}a&&(Nr(t,i,s,!1),jr(t,t.line-o),i=s=t.position,a=!1),br(h)||(s=t.position+1),h=t.input.charCodeAt(++t.position)}return Nr(t,i,s,!1),!!t.result||(t.kind=d,t.result=u,!1)}(t,u,1===n)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||Ir(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(g=o&&Ur(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Ir(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l<c;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(hr.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,c=(h=t.typeMap.multi[t.kind||"fallback"]).length;l<c;l+=1)if(t.tag.slice(0,h[l].tag.length)===h[l].tag){d=h[l];break}d||Ir(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Ir(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ir(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function Wr(t){var e,n,r,i,s=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&($r(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(a=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!yr(i);)i=t.input.charCodeAt(++t.position);for(r=[],(n=t.input.slice(e,t.position)).length<1&&Ir(t,"directive name must not be less than one character in length");0!==i;){for(;br(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!vr(i));break}if(vr(i))break;for(e=t.position;0!==i&&!yr(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==i&&Br(t),hr.call(Rr,n)?Rr[n](t,n,r):Fr(t,'unknown document directive "'+n+'"')}$r(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,$r(t,!0,-1)):a&&Ir(t,"directives end mark is expected"),qr(t,t.lineIndent-1,4,!1,!0),$r(t,!0,-1),t.checkLineBreaks&&ur.test(t.input.slice(s,t.position))&&Fr(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&zr(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,$r(t,!0,-1)):t.position<t.length-1&&Ir(t,"end of the stream or a document separator is expected")}function Gr(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new Mr(t,e),r=t.indexOf("\0");for(-1!==r&&(n.position=r,Ir(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Wr(n);return n.documents}var Kr={loadAll:function(t,e,n){null!==e&&"object"===typeof e&&"undefined"===typeof n&&(n=e,e=null);var r=Gr(t,n);if("function"!==typeof e)return r;for(var i=0,s=r.length;i<s;i+=1)e(r[i])},load:function(t,e){var n=Gr(t,e);if(0!==n.length){if(1===n.length)return n[0];throw new kn("expected a single document in the stream, but found more")}}},Xr=Object.prototype.toString,Yr=Object.prototype.hasOwnProperty,Zr=65279,Jr={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Qr=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],ti=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ei(t){var e,n,r;if(e=t.toString(16).toUpperCase(),t<=255)n="x",r=2;else if(t<=65535)n="u",r=4;else{if(!(t<=4294967295))throw new kn("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+An.repeat("0",r-e.length)+e}function ni(t){this.schema=t.schema||cr,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=An.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var n,r,i,s,a,o,l;if(null===e)return{};for(n={},i=0,s=(r=Object.keys(e)).length;i<s;i+=1)a=r[i],o=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=t.compiledTypeMap.fallback[a])&&Yr.call(l.styleAliases,o)&&(o=l.styleAliases[o]),n[a]=o;return n}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"===typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ri(t,e){for(var n,r=An.repeat(" ",e),i=0,s=-1,a="",o=t.length;i<o;)-1===(s=t.indexOf("\n",i))?(n=t.slice(i),i=o):(n=t.slice(i,s+1),i=s+1),n.length&&"\n"!==n&&(a+=r),a+=n;return a}function ii(t,e){return"\n"+An.repeat(" ",t.indent*e)}function si(t){return 32===t||9===t}function ai(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==Zr||65536<=t&&t<=1114111}function oi(t){return ai(t)&&t!==Zr&&13!==t&&10!==t}function li(t,e,n){var r=oi(t),i=r&&!si(t);return(n?r:r&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||oi(e)&&!si(e)&&35===t||58===e&&i}function ci(t,e){var n,r=t.charCodeAt(e);return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1))>=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function hi(t){return/^\n* /.test(t)}function di(t,e,n,r,i,s,a,o){var l,c,h=0,d=null,u=!1,p=!1,f=-1!==r,m=-1,g=ai(c=ci(t,0))&&c!==Zr&&!si(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(t){return!si(t)&&58!==t}(ci(t,t.length-1));if(e||a)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!ai(h=ci(t,l)))return 5;g=g&&li(h,d,o),d=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=ci(t,l)))u=!0,f&&(p=p||l-m-1>r&&" "!==t[m+1],m=l);else if(!ai(h))return 5;g=g&&li(h,d,o),d=h}p=p||f&&l-m-1>r&&" "!==t[m+1]}return u||p?n>9&&hi(t)?5:a?2===s?5:2:p?4:3:!g||a||i(t)?2===s?5:2:1}function ui(t,e,n,r,i){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Qr.indexOf(e)||ti.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,n),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),o=r||t.flowLevel>-1&&n>=t.flowLevel;switch(di(e,o,t.indent,a,function(e){return function(t,e){var n,r;for(n=0,r=t.implicitTypes.length;n<r;n+=1)if(t.implicitTypes[n].resolve(e))return!0;return!1}(t,e)},t.quotingType,t.forceQuotes&&!r,i)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+pi(e,t.indent)+fi(ri(e,s));case 4:return">"+pi(e,t.indent)+fi(ri(function(t,e){var n,r,i=/(\n+)([^\n]*)/g,s=function(){var n=t.indexOf("\n");return n=-1!==n?n:t.length,i.lastIndex=n,mi(t.slice(0,n),e)}(),a="\n"===t[0]||" "===t[0];for(;r=i.exec(t);){var o=r[1],l=r[2];n=" "===l[0],s+=o+(a||n||""===l?"":"\n")+mi(l,e),a=n}return s}(e,a),s));case 5:return'"'+function(t){for(var e,n="",r=0,i=0;i<t.length;r>=65536?i+=2:i++)r=ci(t,i),!(e=Jr[r])&&ai(r)?(n+=t[i],r>=65536&&(n+=t[i+1])):n+=e||ei(r);return n}(e)+'"';default:throw new kn("impossible error: invalid scalar style")}}()}function pi(t,e){var n=hi(t)?String(e):"",r="\n"===t[t.length-1];return n+(r&&("\n"===t[t.length-2]||"\n"===t)?"+":r?"":"-")+"\n"}function fi(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function mi(t,e){if(""===t||" "===t[0])return t;for(var n,r,i=/ [^ ]/g,s=0,a=0,o=0,l="";n=i.exec(t);)(o=n.index)-s>e&&(r=a>s?a:o,l+="\n"+t.slice(s,r),s=r+1),a=o;return l+="\n",t.length-s>e&&a>s?l+=t.slice(s,a)+"\n"+t.slice(a+1):l+=t.slice(s),l.slice(1)}function gi(t,e,n,r){var i,s,a,o="",l=t.tag;for(i=0,s=n.length;i<s;i+=1)a=n[i],t.replacer&&(a=t.replacer.call(n,String(i),a)),(bi(t,e+1,a,!0,!0,!1,!0)||"undefined"===typeof a&&bi(t,e+1,null,!0,!0,!1,!0))&&(r&&""===o||(o+=ii(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=l,t.dump=o||"[]"}function vi(t,e,n){var r,i,s,a,o,l;for(s=0,a=(i=n?t.explicitTypes:t.implicitTypes).length;s<a;s+=1)if(((o=i[s]).instanceOf||o.predicate)&&(!o.instanceOf||"object"===typeof e&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(n?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(l=t.styleMap[o.tag]||o.defaultStyle,"[object Function]"===Xr.call(o.represent))r=o.represent(e,l);else{if(!Yr.call(o.represent,l))throw new kn("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');r=o.represent[l](e,l)}t.dump=r}return!0}return!1}function bi(t,e,n,r,i,s,a){t.tag=null,t.dump=n,vi(t,n,!1)||vi(t,n,!0);var o,l=Xr.call(t.dump),c=r;r&&(r=t.flowLevel<0||t.flowLevel>e);var h,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(h=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(i=!1),d&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(u&&d&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)r&&0!==Object.keys(t.dump).length?(!function(t,e,n,r){var i,s,a,o,l,c,h="",d=t.tag,u=Object.keys(n);if(!0===t.sortKeys)u.sort();else if("function"===typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new kn("sortKeys must be a boolean or a function");for(i=0,s=u.length;i<s;i+=1)c="",r&&""===h||(c+=ii(t,e)),o=n[a=u[i]],t.replacer&&(o=t.replacer.call(n,a,o)),bi(t,e+1,a,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=ii(t,e)),bi(t,e+1,o,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=d,t.dump=h||"{}"}(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(!function(t,e,n){var r,i,s,a,o,l="",c=t.tag,h=Object.keys(n);for(r=0,i=h.length;r<i;r+=1)o="",""!==l&&(o+=", "),t.condenseFlow&&(o+='"'),a=n[s=h[r]],t.replacer&&(a=t.replacer.call(n,s,a)),bi(t,e,s,!1,!1)&&(t.dump.length>1024&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bi(t,e,a,!1,!1)&&(l+=o+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)r&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?gi(t,e-1,t.dump,i):gi(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(!function(t,e,n){var r,i,s,a="",o=t.tag;for(r=0,i=n.length;r<i;r+=1)s=n[r],t.replacer&&(s=t.replacer.call(n,String(r),s)),(bi(t,e,s,!1,!1)||"undefined"===typeof s&&bi(t,e,null,!1,!1))&&(""!==a&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=o,t.dump="["+a+"]"}(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new kn("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ui(t,t.dump,e,s,c)}null!==t.tag&&"?"!==t.tag&&(o=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),o="!"===t.tag[0]?"!"+o:"tag:yaml.org,2002:"===o.slice(0,18)?"!!"+o.slice(18):"!<"+o+">",t.dump=o+" "+t.dump)}return!0}function yi(t,e){var n,r,i=[],s=[];for(wi(t,i,s),n=0,r=s.length;n<r;n+=1)e.duplicates.push(i[s[n]]);e.usedDuplicates=new Array(r)}function wi(t,e,n){var r,i,s;if(null!==t&&"object"===typeof t)if(-1!==(i=e.indexOf(t)))-1===n.indexOf(i)&&n.push(i);else if(e.push(t),Array.isArray(t))for(i=0,s=t.length;i<s;i+=1)wi(t[i],e,n);else for(i=0,s=(r=Object.keys(t)).length;i<s;i+=1)wi(t[r[i]],e,n)}function _i(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var Ai={Type:Pn,Schema:Rn,FAILSAFE_SCHEMA:Bn,JSON_SCHEMA:Kn,CORE_SCHEMA:Xn,DEFAULT_SCHEMA:cr,load:Kr.load,loadAll:Kr.loadAll,dump:{dump:function(t,e){var n=new ni(e=e||{});n.noRefs||yi(t,n);var r=t;return n.replacer&&(r=n.replacer.call({"":r},"",r)),bi(n,0,r,!0,!0)?n.dump+"\n":""}}.dump,YAMLException:kn,types:{binary:er,float:Gn,map:On,null:$n,pairs:ar,set:lr,timestamp:Jn,bool:zn,int:Vn,merge:Qn,omap:ir,seq:Ln,str:Nn},safeLoad:_i("safeLoad","load"),safeLoadAll:_i("safeLoadAll","loadAll"),safeDump:_i("safeDump","dump")},xi=n(14225),Ei=n.n(xi),ki=n(59107);const Ci=ki.default||ki;var Si=n(78678),Ti=n(64755),Di=n.n(Ti);function Mi(){return Mi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mi.apply(null,arguments)}const Pi=(new(Ei())).compile({type:"object",properties:{"md-components":{type:"object",properties:{type:{type:"string"},props:{type:"object"}},required:["type","props"]}},required:["md-components"]}),Ii=function(t){const e=t.renderer.rules.fence,n=t.renderer.rules.code_inline;t.renderer.rules.code_inline=function(t,e,r,i,s){const a=t[e];try{if(/^md-components/.test(a.content)){const t=/md-components:(\w+)\{([^}]+)}/g;let e;const n=[];for(;null!==(e=t.exec(a.content));)n.push({componentsType:e[1],props:e[2]});if(n.length>0)return n.map(t=>{let{componentsType:e,props:n}=t;const r={"md-components":{type:e,props:JSON.parse(`{${n}}`)}};if(Pi(r)){const t=document.createElement("code");return t.setAttribute("class","md-components"),t.dataset.components=JSON.stringify(r),t.outerHTML}return""}).join("")}}catch(o){console.warn(o)}return n(t,e,r,i,s)},t.renderer.rules.fence=function(t,n,r,i,s){const a=t[n];if("yml"===a.info.trim())try{const t=Ai.load(a.content);if(Pi(t)){const e=document.createElement("pre");return e.setAttribute("class","md-components"),e.dataset.components=JSON.stringify(t),e.outerHTML}}catch(o){console.warn(o)}return e(t,n,r,i,s)}},Fi=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(t))return t.map(t=>Fi(t,e));if(t&&"[object Object]"===t.toString()&&Object.keys(t).length>0){const n={};return Object.keys(t).forEach(r=>{n[r]=Fi(t[r],e)}),n}return t&&"string"===typeof t&&"$"===t.charAt(0)&&e&&e[t.substring(1)]?e[t.substring(1)]:t};var Ri=function(t){var e={exports:{}};return t(e,e.exports),e.exports}(function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=i(t,r(n)))}return t}function r(t){if("string"===typeof t||"number"===typeof t)return t;if("object"!==typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var s in t)e.call(t,s)&&t[s]&&(r=i(r,s));return r}function i(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}),Ni="_wcble";const Li=t=>{let{className:e,html:n,variables:r,components:i={}}=t;return o.createElement("div",{className:Ri(Ni,e)},Ci(n,{replace(t){if(t.attribs&&"md-components"===t.attribs.class&&t.attribs["data-components"]){const e=JSON.parse(t.attribs["data-components"]);if(!e["md-components"])return null;const{type:n,props:s}=e["md-components"],a=i[n];if(!a)return null;const l=Fi(s,r);if(l.children&&Array.isArray(l.children)){const t=((t,e,n)=>t?Array.isArray(t)?t.map((t,r)=>{if(t&&"object"===typeof t&&t.type&&t.props){const i=n[t.type];if(i){const n=Fi(t.props,e);return o.createElement(i,Mi({key:r},n))}}return t}):t:null)(l.children,r,i);return o.createElement(a,l,t)}return o.createElement(a,l)}return t}}))},Oi={};const Bi=["children","render"],$i=t=>{let{children:e="",render:n}=t,r=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,Bi);const{htmlTransform:i,components:s={},variables:a={},options:l}=Di()({},Oi,r),c=(0,Si.A)(t=>{const{config:e,plugins:n}=Object.assign({},l,{config:{},plugins:[]}),r=wn(e);n.forEach(t=>{const e=Array.isArray(t)?t:[t];r.use(...e)}),r.use(Ii);const c=r.render(t);return o.createElement(Li,{html:"function"===typeof i?i(c):c,variables:a,components:s})}),h=(0,o.useMemo)(()=>c(e),[e,c]);return"function"===typeof n?n(h):h}},88406(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(94922);function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(this,arguments)}var s={doc:t=>r.createElement("svg",i({t:1646123881490,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1408,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1409}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1410}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1411}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#2C97FF","p-id":1412}),r.createElement("path",{d:"M192 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 16 16h48a64 64 0 0 0 64-64v-96a64 64 0 0 0-64-64z m0 192h-32V576h32a32 32 0 0 1 32 32v96a32 32 0 0 1-32 32z m160-192a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64 64 64 0 0 0 64-64v-96a64 64 0 0 0-64-64z m32 160a32 32 0 0 1-32 32 32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32 32 32 0 0 1 32 32z m128 32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32 32 32 0 0 1 32 32h32a64 64 0 0 0-64-64 64 64 0 0 0-64 64v96a64 64 0 0 0 64 64 64 64 0 0 0 64-64h-32a32 32 0 0 1-32 32z",fill:"#FFFFFF","p-id":1413})),docx:t=>r.createElement("svg",i({t:1646123881490,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1408,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1409}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1410}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1411}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#2C97FF","p-id":1412}),r.createElement("path",{d:"M192 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 16 16h48a64 64 0 0 0 64-64v-96a64 64 0 0 0-64-64z m0 192h-32V576h32a32 32 0 0 1 32 32v96a32 32 0 0 1-32 32z m160-192a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64 64 64 0 0 0 64-64v-96a64 64 0 0 0-64-64z m32 160a32 32 0 0 1-32 32 32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32 32 32 0 0 1 32 32z m128 32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32 32 32 0 0 1 32 32h32a64 64 0 0 0-64-64 64 64 0 0 0-64 64v96a64 64 0 0 0 64 64 64 64 0 0 0 64-64h-32a32 32 0 0 1-32 32z",fill:"#FFFFFF","p-id":1413})),gif:t=>r.createElement("svg",i({t:1646123917228,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1827,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1828}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1829}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1830}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#CC7598","p-id":1831}),r.createElement("path",{d:"M288 672h-80a16 16 0 0 0 0 32h48a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32h32a32 32 0 0 1 32 32 16 16 0 0 0 32 0 64 64 0 0 0-64-64h-32a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64h32a64 64 0 0 0 64-64 16 16 0 0 0 0-32z m96 80a16 16 0 0 1-16 16 16 16 0 0 1-16-16V560a16 16 0 0 1 16-16 16 16 0 0 1 16 16z m176-208h-96a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h48a16 16 0 0 0 0-32h-48v-64h80a16 16 0 0 0 0-32z",fill:"#FFFFFF","p-id":1832})),html:t=>r.createElement("svg",i({t:1646123902e3,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":9201,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":9202}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":9203}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":9204}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#009688","p-id":9205}),r.createElement("text",{x:352,y:700,fontSize:240,fontWeight:"bold",fill:"#FFFFFF",fontFamily:"Arial, sans-serif",textAnchor:"middle",dominantBaseline:"middle"},"HTML")),jpg:t=>r.createElement("svg",i({t:1646123877293,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1269,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1270}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1271}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1272}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#BAF1CD","p-id":1273}),r.createElement("path",{d:"M320 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m256 32h-80a16 16 0 0 0 0 32h48a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32h32a32 32 0 0 1 32 32 16 16 0 0 0 32 0 64 64 0 0 0-64-64h-32a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64h32a64 64 0 0 0 64-64 16 16 0 0 0 0-32zM208 544a16 16 0 0 0-16 16v144a32 32 0 0 1-64 0v-16a16 16 0 0 0-32 0v16a64 64 0 0 0 128 0V560a16 16 0 0 0-16-16z",fill:"#FFFFFF","p-id":1274})),md:t=>r.createElement("svg",i({t:16461239e5,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":9001,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":9002}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":9003}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":9004}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#000000","p-id":9005}),r.createElement("text",{x:352,y:700,fontSize:240,fontWeight:"bold",fill:"#FFFFFF",fontFamily:"Arial, sans-serif",textAnchor:"middle",dominantBaseline:"middle"},"MD")),mp4:t=>r.createElement("svg",i({t:1646123927989,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1966,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192c-35.328 0-64 28.672-64 64v320h576c35.328 0 64 28.672 64 64v415.744c0 35.328-28.672 64-64 64H128v31.744c0 35.328 28.672 64 64 64h768c35.328 0 64-28.672 64-64v-640L704 0z",fill:"#EAEAEA","p-id":1967}),r.createElement("path",{d:"M704 0v256c0 35.328 28.672 64 64 64h256L704 0z",fill:"#434854","p-id":1968}),r.createElement("path",{d:"M768 320l256 256V320z",opacity:.1,"p-id":1969}),r.createElement("path",{d:"M704 832c0 17.92-14.336 31.744-31.744 31.744H31.744C13.824 863.744 0 849.408 0 832V480.256c0-17.92 14.336-31.744 31.744-31.744h640c17.92 0 31.744 14.336 31.744 31.744V832z",fill:"#724AE2","p-id":1970}),r.createElement("path",{d:"M537.088 547.84c9.728 0 14.336 4.608 14.336 13.824v132.608h18.944c9.728 0.512 14.336 4.608 14.336 13.312s-5.12 13.312-15.36 13.312h-18.432v37.888c-0.512 9.728-5.12 14.336-13.824 14.336s-13.312-5.12-13.312-15.36v-36.864h-79.36c-12.8-0.512-19.456-4.096-19.456-11.776 0-4.096 1.536-7.68 4.096-11.776l94.208-141.312 0.512-1.024c3.584-4.608 8.192-7.168 13.312-7.168z m-302.592-1.536c7.168 0 11.264 5.12 11.264 15.872v193.536c0 10.752-4.608 15.872-11.264 15.872s-11.264-5.12-11.264-15.872V622.08l-44.544 140.8c-2.048 6.144-8.192 8.704-12.288 8.704s-10.24-3.072-12.288-8.704l-46.08-140.8v133.632c0 10.752-6.144 15.872-12.8 15.872s-12.8-5.12-12.8-15.872V562.176c0-10.752 5.632-15.872 12.8-15.872 4.608 0 10.752 3.072 12.8 8.704L166.4 728.064l56.832-173.056c2.048-6.144 6.144-8.704 11.264-8.704z m121.856 0c35.328 0 63.488 28.672 63.488 64 0 34.816-27.648 62.976-62.464 64h-33.28v79.872c0 8.704-7.168 15.872-15.872 15.872-8.192 0-15.36-6.656-15.872-14.848V562.176c0-8.192 6.656-15.36 14.848-15.872h49.152z m166.912 58.368l-59.904 90.112h59.904v-90.112z m-166.912-26.624h-31.744v64h31.744c17.92 0 31.744-14.848 31.744-32.256s-13.824-31.744-31.744-31.744z",fill:"#FFFFFF","p-id":1971})),pdf:t=>r.createElement("svg",i({t:1646123842588,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1304,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192c-35.328 0-64 28.672-64 64v320h576c35.328 0 64 28.672 64 64v415.744c0 35.328-28.672 64-64 64H128v31.744c0 35.328 28.672 64 64 64h768c35.328 0 64-28.672 64-64v-640L704 0z",fill:"#EAEAEA","p-id":1305}),r.createElement("path",{d:"M704 0v256c0 35.328 28.672 64 64 64h256L704 0z",fill:"#434854","p-id":1306}),r.createElement("path",{d:"M768 320l256 256V320z",opacity:.1,"p-id":1307}),r.createElement("path",{d:"M704 832c0 17.92-14.336 31.744-31.744 31.744H31.744C13.824 863.744 0 849.408 0 832V480.256c0-17.92 14.336-31.744 31.744-31.744h640c17.92 0 31.744 14.336 31.744 31.744V832z",fill:"#CD4050","p-id":1308}),r.createElement("path",{d:"M192 544.256h-48.128c-8.704 0-15.872 7.168-15.872 15.872v192c0 8.704 7.168 15.872 15.872 15.872s15.872-7.168 15.872-15.872v-79.872h31.744c35.328 0 64-28.672 64-64s-28.16-64-63.488-64z m158.72 0c34.816 0 62.976 27.648 64 62.464v97.792c0 34.816-27.648 62.976-62.464 64h-49.664c-8.704 0-15.36-6.656-15.872-14.848V560.64c0-8.704 6.656-15.36 14.848-15.872h49.152z m227.328 0c8.704 0 15.872 7.168 15.872 15.872S586.752 576 578.048 576h-80.384v64h48.128c8.704 0 15.872 7.168 15.872 15.872s-7.168 15.872-15.872 15.872h-48.128v79.872c0 8.704-7.168 15.872-15.872 15.872s-15.872-7.168-15.872-15.872v-192c0-8.704 7.168-15.872 15.872-15.872h96.256zM350.72 576h-31.744v159.744h31.744c17.408 0 31.232-13.824 31.744-30.72v-97.28C382.976 590.336 368.64 576 350.72 576zM192 576c17.92 0 31.744 14.336 31.744 31.744S209.92 640 192 640h-31.744v-64H192z",fill:"#FFFFFF","p-id":1309})),png:t=>r.createElement("svg",i({t:1646123868693,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1130,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1131}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1132}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1133}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#BAF1CD","p-id":1134}),r.createElement("path",{d:"M160 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m448 32h-80a16 16 0 0 0 0 32h48a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32h32a32 32 0 0 1 32 32 16 16 0 0 0 32 0 64 64 0 0 0-64-64h-32a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64h32a64 64 0 0 0 64-64 16 16 0 0 0 0-32zM400 544a16 16 0 0 0-16 16v137.6l-98.88-146.56a7.36 7.36 0 0 0-2.24-2.24l-2.56-1.6h-16l-2.56 2.24v5.12a13.76 13.76 0 0 0 0 3.52v192a16 16 0 0 0 32 0v-137.6l96 142.08a15.68 15.68 0 0 0 32-3.2v-192A16 16 0 0 0 400 544z",fill:"#FFFFFF","p-id":1135})),ppt:t=>r.createElement("svg",i({t:1646123861524,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":991,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":992}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":993}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":994}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#F05264","p-id":995}),r.createElement("path",{d:"M192 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m160-96h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m240-96H464a16 16 0 0 0 0 32h48v176a16 16 0 0 0 32 0V576h48a16 16 0 0 0 0-32z",fill:"#FFFFFF","p-id":996})),pptx:t=>r.createElement("svg",i({t:1646123861524,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":991,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":992}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":993}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":994}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#F05264","p-id":995}),r.createElement("path",{d:"M192 544h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m160-96h-48a16 16 0 0 0-16 16v192a16 16 0 0 0 32 0v-80h32a64 64 0 0 0 0-128z m0 96h-32v-64h32a32 32 0 0 1 0 64z m240-96H464a16 16 0 0 0 0 32h48v176a16 16 0 0 0 32 0V576h48a16 16 0 0 0 0-32z",fill:"#FFFFFF","p-id":996})),rar:t=>r.createElement("svg",i({t:1646123940344,className:"icon",viewBox:"0 0 1056 1024",xmlns:"http://www.w3.org/2000/svg","p-id":2245,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M1.248 0h1024v1024h-1024z",fillOpacity:0,"p-id":2246}),r.createElement("path",{d:"M849.248 1024h-672c-41.6 0-76.8-35.2-73.6-80V80c0-41.6 32-76.8 73.6-80h521.6l224 236.8v710.4c0 41.6-32 76.8-73.6 76.8z",fill:"#F5F1EC","p-id":2247}),r.createElement("path",{d:"M922.848 313.6h-819.2V80c0-41.6 32-76.8 73.6-80h521.6l224 236.8v76.8z",fill:"#E0B773","p-id":2248}),r.createElement("path",{d:"M244.448 252.8v-57.6h25.6l25.6 54.4h25.6l-32-54.4c19.2-6.4 25.6-19.2 25.6-35.2 0-12.8-3.2-22.4-12.8-28.8-6.4-6.4-16-9.6-25.6-9.6h-51.2v131.2h19.2z m32-73.6h-32v-38.4h32c6.4 0 9.6 0 16 3.2 3.2 3.2 3.2 6.4 3.2 16 0 6.4-3.2 9.6-6.4 12.8 0 3.2-6.4 6.4-12.8 6.4z m83.2 73.6l9.6-28.8h48l9.6 28.8h22.4l-48-131.2h-16l-48 131.2h22.4z m54.4-48h-38.4l19.2-57.6 19.2 57.6z m86.4 48v-57.6h25.6l25.6 54.4h22.4l-28.8-54.4c16-6.4 25.6-19.2 25.6-35.2 0-12.8-3.2-22.4-12.8-28.8-6.4-6.4-16-9.6-25.6-9.6h-51.2v131.2h19.2z m28.8-73.6h-28.8v-38.4h32c6.4 0 9.6 0 16 3.2 3.2 3.2 6.4 6.4 6.4 16 0 6.4-3.2 9.6-6.4 12.8-6.4 3.2-12.8 6.4-19.2 6.4z",fill:"#FFFFFF","p-id":2249}),r.createElement("path",{d:"M922.848 236.8h-150.4c-41.6 0-76.8-35.2-73.6-80V0l112 118.4 112 118.4z",fill:"#F5F1EC","p-id":2250}),r.createElement("path",{d:"M426.848 464v409.6h172.8V464h-172.8z m150.4 140.8h-64v41.6h64v44.8h-64v41.6h64v44.8h-64v44.8h-64v-44.8h64v-44.8h-64v-41.6h64v-44.8h-64v-41.6h64v-41.6h-64v-44.8h64v44.8h64v41.6z",fill:"#E0B773","p-id":2251})),svg:t=>r.createElement("svg",i({t:1646123950101,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":2385,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":2386}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":2387}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":2388}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#BAF1CD","p-id":2389}),r.createElement("path",{d:"M160 640a32 32 0 0 1 0-64h48a16 16 0 0 0 0-32h-48a64 64 0 0 0 0 128 32 32 0 0 1 0 64h-48a16 16 0 0 0 0 32h48a64 64 0 0 0 0-128z m246.08-96a16 16 0 0 0-20.8 8.96l-64 155.84-64-155.84a16 16 0 1 0-29.44 11.84l77.76 192a24.96 24.96 0 0 0 3.2 4.8 12.8 12.8 0 0 0 4.8 3.2 12.8 12.8 0 0 0 4.8 0h5.76l3.2-2.24a13.12 13.12 0 0 0 5.44-6.4l77.76-192a15.68 15.68 0 0 0-4.48-20.16zM576 672h-80a16 16 0 0 0 0 32h48a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-96a32 32 0 0 1 32-32h32a32 32 0 0 1 32 32 16 16 0 0 0 32 0 64 64 0 0 0-64-64h-32a64 64 0 0 0-64 64v96a64 64 0 0 0 64 64h32a64 64 0 0 0 64-64 16 16 0 0 0 0-32z",fill:"#FFFFFF","p-id":2390})),txt:t=>r.createElement("svg",i({t:1646123901e3,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":9101,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":9102}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":9103}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":9104}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#999999","p-id":9105}),r.createElement("text",{x:352,y:700,fontSize:240,fontWeight:"bold",fill:"#FFFFFF",fontFamily:"Arial, sans-serif",textAnchor:"middle",dominantBaseline:"middle"},"TXT")),unknow:t=>r.createElement("svg",i({t:1646123889587,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1551,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M914.92 287.344L697.718 81.474v128.338c0 43.554 34.968 79.189 77.706 79.189h141.99l-2.494-1.657z",fill:"#027AFF","p-id":1552}),r.createElement("path",{d:"M768.284 316.733c-54.48 0-99.056-48.997-99.056-108.882V66.223h-373.35c-30.593 0-55.624 27-55.624 60v348.869h490.802c37.476 0 68.137 33.073 68.137 73.496v207.894c0 40.424-30.661 73.497-68.137 73.497H240.254v70.128c0 33 25.031 60 55.625 60h563.637c30.594 0 55.625-27 55.625-60V316.733H768.284z",fill:"#027AFF","p-id":1553}),r.createElement("path",{d:"M699.302 519.057H156.028c-31.109 0-56.561 25.381-56.561 56.403v153.038c0 31.021 25.452 56.402 56.561 56.402h543.274c31.11 0 56.562-25.38 56.562-56.402V575.46c0-31.022-25.453-56.403-56.562-56.403z m-444.857 211.51c-4.902 4.135-10.558 6.203-16.874 6.203-6.41 0-12.066-2.068-16.874-6.204-4.902-4.042-7.353-9.118-7.353-15.417 0-6.204 2.451-11.468 7.353-15.604 4.902-4.042 10.558-6.016 16.874-6.016 6.41 0 12.16 1.974 17.157 6.016 4.902 4.136 7.353 9.4 7.353 15.604-0.094 6.11-2.545 11.28-7.636 15.417z m29.884-89.775c-2.263 2.068-9.993 6.957-23.379 14.571-3.865 2.256-6.222 4.136-7.07 5.64-0.566 0.846-0.849 2.82-0.849 6.016 0 4.7-1.508 8.367-4.619 10.81-2.828 2.539-6.222 3.761-10.464 3.761-4.43 0-8.107-1.128-10.84-3.29-3.489-2.632-5.186-6.392-5.186-11.28v-10.247c0-7.896 3.583-14.477 10.841-19.553 6.976-3.572 13.764-7.238 20.457-10.81 7.259-3.854 10.84-8.367 10.84-13.349 0-10.998-8.578-16.45-25.735-16.45-7.824 0-13.952 1.88-18.57 5.64-2.357 2.068-5.94 6.486-10.653 13.348-4.148 6.017-9.05 8.93-14.612 8.93-4.336 0-7.918-1.503-10.84-4.605-2.923-2.82-4.431-6.487-4.431-10.999 0-7.238 4.43-15.229 13.197-24.159 11.69-12.126 27.055-18.143 45.91-18.143 16.874 0 30.637 4.418 41.384 13.349 10.18 8.46 15.271 18.989 15.271 31.68 0 12.69-3.488 22.372-10.652 29.14zM442.7 730.566c-4.902 4.136-10.558 6.204-16.874 6.204-6.41 0-12.066-2.068-16.874-6.204-4.902-4.042-7.353-9.118-7.353-15.417 0-6.204 2.45-11.468 7.353-15.604 4.902-4.042 10.558-6.016 16.874-6.016 6.41 0 12.16 1.974 17.157 6.016 4.902 4.136 7.353 9.4 7.353 15.604-0.094 6.11-2.64 11.28-7.636 15.417z m29.884-89.774c-2.263 2.068-9.993 6.957-23.38 14.571-3.864 2.256-6.221 4.136-7.07 5.64-0.565 0.846-0.848 2.82-0.848 6.016 0 4.7-1.508 8.367-4.619 10.81-2.828 2.539-6.222 3.761-10.464 3.761-4.43 0-8.107-1.128-10.84-3.29-3.489-2.632-5.186-6.392-5.186-11.28v-10.247c0-7.896 3.583-14.477 10.841-19.553 6.976-3.572 13.764-7.238 20.457-10.81 7.258-3.854 10.84-8.367 10.84-13.349 0-10.998-8.578-16.45-25.735-16.45-7.824 0-13.952 1.88-18.57 5.64-2.358 2.068-5.94 6.486-10.653 13.348-4.148 6.017-9.05 8.93-14.612 8.93-4.336 0-7.919-1.503-10.841-4.605-2.922-2.82-4.43-6.487-4.43-10.999 0-7.238 4.43-15.229 13.197-24.159 11.69-12.126 27.055-18.143 45.91-18.143 16.873 0 30.637 4.418 41.383 13.349 10.181 8.46 15.272 18.989 15.272 31.68 0 12.69-3.582 22.372-10.652 29.14z m158.372 89.774c-4.902 4.136-10.558 6.204-16.874 6.204-6.41 0-12.067-2.068-16.874-6.204-4.902-4.042-7.353-9.118-7.353-15.417 0-6.204 2.45-11.468 7.353-15.604 4.902-4.042 10.558-6.016 16.874-6.016 6.41 0 12.16 1.974 17.157 6.016 4.902 4.136 7.353 9.4 7.353 15.604-0.094 6.11-2.64 11.28-7.636 15.417z m29.883-89.774c-2.262 2.068-9.992 6.957-23.378 14.571-3.865 2.256-6.222 4.136-7.07 5.64-0.566 0.846-0.85 2.82-0.85 6.016 0 4.7-1.507 8.367-4.618 10.81-2.828 2.539-6.222 3.761-10.464 3.761-4.43 0-8.107-1.128-10.841-3.29-3.488-2.632-5.185-6.392-5.185-11.28v-10.247c0-7.896 3.582-14.477 10.841-19.553 6.976-3.572 13.763-7.238 20.456-10.81 7.26-3.854 10.841-8.367 10.841-13.349 0-10.998-8.578-16.45-25.735-16.45-7.824 0-13.952 1.88-18.571 5.64-2.357 2.068-5.94 6.486-10.653 13.348-4.147 6.017-9.05 8.93-14.611 8.93-4.337 0-7.919-1.503-10.841-4.605-2.923-2.82-4.43-6.487-4.43-10.999 0-7.238 4.43-15.229 13.197-24.159 11.69-12.126 27.055-18.143 45.909-18.143 16.874 0 30.637 4.418 41.384 13.349 10.181 8.46 15.272 18.989 15.272 31.68 0 12.69-3.582 22.372-10.653 29.14z",fill:"#027AFF","p-id":1554})),xls:t=>r.createElement("svg",i({t:1646123896342,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1688,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1689}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1690}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1691}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#009688","p-id":1692}),r.createElement("path",{d:"M512 640a32 32 0 0 1 0-64h48a16 16 0 0 0 0-32h-48a64 64 0 0 0 0 128 32 32 0 0 1 0 64h-48a16 16 0 0 0 0 32h48a64 64 0 0 0 0-128z m-112 96h-80V560a16 16 0 0 0-32 0v192a16 16 0 0 0 16 16h96a16 16 0 0 0 0-32z m-146.88 8.32l-57.6-91.84 52.8-84.16a15.36 15.36 0 0 0-6.08-21.76 18.56 18.56 0 0 0-23.68 5.76l-42.88 68.8-42.88-68.8a18.56 18.56 0 0 0-23.68-5.76 15.36 15.36 0 0 0-6.4 21.76l53.12 84.16-57.6 91.84a15.36 15.36 0 0 0 6.4 21.76A17.92 17.92 0 0 0 128 760l47.68-75.84L224 760a18.56 18.56 0 0 0 23.68 6.08 15.36 15.36 0 0 0 5.44-21.76z",fill:"#FFFFFF","p-id":1693})),xlsx:t=>r.createElement("svg",i({t:1646123896342,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":1688,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M704 0H192a64 64 0 0 0-64 64v320h576a64 64 0 0 1 64 64v416a64 64 0 0 1-64 64H128v32a64 64 0 0 0 64 64h768a64 64 0 0 0 64-64V320z",fill:"#EAEAEA","p-id":1689}),r.createElement("path",{d:"M704 0v256a64 64 0 0 0 64 64h256z",fill:"#434854","p-id":1690}),r.createElement("path",{d:"M768 320l256 256V320H768z",opacity:.1,"p-id":1691}),r.createElement("path",{d:"M704 832a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32V480a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32z",fill:"#009688","p-id":1692}),r.createElement("path",{d:"M512 640a32 32 0 0 1 0-64h48a16 16 0 0 0 0-32h-48a64 64 0 0 0 0 128 32 32 0 0 1 0 64h-48a16 16 0 0 0 0 32h48a64 64 0 0 0 0-128z m-112 96h-80V560a16 16 0 0 0-32 0v192a16 16 0 0 0 16 16h96a16 16 0 0 0 0-32z m-146.88 8.32l-57.6-91.84 52.8-84.16a15.36 15.36 0 0 0-6.08-21.76 18.56 18.56 0 0 0-23.68 5.76l-42.88 68.8-42.88-68.8a18.56 18.56 0 0 0-23.68-5.76 15.36 15.36 0 0 0-6.4 21.76l53.12 84.16-57.6 91.84a15.36 15.36 0 0 0 6.4 21.76A17.92 17.92 0 0 0 128 760l47.68-75.84L224 760a18.56 18.56 0 0 0 23.68 6.08 15.36 15.36 0 0 0 5.44-21.76z",fill:"#FFFFFF","p-id":1693})),zip:t=>r.createElement("svg",i({t:1646123936994,className:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","p-id":2105,xmlnsXlink:"http://www.w3.org/1999/xlink",width:"1em",height:"1em"},t),r.createElement("defs",null,r.createElement("style",{type:"text/css"})),r.createElement("path",{d:"M0 0h1024v1024H0z",fillOpacity:0,"p-id":2106}),r.createElement("path",{d:"M848 1024H176c-41.6 0-76.8-35.2-73.6-80V80c0-41.6 32-76.8 73.6-80h521.6l224 236.8v710.4c0 41.6-32 76.8-73.6 76.8z",fill:"#F5ECEC","p-id":2107}),r.createElement("path",{d:"M921.6 313.6H102.4V80c0-41.6 32-76.8 73.6-80h521.6l224 236.8v76.8z",fill:"#BC8585","p-id":2108}),r.createElement("path",{d:"M300.8 252.8v-19.2H240l57.6-96v-16h-80v16h57.6l-57.6 96v16h83.2z m70.4 0V121.6H352v131.2h19.2z m80 0v-51.2H480c12.8 0 22.4-3.2 32-12.8 6.4-6.4 9.6-16 9.6-25.6 0-6.4 0-12.8-3.2-19.2-3.2-6.4-6.4-9.6-9.6-12.8-6.4-3.2-9.6-6.4-16-6.4h-64V256h22.4z m28.8-70.4h-28.8v-41.6H480c6.4 0 9.6 0 12.8 3.2 3.2 0 3.2 3.2 6.4 6.4 0 3.2 3.2 6.4 3.2 9.6 0 6.4-3.2 9.6-6.4 12.8-3.2 6.4-9.6 9.6-16 9.6z",fill:"#FFFFFF","p-id":2109}),r.createElement("path",{d:"M921.6 236.8H771.2c-41.6 0-76.8-35.2-73.6-80V0l112 118.4 112 118.4z",fill:"#F5ECEC","p-id":2110}),r.createElement("path",{d:"M425.6 464v409.6h172.8V464H425.6zM576 604.8h-64v41.6h64v44.8h-64v41.6h64v44.8h-64v44.8h-64v-44.8h64v-44.8h-64v-41.6h64v-44.8h-64v-41.6h64v-41.6h-64v-44.8h64v44.8h64v41.6z",fill:"#BC8585","p-id":2111}))};const a=t=>{const{size:e,type:n}=Object.assign({},{size:40,type:"unknow"},t),i=s[n]||s.unknow;return r.createElement(i,{width:e,height:e})}},7717(t,e,n){"use strict";n.d(e,{A:()=>a});var r=n(3141),i=n(94922),s=n(78678);const a=function(t,e){e=Object.assign({},{defaultValue:"defaultValue",value:"value",onChange:"onChange"},e);var n=(0,i.useRef)(e.value in t),a=(0,i.useState)(t[e.defaultValue]),o=(0,r.A)(a,2),l=o[0],c=o[1],h=n.current?t[e.value]:l;return[h,(0,s.A)(function(r){for(var i="function"===typeof r?h=r(h):r,s=arguments.length,a=new Array(s>1?s-1:0),o=1;o<s;o++)a[o-1]=arguments[o];t[e.onChange]&&t[e.onChange].apply(t,[i].concat(a)),n.current||c(i)})]}},78678(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(94922);const i=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,r.useRef)(t);return e||(n.current=t),(0,r.useCallback)(function(){return n.current&&n.current(...arguments)},[])}},50805(t,e,n){"use strict";n.d(e,{A:()=>c});var r=n(94922),i=n(98771),s=n.n(i),a=n(95600),o=n.n(a),l=n(78678);const c=(t,e)=>{const n=(0,r.useRef)(null);n.current=Object.assign({},{time:500,isDebounce:!1},e);const i=(0,r.useRef)(null),a=(0,l.A)(t);return(0,r.useLayoutEffect)(()=>{const t=i.current,e=()=>window.requestAnimationFrame(()=>{t&&a(t)});e();const r=new ResizeObserver((n.current.isDebounce?o():s())(e,n.current.time));return t&&r.observe(t),()=>{r.disconnect()}},[a]),i}},14225(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=n(13575),i=n(97279),s=n(55e3),a=n(70211),o=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(t,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var h=n(80031);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var d=n(13578);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var u=n(3351);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var p=n(19252);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},26061(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends n{constructor(t){super(),this._items="string"===typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce((t,e)=>`${t}${e}`,"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce((t,e)=>(e instanceof r&&(t[e.str]=(t[e.str]||0)+1),t),{})}}function s(t){const e=[t[0]];let n=0;for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];for(;n<s.length;)l(e,s[n]),e.push(t[++n]);return new i(e)}e._Code=i,e.nil=new i(""),e._=s;const a=new i("+");function o(t){const e=[h(t[0])];let n=0;for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];for(;n<s.length;)e.push(a),l(e,s[n]),e.push(a,h(t[++n]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===a){const n=c(t[e-1],t[e+1]);if(void 0!==n){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}(e),new i(e)}function l(t,e){var n;e instanceof i?t.push(...e._items):e instanceof r?t.push(e):t.push("number"==typeof(n=e)||"boolean"==typeof n||null===n?n:h(Array.isArray(n)?n.join(","):n))}function c(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof r||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof r?void 0:`"${t}${e.slice(1)}`}function h(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=o,e.addCodeArg=l,e.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:o`${t}${e}`},e.stringify=function(t){return new i(h(t))},e.safeStringify=h,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new i(`.${t}`):s`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new i(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(t){return new i(t.toString())}},13578(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const r=n(26061),i=n(60930);var s=n(26061);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return s.Name}});var a=n(60930);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class o{optimizeNodes(){return this}optimizeNames(t,e){return this}}class l extends o{constructor(t,e,n){super(),this.varKind=t,this.name=e,this.rhs=n}render(t){let{es5:e,_n:n}=t;const r=e?i.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+n}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,t,e)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends o{constructor(t,e,n){super(),this.lhs=t,this.rhs=e,this.sideEffects=n}render(t){let{_n:e}=t;return`${this.lhs} = ${this.rhs};`+e}optimizeNames(t,e){if(!(this.lhs instanceof r.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,t,e),this}get names(){return M(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class h extends c{constructor(t,e,n,r){super(t,n,r),this.op=e}render(t){let{_n:e}=t;return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends o{constructor(t){super(),this.label=t,this.names={}}render(t){let{_n:e}=t;return`${this.label}:`+e}}class u extends o{constructor(t){super(),this.label=t,this.names={}}render(t){let{_n:e}=t;return`break${this.label?` ${this.label}`:""};`+e}}class p extends o{constructor(t){super(),this.error=t}render(t){let{_n:e}=t;return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends o{constructor(t){super(),this.code=t}render(t){let{_n:e}=t;return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=P(this.code,t,e),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends o{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.nodes=t}render(t){return this.nodes.reduce((e,n)=>e+n.render(t),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const n=t[e].optimizeNodes();Array.isArray(n)?t.splice(e,1,...n):n?t[e]=n:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:n}=this;let r=n.length;for(;r--;){const i=n[r];i.optimizeNames(t,e)||(I(t,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,e)=>D(t,e.names),{})}}class g extends m{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class v extends m{}class b extends g{}b.kind="else";class y extends g{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new b(t):t}return e?!1===t?e instanceof y?e:e.nodes:this.nodes.length?this:new y(F(t),e instanceof y?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=P(this.condition,t,e),this}get names(){const t=super.names;return M(t,this.condition),this.else&&D(t,this.else.names),t}}y.kind="if";class w extends g{}w.kind="for";class _ extends w{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=P(this.iteration,t,e),this}get names(){return D(super.names,this.iteration.names)}}class A extends w{constructor(t,e,n,r){super(),this.varKind=t,this.name=e,this.from=n,this.to=r}render(t){const e=t.es5?i.varKinds.var:this.varKind,{name:n,from:r,to:s}=this;return`for(${e} ${n}=${r}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){const t=M(super.names,this.from);return M(t,this.to)}}class x extends w{constructor(t,e,n,r){super(),this.loop=t,this.varKind=e,this.name=n,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=P(this.iterable,t,e),this}get names(){return D(super.names,this.iterable.names)}}class E extends g{constructor(t,e,n){super(),this.name=t,this.args=e,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}E.kind="func";class k extends m{render(t){return"return "+super.render(t)}}k.kind="return";class C extends g{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var n,r;return super.optimizeNames(t,e),null===(n=this.catch)||void 0===n||n.optimizeNames(t,e),null===(r=this.finally)||void 0===r||r.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&D(t,this.catch.names),this.finally&&D(t,this.finally.names),t}}class S extends g{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}S.kind="catch";class T extends g{render(t){return"finally"+super.render(t)}}T.kind="finally";function D(t,e){for(const n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function M(t,e){return e instanceof r._CodeOrName?D(t,e.names):t}function P(t,e,n){return t instanceof r.Name?s(t):(i=t)instanceof r._Code&&i._items.some(t=>t instanceof r.Name&&1===e[t.str]&&void 0!==n[t.str])?new r._Code(t._items.reduce((t,e)=>(e instanceof r.Name&&(e=s(e)),e instanceof r._Code?t.push(...e._items):t.push(e),t),[])):t;var i;function s(t){const r=n[t.str];return void 0===r||1!==e[t.str]?t:(delete e[t.str],r)}}function I(t,e){for(const n in e)t[n]=(t[n]||0)-(e[n]||0)}function F(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:r._`!${O(t)}`}e.CodeGen=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new i.Scope({parent:t}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const n=this._extScope.value(t,e);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,n,r){const i=this._scope.toName(e);return void 0!==n&&r&&(this._constants[i.str]=n),this._leafNode(new l(t,i,n)),i}const(t,e,n){return this._def(i.varKinds.const,t,e,n)}let(t,e,n){return this._def(i.varKinds.let,t,e,n)}var(t,e,n){return this._def(i.varKinds.var,t,e,n)}assign(t,e,n){return this._leafNode(new c(t,e,n))}add(t,n){return this._leafNode(new h(t,e.operators.ADD,n))}code(t){return"function"==typeof t?t():t!==r.nil&&this._leafNode(new f(t)),this}object(){const t=["{"];for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];for(const[s,a]of n)t.length>1&&t.push(","),t.push(s),(s!==a||this.opts.es5)&&(t.push(":"),(0,r.addCodeArg)(t,a));return t.push("}"),new r._Code(t)}if(t,e,n){if(this._blockNode(new y(t)),e&&n)this.code(e).else().code(n).endIf();else if(e)this.code(e).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new y(t))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(y,b)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new _(t),e)}forRange(t,e,n,r){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?i.varKinds.var:i.varKinds.let;const a=this._scope.toName(t);return this._for(new A(s,a,e,n),()=>r(a))}forOf(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.varKinds.const;const a=this._scope.toName(t);if(this.opts.es5){const t=e instanceof r.Name?e:this.var("_arr",e);return this.forRange("_i",0,r._`${t}.length`,e=>{this.var(a,r._`${t}[${e}]`),n(a)})}return this._for(new x("of",s,a,e),()=>n(a))}forIn(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?i.varKinds.var:i.varKinds.const;if(this.opts.ownProperties)return this.forOf(t,r._`Object.keys(${e})`,n);const a=this._scope.toName(t);return this._for(new x("in",s,a,e),()=>n(a))}endFor(){return this._endBlockNode(w)}label(t){return this._leafNode(new d(t))}break(t){return this._leafNode(new u(t))}return(t){const e=new k;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(t,e,n){if(!e&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new C;if(this._blockNode(r),this.code(t),e){const t=this.name("e");this._currNode=r.catch=new S(t),e(t)}return n&&(this._currNode=r.finally=new T,this.code(n)),this._endBlockNode(S,T)}throw(t){return this._leafNode(new p(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-e;if(n<0||void 0!==t&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=e,this}func(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.nil,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this._blockNode(new E(t,e,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const n=this._currNode;if(n instanceof t||e&&n instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},e.not=F;const R=L(e.operators.AND);e.and=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(R)};const N=L(e.operators.OR);function L(t){return(e,n)=>e===r.nil?n:n===r.nil?e:r._`${O(e)} ${t} ${O(n)}`}function O(t){return t instanceof r.Name?t:r._`(${t})`}e.or=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(N)}},60930(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const r=n(26061);class i extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var s;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(s||(e.UsedValueState=s={})),e.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class a{constructor(){let{prefixes:t,parent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof r.Name?t:this.name(t)}name(t){return new r.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,n;if((null===(n=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===n?void 0:n.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}e.Scope=a;class o extends r.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,e){let{property:n,itemIndex:i}=e;this.value=t,this.scopePath=r._`.${new r.Name(n)}[${i}]`}}e.ValueScopeName=o;const l=r._`\n`;e.ValueScope=class extends a{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?l:r.nil}}get(){return this._scope}name(t){return new o(t,this._newName(t))}value(t,e){var n;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(t),{prefix:i}=r,s=null!==(n=e.key)&&void 0!==n?n:e.ref;let a=this._values[i];if(a){const t=a.get(s);if(t)return t}else a=this._values[i]=new Map;a.set(s,r);const o=this._scope[i]||(this._scope[i]=[]),l=o.length;return o[l]=e.ref,r.setValue(e,{property:i,itemIndex:l}),r}getValue(t,e){const n=this._values[t];if(n)return n.get(e)}scopeRefs(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values;return this._reduceValues(e,e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return r._`${t}${e.scopePath}`})}scopeCode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return this._reduceValues(t,t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code},e,n)}_reduceValues(t,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0,l=r.nil;for(const c in t){const h=t[c];if(!h)continue;const d=a[c]=a[c]||new Map;h.forEach(t=>{if(d.has(t))return;d.set(t,s.Started);let a=n(t);if(a){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;l=r._`${l}${n} ${t} = ${a};${this.opts._n}`}else{if(!(a=null===o||void 0===o?void 0:o(t)))throw new i(t);l=r._`${l}${a}${this.opts._n}`}d.set(t,s.Completed)})}return l}}},7009(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const r=n(13578),i=n(14426),s=n(81500);function a(t,e){const n=t.const("err",e);t.if(r._`${s.default.vErrors} === null`,()=>t.assign(s.default.vErrors,r._`[${n}]`),r._`${s.default.vErrors}.push(${n})`),t.code(r._`${s.default.errors}++`)}function o(t,e){const{gen:n,validateName:i,schemaEnv:s}=t;s.$async?n.throw(r._`new ${t.ValidationError}(${e})`):(n.assign(r._`${i}.errors`,e),n.return(!1))}e.keywordError={message:t=>{let{keyword:e}=t;return r.str`must pass "${e}" keyword validation`}},e.keyword$DataError={message:t=>{let{keyword:e,schemaType:n}=t;return n?r.str`"${e}" keyword must be ${n} ($data)`:r.str`"${e}" keyword is invalid ($data)`}},e.reportError=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const{it:l}=t,{gen:h,compositeRule:d,allErrors:u}=l,p=c(t,n,i);(null!==s&&void 0!==s?s:d||u)?a(h,p):o(l,r._`[${p}]`)},e.reportExtraError=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.keywordError,r=arguments.length>2?arguments[2]:void 0;const{it:i}=t,{gen:l,compositeRule:h,allErrors:d}=i;a(l,c(t,n,r)),h||d||o(i,s.default.vErrors)},e.resetErrorsCount=function(t,e){t.assign(s.default.errors,e),t.if(r._`${s.default.vErrors} !== null`,()=>t.if(e,()=>t.assign(r._`${s.default.vErrors}.length`,e),()=>t.assign(s.default.vErrors,null)))},e.extendErrors=function(t){let{gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:l}=t;if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,t=>{e.const(c,r._`${s.default.vErrors}[${t}]`),e.if(r._`${c}.instancePath === undefined`,()=>e.assign(r._`${c}.instancePath`,(0,r.strConcat)(s.default.instancePath,l.errorPath))),e.assign(r._`${c}.schemaPath`,r.str`${l.errSchemaPath}/${n}`),l.opts.verbose&&(e.assign(r._`${c}.schema`,i),e.assign(r._`${c}.data`,a))})};const l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function c(t,e,n){const{createErrors:i}=t.it;return!1===i?r._`{}`:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{gen:i,it:a}=t,o=[h(a,n),d(t,n)];return function(t,e,n){let{params:i,message:a}=e;const{keyword:o,data:c,schemaValue:h,it:d}=t,{opts:u,propertyName:p,topSchemaRef:f,schemaPath:m}=d;n.push([l.keyword,o],[l.params,"function"==typeof i?i(t):i||r._`{}`]),u.messages&&n.push([l.message,"function"==typeof a?a(t):a]);u.verbose&&n.push([l.schema,h],[l.parentSchema,r._`${f}${m}`],[s.default.data,c]);p&&n.push([l.propertyName,p])}(t,e,o),i.object(...o)}(t,e,n)}function h(t,e){let{errorPath:n}=t,{instancePath:a}=e;const o=a?r.str`${n}${(0,i.getErrorPath)(a,i.Type.Str)}`:n;return[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,o)]}function d(t,e){let{keyword:n,it:{errSchemaPath:s}}=t,{schemaPath:a,parentSchema:o}=e,c=o?s:r.str`${s}/${n}`;return a&&(c=r.str`${c}${(0,i.getErrorPath)(a,i.Type.Str)}`),[l.schemaPath,c]}},28208(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const r=n(13578),i=n(3351),s=n(81500),a=n(48904),o=n(14426),l=n(80031);class c{constructor(t){var e;let n;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,a.normalizeId)(null===n||void 0===n?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null===n||void 0===n?void 0:n.$async,this.refs={}}}function h(t){const e=u.call(this,t);if(e)return e;const n=(0,a.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:o,lines:c}=this.opts.code,{ownProperties:h}=this.opts,d=new r.CodeGen(this.scope,{es5:o,lines:c,ownProperties:h});let p;t.$async&&(p=d.scopeValue("Error",{ref:i.default,code:r._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");t.validateName=f;const m={gen:d,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,r.stringify)(t.schema)}:{ref:t.schema}),validateName:f,ValidationError:p,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:r.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:r._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(t),(0,l.validateFunctionCode)(m),d.optimize(this.opts.code.optimize);const e=d.toString();g=`${d.scopeRefs(s.default.scope)}return ${e}`,this.opts.code.process&&(g=this.opts.code.process(g,t));const n=new Function(`${s.default.self}`,`${s.default.scope}`,g)(this,this.scope.get());if(this.scope.value(f,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:f,validateCode:e,scopeValues:d._values}),this.opts.unevaluated){const{props:t,items:e}=m;n.evaluated={props:t instanceof r.Name?void 0:t,items:e instanceof r.Name?void 0:e,dynamicProps:t instanceof r.Name,dynamicItems:e instanceof r.Name},n.source&&(n.source.evaluated=(0,r.stringify)(n.evaluated))}return t.validate=n,t}catch(v){throw delete t.validate,delete t.validateName,g&&this.logger.error("Error compiling schema, function code:",g),v}finally{this._compilations.delete(t)}}function d(t){return(0,a.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:h.call(this,t)}function u(t){for(const e of this._compilations)if(p(e,t))return e}function p(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function f(t,e){let n;for(;"string"==typeof(n=this.refs[e]);)e=n;return n||this.schemas[e]||m.call(this,t,e)}function m(t,e){const n=this.opts.uriResolver.parse(e),r=(0,a._getFullPath)(this.opts.uriResolver,n);let i=(0,a.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===i)return v.call(this,n,t);const s=(0,a.normalizeId)(r),o=this.refs[s]||this.schemas[s];if("string"==typeof o){const e=m.call(this,t,o);if("object"!==typeof(null===e||void 0===e?void 0:e.schema))return;return v.call(this,n,e)}if("object"===typeof(null===o||void 0===o?void 0:o.schema)){if(o.validate||h.call(this,o),s===(0,a.normalizeId)(e)){const{schema:e}=o,{schemaId:n}=this.opts,r=e[n];return r&&(i=(0,a.resolveUrl)(this.opts.uriResolver,i,r)),new c({schema:e,schemaId:n,root:t,baseId:i})}return v.call(this,n,o)}}e.SchemaEnv=c,e.compileSchema=h,e.resolveRef=function(t,e,n){var r;n=(0,a.resolveUrl)(this.opts.uriResolver,e,n);const i=t.refs[n];if(i)return i;let s=f.call(this,t,n);if(void 0===s){const i=null===(r=t.localRefs)||void 0===r?void 0:r[n],{schemaId:a}=this.opts;i&&(s=new c({schema:i,schemaId:a,root:t,baseId:e}))}return void 0!==s?t.refs[n]=d.call(this,s):void 0},e.getCompilingSchema=u,e.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(t,e){let{baseId:n,schema:r,root:i}=e;var s;if("/"!==(null===(s=t.fragment)||void 0===s?void 0:s[0]))return;for(const c of t.fragment.slice(1).split("/")){if("boolean"===typeof r)return;const t=r[(0,o.unescapeFragment)(c)];if(void 0===t)return;r=t;const e="object"===typeof r&&r[this.opts.schemaId];!g.has(c)&&e&&(n=(0,a.resolveUrl)(this.opts.uriResolver,n,e))}let l;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const t=(0,a.resolveUrl)(this.opts.uriResolver,n,r.$ref);l=m.call(this,i,t)}const{schemaId:h}=this.opts;return l=l||new c({schema:r,schemaId:h,root:i,baseId:n}),l.schema!==l.root.schema?l:void 0}},81500(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};e.default=i},19252(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(48904);class i extends Error{constructor(t,e,n,i){super(i||`can't resolve reference ${n} from id ${e}`),this.missingRef=(0,r.resolveUrl)(t,e,n),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(t,this.missingRef))}}e.default=i},48904(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const r=n(14426),i=n(83080),s=n(69453),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===e?!l(t):!!e&&c(t)<=e)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(t){for(const e in t){if(o.has(e))return!0;const n=t[e];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(t){let e=0;for(const n in t){if("$ref"===n)return 1/0;if(e++,!a.has(n)&&("object"==typeof t[n]&&(0,r.eachItem)(t[n],t=>e+=c(t)),e===1/0))return 1/0}return e}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(e=p(e));const n=t.parse(e);return d(t,n)}function d(t,e){return t.serialize(e).split("#")[0]+"#"}e.getFullPath=h,e._getFullPath=d;const u=/#\/?$/;function p(t){return t?t.replace(u,""):""}e.normalizeId=p,e.resolveUrl=function(t,e,n){return n=p(n),t.resolve(e,n)};const f=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:r}=this.opts,a=p(t[n]||e),o={"":a},l=h(r,a,!1),c={},d=new Set;return s(t,{allKeys:!0},(t,e,r,i)=>{if(void 0===i)return;const s=l+e;let a=o[i];function h(e){const n=this.opts.uriResolver.resolve;if(e=p(a?n(a,e):e),d.has(e))throw m(e);d.add(e);let r=this.refs[e];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?u(t,r.schema,e):e!==p(s)&&("#"===e[0]?(u(t,c[e],e),c[e]=t):this.refs[e]=s),e}function g(t){if("string"==typeof t){if(!f.test(t))throw new Error(`invalid anchor "${t}"`);h.call(this,`#${t}`)}}"string"==typeof t[n]&&(a=h.call(this,t[n])),g.call(this,t.$anchor),g.call(this,t.$dynamicAnchor),o[e]=a}),c;function u(t,e,n){if(void 0!==e&&!i(t,e))throw m(n)}function m(t){return new Error(`reference "${t}" resolves to more than one schema`)}}},66223(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(t){return"string"==typeof t&&n.has(t)},e.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}},14426(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const r=n(13578),i=n(26061);function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.schema;const{opts:n,self:r}=t;if(!n.strictSchema)return;if("boolean"===typeof e)return;const i=r.RULES.keywords;for(const s in e)i[s]||f(t,`unknown keyword: "${s}"`)}function a(t,e){if("boolean"==typeof t)return!t;for(const n in t)if(e[n])return!0;return!1}function o(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function l(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function c(t){let{mergeNames:e,mergeToName:n,mergeValues:i,resultToName:s}=t;return(t,a,o,l)=>{const c=void 0===o?a:o instanceof r.Name?(a instanceof r.Name?e(t,a,o):n(t,a,o),o):a instanceof r.Name?(n(t,o,a),a):i(a,o);return l!==r.Name||c instanceof r.Name?c:s(t,c)}}function h(t,e){if(!0===e)return t.var("props",!0);const n=t.var("props",r._`{}`);return void 0!==e&&d(t,n,e),n}function d(t,e,n){Object.keys(n).forEach(n=>t.assign(r._`${e}${(0,r.getProperty)(n)}`,!0))}e.toHash=function(t){const e={};for(const n of t)e[n]=!0;return e},e.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(s(t,e),!a(e,t.self.RULES.all))},e.checkUnknownRules=s,e.schemaHasRules=a,e.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const n in t)if("$ref"!==n&&e.all[n])return!0;return!1},e.schemaRefOrVal=function(t,e,n,i){let{topSchemaRef:s,schemaPath:a}=t;if(!i){if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e)return r._`${e}`}return r._`${s}${a}${(0,r.getProperty)(n)}`},e.unescapeFragment=function(t){return l(decodeURIComponent(t))},e.escapeFragment=function(t){return encodeURIComponent(o(t))},e.escapeJsonPointer=o,e.unescapeJsonPointer=l,e.eachItem=function(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)},e.mergeEvaluated={props:c({mergeNames:(t,e,n)=>t.if(r._`${n} !== true && ${e} !== undefined`,()=>{t.if(r._`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,r._`${n} || {}`).code(r._`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if(r._`${n} !== true`,()=>{!0===e?t.assign(n,!0):(t.assign(n,r._`${n} || {}`),d(t,n,e))}),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:h}),items:c({mergeNames:(t,e,n)=>t.if(r._`${n} !== true && ${e} !== undefined`,()=>t.assign(n,r._`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if(r._`${n} !== true`,()=>t.assign(n,!0===e||r._`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},e.evaluatedPropsToName=h,e.setEvaluated=d;const u={};var p;function f(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.opts.strictSchema;if(n){if(e=`strict mode: ${e}`,!0===n)throw new Error(e);t.self.logger.warn(e)}}e.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:u[e.code]||(u[e.code]=new i._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(p||(e.Type=p={})),e.getErrorPath=function(t,e,n){if(t instanceof r.Name){const i=e===p.Num;return n?i?r._`"[" + ${t} + "]"`:r._`"['" + ${t} + "']"`:i?r._`"/" + ${t}`:r._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,r.getProperty)(t).toString():"/"+o(t)},e.checkStrictMode=f},50886(t,e){"use strict";function n(t,e){return e.rules.some(e=>r(t,e))}function r(t,e){var n;return void 0!==t[e.keyword]||(null===(n=e.definition.implements)||void 0===n?void 0:n.some(e=>void 0!==t[e]))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function(t,e){let{schema:r,self:i}=t;const s=i.RULES.types[e];return s&&!0!==s&&n(r,s)},e.shouldUseGroup=n,e.shouldUseRule=r},96716(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const r=n(7009),i=n(13578),s=n(81500),a={message:"boolean schema is false"};function o(t,e){const{gen:n,data:i}=t,s={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,r.reportError)(s,a,void 0,e)}e.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:r}=t;!1===n?o(t,!1):"object"==typeof n&&!0===n.$async?e.return(s.default.data):(e.assign(i._`${r}.errors`,null),e.return(!0))},e.boolOrEmptySchema=function(t,e){const{gen:n,schema:r}=t;!1===r?(n.var(e,!1),o(t)):n.var(e,!0)}},11915(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const r=n(66223),i=n(50886),s=n(7009),a=n(13578),o=n(14426);var l;function c(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(r.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(l||(e.DataType=l={})),e.getSchemaTypes=function(t){const e=c(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},e.getJSONTypes=c,e.coerceAndCheckDataType=function(t,e){const{gen:n,data:r,opts:s}=t,o=function(t,e){return e?t.filter(t=>h.has(t)||"array"===e&&"array"===t):[]}(e,s.coerceTypes),c=e.length>0&&!(0===o.length&&1===e.length&&(0,i.schemaHasRulesForType)(t,e[0]));if(c){const i=u(e,r,s.strictNumbers,l.Wrong);n.if(i,()=>{o.length?function(t,e,n){const{gen:r,data:i,opts:s}=t,o=r.let("dataType",a._`typeof ${i}`),l=r.let("coerced",a._`undefined`);"array"===s.coerceTypes&&r.if(a._`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,a._`${i}[0]`).assign(o,a._`typeof ${i}`).if(u(e,i,s.strictNumbers),()=>r.assign(l,i)));r.if(a._`${l} !== undefined`);for(const a of n)(h.has(a)||"array"===a&&"array"===s.coerceTypes)&&c(a);function c(t){switch(t){case"string":return void r.elseIf(a._`${o} == "number" || ${o} == "boolean"`).assign(l,a._`"" + ${i}`).elseIf(a._`${i} === null`).assign(l,a._`""`);case"number":return void r.elseIf(a._`${o} == "boolean" || ${i} === null
|
|
3
|
-
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(l,a._`+${i}`);case"integer":return void r.elseIf(a._`${o} === "boolean" || ${i} === null
|
|
4
|
-
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,a._`+${i}`);case"boolean":return void r.elseIf(a._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(a._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return r.elseIf(a._`${i} === "" || ${i} === 0 || ${i} === false`),void r.assign(l,null);case"array":r.elseIf(a._`${o} === "string" || ${o} === "number"
|
|
5
|
-
|| ${o} === "boolean" || ${i} === null`).assign(l,a._`[${i}]`)}}r.else(),f(t),r.endIf(),r.if(a._`${l} !== undefined`,()=>{r.assign(i,l),function(t,e){let{gen:n,parentData:r,parentDataProperty:i}=t;n.if(a._`${r} !== undefined`,()=>n.assign(a._`${r}[${i}]`,e))}(t,l)})}(t,e,o):f(t)})}return c};const h=new Set(["string","number","integer","boolean","null"]);function d(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.Correct;const i=r===l.Correct?a.operators.EQ:a.operators.NEQ;let s;switch(t){case"null":return a._`${e} ${i} null`;case"array":s=a._`Array.isArray(${e})`;break;case"object":s=a._`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=o(a._`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=o();break;default:return a._`typeof ${e} ${i} ${t}`}return r===l.Correct?s:(0,a.not)(s);function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil;return(0,a.and)(a._`typeof ${e} == "number"`,t,n?a._`isFinite(${e})`:a.nil)}}function u(t,e,n,r){if(1===t.length)return d(t[0],e,n,r);let i;const s=(0,o.toHash)(t);if(s.array&&s.object){const t=a._`typeof ${e} != "object"`;i=s.null?t:a._`!${e} || ${t}`,delete s.null,delete s.array,delete s.object}else i=a.nil;s.number&&delete s.integer;for(const o in s)i=(0,a.and)(i,d(o,e,n,r));return i}e.checkDataType=d,e.checkDataTypes=u;const p={message:t=>{let{schema:e}=t;return`must be ${e}`},params:t=>{let{schema:e,schemaValue:n}=t;return"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${n}}`}};function f(t){const e=function(t){const{gen:e,data:n,schema:r}=t,i=(0,o.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}(t);(0,s.reportError)(e,p)}e.reportTypeError=f},49897(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;const r=n(13578),i=n(14426);function s(t,e,n){const{gen:s,compositeRule:a,data:o,opts:l}=t;if(void 0===n)return;const c=r._`${o}${(0,r.getProperty)(e)}`;if(a)return void(0,i.checkStrictMode)(t,`default is ignored for: ${c}`);let h=r._`${c} === undefined`;"empty"===l.useDefaults&&(h=r._`${h} || ${c} === null || ${c} === ""`),s.if(h,r._`${c} = ${(0,r.stringify)(n)}`)}e.assignDefaults=function(t,e){const{properties:n,items:r}=t.schema;if("object"===e&&n)for(const i in n)s(t,i,n[i].default);else"array"===e&&Array.isArray(r)&&r.forEach((e,n)=>s(t,n,e.default))}},80031(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const r=n(96716),i=n(11915),s=n(50886),a=n(11915),o=n(49897),l=n(13956),c=n(55530),h=n(13578),d=n(81500),u=n(48904),p=n(14426),f=n(7009);function m(t,e){let{gen:n,validateName:r,schema:i,schemaEnv:s,opts:a}=t;a.code.es5?n.func(r,h._`${d.default.data}, ${d.default.valCxt}`,s.$async,()=>{n.code(h._`"use strict"; ${g(i,a)}`),function(t,e){t.if(d.default.valCxt,()=>{t.var(d.default.instancePath,h._`${d.default.valCxt}.${d.default.instancePath}`),t.var(d.default.parentData,h._`${d.default.valCxt}.${d.default.parentData}`),t.var(d.default.parentDataProperty,h._`${d.default.valCxt}.${d.default.parentDataProperty}`),t.var(d.default.rootData,h._`${d.default.valCxt}.${d.default.rootData}`),e.dynamicRef&&t.var(d.default.dynamicAnchors,h._`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{t.var(d.default.instancePath,h._`""`),t.var(d.default.parentData,h._`undefined`),t.var(d.default.parentDataProperty,h._`undefined`),t.var(d.default.rootData,d.default.data),e.dynamicRef&&t.var(d.default.dynamicAnchors,h._`{}`)})}(n,a),n.code(e)}):n.func(r,h._`${d.default.data}, ${function(t){return h._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${t.dynamicRef?h._`, ${d.default.dynamicAnchors}={}`:h.nil}}={}`}(a)}`,s.$async,()=>n.code(g(i,a)).code(e))}function g(t,e){const n="object"==typeof t&&t[e.schemaId];return n&&(e.code.source||e.code.process)?h._`/*# sourceURL=${n} */`:h.nil}function v(t,e){y(t)&&(w(t),b(t))?function(t,e){const{schema:n,gen:r,opts:i}=t;i.$comment&&n.$comment&&A(t);(function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,u.resolveUrl)(t.opts.uriResolver,t.baseId,e))})(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const s=r.const("_errs",d.default.errors);_(t,s),r.var(e,h._`${s} === ${d.default.errors}`)}(t,e):(0,r.boolOrEmptySchema)(t,e)}function b(t){let{schema:e,self:n}=t;if("boolean"==typeof e)return!e;for(const r in e)if(n.RULES.all[r])return!0;return!1}function y(t){return"boolean"!=typeof t.schema}function w(t){(0,p.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:n,opts:r,self:i}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(t)}function _(t,e){if(t.opts.jtd)return x(t,[],!1,e);const n=(0,i.getSchemaTypes)(t.schema);x(t,n,!(0,i.coerceAndCheckDataType)(t,n),e)}function A(t){let{gen:e,schemaEnv:n,schema:r,errSchemaPath:i,opts:s}=t;const a=r.$comment;if(!0===s.$comment)e.code(h._`${d.default.self}.logger.log(${a})`);else if("function"==typeof s.$comment){const t=h.str`${i}/$comment`,r=e.scopeValue("root",{ref:n.root});e.code(h._`${d.default.self}.opts.$comment(${a}, ${t}, ${r}.schema)`)}}function x(t,e,n,r){const{gen:i,schema:o,data:l,allErrors:c,opts:u,self:f}=t,{RULES:m}=f;function g(p){(0,s.shouldUseGroup)(o,p)&&(p.type?(i.if((0,a.checkDataType)(p.type,l,u.strictNumbers)),E(t,p),1===e.length&&e[0]===p.type&&n&&(i.else(),(0,a.reportTypeError)(t)),i.endIf()):E(t,p),c||i.if(h._`${d.default.errors} === ${r||0}`))}!o.$ref||!u.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(o,m)?(u.jtd||function(t,e){if(t.schemaEnv.meta||!t.opts.strictTypes)return;(function(t,e){if(!e.length)return;if(!t.dataTypes.length)return void(t.dataTypes=e);e.forEach(e=>{C(t.dataTypes,e)||S(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)}),function(t,e){const n=[];for(const r of t.dataTypes)C(e,r)?n.push(r):e.includes("integer")&&"number"===r&&n.push("integer");t.dataTypes=n}(t,e)})(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&S(t,"use allowUnionTypes to allow union type keyword")}(t,e);!function(t,e){const n=t.self.RULES.all;for(const r in n){const i=n[r];if("object"==typeof i&&(0,s.shouldUseRule)(t.schema,i)){const{type:n}=i.definition;n.length&&!n.some(t=>k(e,t))&&S(t,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(t,t.dataTypes)}(t,e),i.block(()=>{for(const t of m.rules)g(t);g(m.post)})):i.block(()=>D(t,"$ref",m.all.$ref.definition))}function E(t,e){const{gen:n,schema:r,opts:{useDefaults:i}}=t;i&&(0,o.assignDefaults)(t,e.type),n.block(()=>{for(const n of e.rules)(0,s.shouldUseRule)(r,n)&&D(t,n.keyword,n.definition,e.type)})}function k(t,e){return t.includes(e)||"number"===e&&t.includes("integer")}function C(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function S(t,e){e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(t,e,t.opts.strictTypes)}e.validateFunctionCode=function(t){y(t)&&(w(t),b(t))?function(t){const{schema:e,opts:n,gen:r}=t;m(t,()=>{n.$comment&&e.$comment&&A(t),function(t){const{schema:e,opts:n}=t;void 0!==e.default&&n.useDefaults&&n.strictSchema&&(0,p.checkStrictMode)(t,"default is ignored in the schema root")}(t),r.let(d.default.vErrors,null),r.let(d.default.errors,0),n.unevaluated&&function(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",h._`${n}.evaluated`),e.if(h._`${t.evaluated}.dynamicProps`,()=>e.assign(h._`${t.evaluated}.props`,h._`undefined`)),e.if(h._`${t.evaluated}.dynamicItems`,()=>e.assign(h._`${t.evaluated}.items`,h._`undefined`))}(t),_(t),function(t){const{gen:e,schemaEnv:n,validateName:r,ValidationError:i,opts:s}=t;n.$async?e.if(h._`${d.default.errors} === 0`,()=>e.return(d.default.data),()=>e.throw(h._`new ${i}(${d.default.vErrors})`)):(e.assign(h._`${r}.errors`,d.default.vErrors),s.unevaluated&&function(t){let{gen:e,evaluated:n,props:r,items:i}=t;r instanceof h.Name&&e.assign(h._`${n}.props`,r);i instanceof h.Name&&e.assign(h._`${n}.items`,i)}(t),e.return(h._`${d.default.errors} === 0`))}(t)})}(t):m(t,()=>(0,r.topBoolOrEmptySchema)(t))};class T{constructor(t,e,n){if((0,l.validateKeywordUsage)(t,e,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",I(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",d.default.errors))}result(t,e,n){this.failResult((0,h.not)(t),e,n)}failResult(t,e,n){this.gen.if(t),n?n():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,h.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(h._`${e} !== undefined && (${(0,h.or)(this.invalid$data(),t)})`)}error(t,e,n){if(e)return this.setParams(e),this._error(t,n),void this.setParams({});this._error(t,n)}_error(t,e){(t?f.reportExtraError:f.reportError)(this,this.def.error,e)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.nil;this.gen.block(()=>{this.check$data(t,n),e()})}check$data(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.nil,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.nil;if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:i,def:s}=this;n.if((0,h.or)(h._`${r} === undefined`,e)),t!==h.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==h.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:n,def:r,it:i}=this;return(0,h.or)(function(){if(n.length){if(!(e instanceof h.Name))throw new Error("ajv implementation error");const t=Array.isArray(n)?n:[n];return h._`${(0,a.checkDataTypes)(t,e,i.opts.strictNumbers,a.DataType.Wrong)}`}return h.nil}(),function(){if(r.validateSchema){const n=t.scopeValue("validate$data",{ref:r.validateSchema});return h._`!${n}(${e})`}return h.nil}())}subschema(t,e){const n=(0,c.getSubschema)(this.it,t);(0,c.extendSubschemaData)(n,this.it,t),(0,c.extendSubschemaMode)(n,t);const r={...this.it,...n,items:void 0,props:void 0};return v(r,e),r}mergeEvaluated(t,e){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==t.props&&(n.props=p.mergeEvaluated.props(r,t.props,n.props,e)),!0!==n.items&&void 0!==t.items&&(n.items=p.mergeEvaluated.items(r,t.items,n.items,e)))}mergeValidEvaluated(t,e){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(e,()=>this.mergeEvaluated(t,h.Name)),!0}}function D(t,e,n,r){const i=new T(t,n,e);"code"in n?n.code(i,r):i.$data&&n.validate?(0,l.funcKeywordCode)(i,n):"macro"in n?(0,l.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(i,n)}e.KeywordCxt=T;const M=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function I(t,e){let n,r,{dataLevel:i,dataNames:s,dataPathArr:a}=e;if(""===t)return d.default.rootData;if("/"===t[0]){if(!M.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,r=d.default.rootData}else{const e=P.exec(t);if(!e)throw new Error(`Invalid JSON-pointer: ${t}`);const o=+e[1];if(n=e[2],"#"===n){if(o>=i)throw new Error(c("property/index",o));return a[i-o]}if(o>i)throw new Error(c("data",o));if(r=s[i-o],!n)return r}let o=r;const l=n.split("/");for(const d of l)d&&(r=h._`${r}${(0,h.getProperty)((0,p.unescapeJsonPointer)(d))}`,o=h._`${o} && ${r}`);return o;function c(t,e){return`Cannot access ${t} ${e} levels up, current level is ${i}`}}e.getData=I},13956(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;const r=n(13578),i=n(81500),s=n(71762),a=n(7009);function o(t){const{gen:e,data:n,it:i}=t;e.if(i.parentData,()=>e.assign(n,r._`${i.parentData}[${i.parentDataProperty}]`))}function l(t,e,n){if(void 0===n)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}e.macroKeywordCode=function(t,e){const{gen:n,keyword:i,schema:s,parentSchema:a,it:o}=t,c=e.macro.call(o.self,s,a,o),h=l(n,i,c);!1!==o.opts.validateSchema&&o.self.validateSchema(c,!0);const d=n.name("valid");t.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${o.errSchemaPath}/${i}`,topSchemaRef:h,compositeRule:!0},d),t.pass(d,()=>t.error(!0))},e.funcKeywordCode=function(t,e){var n;const{gen:c,keyword:h,schema:d,parentSchema:u,$data:p,it:f}=t;!function(t,e){let{schemaEnv:n}=t;if(e.async&&!n.$async)throw new Error("async keyword in sync schema")}(f,e);const m=!p&&e.compile?e.compile.call(f.self,d,u,f):e.validate,g=l(c,h,m),v=c.let("valid");function b(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.async?r._`await `:r.nil;const a=f.opts.passContext?i.default.this:i.default.self,o=!("compile"in e&&!p||!1===e.schema);c.assign(v,r._`${n}${(0,s.callValidateCode)(t,g,a,o)}`,e.modifying)}function y(t){var n;c.if((0,r.not)(null!==(n=e.valid)&&void 0!==n?n:v),t)}t.block$data(v,function(){if(!1===e.errors)b(),e.modifying&&o(t),y(()=>t.error());else{const n=e.async?function(){const t=c.let("ruleErrs",null);return c.try(()=>b(r._`await `),e=>c.assign(v,!1).if(r._`${e} instanceof ${f.ValidationError}`,()=>c.assign(t,r._`${e}.errors`),()=>c.throw(e))),t}():function(){const t=r._`${g}.errors`;return c.assign(t,null),b(r.nil),t}();e.modifying&&o(t),y(()=>function(t,e){const{gen:n}=t;n.if(r._`Array.isArray(${e})`,()=>{n.assign(i.default.vErrors,r._`${i.default.vErrors} === null ? ${e} : ${i.default.vErrors}.concat(${e})`).assign(i.default.errors,r._`${i.default.vErrors}.length`),(0,a.extendErrors)(t)},()=>t.error())}(t,n))}}),t.ok(null!==(n=e.valid)&&void 0!==n?n:v)},e.validSchemaType=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e.length||e.some(e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||n&&"undefined"==typeof t)},e.validateKeywordUsage=function(t,e,n){let{schema:r,opts:i,self:s,errSchemaPath:a}=t;if(Array.isArray(e.keyword)?!e.keyword.includes(n):e.keyword!==n)throw new Error("ajv implementation error");const o=e.dependencies;if(null===o||void 0===o?void 0:o.some(t=>!Object.prototype.hasOwnProperty.call(r,t)))throw new Error(`parent schema must have dependencies of ${n}: ${o.join(",")}`);if(e.validateSchema){if(!e.validateSchema(r[n])){const t=`keyword "${n}" value is invalid at path "${a}": `+s.errorsText(e.validateSchema.errors);if("log"!==i.validateSchema)throw new Error(t);s.logger.error(t)}}}},55530(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;const r=n(13578),i=n(14426);e.getSubschema=function(t,e){let{keyword:n,schemaProp:s,schema:a,schemaPath:o,errSchemaPath:l,topSchemaRef:c}=e;if(void 0!==n&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const e=t.schema[n];return void 0===s?{schema:e,schemaPath:r._`${t.schemaPath}${(0,r.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${n}`}:{schema:e[s],schemaPath:r._`${t.schemaPath}${(0,r.getProperty)(n)}${(0,r.getProperty)(s)}`,errSchemaPath:`${t.errSchemaPath}/${n}/${(0,i.escapeFragment)(s)}`}}if(void 0!==a){if(void 0===o||void 0===l||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(t,e,n){let{dataProp:s,dataPropType:a,data:o,dataTypes:l,propertyName:c}=n;if(void 0!==o&&void 0!==s)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=e;if(void 0!==s){const{errorPath:n,dataPathArr:o,opts:l}=e;d(h.let("data",r._`${e.data}${(0,r.getProperty)(s)}`,!0)),t.errorPath=r.str`${n}${(0,i.getErrorPath)(s,a,l.jsPropertySyntax)}`,t.parentDataProperty=r._`${s}`,t.dataPathArr=[...o,t.parentDataProperty]}if(void 0!==o){d(o instanceof r.Name?o:h.let("data",o,!0)),void 0!==c&&(t.propertyName=c)}function d(n){t.data=n,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,n]}l&&(t.dataTypes=l)},e.extendSubschemaMode=function(t,e){let{jtdDiscriminator:n,jtdMetadata:r,compositeRule:i,createErrors:s,allErrors:a}=e;void 0!==i&&(t.compositeRule=i),void 0!==s&&(t.createErrors=s),void 0!==a&&(t.allErrors=a),t.jtdDiscriminator=n,t.jtdMetadata=r}},13575(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var r=n(80031);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var i=n(13578);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const s=n(3351),a=n(19252),o=n(66223),l=n(28208),c=n(13578),h=n(48904),d=n(11915),u=n(14426),p=n(99209),f=n(97759),m=(t,e)=>new RegExp(t,e);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(t){var e,n,r,i,s,a,o,l,c,h,d,u,p,g,v,b,y,w,_,A,x,E,k,C,S;const T=t.strict,D=null===(e=t.code)||void 0===e?void 0:e.optimize,M=!0===D||void 0===D?1:D||0,P=null!==(r=null===(n=t.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:m,I=null!==(i=t.uriResolver)&&void 0!==i?i:f.default;return{strictSchema:null===(a=null!==(s=t.strictSchema)&&void 0!==s?s:T)||void 0===a||a,strictNumbers:null===(l=null!==(o=t.strictNumbers)&&void 0!==o?o:T)||void 0===l||l,strictTypes:null!==(h=null!==(c=t.strictTypes)&&void 0!==c?c:T)&&void 0!==h?h:"log",strictTuples:null!==(u=null!==(d=t.strictTuples)&&void 0!==d?d:T)&&void 0!==u?u:"log",strictRequired:null!==(g=null!==(p=t.strictRequired)&&void 0!==p?p:T)&&void 0!==g&&g,code:t.code?{...t.code,optimize:M,regExp:P}:{optimize:M,regExp:P},loopRequired:null!==(v=t.loopRequired)&&void 0!==v?v:200,loopEnum:null!==(b=t.loopEnum)&&void 0!==b?b:200,meta:null===(y=t.meta)||void 0===y||y,messages:null===(w=t.messages)||void 0===w||w,inlineRefs:null===(_=t.inlineRefs)||void 0===_||_,schemaId:null!==(A=t.schemaId)&&void 0!==A?A:"$id",addUsedSchema:null===(x=t.addUsedSchema)||void 0===x||x,validateSchema:null===(E=t.validateSchema)||void 0===E||E,validateFormats:null===(k=t.validateFormats)||void 0===k||k,unicodeRegExp:null===(C=t.unicodeRegExp)||void 0===C||C,int32range:null===(S=t.int32range)||void 0===S||S,uriResolver:I}}class _{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...w(t)};const{es5:e,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:v,es5:e,lines:n}),this.logger=function(t){if(!1===t)return T;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,o.getRules)(),A.call(this,b,t,"NOT SUPPORTED"),A.call(this,y,t,"DEPRECATED","warn"),this._metaOpts=S.call(this),t.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&C.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),E.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:n}=this.opts;let r=p;"id"===n&&(r={...p},r.id=r.$id,delete r.$id),e&&t&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let n;if("string"==typeof t){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);const r=n(e);return"$async"in n||(this.errors=n.errors),r}compile(t,e){const n=this._addSchema(t,e);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,t,e);async function r(t,e){await i.call(this,t.$schema);const n=this._addSchema(t,e);return n.validate||s.call(this,n)}async function i(t){t&&!this.getSchema(t)&&await r.call(this,{$ref:t},!0)}async function s(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof a.default))throw e;return o.call(this,e),await l.call(this,e.missingSchema),s.call(this,t)}}function o(t){let{missingSchema:e,missingRef:n}=t;if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${n} cannot be resolved`)}async function l(t){const n=await c.call(this,t);this.refs[t]||await i.call(this,n.$schema),this.refs[t]||this.addSchema(n,t,e)}async function c(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=n(t))}finally{delete this._loading[t]}}}addSchema(t,e,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,n,i);return this}if("object"===typeof t){const{schemaId:e}=this.opts;if(r=t[e],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${e} must be string`)}return e=(0,h.normalizeId)(e||r),this._checkUnique(e),this.schemas[e]=this._addSchema(t,n,e,i,!0),this}addMetaSchema(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema;return this.addSchema(t,e,!0,n),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let n;if(n=t.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,t);if(!r&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return r}getSchema(t){let e;for(;"string"==typeof(e=x.call(this,t));)t=e;if(void 0===e){const{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(e=l.resolveSchema.call(this,r,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=x.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{const e=t;this._cache.delete(e);let n=t[this.opts.schemaId];return n&&(n=(0,h.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let n;if("string"==typeof t)n=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=n);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(n=(e=t).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(M.call(this,n,e),!e)return(0,u.eachItem)(n,t=>P.call(this,t)),this;F.call(this,e);const r={...e,type:(0,d.getJSONTypes)(e.type),schemaType:(0,d.getJSONTypes)(e.schemaType)};return(0,u.eachItem)(n,0===r.type.length?t=>P.call(this,t,r):t=>r.type.forEach(e=>P.call(this,t,r,e))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const n of e.rules){const e=n.rules.findIndex(e=>e.keyword===t);e>=0&&n.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,{separator:e=", ",dataVar:n="data"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t&&0!==t.length?t.map(t=>`${n}${t.instancePath} ${t.message}`).reduce((t,n)=>t+e+n):"No errors"}$dataMetaSchema(t,e){const n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const r of e){const e=r.split("/").slice(1);let i=t;for(const t of e)i=i[t];for(const t in n){const e=n[t];if("object"!=typeof e)continue;const{$data:r}=e.definition,s=i[t];r&&s&&(i[t]=N(s))}}return t}_removeAllSchemas(t,e){for(const n in t){const r=t[n];e&&!e.test(n)||("string"==typeof r?delete t[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[n]))}}_addSchema(t,e,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema;const{schemaId:a}=this.opts;if("object"==typeof t)r=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let o=this._cache.get(t);if(void 0!==o)return o;n=(0,h.normalizeId)(r||n);const c=h.getSchemaRefs.call(this,t,n);return o=new l.SchemaEnv({schema:t,schemaId:a,meta:e,baseId:n,localRefs:c}),this._cache.set(o.schema,o),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=o),i&&this.validateSchema(t,!0),o}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):l.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,t)}finally{this.opts=e}}}function A(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(const i in t){const s=i;s in e&&this.logger[r](`${n}: option ${i}. ${t[s]}`)}}function x(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function E(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function k(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function C(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}}function S(){const t={...this.opts};for(const e of g)delete t[e];return t}_.ValidationError=s.default,_.MissingRefError=a.default,e.default=_;const T={log(){},warn(){},error(){}};const D=/^[a-z_$][a-z0-9_$:-]*$/i;function M(t,e){const{RULES:n}=this;if((0,u.eachItem)(t,t=>{if(n.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!D.test(t))throw new Error(`Keyword ${t} has invalid name`)}),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function P(t,e,n){var r;const i=null===e||void 0===e?void 0:e.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let a=i?s.post:s.rules.find(t=>{let{type:e}=t;return e===n});if(a||(a={type:n,rules:[]},s.rules.push(a)),s.keywords[t]=!0,!e)return;const o={keyword:t,definition:{...e,type:(0,d.getJSONTypes)(e.type),schemaType:(0,d.getJSONTypes)(e.schemaType)}};e.before?I.call(this,a,o,e.before):a.rules.push(o),s.all[t]=o,null===(r=e.implements)||void 0===r||r.forEach(t=>this.addKeyword(t))}function I(t,e,n){const r=t.rules.findIndex(t=>t.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function F(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=N(e)),t.validateSchema=this.compile(e,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(t){return{anyOf:[t,R]}}},59701(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(83080);r.code='require("ajv/dist/runtime/equal").default',e.default=r},77860(t,e){"use strict";function n(t){const e=t.length;let n,r=0,i=0;for(;i<e;)r++,n=t.charCodeAt(i++),n>=55296&&n<=56319&&i<e&&(n=t.charCodeAt(i),56320===(64512&n)&&i++);return r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},97759(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(89314);r.code='require("ajv/dist/runtime/uri").default',e.default=r},3351(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}e.default=n},88434(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;const r=n(13578),i=n(14426),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:t=>{let{params:{len:e}}=t;return r.str`must NOT have more than ${e} items`},params:t=>{let{params:{len:e}}=t;return r._`{limit: ${e}}`}},code(t){const{parentSchema:e,it:n}=t,{items:r}=e;Array.isArray(r)?a(t,r):(0,i.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(t,e){const{gen:n,schema:s,data:a,keyword:o,it:l}=t;l.items=!0;const c=n.const("len",r._`${a}.length`);if(!1===s)t.setParams({len:e.length}),t.pass(r._`${c} <= ${e.length}`);else if("object"==typeof s&&!(0,i.alwaysValidSchema)(l,s)){const s=n.var("valid",r._`${c} <= ${e.length}`);n.if((0,r.not)(s),()=>function(s){n.forRange("i",e.length,c,e=>{t.subschema({keyword:o,dataProp:e,dataPropType:i.Type.Num},s),l.allErrors||n.if((0,r.not)(s),()=>n.break())})}(s)),t.ok(s)}}e.validateAdditionalItems=a,e.default=s},99673(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(71762),i=n(13578),s=n(81500),a=n(14426),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:t=>{let{params:e}=t;return i._`{additionalProperty: ${e.additionalProperty}}`}},code(t){const{gen:e,schema:n,parentSchema:o,data:l,errsCount:c,it:h}=t;if(!c)throw new Error("ajv implementation error");const{allErrors:d,opts:u}=h;if(h.props=!0,"all"!==u.removeAdditional&&(0,a.alwaysValidSchema)(h,n))return;const p=(0,r.allSchemaProperties)(o.properties),f=(0,r.allSchemaProperties)(o.patternProperties);function m(t){e.code(i._`delete ${l}[${t}]`)}function g(r){if("all"===u.removeAdditional||u.removeAdditional&&!1===n)m(r);else{if(!1===n)return t.setParams({additionalProperty:r}),t.error(),void(d||e.break());if("object"==typeof n&&!(0,a.alwaysValidSchema)(h,n)){const n=e.name("valid");"failing"===u.removeAdditional?(v(r,n,!1),e.if((0,i.not)(n),()=>{t.reset(),m(r)})):(v(r,n),d||e.if((0,i.not)(n),()=>e.break()))}}}function v(e,n,r){const i={keyword:"additionalProperties",dataProp:e,dataPropType:a.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(i,n)}e.forIn("key",l,n=>{p.length||f.length?e.if(function(n){let s;if(p.length>8){const t=(0,a.schemaRefOrVal)(h,o.properties,"properties");s=(0,r.isOwnProperty)(e,t,n)}else s=p.length?(0,i.or)(...p.map(t=>i._`${n} === ${t}`)):i.nil;return f.length&&(s=(0,i.or)(s,...f.map(e=>i._`${(0,r.usePattern)(t,e)}.test(${n})`))),(0,i.not)(s)}(n),()=>g(n)):g(n)}),t.ok(i._`${c} === ${s.default.errors}`)}};e.default=o},27739(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(14426),i={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:i}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=e.name("valid");n.forEach((e,n)=>{if((0,r.alwaysValidSchema)(i,e))return;const a=t.subschema({keyword:"allOf",schemaProp:n},s);t.ok(s),t.mergeEvaluated(a)})}};e.default=i},63686(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(71762).validateUnion,error:{message:"must match a schema in anyOf"}};e.default=r},9708(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:t=>{let{params:{min:e,max:n}}=t;return void 0===n?r.str`must contain at least ${e} valid item(s)`:r.str`must contain at least ${e} and no more than ${n} valid item(s)`},params:t=>{let{params:{min:e,max:n}}=t;return void 0===n?r._`{minContains: ${e}}`:r._`{minContains: ${e}, maxContains: ${n}}`}},code(t){const{gen:e,schema:n,parentSchema:s,data:a,it:o}=t;let l,c;const{minContains:h,maxContains:d}=s;o.opts.next?(l=void 0===h?1:h,c=d):l=1;const u=e.const("len",r._`${a}.length`);if(t.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,i.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,i.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,i.alwaysValidSchema)(o,n)){let e=r._`${u} >= ${l}`;return void 0!==c&&(e=r._`${e} && ${u} <= ${c}`),void t.pass(e)}o.items=!0;const p=e.name("valid");function f(){const t=e.name("_valid"),n=e.let("count",0);m(t,()=>e.if(t,()=>function(t){e.code(r._`${t}++`),void 0===c?e.if(r._`${t} >= ${l}`,()=>e.assign(p,!0).break()):(e.if(r._`${t} > ${c}`,()=>e.assign(p,!1).break()),1===l?e.assign(p,!0):e.if(r._`${t} >= ${l}`,()=>e.assign(p,!0)))}(n)))}function m(n,r){e.forRange("i",0,u,e=>{t.subschema({keyword:"contains",dataProp:e,dataPropType:i.Type.Num,compositeRule:!0},n),r()})}void 0===c&&1===l?m(p,()=>e.if(p,()=>e.break())):0===l?(e.let(p,!0),void 0!==c&&e.if(r._`${a}.length > 0`,f)):(e.let(p,!1),f()),t.result(p,()=>t.reset())}};e.default=s},52924(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const r=n(13578),i=n(14426),s=n(71762);e.error={message:t=>{let{params:{property:e,depsCount:n,deps:i}}=t;const s=1===n?"property":"properties";return r.str`must have ${s} ${i} when property ${e} is present`},params:t=>{let{params:{property:e,depsCount:n,deps:i,missingProperty:s}}=t;return r._`{property: ${e},
|
|
6
|
-
missingProperty: ${s},
|
|
7
|
-
depsCount: ${n},
|
|
8
|
-
deps: ${i}}`}};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(t){const[e,n]=function(t){let{schema:e}=t;const n={},r={};for(const i in e){if("__proto__"===i)continue;(Array.isArray(e[i])?n:r)[i]=e[i]}return[n,r]}(t);o(t,e),l(t,n)}};function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.schema;const{gen:n,data:i,it:a}=t;if(0===Object.keys(e).length)return;const o=n.let("missing");for(const l in e){const c=e[l];if(0===c.length)continue;const h=(0,s.propertyInData)(n,i,l,a.opts.ownProperties);t.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?n.if(h,()=>{for(const e of c)(0,s.checkReportMissingProp)(t,e)}):(n.if(r._`${h} && (${(0,s.checkMissingProp)(t,c,o)})`),(0,s.reportMissingProp)(t,o),n.else())}}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.schema;const{gen:n,data:r,keyword:a,it:o}=t,l=n.name("valid");for(const c in e)(0,i.alwaysValidSchema)(o,e[c])||(n.if((0,s.propertyInData)(n,r,c,o.opts.ownProperties),()=>{const e=t.subschema({keyword:a,schemaProp:c},l);t.mergeValidEvaluated(e,l)},()=>n.var(l,!0)),t.ok(l))}e.validatePropertyDeps=o,e.validateSchemaDeps=l,e.default=a},2958(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:t=>{let{params:e}=t;return r.str`must match "${e.ifClause}" schema`},params:t=>{let{params:e}=t;return r._`{failingKeyword: ${e.ifClause}}`}},code(t){const{gen:e,parentSchema:n,it:s}=t;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const o=a(s,"then"),l=a(s,"else");if(!o&&!l)return;const c=e.let("valid",!0),h=e.name("_valid");if(function(){const e=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);t.mergeEvaluated(e)}(),t.reset(),o&&l){const n=e.let("ifClause");t.setParams({ifClause:n}),e.if(h,d("then",n),d("else",n))}else o?e.if(h,d("then")):e.if((0,r.not)(h),d("else"));function d(n,i){return()=>{const s=t.subschema({keyword:n},h);e.assign(c,h),t.mergeValidEvaluated(s,c),i?e.assign(i,r._`${n}`):t.setParams({ifClause:n})}}t.pass(c,()=>t.error(!0))}};function a(t,e){const n=t.schema[e];return void 0!==n&&!(0,i.alwaysValidSchema)(t,n)}e.default=s},95089(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(88434),i=n(55365),s=n(63545),a=n(70729),o=n(9708),l=n(52924),c=n(44702),h=n(99673),d=n(38732),u=n(69526),p=n(37372),f=n(63686),m=n(30704),g=n(27739),v=n(2958),b=n(33543);e.default=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=[p.default,f.default,m.default,g.default,v.default,b.default,c.default,h.default,l.default,d.default,u.default];return t?e.push(i.default,a.default):e.push(r.default,s.default),e.push(o.default),e}},63545(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;const r=n(13578),i=n(14426),s=n(71762),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:n}=t;if(Array.isArray(e))return o(t,"additionalItems",e);n.items=!0,(0,i.alwaysValidSchema)(n,e)||t.ok((0,s.validateArray)(t))}};function o(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema;const{gen:s,parentSchema:a,data:o,keyword:l,it:c}=t;!function(t){const{opts:r,errSchemaPath:s}=c,a=n.length,o=a===t.minItems&&(a===t.maxItems||!1===t[e]);if(r.strictTuples&&!o){const t=`"${l}" is ${a}-tuple, but minItems or maxItems/${e} are not specified or different at path "${s}"`;(0,i.checkStrictMode)(c,t,r.strictTuples)}}(a),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(s,n.length,c.items));const h=s.name("valid"),d=s.const("len",r._`${o}.length`);n.forEach((e,n)=>{(0,i.alwaysValidSchema)(c,e)||(s.if(r._`${d} > ${n}`,()=>t.subschema({keyword:l,schemaProp:n,dataProp:n},h)),t.ok(h))})}e.validateTuple=o,e.default=a},70729(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s=n(71762),a=n(88434),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:t=>{let{params:{len:e}}=t;return r.str`must NOT have more than ${e} items`},params:t=>{let{params:{len:e}}=t;return r._`{limit: ${e}}`}},code(t){const{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,(0,i.alwaysValidSchema)(r,e)||(o?(0,a.validateAdditionalItems)(t,o):t.ok((0,s.validateArray)(t)))}};e.default=o},37372(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(14426),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:n,it:i}=t;if((0,r.alwaysValidSchema)(i,n))return void t.fail();const s=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),t.failResult(s,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};e.default=i},30704(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:t=>{let{params:e}=t;return r._`{passingSchemas: ${e.passing}}`}},code(t){const{gen:e,schema:n,parentSchema:s,it:a}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;const o=n,l=e.let("valid",!1),c=e.let("passing",null),h=e.name("_valid");t.setParams({passing:c}),e.block(function(){o.forEach((n,s)=>{let o;(0,i.alwaysValidSchema)(a,n)?e.var(h,!0):o=t.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},h),s>0&&e.if(r._`${h} && ${l}`).assign(l,!1).assign(c,r._`[${c}, ${s}]`).else(),e.if(h,()=>{e.assign(l,!0),e.assign(c,s),o&&t.mergeEvaluated(o,r.Name)})})}),t.result(l,()=>t.reset(),()=>t.error(!0))}};e.default=s},69526(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(71762),i=n(13578),s=n(14426),a=n(14426),o={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,data:o,parentSchema:l,it:c}=t,{opts:h}=c,d=(0,r.allSchemaProperties)(n),u=d.filter(t=>(0,s.alwaysValidSchema)(c,n[t]));if(0===d.length||u.length===d.length&&(!c.opts.unevaluated||!0===c.props))return;const p=h.strictSchema&&!h.allowMatchingProperties&&l.properties,f=e.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,a.evaluatedPropsToName)(e,c.props));const{props:m}=c;function g(t){for(const e in p)new RegExp(t).test(e)&&(0,s.checkStrictMode)(c,`property ${e} matches pattern ${t} (use allowMatchingProperties)`)}function v(n){e.forIn("key",o,s=>{e.if(i._`${(0,r.usePattern)(t,n)}.test(${s})`,()=>{const r=u.includes(n);r||t.subschema({keyword:"patternProperties",schemaProp:n,dataProp:s,dataPropType:a.Type.Str},f),c.opts.unevaluated&&!0!==m?e.assign(i._`${m}[${s}]`,!0):r||c.allErrors||e.if((0,i.not)(f),()=>e.break())})})}!function(){for(const t of d)p&&g(t),c.allErrors?v(t):(e.var(f,!0),v(t),e.if(f))}()}};e.default=o},55365(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(63545),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,r.validateTuple)(t,"items")};e.default=i},38732(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(80031),i=n(71762),s=n(14426),a=n(99673),o={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:n,parentSchema:o,data:l,it:c}=t;"all"===c.opts.removeAdditional&&void 0===o.additionalProperties&&a.default.code(new r.KeywordCxt(c,a.default,"additionalProperties"));const h=(0,i.allSchemaProperties)(n);for(const r of h)c.definedProperties.add(r);c.opts.unevaluated&&h.length&&!0!==c.props&&(c.props=s.mergeEvaluated.props(e,(0,s.toHash)(h),c.props));const d=h.filter(t=>!(0,s.alwaysValidSchema)(c,n[t]));if(0===d.length)return;const u=e.name("valid");for(const r of d)p(r)?f(r):(e.if((0,i.propertyInData)(e,l,r,c.opts.ownProperties)),f(r),c.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(r),t.ok(u);function p(t){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[t].default}function f(e){t.subschema({keyword:"properties",schemaProp:e,dataProp:e},u)}}};e.default=o},44702(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:t=>{let{params:e}=t;return r._`{propertyName: ${e.propertyName}}`}},code(t){const{gen:e,schema:n,data:s,it:a}=t;if((0,i.alwaysValidSchema)(a,n))return;const o=e.name("valid");e.forIn("key",s,n=>{t.setParams({propertyName:n}),t.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},o),e.if((0,r.not)(o),()=>{t.error(!0),a.allErrors||e.break()})}),t.ok(o)}};e.default=s},33543(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(14426),i={keyword:["then","else"],schemaType:["object","boolean"],code(t){let{keyword:e,parentSchema:n,it:i}=t;void 0===n.if&&(0,r.checkStrictMode)(i,`"${e}" without "if" is ignored`)}};e.default=i},71762(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;const r=n(13578),i=n(14426),s=n(81500),a=n(14426);function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function l(t,e,n){return r._`${o(t)}.call(${e}, ${n})`}function c(t,e,n,i){const s=r._`${e}${(0,r.getProperty)(n)} === undefined`;return i?(0,r.or)(s,(0,r.not)(l(t,e,n))):s}function h(t){return t?Object.keys(t).filter(t=>"__proto__"!==t):[]}e.checkReportMissingProp=function(t,e){const{gen:n,data:i,it:s}=t;n.if(c(n,i,e,s.opts.ownProperties),()=>{t.setParams({missingProperty:r._`${e}`},!0),t.error()})},e.checkMissingProp=function(t,e,n){let{gen:i,data:s,it:{opts:a}}=t;return(0,r.or)(...e.map(t=>(0,r.and)(c(i,s,t,a.ownProperties),r._`${n} = ${t}`)))},e.reportMissingProp=function(t,e){t.setParams({missingProperty:e},!0),t.error()},e.hasPropFunc=o,e.isOwnProperty=l,e.propertyInData=function(t,e,n,i){const s=r._`${e}${(0,r.getProperty)(n)} !== undefined`;return i?r._`${s} && ${l(t,e,n)}`:s},e.noPropertyInData=c,e.allSchemaProperties=h,e.schemaProperties=function(t,e){return h(e).filter(n=>!(0,i.alwaysValidSchema)(t,e[n]))},e.callValidateCode=function(t,e,n,i){let{schemaCode:a,data:o,it:{gen:l,topSchemaRef:c,schemaPath:h,errorPath:d},it:u}=t;const p=i?r._`${a}, ${o}, ${c}${h}`:o,f=[[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,d)],[s.default.parentData,u.parentData],[s.default.parentDataProperty,u.parentDataProperty],[s.default.rootData,s.default.rootData]];u.opts.dynamicRef&&f.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const m=r._`${p}, ${l.object(...f)}`;return n!==r.nil?r._`${e}.call(${n}, ${m})`:r._`${e}(${m})`};const d=r._`new RegExp`;e.usePattern=function(t,e){let{gen:n,it:{opts:i}}=t;const s=i.unicodeRegExp?"u":"",{regExp:o}=i.code,l=o(e,s);return n.scopeValue("pattern",{key:l.toString(),ref:l,code:r._`${"new RegExp"===o.code?d:(0,a.useFunc)(n,o)}(${e}, ${s})`})},e.validateArray=function(t){const{gen:e,data:n,keyword:s,it:a}=t,o=e.name("valid");if(a.allErrors){const t=e.let("valid",!0);return l(()=>e.assign(t,!1)),t}return e.var(o,!0),l(()=>e.break()),o;function l(a){const l=e.const("len",r._`${n}.length`);e.forRange("i",0,l,n=>{t.subschema({keyword:s,dataProp:n,dataPropType:i.Type.Num},o),e.if((0,r.not)(o),a)})}},e.validateUnion=function(t){const{gen:e,schema:n,keyword:s,it:a}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(t=>(0,i.alwaysValidSchema)(a,t))&&!a.opts.unevaluated)return;const o=e.let("valid",!1),l=e.name("_valid");e.block(()=>n.forEach((n,i)=>{const a=t.subschema({keyword:s,schemaProp:i,compositeRule:!0},l);e.assign(o,r._`${o} || ${l}`);t.mergeValidEvaluated(a,l)||e.if((0,r.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}},23194(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=n},39615(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(23194),i=n(51226),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default];e.default=s},51226(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;const r=n(19252),i=n(71762),s=n(13578),a=n(81500),o=n(28208),l=n(14426),c={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:n,it:i}=t,{baseId:a,schemaEnv:l,validateName:c,opts:u,self:p}=i,{root:f}=l;if(("#"===n||"#/"===n)&&a===f.baseId)return function(){if(l===f)return d(t,c,l,l.$async);const n=e.scopeValue("root",{ref:f});return d(t,s._`${n}.validate`,f,f.$async)}();const m=o.resolveRef.call(p,f,a,n);if(void 0===m)throw new r.default(i.opts.uriResolver,a,n);return m instanceof o.SchemaEnv?function(e){const n=h(t,e);d(t,n,e,e.$async)}(m):function(r){const i=e.scopeValue("schema",!0===u.code.source?{ref:r,code:(0,s.stringify)(r)}:{ref:r}),a=e.name("valid"),o=t.subschema({schema:r,dataTypes:[],schemaPath:s.nil,topSchemaRef:i,errSchemaPath:n},a);t.mergeEvaluated(o),t.ok(a)}(m)}};function h(t,e){const{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):s._`${n.scopeValue("wrapper",{ref:e})}.validate`}function d(t,e,n,r){const{gen:o,it:c}=t,{allErrors:h,schemaEnv:d,opts:u}=c,p=u.passContext?a.default.this:s.nil;function f(t){const e=s._`${t}.errors`;o.assign(a.default.vErrors,s._`${a.default.vErrors} === null ? ${e} : ${a.default.vErrors}.concat(${e})`),o.assign(a.default.errors,s._`${a.default.vErrors}.length`)}function m(t){var e;if(!c.opts.unevaluated)return;const r=null===(e=null===n||void 0===n?void 0:n.validate)||void 0===e?void 0:e.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(o,r.props,c.props));else{const e=o.var("props",s._`${t}.evaluated.props`);c.props=l.mergeEvaluated.props(o,e,c.props,s.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(o,r.items,c.items));else{const e=o.var("items",s._`${t}.evaluated.items`);c.items=l.mergeEvaluated.items(o,e,c.items,s.Name)}}r?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const n=o.let("valid");o.try(()=>{o.code(s._`await ${(0,i.callValidateCode)(t,e,p)}`),m(e),h||o.assign(n,!0)},t=>{o.if(s._`!(${t} instanceof ${c.ValidationError})`,()=>o.throw(t)),f(t),h||o.assign(n,!1)}),t.ok(n)}():t.result((0,i.callValidateCode)(t,e,p),()=>m(e),()=>f(e))}e.getValidate=h,e.callRef=d,e.default=c},55e3(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(44381),s=n(28208),a=n(19252),o=n(14426),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:t=>{let{params:{discrError:e,tagName:n}}=t;return e===i.DiscrError.Tag?`tag "${n}" must be string`:`value of tag "${n}" must be in oneOf`},params:t=>{let{params:{discrError:e,tag:n,tagName:i}}=t;return r._`{error: ${e}, tag: ${i}, tagValue: ${n}}`}},code(t){const{gen:e,data:n,schema:l,parentSchema:c,it:h}=t,{oneOf:d}=c;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=l.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const p=e.let("valid",!1),f=e.const("tag",r._`${n}${(0,r.getProperty)(u)}`);function m(n){const i=e.name("valid"),s=t.subschema({keyword:"oneOf",schemaProp:n},i);return t.mergeEvaluated(s,r.Name),i}e.if(r._`typeof ${f} == "string"`,()=>function(){const n=function(){var t;const e={},n=i(c);let r=!0;for(let c=0;c<d.length;c++){let e=d[c];if((null===e||void 0===e?void 0:e.$ref)&&!(0,o.schemaHasRulesButRef)(e,h.self.RULES)){const t=e.$ref;if(e=s.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,t),e instanceof s.SchemaEnv&&(e=e.schema),void 0===e)throw new a.default(h.opts.uriResolver,h.baseId,t)}const p=null===(t=null===e||void 0===e?void 0:e.properties)||void 0===t?void 0:t[u];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);r=r&&(n||i(e)),l(p,c)}if(!r)throw new Error(`discriminator: "${u}" must be required`);return e;function i(t){let{required:e}=t;return Array.isArray(e)&&e.includes(u)}function l(t,e){if(t.const)p(t.const,e);else{if(!t.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const n of t.enum)p(n,e)}}function p(t,n){if("string"!=typeof t||t in e)throw new Error(`discriminator: "${u}" values must be unique strings`);e[t]=n}}();e.if(!1);for(const t in n)e.elseIf(r._`${f} === ${t}`),e.assign(p,m(n[t]));e.else(),t.error(!1,{discrError:i.DiscrError.Mapping,tag:f,tagName:u}),e.endIf()}(),()=>t.error(!1,{discrError:i.DiscrError.Tag,tag:f,tagName:u})),t.ok(p)}};e.default=l},44381(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(n||(e.DiscrError=n={}))},97279(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(39615),i=n(52251),s=n(95089),a=n(92875),o=n(36450),l=[r.default,i.default,(0,s.default)(),a.default,o.metadataVocabulary,o.contentVocabulary];e.default=l},23920(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:t=>{let{schemaCode:e}=t;return r.str`must match format "${e}"`},params:t=>{let{schemaCode:e}=t;return r._`{format: ${e}}`}},code(t,e){const{gen:n,data:i,$data:s,schema:a,schemaCode:o,it:l}=t,{opts:c,errSchemaPath:h,schemaEnv:d,self:u}=l;c.validateFormats&&(s?function(){const s=n.scopeValue("formats",{ref:u.formats,code:c.code.formats}),a=n.const("fDef",r._`${s}[${o}]`),l=n.let("fType"),h=n.let("format");n.if(r._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>n.assign(l,r._`${a}.type || "string"`).assign(h,r._`${a}.validate`),()=>n.assign(l,r._`"string"`).assign(h,a)),t.fail$data((0,r.or)(!1===c.strictSchema?r.nil:r._`${o} && !${h}`,function(){const t=d.$async?r._`(${a}.async ? await ${h}(${i}) : ${h}(${i}))`:r._`${h}(${i})`,n=r._`(typeof ${h} == "function" ? ${t} : ${h}.test(${i}))`;return r._`${h} && ${h} !== true && ${l} === ${e} && !${n}`}()))}():function(){const s=u.formats[a];if(!s)return void function(){if(!1===c.strictSchema)return void u.logger.warn(t());throw new Error(t());function t(){return`unknown format "${a}" ignored in schema at path "${h}"`}}();if(!0===s)return;const[o,l,p]=function(t){const e=t instanceof RegExp?(0,r.regexpCode)(t):c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(a)}`:void 0,i=n.scopeValue("formats",{key:a,ref:t,code:e});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,r._`${i}.validate`];return["string",t,i]}(s);o===e&&t.pass(function(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!d.$async)throw new Error("async format in sync schema");return r._`await ${p}(${i})`}return"function"==typeof l?r._`${p}(${i})`:r._`${p}.test(${i})`}())}())}};e.default=i},92875(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=[n(23920).default];e.default=r},36450(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},33600(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s=n(59701),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:t=>{let{schemaCode:e}=t;return r._`{allowedValue: ${e}}`}},code(t){const{gen:e,data:n,$data:a,schemaCode:o,schema:l}=t;a||l&&"object"==typeof l?t.fail$data(r._`!${(0,i.useFunc)(e,s.default)}(${n}, ${o})`):t.fail(r._`${l} !== ${n}`)}};e.default=a},67366(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s=n(59701),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:t=>{let{schemaCode:e}=t;return r._`{allowedValues: ${e}}`}},code(t){const{gen:e,data:n,$data:a,schema:o,schemaCode:l,it:c}=t;if(!a&&0===o.length)throw new Error("enum must have non-empty array");const h=o.length>=c.opts.loopEnum;let d;const u=()=>null!==d&&void 0!==d?d:d=(0,i.useFunc)(e,s.default);let p;if(h||a)p=e.let("valid"),t.block$data(p,function(){e.assign(p,!1),e.forOf("v",l,t=>e.if(r._`${u()}(${n}, ${t})`,()=>e.assign(p,!0).break()))});else{if(!Array.isArray(o))throw new Error("ajv implementation error");const t=e.const("vSchema",l);p=(0,r.or)(...o.map((e,i)=>function(t,e){const i=o[e];return"object"===typeof i&&null!==i?r._`${u()}(${n}, ${t}[${e}])`:r._`${n} === ${i}`}(t,i)))}t.pass(p)}};e.default=a},52251(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(46189),i=n(65486),s=n(82464),a=n(5453),o=n(25925),l=n(32858),c=n(73598),h=n(48250),d=n(33600),u=n(67366),p=[r.default,i.default,s.default,a.default,o.default,l.default,c.default,h.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,u.default];e.default=p},73598(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message(t){let{keyword:e,schemaCode:n}=t;const i="maxItems"===e?"more":"fewer";return r.str`must NOT have ${i} than ${n} items`},params:t=>{let{schemaCode:e}=t;return r._`{limit: ${e}}`}},code(t){const{keyword:e,data:n,schemaCode:i}=t,s="maxItems"===e?r.operators.GT:r.operators.LT;t.fail$data(r._`${n}.length ${s} ${i}`)}};e.default=i},82464(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=n(14426),s=n(77860),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message(t){let{keyword:e,schemaCode:n}=t;const i="maxLength"===e?"more":"fewer";return r.str`must NOT have ${i} than ${n} characters`},params:t=>{let{schemaCode:e}=t;return r._`{limit: ${e}}`}},code(t){const{keyword:e,data:n,schemaCode:a,it:o}=t,l="maxLength"===e?r.operators.GT:r.operators.LT,c=!1===o.opts.unicode?r._`${n}.length`:r._`${(0,i.useFunc)(t.gen,s.default)}(${n})`;t.fail$data(r._`${c} ${l} ${a}`)}};e.default=a},46189(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i=r.operators,s={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:t=>{let{keyword:e,schemaCode:n}=t;return r.str`must be ${s[e].okStr} ${n}`},params:t=>{let{keyword:e,schemaCode:n}=t;return r._`{comparison: ${s[e].okStr}, limit: ${n}}`}},o={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:a,code(t){const{keyword:e,data:n,schemaCode:i}=t;t.fail$data(r._`${n} ${s[e].fail} ${i} || isNaN(${n})`)}};e.default=o},25925(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message(t){let{keyword:e,schemaCode:n}=t;const i="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${i} than ${n} properties`},params:t=>{let{schemaCode:e}=t;return r._`{limit: ${e}}`}},code(t){const{keyword:e,data:n,schemaCode:i}=t,s="maxProperties"===e?r.operators.GT:r.operators.LT;t.fail$data(r._`Object.keys(${n}).length ${s} ${i}`)}};e.default=i},65486(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(13578),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:t=>{let{schemaCode:e}=t;return r.str`must be multiple of ${e}`},params:t=>{let{schemaCode:e}=t;return r._`{multipleOf: ${e}}`}},code(t){const{gen:e,data:n,schemaCode:i,it:s}=t,a=s.opts.multipleOfPrecision,o=e.let("res"),l=a?r._`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:r._`${o} !== parseInt(${o})`;t.fail$data(r._`(${i} === 0 || (${o} = ${n}/${i}, ${l}))`)}};e.default=i},5453(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(71762),i=n(14426),s=n(13578),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:t=>{let{schemaCode:e}=t;return s.str`must match pattern "${e}"`},params:t=>{let{schemaCode:e}=t;return s._`{pattern: ${e}}`}},code(t){const{gen:e,data:n,$data:a,schema:o,schemaCode:l,it:c}=t,h=c.opts.unicodeRegExp?"u":"";if(a){const{regExp:r}=c.opts.code,a="new RegExp"===r.code?s._`new RegExp`:(0,i.useFunc)(e,r),o=e.let("valid");e.try(()=>e.assign(o,s._`${a}(${l}, ${h}).test(${n})`),()=>e.assign(o,!1)),t.fail$data(s._`!${o}`)}else{const e=(0,r.usePattern)(t,o);t.fail$data(s._`!${e}.test(${n})`)}}};e.default=a},32858(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(71762),i=n(13578),s=n(14426),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:t=>{let{params:{missingProperty:e}}=t;return i.str`must have required property '${e}'`},params:t=>{let{params:{missingProperty:e}}=t;return i._`{missingProperty: ${e}}`}},code(t){const{gen:e,schema:n,schemaCode:a,data:o,$data:l,it:c}=t,{opts:h}=c;if(!l&&0===n.length)return;const d=n.length>=h.loopRequired;if(c.allErrors?function(){if(d||l)t.block$data(i.nil,u);else for(const e of n)(0,r.checkReportMissingProp)(t,e)}():function(){const s=e.let("missing");if(d||l){const n=e.let("valid",!0);t.block$data(n,()=>function(n,s){t.setParams({missingProperty:n}),e.forOf(n,a,()=>{e.assign(s,(0,r.propertyInData)(e,o,n,h.ownProperties)),e.if((0,i.not)(s),()=>{t.error(),e.break()})},i.nil)}(s,n)),t.ok(n)}else e.if((0,r.checkMissingProp)(t,n,s)),(0,r.reportMissingProp)(t,s),e.else()}(),h.strictRequired){const e=t.parentSchema.properties,{definedProperties:r}=t.it;for(const t of n)if(void 0===(null===e||void 0===e?void 0:e[t])&&!r.has(t)){const e=`required property "${t}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(c,e,c.opts.strictRequired)}}function u(){e.forOf("prop",a,n=>{t.setParams({missingProperty:n}),e.if((0,r.noPropertyInData)(e,o,n,h.ownProperties),()=>t.error())})}}};e.default=a},48250(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11915),i=n(13578),s=n(14426),a=n(59701),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:t=>{let{params:{i:e,j:n}}=t;return i.str`must NOT have duplicate items (items ## ${n} and ${e} are identical)`},params:t=>{let{params:{i:e,j:n}}=t;return i._`{i: ${e}, j: ${n}}`}},code(t){const{gen:e,data:n,$data:o,schema:l,parentSchema:c,schemaCode:h,it:d}=t;if(!o&&!l)return;const u=e.let("valid"),p=c.items?(0,r.getSchemaTypes)(c.items):[];function f(s,a){const o=e.name("item"),l=(0,r.checkDataTypes)(p,o,d.opts.strictNumbers,r.DataType.Wrong),c=e.const("indices",i._`{}`);e.for(i._`;${s}--;`,()=>{e.let(o,i._`${n}[${s}]`),e.if(l,i._`continue`),p.length>1&&e.if(i._`typeof ${o} == "string"`,i._`${o} += "_"`),e.if(i._`typeof ${c}[${o}] == "number"`,()=>{e.assign(a,i._`${c}[${o}]`),t.error(),e.assign(u,!1).break()}).code(i._`${c}[${o}] = ${s}`)})}function m(r,o){const l=(0,s.useFunc)(e,a.default),c=e.name("outer");e.label(c).for(i._`;${r}--;`,()=>e.for(i._`${o} = ${r}; ${o}--;`,()=>e.if(i._`${l}(${n}[${r}], ${n}[${o}])`,()=>{t.error(),e.assign(u,!1).break(c)})))}t.block$data(u,function(){const r=e.let("i",i._`${n}.length`),s=e.let("j");t.setParams({i:r,j:s}),e.assign(u,!0),e.if(i._`${r} > 1`,()=>(p.length>0&&!p.some(t=>"object"===t||"array"===t)?f:m)(r,s))},i._`${h} === false`),t.ok(u)}};e.default=o},23770(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0,function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"}(n=e.ElementType||(e.ElementType={})),e.isTag=function(t){return t.type===n.Tag||t.type===n.Script||t.type===n.Style},e.Root=n.Root,e.Text=n.Text,e.Directive=n.Directive,e.Comment=n.Comment,e.Script=n.Script,e.Style=n.Style,e.Tag=n.Tag,e.CDATA=n.CDATA,e.Doctype=n.Doctype},12754(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var s=n(23770),a=n(30504);i(n(30504),e);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function t(t,e,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"===typeof e&&(n=e,e=o),"object"===typeof t&&(e=t,t=void 0),this.callback=null!==t&&void 0!==t?t:null,this.options=null!==e&&void 0!==e?e:o,this.elementCB=null!==n&&void 0!==n?n:null}return t.prototype.onparserinit=function(t){this.parser=t},t.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},t.prototype.onopentag=function(t,e){var n=this.options.xmlMode?s.ElementType.Tag:void 0,r=new a.Element(t,e,void 0,n);this.addNode(r),this.tagStack.push(r)},t.prototype.ontext=function(t){var e=this.lastNode;if(e&&e.type===s.ElementType.Text)e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex);else{var n=new a.Text(t);this.addNode(n),this.lastNode=n}},t.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===s.ElementType.Comment)this.lastNode.data+=t;else{var e=new a.Comment(t);this.addNode(e),this.lastNode=e}},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var t=new a.Text(""),e=new a.CDATA([t]);this.addNode(e),t.parent=e,this.lastNode=t},t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var n=new a.ProcessingInstruction(t,e);this.addNode(n)},t.prototype.handleCallback=function(t){if("function"===typeof this.callback)this.callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&(t.prev=n,n.next=t),t.parent=e,this.lastNode=null},t}();e.DomHandler=l,e.default=l},30504(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNode=e.hasChildren=e.isDocument=e.isDirective=e.isComment=e.isText=e.isCDATA=e.isTag=e.Element=e.Document=e.CDATA=e.NodeWithChildren=e.ProcessingInstruction=e.Comment=e.Text=e.DataNode=e.Node=void 0;var s=n(23770),a=function(){function t(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(t){return void 0===t&&(t=!1),_(this,t)},t}();e.Node=a;var o=function(t){function e(e){var n=t.call(this)||this;return n.data=e,n}return r(e,t),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!1,configurable:!0}),e}(a);e.DataNode=o;var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=s.ElementType.Text,e}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(o);e.Text=l;var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=s.ElementType.Comment,e}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(o);e.Comment=c;var h=function(t){function e(e,n){var r=t.call(this,n)||this;return r.name=e,r.type=s.ElementType.Directive,r}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(o);e.ProcessingInstruction=h;var d=function(t){function e(e){var n=t.call(this)||this;return n.children=e,n}return r(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){var t;return null!==(t=this.children[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),e}(a);e.NodeWithChildren=d;var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=s.ElementType.CDATA,e}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(d);e.CDATA=u;var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=s.ElementType.Root,e}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(d);e.Document=p;var f=function(t){function e(e,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===e?s.ElementType.Script:"style"===e?s.ElementType.Style:s.ElementType.Tag);var a=t.call(this,r)||this;return a.name=e,a.attribs=n,a.type=i,a}return r(e,t),Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(e){var n,r;return{name:e,value:t.attribs[e],namespace:null===(n=t["x-attribsNamespace"])||void 0===n?void 0:n[e],prefix:null===(r=t["x-attribsPrefix"])||void 0===r?void 0:r[e]}})},enumerable:!1,configurable:!0}),e}(d);function m(t){return(0,s.isTag)(t)}function g(t){return t.type===s.ElementType.CDATA}function v(t){return t.type===s.ElementType.Text}function b(t){return t.type===s.ElementType.Comment}function y(t){return t.type===s.ElementType.Directive}function w(t){return t.type===s.ElementType.Root}function _(t,e){var n;if(void 0===e&&(e=!1),v(t))n=new l(t.data);else if(b(t))n=new c(t.data);else if(m(t)){var r=e?A(t.children):[],s=new f(t.name,i({},t.attribs),r);r.forEach(function(t){return t.parent=s}),null!=t.namespace&&(s.namespace=t.namespace),t["x-attribsNamespace"]&&(s["x-attribsNamespace"]=i({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(s["x-attribsPrefix"]=i({},t["x-attribsPrefix"])),n=s}else if(g(t)){r=e?A(t.children):[];var a=new u(r);r.forEach(function(t){return t.parent=a}),n=a}else if(w(t)){r=e?A(t.children):[];var o=new p(r);r.forEach(function(t){return t.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),n=o}else{if(!y(t))throw new Error("Not implemented yet: ".concat(t.type));var d=new h(t.name,t.data);null!=t["x-name"]&&(d["x-name"]=t["x-name"],d["x-publicId"]=t["x-publicId"],d["x-systemId"]=t["x-systemId"]),n=d}return n.startIndex=t.startIndex,n.endIndex=t.endIndex,null!=t.sourceCodeLocation&&(n.sourceCodeLocation=t.sourceCodeLocation),n}function A(t){for(var e=t.map(function(t){return _(t,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}e.Element=f,e.isTag=m,e.isCDATA=g,e.isText=v,e.isComment=b,e.isDirective=y,e.isDocument=w,e.hasChildren=function(t){return Object.prototype.hasOwnProperty.call(t,"children")},e.cloneNode=_},83080(t){"use strict";t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!==i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(s=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;0!==i--;){var a=s[i];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}},18261(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,e){return t[e.toLowerCase()]=e,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")},71123(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n,h,d,u,f;t=(0,r.escapeSpecialCharacters)(t);var g=o.exec(t),v=null===(e=null===g||void 0===g?void 0:g[1])||void 0===e?void 0:e.toLowerCase();switch(v){case i:var b=c(t);if(!(0,r.hasOpenTag)(t,s))null===(n=null===(w=b.querySelector(s))||void 0===w?void 0:w.parentNode)||void 0===n||n.removeChild(w);if(!(0,r.hasOpenTag)(t,a))null===(h=null===(w=b.querySelector(a))||void 0===w?void 0:w.parentNode)||void 0===h||h.removeChild(w);return b.querySelectorAll(i);case s:case a:var y=l(t).querySelectorAll(v);return(0,r.hasOpenTag)(t,a)&&(0,r.hasOpenTag)(t,s)?null!==(u=null===(d=y[0].parentNode)||void 0===d?void 0:d.childNodes)&&void 0!==u?u:m():y;default:return p?p(t):null!==(f=null===(w=l(t,a).querySelector(a))||void 0===w?void 0:w.childNodes)&&void 0!==f?f:m();var w}};var r=n(40116),i="html",s="head",a="body",o=/<([a-zA-Z]+[0-9]?)/,l=function(t,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(t,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},h="object"===typeof window&&window.DOMParser;if("function"===typeof h){var d=new h;l=c=function(t,e){return e&&(t="<".concat(e,">").concat(t,"</").concat(e,">")),d.parseFromString(t,"text/html")}}if("object"===typeof document&&document.implementation){var u=document.implementation.createHTMLDocument();l=function(t,e){if(e){var n=u.documentElement.querySelector(e);return n&&(n.innerHTML=t),u}return u.documentElement.innerHTML=t,u}}var p,f="object"===typeof document&&document.createElement("template");f&&f.content&&(p=function(t){return f.innerHTML=t,f.content.childNodes});var m=function(){return document.createDocumentFragment().childNodes}},80256(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("string"!==typeof t)throw new TypeError("First argument must be a string");if(!t)return[];var e=a.exec(t),n=e?e[1]:void 0;return(0,s.formatDOM)((0,i.default)(t),null,n)};var i=r(n(71123)),s=n(40116),a=/<(![a-zA-Z\s]+)>/},40116(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatAttributes=s,e.hasOpenTag=function(t,e){var n="<"+e,r=t.toLowerCase().indexOf(n);if(-1===r)return!1;var i=t[r+n.length];return">"===i||" "===i||"\t"===i||"\n"===i||"\r"===i||"/"===i},e.escapeSpecialCharacters=function(t){return t.replace(i.CARRIAGE_RETURN_REGEX,i.CARRIAGE_RETURN_PLACEHOLDER)},e.revertEscapedCharacters=o,e.formatDOM=function t(e,n,i){var l,c,h,d;void 0===n&&(n=null);for(var u,p=[],f=0,m=e.length;f<m;f++){var g=e[f];switch(g.nodeType){case 1:var v=a(g.nodeName);(u=new r.Element(v,s(g.attributes))).children=t("template"===v?g.content.childNodes:g.childNodes,u);break;case 3:u=new r.Text(o(null!==(l=g.nodeValue)&&void 0!==l?l:""));break;case 8:u=new r.Comment(null!==(c=g.nodeValue)&&void 0!==c?c:"");break;default:continue}var b=null!==(h=p[f-1])&&void 0!==h?h:null;b&&(b.next=u),u.parent=n,u.prev=b,u.next=null,p.push(u)}i&&((u=new r.ProcessingInstruction(i.substring(0,i.indexOf(" ")).toLowerCase(),i)).next=null!==(d=p[0])&&void 0!==d?d:null,u.parent=n,p.unshift(u),p[1]&&(p[1].prev=p[0]));return p};var r=n(12754),i=n(18261);function s(t){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];e[i.name]=i.value}return e}function a(t){var e=function(t){return i.CASE_SENSITIVE_TAG_NAMES_MAP[t]}(t=t.toLowerCase());return e||t}function o(t){return t.replace(i.CARRIAGE_RETURN_PLACEHOLDER_REGEX,i.CARRIAGE_RETURN)}},1185(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){void 0===t&&(t={});var n={},c=Boolean(t.type&&o[t.type]);for(var h in t){var d=t[h];if((0,r.isCustomAttribute)(h))n[h]=d;else{var u=h.toLowerCase(),p=l(u);if(p){var f=(0,r.getPropertyInfo)(p);switch(s.includes(p)&&a.includes(e)&&!c&&(p=l("default"+u)),n[p]=d,null===f||void 0===f?void 0:f.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(n[h]=d)}}return(0,i.setStyleProp)(t.style,n),n};var r=n(76837),i=n(76915),s=["checked","value"],a=["input","select","textarea"],o={reset:!0,submit:!0};function l(t){return r.possibleStandardNames[t]}},98847(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){var r,i,c,h,d;void 0===n&&(n={});for(var u=[],p="function"===typeof n.replace,f=null!==(r=n.transform)&&void 0!==r?r:a.returnFirstArg,m=null!==(i=n.library)&&void 0!==i?i:o,g=m.cloneElement,v=m.createElement,b=m.isValidElement,y=e.length,w=0;w<y;w++){var _=e[w];if(p){var A=null===(c=n.replace)||void 0===c?void 0:c.call(n,_,w);if(b(A)){y>1&&(A=g(A,{key:null!==(h=A.key)&&void 0!==h?h:w})),u.push(f(A,_,w));continue}}if("text"!==_.type){var x=_,E={};l(x)?((0,a.setStyleProp)(x.attribs.style,x.attribs),E=x.attribs):x.attribs&&(E=(0,s.default)(x.attribs,x.name));var k=void 0;switch(_.type){case"script":case"style":_.children[0]&&(E.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":"textarea"===_.name&&_.children[0]?E.defaultValue=_.children[0].data:(null===(d=_.children)||void 0===d?void 0:d.length)&&(k=t(_.children,n));break;default:continue}y>1&&(E.key=w),u.push(f(v(_.name,E,k),_,w))}else{var C=!_.data.trim().length;if(C&&_.parent&&!(0,a.canTextBeChildOfNode)(_.parent))continue;if(n.trim&&C)continue;u.push(f(_.data,_,w))}}return 1===u.length?u[0]:u};var i=n(94922),s=r(n(1185)),a=n(76915),o={cloneElement:i.cloneElement,createElement:i.createElement,isValidElement:i.isValidElement};function l(t){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===t.type&&(0,a.isCustomComponent)(t.name,t.attribs)}},59107(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=function(t,e){var n;if("string"!==typeof t)throw new TypeError("First argument must be a string");if(!t)return[];return(0,a.default)((0,i.default)(t,null!==(n=null===e||void 0===e?void 0:e.htmlparser2)&&void 0!==n?n:l),e)};var i=r(n(80256));e.htmlToDOM=i.default;var s=r(n(1185));e.attributesToProps=s.default;var a=r(n(98847));e.domToReact=a.default;var o=n(12754);Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return o.Text}});var l={lowerCaseAttributeNames:!1}},76915(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=function(t,e){if(!t.includes("-"))return Boolean(e&&"string"===typeof e.is);if(a.has(t))return!1;return!0},e.setStyleProp=function(t,e){if("string"!==typeof t)return;if(!t.trim())return void(e.style={});try{e.style=(0,s.default)(t,o)}catch(n){e.style={}}};var i=n(94922),s=r(n(71148)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var o={reactCompat:!0};e.PRESERVE_CUSTOM_ATTRIBUTES=Number(i.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.canTextBeChildOfNode=function(t){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name)};e.returnFirstArg=function(t){return t}},52808(t){"use strict";var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function h(t){return t?t.replace(l,c):c}t.exports=function(t,l){if("string"!==typeof t)throw new TypeError("First argument must be a string");if(!t)return[];l=l||{};var d=1,u=1;function p(t){var e=t.match(n);e&&(d+=e.length);var r=t.lastIndexOf("\n");u=~r?t.length-r:u+t.length}function f(){var t={line:d,column:u};return function(e){return e.position=new m(t),b(),e}}function m(t){this.start=t,this.end={line:d,column:u},this.source=l.source}function g(e){var n=new Error(l.source+":"+d+":"+u+": "+e);if(n.reason=e,n.filename=l.source,n.line=d,n.column=u,n.source=t,!l.silent)throw n}function v(e){var n=e.exec(t);if(n){var r=n[0];return p(r),t=t.slice(r.length),n}}function b(){v(r)}function y(t){var e;for(t=t||[];e=w();)!1!==e&&t.push(e);return t}function w(){var e=f();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;c!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,c===t.charAt(n-1))return g("End of comment missing");var r=t.slice(2,n-2);return u+=2,p(r),t=t.slice(n),u+=2,e({type:"comment",comment:r})}}function _(){var t=f(),n=v(i);if(n){if(w(),!v(s))return g("property missing ':'");var r=v(a),l=t({type:"declaration",property:h(n[0].replace(e,c)),value:r?h(r[0].replace(e,c)):c});return v(o),l}}return m.prototype.content=t,b(),function(){var t,e=[];for(y(e);t=_();)!1!==t&&(e.push(t),y(e));return e}()}},69453(t){"use strict";var e=t.exports=function(t,e,r){"function"==typeof e&&(r=e,e={}),n(e,"function"==typeof(r=e.cb||r)?r:r.pre||function(){},r.post||function(){},t,"",t)};function n(t,i,s,a,o,l,c,h,d,u){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var p in i(a,o,l,c,h,d,u),a){var f=a[p];if(Array.isArray(f)){if(p in e.arrayKeywords)for(var m=0;m<f.length;m++)n(t,i,s,f[m],o+"/"+p+"/"+m,l,o,p,a,m)}else if(p in e.propsKeywords){if(f&&"object"==typeof f)for(var g in f)n(t,i,s,f[g],o+"/"+p+"/"+r(g),l,o,p,a,g)}else(p in e.keywords||t.allKeys&&!(p in e.skipKeywords))&&n(t,i,s,f,o+"/"+p,l,o,p,a)}s(a,o,l,c,h,d,u)}}function r(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},81261(t){t.exports=function t(e,n,r){function i(a,o){if(!n[a]){if(!e[a]){if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){return i(e[a][1][t]||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var s=void 0,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";var r=t("./utils"),i=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(t){for(var e,n,i,a,o,l,c,h=[],d=0,u=t.length,p=u,f="string"!==r.getTypeOf(t);d<t.length;)p=u-d,i=f?(e=t[d++],n=d<u?t[d++]:0,d<u?t[d++]:0):(e=t.charCodeAt(d++),n=d<u?t.charCodeAt(d++):0,d<u?t.charCodeAt(d++):0),a=e>>2,o=(3&e)<<4|n>>4,l=1<p?(15&n)<<2|i>>6:64,c=2<p?63&i:64,h.push(s.charAt(a)+s.charAt(o)+s.charAt(l)+s.charAt(c));return h.join("")},n.decode=function(t){var e,n,r,a,o,l,c=0,h=0,d="data:";if(t.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var u,p=3*(t=t.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&p--,t.charAt(t.length-2)===s.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=i.uint8array?new Uint8Array(0|p):new Array(0|p);c<t.length;)e=s.indexOf(t.charAt(c++))<<2|(a=s.indexOf(t.charAt(c++)))>>4,n=(15&a)<<4|(o=s.indexOf(t.charAt(c++)))>>2,r=(3&o)<<6|(l=s.indexOf(t.charAt(c++))),u[h++]=e,64!==o&&(u[h++]=n),64!==l&&(u[h++]=r);return u}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var r=t("./external"),i=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function o(t,e,n,r,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=r,this.compressedContent=i}o.prototype={getContentWorker:function(){var t=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,n){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var r=t("./utils"),i=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==r.getTypeOf(t)?function(t,e,n,r){var s=i,a=r+n;t^=-1;for(var o=r;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}(0|e,t,t.length,0):function(t,e,n,r){var s=i,a=r+n;t^=-1;for(var o=r;o<a;o++)t=t>>>8^s[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:r}},{lie:37}],7:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=r?"uint8array":"array";function l(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",s.inherits(l,a),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function r(t,e){var n,r="";for(n=0;n<e;n++)r+=String.fromCharCode(255&t),t>>>=8;return r}function i(t,e,n,i,a,h){var d,u,p=t.file,f=t.compression,m=h!==o.utf8encode,g=s.transformTo("string",h(p.name)),v=s.transformTo("string",o.utf8encode(p.name)),b=p.comment,y=s.transformTo("string",h(b)),w=s.transformTo("string",o.utf8encode(b)),_=v.length!==p.name.length,A=w.length!==b.length,x="",E="",k="",C=p.dir,S=p.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var D=0;e&&(D|=8),m||!_&&!A||(D|=2048);var M=0,P=0;C&&(M|=16),"UNIX"===a?(P=798,M|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(p.unixPermissions,C)):(P=20,M|=function(t){return 63&(t||0)}(p.dosPermissions)),d=S.getUTCHours(),d<<=6,d|=S.getUTCMinutes(),d<<=5,d|=S.getUTCSeconds()/2,u=S.getUTCFullYear()-1980,u<<=4,u|=S.getUTCMonth()+1,u<<=5,u|=S.getUTCDate(),_&&(E=r(1,1)+r(l(g),4)+v,x+="up"+r(E.length,2)+E),A&&(k=r(1,1)+r(l(y),4)+w,x+="uc"+r(k.length,2)+k);var I="";return I+="\n\0",I+=r(D,2),I+=f.magic,I+=r(d,2),I+=r(u,2),I+=r(T.crc32,4),I+=r(T.compressedSize,4),I+=r(T.uncompressedSize,4),I+=r(g.length,2),I+=r(x.length,2),{fileRecord:c.LOCAL_FILE_HEADER+I+g+x,dirRecord:c.CENTRAL_FILE_HEADER+r(P,2)+I+r(y.length,2)+"\0\0\0\0"+r(M,4)+r(i,4)+g+x+y}}var s=t("../utils"),a=t("../stream/GenericWorker"),o=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(t,e,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,a),h.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-r-1))/n:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+r(t.crc32,4)+r(t.compressedSize,4)+r(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var n=this.bytesWritten-t,i=function(t,e,n,i,a){var o=s.transformTo("string",a(i));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(t,2)+r(t,2)+r(e,4)+r(n,4)+r(o.length,2)+o}(this.dirRecords.length,n,t,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},h.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var n=0;n<e.length;n++)try{e[n].error(t)}catch(t){}return!0},h.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,n){"use strict";var r=t("../compressions"),i=t("./ZipFileWorker");n.generateWorker=function(t,e,n){var s=new i(e.streamFiles,n,e.platform,e.encodeFileName),a=0;try{t.forEach(function(t,n){a++;var i=function(t,e){var n=t||e,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,e.compression),o=n.options.compressionOptions||e.compressionOptions||{},l=n.dir,c=n.date;n._compressWorker(i,o).withStreamInfo("file",{name:t,dir:l,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(s)}),s.entriesCount=a}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new r;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.1",r.loadAsync=function(t,e){return(new r).loadAsync(t,e)},r.external=t("./external"),e.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,n){"use strict";var r=t("./utils"),i=t("./external"),s=t("./utf8"),a=t("./zipEntries"),o=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function c(t){return new i.Promise(function(e,n){var r=t.decompressed.getContentWorker().pipe(new o);r.on("error",function(t){n(t)}).on("end",function(){r.streamInfo.crc32!==t.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}e.exports=function(t,e){var n=this;return e=r.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(t)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var n=new a(e);return n.load(t),n}).then(function(t){var n=[i.Promise.resolve(t)],r=t.files;if(e.checkCRC32)for(var s=0;s<r.length;s++)n.push(c(r[s]));return i.Promise.all(n)}).then(function(t){for(var i=t.shift(),s=i.files,a=0;a<s.length;a++){var o=s[a],l=o.fileNameStr,c=r.resolve(o.fileNameStr);n.file(c,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:e.createFolders}),o.dir||(n.file(c).unsafeOriginalName=l)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../stream/GenericWorker");function s(t,e){i.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}r.inherits(s,i),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}})}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t)}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end()})},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,n){"use strict";var r=t("readable-stream").Readable;function i(t,e,n){r.call(this,e),this._helper=t;var i=this;t.on("data",function(t,e){i.push(t)||i._helper.pause(),n&&n(e)}).on("error",function(t){i.emit("error",t)}).on("end",function(){i.push(null)})}t("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},e.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,e,n){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,n){"use strict";function r(t,e,n){var r,i=s.getTypeOf(e),o=s.extend(n||{},l);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(t=m(t)),o.createFolders&&(r=f(t))&&g.call(this,r,!0);var d="string"===i&&!1===o.binary&&!1===o.base64;n&&void 0!==n.binary||(o.binary=!d),(e instanceof c&&0===e.uncompressedSize||o.dir||!e||0===e.length)&&(o.base64=!1,o.binary=!0,e="",o.compression="STORE",i="string");var v=null;v=e instanceof c||e instanceof a?e:u.isNode&&u.isStream(e)?new p(t,e):s.prepareContent(t,e,o.binary,o.optimizedBinaryString,o.base64);var b=new h(t,v,o);this.files[t]=b}var i=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),l=t("./defaults"),c=t("./compressedObject"),h=t("./zipObject"),d=t("./generate"),u=t("./nodejsUtils"),p=t("./nodejs/NodejsStreamInputAdapter"),f=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},g=function(t,e){return e=void 0!==e?e:l.createFolders,t=m(t),this.files[t]||r.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function v(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,n,r;for(e in this.files)r=this.files[e],(n=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(n,r)},filter:function(t){var e=[];return this.forEach(function(n,r){t(n,r)&&e.push(r)}),e},file:function(t,e,n){if(1!==arguments.length)return t=this.root+t,r.call(this,t,e,n),this;if(v(t)){var i=t;return this.filter(function(t,e){return!e.dir&&i.test(t)})}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(v(t))return this.filter(function(e,n){return n.dir&&t.test(e)});var e=this.root+t,n=g.call(this,e),r=this.clone();return r.root=n.name,r},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var n=this.filter(function(e,n){return n.name.slice(0,t.length)===t}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,n={};try{if((n=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");s.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var r=n.comment||this.comment||"";e=d.generateWorker(this,n,r)}catch(t){(e=new a("error")).error(t)}return new o(e,n.type||"string",n.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,n){"use strict";e.exports=t("stream")},{stream:void 0}],17:[function(t,e,n){"use strict";var r=t("./DataReader");function i(t){r.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(i,r),i.prototype.byteAt=function(t){return this.data[this.zero+t]},i.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),n=t.charCodeAt(1),r=t.charCodeAt(2),i=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===n&&this.data[s+2]===r&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=t.charCodeAt(2),i=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&n===s[1]&&r===s[2]&&i===s[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,e,n){"use strict";var r=t("../utils");function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(){},readInt:function(t){var e,n=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return r.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=r.getTypeOf(t);return r.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new l(r.transformTo("uint8array",t)):new s(r.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../utils");function s(t){r.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(s,r),s.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../crc32");function s(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,r),s.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function s(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}r.inherits(s,i),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function s(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=r.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}r.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n<this._listeners[t].length;n++)this._listeners[t][n].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=r},{}],29:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./ConvertWorker"),s=t("./GenericWorker"),a=t("../base64"),o=t("../support"),l=t("../external"),c=null;if(o.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function h(t,e){return new l.Promise(function(n,i){var s=[],o=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,n){s.push(t),e&&e(n)}).on("error",function(t){s=[],i(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return r.newBlob(r.transformTo("arraybuffer",e),n);case"base64":return a.encode(e);default:return r.transformTo(t,e)}}(l,function(t,e){var n,r=0,i=null,s=0;for(n=0;n<e.length;n++)s+=e[n].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(i=new Uint8Array(s),n=0;n<e.length;n++)i.set(e[n],r),r+=e[n].length;return i;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(o,s),c);n(t)}catch(t){i(t)}s=[]}).resume()})}function d(t,e,n){var a=e;switch(e){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=e,this._mimeType=n,r.checkSupport(a),this._worker=t.pipe(new i(a)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}d.prototype={accumulate:function(t){return h(this,t)},on:function(t,e){var n=this;return"data"===t?this._worker.on(t,function(t){e.call(n,t.data,t.meta)}):this._worker.on(t,function(){r.delay(e,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer="undefined"!=typeof Buffer,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=0===i.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch(t){n.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,n){"use strict";for(var r=t("./utils"),i=t("./support"),s=t("./nodejsUtils"),a=t("./stream/GenericWorker"),o=new Array(256),l=0;l<256;l++)o[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function h(){a.call(this,"utf-8 encode")}o[254]=o[254]=1,n.utf8encode=function(t){return i.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var e,n,r,s,a,o=t.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(e=i.uint8array?new Uint8Array(l):new Array(l),s=a=0;a<l;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?e[a++]=n:(n<2048?e[a++]=192|n>>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e}(t)},n.utf8decode=function(t){return i.nodebuffer?r.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,i,s,a=t.length,l=new Array(2*a);for(e=n=0;e<a;)if((i=t[e++])<128)l[n++]=i;else if(4<(s=o[i]))l[n++]=65533,e+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&e<a;)i=i<<6|63&t[e++],s--;1<s?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(t=r.transformTo(i.uint8array?"uint8array":"array",t))},r.inherits(c,a),c.prototype.processChunk=function(t){var e=r.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=e;(e=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+o[t[n]]>e?n:e}(e),l=e;a!==e.length&&(i.uint8array?(l=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(l=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(h,a),h.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),i=t("./base64"),s=t("./nodejsUtils"),a=t("./external");function o(t){return t}function l(t,e){for(var n=0;n<t.length;++n)e[n]=255&t.charCodeAt(n);return e}t("setimmediate"),n.newBlob=function(e,r){n.checkSupport("blob");try{return new Blob([e],{type:r})}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(e),i.getBlob(r)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(t,e,n){var r=[],i=0,s=t.length;if(s<=n)return String.fromCharCode.apply(null,t);for(;i<s;)"array"===e||"nodebuffer"===e?r.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+n,s)))):r.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+n,s)))),i+=n;return r.join("")},stringifyByChar:function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var e=65536,r=n.getTypeOf(t),i=!0;if("uint8array"===r?i=c.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=c.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return c.stringifyByChunk(t,r,e)}catch(t){e=Math.floor(e/2)}return c.stringifyByChar(t)}function d(t,e){for(var n=0;n<t.length;n++)e[n]=t[n];return e}n.applyFromCharCode=h;var u={};u.string={string:o,array:function(t){return l(t,new Array(t.length))},arraybuffer:function(t){return u.string.uint8array(t).buffer},uint8array:function(t){return l(t,new Uint8Array(t.length))},nodebuffer:function(t){return l(t,s.allocBuffer(t.length))}},u.array={string:h,array:o,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},u.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:o,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},u.uint8array={string:h,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:o,nodebuffer:function(t){return s.newBufferFrom(t)}},u.nodebuffer={string:h,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return u.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:o},n.transformTo=function(t,e){if(e=e||"",!t)return e;n.checkSupport(t);var r=n.getTypeOf(e);return u[r][t](e)},n.resolve=function(t){for(var e=t.split("/"),n=[],r=0;r<e.length;r++){var i=e[r];"."===i||""===i&&0!==r&&r!==e.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},n.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":r.nodebuffer&&s.isBuffer(t)?"nodebuffer":r.uint8array&&t instanceof Uint8Array?"uint8array":r.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(t){if(!r[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(t){var e,n,r="";for(n=0;n<(t||"").length;n++)r+="\\x"+((e=t.charCodeAt(n))<16?"0":"")+e.toString(16).toUpperCase();return r},n.delay=function(t,e,n){setImmediate(function(){t.apply(n||null,e||[])})},n.inherits=function(t,e){function n(){}n.prototype=e.prototype,t.prototype=new n},n.extend=function(){var t,e,n={};for(t=0;t<arguments.length;t++)for(e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&void 0===n[e]&&(n[e]=arguments[t][e]);return n},n.prepareContent=function(t,e,s,o,c){return a.Promise.resolve(e).then(function(t){return r.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise(function(e,n){var r=new FileReader;r.onload=function(t){e(t.target.result)},r.onerror=function(t){n(t.target.error)},r.readAsArrayBuffer(t)}):t}).then(function(e){var h=n.getTypeOf(e);return h?("arraybuffer"===h?e=n.transformTo("uint8array",e):"string"===h&&(c?e=i.decode(e):s&&!0!==o&&(e=function(t){return l(t,r.uint8array?new Uint8Array(t.length):new Array(t.length))}(e))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),i=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=t("./support");function l(t){this.files=[],this.loadOptions=t}l.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(e)+", expected "+i.pretty(t)+")")}},isSignature:function(t,e){var n=this.reader.index;this.reader.setIndex(t);var r=this.reader.readString(4)===e;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",n=i.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,n,r=this.zip64EndOfCentralSize-44;0<r;)t=this.reader.readInt(2),e=this.reader.readInt(4),n=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=e-n;if(0<r)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(t){this.reader=r(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),i=t("./utils"),s=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),l=t("./compressions"),c=t("./support");function h(t,e){this.options=t,this.loadOptions=e}h.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,n;if(t.skip(22),this.fileNameLength=t.readInt(2),n=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in l)if(Object.prototype.hasOwnProperty.call(l,e)&&l[e].magic===t)return l[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,n,r,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<i;)e=t.readInt(2),n=t.readInt(2),r=t.readData(n),this.extraFields[e]={id:e,length:n,value:r};t.setIndex(i)},handleUTF8:function(){var t=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var n=i.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var s=i.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=r(t.value);return 1!==e.readInt(1)||a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=r(t.value);return 1!==e.readInt(1)||a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,n){"use strict";function r(t,e,n){this.name=t,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=e,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),l=t("./stream/GenericWorker");r.prototype={internalStream:function(t){var e=null,n="string";try{if(!t)throw new Error("No output type specified.");var r="string"===(n=t.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),e=this._decompressWorker();var s=!this._dataBinary;s&&!r&&(e=e.pipe(new a.Utf8EncodeWorker)),!s&&r&&(e=e.pipe(new a.Utf8DecodeWorker))}catch(t){(e=new l("error")).error(t)}return new i(e,n,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(n,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=h;e.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,n){(function(t){"use strict";var n,r,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var s=0,a=new i(h),o=t.document.createTextNode("");a.observe(o,{characterData:!0}),n=function(){o.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)n="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new t.MessageChannel;l.port1.onmessage=h,n=function(){l.port2.postMessage(0)}}var c=[];function h(){var t,e;r=!0;for(var n=c.length;n;){for(e=c,c=[],t=-1;++t<n;)e[t]();n=c.length}r=!1}e.exports=function(t){1!==c.push(t)||r||n()}}).call(this,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,n){"use strict";var r=t("immediate");function i(){}var s={},a=["REJECTED"],o=["FULFILLED"],l=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==i&&p(this,t)}function h(t,e,n){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(t,e,n){r(function(){var r;try{r=e(n)}catch(r){return s.reject(t,r)}r===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,r)})}function u(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function p(t,e){var n=!1;function r(e){n||(n=!0,s.reject(t,e))}function i(e){n||(n=!0,s.resolve(t,e))}var a=f(function(){e(i,r)});"error"===a.status&&r(a.value)}function f(t,e){var n={};try{n.value=t(e),n.status="success"}catch(t){n.status="error",n.value=t}return n}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){throw n})})},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===o||"function"!=typeof e&&this.state===a)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===o?t:e,this.outcome):this.queue.push(new h(n,t,e)),n},h.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},h.prototype.otherCallFulfilled=function(t){d(this.promise,this.onFulfilled,t)},h.prototype.callRejected=function(t){s.reject(this.promise,t)},h.prototype.otherCallRejected=function(t){d(this.promise,this.onRejected,t)},s.resolve=function(t,e){var n=f(u,e);if("error"===n.status)return s.reject(t,n.value);var r=n.value;if(r)p(t,r);else{t.state=o,t.outcome=e;for(var i=-1,a=t.queue.length;++i<a;)t.queue[i].callFulfilled(e)}return t},s.reject=function(t,e){t.state=a,t.outcome=e;for(var n=-1,r=t.queue.length;++n<r;)t.queue[n].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:s.resolve(new this(i),t)},c.reject=function(t){var e=new this(i);return s.reject(e,t)},c.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),o=0,l=-1,c=new this(i);++l<n;)h(t[l],l);return c;function h(t,i){e.resolve(t).then(function(t){a[i]=t,++o!==n||r||(r=!0,s.resolve(c,a))},function(t){r||(r=!0,s.reject(c,t))})}},c.race=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var n=t.length,r=!1;if(!n)return this.resolve([]);for(var a,o=-1,l=new this(i);++o<n;)a=t[o],e.resolve(a).then(function(t){r||(r=!0,s.resolve(l,t))},function(t){r||(r=!0,s.reject(l,t))});return l}},{immediate:36}],38:[function(t,e,n){"use strict";var r={};(0,t("./lib/utils/common").assign)(r,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,n){"use strict";var r=t("./zlib/deflate"),i=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/messages"),o=t("./zlib/zstream"),l=Object.prototype.toString,c=0,h=-1,d=0,u=8;function p(t){if(!(this instanceof p))return new p(t);this.options=i.assign({level:h,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==c)throw new Error(a[n]);if(e.header&&r.deflateSetHeader(this.strm,e.header),e.dictionary){var f;if(f="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===l.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(n=r.deflateSetDictionary(this.strm,f))!==c)throw new Error(a[n]);this._dict_set=!0}}function f(t,e){var n=new p(e);if(n.push(t,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(t,e){var n,a,o=this.strm,h=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=s.string2buf(t):"[object ArrayBuffer]"===l.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(h),o.next_out=0,o.avail_out=h),1!==(n=r.deflate(o,a))&&n!==c)return this.onEnd(n),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c):2!==a||(this.onEnd(c),!(o.avail_out=0))},p.prototype.onData=function(t){this.chunks.push(t)},p.prototype.onEnd=function(t){t===c&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Deflate=p,n.deflate=f,n.deflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},n.gzip=function(t,e){return(e=e||{}).gzip=!0,f(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,n){"use strict";var r=t("./zlib/inflate"),i=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/constants"),o=t("./zlib/messages"),l=t("./zlib/zstream"),c=t("./zlib/gzheader"),h=Object.prototype.toString;function d(t){if(!(this instanceof d))return new d(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,e.windowBits);if(n!==a.Z_OK)throw new Error(o[n]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function u(t,e){var n=new d(e);if(n.push(t,!0),n.err)throw n.msg||o[n.err];return n.result}d.prototype.push=function(t,e){var n,o,l,c,d,u,p=this.strm,f=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?p.input=s.binstring2buf(t):"[object ArrayBuffer]"===h.call(t)?p.input=new Uint8Array(t):p.input=t,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(f),p.next_out=0,p.avail_out=f),(n=r.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(u="string"==typeof m?s.string2buf(m):"[object ArrayBuffer]"===h.call(m)?new Uint8Array(m):m,n=r.inflateSetDictionary(this.strm,u)),n===a.Z_BUF_ERROR&&!0===g&&(n=a.Z_OK,g=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),!(this.ended=!0);p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(p.output,p.next_out),c=p.next_out-l,d=s.buf2string(p.output,l),p.next_out=c,p.avail_out=f-c,c&&i.arraySet(p.output,p.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(g=!0)}while((0<p.avail_in||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(p.avail_out=0))},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},n.Inflate=d,n.inflate=u,n.inflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},n.ungzip=u},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},n.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var s=0;s<r;s++)t[i+s]=e[n+s]},flattenChunks:function(t){var e,n,r,i,s,a;for(e=r=0,n=t.length;e<n;e++)r+=t[e].length;for(a=new Uint8Array(r),e=i=0,n=t.length;e<n;e++)s=t[e],a.set(s,i),i+=s.length;return a}},s={arraySet:function(t,e,n,r,i){for(var s=0;s<r;s++)t[i+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,s))},n.setTyped(r)},{}],42:[function(t,e,n){"use strict";var r=t("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var a=new r.Buf8(256),o=0;o<256;o++)a[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function l(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(t,e));for(var n="",a=0;a<e;a++)n+=String.fromCharCode(t[a]);return n}a[254]=a[254]=1,n.string2buf=function(t){var e,n,i,s,a,o=t.length,l=0;for(s=0;s<o;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),l+=n<128?1:n<2048?2:n<65536?3:4;for(e=new r.Buf8(l),s=a=0;a<l;s++)55296==(64512&(n=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(i-56320),s++),n<128?e[a++]=n:(n<2048?e[a++]=192|n>>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new r.Buf8(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e},n.buf2string=function(t,e){var n,r,i,s,o=e||t.length,c=new Array(2*o);for(n=r=0;n<o;)if((i=t[n++])<128)c[r++]=i;else if(4<(s=a[i]))c[r++]=65533,n+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&n<o;)i=i<<6|63&t[n++],s--;1<s?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+a[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){for(var i=65535&t,s=t>>>16&65535,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;s=s+(i=i+e[r++]|0)|0,--a;);i%=65521,s%=65521}return i|s<<16}},{}],44:[function(t,e,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,n){"use strict";var r=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,i){var s=r,a=i+n;t^=-1;for(var o=i;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,n){"use strict";var r,i=t("../utils/common"),s=t("./trees"),a=t("./adler32"),o=t("./crc32"),l=t("./messages"),c=0,h=4,d=0,u=-2,p=-1,f=4,m=2,g=8,v=9,b=286,y=30,w=19,_=2*b+1,A=15,x=3,E=258,k=E+x+1,C=42,S=113,T=1,D=2,M=3,P=4;function I(t,e){return t.msg=l[e],e}function F(t){return(t<<1)-(4<t?9:0)}function R(t){for(var e=t.length;0<=--e;)t[e]=0}function N(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(i.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function L(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,N(t.strm)}function O(t,e){t.pending_buf[t.pending++]=e}function B(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function $(t,e){var n,r,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-k?t.strstart-(t.w_size-k):0,c=t.window,h=t.w_mask,d=t.prev,u=t.strstart+E,p=c[s+a-1],f=c[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(c[(n=e)+a]===f&&c[n+a-1]===p&&c[n]===c[s]&&c[++n]===c[s+1]){s+=2,n++;do{}while(c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&c[++s]===c[++n]&&s<u);if(r=E-(u-s),s=u-E,a<r){if(t.match_start=e,o<=(a=r))break;p=c[s+a-1],f=c[s+a]}}}while((e=d[e&h])>l&&0!=--i);return a<=t.lookahead?a:t.lookahead}function z(t){var e,n,r,s,l,c,h,d,u,p,f=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-k)){for(i.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=n=t.hash_size;r=t.head[--e],t.head[e]=f<=r?r-f:0,--n;);for(e=n=f;r=t.prev[--e],t.prev[e]=f<=r?r-f:0,--n;);s+=f}if(0===t.strm.avail_in)break;if(c=t.strm,h=t.window,d=t.strstart+t.lookahead,p=void 0,(u=s)<(p=c.avail_in)&&(p=u),n=0===p?0:(c.avail_in-=p,i.arraySet(h,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,h,p,d):2===c.state.wrap&&(c.adler=o(c.adler,h,p,d)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=n,t.lookahead+t.insert>=x)for(l=t.strstart-t.insert,t.ins_h=t.window[l],t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[l+x-1])&t.hash_mask,t.prev[l&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=l,l++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<k&&0!==t.strm.avail_in)}function j(t,e){for(var n,r;;){if(t.lookahead<k){if(z(t),t.lookahead<k&&e===c)return T;if(0===t.lookahead)break}if(n=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-k&&(t.match_length=$(t,n)),t.match_length>=x)if(r=s._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(L(t,!1),0===t.strm.avail_out))return T}return t.insert=t.strstart<x-1?t.strstart:x-1,e===h?(L(t,!0),0===t.strm.avail_out?M:P):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?T:D}function U(t,e){for(var n,r,i;;){if(t.lookahead<k){if(z(t),t.lookahead<k&&e===c)return T;if(0===t.lookahead)break}if(n=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-k&&(t.match_length=$(t,n),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-x,r=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,r&&(L(t,!1),0===t.strm.avail_out))return T}else if(t.match_available){if((r=s._tr_tally(t,0,t.window[t.strstart-1]))&&L(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return T}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===h?(L(t,!0),0===t.strm.avail_out?M:P):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?T:D}function H(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}function V(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=g,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*_),this.dyn_dtree=new i.Buf16(2*(2*y+1)),this.bl_tree=new i.Buf16(2*(2*w+1)),R(this.dyn_ltree),R(this.dyn_dtree),R(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(A+1),this.heap=new i.Buf16(2*b+1),R(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*b+1),R(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function q(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=m,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?C:S,t.adler=2===e.wrap?0:1,e.last_flush=c,s._tr_init(e),d):I(t,u)}function W(t){var e=q(t);return e===d&&function(t){t.window_size=2*t.w_size,R(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=x-1,t.match_available=0,t.ins_h=0}(t.state),e}function G(t,e,n,r,s,a){if(!t)return u;var o=1;if(e===p&&(e=6),r<0?(o=0,r=-r):15<r&&(o=2,r-=16),s<1||v<s||n!==g||r<8||15<r||e<0||9<e||a<0||f<a)return I(t,u);8===r&&(r=9);var l=new V;return(t.state=l).strm=t,l.wrap=o,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+x-1)/x),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=a,l.method=n,W(t)}r=[new H(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(z(t),0===t.lookahead&&e===c)return T;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,L(t,!1),0===t.strm.avail_out))return T;if(t.strstart-t.block_start>=t.w_size-k&&(L(t,!1),0===t.strm.avail_out))return T}return t.insert=0,e===h?(L(t,!0),0===t.strm.avail_out?M:P):(t.strstart>t.block_start&&(L(t,!1),t.strm.avail_out),T)}),new H(4,4,8,4,j),new H(4,5,16,8,j),new H(4,6,32,32,j),new H(4,4,16,16,U),new H(8,16,32,32,U),new H(8,16,128,128,U),new H(8,32,128,256,U),new H(32,128,258,1024,U),new H(32,258,258,4096,U)],n.deflateInit=function(t,e){return G(t,e,g,15,8,0)},n.deflateInit2=G,n.deflateReset=W,n.deflateResetKeep=q,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,d):u},n.deflate=function(t,e){var n,i,a,l;if(!t||!t.state||5<e||e<0)return t?I(t,u):u;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==h)return I(t,0===t.avail_out?-5:u);if(i.strm=t,n=i.last_flush,i.last_flush=e,i.status===C)if(2===i.wrap)t.adler=0,O(i,31),O(i,139),O(i,8),i.gzhead?(O(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),O(i,255&i.gzhead.time),O(i,i.gzhead.time>>8&255),O(i,i.gzhead.time>>16&255),O(i,i.gzhead.time>>24&255),O(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),O(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(O(i,255&i.gzhead.extra.length),O(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=o(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(O(i,0),O(i,0),O(i,0),O(i,0),O(i,0),O(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),O(i,3),i.status=S);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(p|=32),p+=31-p%31,i.status=S,B(i,p),0!==i.strstart&&(B(i,t.adler>>>16),B(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),N(t),a=i.pending,i.pending!==i.pending_buf_size));)O(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),N(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,O(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),N(t),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,O(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&N(t),i.pending+2<=i.pending_buf_size&&(O(i,255&t.adler),O(i,t.adler>>8&255),t.adler=0,i.status=S)):i.status=S),0!==i.pending){if(N(t),0===t.avail_out)return i.last_flush=-1,d}else if(0===t.avail_in&&F(e)<=F(n)&&e!==h)return I(t,-5);if(666===i.status&&0!==t.avail_in)return I(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==c&&666!==i.status){var f=2===i.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(z(t),0===t.lookahead)){if(e===c)return T;break}if(t.match_length=0,n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(L(t,!1),0===t.strm.avail_out))return T}return t.insert=0,e===h?(L(t,!0),0===t.strm.avail_out?M:P):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?T:D}(i,e):3===i.strategy?function(t,e){for(var n,r,i,a,o=t.window;;){if(t.lookahead<=E){if(z(t),t.lookahead<=E&&e===c)return T;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(r=o[i=t.strstart-1])===o[++i]&&r===o[++i]&&r===o[++i]){a=t.strstart+E;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);t.match_length=E-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(n=s._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(L(t,!1),0===t.strm.avail_out))return T}return t.insert=0,e===h?(L(t,!0),0===t.strm.avail_out?M:P):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?T:D}(i,e):r[i.level].func(i,e);if(f!==M&&f!==P||(i.status=666),f===T||f===M)return 0===t.avail_out&&(i.last_flush=-1),d;if(f===D&&(1===e?s._tr_align(i):5!==e&&(s._tr_stored_block(i,0,0,!1),3===e&&(R(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),N(t),0===t.avail_out))return i.last_flush=-1,d}return e!==h?d:i.wrap<=0?1:(2===i.wrap?(O(i,255&t.adler),O(i,t.adler>>8&255),O(i,t.adler>>16&255),O(i,t.adler>>24&255),O(i,255&t.total_in),O(i,t.total_in>>8&255),O(i,t.total_in>>16&255),O(i,t.total_in>>24&255)):(B(i,t.adler>>>16),B(i,65535&t.adler)),N(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?d:1)},n.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==C&&69!==e&&73!==e&&91!==e&&103!==e&&e!==S&&666!==e?I(t,u):(t.state=null,e===S?I(t,-3):d):u},n.deflateSetDictionary=function(t,e){var n,r,s,o,l,c,h,p,f=e.length;if(!t||!t.state)return u;if(2===(o=(n=t.state).wrap)||1===o&&n.status!==C||n.lookahead)return u;for(1===o&&(t.adler=a(t.adler,e,f,0)),n.wrap=0,f>=n.w_size&&(0===o&&(R(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,e,f-n.w_size,n.w_size,0),e=p,f=n.w_size),l=t.avail_in,c=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,z(n);n.lookahead>=x;){for(r=n.strstart,s=n.lookahead-(x-1);n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+x-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--s;);n.strstart=r,n.lookahead=x-1,z(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=x-1,n.match_available=0,t.next_in=c,t.input=h,t.avail_in=l,n.wrap=o,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,n){"use strict";e.exports=function(t,e){var n,r,i,s,a,o,l,c,h,d,u,p,f,m,g,v,b,y,w,_,A,x,E,k,C;n=t.state,r=t.next_in,k=t.input,i=r+(t.avail_in-5),s=t.next_out,C=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),l=n.dmax,c=n.wsize,h=n.whave,d=n.wnext,u=n.window,p=n.hold,f=n.bits,m=n.lencode,g=n.distcode,v=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;t:do{f<15&&(p+=k[r++]<<f,f+=8,p+=k[r++]<<f,f+=8),y=m[p&v];e:for(;;){if(p>>>=w=y>>>24,f-=w,0===(w=y>>>16&255))C[s++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(p&(1<<w)-1)];continue e}if(32&w){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}_=65535&y,(w&=15)&&(f<w&&(p+=k[r++]<<f,f+=8),_+=p&(1<<w)-1,p>>>=w,f-=w),f<15&&(p+=k[r++]<<f,f+=8,p+=k[r++]<<f,f+=8),y=g[p&b];n:for(;;){if(p>>>=w=y>>>24,f-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(p&(1<<w)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(A=65535&y,f<(w&=15)&&(p+=k[r++]<<f,(f+=8)<w&&(p+=k[r++]<<f,f+=8)),l<(A+=p&(1<<w)-1)){t.msg="invalid distance too far back",n.mode=30;break t}if(p>>>=w,f-=w,(w=s-a)<A){if(h<(w=A-w)&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(E=u,(x=0)===d){if(x+=c-w,w<_){for(_-=w;C[s++]=u[x++],--w;);x=s-A,E=C}}else if(d<w){if(x+=c+d-w,(w-=d)<_){for(_-=w;C[s++]=u[x++],--w;);if(x=0,d<_){for(_-=w=d;C[s++]=u[x++],--w;);x=s-A,E=C}}}else if(x+=d-w,w<_){for(_-=w;C[s++]=u[x++],--w;);x=s-A,E=C}for(;2<_;)C[s++]=E[x++],C[s++]=E[x++],C[s++]=E[x++],_-=3;_&&(C[s++]=E[x++],1<_&&(C[s++]=E[x++]))}else{for(x=s-A;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(_-=3););_&&(C[s++]=C[x++],1<_&&(C[s++]=C[x++]))}break}}break}}while(r<i&&s<o);r-=_=f>>3,p&=(1<<(f-=_<<3))-1,t.next_in=r,t.next_out=s,t.avail_in=r<i?i-r+5:5-(r-i),t.avail_out=s<o?o-s+257:257-(s-o),n.hold=p,n.bits=f}},{}],49:[function(t,e,n){"use strict";var r=t("../utils/common"),i=t("./adler32"),s=t("./crc32"),a=t("./inffast"),o=t("./inftrees"),l=1,c=2,h=0,d=-2,u=1,p=852,f=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=u,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new r.Buf32(p),e.distcode=e.distdyn=new r.Buf32(f),e.sane=1,e.back=-1,h):d}function b(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,v(t)):d}function y(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?d:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,b(t))):d}function w(t,e){var n,r;return t?(r=new g,(t.state=r).window=null,(n=y(t,e))!==h&&(t.state=null),n):d}var _,A,x=!0;function E(t){if(x){var e;for(_=new r.Buf32(512),A=new r.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(l,t.lens,0,288,_,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(c,t.lens,0,32,A,0,t.work,{bits:5}),x=!1}t.lencode=_,t.lenbits=9,t.distcode=A,t.distbits=5}function k(t,e,n,i){var s,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,e,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(s=a.wsize-a.wnext)&&(s=i),r.arraySet(a.window,e,n-i,s,a.wnext),(i-=s)?(r.arraySet(a.window,e,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}n.inflateReset=b,n.inflateReset2=y,n.inflateResetKeep=v,n.inflateInit=function(t){return w(t,15)},n.inflateInit2=w,n.inflate=function(t,e){var n,p,f,g,v,b,y,w,_,A,x,C,S,T,D,M,P,I,F,R,N,L,O,B,$=0,z=new r.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return d;12===(n=t.state).mode&&(n.mode=13),v=t.next_out,f=t.output,y=t.avail_out,g=t.next_in,p=t.input,b=t.avail_in,w=n.hold,_=n.bits,A=b,x=y,L=h;t:for(;;)switch(n.mode){case u:if(0===n.wrap){n.mode=13;break}for(;_<16;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(2&n.wrap&&35615===w){z[n.check=0]=255&w,z[1]=w>>>8&255,n.check=s(n.check,z,2,0),_=w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&w)){t.msg="unknown compression method",n.mode=30;break}if(_-=4,N=8+(15&(w>>>=4)),0===n.wbits)n.wbits=N;else if(N>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<<N,t.adler=n.check=1,n.mode=512&w?10:12,_=w=0;break;case 2:for(;_<16;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(n.flags=w,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(z[0]=255&w,z[1]=w>>>8&255,n.check=s(n.check,z,2,0)),_=w=0,n.mode=3;case 3:for(;_<32;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.head&&(n.head.time=w),512&n.flags&&(z[0]=255&w,z[1]=w>>>8&255,z[2]=w>>>16&255,z[3]=w>>>24&255,n.check=s(n.check,z,4,0)),_=w=0,n.mode=4;case 4:for(;_<16;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(z[0]=255&w,z[1]=w>>>8&255,n.check=s(n.check,z,2,0)),_=w=0,n.mode=5;case 5:if(1024&n.flags){for(;_<16;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(z[0]=255&w,z[1]=w>>>8&255,n.check=s(n.check,z,2,0)),_=w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(C=n.length)&&(C=b),C&&(n.head&&(N=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,C,N)),512&n.flags&&(n.check=s(n.check,p,C,g)),b-=C,g+=C,n.length-=C),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break t;for(C=0;N=p[g+C++],n.head&&N&&n.length<65536&&(n.head.name+=String.fromCharCode(N)),N&&C<b;);if(512&n.flags&&(n.check=s(n.check,p,C,g)),b-=C,g+=C,N)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===b)break t;for(C=0;N=p[g+C++],n.head&&N&&n.length<65536&&(n.head.comment+=String.fromCharCode(N)),N&&C<b;);if(512&n.flags&&(n.check=s(n.check,p,C,g)),b-=C,g+=C,N)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;_<16;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(w!==(65535&n.check)){t.msg="header crc mismatch",n.mode=30;break}_=w=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;_<32;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}t.adler=n.check=m(w),_=w=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,n.hold=w,n.bits=_,2;t.adler=n.check=1,n.mode=12;case 12:if(5===e||6===e)break t;case 13:if(n.last){w>>>=7&_,_-=7&_,n.mode=27;break}for(;_<3;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}switch(n.last=1&w,_-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(E(n),n.mode=20,6!==e)break;w>>>=2,_-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}w>>>=2,_-=2;break;case 14:for(w>>>=7&_,_-=7&_;_<32;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if((65535&w)!=(w>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&w,_=w=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(C=n.length){if(b<C&&(C=b),y<C&&(C=y),0===C)break t;r.arraySet(f,p,g,C,v),b-=C,g+=C,y-=C,v+=C,n.length-=C;break}n.mode=12;break;case 17:for(;_<14;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(n.nlen=257+(31&w),w>>>=5,_-=5,n.ndist=1+(31&w),w>>>=5,_-=5,n.ncode=4+(15&w),w>>>=4,_-=4,286<n.nlen||30<n.ndist){t.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;_<3;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.lens[j[n.have++]]=7&w,w>>>=3,_-=3}for(;n.have<19;)n.lens[j[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},L=o(0,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,L){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;M=($=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,P=65535&$,!((D=$>>>24)<=_);){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(P<16)w>>>=D,_-=D,n.lens[n.have++]=P;else{if(16===P){for(B=D+2;_<B;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(w>>>=D,_-=D,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}N=n.lens[n.have-1],C=3+(3&w),w>>>=2,_-=2}else if(17===P){for(B=D+3;_<B;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}_-=D,N=0,C=3+(7&(w>>>=D)),w>>>=3,_-=3}else{for(B=D+7;_<B;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}_-=D,N=0,C=11+(127&(w>>>=D)),w>>>=7,_-=7}if(n.have+C>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=N}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,O={bits:n.lenbits},L=o(l,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,L){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},L=o(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,L){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=b&&258<=y){t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,n.hold=w,n.bits=_,a(t,x),v=t.next_out,f=t.output,y=t.avail_out,g=t.next_in,p=t.input,b=t.avail_in,w=n.hold,_=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;M=($=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,P=65535&$,!((D=$>>>24)<=_);){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(M&&0==(240&M)){for(I=D,F=M,R=P;M=($=n.lencode[R+((w&(1<<I+F)-1)>>I)])>>>16&255,P=65535&$,!(I+(D=$>>>24)<=_);){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}w>>>=I,_-=I,n.back+=I}if(w>>>=D,_-=D,n.back+=D,n.length=P,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(B=n.extra;_<B;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,_-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;M=($=n.distcode[w&(1<<n.distbits)-1])>>>16&255,P=65535&$,!((D=$>>>24)<=_);){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(0==(240&M)){for(I=D,F=M,R=P;M=($=n.distcode[R+((w&(1<<I+F)-1)>>I)])>>>16&255,P=65535&$,!(I+(D=$>>>24)<=_);){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}w>>>=I,_-=I,n.back+=I}if(w>>>=D,_-=D,n.back+=D,64&M){t.msg="invalid distance code",n.mode=30;break}n.offset=P,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(B=n.extra;_<B;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}n.offset+=w&(1<<n.extra)-1,w>>>=n.extra,_-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===y)break t;if(C=x-y,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}S=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),T=n.window}else T=f,S=v-n.offset,C=n.length;for(y<C&&(C=y),y-=C,n.length-=C;f[v++]=T[S++],--C;);0===n.length&&(n.mode=21);break;case 26:if(0===y)break t;f[v++]=n.length,y--,n.mode=21;break;case 27:if(n.wrap){for(;_<32;){if(0===b)break t;b--,w|=p[g++]<<_,_+=8}if(x-=y,t.total_out+=x,n.total+=x,x&&(t.adler=n.check=n.flags?s(n.check,f,x,v-x):i(n.check,f,x,v-x)),x=y,(n.flags?w:m(w))!==n.check){t.msg="incorrect data check",n.mode=30;break}_=w=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;_<32;){if(0===b)break t;b--,w+=p[g++]<<_,_+=8}if(w!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=30;break}_=w=0}n.mode=29;case 29:L=1;break t;case 30:L=-3;break t;case 31:return-4;default:return d}return t.next_out=v,t.avail_out=y,t.next_in=g,t.avail_in=b,n.hold=w,n.bits=_,(n.wsize||x!==t.avail_out&&n.mode<30&&(n.mode<27||4!==e))&&k(t,t.output,t.next_out,x-t.avail_out)?(n.mode=31,-4):(A-=t.avail_in,x-=t.avail_out,t.total_in+=A,t.total_out+=x,n.total+=x,n.wrap&&x&&(t.adler=n.check=n.flags?s(n.check,f,x,t.next_out-x):i(n.check,f,x,t.next_out-x)),t.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==A&&0===x||4===e)&&L===h&&(L=-5),L)},n.inflateEnd=function(t){if(!t||!t.state)return d;var e=t.state;return e.window&&(e.window=null),t.state=null,h},n.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?d:((n.head=e).done=!1,h):d},n.inflateSetDictionary=function(t,e){var n,r=e.length;return t&&t.state?0!==(n=t.state).wrap&&11!==n.mode?d:11===n.mode&&i(1,e,r,0)!==n.check?-3:k(t,e,r,r)?(n.mode=31,-4):(n.havedict=1,h):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,n){"use strict";var r=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,n,l,c,h,d,u){var p,f,m,g,v,b,y,w,_,A=u.bits,x=0,E=0,k=0,C=0,S=0,T=0,D=0,M=0,P=0,I=0,F=null,R=0,N=new r.Buf16(16),L=new r.Buf16(16),O=null,B=0;for(x=0;x<=15;x++)N[x]=0;for(E=0;E<l;E++)N[e[n+E]]++;for(S=A,C=15;1<=C&&0===N[C];C--);if(C<S&&(S=C),0===C)return c[h++]=20971520,c[h++]=20971520,u.bits=1,0;for(k=1;k<C&&0===N[k];k++);for(S<k&&(S=k),x=M=1;x<=15;x++)if(M<<=1,(M-=N[x])<0)return-1;if(0<M&&(0===t||1!==C))return-1;for(L[1]=0,x=1;x<15;x++)L[x+1]=L[x]+N[x];for(E=0;E<l;E++)0!==e[n+E]&&(d[L[e[n+E]]++]=E);if(b=0===t?(F=O=d,19):1===t?(F=i,R-=257,O=s,B-=257,256):(F=a,O=o,-1),x=k,v=h,D=E=I=0,m=-1,g=(P=1<<(T=S))-1,1===t&&852<P||2===t&&592<P)return 1;for(;;){for(y=x-D,_=d[E]<b?(w=0,d[E]):d[E]>b?(w=O[B+d[E]],F[R+d[E]]):(w=96,0),p=1<<x-D,k=f=1<<T;c[v+(I>>D)+(f-=p)]=y<<24|w<<16|_,0!==f;);for(p=1<<x-1;I&p;)p>>=1;if(0!==p?(I&=p-1,I+=p):I=0,E++,0==--N[x]){if(x===C)break;x=e[n+d[E]]}if(S<x&&(I&g)!==m){for(0===D&&(D=S),v+=k,M=1<<(T=x-D);T+D<C&&!((M-=N[T+D])<=0);)T++,M<<=1;if(P+=1<<T,1===t&&852<P||2===t&&592<P)return 1;c[m=I&g]=S<<24|T<<16|v-h}}return 0!==I&&(c[v+I]=x-D<<24|64<<16),u.bits=S,0}},{"../utils/common":41}],51:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,n){"use strict";var r=t("../utils/common"),i=0,s=1;function a(t){for(var e=t.length;0<=--e;)t[e]=0}var o=0,l=29,c=256,h=c+1+l,d=30,u=19,p=2*h+1,f=15,m=16,g=7,v=256,b=16,y=17,w=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=new Array(2*(h+2));a(k);var C=new Array(2*d);a(C);var S=new Array(512);a(S);var T=new Array(256);a(T);var D=new Array(l);a(D);var M,P,I,F=new Array(d);function R(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function N(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function L(t){return t<256?S[t]:S[256+(t>>>7)]}function O(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function B(t,e,n){t.bi_valid>m-n?(t.bi_buf|=e<<t.bi_valid&65535,O(t,t.bi_buf),t.bi_buf=e>>m-t.bi_valid,t.bi_valid+=n-m):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function $(t,e,n){B(t,n[2*e],n[2*e+1])}function z(t,e){for(var n=0;n|=1&t,t>>>=1,n<<=1,0<--e;);return n>>>1}function j(t,e,n){var r,i,s=new Array(f+1),a=0;for(r=1;r<=f;r++)s[r]=a=a+n[r-1]<<1;for(i=0;i<=e;i++){var o=t[2*i+1];0!==o&&(t[2*i]=z(s[o]++,o))}}function U(t){var e;for(e=0;e<h;e++)t.dyn_ltree[2*e]=0;for(e=0;e<d;e++)t.dyn_dtree[2*e]=0;for(e=0;e<u;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*v]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function H(t){8<t.bi_valid?O(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function V(t,e,n,r){var i=2*e,s=2*n;return t[i]<t[s]||t[i]===t[s]&&r[e]<=r[n]}function q(t,e,n){for(var r=t.heap[n],i=n<<1;i<=t.heap_len&&(i<t.heap_len&&V(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!V(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r}function W(t,e,n){var r,i,s,a,o=0;if(0!==t.last_lit)for(;r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?$(t,i,e):($(t,(s=T[i])+c+1,e),0!==(a=_[s])&&B(t,i-=D[s],a),$(t,s=L(--r),n),0!==(a=A[s])&&B(t,r-=F[s],a)),o<t.last_lit;);$(t,v,e)}function G(t,e){var n,r,i,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,l=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=p,n=0;n<l;n++)0!==s[2*n]?(t.heap[++t.heap_len]=c=n,t.depth[n]=0):s[2*n+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=a[2*i+1]);for(e.max_code=c,n=t.heap_len>>1;1<=n;n--)q(t,s,n);for(i=l;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],q(t,s,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,s[2*i]=s[2*n]+s[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,s[2*n+1]=s[2*r+1]=i,t.heap[1]=i++,q(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,s,a,o,l=e.dyn_tree,c=e.max_code,h=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,m=e.stat_desc.extra_base,g=e.stat_desc.max_length,v=0;for(s=0;s<=f;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<p;n++)g<(s=l[2*l[2*(r=t.heap[n])+1]+1]+1)&&(s=g,v++),l[2*r+1]=s,c<r||(t.bl_count[s]++,a=0,m<=r&&(a=u[r-m]),o=l[2*r],t.opt_len+=o*(s+a),d&&(t.static_len+=o*(h[2*r+1]+a)));if(0!==v){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,v-=2}while(0<v);for(s=g;0!==s;s--)for(r=t.bl_count[s];0!==r;)c<(i=t.heap[--n])||(l[2*i+1]!==s&&(t.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),r--)}}(t,e),j(s,c,t.bl_count)}function K(t,e,n){var r,i,s=-1,a=e[1],o=0,l=7,c=4;for(0===a&&(l=138,c=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=e[2*(r+1)+1],++o<l&&i===a||(o<c?t.bl_tree[2*i]+=o:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[2*b]++):o<=10?t.bl_tree[2*y]++:t.bl_tree[2*w]++,s=i,c=(o=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4))}function X(t,e,n){var r,i,s=-1,a=e[1],o=0,l=7,c=4;for(0===a&&(l=138,c=3),r=0;r<=n;r++)if(i=a,a=e[2*(r+1)+1],!(++o<l&&i===a)){if(o<c)for(;$(t,i,t.bl_tree),0!=--o;);else 0!==i?(i!==s&&($(t,i,t.bl_tree),o--),$(t,b,t.bl_tree),B(t,o-3,2)):o<=10?($(t,y,t.bl_tree),B(t,o-3,3)):($(t,w,t.bl_tree),B(t,o-11,7));s=i,c=(o=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4)}}a(F);var Y=!1;function Z(t,e,n,i){B(t,(o<<1)+(i?1:0),3),function(t,e,n,i){H(t),i&&(O(t,n),O(t,~n)),r.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n,!0)}n._tr_init=function(t){Y||(function(){var t,e,n,r,i,s=new Array(f+1);for(r=n=0;r<l-1;r++)for(D[r]=n,t=0;t<1<<_[r];t++)T[n++]=r;for(T[n-1]=r,r=i=0;r<16;r++)for(F[r]=i,t=0;t<1<<A[r];t++)S[i++]=r;for(i>>=7;r<d;r++)for(F[r]=i<<7,t=0;t<1<<A[r]-7;t++)S[256+i++]=r;for(e=0;e<=f;e++)s[e]=0;for(t=0;t<=143;)k[2*t+1]=8,t++,s[8]++;for(;t<=255;)k[2*t+1]=9,t++,s[9]++;for(;t<=279;)k[2*t+1]=7,t++,s[7]++;for(;t<=287;)k[2*t+1]=8,t++,s[8]++;for(j(k,h+1,s),t=0;t<d;t++)C[2*t+1]=5,C[2*t]=z(t,5);M=new R(k,_,c+1,h,f),P=new R(C,A,0,d,f),I=new R(new Array(0),x,0,u,g)}(),Y=!0),t.l_desc=new N(t.dyn_ltree,M),t.d_desc=new N(t.dyn_dtree,P),t.bl_desc=new N(t.bl_tree,I),t.bi_buf=0,t.bi_valid=0,U(t)},n._tr_stored_block=Z,n._tr_flush_block=function(t,e,n,r){var a,o,l=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return i;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return s;for(e=32;e<c;e++)if(0!==t.dyn_ltree[2*e])return s;return i}(t)),G(t,t.l_desc),G(t,t.d_desc),l=function(t){var e;for(K(t,t.dyn_ltree,t.l_desc.max_code),K(t,t.dyn_dtree,t.d_desc.max_code),G(t,t.bl_desc),e=u-1;3<=e&&0===t.bl_tree[2*E[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),a=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==e?Z(t,e,n,r):4===t.strategy||o===a?(B(t,2+(r?1:0),3),W(t,k,C)):(B(t,4+(r?1:0),3),function(t,e,n,r){var i;for(B(t,e-257,5),B(t,n-1,5),B(t,r-4,4),i=0;i<r;i++)B(t,t.bl_tree[2*E[i]+1],3);X(t,t.dyn_ltree,e-1),X(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),W(t,t.dyn_ltree,t.dyn_dtree)),U(t),r&&H(t)},n._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(T[n]+c+1)]++,t.dyn_dtree[2*L(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){B(t,2,3),$(t,v,k),function(t){16===t.bi_valid?(O(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var n,r,i,s,a=1,o={},l=!1,c=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,n="[object process]"==={}.toString.call(t.process)?function(t){process.nextTick(function(){u(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?(s="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",p,!1):t.attachEvent("onmessage",p),function(e){t.postMessage(s+e,"*")}):t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){u(t.data)},function(t){i.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(r=c.documentElement,function(t){var e=c.createElement("script");e.onreadystatechange=function(){u(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):function(t){setTimeout(u,0,t)},h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return o[a]=i,n(a),a++},h.clearImmediate=d}function d(t){delete o[t]}function u(t){if(l)setTimeout(u,0,t);else{var n=o[t];if(n){l=!0;try{!function(t){var n=t.callback,r=t.args;switch(r.length){case 0:n();break;case 1:n(r[0]);break;case 2:n(r[0],r[1]);break;case 3:n(r[0],r[1],r[2]);break;default:n.apply(e,r)}}(n)}finally{d(t),l=!1}}}}function p(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&u(+e.data.slice(s.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},64579(t,e,n){var r=n(78913),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},78913(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},95600(t,e,n){var r=n(2316),i=n(93375),s=n(2899),a=Math.max,o=Math.min;t.exports=function(t,e,n){var l,c,h,d,u,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function b(e){var n=l,r=c;return l=c=void 0,f=e,d=t.apply(r,n)}function y(t){var n=t-p;return void 0===p||n>=e||n<0||g&&t-f>=h}function w(){var t=i();if(y(t))return _(t);u=setTimeout(w,function(t){var n=e-(t-p);return g?o(n,h-(t-f)):n}(t))}function _(t){return u=void 0,v&&l?b(t):(l=c=void 0,d)}function A(){var t=i(),n=y(t);if(l=arguments,c=this,p=t,n){if(void 0===u)return function(t){return f=t,u=setTimeout(w,e),m?b(t):d}(p);if(g)return clearTimeout(u),u=setTimeout(w,e),b(p)}return void 0===u&&(u=setTimeout(w,e)),d}return e=s(e)||0,r(n)&&(m=!!n.leading,h=(g="maxWait"in n)?a(s(n.maxWait)||0,e):h,v="trailing"in n?!!n.trailing:v),A.cancel=function(){void 0!==u&&clearTimeout(u),f=0,l=p=c=u=void 0},A.flush=function(){return void 0===u?d:_(i())},A}},93375(t,e,n){var r=n(36382);t.exports=function(){return r.Date.now()}},98771(t,e,n){var r=n(95600),i=n(2316);t.exports=function(t,e,n){var s=!0,a=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(n)&&(s="leading"in n?!!n.leading:s,a="trailing"in n?!!n.trailing:a),r(t,e,{leading:s,maxWait:e,trailing:a})}},2899(t,e,n){var r=n(64579),i=n(2316),s=n(90931),a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(s(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=o.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):a.test(t)?NaN:+t}},57325(t,e,n){var r=n(20907),i=0;t.exports=function(t){var e=++i;return r(t)+e}},76837(t,e,n){"use strict";function r(t,e,n,r,i,s,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}const i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(t=>{i[t]=new r(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(t=>{let[e,n]=t;i[e]=new r(e,1,!1,n,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(t=>{i[t]=new r(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(t=>{i[t]=new r(t,2,!1,t,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(t=>{i[t]=new r(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(t=>{i[t]=new r(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(t=>{i[t]=new r(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(t=>{i[t]=new r(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(t=>{i[t]=new r(t,5,!1,t.toLowerCase(),null,!1,!1)});const s=/[\-\:]([a-z])/g,a=t=>t[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(t=>{const e=t.replace(s,a);i[e]=new r(e,1,!1,t,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(t=>{const e=t.replace(s,a);i[e]=new r(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(t=>{const e=t.replace(s,a);i[e]=new r(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(t=>{i[t]=new r(t,1,!1,t.toLowerCase(),null,!1,!1)});i.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(t=>{i[t]=new r(t,1,!1,t.toLowerCase(),null,!0,!0)});const{CAMELCASE:o,SAME:l,possibleStandardNames:c}=n(45858),h=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((t,e)=>{const n=c[e];return n===l?t[e]=e:n===o?t[e.toLowerCase()]=e:t[e]=n,t},{});e.BOOLEAN=3,e.BOOLEANISH_STRING=2,e.NUMERIC=5,e.OVERLOADED_BOOLEAN=4,e.POSITIVE_NUMERIC=6,e.RESERVED=0,e.STRING=1,e.getPropertyInfo=function(t){return i.hasOwnProperty(t)?i[t]:null},e.isCustomAttribute=h,e.possibleStandardNames=d},45858(t,e){e.SAME=0;e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},74935(t,e,n){"use strict";var r=n(94922),i=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,s={},c=null,h=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(h=e.ref),e)a.call(e,r)&&!l.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===s[r]&&(s[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:h,props:s,_owner:o.current}}e.Fragment=s,e.jsx=c,e.jsxs=c},89261(t,e,n){"use strict";t.exports=n(74935)},71148(t,e,n){"use strict";var r=(this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}})(n(53284)),i=n(69280);function s(t,e){var n={};return t&&"string"===typeof t?((0,r.default)(t,function(t,r){t&&r&&(n[(0,i.camelCase)(t,e)]=r)}),n):n}s.default=s,t.exports=s},69280(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(t,e){return e.toUpperCase()},l=function(t,e){return"".concat(e,"-")};e.camelCase=function(t,e){return void 0===e&&(e={}),function(t){return!t||i.test(t)||n.test(t)}(t)?t:(t=t.toLowerCase(),(t=e.reactCompat?t.replace(a,l):t.replace(s,l)).replace(r,o))}},53284(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){let n=null;if(!t||"string"!==typeof t)return n;const r=(0,i.default)(t),s="function"===typeof e;return r.forEach(t=>{if("declaration"!==t.type)return;const{property:r,value:i}=t;s?e(r,i,t):i&&(n=n||{},n[r]=i)}),n};const i=r(n(52808))},98677(t){"use strict";var e=function(){};t.exports=e},9062(){},55351(){},70011(){},87821(){},54159(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,s(n)))}return t}function s(t){if("string"===typeof t||"number"===typeof t)return t;if("object"!==typeof t)return"";if(Array.isArray(t))return i.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},89314(t,e,n){"use strict";const{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:l}=n(25527),{SCHEMES:c,getSchemeHandler:h}=n(16590);function d(t,e,n,r){const s={};return r||(t=f(u(t,n),n),e=f(u(e,n),n)),!(n=n||{}).tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=i(e.path||""),s.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=i(e.path||""),s.query=e.query):(e.path?("/"===e.path[0]?s.path=i(e.path):(void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?s.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:s.path=e.path:s.path="/"+e.path,s.path=i(s.path)),s.query=e.query):(s.path=t.path,void 0!==e.query?s.query=e.query:s.query=t.query),s.userinfo=t.userinfo,s.host=t.host,s.port=t.port),s.scheme=t.scheme),s.fragment=e.fragment,s}function u(t,e){const n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),a=[],o=h(r.scheme||n.scheme);o&&o.serialize&&o.serialize(n,r),void 0!==n.path&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),void 0!==n.scheme&&(n.path=n.path.split("%3A").join(":")))),"suffix"!==r.reference&&n.scheme&&a.push(n.scheme,":");const l=s(n);if(void 0!==l&&("suffix"!==r.reference&&a.push("//"),a.push(l),n.path&&"/"!==n.path[0]&&a.push("/")),void 0!==n.path){let t=n.path;r.absolutePath||o&&o.absolutePath||(t=i(t)),void 0===l&&"/"===t[0]&&"/"===t[1]&&(t="/%2F"+t.slice(2)),a.push(t)}return void 0!==n.query&&a.push("?",n.query),void 0!==n.fragment&&a.push("#",n.fragment),a.join("")}const p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(t,e){const n=Object.assign({},e),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1;"suffix"===n.reference&&(t=n.scheme?n.scheme+":"+t:"//"+t);const a=t.match(p);if(a){if(i.scheme=a[1],i.userinfo=a[3],i.host=a[4],i.port=parseInt(a[5],10),i.path=a[6]||"",i.query=a[7],i.fragment=a[8],isNaN(i.port)&&(i.port=a[5]),i.host){if(!1===o(i.host)){const t=r(i.host);i.host=t.host.toLowerCase(),s=t.isIPV6}else s=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==i.reference&&(i.error=i.error||"URI is not a "+n.reference+" reference.");const e=h(n.scheme||i.scheme);if(!n.unicodeSupport&&(!e||!e.unicodeSupport)&&i.host&&(n.domainHost||e&&e.domainHost)&&!1===s&&l(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(c){i.error=i.error||"Host's domain name can not be converted to ASCII: "+c}(!e||e&&!e.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,n)}else i.error=i.error||"URI can not be parsed.";return i}const m={SCHEMES:c,normalize:function(t,e){return"string"===typeof t?t=u(f(t,e),e):"object"===typeof t&&(t=f(u(t,e),e)),t},resolve:function(t,e,n){const r=n?Object.assign({scheme:"null"},n):{scheme:"null"},i=d(f(t,r),f(e,r),r,!0);return r.skipEscape=!0,u(i,r)},resolveComponent:d,equal:function(t,e,n){return"string"===typeof t?(t=unescape(t),t=u(a(f(t,n),!0),{...n,skipEscape:!0})):"object"===typeof t&&(t=u(a(t,!0),{...n,skipEscape:!0})),"string"===typeof e?(e=unescape(e),e=u(a(f(e,n),!0),{...n,skipEscape:!0})):"object"===typeof e&&(e=u(a(e,!0),{...n,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()},serialize:u,parse:f};t.exports=m,t.exports.default=m,t.exports.fastUri=m},16590(t,e,n){"use strict";const{isUUID:r}=n(25527),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function a(t){return!0===t.secure||!1!==t.secure&&(!!t.scheme&&(3===t.scheme.length&&("w"===t.scheme[0]||"W"===t.scheme[0])&&("s"===t.scheme[1]||"S"===t.scheme[1])&&("s"===t.scheme[2]||"S"===t.scheme[2])))}function o(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function l(t){const e="https"===String(t.scheme).toLowerCase();return t.port!==(e?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}const c={scheme:"http",domainHost:!0,parse:o,serialize:l},h={scheme:"ws",domainHost:!0,parse:function(t){return t.secure=a(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t},serialize:function(t){if(t.port!==(a(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"===typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[e,n]=t.resourceName.split("?");t.path=e&&"/"!==e?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}},d={http:c,https:{scheme:"https",domainHost:c.domainHost,parse:o,serialize:l},ws:h,wss:{scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},urn:{scheme:"urn",parse:function(t,e){if(!t.path)return t.error="URN can not be parsed",t;const n=t.path.match(i);if(n){const r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];const i=u(`${r}:${e.nid||t.nid}`);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t},serialize:function(t,e){if(void 0===t.nid)throw new Error("URN without nid cannot be serialized");const n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),i=u(`${n}:${e.nid||r}`);i&&(t=i.serialize(t,e));const s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,e){const n=t;return n.uuid=n.nss,n.nss=void 0,e.tolerant||n.uuid&&r(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(t){const e=t;return e.nss=(t.uuid||"").toLowerCase(),e},skipNormalize:!0}};function u(t){return t&&(d[t]||d[t.toLowerCase()])||void 0}Object.setPrototypeOf(d,null),t.exports={wsIsSecure:a,SCHEMES:d,isValidSchemeName:function(t){return-1!==s.indexOf(t)},getSchemeHandler:u}},25527(t){"use strict";const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),48!==n){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(t){return t.length=0,!0}function a(t,e,n){if(t.length){const i=r(t);if(""===i)return n.error=!0,!1;e.push(i),t.length=0}return!0}function o(t){if(function(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}(t,":")<2)return{host:t,isIPV6:!1};const e=function(t){let e=0;const n={error:!1,address:"",zone:""},i=[],o=[];let l=!1,c=!1,h=a;for(let r=0;r<t.length;r++){const a=t[r];if("["!==a&&"]"!==a)if(":"!==a)if("%"===a){if(!h(o,i,n))break;h=s}else o.push(a);else{if(!0===l&&(c=!0),!h(o,i,n))break;if(++e>7){n.error=!0;break}r>0&&":"===t[r-1]&&(l=!0),i.push(":")}}return o.length&&(h===s?n.zone=o.join(""):c?i.push(o.join("")):i.push(r(o))),n.address=i.join(""),n}(t);if(e.error)return{host:t,isIPV6:!1};{let t=e.address,n=e.address;return e.zone&&(t+="%"+e.zone,n+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:n}}}t.exports={nonSimpleDomain:i,recomposeAuthority:function(t){const e=[];if(void 0!==t.userinfo&&(e.push(t.userinfo),e.push("@")),void 0!==t.host){let r=unescape(t.host);if(!n(r)){const e=o(r);r=!0===e.isIPV6?`[${e.escapedHost}]`:t.host}e.push(r)}return"number"!==typeof t.port&&"string"!==typeof t.port||(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0},normalizeComponentEncoding:function(t,e){const n=!0!==e?escape:unescape;return void 0!==t.scheme&&(t.scheme=n(t.scheme)),void 0!==t.userinfo&&(t.userinfo=n(t.userinfo)),void 0!==t.host&&(t.host=n(t.host)),void 0!==t.path&&(t.path=n(t.path)),void 0!==t.query&&(t.query=n(t.query)),void 0!==t.fragment&&(t.fragment=n(t.fragment)),t},removeDotSegments:function(t){let e=t;const n=[];let r=-1,i=0;for(;i=e.length;){if(1===i){if("."===e)break;if("/"===e){n.push("/");break}n.push(e);break}if(2===i){if("."===e[0]){if("."===e[1])break;if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&("."===e[1]||"/"===e[1])){n.push("/");break}}else if(3===i&&"/.."===e){0!==n.length&&n.pop(),n.push("/");break}if("."===e[0]){if("."===e[1]){if("/"===e[2]){e=e.slice(3);continue}}else if("/"===e[1]){e=e.slice(2);continue}}else if("/"===e[0]&&"."===e[1]){if("/"===e[2]){e=e.slice(2);continue}if("."===e[2]&&"/"===e[3]){e=e.slice(3),0!==n.length&&n.pop();continue}}if(-1===(r=e.indexOf("/",1))){n.push(e);break}n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")},isIPv4:n,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:r}},68102(t,e,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(null,arguments)}n.d(e,{A:()=>r})},3141(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,s,a,o=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.d(e,{A:()=>i})},47215(t,e,n){"use strict";function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}n.d(e,{A:()=>i});const i=function(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}},78805(t,e,n){"use strict";function r(t){let e=!1;return{promise:new Promise((n,r)=>{t.then(t=>!e&&n(t)).catch(t=>!e&&r(t))}),cancel(){e=!0}}}n.d(e,{A:()=>r})},41338(t,e,n){"use strict";n.d(e,{Ay:()=>i});const r=["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onBlur","onInput","onInvalid","onReset","onSubmit","onLoad","onError","onKeyDown","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onChange","onToggle"];function i(t,e){const n={};for(const i of r){const r=t[i];r&&(n[i]=e?t=>r(t,e(i)):r)}return n}},31079(t,e,n){"use strict";var r;n.d(e,{D6:()=>pr,EA:()=>Bn,Tm:()=>gr,YE:()=>fr,dU:()=>ai,ng:()=>m});const i="object"===typeof process&&process+""==="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&"browser"!==process.type),s=[.001,0,0,.001,0,0],a=1.35,o=1,l=2,c=4,h=16,d=32,u=64,p=128,f=256,m={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},g="pdfjs_internal_editor_",v={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},b={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},y=0,w=1,_=2,A=3,x=3,E=4,k={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},C={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},S=1,T=2,D=3,M=4,P=5,I={ERRORS:0,WARNINGS:1,INFOS:5},F={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},R=0,N=1,L=2,O=3;let B=I.WARNINGS;function $(t){Number.isInteger(t)&&(B=t)}function z(){return B}function j(t){B>=I.INFOS&&console.info(`Info: ${t}`)}function U(t){B>=I.WARNINGS&&console.warn(`Warning: ${t}`)}function H(t){throw new Error(t)}function V(t,e){t||H(e)}function q(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;if(n&&"string"===typeof t){if(n.addDefaultProtocol&&t.startsWith("www.")){const e=t.match(/\./g);e?.length>=2&&(t=`http://${t}`)}if(n.tryConvertEncoding)try{t=decodeURIComponent(escape(t))}catch{}}const r=e?URL.parse(t,e):URL.parse(t);return function(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r)?r:null}function W(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=URL.parse(t);return r?(r.hash=e,r.href):n&&q(t,"http://example.com")?t.split("#",1)[0]+""+(e?`#${e}`:""):""}function G(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object.defineProperty(t,e,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}const K=function(){function t(t,e){this.message=t,this.name=e}return t.prototype=new Error,t.constructor=t,t}();class X extends K{constructor(t,e){super(t,"PasswordException"),this.code=e}}class Y extends K{constructor(t,e){super(t,"UnknownErrorException"),this.details=e}}class Z extends K{constructor(t){super(t,"InvalidPDFException")}}class J extends K{constructor(t,e,n){super(t,"ResponseException"),this.status=e,this.missing=n}}class Q extends K{constructor(t){super(t,"FormatError")}}class tt extends K{constructor(t){super(t,"AbortException")}}function et(t){"object"===typeof t&&void 0!==t?.length||H("Invalid argument for bytesToString");const e=t.length,n=8192;if(e<n)return String.fromCharCode.apply(null,t);const r=[];for(let i=0;i<e;i+=n){const s=Math.min(i+n,e),a=t.subarray(i,s);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function nt(t){"string"!==typeof t&&H("Invalid argument for stringToBytes");const e=t.length,n=new Uint8Array(e);for(let r=0;r<e;++r)n[r]=255&t.charCodeAt(r);return n}class rt{static get isLittleEndian(){return G(this,"isLittleEndian",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}static get isEvalSupported(){return G(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return G(this,"isOffscreenCanvasSupported","undefined"!==typeof OffscreenCanvas)}static get isImageDecoderSupported(){return G(this,"isImageDecoderSupported","undefined"!==typeof ImageDecoder)}static get platform(){const{platform:t,userAgent:e}=navigator;return G(this,"platform",{isAndroid:e.includes("Android"),isLinux:t.includes("Linux"),isMac:t.includes("Mac"),isWindows:t.includes("Win"),isFirefox:e.includes("Firefox")})}static get isCSSRoundSupported(){return G(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const it=Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0"));class st{static makeHexColor(t,e,n){return`#${it[t]}${it[e]}${it[n]}`}static domMatrixToTransform(t){return[t.a,t.b,t.c,t.d,t.e,t.f]}static scaleMinMax(t,e){let n;t[0]?(t[0]<0&&(n=e[0],e[0]=e[2],e[2]=n),e[0]*=t[0],e[2]*=t[0],t[3]<0&&(n=e[1],e[1]=e[3],e[3]=n),e[1]*=t[3],e[3]*=t[3]):(n=e[0],e[0]=e[1],e[1]=n,n=e[2],e[2]=e[3],e[3]=n,t[1]<0&&(n=e[1],e[1]=e[3],e[3]=n),e[1]*=t[1],e[3]*=t[1],t[2]<0&&(n=e[0],e[0]=e[2],e[2]=n),e[0]*=t[2],e[2]*=t[2]),e[0]+=t[4],e[1]+=t[5],e[2]+=t[4],e[3]+=t[5]}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static multiplyByDOMMatrix(t,e){return[t[0]*e.a+t[2]*e.b,t[1]*e.a+t[3]*e.b,t[0]*e.c+t[2]*e.d,t[1]*e.c+t[3]*e.d,t[0]*e.e+t[2]*e.f+t[4],t[1]*e.e+t[3]*e.f+t[5]]}static applyTransform(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=t[n],i=t[n+1];t[n]=r*e[0]+i*e[2]+e[4],t[n+1]=r*e[1]+i*e[3]+e[5]}static applyTransformToBezier(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5];for(let c=0;c<6;c+=2){const e=t[n+c],h=t[n+c+1];t[n+c]=e*r+h*s+o,t[n+c+1]=e*i+h*a+l}}static applyInverseTransform(t,e){const n=t[0],r=t[1],i=e[0]*e[3]-e[1]*e[2];t[0]=(n*e[3]-r*e[2]+e[2]*e[5]-e[4]*e[3])/i,t[1]=(-n*e[1]+r*e[0]+e[4]*e[1]-e[5]*e[0])/i}static axialAlignedBoundingBox(t,e,n){const r=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=t[0],h=t[1],d=t[2],u=t[3];let p=r*c+o,f=p,m=r*d+o,g=m,v=a*h+l,b=v,y=a*u+l,w=y;if(0!==i||0!==s){const t=i*c,e=i*d,n=s*h,r=s*u;p+=n,g+=n,m+=r,f+=r,v+=t,w+=t,y+=e,b+=e}n[0]=Math.min(n[0],p,m,f,g),n[1]=Math.min(n[1],v,y,b,w),n[2]=Math.max(n[2],p,m,f,g),n[3]=Math.max(n[3],v,y,b,w)}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static singularValueDecompose2dScale(t,e){const n=t[0],r=t[1],i=t[2],s=t[3],a=n**2+r**2,o=n*i+r*s,l=i**2+s**2,c=(a+l)/2,h=Math.sqrt(c**2-(a*l-o**2));e[0]=Math.sqrt(c+h||1),e[1]=Math.sqrt(c-h||1)}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){const n=Math.max(Math.min(t[0],t[2]),Math.min(e[0],e[2])),r=Math.min(Math.max(t[0],t[2]),Math.max(e[0],e[2]));if(n>r)return null;const i=Math.max(Math.min(t[1],t[3]),Math.min(e[1],e[3])),s=Math.min(Math.max(t[1],t[3]),Math.max(e[1],e[3]));return i>s?null:[n,i,r,s]}static pointBoundingBox(t,e,n){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],e),n[2]=Math.max(n[2],t),n[3]=Math.max(n[3],e)}static rectBoundingBox(t,e,n,r,i){i[0]=Math.min(i[0],t,n),i[1]=Math.min(i[1],e,r),i[2]=Math.max(i[2],t,n),i[3]=Math.max(i[3],e,r)}static#t(t,e,n,r,i,s,a,o,l,c){if(l<=0||l>=1)return;const h=1-l,d=l*l,u=d*l,p=h*(h*(h*t+3*l*e)+3*d*n)+u*r,f=h*(h*(h*i+3*l*s)+3*d*a)+u*o;c[0]=Math.min(c[0],p),c[1]=Math.min(c[1],f),c[2]=Math.max(c[2],p),c[3]=Math.max(c[3],f)}static#e(t,e,n,r,i,s,a,o,l,c,h,d){if(Math.abs(l)<1e-12)return void(Math.abs(c)>=1e-12&&this.#t(t,e,n,r,i,s,a,o,-h/c,d));const u=c**2-4*h*l;if(u<0)return;const p=Math.sqrt(u),f=2*l;this.#t(t,e,n,r,i,s,a,o,(-c+p)/f,d),this.#t(t,e,n,r,i,s,a,o,(-c-p)/f,d)}static bezierBoundingBox(t,e,n,r,i,s,a,o,l){l[0]=Math.min(l[0],t,a),l[1]=Math.min(l[1],e,o),l[2]=Math.max(l[2],t,a),l[3]=Math.max(l[3],e,o),this.#e(t,n,i,a,e,r,s,o,3*(3*(n-i)-t+a),6*(t-2*n+i),3*(n-t),l),this.#e(t,n,i,a,e,r,s,o,3*(3*(r-s)-e+o),6*(e-2*r+s),3*(r-e),l)}}let at=null,ot=null;function lt(){if("function"===typeof crypto.randomUUID)return crypto.randomUUID();const t=new Uint8Array(32);return crypto.getRandomValues(t),et(t)}const ct="pdfjs_internal_id_";function ht(t,e,n){return Math.min(Math.max(t,e),n)}function dt(t){return Uint8Array.prototype.toBase64?t.toBase64():btoa(et(t))}"function"!==typeof Promise.try&&(Promise.try=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new Promise(e=>{e(t(...n))})}),"function"!==typeof Math.sumPrecise&&(Math.sumPrecise=function(t){return t.reduce((t,e)=>t+e,0)});class ut{static textContent(t){const e=[],n={items:e,styles:Object.create(null)};return function t(n){if(!n)return;let r=null;const i=n.name;if("#text"===i)r=n.value;else{if(!ut.shouldBuildText(i))return;n?.attributes?.textContent?r=n.attributes.textContent:n.value&&(r=n.value)}if(null!==r&&e.push({str:r}),n.children)for(const e of n.children)t(e)}(t),n}static shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}class pt{static setupStorage(t,e,n,r,i){const s=r.getValue(e,{value:null});switch(n.name){case"textarea":if(null!==s.value&&(t.textContent=s.value),"print"===i)break;t.addEventListener("input",t=>{r.setValue(e,{value:t.target.value})});break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(s.value===n.attributes.xfaOn?t.setAttribute("checked",!0):s.value===n.attributes.xfaOff&&t.removeAttribute("checked"),"print"===i)break;t.addEventListener("change",t=>{r.setValue(e,{value:t.target.checked?t.target.getAttribute("xfaOn"):t.target.getAttribute("xfaOff")})})}else{if(null!==s.value&&t.setAttribute("value",s.value),"print"===i)break;t.addEventListener("input",t=>{r.setValue(e,{value:t.target.value})})}break;case"select":if(null!==s.value){t.setAttribute("value",s.value);for(const t of n.children)t.attributes.value===s.value?t.attributes.selected=!0:t.attributes.hasOwnProperty("selected")&&delete t.attributes.selected}t.addEventListener("input",t=>{const n=t.target.options,i=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(e,{value:i})})}}static setAttributes(t){let{html:e,element:n,storage:r=null,intent:i,linkService:s}=t;const{attributes:a}=n,o=e instanceof HTMLAnchorElement;"radio"===a.type&&(a.name=`${a.name}-${i}`);for(const[l,c]of Object.entries(a))if(null!==c&&void 0!==c)switch(l){case"class":c.length&&e.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",c);break;case"style":Object.assign(e.style,c);break;case"textContent":e.textContent=c;break;default:(!o||"href"!==l&&"newWindow"!==l)&&e.setAttribute(l,c)}o&&s.addLinkAttributes(e,a.href,a.newWindow),r&&a.dataId&&this.setupStorage(e,a.dataId,n,r)}static render(t){const e=t.annotationStorage,n=t.linkService,r=t.xfaHtml,i=t.intent||"display",s=document.createElement(r.name);r.attributes&&this.setAttributes({html:s,element:r,intent:i,linkService:n});const a="richText"!==i,o=t.div;if(o.append(s),t.viewport){const e=`matrix(${t.viewport.transform.join(",")})`;o.style.transform=e}a&&o.setAttribute("class","xfaLayer xfaFont");const l=[];if(0===r.children.length){if(r.value){const t=document.createTextNode(r.value);s.append(t),a&&ut.shouldBuildText(r.name)&&l.push(t)}return{textDivs:l}}const c=[[r,-1,s]];for(;c.length>0;){const[t,r,s]=c.at(-1);if(r+1===t.children.length){c.pop();continue}const o=t.children[++c.at(-1)[1]];if(null===o)continue;const{name:h}=o;if("#text"===h){const t=document.createTextNode(o.value);l.push(t),s.append(t);continue}const d=o?.attributes?.xmlns?document.createElementNS(o.attributes.xmlns,h):document.createElement(h);if(s.append(d),o.attributes&&this.setAttributes({html:d,element:o,storage:e,intent:i,linkService:n}),o.children?.length>0)c.push([o,-1,d]);else if(o.value){const t=document.createTextNode(o.value);a&&ut.shouldBuildText(h)&&l.push(t),d.append(t)}}for(const h of o.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))h.setAttribute("readOnly",!0);return{textDivs:l}}static update(t){const e=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=e,t.div.hidden=!1}}const ft="http://www.w3.org/2000/svg";class mt{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=(()=>this.CSS/this.PDF)()}async function gt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";if(At(t,document.baseURI)){const n=await fetch(t);if(!n.ok)throw new Error(n.statusText);switch(e){case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"json":return n.json()}return n.text()}return new Promise((n,r)=>{const i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType=e,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE)if(200!==i.status&&0!==i.status)r(new Error(i.statusText));else{switch(e){case"arraybuffer":case"blob":case"json":return void n(i.response)}n(i.responseText)}},i.send(null)})}class vt{constructor(t){let{viewBox:e,userUnit:n,scale:r,rotation:i,offsetX:s=0,offsetY:a=0,dontFlip:o=!1}=t;this.viewBox=e,this.userUnit=n,this.scale=r,this.rotation=i,this.offsetX=s,this.offsetY=a,r*=n;const l=(e[2]+e[0])/2,c=(e[3]+e[1])/2;let h,d,u,p,f,m,g,v;switch(i%=360,i<0&&(i+=360),i){case 180:h=-1,d=0,u=0,p=1;break;case 90:h=0,d=1,u=1,p=0;break;case 270:h=0,d=-1,u=-1,p=0;break;case 0:h=1,d=0,u=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(u=-u,p=-p),0===h?(f=Math.abs(c-e[1])*r+s,m=Math.abs(l-e[0])*r+a,g=(e[3]-e[1])*r,v=(e[2]-e[0])*r):(f=Math.abs(l-e[0])*r+s,m=Math.abs(c-e[1])*r+a,g=(e[2]-e[0])*r,v=(e[3]-e[1])*r),this.transform=[h*r,d*r,u*r,p*r,f-h*r*l-u*r*c,m-d*r*l-p*r*c],this.width=g,this.height=v}get rawDims(){const t=this.viewBox;return G(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone(){let{scale:t=this.scale,rotation:e=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new vt({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:t,rotation:e,offsetX:n,offsetY:r,dontFlip:i})}convertToViewportPoint(t,e){const n=[t,e];return st.applyTransform(n,this.transform),n}convertToViewportRectangle(t){const e=[t[0],t[1]];st.applyTransform(e,this.transform);const n=[t[2],t[3]];return st.applyTransform(n,this.transform),[e[0],e[1],n[0],n[1]]}convertToPdfPoint(t,e){const n=[t,e];return st.applyInverseTransform(n,this.transform),n}}class bt extends K{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;super(t,"RenderingCancelledException"),this.extraDelay=e}}function yt(t){const e=t.length;let n=0;for(;n<e&&""===t[n].trim();)n++;return"data:"===t.substring(n,n+5).toLowerCase()}function wt(t){return"string"===typeof t&&/\.pdf$/i.test(t)}class _t{started=(()=>Object.create(null))();times=[];time(t){t in this.started&&U(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||U(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const{name:n}of this.times)e=Math.max(n.length,e);for(const{name:n,start:r,end:i}of this.times)t.push(`${n.padEnd(e)} ${i-r}ms\n`);return t.join("")}}function At(t,e){const n=e?URL.parse(t,e):URL.parse(t);return"http:"===n?.protocol||"https:"===n?.protocol}function xt(t){t.preventDefault()}function Et(t){t.preventDefault(),t.stopPropagation()}class kt{static#n;static toDateObject(t){if(t instanceof Date)return t;if(!t||"string"!==typeof t)return null;this.#n||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const e=this.#n.exec(t);if(!e)return null;const n=parseInt(e[1],10);let r=parseInt(e[2],10);r=r>=1&&r<=12?r-1:0;let i=parseInt(e[3],10);i=i>=1&&i<=31?i:1;let s=parseInt(e[4],10);s=s>=0&&s<=23?s:0;let a=parseInt(e[5],10);a=a>=0&&a<=59?a:0;let o=parseInt(e[6],10);o=o>=0&&o<=59?o:0;const l=e[7]||"Z";let c=parseInt(e[8],10);c=c>=0&&c<=23?c:0;let h=parseInt(e[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===l?(s+=c,a+=h):"+"===l&&(s-=c,a-=h),new Date(Date.UTC(n,r,i,s,a,o))}}function Ct(t){if(t.startsWith("#")){const e=parseInt(t.slice(1),16);return[(16711680&e)>>16,(65280&e)>>8,255&e]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map(t=>parseInt(t)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(U(`Not a valid color format: "${t}"`),[0,0,0])}function St(t){const{a:e,b:n,c:r,d:i,e:s,f:a}=t.getTransform();return[e,n,r,i,s,a]}function Tt(t){const{a:e,b:n,c:r,d:i,e:s,f:a}=t.getTransform().invertSelf();return[e,n,r,i,s,a]}function Dt(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e instanceof vt){const{pageWidth:r,pageHeight:i}=e.rawDims,{style:s}=t,a=rt.isCSSRoundSupported,o=`var(--total-scale-factor) * ${r}px`,l=`var(--total-scale-factor) * ${i}px`,c=a?`round(down, ${o}, var(--scale-round-x))`:`calc(${o})`,h=a?`round(down, ${l}, var(--scale-round-y))`:`calc(${l})`;n&&e.rotation%180!==0?(s.width=h,s.height=c):(s.width=c,s.height=h)}r&&t.setAttribute("data-main-rotation",e.rotation)}class Mt{constructor(){const{pixelRatio:t}=Mt;this.sx=t,this.sy=t}get scaled(){return 1!==this.sx||1!==this.sy}get symmetric(){return this.sx===this.sy}limitCanvas(t,e,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=1/0,a=1/0,o=1/0;(n=Mt.capPixels(n,i))>0&&(s=Math.sqrt(n/(t*e))),-1!==r&&(a=r/t,o=r/e);const l=Math.min(s,a,o);return(this.sx>l||this.sy>l)&&(this.sx=l,this.sy=l,!0)}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(t,e){if(e>=0){const n=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+e/100));return t>0?Math.min(t,n):n}return t}}const Pt=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class It{static get isDarkMode(){return G(this,"isDarkMode",!!window?.matchMedia?.("(prefers-color-scheme: dark)").matches)}}function Ft(t,e){const n=t[0]/255,r=t[1]/255,i=t[2]/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=(s+a)/2;if(s===a)e[0]=e[1]=0;else{const t=s-a;switch(e[1]=o<.5?t/(s+a):t/(2-s-a),s){case n:e[0]=60*((r-i)/t+(r<i?6:0));break;case r:e[0]=60*((i-n)/t+2);break;case i:e[0]=60*((n-r)/t+4)}}e[2]=o}function Rt(t,e){const n=t[0],r=t[1],i=t[2],s=(1-Math.abs(2*i-1))*r,a=s*(1-Math.abs(n/60%2-1)),o=i-s/2;switch(Math.floor(n/60)){case 0:e[0]=s+o,e[1]=a+o,e[2]=o;break;case 1:e[0]=a+o,e[1]=s+o,e[2]=o;break;case 2:e[0]=o,e[1]=s+o,e[2]=a+o;break;case 3:e[0]=o,e[1]=a+o,e[2]=s+o;break;case 4:e[0]=a+o,e[1]=o,e[2]=s+o;break;case 5:case 6:e[0]=s+o,e[1]=o,e[2]=a+o}}function Nt(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function Lt(t,e,n){Rt(t,n),n.map(Nt);const r=.2126*n[0]+.7152*n[1]+.0722*n[2];Rt(e,n),n.map(Nt);const i=.2126*n[0]+.7152*n[1]+.0722*n[2];return r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)}const Ot=new Map;function Bt(t,e){let{html:n,dir:r,className:i}=t;const s=document.createDocumentFragment();if("string"===typeof n){const t=document.createElement("p");t.dir=r||"auto";const e=n.split(/(?:\r\n?|\n)/);for(let n=0,r=e.length;n<r;++n){const i=e[n];t.append(document.createTextNode(i)),n<r-1&&t.append(document.createElement("br"))}s.append(t)}else pt.render({xfaHtml:n,div:s,intent:"richText"});s.firstChild.classList.add("richText",i),e.append(s)}class $t{#r=null;#i=null;#s;#a=null;#o=null;#l=null;#c=null;#h=null;static#d=null;constructor(t){this.#s=t,$t.#d||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const t=this.#r=document.createElement("div");t.classList.add("editToolbar","hidden"),t.setAttribute("role","toolbar");const e=this.#s._uiManager._signal;e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("contextmenu",xt,{signal:e}),t.addEventListener("pointerdown",$t.#u,{signal:e}));const n=this.#a=document.createElement("div");n.className="buttons",t.append(n);const r=this.#s.toolbarPosition;if(r){const{style:e}=t,n="ltr"===this.#s._uiManager.direction?1-r[0]:r[0];e.insetInlineEnd=100*n+"%",e.top=`calc(${100*r[1]}% + var(--editor-toolbar-vert-offset))`}return t}get div(){return this.#r}static#u(t){t.stopPropagation()}#p(t){this.#s._focusEventsAllowed=!1,Et(t)}#f(t){this.#s._focusEventsAllowed=!0,Et(t)}#m(t){const e=this.#s._uiManager._signal;return e instanceof AbortSignal&&!e.aborted&&(t.addEventListener("focusin",this.#p.bind(this),{capture:!0,signal:e}),t.addEventListener("focusout",this.#f.bind(this),{capture:!0,signal:e}),t.addEventListener("contextmenu",xt,{signal:e}),!0)}hide(){this.#r.classList.add("hidden"),this.#i?.hideDropdown()}show(){this.#r.classList.remove("hidden"),this.#o?.shown(),this.#l?.shown()}addDeleteButton(){const{editorType:t,_uiManager:e}=this.#s,n=document.createElement("button");n.classList.add("basic","deleteButton"),n.tabIndex=0,n.setAttribute("data-l10n-id",$t.#d[t]),this.#m(n)&&n.addEventListener("click",t=>{e.delete()},{signal:e._signal}),this.#a.append(n)}get#g(){const t=document.createElement("div");return t.className="divider",t}async addAltText(t){const e=await t.render();this.#m(e),this.#a.append(e,this.#g),this.#o=t}addComment(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.#l)return;const n=t.renderForToolbar();if(!n)return;this.#m(n);const r=this.#c=this.#g;e?(this.#a.insertBefore(n,e),this.#a.insertBefore(r,e)):this.#a.append(n,r),this.#l=t,t.toolbar=this}addColorPicker(t){if(this.#i)return;this.#i=t;const e=t.renderButton();this.#m(e),this.#a.append(e,this.#g)}async addEditSignatureButton(t){const e=this.#h=await t.renderEditButton(this.#s);this.#m(e),this.#a.append(e,this.#g)}removeButton(t){if("comment"===t)this.#l?.removeToolbarCommentButton(),this.#l=null,this.#c?.remove(),this.#c=null}async addButton(t,e){switch(t){case"colorPicker":this.addColorPicker(e);break;case"altText":await this.addAltText(e);break;case"editSignature":await this.addEditSignatureButton(e);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(e)}}async addButtonBefore(t,e,n){const r=this.#a.querySelector(n);r&&"comment"===t&&this.addComment(e,r)}updateEditSignatureButton(t){this.#h&&(this.#h.title=t)}remove(){this.#r.remove(),this.#i?.destroy(),this.#i=null}}class zt{#a=null;#r=null;#v;constructor(t){this.#v=t}#b(){const t=this.#r=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar");const e=this.#v._signal;e instanceof AbortSignal&&!e.aborted&&t.addEventListener("contextmenu",xt,{signal:e});const n=this.#a=document.createElement("div");return n.className="buttons",t.append(n),this.#v.hasCommentManager()&&this.#y("commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{this.#v.commentSelection("floating_button")}),this.#y("highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{this.#v.highlightSelection("floating_button")}),t}#w(t,e){let n=0,r=0;for(const i of t){const t=i.y+i.height;if(t<n)continue;const s=i.x+(e?i.width:0);t>n?(r=s,n=t):e?s>r&&(r=s):s<r&&(r=s)}return[e?1-r:r,n]}show(t,e,n){const[r,i]=this.#w(e,n),{style:s}=this.#r||=this.#b();t.append(this.#r),s.insetInlineEnd=100*r+"%",s.top=`calc(${100*i}% + var(--editor-toolbar-vert-offset))`}hide(){this.#r.remove()}#y(t,e,n,r){const i=document.createElement("button");i.classList.add("basic",t),i.tabIndex=0,i.setAttribute("data-l10n-id",e);const s=document.createElement("span");i.append(s),s.className="visuallyHidden",s.setAttribute("data-l10n-id",n);const a=this.#v._signal;a instanceof AbortSignal&&!a.aborted&&(i.addEventListener("contextmenu",xt,{signal:a}),i.addEventListener("click",r,{signal:a})),this.#a.append(i)}}function jt(t,e,n){for(const r of n)e.addEventListener(r,t[r].bind(t))}class Ut{#_=0;get id(){return`${g}${this.#_++}`}}class Ht{#A=(()=>lt())();#_=0;#x=null;static get _isSVGFittingCanvas(){const t=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),e=new Image;e.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';return G(this,"_isSVGFittingCanvas",e.decode().then(()=>(t.drawImage(e,0,0,1,1,0,0,1,3),0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0])))}async#E(t,e){this.#x||=new Map;let n=this.#x.get(t);if(null===n)return null;if(n?.bitmap)return n.refCounter+=1,n;try{let t;if(n||={bitmap:null,id:`image_${this.#A}_${this.#_++}`,refCounter:0,isSvg:!1},"string"===typeof e?(n.url=e,t=await gt(e,"blob")):e instanceof File?t=n.file=e:e instanceof Blob&&(t=e),"image/svg+xml"===t.type){const e=Ht._isSVGFittingCanvas,r=new FileReader,i=new Image,s=new Promise((t,s)=>{i.onload=()=>{n.bitmap=i,n.isSvg=!0,t()},r.onload=async()=>{const t=n.svgUrl=r.result;i.src=await e?`${t}#svgView(preserveAspectRatio(none))`:t},i.onerror=r.onerror=s});r.readAsDataURL(t),await s}else n.bitmap=await createImageBitmap(t);n.refCounter=1}catch(r){U(r),n=null}return this.#x.set(t,n),n&&this.#x.set(n.id,n),n}async getFromFile(t){const{lastModified:e,name:n,size:r,type:i}=t;return this.#E(`${e}_${n}_${r}_${i}`,t)}async getFromUrl(t){return this.#E(t,t)}async getFromBlob(t,e){const n=await e;return this.#E(t,n)}async getFromId(t){this.#x||=new Map;const e=this.#x.get(t);if(!e)return null;if(e.bitmap)return e.refCounter+=1,e;if(e.file)return this.getFromFile(e.file);if(e.blobPromise){const{blobPromise:t}=e;return delete e.blobPromise,this.getFromBlob(e.id,t)}return this.getFromUrl(e.url)}getFromCanvas(t,e){this.#x||=new Map;let n=this.#x.get(t);if(n?.bitmap)return n.refCounter+=1,n;const r=new OffscreenCanvas(e.width,e.height);return r.getContext("2d").drawImage(e,0,0),n={bitmap:r.transferToImageBitmap(),id:`image_${this.#A}_${this.#_++}`,refCounter:1,isSvg:!1},this.#x.set(t,n),this.#x.set(n.id,n),n}getSvgUrl(t){const e=this.#x.get(t);return e?.isSvg?e.svgUrl:null}deleteId(t){this.#x||=new Map;const e=this.#x.get(t);if(!e)return;if(e.refCounter-=1,0!==e.refCounter)return;const{bitmap:n}=e;if(!e.url&&!e.file){const t=new OffscreenCanvas(n.width,n.height);t.getContext("bitmaprenderer").transferFromImageBitmap(n),e.blobPromise=t.convertToBlob()}n.close?.(),e.bitmap=null}isValidId(t){return t.startsWith(`image_${this.#A}_`)}}class Vt{#k=[];#C=!1;#S;#T=-1;constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;this.#S=t}add(t){let{cmd:e,undo:n,post:r,mustExec:i,type:s=NaN,overwriteIfSameType:a=!1,keepUndo:o=!1}=t;if(i&&e(),this.#C)return;const l={cmd:e,undo:n,post:r,type:s};if(-1===this.#T)return this.#k.length>0&&(this.#k.length=0),this.#T=0,void this.#k.push(l);if(a&&this.#k[this.#T].type===s)return o&&(l.undo=this.#k[this.#T].undo),void(this.#k[this.#T]=l);const c=this.#T+1;c===this.#S?this.#k.splice(0,1):(this.#T=c,c<this.#k.length&&this.#k.splice(c)),this.#k.push(l)}undo(){if(-1===this.#T)return;this.#C=!0;const{undo:t,post:e}=this.#k[this.#T];t(),e?.(),this.#C=!1,this.#T-=1}redo(){if(this.#T<this.#k.length-1){this.#T+=1,this.#C=!0;const{cmd:t,post:e}=this.#k[this.#T];t(),e?.(),this.#C=!1}}hasSomethingToUndo(){return-1!==this.#T}hasSomethingToRedo(){return this.#T<this.#k.length-1}cleanType(t){if(-1!==this.#T){for(let e=this.#T;e>=0;e--)if(this.#k[e].type!==t)return this.#k.splice(e+1,this.#T-e),void(this.#T=e);this.#k.length=0,this.#T=-1}}destroy(){this.#k=null}}class qt{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:e}=rt.platform;for(const[n,r,i={}]of t)for(const t of n){const n=t.startsWith("mac+");e&&n?(this.callbacks.set(t.slice(4),{callback:r,options:i}),this.allKeys.add(t.split("+").at(-1))):e||n||(this.callbacks.set(t,{callback:r,options:i}),this.allKeys.add(t.split("+").at(-1)))}}#D(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const e=this.buffer.join("+");return this.buffer.length=0,e}exec(t,e){if(!this.allKeys.has(e.key))return;const n=this.callbacks.get(this.#D(e));if(!n)return;const{callback:r,options:{bubbles:i=!1,args:s=[],checker:a=null}}=n;a&&!a(t,e)||(r.bind(t,...s,e)(),i||Et(e))}}class Wt{static _colorsMapping=(()=>new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]))();get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return function(t){const e=document.createElement("span");e.style.visibility="hidden",e.style.colorScheme="only light",document.body.append(e);for(const n of t.keys()){e.style.color=n;const r=window.getComputedStyle(e).color;t.set(n,Ct(r))}e.remove()}(t),G(this,"_colors",t)}convert(t){const e=Ct(t);if(!window.matchMedia("(forced-colors: active)").matches)return e;for(const[n,r]of this._colors)if(r.every((t,n)=>t===e[n]))return Wt._colorsMapping.get(n);return e}getHexCode(t){const e=this._colors.get(t);return e?st.makeHexColor(...e):t}}class Gt{#M=(()=>new AbortController)();#P=null;#I=null;#F=(()=>new Map)();#R=(()=>new Map)();#N=null;#L=null;#O=null;#B=(()=>new Vt)();#$=null;#z=null;#j=null;#U=0;#H=(()=>new Set)();#V=null;#q=null;#W=(()=>new Set)();_editorUndoBar=null;#G=!1;#K=!1;#X=!1;#Y=null;#Z=null;#J=null;#Q=null;#tt=!1;#et=null;#nt=(()=>new Ut)();#rt=!1;#it=!1;#st=!1;#at=null;#ot=null;#lt=null;#ct=null;#ht=null;#dt=(()=>v.NONE)();#ut=(()=>new Set)();#pt=null;#ft=null;#mt=null;#gt=null;#vt=null;#bt={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#yt=[0,0];#wt=null;#_t=null;#At=null;#xt=null;#Et=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=Gt.prototype,e=t=>t.#_t.contains(document.activeElement)&&"BUTTON"!==document.activeElement.tagName&&t.hasSomethingToControl(),n=(t,e)=>{let{target:n}=e;if(n instanceof HTMLInputElement){const{type:t}=n;return"text"!==t&&"number"!==t}return!0},r=this.TRANSLATE_SMALL,i=this.TRANSLATE_BIG;return G(this,"_keyboardManager",new qt([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],t.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:n}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(t,e)=>{let{target:n}=e;return!(n instanceof HTMLButtonElement)&&t.#_t.contains(n)&&!t.isEnterHandled}}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(t,e)=>{let{target:n}=e;return!(n instanceof HTMLButtonElement)&&t.#_t.contains(document.activeElement)}}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-r,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[r,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-r],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:e}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,r],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:e}]]))}constructor(t,e,n,r,i,s,a,o,l,c,h,d,u,p,f,m){const g=this._signal=this.#M.signal;this.#_t=t,this.#At=e,this.#xt=n,this.#N=r,this.#$=i,this.#ft=s,this.#vt=o,this._eventBus=a,a._on("editingaction",this.onEditingAction.bind(this),{signal:g}),a._on("pagechanging",this.onPageChanging.bind(this),{signal:g}),a._on("scalechanging",this.onScaleChanging.bind(this),{signal:g}),a._on("rotationchanging",this.onRotationChanging.bind(this),{signal:g}),a._on("setpreference",this.onSetPreference.bind(this),{signal:g}),a._on("switchannotationeditorparams",t=>this.updateParams(t.type,t.value),{signal:g}),window.addEventListener("pointerdown",()=>{this.#it=!0},{capture:!0,signal:g}),window.addEventListener("pointerup",()=>{this.#it=!1},{capture:!0,signal:g}),this.#kt(),this.#Ct(),this.#St(),this.#L=o.annotationStorage,this.#Y=o.filterFactory,this.#mt=l,this.#Q=c||null,this.#G=h,this.#K=d,this.#X=u,this.#ht=p||null,this.viewParameters={realScale:mt.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=f||null,this._supportsPinchToZoom=!1!==m,i?.setSidebarUiManager(this)}destroy(){this.#Et?.resolve(),this.#Et=null,this.#M?.abort(),this.#M=null,this._signal=null;for(const t of this.#R.values())t.destroy();this.#R.clear(),this.#F.clear(),this.#W.clear(),this.#ct?.clear(),this.#P=null,this.#ut.clear(),this.#B.destroy(),this.#N?.destroy(),this.#$?.destroy(),this.#ft?.destroy(),this.#et?.hide(),this.#et=null,this.#lt?.destroy(),this.#lt=null,this.#I=null,this.#Z&&(clearTimeout(this.#Z),this.#Z=null),this.#wt&&(clearTimeout(this.#wt),this.#wt=null),this._editorUndoBar?.destroy(),this.#vt=null}combinedSignal(t){return AbortSignal.any([this._signal,t.signal])}get mlManager(){return this.#ht}get useNewAltTextFlow(){return this.#K}get useNewAltTextWhenAddingImage(){return this.#X}get hcmFilter(){return G(this,"hcmFilter",this.#mt?this.#Y.addHCMFilter(this.#mt.foreground,this.#mt.background):"none")}get direction(){return G(this,"direction",getComputedStyle(this.#_t).direction)}get _highlightColors(){return G(this,"_highlightColors",this.#Q?new Map(this.#Q.split(",").map(t=>((t=t.split("=").map(t=>t.trim()))[1]=t[1].toUpperCase(),t))):null)}get highlightColors(){const{_highlightColors:t}=this;if(!t)return G(this,"highlightColors",null);const e=new Map,n=!!this.#mt;for(const[r,i]of t){const t=r.endsWith("_HCM");n&&t?e.set(r.replace("_HCM",""),i):n||t||e.set(r,i)}return G(this,"highlightColors",e)}get highlightColorNames(){return G(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}getNonHCMColor(t){if(!this._highlightColors)return t;const e=this.highlightColorNames.get(t);return this._highlightColors.get(e)||t}getNonHCMColorName(t){return this.highlightColorNames.get(t)||t}setCurrentDrawingSession(t){t?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#j=t}setMainHighlightColorPicker(t){this.#lt=t}editAltText(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.#N?.editAltText(this,t,e)}hasCommentManager(){return!!this.#$}editComment(t,e,n,r){this.#$?.showDialog(this,t,e,n,r)}selectComment(t,e){const n=this.#R.get(t),r=n?.getEditorByUID(e);r?.toggleComment(!0,!0)}updateComment(t){this.#$?.updateComment(t.getData())}updatePopupColor(t){this.#$?.updatePopupColor(t)}removeComment(t){this.#$?.removeComments([t.uid])}toggleComment(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;this.#$?.toggleCommentPopup(t,e,n)}makeCommentColor(t,e){return t&&this.#$?.makeCommentColor(t,e)||null}getCommentDialogElement(){return this.#$?.dialogElement||null}async waitForEditorsRendered(t){if(this.#R.has(t-1))return;const{resolve:e,promise:n}=Promise.withResolvers(),r=n=>{n.pageNumber===t&&(this._eventBus._off("editorsrendered",r),e())};this._eventBus.on("editorsrendered",r),await n}getSignature(t){this.#ft?.getSignature({uiManager:this,editor:t})}get signatureManager(){return this.#ft}switchToMode(t,e){this._eventBus.on("annotationeditormodechanged",e,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:t})}setPreference(t,e){this._eventBus.dispatch("setpreference",{source:this,name:t,value:e})}onSetPreference(t){let{name:e,value:n}=t;if("enableNewAltTextWhenAddingImage"===e)this.#X=n}onPageChanging(t){let{pageNumber:e}=t;this.#U=e-1}focusMainContainer(){this.#_t.focus()}findParent(t,e){for(const n of this.#R.values()){const{x:r,y:i,width:s,height:a}=n.div.getBoundingClientRect();if(t>=r&&t<=r+s&&e>=i&&e<=i+a)return n}return null}disableUserSelect(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#At.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#W.add(t)}removeShouldRescale(t){this.#W.delete(t)}onScaleChanging(t){let{scale:e}=t;this.commitOrRemove(),this.viewParameters.realScale=e*mt.PDF_TO_CSS_UNITS;for(const n of this.#W)n.onScaleChanging();this.#j?.onScaleChanging()}onRotationChanging(t){let{pagesRotation:e}=t;this.commitOrRemove(),this.viewParameters.rotation=e}#Tt(t){let{anchorNode:e}=t;return e.nodeType===Node.TEXT_NODE?e.parentElement:e}#Dt(t){const{currentLayer:e}=this;if(e.hasTextLayer(t))return e;for(const n of this.#R.values())if(n.hasTextLayer(t))return n;return null}highlightSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.getSelection();if(!n||n.isCollapsed)return;const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:a}=n,o=n.toString(),l=this.#Tt(n).closest(".textLayer"),c=this.getSelectionBoxes(l);if(!c)return;n.empty();const h=this.#Dt(l),d=this.#dt===v.NONE,u=()=>{const n=h?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:c,anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:a,text:o});d&&this.showAllEditors("highlight",!0,!0),e&&n?.editComment()};d?this.switchToMode(v.HIGHLIGHT,u):u()}commentSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.highlightSelection(t,!0)}#Mt(){const t=document.getSelection();if(!t||t.isCollapsed)return;const e=this.#Tt(t).closest(".textLayer"),n=this.getSelectionBoxes(e);n&&(this.#et||=new zt(this),this.#et.show(e,n,"ltr"===this.direction))}getAndRemoveDataFromAnnotationStorage(t){if(!this.#L)return null;const e=`${g}${t}`,n=this.#L.getRawValue(e);return n&&this.#L.remove(e),n}addToAnnotationStorage(t){t.isEmpty()||!this.#L||this.#L.has(t.id)||this.#L.setValue(t.id,t)}a11yAlert(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.#xt;n&&(n.setAttribute("data-l10n-id",t),e?n.setAttribute("data-l10n-args",JSON.stringify(e)):n.removeAttribute("data-l10n-args"))}#Pt(){const t=document.getSelection();if(!t||t.isCollapsed)return void(this.#pt&&(this.#et?.hide(),this.#pt=null,this.#It({hasSelectedText:!1})));const{anchorNode:e}=t;if(e===this.#pt)return;const n=this.#Tt(t).closest(".textLayer");if(n){if(this.#et?.hide(),this.#pt=e,this.#It({hasSelectedText:!0}),(this.#dt===v.HIGHLIGHT||this.#dt===v.NONE)&&(this.#dt===v.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#tt=this.isShiftKeyDown,!this.isShiftKeyDown)){const t=this.#dt===v.HIGHLIGHT?this.#Dt(n):null;if(t?.toggleDrawing(),this.#it){const e=new AbortController,n=this.combinedSignal(e),r=n=>{"pointerup"===n.type&&0!==n.button||(e.abort(),t?.toggleDrawing(!0),"pointerup"===n.type&&this.#Ft("main_toolbar"))};window.addEventListener("pointerup",r,{signal:n}),window.addEventListener("blur",r,{signal:n})}else t?.toggleDrawing(!0),this.#Ft("main_toolbar")}}else this.#pt&&(this.#et?.hide(),this.#pt=null,this.#It({hasSelectedText:!1}))}#Ft(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.#dt===v.HIGHLIGHT?this.highlightSelection(t):this.#G&&this.#Mt()}#kt(){document.addEventListener("selectionchange",this.#Pt.bind(this),{signal:this._signal})}#Rt(){if(this.#J)return;this.#J=new AbortController;const t=this.combinedSignal(this.#J);window.addEventListener("focus",this.focus.bind(this),{signal:t}),window.addEventListener("blur",this.blur.bind(this),{signal:t})}#Nt(){this.#J?.abort(),this.#J=null}blur(){if(this.isShiftKeyDown=!1,this.#tt&&(this.#tt=!1,this.#Ft("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const e of this.#ut)if(e.div.contains(t)){this.#ot=[e,t],e._focusEventsAllowed=!1;break}}focus(){if(!this.#ot)return;const[t,e]=this.#ot;this.#ot=null,e.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),e.focus()}#St(){if(this.#at)return;this.#at=new AbortController;const t=this.combinedSignal(this.#at);window.addEventListener("keydown",this.keydown.bind(this),{signal:t}),window.addEventListener("keyup",this.keyup.bind(this),{signal:t})}#Lt(){this.#at?.abort(),this.#at=null}#Ot(){if(this.#z)return;this.#z=new AbortController;const t=this.combinedSignal(this.#z);document.addEventListener("copy",this.copy.bind(this),{signal:t}),document.addEventListener("cut",this.cut.bind(this),{signal:t}),document.addEventListener("paste",this.paste.bind(this),{signal:t})}#Bt(){this.#z?.abort(),this.#z=null}#Ct(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#St(),this.#Ot()}removeEditListeners(){this.#Lt(),this.#Bt()}dragOver(t){for(const{type:e}of t.dataTransfer.items)for(const n of this.#q)if(n.isHandlingMimeForPasting(e))return t.dataTransfer.dropEffect="copy",void t.preventDefault()}drop(t){for(const e of t.dataTransfer.items)for(const n of this.#q)if(n.isHandlingMimeForPasting(e.type))return n.paste(e,this.currentLayer),void t.preventDefault()}copy(t){if(t.preventDefault(),this.#P?.commitOrRemove(),!this.hasSelection)return;const e=[];for(const n of this.#ut){const t=n.serialize(!0);t&&e.push(t)}0!==e.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(e))}cut(t){this.copy(t),this.delete()}async paste(t){t.preventDefault();const{clipboardData:e}=t;for(const s of e.items)for(const t of this.#q)if(t.isHandlingMimeForPasting(s.type))return void t.paste(s,this.currentLayer);let n=e.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(i){return void U(`paste: "${i.message}".`)}if(!Array.isArray(n))return;this.unselectAll();const r=this.currentLayer;try{const t=[];for(const s of n){const e=await r.deserialize(s);if(!e)return;t.push(e)}const e=()=>{for(const e of t)this.#$t(e);this.#zt(t)},i=()=>{for(const e of t)e.remove()};this.addCommands({cmd:e,undo:i,mustExec:!0})}catch(i){U(`paste: "${i.message}".`)}}keydown(t){this.isShiftKeyDown||"Shift"!==t.key||(this.isShiftKeyDown=!0),this.#dt===v.NONE||this.isEditorHandlingKeyboard||Gt._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&"Shift"===t.key&&(this.isShiftKeyDown=!1,this.#tt&&(this.#tt=!1,this.#Ft("main_toolbar")))}onEditingAction(t){let{name:e}=t;switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu")}}#It(t){Object.entries(t).some(t=>{let[e,n]=t;return this.#bt[e]!==n})&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#bt,t)}),this.#dt===v.HIGHLIGHT&&!1===t.hasSelectedEditor&&this.#jt([[b.HIGHLIGHT_FREE,!0]]))}#jt(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#Rt(),this.#Ot(),this.#It({isEditing:this.#dt!==v.NONE,isEmpty:this.#Ut(),hasSomethingToUndo:this.#B.hasSomethingToUndo(),hasSomethingToRedo:this.#B.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Nt(),this.#Bt(),this.#It({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#q){this.#q=t;for(const t of this.#q)this.#jt(t.defaultPropertiesToUpdate)}}getId(){return this.#nt.id}get currentLayer(){return this.#R.get(this.#U)}getLayer(t){return this.#R.get(t)}get currentPageIndex(){return this.#U}addLayer(t){this.#R.set(t.pageIndex,t),this.#rt?t.enable():t.disable()}removeLayer(t){this.#R.delete(t.pageIndex)}async updateMode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(this.#dt!==t&&(!this.#Et||(await this.#Et.promise,this.#Et))){if(this.#Et=Promise.withResolvers(),this.#j?.commitOrRemove(),this.#dt===v.POPUP&&this.#$?.hideSidebar(),this.#$?.destroyPopup(),this.#dt=t,t===v.NONE){this.setEditingState(!1),this.#Ht();for(const t of this.#F.values())t.hideStandaloneCommentButton();return this._editorUndoBar?.hide(),this.toggleComment(null),void this.#Et.resolve()}for(const t of this.#F.values())t.addStandaloneCommentButton();t===v.SIGNATURE&&await(this.#ft?.loadSignatures()),this.setEditingState(!0),await this.#Vt(),this.unselectAll();for(const e of this.#R.values())e.updateMode(t);if(t===v.POPUP){this.#I||=await this.#vt.getAnnotationsByType(new Set(this.#q.map(t=>t._editorType)));const t=new Set,e=[];for(const n of this.#F.values()){const{annotationElementId:r,hasComment:i,deleted:s}=n;r&&t.add(r),i&&!s&&e.push(n.getData())}for(const n of this.#I){const{id:r,popupRef:i,contentsObj:s}=n;i&&s?.str&&!t.has(r)&&!this.#H.has(r)&&e.push(n)}this.#$?.showSidebar(e)}if(!e)return n&&this.addNewEditorFromKeyboard(),void this.#Et.resolve();for(const t of this.#F.values())t.uid===e?(this.setSelected(t),i?t.editComment():r?t.enterInEditMode():t.focus()):t.unselect();this.#Et.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t.mode!==this.#dt&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...t})}updateParams(t,e){if(this.#q){switch(t){case b.CREATE:return void this.currentLayer.addNewEditor(e);case b.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#gt||=new Map).set(t,e),this.showAllEditors("highlight",e)}if(this.hasSelection)for(const n of this.#ut)n.updateParams(t,e);else for(const n of this.#q)n.updateDefaultParams(t,e)}}showAllEditors(t,e){for(const n of this.#F.values())n.editorType===t&&n.show(e);(this.#gt?.get(b.HIGHLIGHT_SHOW_ALL)??!0)!==e&&this.#jt([[b.HIGHLIGHT_SHOW_ALL,e]])}enableWaiting(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.#st!==t){this.#st=t;for(const e of this.#R.values())t?e.disableClick():e.enableClick(),e.div.classList.toggle("waiting",t)}}async#Vt(){if(!this.#rt){this.#rt=!0;const t=[];for(const e of this.#R.values())t.push(e.enable());await Promise.all(t);for(const e of this.#F.values())e.enable()}}#Ht(){if(this.unselectAll(),this.#rt){this.#rt=!1;for(const t of this.#R.values())t.disable();for(const t of this.#F.values())t.disable()}}*getEditors(t){for(const e of this.#F.values())e.pageIndex===t&&(yield e)}getEditor(t){return this.#F.get(t)}addEditor(t){this.#F.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#Z&&clearTimeout(this.#Z),this.#Z=setTimeout(()=>{this.focusMainContainer(),this.#Z=null},0)),this.#F.delete(t.id),t.annotationElementId&&this.#ct?.delete(t.annotationElementId),this.unselect(t),t.annotationElementId&&this.#H.has(t.annotationElementId)||this.#L?.remove(t.id)}addDeletedAnnotationElement(t){this.#H.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#H.has(t)}removeDeletedAnnotationElement(t){this.#H.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#$t(t){const e=this.#R.get(t.pageIndex);e?e.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#P!==t&&(this.#P=t,t&&this.#jt(t.propertiesToUpdate))}get#qt(){let t=null;for(t of this.#ut);return t}updateUI(t){this.#qt===t&&this.#jt(t.propertiesToUpdate)}updateUIForDefaultProperties(t){this.#jt(t.defaultPropertiesToUpdate)}toggleSelected(t){if(this.#ut.has(t))return this.#ut.delete(t),t.unselect(),void this.#It({hasSelectedEditor:this.hasSelection});this.#ut.add(t),t.select(),this.#jt(t.propertiesToUpdate),this.#It({hasSelectedEditor:!0})}setSelected(t){this.updateToolbar({mode:t.mode,editId:t.id}),this.#j?.commitOrRemove();for(const e of this.#ut)e!==t&&e.unselect();this.#ut.clear(),this.#ut.add(t),t.select(),this.#jt(t.propertiesToUpdate),this.#It({hasSelectedEditor:!0})}isSelected(t){return this.#ut.has(t)}get firstSelectedEditor(){return this.#ut.values().next().value}unselect(t){t.unselect(),this.#ut.delete(t),this.#It({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#ut.size}get isEnterHandled(){return 1===this.#ut.size&&this.firstSelectedEditor.isEnterHandled}undo(){this.#B.undo(),this.#It({hasSomethingToUndo:this.#B.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#Ut()}),this._editorUndoBar?.hide()}redo(){this.#B.redo(),this.#It({hasSomethingToUndo:!0,hasSomethingToRedo:this.#B.hasSomethingToRedo(),isEmpty:this.#Ut()})}addCommands(t){this.#B.add(t),this.#It({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#Ut()})}cleanUndoStack(t){this.#B.cleanType(t)}#Ut(){if(0===this.#F.size)return!0;if(1===this.#F.size)for(const t of this.#F.values())return t.isEmpty();return!1}delete(){this.commitOrRemove();const t=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!t)return;const e=t?[t]:[...this.#ut],n=()=>{for(const t of e)this.#$t(t)};this.addCommands({cmd:()=>{this._editorUndoBar?.show(n,1===e.length?e[0].editorType:e.length);for(const t of e)t.remove()},undo:n,mustExec:!0})}commitOrRemove(){this.#P?.commitOrRemove()}hasSomethingToControl(){return this.#P||this.hasSelection}#zt(t){for(const e of this.#ut)e.unselect();this.#ut.clear();for(const e of t)e.isEmpty()||(this.#ut.add(e),e.select());this.#It({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#ut)t.commit();this.#zt(this.#F.values())}unselectAll(){if((!this.#P||(this.#P.commitOrRemove(),this.#dt===v.NONE))&&!this.#j?.commitOrRemove()&&this.hasSelection){for(const t of this.#ut)t.unselect();this.#ut.clear(),this.#It({hasSelectedEditor:!1})}}translateSelectedEditors(t,e){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),!this.hasSelection)return;this.#yt[0]+=t,this.#yt[1]+=e;const[n,r]=this.#yt,i=[...this.#ut];this.#wt&&clearTimeout(this.#wt),this.#wt=setTimeout(()=>{this.#wt=null,this.#yt[0]=this.#yt[1]=0,this.addCommands({cmd:()=>{for(const t of i)this.#F.has(t.id)&&(t.translateInPage(n,r),t.translationDone())},undo:()=>{for(const t of i)this.#F.has(t.id)&&(t.translateInPage(-n,-r),t.translationDone())},mustExec:!1})},1e3);for(const s of i)s.translateInPage(t,e),s.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#V=new Map;for(const t of this.#ut)this.#V.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#V)return!1;this.disableUserSelect(!1);const t=this.#V;this.#V=null;let e=!1;for(const[{x:r,y:i,pageIndex:s},a]of t)a.newX=r,a.newY=i,a.newPageIndex=s,e||=r!==a.savedX||i!==a.savedY||s!==a.savedPageIndex;if(!e)return!1;const n=(t,e,n,r)=>{if(this.#F.has(t.id)){const i=this.#R.get(r);i?t._setParentAndPosition(i,e,n):(t.pageIndex=r,t.x=e,t.y=n)}};return this.addCommands({cmd:()=>{for(const[e,{newX:r,newY:i,newPageIndex:s}]of t)n(e,r,i,s)},undo:()=>{for(const[e,{savedX:r,savedY:i,savedPageIndex:s}]of t)n(e,r,i,s)},mustExec:!0}),!0}dragSelectedEditors(t,e){if(this.#V)for(const n of this.#V.keys())n.drag(t,e)}rebuild(t){if(null===t.parent){const e=this.getLayer(t.pageIndex);e?(e.changeParent(t),e.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||1===this.#ut.size&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#P===t}getActive(){return this.#P}getMode(){return this.#dt}isEditingMode(){return this.#dt!==v.NONE}get imageManager(){return G(this,"imageManager",new Ht)}getSelectionBoxes(t){if(!t)return null;const e=document.getSelection();for(let l=0,c=e.rangeCount;l<c;l++)if(!t.contains(e.getRangeAt(l).commonAncestorContainer))return null;const{x:n,y:r,width:i,height:s}=t.getBoundingClientRect();let a;switch(t.getAttribute("data-main-rotation")){case"90":a=(t,e,a,o)=>({x:(e-r)/s,y:1-(t+a-n)/i,width:o/s,height:a/i});break;case"180":a=(t,e,a,o)=>({x:1-(t+a-n)/i,y:1-(e+o-r)/s,width:a/i,height:o/s});break;case"270":a=(t,e,a,o)=>({x:1-(e+o-r)/s,y:(t-n)/i,width:o/s,height:a/i});break;default:a=(t,e,a,o)=>({x:(t-n)/i,y:(e-r)/s,width:a/i,height:o/s})}const o=[];for(let l=0,c=e.rangeCount;l<c;l++){const t=e.getRangeAt(l);if(!t.collapsed)for(const{x:e,y:n,width:r,height:i}of t.getClientRects())0!==r&&0!==i&&o.push(a(e,n,r,i))}return 0===o.length?null:o}addChangedExistingAnnotation(t){let{annotationElementId:e,id:n}=t;(this.#O||=new Map).set(e,n)}removeChangedExistingAnnotation(t){let{annotationElementId:e}=t;this.#O?.delete(e)}renderAnnotationElement(t){const e=this.#O?.get(t.data.id);if(!e)return;const n=this.#L.getRawValue(e);n&&(this.#dt!==v.NONE||n.hasBeenModified)&&n.renderAnnotationElement(t)}setMissingCanvas(t,e,n){const r=this.#ct?.get(t);r&&(r.setCanvas(e,n),this.#ct.delete(t))}addMissingCanvas(t,e){(this.#ct||=new Map).set(t,e)}}class Kt{#o=null;#Wt=!1;#Gt=null;#Kt=null;#Xt=null;#Yt=null;#Zt=!1;#Jt=null;#s=null;#Qt=null;#te=null;#ee=!1;static#ne=null;static _l10n=null;constructor(t){this.#s=t,this.#ee=t._uiManager.useNewAltTextFlow,Kt.#ne||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(t){Kt._l10n??=t}async render(){const t=this.#Gt=document.createElement("button");t.className="altText",t.tabIndex="0";const e=this.#Kt=document.createElement("span");t.append(e),this.#ee?(t.classList.add("new"),t.setAttribute("data-l10n-id",Kt.#ne.missing),e.setAttribute("data-l10n-id",Kt.#ne["missing-label"])):(t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const n=this.#s._uiManager._signal;t.addEventListener("contextmenu",xt,{signal:n}),t.addEventListener("pointerdown",t=>t.stopPropagation(),{signal:n});const r=t=>{t.preventDefault(),this.#s._uiManager.editAltText(this.#s),this.#ee&&this.#s._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#re}})};return t.addEventListener("click",r,{capture:!0,signal:n}),t.addEventListener("keydown",e=>{e.target===t&&"Enter"===e.key&&(this.#Zt=!0,r(e))},{signal:n}),await this.#ie(),t}get#re(){return(this.#o?"added":null===this.#o&&this.guessedText&&"review")||"missing"}finish(){this.#Gt&&(this.#Gt.focus({focusVisible:this.#Zt}),this.#Zt=!1)}isEmpty(){return this.#ee?null===this.#o:!this.#o&&!this.#Wt}hasData(){return this.#ee?null!==this.#o||!!this.#Qt:this.isEmpty()}get guessedText(){return this.#Qt}async setGuessedText(t){null===this.#o&&(this.#Qt=t,this.#te=await Kt._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:t}),this.#ie())}toggleAltTextBadge(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.#ee||this.#o)return this.#Jt?.remove(),void(this.#Jt=null);if(!this.#Jt){const t=this.#Jt=document.createElement("div");t.className="noAltTextBadge",this.#s.div.append(t)}this.#Jt.classList.toggle("hidden",!t)}serialize(t){let e=this.#o;return t||this.#Qt!==e||(e=this.#te),{altText:e,decorative:this.#Wt,guessedText:this.#Qt,textWithDisclaimer:this.#te}}get data(){return{altText:this.#o,decorative:this.#Wt}}set data(t){let{altText:e,decorative:n,guessedText:r,textWithDisclaimer:i,cancel:s=!1}=t;r&&(this.#Qt=r,this.#te=i),this.#o===e&&this.#Wt===n||(s||(this.#o=e,this.#Wt=n),this.#ie())}toggle(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#Gt&&(!t&&this.#Yt&&(clearTimeout(this.#Yt),this.#Yt=null),this.#Gt.disabled=!t)}shown(){this.#s._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#re}})}destroy(){this.#Gt?.remove(),this.#Gt=null,this.#Kt=null,this.#Xt=null,this.#Jt?.remove(),this.#Jt=null}async#ie(){const t=this.#Gt;if(!t)return;if(this.#ee){if(t.classList.toggle("done",!!this.#o),t.setAttribute("data-l10n-id",Kt.#ne[this.#re]),this.#Kt?.setAttribute("data-l10n-id",Kt.#ne[`${this.#re}-label`]),!this.#o)return void this.#Xt?.remove()}else{if(!this.#o&&!this.#Wt)return t.classList.remove("done"),void this.#Xt?.remove();t.classList.add("done"),t.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let e=this.#Xt;if(!e){this.#Xt=e=document.createElement("span"),e.className="tooltip",e.setAttribute("role","tooltip"),e.id=`alt-text-tooltip-${this.#s.id}`;const n=100,r=this.#s._uiManager._signal;r.addEventListener("abort",()=>{clearTimeout(this.#Yt),this.#Yt=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#Yt=setTimeout(()=>{this.#Yt=null,this.#Xt.classList.add("show"),this.#s._reportTelemetry({action:"alt_text_tooltip"})},n)},{signal:r}),t.addEventListener("mouseleave",()=>{this.#Yt&&(clearTimeout(this.#Yt),this.#Yt=null),this.#Xt?.classList.remove("show")},{signal:r})}this.#Wt?e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(e.removeAttribute("data-l10n-id"),e.textContent=this.#o),e.parentNode||t.append(e);const n=this.#s.getElementForAltText();n?.setAttribute("aria-describedby",e.id)}}class Xt{#se=null;#ae=null;#oe=!1;#s=null;#le=null;#ce=null;#he=null;#de=null;#ue=!1;#pe=null;constructor(t){this.#s=t}renderForToolbar(){const t=this.#ae=document.createElement("button");return t.className="comment",this.#b(t,!1)}renderForStandalone(){const t=this.#se=document.createElement("button");t.className="annotationCommentButton";const e=this.#s.commentButtonPosition;if(e){const{style:n}=t;n.insetInlineEnd=`calc(${100*("ltr"===this.#s._uiManager.direction?1-e[0]:e[0])}% - var(--comment-button-dim))`,n.top=`calc(${100*e[1]}% - var(--comment-button-dim))`;const r=this.#s.commentButtonColor;r&&(n.backgroundColor=r)}return this.#b(t,!0)}focusButton(){setTimeout(()=>{(this.#se??this.#ae)?.focus()},0)}onUpdatedColor(){if(!this.#se)return;const t=this.#s.commentButtonColor;t&&(this.#se.style.backgroundColor=t),this.#s._uiManager.updatePopupColor(this.#s)}get commentButtonWidth(){return(this.#se?.getBoundingClientRect().width??0)/this.#s.parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(this.#pe)return this.#pe;if(!this.#se)return null;const{x:t,y:e,height:n}=this.#se.getBoundingClientRect(),{x:r,y:i,width:s,height:a}=this.#s.parent.boundingClientRect;return[(t-r)/s,(e+n-i)/a]}set commentPopupPositionInLayer(t){this.#pe=t}hasDefaultPopupPosition(){return null===this.#pe}removeStandaloneCommentButton(){this.#se?.remove(),this.#se=null}removeToolbarCommentButton(){this.#ae?.remove(),this.#ae=null}setCommentButtonStates(t){let{selected:e,hasPopup:n}=t;this.#se&&(this.#se.classList.toggle("selected",e),this.#se.ariaExpanded=n)}#b(t,e){if(!this.#s._uiManager.hasCommentManager())return null;t.tabIndex="0",t.ariaHasPopup="dialog",e?(t.ariaControls="commentPopup",t.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(t.ariaControlsElements=[this.#s._uiManager.getCommentDialogElement()],t.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button"));const n=this.#s._uiManager._signal;if(!(n instanceof AbortSignal)||n.aborted)return t;t.addEventListener("contextmenu",xt,{signal:n}),e&&(t.addEventListener("focusin",t=>{this.#s._focusEventsAllowed=!1,Et(t)},{capture:!0,signal:n}),t.addEventListener("focusout",t=>{this.#s._focusEventsAllowed=!0,Et(t)},{capture:!0,signal:n})),t.addEventListener("pointerdown",t=>t.stopPropagation(),{signal:n});const r=e=>{e.preventDefault(),t===this.#ae?this.edit():this.#s.toggleComment(!0)};return t.addEventListener("click",r,{capture:!0,signal:n}),t.addEventListener("keydown",e=>{e.target===t&&"Enter"===e.key&&(this.#oe=!0,r(e))},{signal:n}),t.addEventListener("pointerenter",()=>{this.#s.toggleComment(!1,!0)},{signal:n}),t.addEventListener("pointerleave",()=>{this.#s.toggleComment(!1,!1)},{signal:n}),t}edit(t){const e=this.commentPopupPositionInLayer;let n,r;if(e)[n,r]=e;else{[n,r]=this.#s.commentButtonPosition;const{width:t,height:e,x:i,y:s}=this.#s;n=i+n*t,r=s+r*e}const i=this.#s.parent.boundingClientRect,{x:s,y:a,width:o,height:l}=i;this.#s._uiManager.editComment(this.#s,s+n*o,a+r*l,{...t,parentDimensions:i})}finish(){this.#ae&&(this.#ae.focus({focusVisible:this.#oe}),this.#oe=!1)}isDeleted(){return this.#ue||""===this.#he}isEmpty(){return null===this.#he}hasBeenEdited(){return this.isDeleted()||this.#he!==this.#le}serialize(){return this.data}get data(){return{text:this.#he,richText:this.#ce,date:this.#de,deleted:this.isDeleted()}}set data(t){if(t!==this.#he&&(this.#ce=null),null===t)return this.#he="",void(this.#ue=!0);this.#he=t,this.#de=new Date,this.#ue=!1}setInitialText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.#le=t,this.data=t,this.#de=null,this.#ce=e}shown(){}destroy(){this.#ae?.remove(),this.#ae=null,this.#se?.remove(),this.#se=null,this.#he="",this.#ce=null,this.#de=null,this.#s=null,this.#oe=!1,this.#ue=!1}}class Yt{#_t;#fe=!1;#me=null;#ge;#ve;#be;#ye;#we=null;#_e;#Ae=null;#xe;#Ee=null;constructor(t){let{container:e,isPinchingDisabled:n=null,isPinchingStopped:r=null,onPinchStart:i=null,onPinching:s=null,onPinchEnd:a=null,signal:o}=t;this.#_t=e,this.#me=r,this.#ge=n,this.#ve=i,this.#be=s,this.#ye=a,this.#xe=new AbortController,this.#_e=AbortSignal.any([o,this.#xe.signal]),e.addEventListener("touchstart",this.#ke.bind(this),{passive:!1,signal:this.#_e})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/Mt.pixelRatio}#ke(t){if(this.#ge?.())return;if(1===t.touches.length){if(this.#we)return;const t=this.#we=new AbortController,e=AbortSignal.any([this.#_e,t.signal]),n=this.#_t,r={capture:!0,signal:e,passive:!1},i=t=>{"touch"===t.pointerType&&(this.#we?.abort(),this.#we=null)};return n.addEventListener("pointerdown",t=>{"touch"===t.pointerType&&(Et(t),i(t))},r),n.addEventListener("pointerup",i,r),void n.addEventListener("pointercancel",i,r)}if(!this.#Ee){this.#Ee=new AbortController;const t=AbortSignal.any([this.#_e,this.#Ee.signal]),e=this.#_t,n={signal:t,capture:!1,passive:!1};e.addEventListener("touchmove",this.#Ce.bind(this),n);const r=this.#Se.bind(this);e.addEventListener("touchend",r,n),e.addEventListener("touchcancel",r,n),n.capture=!0,e.addEventListener("pointerdown",Et,n),e.addEventListener("pointermove",Et,n),e.addEventListener("pointercancel",Et,n),e.addEventListener("pointerup",Et,n),this.#ve?.()}if(Et(t),2!==t.touches.length||this.#me?.())return void(this.#Ae=null);let[e,n]=t.touches;e.identifier>n.identifier&&([e,n]=[n,e]),this.#Ae={touch0X:e.screenX,touch0Y:e.screenY,touch1X:n.screenX,touch1Y:n.screenY}}#Ce(t){if(!this.#Ae||2!==t.touches.length)return;Et(t);let[e,n]=t.touches;e.identifier>n.identifier&&([e,n]=[n,e]);const{screenX:r,screenY:i}=e,{screenX:s,screenY:a}=n,o=this.#Ae,{touch0X:l,touch0Y:c,touch1X:h,touch1Y:d}=o,u=h-l,p=d-c,f=s-r,m=a-i,g=Math.hypot(f,m)||1,v=Math.hypot(u,p)||1;if(!this.#fe&&Math.abs(v-g)<=Yt.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(o.touch0X=r,o.touch0Y=i,o.touch1X=s,o.touch1Y=a,!this.#fe)return void(this.#fe=!0);const b=[(r+s)/2,(i+a)/2];this.#be?.(b,v,g)}#Se(t){t.touches.length>=2||(this.#Ee&&(this.#Ee.abort(),this.#Ee=null,this.#ye?.()),this.#Ae&&(Et(t),this.#Ae=null,this.#fe=!1))}destroy(){this.#xe?.abort(),this.#xe=null,this.#we?.abort(),this.#we=null}}class Zt{#Te=null;#De=null;#o=null;#l=null;#se=null;#Me=!1;#Pe=null;#Ie="";#Fe=null;#Re=null;#Ne=null;#Le=null;#Oe=null;#Be="";#$e=!1;#ze=null;#je=!1;#Ue=!1;#He=!1;#Ve=null;#qe=0;#We=0;#Ge=null;#Ke=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=(()=>Object.create(null))();_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#Xe=!1;#Ye=(()=>Zt._zIndex++)();static _borderLineWidth=-1;static _colorManager=(()=>new Wt)();static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=Zt.prototype._resizeWithKeyboard,e=Gt.TRANSLATE_SMALL,n=Gt.TRANSLATE_BIG;return G(this,"_resizerKeyboardManager",new qt([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-e,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[e,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-e]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,e]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,n]}],[["Escape","mac+Escape"],Zt.prototype._stopResizingWithKeyboard]]))}constructor(t){this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null,this.annotationElementId=t.annotationElementId||null,this.creationDate=t.creationDate||new Date,this.modificationDate=t.modificationDate||null;const{rotation:e,rawDims:{pageWidth:n,pageHeight:r,pageX:i,pageY:s}}=this.parent.viewport;this.rotation=e,this.pageRotation=(360+e-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,r],this.pageTranslation=[i,s];const[a,o]=this.parentDimensions;this.x=t.x/a,this.y=t.y/o,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return G(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const e=new Jt({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});e.annotationElementId=t.annotationElementId,e.deleted=!0,e._uiManager.addToAnnotationStorage(e)}static initialize(t,e){if(Zt._l10n??=t,Zt._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),-1!==Zt._borderLineWidth)return;const n=getComputedStyle(document.documentElement);Zt._borderLineWidth=parseFloat(n.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,e){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,e){H("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#Xe}set _isDraggable(t){this.#Xe=t,this.div?.classList.toggle("draggable",t)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){const[t,e]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*e/(2*t),this.y+=this.width*t/(2*e);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*e/(2*t),this.y-=this.width*t/(2*e);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#Ye}setParent(t){null!==t?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):(this.#Ze(),this.#Le?.remove(),this.#Le=null),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#$e?this.#$e=!1:this.parent.setSelected(this))}focusout(t){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const e=t.relatedTarget;e?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,e,n,r){const[i,s]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(t+n)/i,this.y=(e+r)/s,this.fixAndSetPosition()}_moveAfterPaste(t,e){const[n,r]=this.parentDimensions;this.setAt(t*n,e*r,this.width*n,this.height*r),this._onTranslated()}#Je(t,e,n){let[r,i]=t;[e,n]=this.screenToPageTranslation(e,n),this.x+=e/r,this.y+=n/i,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(t,e){this.#Je(this.parentDimensions,t,e)}translateInPage(t,e){this.#ze||=[this.x,this.y,this.width,this.height],this.#Je(this.pageDimensions,t,e),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(t,e){this.#ze||=[this.x,this.y,this.width,this.height];const{div:n,parentDimensions:[r,i]}=this;if(this.x+=t/r,this.y+=e/i,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:t,y:e}=this.div.getBoundingClientRect();this.parent.findNewParent(this,t,e)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:s,y:a}=this;const[o,l]=this.getBaseTranslation();s+=o,a+=l;const{style:c}=n;c.left=`${(100*s).toFixed(2)}%`,c.top=`${(100*a).toFixed(2)}%`,this._onTranslating(s,a),n.scrollIntoView({block:"nearest"})}_onTranslating(t,e){}_onTranslated(t,e){}get _hasBeenMoved(){return!!this.#ze&&(this.#ze[0]!==this.x||this.#ze[1]!==this.y)}get _hasBeenResized(){return!!this.#ze&&(this.#ze[2]!==this.width||this.#ze[3]!==this.height)}getBaseTranslation(){const[t,e]=this.parentDimensions,{_borderLineWidth:n}=Zt,r=n/t,i=n/e;switch(this.rotation){case 90:return[-r,i];case 180:return[r,i];case 270:return[r,-i];default:return[-r,-i]}}get _mustFixPosition(){return!0}fixAndSetPosition(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rotation;const{div:{style:e},pageDimensions:[n,r]}=this;let{x:i,y:s,width:a,height:o}=this;if(a*=n,o*=r,i*=n,s*=r,this._mustFixPosition)switch(t){case 0:i=ht(i,0,n-a),s=ht(s,0,r-o);break;case 90:i=ht(i,0,n-o),s=ht(s,a,r);break;case 180:i=ht(i,a,n),s=ht(s,o,r);break;case 270:i=ht(i,o,n),s=ht(s,0,r-a)}this.x=i/=n,this.y=s/=r;const[l,c]=this.getBaseTranslation();i+=l,s+=c,e.left=`${(100*i).toFixed(2)}%`,e.top=`${(100*s).toFixed(2)}%`,this.moveInDOM()}static#Qe(t,e,n){switch(n){case 90:return[e,-t];case 180:return[-t,-e];case 270:return[-e,t];default:return[t,e]}}screenToPageTranslation(t,e){return Zt.#Qe(t,e,this.parentRotation)}pageTranslationToScreen(t,e){return Zt.#Qe(t,e,360-this.parentRotation)}#tn(t){switch(t){case 90:{const[t,e]=this.pageDimensions;return[0,-t/e,e/t,0]}case 180:return[-1,0,0,-1];case 270:{const[t,e]=this.pageDimensions;return[0,t/e,-e/t,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[e,n]}=this;return[e*t,n*t]}setDims(){const{div:{style:t},width:e,height:n}=this;t.width=`${(100*e).toFixed(2)}%`,t.height=`${(100*n).toFixed(2)}%`}getInitialTranslation(){return[0,0]}#en(){if(this.#Fe)return;this.#Fe=document.createElement("div"),this.#Fe.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],e=this._uiManager._signal;for(const n of t){const t=document.createElement("div");this.#Fe.append(t),t.classList.add("resizer",n),t.setAttribute("data-resizer-name",n),t.addEventListener("pointerdown",this.#nn.bind(this,n),{signal:e}),t.addEventListener("contextmenu",xt,{signal:e}),t.tabIndex=-1}this.div.prepend(this.#Fe)}#nn(t,e){e.preventDefault();const{isMac:n}=rt.platform;if(0!==e.button||e.ctrlKey&&n)return;this.#o?.toggle(!1);const r=this._isDraggable;this._isDraggable=!1,this.#Re=[e.screenX,e.screenY];const i=new AbortController,s=this._uiManager.combinedSignal(i);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#rn.bind(this,t),{passive:!0,capture:!0,signal:s}),window.addEventListener("touchmove",Et,{passive:!1,signal:s}),window.addEventListener("contextmenu",xt,{signal:s}),this.#Ne={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const a=this.parent.div.style.cursor,o=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(e.target).cursor;const l=()=>{i.abort(),this.parent.togglePointerEvents(!0),this.#o?.toggle(!0),this._isDraggable=r,this.parent.div.style.cursor=a,this.div.style.cursor=o,this.#in()};window.addEventListener("pointerup",l,{signal:s}),window.addEventListener("blur",l,{signal:s})}#sn(t,e,n,r){this.width=n,this.height=r,this.x=t,this.y=e,this.setDims(),this.fixAndSetPosition(),this._onResized()}_onResized(){}#in(){if(!this.#Ne)return;const{savedX:t,savedY:e,savedWidth:n,savedHeight:r}=this.#Ne;this.#Ne=null;const i=this.x,s=this.y,a=this.width,o=this.height;i===t&&s===e&&a===n&&o===r||this.addCommands({cmd:this.#sn.bind(this,i,s,a,o),undo:this.#sn.bind(this,t,e,n,r),mustExec:!0})}static _round(t){return Math.round(1e4*t)/1e4}#rn(t,e){const[n,r]=this.parentDimensions,i=this.x,s=this.y,a=this.width,o=this.height,l=Zt.MIN_SIZE/n,c=Zt.MIN_SIZE/r,h=this.#tn(this.rotation),d=(t,e)=>[h[0]*t+h[2]*e,h[1]*t+h[3]*e],u=this.#tn(360-this.rotation);let p,f,m=!1,g=!1;switch(t){case"topLeft":m=!0,p=(t,e)=>[0,0],f=(t,e)=>[t,e];break;case"topMiddle":p=(t,e)=>[t/2,0],f=(t,e)=>[t/2,e];break;case"topRight":m=!0,p=(t,e)=>[t,0],f=(t,e)=>[0,e];break;case"middleRight":g=!0,p=(t,e)=>[t,e/2],f=(t,e)=>[0,e/2];break;case"bottomRight":m=!0,p=(t,e)=>[t,e],f=(t,e)=>[0,0];break;case"bottomMiddle":p=(t,e)=>[t/2,e],f=(t,e)=>[t/2,0];break;case"bottomLeft":m=!0,p=(t,e)=>[0,e],f=(t,e)=>[t,0];break;case"middleLeft":g=!0,p=(t,e)=>[0,e/2],f=(t,e)=>[t,e/2]}const v=p(a,o),b=f(a,o);let y=d(...b);const w=Zt._round(i+y[0]),_=Zt._round(s+y[1]);let A,x,E=1,k=1;if(e.fromKeyboard)({deltaX:A,deltaY:x}=e);else{const{screenX:t,screenY:n}=e,[r,i]=this.#Re;[A,x]=this.screenToPageTranslation(t-r,n-i),this.#Re[0]=t,this.#Re[1]=n}var C,S;if([A,x]=(C=A/n,S=x/r,[u[0]*C+u[2]*S,u[1]*C+u[3]*S]),m){const t=Math.hypot(a,o);E=k=Math.max(Math.min(Math.hypot(b[0]-v[0]-A,b[1]-v[1]-x)/t,1/a,1/o),l/a,c/o)}else g?E=ht(Math.abs(b[0]-v[0]-A),l,1)/a:k=ht(Math.abs(b[1]-v[1]-x),c,1)/o;const T=Zt._round(a*E),D=Zt._round(o*k);y=d(...f(T,D));const M=w-y[0],P=_-y[1];this.#ze||=[this.x,this.y,this.width,this.height],this.width=T,this.height=D,this.x=M,this.y=P,this.setDims(),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#o?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#Ue)return this._editToolbar;this._editToolbar=new $t(this),this.div.append(this._editToolbar.render());const{toolbarButtons:t}=this;if(t)for(const[e,n]of t)await this._editToolbar.addButton(e,n);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){this._editToolbar?.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){this._editToolbar?.removeButton("comment")}removeEditToolbar(){this._editToolbar?.remove(),this._editToolbar=null,this.#o?.destroy()}addContainer(t){const e=this._editToolbar?.div;e?e.before(t):this.div.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#o||(Kt.initialize(Zt._l10n),this.#o=new Kt(this),this.#Te&&(this.#o.data=this.#Te,this.#Te=null)),this.#o}get altTextData(){return this.#o?.data}set altTextData(t){this.#o&&(this.#o.data=t)}get guessedAltText(){return this.#o?.guessedText}async setGuessedAltText(t){await(this.#o?.setGuessedText(t))}serializeAltText(t){return this.#o?.serialize(t)}hasAltText(){return!!this.#o&&!this.#o.isEmpty()}hasAltTextData(){return this.#o?.hasData()??!1}focusCommentButton(){this.#l?.focusButton()}addCommentButton(){return this.#l||=new Xt(this)}addStandaloneCommentButton(){this.#se?this._uiManager.isEditingMode()&&this.#se.classList.remove("hidden"):this.hasComment&&(this.#se=this.#l.renderForStandalone(),this.div.append(this.#se))}removeStandaloneCommentButton(){this.#l.removeStandaloneCommentButton(),this.#se=null}hideStandaloneCommentButton(){this.#se?.classList.add("hidden")}get comment(){const{data:{richText:t,text:e,date:n,deleted:r}}=this.#l;return{text:e,richText:t,date:n,deleted:r,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(t){this.#l||=new Xt(this),this.#l.data=t,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData(t){let{comment:e,popupRef:n,richText:r}=t;if(!n)return;if(this.#l||=new Xt(this),this.#l.setInitialText(e,r),!this.annotationElementId)return;const i=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);i&&this.updateFromAnnotationLayer(i)}get hasEditedComment(){return this.#l?.hasBeenEdited()}get hasDeletedComment(){return this.#l?.isDeleted()}get hasComment(){return!!this.#l&&!this.#l.isEmpty()&&!this.#l.isDeleted()}async editComment(t){this.#l||=new Xt(this),this.#l.edit(t)}toggleComment(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;this.hasComment&&this._uiManager.toggleComment(this,t,e)}setSelectedCommentButton(t){this.#l.setSelectedButton(t)}addComment(t){if(this.hasEditedComment){const e=180,n=100,[,,,r]=t.rect,[i]=this.pageDimensions,[s]=this.pageTranslation,a=s+i+1,o=r-n,l=a+e;t.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[a,o,l,r]}}}updateFromAnnotationLayer(t){let{popup:{contents:e,deleted:n}}=t;this.#l.data=n?null:e}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){const t=this.div=document.createElement("div");t.setAttribute("data-editor-rotation",(360-this.rotation)%360),t.className=this.name,t.setAttribute("id",this.id),t.tabIndex=this.#Me?-1:0,t.setAttribute("role","application"),this.defaultL10nId&&t.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||t.classList.add("hidden"),this.setInForeground(),this.#an();const[e,n]=this.parentDimensions;this.parentRotation%180!==0&&(t.style.maxWidth=`${(100*n/e).toFixed(2)}%`,t.style.maxHeight=`${(100*e/n).toFixed(2)}%`);const[r,i]=this.getInitialTranslation();return this.translate(r,i),jt(this,t,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#Ke||=new Yt({container:t,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#on.bind(this),onPinching:this.#ln.bind(this),onPinchEnd:this.#cn.bind(this),signal:this._uiManager._signal})),this.addStandaloneCommentButton(),this._uiManager._editorUndoBar?.hide(),t}#on(){this.#Ne={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#o?.toggle(!1),this.parent.togglePointerEvents(!1)}#ln(t,e,n){let r=n/e*.7+1-.7;if(1===r)return;const i=this.#tn(this.rotation),s=(t,e)=>[i[0]*t+i[2]*e,i[1]*t+i[3]*e],[a,o]=this.parentDimensions,l=this.x,c=this.y,h=this.width,d=this.height,u=Zt.MIN_SIZE/a,p=Zt.MIN_SIZE/o;r=Math.max(Math.min(r,1/h,1/d),u/h,p/d);const f=Zt._round(h*r),m=Zt._round(d*r);if(f===h&&m===d)return;this.#ze||=[l,c,h,d];const g=s(h/2,d/2),v=Zt._round(l+g[0]),b=Zt._round(c+g[1]),y=s(f/2,m/2);this.x=v-y[0],this.y=b-y[1],this.width=f,this.height=m,this.setDims(),this.fixAndSetPosition(),this._onResizing()}#cn(){this.#o?.toggle(!0),this.parent.togglePointerEvents(!0),this.#in()}pointerdown(t){const{isMac:e}=rt.platform;0!==t.button||t.ctrlKey&&e?t.preventDefault():(this.#$e=!0,this._isDraggable?this.#hn(t):this.#dn(t))}#dn(t){const{isMac:e}=rt.platform;t.ctrlKey&&!e||t.shiftKey||t.metaKey&&e?this.parent.toggleSelected(this):this.parent.setSelected(this)}#hn(t){const{isSelected:e}=this;this._uiManager.setUpDragSession();let n=!1;const r=new AbortController,i=this._uiManager.combinedSignal(r),s={capture:!0,passive:!1,signal:i},a=t=>{r.abort(),this.#Pe=null,this.#$e=!1,this._uiManager.endDragSession()||this.#dn(t),n&&this._onStopDragging()};e&&(this.#qe=t.clientX,this.#We=t.clientY,this.#Pe=t.pointerId,this.#Ie=t.pointerType,window.addEventListener("pointermove",t=>{n||(n=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());const{clientX:e,clientY:r,pointerId:i}=t;if(i!==this.#Pe)return void Et(t);const[s,a]=this.screenToPageTranslation(e-this.#qe,r-this.#We);this.#qe=e,this.#We=r,this._uiManager.dragSelectedEditors(s,a)},s),window.addEventListener("touchmove",Et,s),window.addEventListener("pointerdown",t=>{t.pointerType===this.#Ie&&(this.#Ke||t.isPrimary)&&a(t),Et(t)},s));const o=t=>{this.#Pe&&this.#Pe!==t.pointerId?Et(t):a(t)};window.addEventListener("pointerup",o,{signal:i}),window.addEventListener("blur",o,{signal:i})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#Ve&&clearTimeout(this.#Ve),this.#Ve=setTimeout(()=>{this.#Ve=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,e,n){t.changeParent(this),this.x=e,this.y=n,this.fixAndSetPosition(),this._onTranslated()}getRect(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.rotation;const r=this.parentScale,[i,s]=this.pageDimensions,[a,o]=this.pageTranslation,l=t/r,c=e/r,h=this.x*i,d=this.y*s,u=this.width*i,p=this.height*s;switch(n){case 0:return[h+l+a,s-d-c-p+o,h+l+u+a,s-d-c+o];case 90:return[h+c+a,s-d+l+o,h+c+p+a,s-d+l+u+o];case 180:return[h-l-u+a,s-d+c+o,h-l+a,s-d+c+p+o];case 270:return[h-c-p+a,s-d-l-u+o,h-c+a,s-d-l+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,e){const[n,r,i,s]=t,a=i-n,o=s-r;switch(this.rotation){case 0:return[n,e-s,a,o];case 90:return[n,e-r,o,a];case 180:return[i,e-r,a,o];case 270:return[i,e-s,o,a];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&Zt._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){this.#l?.onUpdatedColor()}getData(){const{comment:{text:t,color:e,date:n,opacity:r,deleted:i,richText:s},uid:a,pageIndex:o,creationDate:l,modificationDate:c}=this;return{id:a,pageIndex:o,rect:this.getPDFRect(),richText:s,contentsObj:{str:t},creationDate:l,modificationDate:n||c,popupRef:!i,color:e,opacity:r}}onceAdded(t){}isEmpty(){return!1}enableEditMode(){return!this.isInEditMode()&&(this.parent.setEditingState(!1),this.#Ue=!0,!0)}disableEditMode(){return!!this.isInEditMode()&&(this.parent.setEditingState(!0),this.#Ue=!1,!0)}isInEditMode(){return this.#Ue}shouldGetKeyboardEvents(){return this.#He}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top:t,left:e,bottom:n,right:r}=this.getClientDimensions(),{innerHeight:i,innerWidth:s}=window;return e<s&&r>0&&t<i&&n>0}#an(){if(this.#Oe||!this.div)return;this.#Oe=new AbortController;const t=this._uiManager.combinedSignal(this.#Oe);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:t}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:t})}rebuild(){this.#an()}rotate(t){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(){return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:this._initialData?.popupRef||""}}static async deserialize(t,e,n){const r=new this.prototype.constructor({parent:e,id:e.getNextId(),uiManager:n,annotationElementId:t.annotationElementId,creationDate:t.creationDate,modificationDate:t.modificationDate});r.rotation=t.rotation,r.#Te=t.accessibilityData,r._isCopy=t.isCopy||!1;const[i,s]=r.pageDimensions,[a,o,l,c]=r.getRectInCurrentCoords(t.rect,s);return r.x=a/i,r.y=o/s,r.width=l/i,r.height=c/s,r}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||null!==this.serialize())}remove(){if(this.#Oe?.abort(),this.#Oe=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#Ve&&(clearTimeout(this.#Ve),this.#Ve=null),this.#Ze(),this.removeEditToolbar(),this.#Ge){for(const t of this.#Ge.values())clearTimeout(t);this.#Ge=null}this.parent=null,this.#Ke?.destroy(),this.#Ke=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#en(),this.#Fe.classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return"ltr"===this._uiManager.direction?[1,0]:[0,0]}get commentButtonPositionInPage(){const{commentButtonPosition:[t,e]}=this,[n,r,i,s]=this.getPDFRect();return[Zt._round(n+(i-n)*t),Zt._round(r+(s-r)*(1-e))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return this.#l.commentPopupPositionInLayer}set commentPopupPosition(t){this.#l.commentPopupPositionInLayer=t}hasDefaultPopupPosition(){return this.#l.hasDefaultPopupPosition()}get commentButtonWidth(){return this.#l.commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(t){this.#l.setCommentButtonStates(t)}keydown(t){if(!this.isResizable||t.target!==this.div||"Enter"!==t.key)return;this._uiManager.setSelected(this),this.#Ne={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const e=this.#Fe.children;if(!this.#De){this.#De=Array.from(e);const t=this.#un.bind(this),n=this.#pn.bind(this),r=this._uiManager._signal;for(const e of this.#De){const i=e.getAttribute("data-resizer-name");e.setAttribute("role","spinbutton"),e.addEventListener("keydown",t,{signal:r}),e.addEventListener("blur",n,{signal:r}),e.addEventListener("focus",this.#fn.bind(this,i),{signal:r}),e.setAttribute("data-l10n-id",Zt._l10nResizer[i])}}const n=this.#De[0];let r=0;for(const s of e){if(s===n)break;r++}const i=(360-this.rotation+this.parentRotation)%360/90*(this.#De.length/4);if(i!==r){if(i<r)for(let e=0;e<r-i;e++)this.#Fe.append(this.#Fe.firstChild);else if(i>r)for(let e=0;e<i-r;e++)this.#Fe.firstChild.before(this.#Fe.lastChild);let t=0;for(const n of e){const e=this.#De[t++].getAttribute("data-resizer-name");n.setAttribute("data-l10n-id",Zt._l10nResizer[e])}}this.#mn(0),this.#He=!0,this.#Fe.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#un(t){Zt._resizerKeyboardManager.exec(this,t)}#pn(t){this.#He&&t.relatedTarget?.parentNode!==this.#Fe&&this.#Ze()}#fn(t){this.#Be=this.#He?t:""}#mn(t){if(this.#De)for(const e of this.#De)e.tabIndex=t}_resizeWithKeyboard(t,e){this.#He&&this.#rn(this.#Be,{deltaX:t,deltaY:e,fromKeyboard:!0})}#Ze(){this.#He=!1,this.#mn(-1),this.#in()}_stopResizingWithKeyboard(){this.#Ze(),this.div.focus()}select(){this.isSelected&&this._editToolbar?this._editToolbar.show():(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),this._editToolbar?(this._editToolbar?.show(),this.#o?.toggleAltTextBadge(!1)):this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()}))}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>this.div?.focus({preventScroll:!0}),0)}unselect(){this.isSelected&&(this.isSelected=!1,this.#Fe?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#o?.toggleAltTextBadge(!0),this.hasComment&&this._uiManager.toggleComment(this,!1,!1))}updateParams(t,e){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(t){"BUTTON"!==t.target.nodeName&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#je}set isEditing(t){this.#je=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){this.#Ge||=new Map;const{action:e}=t;let n=this.#Ge.get(e);return n&&clearTimeout(n),n=setTimeout(()=>{this._reportTelemetry(t),this.#Ge.delete(e),0===this.#Ge.size&&(this.#Ge=null)},Zt._telemetryTimeout),void this.#Ge.set(e,n)}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#Me=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#Me=!0}updateFakeAnnotationElement(t){if(this.#Le||this.deleted)return this.deleted?(this.#Le.remove(),void(this.#Le=null)):void((this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&this.#Le.updateEdited({rect:this.getPDFRect(),popup:this.comment}));this.#Le=t.addFakeAnnotation(this)}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;let e=t.container.querySelector(".annotationContent");if(e){if("CANVAS"===e.nodeName){const t=e;e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.before(e)}}else e=document.createElement("div"),e.classList.add("annotationContent",this.editorType),t.container.prepend(e);return e}resetAnnotationElement(t){const{firstChild:e}=t.container;"DIV"===e?.nodeName&&e.classList.contains("annotationContent")&&e.remove()}}class Jt extends Zt{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const Qt=3285377520,te=4294901760,ee=65535;class ne{constructor(t){this.h1=t?4294967295&t:Qt,this.h2=t?4294967295&t:Qt}update(t){let e,n;if("string"===typeof t){e=new Uint8Array(2*t.length),n=0;for(let r=0,i=t.length;r<i;r++){const i=t.charCodeAt(r);i<=255?e[n++]=i:(e[n++]=i>>>8,e[n++]=255&i)}}else{if(!ArrayBuffer.isView(t))throw new Error("Invalid data format, must be a string or TypedArray.");e=t.slice(),n=e.byteLength}const r=n>>2,i=n-4*r,s=new Uint32Array(e.buffer,0,r);let a=0,o=0,l=this.h1,c=this.h2;const h=3432918353,d=461845907,u=11601,p=13715;for(let f=0;f<r;f++)1&f?(a=s[f],a=a*h&te|a*u&ee,a=a<<15|a>>>17,a=a*d&te|a*p&ee,l^=a,l=l<<13|l>>>19,l=5*l+3864292196):(o=s[f],o=o*h&te|o*u&ee,o=o<<15|o>>>17,o=o*d&te|o*p&ee,c^=o,c=c<<13|c>>>19,c=5*c+3864292196);switch(a=0,i){case 3:a^=e[4*r+2]<<16;case 2:a^=e[4*r+1]<<8;case 1:a^=e[4*r],a=a*h&te|a*u&ee,a=a<<15|a>>>17,a=a*d&te|a*p&ee,1&r?l^=a:c^=a}this.h1=l,this.h2=c}hexdigest(){let t=this.h1,e=this.h2;return t^=e>>>1,t=3981806797*t&te|36045*t&ee,e=4283543511*e&te|(2950163797*(e<<16|t>>>16)&te)>>>16,t^=e>>>1,t=444984403*t&te|60499*t&ee,e=3301882366*e&te|(3120437893*(e<<16|t>>>16)&te)>>>16,t^=e>>>1,(t>>>0).toString(16).padStart(8,"0")+(e>>>0).toString(16).padStart(8,"0")}}const re=Object.freeze({map:null,hash:"",transfer:void 0});class ie{#gn=!1;#vn=null;#bn=null;#yn=(()=>new Map)();constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,e){const n=this.#yn.get(t);return void 0===n?e:Object.assign(e,n)}getRawValue(t){return this.#yn.get(t)}remove(t){const e=this.#yn.get(t);if(void 0!==e&&(e instanceof Zt&&this.#bn.delete(e.annotationElementId),this.#yn.delete(t),0===this.#yn.size&&this.resetModified(),"function"===typeof this.onAnnotationEditor)){for(const t of this.#yn.values())if(t instanceof Zt)return;this.onAnnotationEditor(null)}}setValue(t,e){const n=this.#yn.get(t);let r=!1;if(void 0!==n)for(const[i,s]of Object.entries(e))n[i]!==s&&(r=!0,n[i]=s);else r=!0,this.#yn.set(t,e);r&&this.#wn(),e instanceof Zt&&((this.#bn||=new Map).set(e.annotationElementId,e),"function"===typeof this.onAnnotationEditor&&this.onAnnotationEditor(e.constructor._type))}has(t){return this.#yn.has(t)}get size(){return this.#yn.size}#wn(){this.#gn||(this.#gn=!0,"function"===typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#gn&&(this.#gn=!1,"function"===typeof this.onResetModified&&this.onResetModified())}get print(){return new se(this)}get serializable(){if(0===this.#yn.size)return re;const t=new Map,e=new ne,n=[],r=Object.create(null);let i=!1;for(const[s,a]of this.#yn){const n=a instanceof Zt?a.serialize(!1,r):a;n&&(t.set(s,n),e.update(`${s}:${JSON.stringify(n)}`),i||=!!n.bitmap)}if(i)for(const s of t.values())s.bitmap&&n.push(s.bitmap);return t.size>0?{map:t,hash:e.hexdigest(),transfer:n}:re}get editorStats(){let t=null;const e=new Map;let n=0,r=0;for(const i of this.#yn.values()){if(!(i instanceof Zt)){i.popup&&(i.popup.deleted?r+=1:n+=1);continue}i.isCommentDeleted?r+=1:i.hasEditedComment&&(n+=1);const s=i.telemetryFinalData;if(!s)continue;const{type:a}=s;e.has(a)||e.set(a,Object.getPrototypeOf(i).constructor),t||=Object.create(null);const o=t[a]||=new Map;for(const[t,e]of Object.entries(s)){if("type"===t)continue;let n=o.get(t);n||(n=new Map,o.set(t,n));const r=n.get(e)??0;n.set(e,r+1)}}if((r>0||n>0)&&(t||=Object.create(null),t.comments={deleted:r,edited:n}),!t)return null;for(const[i,s]of e)t[i]=s.computeTelemetryFinalData(t[i]);return t}resetModifiedIds(){this.#vn=null}updateEditor(t,e){const n=this.#bn?.get(t);return!!n&&(n.updateFromAnnotationLayer(e),!0)}getEditor(t){return this.#bn?.get(t)||null}get modifiedIds(){if(this.#vn)return this.#vn;const t=[];if(this.#bn)for(const e of this.#bn.values())e.serialize()&&t.push(e.annotationElementId);return this.#vn={ids:new Set(t),hash:t.join(",")}}[Symbol.iterator](){return this.#yn.entries()}}class se extends ie{#_n;constructor(t){super();const{map:e,hash:n,transfer:r}=t.serializable,i=structuredClone(e,r?{transfer:r}:null);this.#_n={map:i,hash:n,transfer:r}}get print(){H("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#_n}get modifiedIds(){return G(this,"modifiedIds",{ids:new Set,hash:""})}}class ae{#An=(()=>new Set)();constructor(t){let{ownerDocument:e=globalThis.document,styleElement:n=null}=t;this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const e=this.styleElement.sheet;e.insertRule(t,e.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#An.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(t){let{systemFontInfo:e,disableFontFace:n,_inspectFont:r}=t;if(e&&!this.#An.has(e.loadedName)){if(V(!n,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:t,src:n,style:i}=e,s=new FontFace(t,n,i);this.addNativeFontFace(s);try{await s.load(),this.#An.add(t),r?.(e)}catch{U(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}return}H("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo)return void await this.loadSystemFont(t);if(this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(n){throw U(`Failed to load font '${e.family}': '${n}'.`),t.disableFontFace=!0,n}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(e=>{const n=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,n)})}}get isFontLoadingAPISupported(){return G(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){return G(this,"isSyncFontLoadingSupported",i||rt.platform.isFirefox)}_queueLoadingCallback(t){const{loadingRequests:e}=this,n={done:!1,complete:function(){for(V(!n.done,"completeRequest() cannot be called twice."),n.done=!0;e.length>0&&e[0].done;){const t=e.shift();setTimeout(t.callback,0)}},callback:t};return e.push(n),n}get _loadTestFont(){return G(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(t,e){function n(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function r(t,e,n,r){return t.substring(0,e)+r+t.substring(e+n)}let i,s;const a=this._document.createElement("canvas");a.width=1,a.height=1;const o=a.getContext("2d");let l=0;const c=`lt${Date.now()}${this.loadTestFontId++}`;let h=this._loadTestFont;h=r(h,976,c.length,c);const d=1482184792;let u=n(h,16);for(i=0,s=c.length-3;i<s;i+=4)u=u-d+n(c,i)|0;var p;i<c.length&&(u=u-d+n(c+"XXX",i)|0),h=r(h,16,4,(p=u,String.fromCharCode(p>>24&255,p>>16&255,p>>8&255,255&p)));const f=`@font-face {font-family:"${c}";src:${`url(data:font/opentype;base64,${btoa(h)});`}}`;this.insertRule(f);const m=this._document.createElement("div");m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px";for(const g of[t.loadedName,c]){const t=this._document.createElement("span");t.textContent="Hi",t.style.fontFamily=g,m.append(t)}this._document.body.append(m),function t(e,n){if(++l>30)return U("Load test font never loaded."),void n();o.font="30px "+e,o.fillText(".",0,20),o.getImageData(0,0,1,1).data[3]>0?n():setTimeout(t.bind(null,e,n))}(c,()=>{m.remove(),e.complete()})}}class oe{#xn;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.compiledGlyphs=Object.create(null),this.#xn=t,this._inspectFont=e,n&&Object.assign(this,n),r&&(this.charProcOperatorList=r)}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(this.cssFontInfo){const e={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(e.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,e)}else t=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=`url(data:${this.mimetype};base64,${dt(this.data)});`;let e;if(this.cssFontInfo){let n=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(n+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),e=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${n}src:${t}}`}else e=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this._inspectFont?.(this,t),e}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];const n=this.loadedName+"_path_"+e;let r;try{r=t.get(n)}catch(s){U(`getPathGenerator - ignoring character: "${s}".`)}const i=new Path2D(r||"");return this.fontExtraProperties||t.delete(n),this.compiledGlyphs[e]=i}get black(){return this.#xn.black}get bold(){return this.#xn.bold}get disableFontFace(){return this.#xn.disableFontFace??!1}get fontExtraProperties(){return this.#xn.fontExtraProperties??!1}get isInvalidPDFjsFont(){return this.#xn.isInvalidPDFjsFont}get isType3Font(){return this.#xn.isType3Font}get italic(){return this.#xn.italic}get missingFile(){return this.#xn.missingFile}get remeasure(){return this.#xn.remeasure}get vertical(){return this.#xn.vertical}get ascent(){return this.#xn.ascent}get defaultWidth(){return this.#xn.defaultWidth}get descent(){return this.#xn.descent}get bbox(){return this.#xn.bbox}get fontMatrix(){return this.#xn.fontMatrix}get fallbackName(){return this.#xn.fallbackName}get loadedName(){return this.#xn.loadedName}get mimetype(){return this.#xn.mimetype}get name(){return this.#xn.name}get data(){return this.#xn.data}clearData(){this.#xn.clearData()}get cssFontInfo(){return this.#xn.cssFontInfo}get systemFontInfo(){return this.#xn.systemFontInfo}get defaultVMetrics(){return this.#xn.defaultVMetrics}}function le(t){if("string"!==typeof t)return null;if(t.endsWith("/"))return t;throw new Error(`Invalid factory url: "${t}" must include trailing slash.`)}const ce=t=>"object"===typeof t&&Number.isInteger(t?.num)&&t.num>=0&&Number.isInteger(t?.gen)&&t.gen>=0,he=function(t,e,n){if(!Array.isArray(n)||n.length<2)return!1;const[r,i,...s]=n;if(!t(r)&&!Number.isInteger(r))return!1;if(!e(i))return!1;const a=s.length;let o=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return 0===a;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(4!==a)return!1;o=!1;break;default:return!1}for(const l of s)if(!("number"===typeof l||o&&null===l))return!1;return!0}.bind(null,ce,t=>"object"===typeof t&&"string"===typeof t?.name);class de{#En=(()=>new Map)();#kn=(()=>Promise.resolve())();postMessage(t,e){const n={data:structuredClone(t,e?{transfer:e}:null)};this.#kn.then(()=>{for(const[t]of this.#En)t.call(this,n)})}addEventListener(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;if(n?.signal instanceof AbortSignal){const{signal:i}=n;if(i.aborted)return void U("LoopbackPort - cannot use an `aborted` signal.");const s=()=>this.removeEventListener(t,e);r=()=>i.removeEventListener("abort",s),i.addEventListener("abort",s)}this.#En.set(e,r)}removeEventListener(t,e){const n=this.#En.get(e);n?.(),this.#En.delete(e)}terminate(){for(const[,t]of this.#En)t?.();this.#En.clear()}}const ue=1,pe=2,fe=1,me=2,ge=3,ve=4,be=5,ye=6,we=7,_e=8;function Ae(){}function xe(t){if(t instanceof tt||t instanceof Z||t instanceof X||t instanceof J||t instanceof Y)return t;switch(t instanceof Error||"object"===typeof t&&null!==t||H('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new tt(t.message);case"InvalidPDFException":return new Z(t.message);case"PasswordException":return new X(t.message,t.code);case"ResponseException":return new J(t.message,t.status,t.missing);case"UnknownErrorException":return new Y(t.message,t.details)}return new Y(t.message,t.toString())}class Ee{#Cn=(()=>new AbortController)();constructor(t,e,n){this.sourceName=t,this.targetName=e,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),n.addEventListener("message",this.#Sn.bind(this),{signal:this.#Cn.signal})}#Sn(t){let{data:e}=t;if(e.targetName!==this.sourceName)return;if(e.stream)return void this.#Tn(e);if(e.callback){const t=e.callbackId,n=this.callbackCapabilities[t];if(!n)throw new Error(`Cannot resolve callback ${t}`);if(delete this.callbackCapabilities[t],e.callback===ue)n.resolve(e.data);else{if(e.callback!==pe)throw new Error("Unexpected callback case");n.reject(xe(e.reason))}return}const n=this.actionHandler[e.action];if(!n)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const t=this.sourceName,r=e.sourceName,i=this.comObj;return void Promise.try(n,e.data).then(function(n){i.postMessage({sourceName:t,targetName:r,callback:ue,callbackId:e.callbackId,data:n})},function(n){i.postMessage({sourceName:t,targetName:r,callback:pe,callbackId:e.callbackId,reason:xe(n)})})}e.streamId?this.#Dn(e):n(e.data)}on(t,e){const n=this.actionHandler;if(n[t])throw new Error(`There is already an actionName called "${t}"`);n[t]=e}send(t,e,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},n)}sendWithPromise(t,e,n){const r=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[r]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:r,data:e},n)}catch(s){i.reject(s)}return i.promise}sendWithStream(t,e,n,r){const i=this.streamId++,s=this.sourceName,a=this.targetName,o=this.comObj;return new ReadableStream({start:n=>{const l=Promise.withResolvers();return this.streamControllers[i]={controller:n,startCall:l,pullCall:null,cancelCall:null,isClosed:!1},o.postMessage({sourceName:s,targetName:a,action:t,streamId:i,data:e,desiredSize:n.desiredSize},r),l.promise},pull:t=>{const e=Promise.withResolvers();return this.streamControllers[i].pullCall=e,o.postMessage({sourceName:s,targetName:a,stream:ye,streamId:i,desiredSize:t.desiredSize}),e.promise},cancel:t=>{V(t instanceof Error,"cancel must have a valid reason");const e=Promise.withResolvers();return this.streamControllers[i].cancelCall=e,this.streamControllers[i].isClosed=!0,o.postMessage({sourceName:s,targetName:a,stream:fe,streamId:i,reason:xe(t)}),e.promise}},n)}#Dn(t){const e=t.streamId,n=this.sourceName,r=t.sourceName,i=this.comObj,s=this,a=this.actionHandler[t.action],o={enqueue(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2?arguments[2]:void 0;if(this.isCancelled)return;const o=this.desiredSize;this.desiredSize-=s,o>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),i.postMessage({sourceName:n,targetName:r,stream:ve,streamId:e,chunk:t},a)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:ge,streamId:e}),delete s.streamSinks[e])},error(t){V(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:n,targetName:r,stream:be,streamId:e,reason:xe(t)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};o.sinkCapability.resolve(),o.ready=o.sinkCapability.promise,this.streamSinks[e]=o,Promise.try(a,t.data,o).then(function(){i.postMessage({sourceName:n,targetName:r,stream:_e,streamId:e,success:!0})},function(t){i.postMessage({sourceName:n,targetName:r,stream:_e,streamId:e,reason:xe(t)})})}#Tn(t){const e=t.streamId,n=this.sourceName,r=t.sourceName,i=this.comObj,s=this.streamControllers[e],a=this.streamSinks[e];switch(t.stream){case _e:t.success?s.startCall.resolve():s.startCall.reject(xe(t.reason));break;case we:t.success?s.pullCall.resolve():s.pullCall.reject(xe(t.reason));break;case ye:if(!a){i.postMessage({sourceName:n,targetName:r,stream:we,streamId:e,success:!0});break}a.desiredSize<=0&&t.desiredSize>0&&a.sinkCapability.resolve(),a.desiredSize=t.desiredSize,Promise.try(a.onPull||Ae).then(function(){i.postMessage({sourceName:n,targetName:r,stream:we,streamId:e,success:!0})},function(t){i.postMessage({sourceName:n,targetName:r,stream:we,streamId:e,reason:xe(t)})});break;case ve:if(V(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(t.chunk);break;case ge:if(V(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this.#Mn(s,e);break;case be:V(s,"error should have stream controller"),s.controller.error(xe(t.reason)),this.#Mn(s,e);break;case me:t.success?s.cancelCall.resolve():s.cancelCall.reject(xe(t.reason)),this.#Mn(s,e);break;case fe:if(!a)break;const o=xe(t.reason);Promise.try(a.onCancel||Ae,o).then(function(){i.postMessage({sourceName:n,targetName:r,stream:me,streamId:e,success:!0})},function(t){i.postMessage({sourceName:n,targetName:r,stream:me,streamId:e,reason:xe(t)})}),a.sinkCapability.reject(o),a.isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async#Mn(t,e){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[e]}destroy(){this.#Cn?.abort(),this.#Cn=null}}class ke{#Pn=!1;constructor(t){let{enableHWA:e=!1}=t;this.#Pn=e}create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(t,e);return{canvas:n,context:n.getContext("2d",{willReadFrequently:!this.#Pn})}}reset(t,e,n){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||n<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=n}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,e){H("Abstract method `_createCanvas` called.")}}class Ce extends ke{constructor(t){let{ownerDocument:e=globalThis.document,enableHWA:n=!1}=t;super({enableHWA:n}),this._document=e}_createCanvas(t,e){const n=this._document.createElement("canvas");return n.width=t,n.height=e,n}}class Se{constructor(t){let{baseUrl:e=null,isCompressed:n=!0}=t;this.baseUrl=e,this.isCompressed=n}async fetch(t){let{name:e}=t;if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");const n=this.baseUrl+e+(this.isCompressed?".bcmap":"");return this._fetch(n).then(t=>({cMapData:t,isCompressed:this.isCompressed})).catch(t=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n}`)})}async _fetch(t){H("Abstract method `_fetch` called.")}}class Te extends Se{async _fetch(t){const e=await gt(t,this.isCompressed?"arraybuffer":"text");return e instanceof ArrayBuffer?new Uint8Array(e):nt(e)}}class De{addFilter(t){return"none"}addHCMFilter(t,e){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,e,n,r,i){return"none"}destroy(){}}class Me extends De{#In;#Fn;#Rn;#Nn;#Ln;#On;#_=0;constructor(t){let{docId:e,ownerDocument:n=globalThis.document}=t;super(),this.#Nn=e,this.#Ln=n}get#x(){return this.#Fn||=new Map}get#Bn(){return this.#On||=new Map}get#$n(){if(!this.#Rn){const t=this.#Ln.createElement("div"),{style:e}=t;e.visibility="hidden",e.contain="strict",e.width=e.height=0,e.position="absolute",e.top=e.left=0,e.zIndex=-1;const n=this.#Ln.createElementNS(ft,"svg");n.setAttribute("width",0),n.setAttribute("height",0),this.#Rn=this.#Ln.createElementNS(ft,"defs"),t.append(n),n.append(this.#Rn),this.#Ln.body.append(t)}return this.#Rn}#zn(t){if(1===t.length){const e=t[0],n=new Array(256);for(let t=0;t<256;t++)n[t]=e[t]/255;const r=n.join(",");return[r,r,r]}const[e,n,r]=t,i=new Array(256),s=new Array(256),a=new Array(256);for(let o=0;o<256;o++)i[o]=e[o]/255,s[o]=n[o]/255,a[o]=r[o]/255;return[i.join(","),s.join(","),a.join(",")]}#jn(t){if(void 0===this.#In){this.#In="";const t=this.#Ln.URL;t!==this.#Ln.baseURI&&(yt(t)?U('#createUrl: ignore "data:"-URL for performance reasons.'):this.#In=W(t,""))}return`url(${this.#In}#${t})`}addFilter(t){if(!t)return"none";let e=this.#x.get(t);if(e)return e;const[n,r,i]=this.#zn(t),s=1===t.length?n:`${n}${r}${i}`;if(e=this.#x.get(s),e)return this.#x.set(t,e),e;const a=`g_${this.#Nn}_transfer_map_${this.#_++}`,o=this.#jn(a);this.#x.set(t,o),this.#x.set(s,o);const l=this.#Un(a);return this.#Hn(n,r,i,l),o}addHCMFilter(t,e){const n=`${t}-${e}`,r="base";let i=this.#Bn.get(r);if(i?.key===n)return i.url;if(i?(i.filter?.remove(),i.key=n,i.url="none",i.filter=null):(i={key:n,url:"none",filter:null},this.#Bn.set(r,i)),!t||!e)return i.url;const s=this.#Vn(t);t=st.makeHexColor(...s);const a=this.#Vn(e);if(e=st.makeHexColor(...a),this.#$n.style.color="","#000000"===t&&"#ffffff"===e||t===e)return i.url;const o=new Array(256);for(let u=0;u<=255;u++){const t=u/255;o[u]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const l=o.join(","),c=`g_${this.#Nn}_hcm_filter`,h=i.filter=this.#Un(c);this.#Hn(l,l,l,h),this.#qn(h);const d=(t,e)=>{const n=s[t]/255,r=a[t]/255,i=new Array(e+1);for(let s=0;s<=e;s++)i[s]=n+s/e*(r-n);return i.join(",")};return this.#Hn(d(0,5),d(1,5),d(2,5),h),i.url=this.#jn(c),i.url}addAlphaFilter(t){let e=this.#x.get(t);if(e)return e;const[n]=this.#zn([t]),r=`alpha_${n}`;if(e=this.#x.get(r),e)return this.#x.set(t,e),e;const i=`g_${this.#Nn}_alpha_map_${this.#_++}`,s=this.#jn(i);this.#x.set(t,s),this.#x.set(r,s);const a=this.#Un(i);return this.#Wn(n,a),s}addLuminosityFilter(t){let e,n,r=this.#x.get(t||"luminosity");if(r)return r;if(t?([e]=this.#zn([t]),n=`luminosity_${e}`):n="luminosity",r=this.#x.get(n),r)return this.#x.set(t,r),r;const i=`g_${this.#Nn}_luminosity_map_${this.#_++}`,s=this.#jn(i);this.#x.set(t,s),this.#x.set(n,s);const a=this.#Un(i);return this.#Gn(a),t&&this.#Wn(e,a),s}addHighlightHCMFilter(t,e,n,r,i){const s=`${e}-${n}-${r}-${i}`;let a=this.#Bn.get(t);if(a?.key===s)return a.url;if(a?(a.filter?.remove(),a.key=s,a.url="none",a.filter=null):(a={key:s,url:"none",filter:null},this.#Bn.set(t,a)),!e||!n)return a.url;const[o,l]=[e,n].map(this.#Vn.bind(this));let c=Math.round(.2126*o[0]+.7152*o[1]+.0722*o[2]),h=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),[d,u]=[r,i].map(this.#Vn.bind(this));h<c&&([c,h,d,u]=[h,c,u,d]),this.#$n.style.color="";const p=(t,e,n)=>{const r=new Array(256),i=(h-c)/n,s=t/255,a=(e-t)/(255*n);let o=0;for(let l=0;l<=n;l++){const t=Math.round(c+l*i),e=s+l*a;for(let n=o;n<=t;n++)r[n]=e;o=t+1}for(let l=o;l<256;l++)r[l]=r[o-1];return r.join(",")},f=`g_${this.#Nn}_hcm_${t}_filter`,m=a.filter=this.#Un(f);return this.#qn(m),this.#Hn(p(d[0],u[0],5),p(d[1],u[1],5),p(d[2],u[2],5),m),a.url=this.#jn(f),a.url}destroy(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.#On?.size||(this.#Rn?.parentNode.parentNode.remove(),this.#Rn=null,this.#Fn?.clear(),this.#Fn=null,this.#On?.clear(),this.#On=null,this.#_=0)}#Gn(t){const e=this.#Ln.createElementNS(ft,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),t.append(e)}#qn(t){const e=this.#Ln.createElementNS(ft,"feColorMatrix");e.setAttribute("type","matrix"),e.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),t.append(e)}#Un(t){const e=this.#Ln.createElementNS(ft,"filter");return e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("id",t),this.#$n.append(e),e}#Kn(t,e,n){const r=this.#Ln.createElementNS(ft,e);r.setAttribute("type","discrete"),r.setAttribute("tableValues",n),t.append(r)}#Hn(t,e,n,r){const i=this.#Ln.createElementNS(ft,"feComponentTransfer");r.append(i),this.#Kn(i,"feFuncR",t),this.#Kn(i,"feFuncG",e),this.#Kn(i,"feFuncB",n)}#Wn(t,e){const n=this.#Ln.createElementNS(ft,"feComponentTransfer");e.append(n),this.#Kn(n,"feFuncA",t)}#Vn(t){return this.#$n.style.color=t,Ct(getComputedStyle(this.#$n).getPropertyValue("color"))}}class Pe{constructor(t){let{baseUrl:e=null}=t;this.baseUrl=e}async fetch(t){let{filename:e}=t;if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");const n=`${this.baseUrl}${e}`;return this._fetch(n).catch(t=>{throw new Error(`Unable to load font data at: ${n}`)})}async _fetch(t){H("Abstract method `_fetch` called.")}}class Ie extends Pe{async _fetch(t){const e=await gt(t,"arraybuffer");return new Uint8Array(e)}}class Fe{constructor(t){let{baseUrl:e=null}=t;this.baseUrl=e}async fetch(t){let{filename:e}=t;if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!e)throw new Error("Wasm filename must be specified.");const n=`${this.baseUrl}${e}`;return this._fetch(n).catch(t=>{throw new Error(`Unable to load wasm data at: ${n}`)})}async _fetch(t){H("Abstract method `_fetch` called.")}}class Re extends Fe{async _fetch(t){const e=await gt(t,"arraybuffer");return new Uint8Array(e)}}async function Ne(t){const e=process.getBuiltinModule("fs"),n=await e.promises.readFile(t);return new Uint8Array(n)}i&&U("Please use the `legacy` build in Node.js environments.");class Le extends De{}class Oe extends ke{_createCanvas(t,e){return process.getBuiltinModule("module").createRequire("file:///home/runner/work/react-file/react-file/node_modules/pdfjs-dist/build/pdf.mjs")("@napi-rs/canvas").createCanvas(t,e)}}class Be extends Se{async _fetch(t){return Ne(t)}}class $e extends Pe{async _fetch(t){return Ne(t)}}class ze extends Fe{async _fetch(t){return Ne(t)}}const je="__forcedDependency",{floor:Ue,ceil:He}=Math;function Ve(t,e,n,r,i,s){t[4*e+0]=Math.min(t[4*e+0],n),t[4*e+1]=Math.min(t[4*e+1],r),t[4*e+2]=Math.max(t[4*e+2],i),t[4*e+3]=Math.max(t[4*e+3],s)}const qe=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0];class We{#Xn;#Yn;constructor(t,e){this.#Xn=t,this.#Yn=e}get length(){return this.#Xn.length}isEmpty(t){return this.#Xn[t]===qe}minX(t){return this.#Yn[4*t+0]/256}minY(t){return this.#Yn[4*t+1]/256}maxX(t){return(this.#Yn[4*t+2]+1)/256}maxY(t){return(this.#Yn[4*t+3]+1)/256}}const Ge=(t,e)=>{if(!t)return;let n=t.get(e);return n||(n={dependencies:new Set,isRenderingOperation:!1},t.set(e,n)),n};class Ke{#Zn={__proto__:null};#Jn=(()=>({__proto__:null,transform:[],moveText:[],sameLineText:[],[je]:[]}))();#Qn=(()=>new Map)();#tr=[];#er=[];#nr=[[1,0,0,1,0,0]];#rr=[-1/0,-1/0,1/0,1/0];#ir=(()=>new Float64Array([1/0,1/0,-1/0,-1/0]))();#sr=-1;#ar=(()=>new Set)();#or=(()=>new Map)();#lr=(()=>new Map)();#cr;#hr;#dr;#Xn;#ur;constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.#cr=t.width,this.#hr=t.height,this.#pr(e),n&&(this.#ur=new Map)}growOperationsCount(t){t>=this.#Xn.length&&this.#pr(t,this.#Xn)}#pr(t,e){const n=new ArrayBuffer(4*t);this.#dr=new Uint8ClampedArray(n),this.#Xn=new Uint32Array(n),e&&e.length>0?(this.#Xn.set(e),this.#Xn.fill(qe,e.length)):this.#Xn.fill(qe)}save(t){return this.#Zn={__proto__:this.#Zn},this.#Jn={__proto__:this.#Jn,transform:{__proto__:this.#Jn.transform},moveText:{__proto__:this.#Jn.moveText},sameLineText:{__proto__:this.#Jn.sameLineText},[je]:{__proto__:this.#Jn[je]}},this.#rr={__proto__:this.#rr},this.#tr.push(t),this}restore(t){const e=Object.getPrototypeOf(this.#Zn);if(null===e)return this;this.#Zn=e,this.#Jn=Object.getPrototypeOf(this.#Jn),this.#rr=Object.getPrototypeOf(this.#rr);const n=this.#tr.pop();return void 0!==n&&(Ge(this.#ur,t)?.dependencies.add(n),this.#Xn[t]=this.#Xn[n]),this}recordOpenMarker(t){return this.#tr.push(t),this}getOpenMarker(){return 0===this.#tr.length?null:this.#tr.at(-1)}recordCloseMarker(t){const e=this.#tr.pop();return void 0!==e&&(Ge(this.#ur,t)?.dependencies.add(e),this.#Xn[t]=this.#Xn[e]),this}beginMarkedContent(t){return this.#er.push(t),this}endMarkedContent(t){const e=this.#er.pop();return void 0!==e&&(Ge(this.#ur,t)?.dependencies.add(e),this.#Xn[t]=this.#Xn[e]),this}pushBaseTransform(t){return this.#nr.push(st.multiplyByDOMMatrix(this.#nr.at(-1),t.getTransform())),this}popBaseTransform(){return this.#nr.length>1&&this.#nr.pop(),this}recordSimpleData(t,e){return this.#Zn[t]=e,this}recordIncrementalData(t,e){return this.#Jn[t].push(e),this}resetIncrementalData(t,e){return this.#Jn[t].length=0,this}recordNamedData(t,e){return this.#Qn.set(t,e),this}recordSimpleDataFromNamed(t,e,n){this.#Zn[t]=this.#Qn.get(e)??n}recordFutureForcedDependency(t,e){return this.recordIncrementalData(je,e),this}inheritSimpleDataAsFutureForcedDependencies(t){for(const e of t)e in this.#Zn&&this.recordFutureForcedDependency(e,this.#Zn[e]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(const t of this.#ar)this.recordFutureForcedDependency(je,t);return this}resetBBox(t){return this.#sr!==t&&(this.#sr=t,this.#ir[0]=1/0,this.#ir[1]=1/0,this.#ir[2]=-1/0,this.#ir[3]=-1/0),this}recordClipBox(t,e,n,r,i,s){const a=st.multiplyByDOMMatrix(this.#nr.at(-1),e.getTransform()),o=[1/0,1/0,-1/0,-1/0];st.axialAlignedBoundingBox([n,i,r,s],a,o);const l=st.intersect(this.#rr,o);return l?(this.#rr[0]=l[0],this.#rr[1]=l[1],this.#rr[2]=l[2],this.#rr[3]=l[3]):(this.#rr[0]=this.#rr[1]=1/0,this.#rr[2]=this.#rr[3]=-1/0),this}recordBBox(t,e,n,r,i,s){const a=this.#rr;if(a[0]===1/0)return this;const o=st.multiplyByDOMMatrix(this.#nr.at(-1),e.getTransform());if(a[0]===-1/0)return st.axialAlignedBoundingBox([n,i,r,s],o,this.#ir),this;const l=[1/0,1/0,-1/0,-1/0];return st.axialAlignedBoundingBox([n,i,r,s],o,l),this.#ir[0]=Math.min(this.#ir[0],Math.max(l[0],a[0])),this.#ir[1]=Math.min(this.#ir[1],Math.max(l[1],a[1])),this.#ir[2]=Math.max(this.#ir[2],Math.min(l[2],a[2])),this.#ir[3]=Math.max(this.#ir[3],Math.min(l[3],a[3])),this}recordCharacterBBox(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;const o=n.bbox;let l,c;if(o&&(l=o[2]!==o[0]&&o[3]!==o[1]&&this.#lr.get(n),!1!==l&&(c=[0,0,0,0],st.axialAlignedBoundingBox(o,n.fontMatrix,c),1===r&&0===i&&0===s||st.scaleMinMax([r,0,0,-r,i,s],c),l)))return this.recordBBox(t,e,c[0],c[2],c[1],c[3]);if(!a)return this.recordFullPageBBox(t);const h=a();return o&&c&&void 0===l&&(l=c[0]<=i-h.actualBoundingBoxLeft&&c[2]>=i+h.actualBoundingBoxRight&&c[1]<=s-h.actualBoundingBoxAscent&&c[3]>=s+h.actualBoundingBoxDescent,this.#lr.set(n,l),l)?this.recordBBox(t,e,c[0],c[2],c[1],c[3]):this.recordBBox(t,e,i-h.actualBoundingBoxLeft,i+h.actualBoundingBoxRight,s-h.actualBoundingBoxAscent,s+h.actualBoundingBoxDescent)}recordFullPageBBox(t){return this.#ir[0]=Math.max(0,this.#rr[0]),this.#ir[1]=Math.max(0,this.#rr[1]),this.#ir[2]=Math.min(this.#cr,this.#rr[2]),this.#ir[3]=Math.min(this.#hr,this.#rr[3]),this}getSimpleIndex(t){return this.#Zn[t]}recordDependencies(t,e){const n=this.#ar,r=this.#Zn,i=this.#Jn;for(const s of e)s in this.#Zn?n.add(r[s]):s in i&&i[s].forEach(n.add,n);return this}recordNamedDependency(t,e){return this.#Qn.has(e)&&this.#ar.add(this.#Qn.get(e)),this}recordOperation(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.recordDependencies(t,[je]),this.#ur){const e=Ge(this.#ur,t),{dependencies:n}=e;this.#ar.forEach(n.add,n),this.#tr.forEach(n.add,n),this.#er.forEach(n.add,n),n.delete(t),e.isRenderingOperation=!0}if(this.#sr===t){const n=Ue(256*this.#ir[0]/this.#cr),r=Ue(256*this.#ir[1]/this.#hr),i=He(256*this.#ir[2]/this.#cr),s=He(256*this.#ir[3]/this.#hr);Ve(this.#dr,t,n,r,i,s);for(const e of this.#ar)e!==t&&Ve(this.#dr,e,n,r,i,s);for(const e of this.#tr)e!==t&&Ve(this.#dr,e,n,r,i,s);for(const e of this.#er)e!==t&&Ve(this.#dr,e,n,r,i,s);e||(this.#ar.clear(),this.#sr=-1)}return this}recordShowTextOperation(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Array.from(this.#ar);this.recordOperation(t,e),this.recordIncrementalData("sameLineText",t);for(const r of n)this.recordIncrementalData("sameLineText",r);return this}bboxToClipBoxDropOperation(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.#sr===t&&(this.#sr=-1,this.#rr[0]=Math.max(this.#rr[0],this.#ir[0]),this.#rr[1]=Math.max(this.#rr[1],this.#ir[1]),this.#rr[2]=Math.min(this.#rr[2],this.#ir[2]),this.#rr[3]=Math.min(this.#rr[3],this.#ir[3]),e||this.#ar.clear()),this}_takePendingDependencies(){const t=this.#ar;return this.#ar=new Set,t}_extractOperation(t){const e=this.#or.get(t);return this.#or.delete(t),e}_pushPendingDependencies(t){for(const e of t)this.#ar.add(e)}take(){return this.#lr.clear(),new We(this.#Xn,this.#dr)}takeDebugMetadata(){return this.#ur}}class Xe{#fr;#mr;#gr;#vr=0;#br=0;constructor(t,e,n){if(t instanceof Xe&&t.#gr===!!n)return t;this.#fr=t,this.#mr=e,this.#gr=!!n}growOperationsCount(){throw new Error("Unreachable")}save(t){return this.#br++,this.#fr.save(this.#mr),this}restore(t){return this.#br>0&&(this.#fr.restore(this.#mr),this.#br--),this}recordOpenMarker(t){return this.#vr++,this}getOpenMarker(){return this.#vr>0?this.#mr:this.#fr.getOpenMarker()}recordCloseMarker(t){return this.#vr--,this}beginMarkedContent(t){return this}endMarkedContent(t){return this}pushBaseTransform(t){return this.#fr.pushBaseTransform(t),this}popBaseTransform(){return this.#fr.popBaseTransform(),this}recordSimpleData(t,e){return this.#fr.recordSimpleData(t,this.#mr),this}recordIncrementalData(t,e){return this.#fr.recordIncrementalData(t,this.#mr),this}resetIncrementalData(t,e){return this.#fr.resetIncrementalData(t,this.#mr),this}recordNamedData(t,e){return this}recordSimpleDataFromNamed(t,e,n){return this.#fr.recordSimpleDataFromNamed(t,e,this.#mr),this}recordFutureForcedDependency(t,e){return this.#fr.recordFutureForcedDependency(t,this.#mr),this}inheritSimpleDataAsFutureForcedDependencies(t){return this.#fr.inheritSimpleDataAsFutureForcedDependencies(t),this}inheritPendingDependenciesAsFutureForcedDependencies(){return this.#fr.inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(t){return this.#gr||this.#fr.resetBBox(this.#mr),this}recordClipBox(t,e,n,r,i,s){return this.#gr||this.#fr.recordClipBox(this.#mr,e,n,r,i,s),this}recordBBox(t,e,n,r,i,s){return this.#gr||this.#fr.recordBBox(this.#mr,e,n,r,i,s),this}recordCharacterBBox(t,e,n,r,i,s,a){return this.#gr||this.#fr.recordCharacterBBox(this.#mr,e,n,r,i,s,a),this}recordFullPageBBox(t){return this.#gr||this.#fr.recordFullPageBBox(this.#mr),this}getSimpleIndex(t){return this.#fr.getSimpleIndex(t)}recordDependencies(t,e){return this.#fr.recordDependencies(this.#mr,e),this}recordNamedDependency(t,e){return this.#fr.recordNamedDependency(this.#mr,e),this}recordOperation(t){return this.#fr.recordOperation(this.#mr,!0),this}recordShowTextOperation(t){return this.#fr.recordShowTextOperation(this.#mr,!0),this}bboxToClipBoxDropOperation(t){return this.#gr||this.#fr.bboxToClipBoxDropOperation(this.#mr,!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}}const Ye=["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],Ze=["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],Je=["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],Qe=["filter","fillColor","fillAlpha"],tn=["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],en=["transform"],nn=["transform","fillColor"],rn="Fill",sn="Stroke",an="Shading";function on(t,e){if(!e)return;const n=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],n,r),t.clip(i)}class ln{isModifyingCurrentTransform(){return!1}getPattern(){H("Abstract method `getPattern` called.")}}class cn extends ln{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let e;"axial"===this._type?e=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(e=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)e.addColorStop(n[0],n[1]);return e}getPattern(t,e,n,r){let i;if(r===sn||r===rn){const s=e.current.getClippedPathBoundingBox(r,St(t))||[0,0,0,0],a=Math.ceil(s[2]-s[0])||1,o=Math.ceil(s[3]-s[1])||1,l=e.cachedCanvases.getCanvas("pattern",a,o),c=l.context;c.clearRect(0,0,c.canvas.width,c.canvas.height),c.beginPath(),c.rect(0,0,c.canvas.width,c.canvas.height),c.translate(-s[0],-s[1]),n=st.transform(n,[1,0,0,1,s[0],s[1]]),c.transform(...e.baseTransform),this.matrix&&c.transform(...this.matrix),on(c,this._bbox),c.fillStyle=this._createGradient(c),c.fill(),i=t.createPattern(l.canvas,"no-repeat");const h=new DOMMatrix(n);i.setTransform(h)}else on(t,this._bbox),i=this._createGradient(t);return i}}function hn(t,e,n,r,i,s,a,o){const l=e.coords,c=e.colors,h=t.data,d=4*t.width;let u;l[n+1]>l[r+1]&&(u=n,n=r,r=u,u=s,s=a,a=u),l[r+1]>l[i+1]&&(u=r,r=i,i=u,u=a,a=o,o=u),l[n+1]>l[r+1]&&(u=n,n=r,r=u,u=s,s=a,a=u);const p=(l[n]+e.offsetX)*e.scaleX,f=(l[n+1]+e.offsetY)*e.scaleY,m=(l[r]+e.offsetX)*e.scaleX,g=(l[r+1]+e.offsetY)*e.scaleY,v=(l[i]+e.offsetX)*e.scaleX,b=(l[i+1]+e.offsetY)*e.scaleY;if(f>=b)return;const y=c[s],w=c[s+1],_=c[s+2],A=c[a],x=c[a+1],E=c[a+2],k=c[o],C=c[o+1],S=c[o+2],T=Math.round(f),D=Math.round(b);let M,P,I,F,R,N,L,O;for(let B=T;B<=D;B++){if(B<g){const t=B<f?0:(f-B)/(f-g);M=p-(p-m)*t,P=y-(y-A)*t,I=w-(w-x)*t,F=_-(_-E)*t}else{let t;t=B>b?1:g===b?0:(g-B)/(g-b),M=m-(m-v)*t,P=A-(A-k)*t,I=x-(x-C)*t,F=E-(E-S)*t}let t;t=B<f?0:B>b?1:(f-B)/(f-b),R=p-(p-v)*t,N=y-(y-k)*t,L=w-(w-C)*t,O=_-(_-S)*t;const e=Math.round(Math.min(M,R)),n=Math.round(Math.max(M,R));let r=d*B+4*e;for(let i=e;i<=n;i++)t=(M-i)/(M-R),t<0?t=0:t>1&&(t=1),h[r++]=P-(P-N)*t|0,h[r++]=I-(I-L)*t|0,h[r++]=F-(F-O)*t|0,h[r++]=255}}function dn(t,e,n){const r=e.coords,i=e.colors;let s,a;switch(e.type){case"lattice":const o=e.verticesPerRow,l=Math.floor(r.length/o)-1,c=o-1;for(s=0;s<l;s++){let e=s*o;for(let s=0;s<c;s++,e++)hn(t,n,r[e],r[e+1],r[e+o],i[e],i[e+1],i[e+o]),hn(t,n,r[e+o+1],r[e+1],r[e+o],i[e+o+1],i[e+1],i[e+o])}break;case"triangles":for(s=0,a=r.length;s<a;s+=3)hn(t,n,r[s],r[s+1],r[s+2],i[s],i[s+1],i[s+2]);break;default:throw new Error("illegal figure")}}class un extends ln{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[6],this._background=t[7],this.matrix=null}_createMeshCanvas(t,e,n){const r=Math.floor(this._bounds[0]),i=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-r,a=Math.ceil(this._bounds[3])-i,o=Math.min(Math.ceil(Math.abs(s*t[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(a*t[1]*1.1)),3e3),c=s/o,h=a/l,d={coords:this._coords,colors:this._colors,offsetX:-r,offsetY:-i,scaleX:1/c,scaleY:1/h},u=o+4,p=l+4,f=n.getCanvas("mesh",u,p),m=f.context,g=m.createImageData(o,l);if(e){const t=g.data;for(let n=0,r=t.length;n<r;n+=4)t[n]=e[0],t[n+1]=e[1],t[n+2]=e[2],t[n+3]=255}for(const v of this._figures)dn(g,v,d);m.putImageData(g,2,2);return{canvas:f.canvas,offsetX:r-2*c,offsetY:i-2*h,scaleX:c,scaleY:h}}isModifyingCurrentTransform(){return!0}getPattern(t,e,n,r){on(t,this._bbox);const i=new Float32Array(2);if(r===an)st.singularValueDecompose2dScale(St(t),i);else if(this.matrix){st.singularValueDecompose2dScale(this.matrix,i);const[t,n]=i;st.singularValueDecompose2dScale(e.baseTransform,i),i[0]*=t,i[1]*=n}else st.singularValueDecompose2dScale(e.baseTransform,i);const s=this._createMeshCanvas(i,r===an?null:this._background,e.cachedCanvases);return r!==an&&(t.setTransform(...e.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(s.offsetX,s.offsetY),t.scale(s.scaleX,s.scaleY),t.createPattern(s.canvas,"no-repeat")}}class pn extends ln{getPattern(){return"hotpink"}}const fn=1,mn=2;class gn{static MAX_PATTERN_SIZE=3e3;constructor(t,e,n,r){this.color=t[1],this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.ctx=e,this.canvasGraphicsFactory=n,this.baseTransform=r}createPatternCanvas(t,e){const{bbox:n,operatorList:r,paintType:i,tilingType:s,color:a,canvasGraphicsFactory:o}=this;let{xstep:l,ystep:c}=this;l=Math.abs(l),c=Math.abs(c),j("TilingType: "+s);const h=n[0],d=n[1],u=n[2],p=n[3],f=u-h,m=p-d,g=new Float32Array(2);st.singularValueDecompose2dScale(this.matrix,g);const[v,b]=g;st.singularValueDecompose2dScale(this.baseTransform,g);const y=v*g[0],w=b*g[1];let _=f,A=m,x=!1,E=!1;const k=Math.ceil(l*y),C=Math.ceil(c*w);k>=Math.ceil(f*y)?_=l:x=!0,C>=Math.ceil(m*w)?A=c:E=!0;const S=this.getSizeAndScale(_,this.ctx.canvas.width,y),T=this.getSizeAndScale(A,this.ctx.canvas.height,w),D=t.cachedCanvases.getCanvas("pattern",S.size,T.size),M=D.context,P=o.createCanvasGraphics(M,e);if(P.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(P,i,a),M.translate(-S.scale*h,-T.scale*d),P.transform(0,S.scale,0,0,T.scale,0,0),M.save(),P.dependencyTracker?.save(),this.clipBbox(P,h,d,u,p),P.baseTransform=St(P.ctx),P.executeOperatorList(r),P.endDrawing(),P.dependencyTracker?.restore(),M.restore(),x||E){const e=D.canvas;x&&(_=l),E&&(A=c);const n=this.getSizeAndScale(_,this.ctx.canvas.width,y),r=this.getSizeAndScale(A,this.ctx.canvas.height,w),i=n.size,s=r.size,a=t.cachedCanvases.getCanvas("pattern-workaround",i,s),o=a.context,u=x?Math.floor(f/l):0,p=E?Math.floor(m/c):0;for(let t=0;t<=u;t++)for(let n=0;n<=p;n++)o.drawImage(e,i*t,s*n,i,s,0,0,i,s);return{canvas:a.canvas,scaleX:n.scale,scaleY:r.scale,offsetX:h,offsetY:d}}return{canvas:D.canvas,scaleX:S.scale,scaleY:T.scale,offsetX:h,offsetY:d}}getSizeAndScale(t,e,n){const r=Math.max(gn.MAX_PATTERN_SIZE,e);let i=Math.ceil(t*n);return i>=r?i=r:n=i/t,{scale:n,size:i}}clipBbox(t,e,n,r,i){const s=r-e,a=i-n;t.ctx.rect(e,n,s,a),st.axialAlignedBoundingBox([e,n,r,i],St(t.ctx),t.current.minMax),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,e,n){const r=t.ctx,i=t.current;switch(e){case fn:const{fillStyle:t,strokeStyle:s}=this.ctx;r.fillStyle=i.fillColor=t,r.strokeStyle=i.strokeColor=s;break;case mn:r.fillStyle=r.strokeStyle=n,i.fillColor=i.strokeColor=n;break;default:throw new Q(`Unsupported paint type: ${e}`)}}isModifyingCurrentTransform(){return!1}getPattern(t,e,n,r,i){let s=n;r!==an&&(s=st.transform(s,e.baseTransform),this.matrix&&(s=st.transform(s,this.matrix)));const a=this.createPatternCanvas(e,i);let o=new DOMMatrix(s);o=o.translate(a.offsetX,a.offsetY),o=o.scale(1/a.scaleX,1/a.scaleY);const l=t.createPattern(a.canvas,"repeat");return l.setTransform(o),l}}function vn(t){let{src:e,srcPos:n=0,dest:r,width:i,height:s,nonBlackColor:a=4294967295,inverseDecode:o=!1}=t;const l=rt.isLittleEndian?4278190080:255,[c,h]=o?[a,l]:[l,a],d=i>>3,u=7&i,p=e.length;r=new Uint32Array(r.buffer);let f=0;for(let m=0;m<s;m++){for(const i=n+d;n<i;n++){const t=n<p?e[n]:255;r[f++]=128&t?h:c,r[f++]=64&t?h:c,r[f++]=32&t?h:c,r[f++]=16&t?h:c,r[f++]=8&t?h:c,r[f++]=4&t?h:c,r[f++]=2&t?h:c,r[f++]=1&t?h:c}if(0===u)continue;const t=n<p?e[n++]:255;for(let e=0;e<u;e++)r[f++]=t&1<<7-e?h:c}return{srcPos:n,destPos:f}}const bn=16,yn=new DOMMatrix,wn=new Float32Array(2),_n=new Float32Array([1/0,1/0,-1/0,-1/0]);class An{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,e,n){let r;return void 0!==this.cache[t]?(r=this.cache[t],this.canvasFactory.reset(r,e,n)):(r=this.canvasFactory.create(e,n),this.cache[t]=r),r}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function xn(t,e,n,r,i,s,a,o,l,c){const[h,d,u,p,f,m]=St(t);if(0===d&&0===u){const g=a*h+f,v=Math.round(g),b=o*p+m,y=Math.round(b),w=(a+l)*h+f,_=Math.abs(Math.round(w)-v)||1,A=(o+c)*p+m,x=Math.abs(Math.round(A)-y)||1;return t.setTransform(Math.sign(h),0,0,Math.sign(p),v,y),t.drawImage(e,n,r,i,s,0,0,_,x),t.setTransform(h,d,u,p,f,m),[_,x]}if(0===h&&0===p){const g=o*u+f,v=Math.round(g),b=a*d+m,y=Math.round(b),w=(o+c)*u+f,_=Math.abs(Math.round(w)-v)||1,A=(a+l)*d+m,x=Math.abs(Math.round(A)-y)||1;return t.setTransform(0,Math.sign(d),Math.sign(u),0,v,y),t.drawImage(e,n,r,i,s,0,0,x,_),t.setTransform(h,d,u,p,f,m),[x,_]}t.drawImage(e,n,r,i,s,a,o,l,c);return[Math.hypot(h,d)*l,Math.hypot(u,p)*c]}class En{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=(()=>s)();leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=(()=>y)();textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(t,e,n){n?.(this),this.clipBox=new Float32Array([0,0,t,e]),this.minMax=_n.slice()}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t.minMax=this.minMax.slice(),t}getPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rn,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.minMax.slice();if(t===sn){e||H("Stroke bounding box must include transform."),st.singularValueDecompose2dScale(e,wn);const t=wn[0]*this.lineWidth/2,r=wn[1]*this.lineWidth/2;n[0]-=t,n[1]-=r,n[2]+=t,n[3]+=r}return n}updateClipFromPath(){const t=st.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(t){this.clipBox.set(t,0),this.minMax.set(_n,0)}getClippedPathBoundingBox(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rn,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return st.intersect(this.clipBox,this.getPathBoundingBox(t,e))}}function kn(t,e){if(e instanceof ImageData)return void t.putImageData(e,0,0);const n=e.height,r=e.width,i=n%bn,s=(n-i)/bn,a=0===i?s:s+1,o=t.createImageData(r,bn);let l,c=0;const h=e.data,d=o.data;let u,p,f,m;if(e.kind===k.GRAYSCALE_1BPP){const e=h.byteLength,n=new Uint32Array(d.buffer,0,d.byteLength>>2),m=n.length,g=r+7>>3,v=4294967295,b=rt.isLittleEndian?4278190080:255;for(u=0;u<a;u++){for(f=u<s?bn:i,l=0,p=0;p<f;p++){const t=e-c;let i=0;const s=t>g?r:8*t-7,a=-8&s;let o=0,d=0;for(;i<a;i+=8)d=h[c++],n[l++]=128&d?v:b,n[l++]=64&d?v:b,n[l++]=32&d?v:b,n[l++]=16&d?v:b,n[l++]=8&d?v:b,n[l++]=4&d?v:b,n[l++]=2&d?v:b,n[l++]=1&d?v:b;for(;i<s;i++)0===o&&(d=h[c++],o=128),n[l++]=d&o?v:b,o>>=1}for(;l<m;)n[l++]=0;t.putImageData(o,0,u*bn)}}else if(e.kind===k.RGBA_32BPP){for(p=0,m=r*bn*4,u=0;u<s;u++)d.set(h.subarray(c,c+m)),c+=m,t.putImageData(o,0,p),p+=bn;u<a&&(m=r*i*4,d.set(h.subarray(c,c+m)),t.putImageData(o,0,p))}else{if(e.kind!==k.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);for(f=bn,m=r*f,u=0;u<a;u++){for(u>=s&&(f=i,m=r*f),l=0,p=m;p--;)d[l++]=h[c++],d[l++]=h[c++],d[l++]=h[c++],d[l++]=255;t.putImageData(o,0,u*bn)}}}function Cn(t,e){if(e.bitmap)return void t.drawImage(e.bitmap,0,0);const n=e.height,r=e.width,i=n%bn,s=(n-i)/bn,a=0===i?s:s+1,o=t.createImageData(r,bn);let l=0;const c=e.data,h=o.data;for(let d=0;d<a;d++){const e=d<s?bn:i;({srcPos:l}=vn({src:c,srcPos:l,dest:h,width:r,height:e,nonBlackColor:0})),t.putImageData(o,0,d*bn)}}function Sn(t,e){const n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of n)void 0!==t[r]&&(e[r]=t[r]);void 0!==t.setLineDash&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function Tn(t){t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",void 0!==t.setLineDash&&(t.setLineDash([]),t.lineDashOffset=0);const{filter:e}=t;"none"!==e&&""!==e&&(t.filter="none")}function Dn(t,e){if(e)return!0;st.singularValueDecompose2dScale(t,wn);const n=Math.fround(Mt.pixelRatio*mt.PDF_TO_CSS_UNITS);return wn[0]<=n&&wn[1]<=n}const Mn=["butt","round","square"],Pn=["miter","round","bevel"],In={},Fn={};class Rn{constructor(t,e,n,r,i,s,a,o,l){let{optionalContentConfig:c,markedContentStack:h=null}=s;this.ctx=t,this.current=new En(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=n,this.canvasFactory=r,this.filterFactory=i,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=h||[],this.optionalContentConfig=c,this.cachedCanvases=new An(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=a,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=o,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=l??null}getObject(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return"string"===typeof e?(this.dependencyTracker?.recordNamedDependency(t,e),e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e)):n}beginDrawing(t){let{transform:e,viewport:n,transparency:r=!1,background:i=null}=t;const s=this.ctx.canvas.width,a=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,s,a),this.ctx.fillStyle=o,r){const t=this.cachedCanvases.getCanvas("transparent",s,a);this.compositeCtx=this.ctx,this.transparentCanvas=t.canvas,this.ctx=t.context,this.ctx.save(),this.ctx.transform(...St(this.compositeCtx))}this.ctx.save(),Tn(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...n.transform),this.viewportScale=n.scale,this.baseTransform=St(this.ctx)}executeOperatorList(t,e,n,r,i){const s=t.argsArray,a=t.fnArray;let o=e||0;const l=s.length;if(l===o)return o;const c=l-o>10&&"function"===typeof n,h=c?Date.now()+15:0;let d=0;const u=this.commonObjs,p=this.objs;let f,m;for(;;){if(void 0!==r&&o===r.nextBreakPoint)return r.breakIt(o,n),o;if(!i||i(o))if(f=a[o],m=s[o]??null,f!==F.dependency)null===m?this[f](o):this[f](o,...m);else for(const t of m){this.dependencyTracker?.recordNamedData(t,o);const e=t.startsWith("g_")?u:p;if(!e.has(t))return e.get(t,n),o}if(o++,o===l)return o;if(c&&++d>10){if(Date.now()>h)return n(),o;d=0}}}#yr(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#yr(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const e of t.values())"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&(e.width=e.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#wr()}#wr(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){const e=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=e}}}_scaleImage(t,e){const n=t.width??t.displayWidth,r=t.height??t.displayHeight;let i,s,a=Math.max(Math.hypot(e[0],e[1]),1),o=Math.max(Math.hypot(e[2],e[3]),1),l=n,c=r,h="prescale1";for(;a>2&&l>1||o>2&&c>1;){let e=l,n=c;a>2&&l>1&&(e=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l/2),a/=l/e),o>2&&c>1&&(n=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c)/2,o/=c/n),i=this.cachedCanvases.getCanvas(h,e,n),s=i.context,s.clearRect(0,0,e,n),s.drawImage(t,0,0,l,c,0,0,e,n),t=i.canvas,l=e,c=n,h="prescale1"===h?"prescale2":"prescale1"}return{img:t,paintWidth:l,paintHeight:c}}_createMaskCanvas(t,e){const n=this.ctx,{width:r,height:i}=e,s=this.current.fillColor,a=this.current.patternFill,o=St(n);let l,c,h,d;if((e.bitmap||e.data)&&e.count>1){const n=e.bitmap||e.data.buffer;c=JSON.stringify(a?o:[o.slice(0,4),s]),l=this._cachedBitmapsMap.get(n),l||(l=new Map,this._cachedBitmapsMap.set(n,l));const r=l.get(c);if(r&&!a){const e=Math.round(Math.min(o[0],o[2])+o[4]),n=Math.round(Math.min(o[1],o[3])+o[5]);return this.dependencyTracker?.recordDependencies(t,nn),{canvas:r,offsetX:e,offsetY:n}}h=r}h||(d=this.cachedCanvases.getCanvas("maskCanvas",r,i),Cn(d.context,e));let u=st.transform(o,[1/r,0,0,-1/i,0,0]);u=st.transform(u,[1,0,0,1,0,-i]);const p=_n.slice();st.axialAlignedBoundingBox([0,0,r,i],u,p);const[f,m,g,v]=p,b=Math.round(g-f)||1,y=Math.round(v-m)||1,w=this.cachedCanvases.getCanvas("fillCanvas",b,y),_=w.context,A=f,x=m;_.translate(-A,-x),_.transform(...u),h||(h=this._scaleImage(d.canvas,Tt(_)),h=h.img,l&&a&&l.set(c,h)),_.imageSmoothingEnabled=Dn(St(_),e.interpolate),xn(_,h,0,0,h.width,h.height,0,0,r,i),_.globalCompositeOperation="source-in";const E=st.transform(Tt(_),[1,0,0,1,-A,-x]);return _.fillStyle=a?s.getPattern(n,this,E,rn,t):s,_.fillRect(0,0,r,i),l&&!a&&(this.cachedCanvases.delete("fillCanvas"),l.set(c,w.canvas)),this.dependencyTracker?.recordDependencies(t,nn),{canvas:w.canvas,offsetX:Math.round(A),offsetY:Math.round(x)}}setLineWidth(t,e){this.dependencyTracker?.recordSimpleData("lineWidth",t),e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(t,e){this.dependencyTracker?.recordSimpleData("lineCap",t),this.ctx.lineCap=Mn[e]}setLineJoin(t,e){this.dependencyTracker?.recordSimpleData("lineJoin",t),this.ctx.lineJoin=Pn[e]}setMiterLimit(t,e){this.dependencyTracker?.recordSimpleData("miterLimit",t),this.ctx.miterLimit=e}setDash(t,e,n){this.dependencyTracker?.recordSimpleData("dash",t);const r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=n)}setRenderingIntent(t,e){}setFlatness(t,e){}setGState(t,e){for(const[n,r]of e)switch(n){case"LW":this.setLineWidth(t,r);break;case"LC":this.setLineCap(t,r);break;case"LJ":this.setLineJoin(t,r);break;case"ML":this.setMiterLimit(t,r);break;case"D":this.setDash(t,r[0],r[1]);break;case"RI":this.setRenderingIntent(t,r);break;case"FL":this.setFlatness(t,r);break;case"Font":this.setFont(t,r[0],r[1]);break;case"CA":this.dependencyTracker?.recordSimpleData("strokeAlpha",t),this.current.strokeAlpha=r;break;case"ca":this.dependencyTracker?.recordSimpleData("fillAlpha",t),this.ctx.globalAlpha=this.current.fillAlpha=r;break;case"BM":this.dependencyTracker?.recordSimpleData("globalCompositeOperation",t),this.ctx.globalCompositeOperation=r;break;case"SMask":this.dependencyTracker?.recordSimpleData("SMask",t),this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.dependencyTracker?.recordSimpleData("filter",t),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(t){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,n=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(r,e,n);this.suspendedCtx=this.ctx;const s=this.ctx=i.context;s.setTransform(this.suspendedCtx.getTransform()),Sn(this.suspendedCtx,s),function(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(t,n){e.translate(t,n),this.__originalTranslate(t,n)},t.scale=function(t,n){e.scale(t,n),this.__originalScale(t,n)},t.transform=function(t,n,r,i,s,a){e.transform(t,n,r,i,s,a),this.__originalTransform(t,n,r,i,s,a)},t.setTransform=function(t,n,r,i,s,a){e.setTransform(t,n,r,i,s,a),this.__originalSetTransform(t,n,r,i,s,a)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(t){e.rotate(t),this.__originalRotate(t)},t.clip=function(t){e.clip(t),this.__originalClip(t)},t.moveTo=function(t,n){e.moveTo(t,n),this.__originalMoveTo(t,n)},t.lineTo=function(t,n){e.lineTo(t,n),this.__originalLineTo(t,n)},t.bezierCurveTo=function(t,n,r,i,s,a){e.bezierCurveTo(t,n,r,i,s,a),this.__originalBezierCurveTo(t,n,r,i,s,a)},t.rect=function(t,n,r,i){e.rect(t,n,r,i),this.__originalRect(t,n,r,i)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(s,this.suspendedCtx),this.setGState(t,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Sn(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const e=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,e,this.ctx,t),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(t,e,n,r){const i=r[0],s=r[1],a=r[2]-i,o=r[3]-s;0!==a&&0!==o&&(this.genericComposeSMask(e.context,n,a,o,e.subtype,e.backdrop,e.transferMap,i,s,e.offsetX,e.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(n.canvas,0,0),t.restore())}genericComposeSMask(t,e,n,r,i,s,a,o,l,c,h){let d=t.canvas,u=o-c,p=l-h;if(s)if(u<0||p<0||u+n>d.width||p+r>d.height){const t=this.cachedCanvases.getCanvas("maskExtension",n,r),e=t.context;e.drawImage(d,-u,-p),e.globalCompositeOperation="destination-atop",e.fillStyle=s,e.fillRect(0,0,n,r),e.globalCompositeOperation="source-over",d=t.canvas,u=p=0}else{t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const e=new Path2D;e.rect(u,p,n,r),t.clip(e),t.globalCompositeOperation="destination-atop",t.fillStyle=s,t.fillRect(u,p,n,r),t.restore()}e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0),"Alpha"===i&&a?e.filter=this.filterFactory.addAlphaFilter(a):"Luminosity"===i&&(e.filter=this.filterFactory.addLuminosityFilter(a));const f=new Path2D;f.rect(o,l,n,r),e.clip(f),e.globalCompositeOperation="destination-in",e.drawImage(d,u,p,n,r,o,l,n,r),e.restore()}save(t){this.inSMaskMode&&Sn(this.ctx,this.suspendedCtx),this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone(),this.dependencyTracker?.save(t)}restore(t){this.dependencyTracker?.restore(t),0!==this.stateStack.length?(this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&Sn(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null):this.inSMaskMode&&this.endSMaskMode()}transform(t,e,n,r,i,s,a){this.dependencyTracker?.recordIncrementalData("transform",t),this.ctx.transform(e,n,r,i,s,a),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,e,n,r){let[i]=n;if(!r)return i||=n[0]=new Path2D,void this[e](t,i);if(null!==this.dependencyTracker){const n=e===F.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(t).recordBBox(t,this.ctx,r[0]-n,r[2]+n,r[1]-n,r[3]+n).recordDependencies(t,["transform"])}if(!(i instanceof Path2D)){const t=n[0]=new Path2D;for(let e=0,n=i.length;e<n;)switch(i[e++]){case R:t.moveTo(i[e++],i[e++]);break;case N:t.lineTo(i[e++],i[e++]);break;case L:t.bezierCurveTo(i[e++],i[e++],i[e++],i[e++],i[e++],i[e++]);break;case O:t.closePath();break;default:U(`Unrecognized drawing path operator: ${i[e-1]}`)}i=t}st.axialAlignedBoundingBox(r,St(this.ctx),this.current.minMax),this[e](t,i),this._pathStartIdx=t}closePath(t){this.ctx.closePath()}stroke(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.ctx,i=this.current.strokeColor;if(r.globalAlpha=this.current.strokeAlpha,this.contentVisible)if("object"===typeof i&&i?.getPattern){const n=i.isModifyingCurrentTransform()?r.getTransform():null;if(r.save(),r.strokeStyle=i.getPattern(r,this,Tt(r),sn,t),n){const t=new Path2D;t.addPath(e,r.getTransform().invertSelf().multiplySelf(n)),e=t}this.rescaleAndStroke(e,!1),r.restore()}else this.rescaleAndStroke(e,!0);this.dependencyTracker?.recordDependencies(t,Ye),n&&this.consumePath(t,e,this.current.getClippedPathBoundingBox(sn,St(this.ctx))),r.globalAlpha=this.current.fillAlpha}closeStroke(t,e){this.stroke(t,e)}fill(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.ctx,i=this.current.fillColor;let s=!1;if(this.current.patternFill){const n=i.isModifyingCurrentTransform()?r.getTransform():null;if(this.dependencyTracker?.save(t),r.save(),r.fillStyle=i.getPattern(r,this,Tt(r),rn,t),n){const t=new Path2D;t.addPath(e,r.getTransform().invertSelf().multiplySelf(n)),e=t}s=!0}const a=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==a&&(this.pendingEOFill?(r.fill(e,"evenodd"),this.pendingEOFill=!1):r.fill(e)),this.dependencyTracker?.recordDependencies(t,Ze),s&&(r.restore(),this.dependencyTracker?.restore(t)),n&&this.consumePath(t,e,a)}eoFill(t,e){this.pendingEOFill=!0,this.fill(t,e)}fillStroke(t,e){this.fill(t,e,!1),this.stroke(t,e,!1),this.consumePath(t,e)}eoFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}closeFillStroke(t,e){this.fillStroke(t,e)}closeEOFillStroke(t,e){this.pendingEOFill=!0,this.fillStroke(t,e)}endPath(t,e){this.consumePath(t,e)}rawFillPath(t,e){this.ctx.fill(e),this.dependencyTracker?.recordDependencies(t,Qe).recordOperation(t)}clip(t){this.dependencyTracker?.recordFutureForcedDependency("clipMode",t),this.pendingClip=In}eoClip(t){this.dependencyTracker?.recordFutureForcedDependency("clipMode",t),this.pendingClip=Fn}beginText(t){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.dependencyTracker?.recordOpenMarker(t).resetIncrementalData("sameLineText").resetIncrementalData("moveText",t)}endText(t){const e=this.pendingTextPaths,n=this.ctx;if(this.dependencyTracker){const{dependencyTracker:n}=this;void 0!==e&&n.recordFutureForcedDependency("textClip",n.getOpenMarker()).recordFutureForcedDependency("textClip",t),n.recordCloseMarker(t)}if(void 0!==e){const t=new Path2D,r=n.getTransform().invertSelf();for(const{transform:n,x:i,y:s,fontSize:a,path:o}of e)o&&t.addPath(o,new DOMMatrix(n).preMultiplySelf(r).translate(i,s).scale(a,-a));n.clip(t)}delete this.pendingTextPaths}setCharSpacing(t,e){this.dependencyTracker?.recordSimpleData("charSpacing",t),this.current.charSpacing=e}setWordSpacing(t,e){this.dependencyTracker?.recordSimpleData("wordSpacing",t),this.current.wordSpacing=e}setHScale(t,e){this.dependencyTracker?.recordSimpleData("hScale",t),this.current.textHScale=e/100}setLeading(t,e){this.dependencyTracker?.recordSimpleData("leading",t),this.current.leading=-e}setFont(t,e,n){this.dependencyTracker?.recordSimpleData("font",t).recordSimpleDataFromNamed("fontObj",e,t);const r=this.commonObjs.get(e),i=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(i.fontMatrix=r.fontMatrix||s,0!==i.fontMatrix[0]&&0!==i.fontMatrix[3]||U("Invalid font matrix for font "+e),n<0?(n=-n,i.fontDirection=-1):i.fontDirection=1,this.current.font=r,this.current.fontSize=n,r.isType3Font)return;const a=r.loadedName||"sans-serif",o=r.systemFontInfo?.css||`"${a}", ${r.fallbackName}`;let l="normal";r.black?l="900":r.bold&&(l="bold");const c=r.italic?"italic":"normal";let h=n;n<16?h=16:n>100&&(h=100),this.current.fontSizeScale=n/h,this.ctx.font=`${c} ${l} ${h}px ${o}`}setTextRenderingMode(t,e){this.dependencyTracker?.recordSimpleData("textRenderingMode",t),this.current.textRenderingMode=e}setTextRise(t,e){this.dependencyTracker?.recordSimpleData("textRise",t),this.current.textRise=e}moveText(t,e,n){this.dependencyTracker?.resetIncrementalData("sameLineText").recordIncrementalData("moveText",t),this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=n}setLeadingMoveText(t,e,n){this.setLeading(t,-n),this.moveText(t,e,n)}setTextMatrix(t,e){this.dependencyTracker?.recordSimpleData("textMatrix",t);const{current:n}=this;n.textMatrix=e,n.textMatrixScale=Math.hypot(e[0],e[1]),n.x=n.lineX=0,n.y=n.lineY=0}nextLine(t){this.moveText(t,0,this.current.leading),this.dependencyTracker?.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??t)}#_r(t,e,n){const r=new Path2D;return r.addPath(t,new DOMMatrix(n).invertSelf().multiplySelf(e)),r}paintChar(t,e,n,r,i,s){const a=this.ctx,o=this.current,l=o.font,c=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,d=c&x,u=!!(c&E),p=o.patternFill&&!l.missingFile,f=o.patternStroke&&!l.missingFile;let m;if((l.disableFontFace||u||p||f)&&!l.missingFile&&(m=l.getPathGenerator(this.commonObjs,e)),m&&(l.disableFontFace||p||f)){let e;if(a.save(),a.translate(n,r),a.scale(h,-h),this.dependencyTracker?.recordCharacterBBox(t,a,l),d===y||d===_)if(i){e=a.getTransform(),a.setTransform(...i);const t=this.#_r(m,e,i);a.fill(t)}else a.fill(m);if(d===w||d===_)if(s){e||=a.getTransform(),a.setTransform(...s);const{a:t,b:n,c:r,d:i}=e,o=st.inverseTransform(s),l=st.transform([t,n,r,i,0,0],o);st.singularValueDecompose2dScale(l,wn),a.lineWidth*=Math.max(wn[0],wn[1])/h,a.stroke(this.#_r(m,e,s))}else a.lineWidth/=h,a.stroke(m);a.restore()}else d!==y&&d!==_||(a.fillText(e,n,r),this.dependencyTracker?.recordCharacterBBox(t,a,l,h,n,r,()=>a.measureText(e))),d!==w&&d!==_||(this.dependencyTracker&&this.dependencyTracker?.recordCharacterBBox(t,a,l,h,n,r,()=>a.measureText(e)).recordDependencies(t,Ye),a.strokeText(e,n,r));if(u){(this.pendingTextPaths||=[]).push({transform:St(a),x:n,y:r,fontSize:h,path:m}),this.dependencyTracker?.recordCharacterBBox(t,a,l,h,n,r)}}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const e=t.getImageData(0,0,10,10).data;let n=!1;for(let r=3;r<e.length;r+=4)if(e[r]>0&&e[r]<255){n=!0;break}return G(this,"isFontSubpixelAAEnabled",n)}showText(t,e){this.dependencyTracker&&(this.dependencyTracker.recordDependencies(t,tn).resetBBox(t),this.current.textRenderingMode&E&&this.dependencyTracker.recordFutureForcedDependency("textClip",t).inheritPendingDependenciesAsFutureForcedDependencies());const n=this.current,r=n.font;if(r.isType3Font)return this.showType3Text(t,e),void this.dependencyTracker?.recordShowTextOperation(t);const i=n.fontSize;if(0===i)return void this.dependencyTracker?.recordOperation(t);const s=this.ctx,a=n.fontSizeScale,o=n.charSpacing,l=n.wordSpacing,c=n.fontDirection,h=n.textHScale*c,d=e.length,u=r.vertical,p=u?1:-1,f=r.defaultVMetrics,m=i*n.fontMatrix[0],g=n.textRenderingMode===y&&!r.disableFontFace&&!n.patternFill;let v,b;if(s.save(),n.textMatrix&&s.transform(...n.textMatrix),s.translate(n.x,n.y+n.textRise),c>0?s.scale(h,-1):s.scale(h,1),n.patternFill){s.save();const e=n.fillColor.getPattern(s,this,Tt(s),rn,t);v=St(s),s.restore(),s.fillStyle=e}if(n.patternStroke){s.save();const e=n.strokeColor.getPattern(s,this,Tt(s),sn,t);b=St(s),s.restore(),s.strokeStyle=e}let A=n.lineWidth;const k=n.textMatrixScale;if(0===k||0===A){const t=n.textRenderingMode&x;t!==w&&t!==_||(A=this.getSinglePixelWidth())}else A/=k;if(1!==a&&(s.scale(a,a),A/=a),s.lineWidth=A,r.isInvalidPDFjsFont){const r=[];let i=0;for(const t of e)r.push(t.unicode),i+=t.width;const a=r.join("");if(s.fillText(a,0,0),null!==this.dependencyTracker){const e=s.measureText(a);this.dependencyTracker.recordBBox(t,this.ctx,-e.actualBoundingBoxLeft,e.actualBoundingBoxRight,-e.actualBoundingBoxAscent,e.actualBoundingBoxDescent).recordShowTextOperation(t)}return n.x+=i*m*h,s.restore(),void this.compose()}let C,S=0;for(C=0;C<d;++C){const n=e[C];if("number"===typeof n){S+=p*n*i/1e3;continue}let h=!1;const d=(n.isSpace?l:0)+o,y=n.fontChar,w=n.accent;let _,A,x,E=n.width;if(u){const t=n.vmetric||f,e=-(n.vmetric?t[1]:.5*E)*m,r=t[2]*m;E=t?-t[0]:E,_=e/a,A=(S+r)/a}else _=S/a,A=0;if(r.remeasure&&E>0){x=s.measureText(y);const t=1e3*x.width/i*a;if(E<t&&this.isFontSubpixelAAEnabled){const e=E/t;h=!0,s.save(),s.scale(e,1),_/=e}else E!==t&&(_+=(E-t)/2e3*i/a)}if(this.contentVisible&&(n.isInFont||r.missingFile))if(g&&!w)s.fillText(y,_,A),this.dependencyTracker?.recordCharacterBBox(t,s,x?{bbox:null}:r,i/a,_,A,()=>x??s.measureText(y));else if(this.paintChar(t,y,_,A,v,b),w){const e=_+i*w.offset.x/a,n=A-i*w.offset.y/a;this.paintChar(t,w.fontChar,e,n,v,b)}S+=u?E*m-d*c:E*m+d*c,h&&s.restore()}u?n.y-=S:n.x+=S*h,s.restore(),this.compose(),this.dependencyTracker?.recordShowTextOperation(t)}showType3Text(t,e){const n=this.ctx,r=this.current,i=r.font,a=r.fontSize,o=r.fontDirection,l=i.vertical?1:-1,c=r.charSpacing,h=r.wordSpacing,d=r.textHScale*o,u=r.fontMatrix||s,p=e.length;let f,m,g,v;if(r.textRenderingMode===A||0===a)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,n.save(),r.textMatrix&&n.transform(...r.textMatrix),n.translate(r.x,r.y+r.textRise),n.scale(d,o);const b=this.dependencyTracker;for(this.dependencyTracker=b?new Xe(b,t):null,f=0;f<p;++f){if(m=e[f],"number"===typeof m){v=l*m*a/1e3,this.ctx.translate(v,0),r.x+=v*d;continue}const t=(m.isSpace?h:0)+c,s=i.charProcOperatorList[m.operatorListId];s?this.contentVisible&&(this.save(),n.scale(a,a),n.transform(...u),this.executeOperatorList(s),this.restore()):U(`Type3 character "${m.operatorListId}" is not available.`);const o=[m.width,0];st.applyTransform(o,u),g=o[0]*a+t,n.translate(g,0),r.x+=g*d}n.restore(),b&&(this.dependencyTracker=b)}setCharWidth(t,e,n){}setCharWidthAndBounds(t,e,n,r,i,s,a){const o=new Path2D;o.rect(r,i,s-r,a-i),this.ctx.clip(o),this.dependencyTracker?.recordBBox(t,this.ctx,r,s,i,a).recordClipBox(t,this.ctx,r,s,i,a),this.endPath(t)}getColorN_Pattern(t,e){let n;if("TilingPattern"===e[0]){const t=this.baseTransform||St(this.ctx),r={createCanvasGraphics:(t,e)=>new Rn(t,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new Xe(this.dependencyTracker,e,!0):null)};n=new gn(e,this.ctx,r,t)}else n=this._getPattern(t,e[1],e[2]);return n}setStrokeColorN(t){this.dependencyTracker?.recordSimpleData("strokeColor",t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.current.strokeColor=this.getColorN_Pattern(t,n),this.current.patternStroke=!0}setFillColorN(t){this.dependencyTracker?.recordSimpleData("fillColor",t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.current.fillColor=this.getColorN_Pattern(t,n),this.current.patternFill=!0}setStrokeRGBColor(t,e){this.dependencyTracker?.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor=e,this.current.patternStroke=!1}setStrokeTransparent(t){this.dependencyTracker?.recordSimpleData("strokeColor",t),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(t,e){this.dependencyTracker?.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor=e,this.current.patternFill=!1}setFillTransparent(t){this.dependencyTracker?.recordSimpleData("fillColor",t),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=function(t){switch(t[0]){case"RadialAxial":return new cn(t);case"Mesh":return new un(t);case"Dummy":return new pn}throw new Error(`Unknown IR type: ${t[0]}`)}(this.getObject(t,e)),this.cachedPatterns.set(e,n)),r&&(n.matrix=r),n}shadingFill(t,e){if(!this.contentVisible)return;const n=this.ctx;this.save(t);const r=this._getPattern(t,e);n.fillStyle=r.getPattern(n,this,Tt(n),an,t);const i=Tt(n);if(i){const{width:t,height:e}=n.canvas,r=_n.slice();st.axialAlignedBoundingBox([0,0,t,e],i,r);const[s,a,o,l]=r;this.ctx.fillRect(s,a,o-s,l-a)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.dependencyTracker?.resetBBox(t).recordFullPageBBox(t).recordDependencies(t,en).recordDependencies(t,Ze).recordOperation(t),this.compose(this.current.getClippedPathBoundingBox()),this.restore(t)}beginInlineImage(){H("Should not call beginInlineImage")}beginImageData(){H("Should not call beginImageData")}paintFormXObjectBegin(t,e,n){if(this.contentVisible&&(this.save(t),this.baseTransformStack.push(this.baseTransform),e&&this.transform(t,...e),this.baseTransform=St(this.ctx),n)){st.axialAlignedBoundingBox(n,this.baseTransform,this.current.minMax);const[e,r,i,s]=n,a=new Path2D;a.rect(e,r,i-e,s-r),this.ctx.clip(a),this.dependencyTracker?.recordClipBox(t,this.ctx,e,i,r,s),this.endPath(t)}}paintFormXObjectEnd(t){this.contentVisible&&(this.restore(t),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t,e){if(!this.contentVisible)return;this.save(t),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const n=this.ctx;e.isolated||j("TODO: Support non-isolated groups."),e.knockout&&U("Knockout groups not supported.");const r=St(n);if(e.matrix&&n.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=_n.slice();st.axialAlignedBoundingBox(e.bbox,St(n),i);const s=[0,0,n.canvas.width,n.canvas.height];i=st.intersect(i,s)||[0,0,0,0];const a=Math.floor(i[0]),o=Math.floor(i[1]),l=Math.max(Math.ceil(i[2])-a,1),c=Math.max(Math.ceil(i[3])-o,1);this.current.startNewPathAndClipBox([0,0,l,c]);let h="groupAt"+this.groupLevel;e.smask&&(h+="_smask_"+this.smaskCounter++%2);const d=this.cachedCanvases.getCanvas(h,l,c),u=d.context;u.translate(-a,-o),u.transform(...r);let p=new Path2D;const[f,m,g,v]=e.bbox;if(p.rect(f,m,g-f,v-m),e.matrix){const t=new Path2D;t.addPath(p,new DOMMatrix(e.matrix)),p=t}u.clip(p),e.smask&&this.smaskStack.push({canvas:d.canvas,context:u,offsetX:a,offsetY:o,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}),e.smask&&!this.dependencyTracker||(n.setTransform(1,0,0,1,0,0),n.translate(a,o),n.save()),Sn(n,u),this.ctx=u,this.dependencyTracker?.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(n),this.setGState(t,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(n),this.groupLevel++}endGroup(t,e){if(!this.contentVisible)return;this.groupLevel--;const n=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,this.dependencyTracker?.popBaseTransform(),e.smask)this.tempSMask=this.smaskStack.pop(),this.restore(t),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();const e=St(this.ctx);this.restore(t),this.ctx.save(),this.ctx.setTransform(...e);const r=_n.slice();st.axialAlignedBoundingBox([0,0,n.canvas.width,n.canvas.height],e,r),this.ctx.drawImage(n.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(t,e,n,r,i,s){if(this.#yr(),Tn(this.ctx),this.ctx.save(),this.save(t),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),n){const i=n[2]-n[0],a=n[3]-n[1];if(s&&this.annotationCanvasMap){(r=r.slice())[4]-=n[0],r[5]-=n[1],(n=n.slice())[0]=n[1]=0,n[2]=i,n[3]=a,st.singularValueDecompose2dScale(St(this.ctx),wn);const{viewportScale:t}=this,s=Math.ceil(i*this.outputScaleX*t),o=Math.ceil(a*this.outputScaleY*t);this.annotationCanvas=this.canvasFactory.create(s,o);const{canvas:l,context:c}=this.annotationCanvas;this.annotationCanvasMap.set(e,l),this.annotationCanvas.savedCtx=this.ctx,this.ctx=c,this.ctx.save(),this.ctx.setTransform(wn[0],0,0,-wn[1],0,a*wn[1]),Tn(this.ctx)}else{Tn(this.ctx),this.endPath(t);const e=new Path2D;e.rect(n[0],n[1],i,a),this.ctx.clip(e)}}this.current=new En(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(t,...r),this.transform(t,...i)}endAnnotation(t){this.annotationCanvas&&(this.ctx.restore(),this.#wr(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t,e){if(!this.contentVisible)return;const n=e.count;(e=this.getObject(t,e.data,e)).count=n;const r=this.ctx,i=this._createMaskCanvas(t,e),s=i.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(s,i.offsetX,i.offsetY),this.dependencyTracker?.resetBBox(t).recordBBox(t,this.ctx,i.offsetX,i.offsetX+s.width,i.offsetY,i.offsetY+s.height).recordOperation(t),r.restore(),this.compose()}paintImageMaskXObjectRepeat(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;if(!this.contentVisible)return;e=this.getObject(t,e.data,e);const o=this.ctx;o.save();const l=St(o);o.transform(n,r,i,s,0,0);const c=this._createMaskCanvas(t,e);o.setTransform(1,0,0,1,c.offsetX-l[4],c.offsetY-l[5]),this.dependencyTracker?.resetBBox(t);for(let h=0,d=a.length;h<d;h+=2){const e=st.transform(l,[n,r,i,s,a[h],a[h+1]]);o.drawImage(c.canvas,e[4],e[5]),this.dependencyTracker?.recordBBox(t,this.ctx,e[4],e[4]+c.canvas.width,e[5],e[5]+c.canvas.height)}o.restore(),this.compose(),this.dependencyTracker?.recordOperation(t)}paintImageMaskXObjectGroup(t,e){if(!this.contentVisible)return;const n=this.ctx,r=this.current.fillColor,i=this.current.patternFill;this.dependencyTracker?.resetBBox(t).recordDependencies(t,nn);for(const s of e){const{data:e,width:a,height:o,transform:l}=s,c=this.cachedCanvases.getCanvas("maskCanvas",a,o),h=c.context;h.save();Cn(h,this.getObject(t,e,s)),h.globalCompositeOperation="source-in",h.fillStyle=i?r.getPattern(h,this,Tt(n),rn,t):r,h.fillRect(0,0,a,o),h.restore(),n.save(),n.transform(...l),n.scale(1,-1),xn(n,c.canvas,0,0,a,o,0,-1,1,1),this.dependencyTracker?.recordBBox(t,n,0,a,0,o),n.restore()}this.compose(),this.dependencyTracker?.recordOperation(t)}paintImageXObject(t,e){if(!this.contentVisible)return;const n=this.getObject(t,e);n?this.paintInlineImageXObject(t,n):U("Dependent image isn't ready yet")}paintImageXObjectRepeat(t,e,n,r,i){if(!this.contentVisible)return;const s=this.getObject(t,e);if(!s)return void U("Dependent image isn't ready yet");const a=s.width,o=s.height,l=[];for(let c=0,h=i.length;c<h;c+=2)l.push({transform:[n,0,0,r,i[c],i[c+1]],x:0,y:0,w:a,h:o});this.paintInlineImageXObjectGroup(t,s,l)}applyTransferMapsToCanvas(t){return"none"!==this.current.transferMaps&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;const{bitmap:e,width:n,height:r}=t,i=this.cachedCanvases.getCanvas("inlineImage",n,r),s=i.context;return s.filter=this.current.transferMaps,s.drawImage(e,0,0),s.filter="none",i.canvas}paintInlineImageXObject(t,e){if(!this.contentVisible)return;const n=e.width,r=e.height,i=this.ctx;this.save(t);const{filter:s}=i;let a;if("none"!==s&&""!==s&&(i.filter="none"),i.scale(1/n,-1/r),e.bitmap)a=this.applyTransferMapsToBitmap(e);else if("function"===typeof HTMLElement&&e instanceof HTMLElement||!e.data)a=e;else{const t=this.cachedCanvases.getCanvas("inlineImage",n,r).context;kn(t,e),a=this.applyTransferMapsToCanvas(t)}const o=this._scaleImage(a,Tt(i));i.imageSmoothingEnabled=Dn(St(i),e.interpolate),this.dependencyTracker?.resetBBox(t).recordBBox(t,i,0,n,-r,0).recordDependencies(t,Je).recordOperation(t),xn(i,o.img,0,0,o.paintWidth,o.paintHeight,0,-r,n,r),this.compose(),this.restore(t)}paintInlineImageXObjectGroup(t,e,n){if(!this.contentVisible)return;const r=this.ctx;let i;if(e.bitmap)i=e.bitmap;else{const t=e.width,n=e.height,r=this.cachedCanvases.getCanvas("inlineImage",t,n).context;kn(r,e),i=this.applyTransferMapsToCanvas(r)}this.dependencyTracker?.resetBBox(t);for(const s of n)r.save(),r.transform(...s.transform),r.scale(1,-1),xn(r,i,s.x,s.y,s.w,s.h,0,-1,1,1),this.dependencyTracker?.recordBBox(t,r,0,1,-1,0),r.restore();this.dependencyTracker?.recordOperation(t),this.compose()}paintSolidColorImageMask(t){this.contentVisible&&(this.dependencyTracker?.resetBBox(t).recordBBox(t,this.ctx,0,1,0,1).recordDependencies(t,Ze).recordOperation(t),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t,e){}markPointProps(t,e,n){}beginMarkedContent(t,e){this.dependencyTracker?.beginMarkedContent(t),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,e,n){this.dependencyTracker?.beginMarkedContent(t),"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(n)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(t){this.dependencyTracker?.endMarkedContent(t),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(t){}endCompat(t){}consumePath(t,e,n){const r=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(n);const i=this.ctx;this.pendingClip?(r||(this.pendingClip===Fn?i.clip(e,"evenodd"):i.clip(e)),this.pendingClip=null,this.dependencyTracker?.bboxToClipBoxDropOperation(t).recordFutureForcedDependency("clipPath",t)):this.dependencyTracker?.recordOperation(t),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=St(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const e=Math.abs(t[0]*t[3]-t[2]*t[1]),n=Math.hypot(t[0],t[2]),r=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(n,r)/e}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:t}=this.current,{a:e,b:n,c:r,d:i}=this.ctx.getTransform();let s,a;if(0===n&&0===r){const n=Math.abs(e),r=Math.abs(i);if(n===r)if(0===t)s=a=1/n;else{const e=n*t;s=a=e<1?1/e:1}else if(0===t)s=1/n,a=1/r;else{const e=n*t,i=r*t;s=e<1?1/e:1,a=i<1?1/i:1}}else{const o=Math.abs(e*i-n*r),l=Math.hypot(e,n),c=Math.hypot(r,i);if(0===t)s=c/o,a=l/o;else{const e=t*o;s=c>e?c/e:1,a=l>e?l/e:1}}this._cachedScaleForStroking[0]=s,this._cachedScaleForStroking[1]=a}return this._cachedScaleForStroking}rescaleAndStroke(t,e){const{ctx:n,current:{lineWidth:r}}=this,[i,s]=this.getScaleForStroking();if(i===s)return n.lineWidth=(r||1)*i,void n.stroke(t);const a=n.getLineDash();e&&n.save(),n.scale(i,s),yn.a=1/i,yn.d=1/s;const o=new Path2D;if(o.addPath(t,yn),a.length>0){const t=Math.max(i,s);n.setLineDash(a.map(e=>e/t)),n.lineDashOffset/=t}n.lineWidth=r||1,n.stroke(o),e&&n.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const Pi in F)void 0!==Rn.prototype[Pi]&&(Rn.prototype[F[Pi]]=Rn.prototype[Pi]);class Nn{#Ar;#xr;#Er;static strings=["fontFamily","fontWeight","italicAngle"];static write(t){const e=new TextEncoder,n={};let r=0;for(const l of Nn.strings){const i=e.encode(t[l]);n[l]=i,r+=4+i.length}const i=new ArrayBuffer(r),s=new Uint8Array(i),a=new DataView(i);let o=0;for(const l of Nn.strings){const t=n[l],e=t.length;a.setUint32(o,e),s.set(t,o+4),o+=4+e}return V(o===i.byteLength,"CssFontInfo.write: Buffer overflow"),i}constructor(t){this.#Ar=t,this.#xr=new DataView(this.#Ar),this.#Er=new TextDecoder}#kr(t){V(t<Nn.strings.length,"Invalid string index");let e=0;for(let r=0;r<t;r++)e+=this.#xr.getUint32(e)+4;const n=this.#xr.getUint32(e);return this.#Er.decode(new Uint8Array(this.#Ar,e+4,n))}get fontFamily(){return this.#kr(0)}get fontWeight(){return this.#kr(1)}get italicAngle(){return this.#kr(2)}}class Ln{#Ar;#xr;#Er;static strings=["css","loadedName","baseFontName","src"];static write(t){const e=new TextEncoder,n={};let r=0;for(const d of Ln.strings){const i=e.encode(t[d]);n[d]=i,r+=4+i.length}r+=4;let i,s,a=1+r;t.style&&(i=e.encode(t.style.style),s=e.encode(t.style.weight),a+=4+i.length+4+s.length);const o=new ArrayBuffer(a),l=new Uint8Array(o),c=new DataView(o);let h=0;c.setUint8(h++,t.guessFallback?1:0),c.setUint32(h,0),h+=4,r=0;for(const d of Ln.strings){const t=n[d],e=t.length;r+=4+e,c.setUint32(h,e),l.set(t,h+4),h+=4+e}return c.setUint32(h-r-4,r),t.style&&(c.setUint32(h,i.length),l.set(i,h+4),h+=4+i.length,c.setUint32(h,s.length),l.set(s,h+4),h+=4+s.length),V(h<=o.byteLength,"SubstitionInfo.write: Buffer overflow"),o.transferToFixedLength(h)}constructor(t){this.#Ar=t,this.#xr=new DataView(this.#Ar),this.#Er=new TextDecoder}get guessFallback(){return 0!==this.#xr.getUint8(0)}#kr(t){V(t<Ln.strings.length,"Invalid string index");let e=5;for(let r=0;r<t;r++)e+=this.#xr.getUint32(e)+4;const n=this.#xr.getUint32(e);return this.#Er.decode(new Uint8Array(this.#Ar,e+4,n))}get css(){return this.#kr(0)}get loadedName(){return this.#kr(1)}get baseFontName(){return this.#kr(2)}get src(){return this.#kr(3)}get style(){let t=1;t+=4+this.#xr.getUint32(t);const e=this.#xr.getUint32(t),n=this.#Er.decode(new Uint8Array(this.#Ar,t+4,e));t+=4+e;const r=this.#xr.getUint32(t);return{style:n,weight:this.#Er.decode(new Uint8Array(this.#Ar,t+4,r))}}}class On{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#Cr=(()=>Math.ceil(2*this.bools.length/8))();static#Sr=(()=>this.#Cr+8*this.numbers.length)();static#Tr=(()=>this.#Sr+1+8)();static#Dr=(()=>this.#Tr+1+48)();static#Mr=(()=>this.#Dr+1+6)();#Ar;#Er;#xr;constructor(t){let{data:e,extra:n}=t;this.#Ar=e,this.#Er=new TextDecoder,this.#xr=new DataView(this.#Ar),n&&Object.assign(this,n)}#Pr(t){V(t<On.bools.length,"Invalid boolean index");const e=Math.floor(t/4),n=2*t%8,r=this.#xr.getUint8(e)>>n&3;return 0===r?void 0:2===r}get black(){return this.#Pr(0)}get bold(){return this.#Pr(1)}get disableFontFace(){return this.#Pr(2)}get fontExtraProperties(){return this.#Pr(3)}get isInvalidPDFjsFont(){return this.#Pr(4)}get isType3Font(){return this.#Pr(5)}get italic(){return this.#Pr(6)}get missingFile(){return this.#Pr(7)}get remeasure(){return this.#Pr(8)}get vertical(){return this.#Pr(9)}#Ir(t){return V(t<On.numbers.length,"Invalid number index"),this.#xr.getFloat64(On.#Cr+8*t)}get ascent(){return this.#Ir(0)}get defaultWidth(){return this.#Ir(1)}get descent(){return this.#Ir(2)}get bbox(){let t=On.#Sr;if(0===this.#xr.getUint8(t))return;t+=1;const e=[];for(let n=0;n<4;n++)e.push(this.#xr.getInt16(t,!0)),t+=2;return e}get fontMatrix(){let t=On.#Tr;if(0===this.#xr.getUint8(t))return;t+=1;const e=[];for(let n=0;n<6;n++)e.push(this.#xr.getFloat64(t,!0)),t+=8;return e}get defaultVMetrics(){let t=On.#Dr;if(0===this.#xr.getUint8(t))return;t+=1;const e=[];for(let n=0;n<3;n++)e.push(this.#xr.getInt16(t,!0)),t+=2;return e}#kr(t){V(t<On.strings.length,"Invalid string index");let e=On.#Mr+4;for(let i=0;i<t;i++)e+=this.#xr.getUint32(e)+4;const n=this.#xr.getUint32(e),r=new Uint8Array(n);return r.set(new Uint8Array(this.#Ar,e+4,n)),this.#Er.decode(r)}get fallbackName(){return this.#kr(0)}get loadedName(){return this.#kr(1)}get mimetype(){return this.#kr(2)}get name(){return this.#kr(3)}get data(){let t=On.#Mr;t+=4+this.#xr.getUint32(t);t+=4+this.#xr.getUint32(t);t+=4+this.#xr.getUint32(t);const e=this.#xr.getUint32(t);if(0!==e)return new Uint8Array(this.#Ar,t+4,e)}clearData(){let t=On.#Mr;t+=4+this.#xr.getUint32(t);t+=4+this.#xr.getUint32(t);t+=4+this.#xr.getUint32(t);const e=this.#xr.getUint32(t);new Uint8Array(this.#Ar,t+4,e).fill(0),this.#xr.setUint32(t,0)}get cssFontInfo(){let t=On.#Mr;t+=4+this.#xr.getUint32(t);t+=4+this.#xr.getUint32(t);const e=this.#xr.getUint32(t);if(0===e)return null;const n=new Uint8Array(e);return n.set(new Uint8Array(this.#Ar,t+4,e)),new Nn(n.buffer)}get systemFontInfo(){let t=On.#Mr;t+=4+this.#xr.getUint32(t);const e=this.#xr.getUint32(t);if(0===e)return null;const n=new Uint8Array(e);return n.set(new Uint8Array(this.#Ar,t+4,e)),new Ln(n.buffer)}static write(t){const e=t.systemFontInfo?Ln.write(t.systemFontInfo):null,n=t.cssFontInfo?Nn.write(t.cssFontInfo):null,r=new TextEncoder,i={};let s=0;for(const f of On.strings)i[f]=r.encode(t[f]),s+=4+i[f].length;const a=On.#Mr+4+s+4+(e?e.byteLength:0)+4+(n?n.byteLength:0)+4+(t.data?t.data.length:0),o=new ArrayBuffer(a),l=new Uint8Array(o),c=new DataView(o);let h=0;const d=On.bools.length;let u=0,p=0;for(let f=0;f<d;f++){const e=t[On.bools[f]];u|=(void 0===e?0:e?2:1)<<p,p+=2,8!==p&&f!==d-1||(c.setUint8(h++,u),u=0,p=0)}V(h===On.#Cr,"FontInfo.write: Boolean properties offset mismatch");for(const f of On.numbers)c.setFloat64(h,t[f]),h+=8;if(V(h===On.#Sr,"FontInfo.write: Number properties offset mismatch"),t.bbox){c.setUint8(h++,4);for(const e of t.bbox)c.setInt16(h,e,!0),h+=2}else c.setUint8(h++,0),h+=8;if(V(h===On.#Tr,"FontInfo.write: BBox properties offset mismatch"),t.fontMatrix){c.setUint8(h++,6);for(const e of t.fontMatrix)c.setFloat64(h,e,!0),h+=8}else c.setUint8(h++,0),h+=48;if(V(h===On.#Dr,"FontInfo.write: FontMatrix properties offset mismatch"),t.defaultVMetrics){c.setUint8(h++,1);for(const e of t.defaultVMetrics)c.setInt16(h,e,!0),h+=2}else c.setUint8(h++,0),h+=6;V(h===On.#Mr,"FontInfo.write: DefaultVMetrics properties offset mismatch"),c.setUint32(On.#Mr,0),h+=4;for(const f of On.strings){const t=i[f],e=t.length;c.setUint32(h,e),l.set(t,h+4),h+=4+e}if(c.setUint32(On.#Mr,h-On.#Mr-4),e){const t=e.byteLength;c.setUint32(h,t),V(h+4+t<=o.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),l.set(new Uint8Array(e),h+4),h+=4+t}else c.setUint32(h,0),h+=4;if(n){const t=n.byteLength;c.setUint32(h,t),V(h+4+t<=o.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),l.set(new Uint8Array(n),h+4),h+=4+t}else c.setUint32(h,0),h+=4;return void 0===t.data?(c.setUint32(h,0),h+=4):(c.setUint32(h,t.data.length),l.set(t.data,h+4),h+=4+t.data.length),V(h<=o.byteLength,"FontInfo.write: Buffer overflow"),o.transferToFixedLength(h)}}class Bn{static#Fr=null;static#Rr="";static get workerPort(){return this.#Fr}static set workerPort(t){if(!("undefined"!==typeof Worker&&t instanceof Worker)&&null!==t)throw new Error("Invalid `workerPort` type.");this.#Fr=t}static get workerSrc(){return this.#Rr}static set workerSrc(t){if("string"!==typeof t)throw new Error("Invalid `workerSrc` type.");this.#Rr=t}}class $n{#Nr;#Lr;constructor(t){let{parsedData:e,rawData:n}=t;this.#Nr=e,this.#Lr=n}getRaw(){return this.#Lr}get(t){return this.#Nr.get(t)??null}[Symbol.iterator](){return this.#Nr.entries()}}const zn=Symbol("INTERNAL");class jn{#Or=!1;#Br=!1;#$r=!1;#zr=!0;constructor(t,e){let{name:n,intent:r,usage:i,rbGroups:s}=e;this.#Or=!!(t&l),this.#Br=!!(t&c),this.name=n,this.intent=r,this.usage=i,this.rbGroups=s}get visible(){if(this.#$r)return this.#zr;if(!this.#zr)return!1;const{print:t,view:e}=this.usage;return this.#Or?"OFF"!==e?.viewState:!this.#Br||"OFF"!==t?.printState}_setVisible(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t!==zn&&H("Internal method `_setVisible` called."),this.#$r=n,this.#zr=e}}class Un{#jr=null;#Ur=(()=>new Map)();#Hr=null;#Vr=null;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if(this.renderingIntent=e,this.name=null,this.creator=null,null!==t){this.name=t.name,this.creator=t.creator,this.#Vr=t.order;for(const n of t.groups)this.#Ur.set(n.id,new jn(e,n));if("OFF"===t.baseState)for(const t of this.#Ur.values())t._setVisible(zn,!1);for(const e of t.on)this.#Ur.get(e)._setVisible(zn,!0);for(const e of t.off)this.#Ur.get(e)._setVisible(zn,!1);this.#Hr=this.getHash()}}#qr(t){const e=t.length;if(e<2)return!0;const n=t[0];for(let r=1;r<e;r++){const e=t[r];let i;if(Array.isArray(e))i=this.#qr(e);else{if(!this.#Ur.has(e))return U(`Optional content group not found: ${e}`),!0;i=this.#Ur.get(e).visible}switch(n){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===n}isVisible(t){if(0===this.#Ur.size)return!0;if(!t)return j("Optional content group not defined."),!0;if("OCG"===t.type)return this.#Ur.has(t.id)?this.#Ur.get(t.id).visible:(U(`Optional content group not found: ${t.id}`),!0);if("OCMD"===t.type){if(t.expression)return this.#qr(t.expression);if(!t.policy||"AnyOn"===t.policy){for(const e of t.ids){if(!this.#Ur.has(e))return U(`Optional content group not found: ${e}`),!0;if(this.#Ur.get(e).visible)return!0}return!1}if("AllOn"===t.policy){for(const e of t.ids){if(!this.#Ur.has(e))return U(`Optional content group not found: ${e}`),!0;if(!this.#Ur.get(e).visible)return!1}return!0}if("AnyOff"===t.policy){for(const e of t.ids){if(!this.#Ur.has(e))return U(`Optional content group not found: ${e}`),!0;if(!this.#Ur.get(e).visible)return!0}return!1}if("AllOff"===t.policy){for(const e of t.ids){if(!this.#Ur.has(e))return U(`Optional content group not found: ${e}`),!0;if(this.#Ur.get(e).visible)return!1}return!0}return U(`Unknown optional content policy ${t.policy}.`),!0}return U(`Unknown group type ${t.type}.`),!0}setVisibility(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=this.#Ur.get(t);if(r){if(n&&e&&r.rbGroups.length)for(const e of r.rbGroups)for(const n of e)n!==t&&this.#Ur.get(n)?._setVisible(zn,!1,!0);r._setVisible(zn,!!e,!0),this.#jr=null}else U(`Optional content group not found: ${t}`)}setOCGState(t){let e,{state:n,preserveRB:r}=t;for(const i of n){switch(i){case"ON":case"OFF":case"Toggle":e=i;continue}const t=this.#Ur.get(i);if(t)switch(e){case"ON":this.setVisibility(i,!0,r);break;case"OFF":this.setVisibility(i,!1,r);break;case"Toggle":this.setVisibility(i,!t.visible,r)}}this.#jr=null}get hasInitialVisibility(){return null===this.#Hr||this.getHash()===this.#Hr}getOrder(){return this.#Ur.size?this.#Vr?this.#Vr.slice():[...this.#Ur.keys()]:null}getGroup(t){return this.#Ur.get(t)||null}getHash(){if(null!==this.#jr)return this.#jr;const t=new ne;for(const[e,n]of this.#Ur)t.update(`${e}:${n.visible}`);return this.#jr=t.hexdigest()}[Symbol.iterator](){return this.#Ur.entries()}}class Hn{constructor(t,e){let{disableRange:n=!1,disableStream:r=!1}=e;V(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:i,initialData:s,progressiveDone:a,contentDispositionFilename:o}=t;if(this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=o,s?.length>0){const t=s instanceof Uint8Array&&s.byteLength===s.buffer.byteLength?s.buffer:new Uint8Array(s).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!r,this._isRangeSupported=!n,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((t,e)=>{this._onReceiveData({begin:t,chunk:e})}),t.addProgressListener((t,e)=>{this._onProgress({loaded:t,total:e})}),t.addProgressiveReadListener(t=>{this._onReceiveData({chunk:t})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData(t){let{begin:e,chunk:n}=t;const r=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{V(this._rangeReaders.some(function(t){return t._begin===e&&(t._enqueue(r),!0)}),"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){void 0===t.total?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){V(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new Vn(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=new qn(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeReaders.slice(0))e.cancel(t);this._pdfDataRangeTransport.abort()}}class Vn{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._stream=t,this._done=n||!1,this._filename=wt(r)?r:null,this._queuedChunks=e||[],this._loaded=0;for(const i of this._queuedChunks)this._loaded+=i.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0){return{value:this._queuedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class qn{constructor(t,e,n){this._stream=t,this._begin=e,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Wn(t,e){const n=new Headers;if(!t||!e||"object"!==typeof e)return n;for(const r in e){const t=e[r];void 0!==t&&n.append(r,t)}return n}function Gn(t){return URL.parse(t)?.origin??null}function Kn(t){let{responseHeaders:e,isHttp:n,rangeChunkSize:r,disableRange:i}=t;const s={allowRangeRequests:!1,suggestedLength:void 0},a=parseInt(e.get("Content-Length"),10);if(!Number.isInteger(a))return s;if(s.suggestedLength=a,a<=2*r)return s;if(i||!n)return s;if("bytes"!==e.get("Accept-Ranges"))return s;return"identity"!==(e.get("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s}function Xn(t){const e=t.get("Content-Disposition");if(e){let t=function(t){let e=!0,n=r("filename\\*","i").exec(t);if(n){n=n[1];let t=a(n);return t=unescape(t),t=o(t),t=l(t),s(t)}if(n=function(t){const e=[];let n;const i=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=i.exec(t));){let[,t,r,i]=n;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[r,i]}const s=[];for(let r=0;r<e.length&&r in e;++r){let[t,n]=e[r];n=a(n),t&&(n=unescape(n),0===r&&(n=o(n))),s.push(n)}return s.join("")}(t),n)return s(l(n));if(n=r("filename","i").exec(t),n){n=n[1];let t=a(n);return t=l(t),s(t)}function r(t,e){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',e)}function i(t,n){if(t){if(!/^[\x00-\xFF]+$/.test(n))return n;try{const r=new TextDecoder(t,{fatal:!0}),i=nt(n);n=r.decode(i),e=!1}catch{}}return n}function s(t){return e&&/[\x80-\xff]/.test(t)&&(t=i("utf-8",t),e&&(t=i("iso-8859-1",t))),t}function a(t){if(t.startsWith('"')){const e=t.slice(1).split('\\"');for(let t=0;t<e.length;++t){const n=e[t].indexOf('"');-1!==n&&(e[t]=e[t].slice(0,n),e.length=t+1),e[t]=e[t].replaceAll(/\\(.)/g,"$1")}t=e.join('"')}return t}function o(t){const e=t.indexOf("'");return-1===e?t:i(t.slice(0,e),t.slice(e+1).replace(/^[^']*'/,""))}function l(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(t,e,n,r){if("q"===n||"Q"===n)return i(e,r=(r=r.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(t,e){return String.fromCharCode(parseInt(e,16))}));try{r=atob(r)}catch{}return i(e,r)})}return""}(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if(wt(t))return t}return null}function Yn(t,e){return new J(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t,404===t||0===t&&e.startsWith("file:"))}function Zn(t){return 200===t||206===t}function Jn(t,e,n){return{method:"GET",headers:t,signal:n.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function Qn(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:(U(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}class tr{_responseOrigin=null;constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.headers=Wn(this.isHttp,t.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return V(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new er(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=new nr(this,t,e);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}}class er{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange;const n=new Headers(t.headers),r=e.url;fetch(r,Jn(n,this._withCredentials,this._abortController)).then(e=>{if(t._responseOrigin=Gn(e.url),!Zn(e.status))throw Yn(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();const n=e.headers,{allowRangeRequests:i,suggestedLength:s}=Kn({responseHeaders:n,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=Xn(n),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new tt("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:Qn(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class nr{constructor(t,e,n){this._stream=t,this._reader=null,this._loaded=0;const r=t.source;this._withCredentials=r.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!r.disableStream,this._abortController=new AbortController;const i=new Headers(t.headers);i.append("Range",`bytes=${e}-${n-1}`);const s=r.url;fetch(s,Jn(i,this._withCredentials,this._abortController)).then(e=>{const n=Gn(e.url);if(n!==t._responseOrigin)throw new Error(`Expected range response-origin "${n}" to match "${t._responseOrigin}".`);if(!Zn(e.status))throw Yn(e.status,s);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:Qn(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class rr{_responseOrigin=null;constructor(t){let{url:e,httpHeaders:n,withCredentials:r}=t;this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=Wn(this.isHttp,n),this.withCredentials=r||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(t){const e=new XMLHttpRequest,n=this.currXhrId++,r=this.pendingRequests[n]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const[i,s]of this.headers)e.setRequestHeader(i,s);return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),r.expectedStatus=206):r.expectedStatus=200,e.responseType="arraybuffer",V(t.onError,"Expected `onError` callback to be provided."),e.onerror=()=>{t.onError(e.status)},e.onreadystatechange=this.onStateChange.bind(this,n),e.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=t.onHeadersReceived,r.onDone=t.onDone,r.onError=t.onError,r.onProgress=t.onProgress,e.send(null),n}onProgress(t,e){const n=this.pendingRequests[t];n&&n.onProgress?.(e)}onStateChange(t,e){const n=this.pendingRequests[t];if(!n)return;const r=n.xhr;if(r.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4!==r.readyState)return;if(!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],0===r.status&&this.isHttp)return void n.onError(r.status);const i=r.status||200;if(!(200===i&&206===n.expectedStatus)&&i!==n.expectedStatus)return void n.onError(r.status);const s=function(t){const e=t.response;return"string"!==typeof e?e:nt(e).buffer}(r);if(206===i){const t=r.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);e?n.onDone({begin:parseInt(e[1],10),chunk:s}):(U('Missing or invalid "Content-Range" header.'),n.onError(0))}else s?n.onDone({begin:0,chunk:s}):n.onError(r.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}class ir{constructor(t){this._source=t,this._manager=new rr(t),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return V(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new sr(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const n=new ar(this._manager,t,e);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}}class sr{constructor(t,e){this._manager=t,this._url=e.url,this._fullRequestId=t.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t);this._manager._responseOrigin=Gn(e.responseURL);const n=e.getAllResponseHeaders(),r=new Headers(n?n.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(t=>{const[e,...n]=t.split(": ");return[e,n.join(": ")]}):[]),{allowRangeRequests:i,suggestedLength:s}=Kn({responseHeaders:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});i&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=Xn(r),this._isRangeSupported&&this._manager.abortRequest(t),this._headersCapability.resolve()}_onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);if(this._done=!0,!(this._cachedChunks.length>0)){for(const t of this._requests)t.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=Yn(t,this._url),this._headersCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0){return{value:this._cachedChunks.shift(),done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersCapability.reject(t);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class ar{constructor(t,e,n){this._manager=t,this._url=t.url,this._requestId=t.request({begin:e,end:n,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const t=Gn(this._manager.getRequestXhr(this._requestId)?.responseURL);t!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${t}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(t){const e=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}else this._queuedChunk=e;this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError??=Yn(t,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const or=/^[a-z][a-z0-9\-+.]+:/i;class lr{constructor(t){this.source=t,this.url=function(t){if(or.test(t))return new URL(t);const e=process.getBuiltinModule("url");return new URL(e.pathToFileURL(t))}(t.url),V("file:"===this.url.protocol,"PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return V(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new cr(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const n=new hr(this,t,e);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const e of this._rangeRequestReaders.slice(0))e.cancel(t)}}class cr{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();const n=process.getBuiltinModule("fs");n.promises.lstat(this._url).then(t=>{this._contentLength=t.size,this._setReadableStream(n.createReadStream(this._url)),this._headersCapability.resolve()},t=>{"ENOENT"===t.code&&(t=Yn(0,this._url.href)),this._storedError=t,this._headersCapability.reject(t)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength});return{value:new Uint8Array(t).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new tt("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class hr{constructor(t,e,n){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const r=t.source;this._isStreamingSupported=!r.disableStream;const i=process.getBuiltinModule("fs");this._setReadableStream(i.createReadStream(this._url,{start:e,end:n-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();if(null===t)return this._readCapability=Promise.withResolvers(),this.read();this._loaded+=t.length,this.onProgress?.({loaded:this._loaded});return{value:new Uint8Array(t).buffer,done:!1}}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}const dr=Symbol("INITIAL_DATA");class ur{#Wr=(()=>Object.create(null))();#Gr(t){return this.#Wr[t]||={...Promise.withResolvers(),data:dr}}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){const n=this.#Gr(t);return n.promise.then(()=>e(n.data)),null}const n=this.#Wr[t];if(!n||n.data===dr)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return n.data}has(t){const e=this.#Wr[t];return!!e&&e.data!==dr}delete(t){const e=this.#Wr[t];return!(!e||e.data===dr)&&(delete this.#Wr[t],!0)}resolve(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.#Gr(t);n.data=e,n.resolve()}clear(){for(const t in this.#Wr){const{data:e}=this.#Wr[t];e?.bitmap?.close()}this.#Wr=Object.create(null)}*[Symbol.iterator](){for(const t in this.#Wr){const{data:e}=this.#Wr[t];e!==dr&&(yield[t,e])}}}class pr{#Kr=(()=>Promise.withResolvers())();#_t=null;#Xr=!1;#Yr=(()=>!!globalThis.FontInspector?.enabled)();#Zr=null;#Jr=null;#Qr=0;#ti=0;#ei=null;#ni=null;#ri=0;#ii=0;#si=(()=>Object.create(null))();#ai=[];#oi=null;#li=[];#ci=(()=>new WeakMap)();#hi=null;static#di=(()=>new Map)();static#ui=(()=>new Map)();static#pi=(()=>new WeakMap)();static#fi=null;static#mi=(()=>new Set)();constructor(t){let{textContentSource:e,container:n,viewport:r}=t;if(e instanceof ReadableStream)this.#oi=e;else{if("object"!==typeof e)throw new Error('No "textContentSource" parameter specified.');this.#oi=new ReadableStream({start(t){t.enqueue(e),t.close()}})}this.#_t=this.#ni=n,this.#ii=r.scale*Mt.pixelRatio,this.#ri=r.rotation,this.#Jr={div:null,properties:null,ctx:null};const{pageWidth:i,pageHeight:s,pageX:a,pageY:o}=r.rawDims;this.#hi=[1,0,0,-1,-a,o+s],this.#ti=i,this.#Qr=s,pr.#gi(),Dt(n,r),this.#Kr.promise.finally(()=>{pr.#mi.delete(this),this.#Jr=null,this.#si=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:t,isFirefox:e}=rt.platform;return G(this,"fontFamilyMap",new Map([["sans-serif",(t&&e?"Calibri, ":"")+"sans-serif"],["monospace",(t&&e?"Lucida Console, ":"")+"monospace"]]))}render(){const t=()=>{this.#ei.read().then(e=>{let{value:n,done:r}=e;r?this.#Kr.resolve():(this.#Zr??=n.lang,Object.assign(this.#si,n.styles),this.#vi(n.items),t())},this.#Kr.reject)};return this.#ei=this.#oi.getReader(),pr.#mi.add(this),t(),this.#Kr.promise}update(t){let{viewport:e,onBefore:n=null}=t;const r=e.scale*Mt.pixelRatio,i=e.rotation;if(i!==this.#ri&&(n?.(),this.#ri=i,Dt(this.#ni,{rotation:i})),r!==this.#ii){n?.(),this.#ii=r;const t={div:null,properties:null,ctx:pr.#bi(this.#Zr)};for(const e of this.#li)t.properties=this.#ci.get(e),t.div=e,this.#yi(t)}}cancel(){const t=new tt("TextLayer task cancelled.");this.#ei?.cancel(t).catch(()=>{}),this.#ei=null,this.#Kr.reject(t)}get textDivs(){return this.#li}get textContentItemsStr(){return this.#ai}#vi(t){if(this.#Xr)return;this.#Jr.ctx??=pr.#bi(this.#Zr);const e=this.#li,n=this.#ai;for(const r of t){if(e.length>1e5)return U("Ignoring additional textDivs for performance reasons."),void(this.#Xr=!0);if(void 0!==r.str)n.push(r.str),this.#wi(r);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const t=this.#_t;this.#_t=document.createElement("span"),this.#_t.classList.add("markedContent"),r.id&&this.#_t.setAttribute("id",`${r.id}`),t.append(this.#_t)}else"endMarkedContent"===r.type&&(this.#_t=this.#_t.parentNode)}}#wi(t){const e=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};this.#li.push(e);const r=st.transform(this.#hi,t.transform);let i=Math.atan2(r[1],r[0]);const s=this.#si[t.fontName];s.vertical&&(i+=Math.PI/2);let a=this.#Yr&&s.fontSubstitution||s.fontFamily;a=pr.fontFamilyMap.get(a)||a;const o=Math.hypot(r[2],r[3]),l=o*pr.#_i(a,s,this.#Zr);let c,h;0===i?(c=r[4],h=r[5]-l):(c=r[4]+l*Math.sin(i),h=r[5]-l*Math.cos(i));const d="calc(var(--total-scale-factor) *",u=e.style;this.#_t===this.#ni?(u.left=`${(100*c/this.#ti).toFixed(2)}%`,u.top=`${(100*h/this.#Qr).toFixed(2)}%`):(u.left=`${d}${c.toFixed(2)}px)`,u.top=`${d}${h.toFixed(2)}px)`),u.fontSize=`${d}${(pr.#fi*o).toFixed(2)}px)`,u.fontFamily=a,n.fontSize=o,e.setAttribute("role","presentation"),e.textContent=t.str,e.dir=t.dir,this.#Yr&&(e.dataset.fontName=s.fontSubstitutionLoadedName||t.fontName),0!==i&&(n.angle=i*(180/Math.PI));let p=!1;if(t.str.length>1)p=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),n=Math.abs(t.transform[3]);e!==n&&Math.max(e,n)/Math.min(e,n)>1.5&&(p=!0)}if(p&&(n.canvasWidth=s.vertical?t.height:t.width),this.#ci.set(e,n),this.#Jr.div=e,this.#Jr.properties=n,this.#yi(this.#Jr),n.hasText&&this.#_t.append(e),n.hasEOL){const t=document.createElement("br");t.setAttribute("role","presentation"),this.#_t.append(t)}}#yi(t){const{div:e,properties:n,ctx:r}=t,{style:i}=e;let s="";if(pr.#fi>1&&(s=`scale(${1/pr.#fi})`),0!==n.canvasWidth&&n.hasText){const{fontFamily:t}=i,{canvasWidth:a,fontSize:o}=n;pr.#Ai(r,o*this.#ii,t);const{width:l}=r.measureText(e.textContent);l>0&&(s=`scaleX(${a*this.#ii/l}) ${s}`)}0!==n.angle&&(s=`rotate(${n.angle}deg) ${s}`),s.length>0&&(i.transform=s)}static cleanup(){if(!(this.#mi.size>0)){this.#di.clear();for(const{canvas:t}of this.#ui.values())t.remove();this.#ui.clear()}}static#bi(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.#ui.get(t||="");if(!e){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=t,document.body.append(n),e=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#ui.set(t,e),this.#pi.set(e,{size:0,family:""})}return e}static#Ai(t,e,n){const r=this.#pi.get(t);e===r.size&&n===r.family||(t.font=`${e}px ${n}`,r.size=e,r.family=n)}static#gi(){if(null!==this.#fi)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.style.position="absolute",t.textContent="X",document.body.append(t),this.#fi=t.getBoundingClientRect().height,t.remove()}static#_i(t,e,n){const r=this.#di.get(t);if(r)return r;const i=this.#bi(n);i.canvas.width=i.canvas.height=30,this.#Ai(i,30,t);const s=i.measureText(""),a=s.fontBoundingBoxAscent,o=Math.abs(s.fontBoundingBoxDescent);i.canvas.width=i.canvas.height=0;let l=.8;return a?l=a/(a+o):(rt.platform.isFirefox&&U("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),e.ascent?l=e.ascent:e.descent&&(l=1+e.descent)),this.#di.set(t,l),l}}function fr(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"string"===typeof t||t instanceof URL?t={url:t}:(t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t={data:t});const e=new mr,{docId:n}=e,r=t.url?function(t){if(t instanceof URL)return t.href;if("string"===typeof t){if(i)return t;const e=URL.parse(t,window.location);if(e)return e.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}(t.url):null,s=t.data?function(t){if(i&&"undefined"!==typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"===typeof t)return nt(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||"object"===typeof t&&!isNaN(t?.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}(t.data):null,a=t.httpHeaders||null,o=!0===t.withCredentials,l=t.password??null,c=t.range instanceof gr?t.range:null,h=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:65536;let d=t.worker instanceof yr?t.worker:null;const u=t.verbosity,p="string"!==typeof t.docBaseUrl||yt(t.docBaseUrl)?null:t.docBaseUrl,f=le(t.cMapUrl),m=!1!==t.cMapPacked,g=t.CMapReaderFactory||(i?Be:Te),v=le(t.iccUrl),b=le(t.standardFontDataUrl),y=t.StandardFontDataFactory||(i?$e:Ie),w=le(t.wasmUrl),_=t.WasmFactory||(i?ze:Re),A=!0!==t.stopAtErrors,x=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,E=!1!==t.isEvalSupported,k="boolean"===typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!i,C="boolean"===typeof t.isImageDecoderSupported?t.isImageDecoderSupported:!i&&(rt.platform.isFirefox||!globalThis.chrome),S=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,T="boolean"===typeof t.disableFontFace?t.disableFontFace:i,D=!0===t.fontExtraProperties,M=!0===t.enableXfa,P=t.ownerDocument||globalThis.document,I=!0===t.disableRange,F=!0===t.disableStream,R=!0===t.disableAutoFetch,N=!0===t.pdfBug,L=t.CanvasFactory||(i?Oe:Ce),O=t.FilterFactory||(i?Le:Me),B=!0===t.enableHWA,z=!1!==t.useWasm,j=c?c.length:t.length??NaN,U="boolean"===typeof t.useSystemFonts?t.useSystemFonts:!i&&!T,H="boolean"===typeof t.useWorkerFetch?t.useWorkerFetch:!!(g===Te&&y===Ie&&_===Re&&f&&b&&w&&At(f,document.baseURI)&&At(b,document.baseURI)&&At(w,document.baseURI));$(u);const V={canvasFactory:new L({ownerDocument:P,enableHWA:B}),filterFactory:new O({docId:n,ownerDocument:P}),cMapReaderFactory:H?null:new g({baseUrl:f,isCompressed:m}),standardFontDataFactory:H?null:new y({baseUrl:b}),wasmFactory:H?null:new _({baseUrl:w})};d||(d=yr.create({verbosity:u,port:Bn.workerPort}),e._worker=d);const q={docId:n,apiVersion:"5.4.296",data:s,password:l,disableAutoFetch:R,rangeChunkSize:h,length:j,docBaseUrl:p,enableXfa:M,evaluatorOptions:{maxImageSize:x,disableFontFace:T,ignoreErrors:A,isEvalSupported:E,isOffscreenCanvasSupported:k,isImageDecoderSupported:C,canvasMaxAreaInBytes:S,fontExtraProperties:D,useSystemFonts:U,useWasm:z,useWorkerFetch:H,cMapUrl:f,iccUrl:v,standardFontDataUrl:b,wasmUrl:w}},W={ownerDocument:P,pdfBug:N,styleElement:null,loadingParams:{disableAutoFetch:R,enableXfa:M}};return d.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const t=d.messageHandler.sendWithPromise("GetDocRequest",q,s?[s.buffer]:null);let l;if(c)l=new Hn(c,{disableRange:I,disableStream:F});else if(!s){if(!r)throw new Error("getDocument - no `url` parameter provided.");const t=At(r)?tr:i?lr:ir;l=new t({url:r,length:j,httpHeaders:a,withCredentials:o,rangeChunkSize:h,disableRange:I,disableStream:F})}return t.then(t=>{if(e.destroyed)throw new Error("Loading aborted");if(d.destroyed)throw new Error("Worker was destroyed");const r=new Ee(n,t,d.port),i=new wr(r,e,l,W,V,B);e._transport=i,r.send("Ready",null)})}).catch(e._capability.reject),e}class mr{static#Nn=0;_capability=(()=>Promise.withResolvers())();_transport=null;_worker=null;docId=(()=>"d"+mr.#Nn++)();destroyed=!1;onPassword=null;onProgress=null;get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class gr{#Kr=(()=>Promise.withResolvers())();#xi=[];#Ei=[];#ki=[];#Ci=[];constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.length=t,this.initialData=e,this.progressiveDone=n,this.contentDispositionFilename=r}addRangeListener(t){this.#Ci.push(t)}addProgressListener(t){this.#ki.push(t)}addProgressiveReadListener(t){this.#Ei.push(t)}addProgressiveDoneListener(t){this.#xi.push(t)}onDataRange(t,e){for(const n of this.#Ci)n(t,e)}onDataProgress(t,e){this.#Kr.promise.then(()=>{for(const n of this.#ki)n(t,e)})}onDataProgressiveRead(t){this.#Kr.promise.then(()=>{for(const e of this.#Ei)e(t)})}onDataProgressiveDone(){this.#Kr.promise.then(()=>{for(const t of this.#xi)t()})}transportReady(){this.#Kr.resolve()}requestDataRange(t,e){H("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class vr{constructor(t,e){this._pdfInfo=t,this._transport=e}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return G(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getAnnotationsByType(t,e){return this._transport.getAnnotationsByType(t,e)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(e)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class br{#Si=!1;constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this._pageIndex=t,this._pageInfo=e,this._transport=n,this._stats=r?new _t:null,this._pdfBug=r,this.commonObjs=n.commonObjs,this.objs=new ur,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){let{scale:t,rotation:e=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new vt({viewBox:this.view,userUnit:this.userUnit,scale:t,rotation:e,offsetX:n,offsetY:r,dontFlip:i})}getAnnotations(){let{intent:t="display"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{renderingIntent:e}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,e)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return G(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render(t){let{canvasContext:e,canvas:n=e.canvas,viewport:r,intent:i="display",annotationMode:s=m.ENABLE,transform:a=null,background:o=null,optionalContentConfigPromise:l=null,annotationCanvasMap:h=null,pageColors:d=null,printAnnotationStorage:u=null,isEditing:p=!1,recordOperations:f=!1,operationsFilter:g=null}=t;this._stats?.time("Overall");const v=this._transport.getRenderingIntent(i,s,u,p),{renderingIntent:b,cacheKey:y}=v;this.#Si=!1,l||=this._transport.getOptionalContentConfig(b);let w=this._intentStates.get(y);w||(w=Object.create(null),this._intentStates.set(y,w)),w.streamReaderCancelTimeout&&(clearTimeout(w.streamReaderCancelTimeout),w.streamReaderCancelTimeout=null);const _=!!(b&c);w.displayReadyCapability||(w.displayReadyCapability=Promise.withResolvers(),w.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(v));const A=Boolean(this._pdfBug&&globalThis.StepperManager?.enabled),x=!this.recordedBBoxes&&(f||A),E=t=>{if(w.renderTasks.delete(k),x){const t=k.gfx?.dependencyTracker.take();t&&(k.stepper&&k.stepper.setOperatorBBoxes(t,k.gfx.dependencyTracker.takeDebugMetadata()),f&&(this.recordedBBoxes=t))}_&&(this.#Si=!0),this.#Ti(),t?(k.capability.reject(t),this._abortOperatorList({intentState:w,reason:t instanceof Error?t:new Error(t)})):k.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},k=new Ar({callback:E,params:{canvas:n,canvasContext:e,dependencyTracker:x?new Ke(n,w.operatorList.length,A):null,viewport:r,transform:a,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:h,operatorList:w.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!_,pdfBug:this._pdfBug,pageColors:d,enableHWA:this._transport.enableHWA,operationsFilter:g});(w.renderTasks||=new Set).add(k);const C=k.task;return Promise.all([w.displayReadyCapability.promise,l]).then(t=>{let[e,n]=t;if(this.destroyed)E();else{if(this._stats?.time("Rendering"),!(n.renderingIntent&b))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");k.initializeGraphics({transparency:e,optionalContentConfig:n}),k.operatorListChanged()}}).catch(E),C}getOperatorList(){let{intent:t="display",annotationMode:e=m.ENABLE,printAnnotationStorage:n=null,isEditing:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=this._transport.getRenderingIntent(t,e,n,r,!0);let s,a=this._intentStates.get(i.cacheKey);return a||(a=Object.create(null),this._intentStates.set(i.cacheKey,a)),a.opListReadCapability||(s=Object.create(null),s.operatorListChanged=function(){a.operatorList.lastChunk&&(a.opListReadCapability.resolve(a.operatorList),a.renderTasks.delete(s))},a.opListReadCapability=Promise.withResolvers(),(a.renderTasks||=new Set).add(s),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(i)),a.opListReadCapability.promise}streamTextContent(){let{includeMarkedContent:t=!1,disableNormalization:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===t,disableNormalization:!0===e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(t=>ut.textContent(t));const e=this.streamTextContent(t);return new Promise(function(t,n){const r=e.getReader(),i={items:[],styles:Object.create(null),lang:null};!function e(){r.read().then(function(n){let{value:r,done:s}=n;s?t(i):(i.lang??=r.lang,Object.assign(i.styles,r.styles),i.items.push(...r.items),e())},n)}()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const e of this._intentStates.values())if(this._abortOperatorList({intentState:e,reason:new Error("Page was destroyed."),force:!0}),!e.opListReadCapability)for(const n of e.renderTasks)t.push(n.completed),n.cancel();return this.objs.clear(),this.#Si=!1,Promise.all(t)}cleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#Si=!0;const e=this.#Ti();return t&&e&&(this._stats&&=new _t),e}#Ti(){if(!this.#Si||this.destroyed)return!1;for(const{renderTasks:t,operatorList:e}of this._intentStates.values())if(t.size>0||!e.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#Si=!1,!0}_startRenderPage(t,e){const n=this._intentStates.get(e);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(t))}_renderPageChunk(t,e){for(let n=0,r=t.length;n<r;n++)e.operatorList.fnArray.push(t.fnArray[n]),e.operatorList.argsArray.push(t.argsArray[n]);e.operatorList.lastChunk=t.lastChunk,e.operatorList.separateAnnots=t.separateAnnots;for(const n of e.renderTasks)n.operatorListChanged();t.lastChunk&&this.#Ti()}_pumpOperatorList(t){let{renderingIntent:e,cacheKey:n,annotationStorageSerializable:r,modifiedIds:i}=t;const{map:s,transfer:a}=r,o=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:n,annotationStorage:s,modifiedIds:i},a).getReader(),l=this._intentStates.get(n);l.streamReader=o;const c=()=>{o.read().then(t=>{let{value:e,done:n}=t;n?l.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,l),c())},t=>{if(l.streamReader=null,!this._transport.destroyed){if(l.operatorList){l.operatorList.lastChunk=!0;for(const t of l.renderTasks)t.operatorListChanged();this.#Ti()}if(l.displayReadyCapability)l.displayReadyCapability.reject(t);else{if(!l.opListReadCapability)throw t;l.opListReadCapability.reject(t)}}})};c()}_abortOperatorList(t){let{intentState:e,reason:n,force:r=!1}=t;if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(n instanceof bt){let t=100;return n.extraDelay>0&&n.extraDelay<1e3&&(t+=n.extraDelay),void(e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:n,force:!0})},t))}}if(e.streamReader.cancel(new tt(n.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(const[t,n]of this._intentStates)if(n===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}class yr{#Kr=(()=>Promise.withResolvers())();#Di=null;#Fr=null;#Mi=null;static#Pi=0;static#Ii=!1;static#Fi=(()=>(r=()=>{i&&(this.#Ii=!0,Bn.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(t,e)=>{const n=URL.parse(t);if(!n?.origin||"null"===n.origin)return!1;const r=new URL(e,n);return n.origin===r.origin},this._createCDNWrapper=t=>{const e=`await import("${t}");`;return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))},this.fromPort=t=>{var e;if(e="`PDFWorker.fromPort` - please use `PDFWorker.create` instead.",console.log("Deprecated API usage: "+e),!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this.create(t)}},new WeakMap))();constructor(){let{name:t=null,port:e=null,verbosity:n=z()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.name=t,this.destroyed=!1,this.verbosity=n,e){if(yr.#Fi.has(e))throw new Error("Cannot use more than one PDFWorker per port.");yr.#Fi.set(e,this),this.#Ri(e)}else this.#Ni()}get promise(){return this.#Kr.promise}#Li(){this.#Kr.resolve(),this.#Di.send("configure",{verbosity:this.verbosity})}get port(){return this.#Fr}get messageHandler(){return this.#Di}#Ri(t){this.#Fr=t,this.#Di=new Ee("main","worker",t),this.#Di.on("ready",()=>{}),this.#Li()}#Ni(){if(yr.#Ii||yr.#Oi)return void this.#Bi();let{workerSrc:t}=yr;try{yr._isSameOrigin(window.location,t)||(t=yr._createCDNWrapper(new URL(t,window.location).href));const e=new Worker(t,{type:"module"}),n=new Ee("main","worker",e),r=()=>{i.abort(),n.destroy(),e.terminate(),this.destroyed?this.#Kr.reject(new Error("Worker was destroyed")):this.#Bi()},i=new AbortController;e.addEventListener("error",()=>{this.#Mi||r()},{signal:i.signal}),n.on("test",t=>{i.abort(),!this.destroyed&&t?(this.#Di=n,this.#Fr=e,this.#Mi=e,this.#Li()):r()}),n.on("ready",t=>{if(i.abort(),this.destroyed)r();else try{s()}catch{this.#Bi()}});const s=()=>{const t=new Uint8Array;n.send("test",t,[t.buffer])};return void s()}catch{j("The worker has been disabled.")}this.#Bi()}#Bi(){yr.#Ii||(U("Setting up fake worker."),yr.#Ii=!0),yr._setupFakeWorkerGlobal.then(t=>{if(this.destroyed)return void this.#Kr.reject(new Error("Worker was destroyed"));const e=new de;this.#Fr=e;const n="fake"+yr.#Pi++,r=new Ee(n+"_worker",n,e);t.setup(r,e),this.#Di=new Ee(n,n+"_worker",e),this.#Li()}).catch(t=>{this.#Kr.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this.#Mi?.terminate(),this.#Mi=null,yr.#Fi.delete(this.#Fr),this.#Fr=null,this.#Di?.destroy(),this.#Di=null}static create(t){const e=this.#Fi.get(t?.port);if(e){if(e._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return e}return new yr(t)}static get workerSrc(){if(Bn.workerSrc)return Bn.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#Oi(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return G(this,"_setupFakeWorkerGlobal",(async()=>{if(this.#Oi)return this.#Oi;return(await n(59169)(this.workerSrc)).WorkerMessageHandler})())}}r();class wr{#$i=(()=>new Map)();#zi=(()=>new Map)();#ji=(()=>new Map)();#Ui=(()=>new Map)();#Hi=null;constructor(t,e,n,r,i,s){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new ur,this.fontLoader=new ae({ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this.loadingParams=r.loadingParams,this._params=r,this.canvasFactory=i.canvasFactory,this.filterFactory=i.filterFactory,this.cMapReaderFactory=i.cMapReaderFactory,this.standardFontDataFactory=i.standardFontDataFactory,this.wasmFactory=i.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=s,this.setupMessageHandler()}#Vi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.#$i.get(t);if(n)return n;const r=this.messageHandler.sendWithPromise(t,e);return this.#$i.set(t,r),r}get annotationStorage(){return G(this,"annotationStorage",new ie)}getRenderingIntent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.ENABLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=l,a=re;switch(t){case"any":s=o;break;case"display":break;case"print":s=c;break;default:U(`getRenderingIntent - invalid intent: ${t}`)}const g=s&c&&n instanceof se?n:this.annotationStorage;switch(e){case m.DISABLE:s+=u;break;case m.ENABLE:break;case m.ENABLE_FORMS:s+=h;break;case m.ENABLE_STORAGE:s+=d,a=g.serializable;break;default:U(`getRenderingIntent - invalid annotationMode: ${e}`)}r&&(s+=p),i&&(s+=f);const{ids:v,hash:b}=g.modifiedIds;return{renderingIntent:s,cacheKey:[s,a.hash,b].join("_"),annotationStorageSerializable:a,modifiedIds:v}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#Hi?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const n of this.#zi.values())t.push(n._destroy());this.#zi.clear(),this.#ji.clear(),this.#Ui.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#$i.clear(),this.filterFactory.destroy(),pr.cleanup(),this._networkStream?.cancelAllRequests(new tt("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(t,e)=>{V(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then(function(t){let{value:n,done:r}=t;r?e.close():(V(n instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(n),1,[n]))}).catch(t=>{e.error(t)})},e.onCancel=t=>{this._fullReader.cancel(t),e.ready.catch(t=>{if(!this.destroyed)throw t})}}),t.on("ReaderHeadersReady",async t=>{await this._fullReader.headersReady;const{isStreamingSupported:n,isRangeSupported:r,contentLength:i}=this._fullReader;return n&&r||(this._lastProgress&&e.onProgress?.(this._lastProgress),this._fullReader.onProgress=t=>{e.onProgress?.({loaded:t.loaded,total:t.total})}),{isStreamingSupported:n,isRangeSupported:r,contentLength:i}}),t.on("GetRangeReader",(t,e)=>{V(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(t.begin,t.end);n?(e.onPull=()=>{n.read().then(function(t){let{value:n,done:r}=t;r?e.close():(V(n instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(n),1,[n]))}).catch(t=>{e.error(t)})},e.onCancel=t=>{n.cancel(t),e.ready.catch(t=>{if(!this.destroyed)throw t})}):e.close()}),t.on("GetDoc",t=>{let{pdfInfo:n}=t;this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,e._capability.resolve(new vr(n,this))}),t.on("DocException",t=>{e._capability.reject(xe(t))}),t.on("PasswordRequest",t=>{this.#Hi=Promise.withResolvers();try{if(!e.onPassword)throw xe(t);const n=t=>{t instanceof Error?this.#Hi.reject(t):this.#Hi.resolve({password:t})};e.onPassword(n,t.code)}catch(n){this.#Hi.reject(n)}return this.#Hi.promise}),t.on("DataLoaded",t=>{e.onProgress?.({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",t=>{if(this.destroyed)return;this.#zi.get(t.pageIndex)._startRenderPage(t.transparency,t.cacheKey)}),t.on("commonobj",e=>{let[n,r,i]=e;if(this.destroyed)return null;if(this.commonObjs.has(n))return null;switch(r){case"Font":if("error"in i){const t=i.error;U(`Error during font loading: ${t}`),this.commonObjs.resolve(n,t);break}const e=new On(i),s=this._params.pdfBug&&globalThis.FontInspector?.enabled?(t,e)=>globalThis.FontInspector.fontAdded(t,e):null,a=new oe(e,s,i.extra,i.charProcOperatorList);this.fontLoader.bind(a).catch(()=>t.sendWithPromise("FontFallback",{id:n})).finally(()=>{!a.fontExtraProperties&&a.data&&a.clearData(),this.commonObjs.resolve(n,a)});break;case"CopyLocalImage":const{imageRef:o}=i;V(o,"The imageRef must be defined.");for(const t of this.#zi.values())for(const[,e]of t.objs)if(e?.ref===o)return e.dataLen?(this.commonObjs.resolve(n,structuredClone(e)),e.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,i);break;default:throw new Error(`Got unknown common object type ${r}`)}return null}),t.on("obj",t=>{let[e,n,r,i]=t;if(this.destroyed)return;const s=this.#zi.get(n);if(!s.objs.has(e))if(0!==s._intentStates.size)switch(r){case"Image":case"Pattern":s.objs.resolve(e,i);break;default:throw new Error(`Got unknown object type ${r}`)}else i?.bitmap?.close()}),t.on("DocProgress",t=>{this.destroyed||e.onProgress?.({loaded:t.loaded,total:t.total})}),t.on("FetchBinaryData",async t=>{if(this.destroyed)throw new Error("Worker was destroyed.");const e=this[t.type];if(!e)throw new Error(`${t.type} not initialized, see the \`useWorkerFetch\` parameter.`);return e.fetch(t)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&U("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:e}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},e).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const e=t-1,n=this.#ji.get(e);if(n)return n;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(n=>{if(this.destroyed)throw new Error("Transport destroyed");n.refStr&&this.#Ui.set(n.refStr,t);const r=new br(e,n,this,this._params.pdfBug);return this.#zi.set(e,r),r});return this.#ji.set(e,r),r}getPageIndex(t){return ce(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getFieldObjects(){return this.#Vi("GetFieldObjects")}hasJSActions(){return this.#Vi("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!==typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getAnnotationsByType(t,e){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:t,pageIndexesToSkip:e})}getDocJSActions(){return this.#Vi("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#Vi("GetOptionalContentConfig").then(e=>new Un(e,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",e=this.#$i.get(t);if(e)return e;const n=this.messageHandler.sendWithPromise(t,null).then(t=>({info:t[0],metadata:t[1]?new $n(t[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#$i.set(t,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const t of this.#zi.values()){if(!t.cleanup())throw new Error(`startCleanup: Page ${t.pageNumber} is currently rendering.`)}this.commonObjs.clear(),t||this.fontLoader.clear(),this.#$i.clear(),this.filterFactory.destroy(!0),pr.cleanup()}}cachedPageNumber(t){if(!ce(t))return null;const e=0===t.gen?`${t.num}R`:`${t.num}R${t.gen}`;return this.#Ui.get(e)??null}}class _r{#qi=null;onContinue=null;onError=null;constructor(t){this.#qi=t}get promise(){return this.#qi.capability.promise}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.#qi.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#qi.operatorList;if(!t)return!1;const{annotationCanvasMap:e}=this.#qi;return t.form||t.canvas&&e?.size>0}}class Ar{#Wi=null;static#Gi=(()=>new WeakSet)();constructor(t){let{callback:e,params:n,objs:r,commonObjs:i,annotationCanvasMap:s,operatorList:a,pageIndex:o,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:h=!1,pdfBug:d=!1,pageColors:u=null,enableHWA:p=!1,operationsFilter:f=null}=t;this.callback=e,this.params=n,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=s,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=o,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!==typeof window,this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new _r(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=n.canvas,this._canvasContext=n.canvas?null:n.canvasContext,this._enableHWA=p,this._dependencyTracker=n.dependencyTracker,this._operationsFilter=f}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(t){let{transparency:e=!1,optionalContentConfig:n}=t;if(this.cancelled)return;if(this._canvas){if(Ar.#Gi.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Ar.#Gi.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport:r,transform:i,background:s,dependencyTracker:a}=this.params,o=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new Rn(o,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n},this.annotationCanvasMap,this.pageColors,a),this.gfx.beginDrawing({transform:i,viewport:r,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#Wi&&(window.cancelAnimationFrame(this.#Wi),this.#Wi=null),Ar.#Gi.delete(this._canvas),t||=new bt(`Rendering cancelled, page ${this._pageIndex+1}`,e),this.callback(t),this.task.onError?.(t)}operatorListChanged(){this.graphicsReady?(this.gfx.dependencyTracker?.growOperationsCount(this.operatorList.fnArray.length),this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#Wi=window.requestAnimationFrame(()=>{this.#Wi=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper,this._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Ar.#Gi.delete(this._canvas),this.callback())))}}class xr{#Ki=null;#Xi=null;#Yi;#Zi=null;#Ji=!1;#Qi=!1;#s=null;#ts;#es=null;#v=null;static#ns=null;static get _keyboardManager(){return G(this,"_keyboardManager",new qt([[["Escape","mac+Escape"],xr.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],xr.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],xr.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],xr.prototype._moveToPrevious],[["Home","mac+Home"],xr.prototype._moveToBeginning],[["End","mac+End"],xr.prototype._moveToEnd]]))}constructor(t){let{editor:e=null,uiManager:n=null}=t;e?(this.#Qi=!1,this.#s=e):this.#Qi=!0,this.#v=e?._uiManager||n,this.#ts=this.#v._eventBus,this.#Yi=e?.color?.toUpperCase()||this.#v?.highlightColors.values().next().value||"#FFFF98",xr.#ns||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const t=this.#Ki=document.createElement("button");t.className="colorPicker",t.tabIndex="0",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),t.ariaHasPopup="true",this.#s&&(t.ariaControls=`${this.#s.id}_colorpicker_dropdown`);const e=this.#v._signal;t.addEventListener("click",this.#rs.bind(this),{signal:e}),t.addEventListener("keydown",this.#is.bind(this),{signal:e});const n=this.#Xi=document.createElement("span");return n.className="swatch",n.ariaHidden="true",n.style.backgroundColor=this.#Yi,t.append(n),t}renderMainDropdown(){const t=this.#Zi=this.#ss();return t.ariaOrientation="horizontal",t.ariaLabelledBy="highlightColorPickerLabel",t}#ss(){const t=document.createElement("div"),e=this.#v._signal;t.addEventListener("contextmenu",xt,{signal:e}),t.className="dropdown",t.role="listbox",t.ariaMultiSelectable="false",t.ariaOrientation="vertical",t.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#s&&(t.id=`${this.#s.id}_colorpicker_dropdown`);for(const[n,r]of this.#v.highlightColors){const i=document.createElement("button");i.tabIndex="0",i.role="option",i.setAttribute("data-color",r),i.title=n,i.setAttribute("data-l10n-id",xr.#ns[n]);const s=document.createElement("span");i.append(s),s.className="swatch",s.style.backgroundColor=r,i.ariaSelected=r===this.#Yi,i.addEventListener("click",this.#as.bind(this,r),{signal:e}),t.append(i)}return t.addEventListener("keydown",this.#is.bind(this),{signal:e}),t}#as(t,e){e.stopPropagation(),this.#ts.dispatch("switchannotationeditorparams",{source:this,type:b.HIGHLIGHT_COLOR,value:t}),this.updateColor(t)}_colorSelectFromKeyboard(t){if(t.target===this.#Ki)return void this.#rs(t);const e=t.target.getAttribute("data-color");e&&this.#as(e,t)}_moveToNext(t){this.#os?t.target!==this.#Ki?t.target.nextSibling?.focus():this.#Zi.firstChild?.focus():this.#rs(t)}_moveToPrevious(t){t.target!==this.#Zi?.firstChild&&t.target!==this.#Ki?(this.#os||this.#rs(t),t.target.previousSibling?.focus()):this.#os&&this._hideDropdownFromKeyboard()}_moveToBeginning(t){this.#os?this.#Zi.firstChild?.focus():this.#rs(t)}_moveToEnd(t){this.#os?this.#Zi.lastChild?.focus():this.#rs(t)}#is(t){xr._keyboardManager.exec(this,t)}#rs(t){if(this.#os)return void this.hideDropdown();if(this.#Ji=0===t.detail,this.#es||(this.#es=new AbortController,window.addEventListener("pointerdown",this.#u.bind(this),{signal:this.#v.combinedSignal(this.#es)})),this.#Ki.ariaExpanded="true",this.#Zi)return void this.#Zi.classList.remove("hidden");const e=this.#Zi=this.#ss();this.#Ki.append(e)}#u(t){this.#Zi?.contains(t.target)||this.hideDropdown()}hideDropdown(){this.#Zi?.classList.add("hidden"),this.#Ki.ariaExpanded="false",this.#es?.abort(),this.#es=null}get#os(){return this.#Zi&&!this.#Zi.classList.contains("hidden")}_hideDropdownFromKeyboard(){this.#Qi||(this.#os?(this.hideDropdown(),this.#Ki.focus({preventScroll:!0,focusVisible:this.#Ji})):this.#s?.unselect())}updateColor(t){if(this.#Xi&&(this.#Xi.style.backgroundColor=t),!this.#Zi)return;const e=this.#v.highlightColors.values();for(const n of this.#Zi.children)n.ariaSelected=e.next().value===t.toUpperCase()}destroy(){this.#Ki?.remove(),this.#Ki=null,this.#Xi=null,this.#Zi?.remove(),this.#Zi=null}}class Er{#ls=null;#s=null;#v=null;static#ns=null;constructor(t){this.#s=t,this.#v=t._uiManager,Er.#ns||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#ls)return this.#ls;const{editorType:t,colorType:e,colorValue:n}=this.#s,r=this.#ls=document.createElement("input");return r.type="color",r.value=n||"#000000",r.className="basicColorPicker",r.tabIndex=0,r.setAttribute("data-l10n-id",Er.#ns[t]),r.addEventListener("input",()=>{this.#v.updateParams(e,r.value)},{signal:this.#v._signal}),r}update(t){this.#ls&&(this.#ls.value=t)}destroy(){this.#ls?.remove(),this.#ls=null}hideDropdown(){}}function kr(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function Cr(t){return Math.max(0,Math.min(255,255*t))}class Sr{static CMYK_G(t){let[e,n,r,i]=t;return["G",1-Math.min(1,.3*e+.59*r+.11*n+i)]}static G_CMYK(t){let[e]=t;return["CMYK",0,0,0,1-e]}static G_RGB(t){let[e]=t;return["RGB",e,e,e]}static G_rgb(t){let[e]=t;return e=Cr(e),[e,e,e]}static G_HTML(t){let[e]=t;const n=kr(e);return`#${n}${n}${n}`}static RGB_G(t){let[e,n,r]=t;return["G",.3*e+.59*n+.11*r]}static RGB_rgb(t){return t.map(Cr)}static RGB_HTML(t){return`#${t.map(kr).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(t){let[e,n,r,i]=t;return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,n+i)]}static CMYK_rgb(t){let[e,n,r,i]=t;return[Cr(1-Math.min(1,e+i)),Cr(1-Math.min(1,r+i)),Cr(1-Math.min(1,n+i))]}static CMYK_HTML(t){const e=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(t){let[e,n,r]=t;const i=1-e,s=1-n,a=1-r;return["CMYK",i,s,a,Math.min(i,s,a)]}}class Tr{create(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||e<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),n||(r.setAttribute("width",`${t}px`),r.setAttribute("height",`${e}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${t} ${e}`),r}createElement(t){if("string"!==typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){H("Abstract method `_createSVG` called.")}}class Dr extends Tr{_createSVG(t){return document.createElementNS(ft,t)}}const Mr=new WeakSet,Pr=60*(new Date).getTimezoneOffset()*1e3;class Ir{static create(t){switch(t.data.annotationType){case C.LINK:return new Nr(t);case C.TEXT:return new Lr(t);case C.WIDGET:switch(t.data.fieldType){case"Tx":return new Br(t);case"Btn":return t.data.radioButton?new jr(t):t.data.checkBox?new zr(t):new Ur(t);case"Ch":return new Hr(t);case"Sig":return new $r(t)}return new Or(t);case C.POPUP:return new Vr(t);case C.FREETEXT:return new Wr(t);case C.LINE:return new Gr(t);case C.SQUARE:return new Kr(t);case C.CIRCLE:return new Xr(t);case C.POLYLINE:return new Yr(t);case C.CARET:return new Jr(t);case C.INK:return new Qr(t);case C.POLYGON:return new Zr(t);case C.HIGHLIGHT:return new ti(t);case C.UNDERLINE:return new ei(t);case C.SQUIGGLY:return new ni(t);case C.STRIKEOUT:return new ri(t);case C.STAMP:return new ii(t);case C.FILEATTACHMENT:return new si(t);default:return new Fr(t)}}}class Fr{#cs=null;#hs=!1;#ds=null;constructor(t){let{isRenderable:e=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableComment=t.enableComment,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,e&&(this.container=this._createContainer(n)),r&&this._createQuadrilaterals()}static _hasPopupData(t){let{contentsObj:e,richText:n}=t;return!(!e?.str&&!n?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return Fr._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){const{data:t}=this,e=this.annotationStorage?.getEditor(t.id);return e?e.getData():t}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){const t=this.annotationStorage?.getEditor(this.data.id);if(t)return t.commentButtonPositionInPage;const{quadPoints:e,inkLists:n,rect:r}=this.data;let i=-1/0,s=-1/0;if(e?.length>=8){for(let t=0;t<e.length;t+=8)e[t+1]>s?(s=e[t+1],i=e[t+2]):e[t+1]===s&&(i=Math.max(i,e[t+2]));return[i,s]}if(n?.length>=1){for(const t of n)for(let e=0,n=t.length;e<n;e+=2)t[e+1]>s?(s=t[e+1],i=t[e]):t[e+1]===s&&(i=Math.max(i,t[e]));if(i!==1/0)return[i,s]}return r?[r[2],r[3]]:null}_normalizePoint(t){const{page:{view:e},viewport:{rawDims:{pageWidth:n,pageHeight:r,pageX:i,pageY:s}}}=this.parent;return t[1]=e[3]-t[1]+e[1],t[0]=100*(t[0]-i)/n,t[1]=100*(t[1]-s)/r,t}get commentText(){const{data:t}=this;return this.annotationStorage.getRawValue(`${g}${t.id}`)?.popup?.contents||t.contentsObj?.str||""}set commentText(t){const{data:e}=this,n={deleted:!t,contents:t||""};this.annotationStorage.updateEditor(e.id,{popup:n})||this.annotationStorage.setValue(`${g}${e.id}`,{id:e.id,annotationType:e.annotationType,pageIndex:this.parent.page._pageIndex,popup:n,popupRef:e.popupRef,modificationDate:new Date}),t||this.removePopup()}removePopup(){(this.#ds?.popup||this.popup)?.remove(),this.#ds=this.popup=null}updateEdited(t){if(!this.container)return;t.rect&&(this.#cs||={rect:this.data.rect.slice(0)});const{rect:e,popup:n}=t;e&&this.#us(e);let r=this.#ds?.popup||this.popup;!r&&n?.text&&(this._createPopup(n),r=this.#ds.popup),r&&(r.updateEdited(t),n?.deleted&&(r.remove(),this.#ds=null,this.popup=null))}resetEdited(){this.#cs&&(this.#us(this.#cs.rect),this.#ds?.popup.resetEdited(),this.#cs=null)}#us(t){const{container:{style:e},data:{rect:n,rotation:r},parent:{viewport:{rawDims:{pageWidth:i,pageHeight:s,pageX:a,pageY:o}}}}=this;n?.splice(0,4,...t),e.left=100*(t[0]-a)/i+"%",e.top=100*(s-t[3]+o)/s+"%",0===r?(e.width=100*(t[2]-t[0])/i+"%",e.height=100*(t[3]-t[1])/s+"%"):this.setRotation(r)}_createContainer(t){const{data:e,parent:{page:n,viewport:r}}=this,i=document.createElement("section");i.setAttribute("data-annotation-id",e.id),this instanceof Or||this instanceof Nr||(i.tabIndex=0);const{style:s}=i;if(s.zIndex=this.parent.zIndex,this.parent.zIndex+=2,e.alternativeText&&(i.title=e.alternativeText),e.noRotate&&i.classList.add("norotate"),!e.rect||this instanceof Vr){const{rotation:t}=e;return e.hasOwnCanvas||0===t||this.setRotation(t,i),i}const{width:a,height:o}=this;if(!t&&e.borderStyle.width>0){s.borderWidth=`${e.borderStyle.width}px`;const t=e.borderStyle.horizontalCornerRadius,n=e.borderStyle.verticalCornerRadius;if(t>0||n>0){const e=`calc(${t}px * var(--total-scale-factor)) / calc(${n}px * var(--total-scale-factor))`;s.borderRadius=e}else if(this instanceof jr){const t=`calc(${a}px * var(--total-scale-factor)) / calc(${o}px * var(--total-scale-factor))`;s.borderRadius=t}switch(e.borderStyle.style){case S:s.borderStyle="solid";break;case T:s.borderStyle="dashed";break;case D:U("Unimplemented border style: beveled");break;case M:U("Unimplemented border style: inset");break;case P:s.borderBottomStyle="solid"}const r=e.borderColor||null;r?(this.#hs=!0,s.borderColor=st.makeHexColor(0|r[0],0|r[1],0|r[2])):s.borderWidth=0}const l=st.normalizeRect([e.rect[0],n.view[3]-e.rect[1]+n.view[1],e.rect[2],n.view[3]-e.rect[3]+n.view[1]]),{pageWidth:c,pageHeight:h,pageX:d,pageY:u}=r.rawDims;s.left=100*(l[0]-d)/c+"%",s.top=100*(l[1]-u)/h+"%";const{rotation:p}=e;return e.hasOwnCanvas||0===p?(s.width=100*a/c+"%",s.height=100*o/h+"%"):this.setRotation(p,i),i}setRotation(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(!this.data.rect)return;const{pageWidth:n,pageHeight:r}=this.parent.viewport.rawDims;let{width:i,height:s}=this;t%180!==0&&([i,s]=[s,i]),e.style.width=100*i/n+"%",e.style.height=100*s/r+"%",e.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(t,e,n)=>{const r=n.detail[t],i=r[0],s=r.slice(1);n.target.style[e]=Sr[`${i}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[e]:Sr[`${i}_rgb`](s)})};return G(this,"_commonActions",{display:t=>{const{display:e}=t.detail,n=e%2===1;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:n,noPrint:1===e||2===e})},print:t=>{this.annotationStorage.setValue(this.data.id,{noPrint:!t.detail.print})},hidden:t=>{const{hidden:e}=t.detail;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.target.disabled=t.detail.readonly},required:t=>{this._setRequired(t.target,t.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:t=>{const e=t.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(t,e){const n=this._commonActions;for(const r of Object.keys(e.detail)){const i=t[r]||n[r];i?.(e)}}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const e=this.annotationStorage.getRawValue(this.data.id);if(!e)return;const n=this._commonActions;for(const[r,i]of Object.entries(e)){const s=n[r];if(s){s({detail:{[r]:i},target:t}),delete e[r]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[e,n,r,i]=this.data.rect.map(t=>Math.fround(t));if(8===t.length){const[s,a,o,l]=t.subarray(2,6);if(r===s&&i===a&&e===o&&n===l)return}const{style:s}=this.container;let a;if(this.#hs){const{borderColor:t,borderWidth:e}=s;s.borderWidth=0,a=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${t}" stroke-width="${e}">`],this.container.classList.add("hasBorder")}const o=r-e,l=i-n,{svgFactory:c}=this,h=c.createElement("svg");h.classList.add("quadrilateralsContainer"),h.setAttribute("width",0),h.setAttribute("height",0),h.role="none";const d=c.createElement("defs");h.append(d);const u=c.createElement("clipPath"),p=`clippath_${this.data.id}`;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(let f=2,m=t.length;f<m;f+=8){const n=t[f],r=t[f+1],s=t[f+2],h=t[f+3],d=c.createElement("rect"),p=(s-e)/o,m=(i-r)/l,g=(n-s)/o,v=(r-h)/l;d.setAttribute("x",p),d.setAttribute("y",m),d.setAttribute("width",g),d.setAttribute("height",v),u.append(d),a?.push(`<rect vector-effect="non-scaling-stroke" x="${p}" y="${m}" width="${g}" height="${v}"/>`)}this.#hs&&(a.push("</g></svg>')"),s.backgroundImage=a.join("")),this.container.append(h),this.container.style.clipPath=`url(#${p})`}_createPopup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const{data:e}=this;let n,r;t?(n={str:t.text},r=t.date):(n=e.contentsObj,r=e.modificationDate);const i=this.#ds=new Vr({data:{color:e.color,titleObj:e.titleObj,modificationDate:r,contentsObj:n,richText:e.richText,parentRect:e.rect,borderStyle:0,id:`popup_${e.id}`,rotation:e.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent._commentManager||this.parent.div.append(i.render())}get hasPopupElement(){return!!(this.#ds||this.popup||this.data.popupRef)}get extraPopupElement(){return this.#ds}render(){H("Abstract method `AnnotationElement.render` called")}_getElementsByName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=[];if(this._fieldObjects){const r=this._fieldObjects[t];if(r)for(const{page:t,id:i,exportValues:s}of r){if(-1===t)continue;if(i===e)continue;const r="string"===typeof s?s:null,a=document.querySelector(`[data-element-id="${i}"]`);!a||Mr.has(a)?n.push({id:i,exportValue:r,domElement:a}):U(`_getElementsByName - element not allowed: ${i}`)}return n}for(const r of document.getElementsByName(t)){const{exportValue:t}=r,i=r.getAttribute("data-element-id");i!==e&&(Mr.has(r)&&n.push({id:i,exportValue:t,domElement:r}))}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const e of t)e.classList.add("highlightArea");else t.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:e}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:e,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class Rr extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.editor=t.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){const{editor:t}=this;t.hasComment&&(this._createPopup(t.comment),this.extraPopupElement.popup.renderCommentButton())}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(t){this.editor.comment=t,t||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.container.remove(),this.container=null,this.removePopup()}}class Nr extends Fr{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(t,{isRenderable:!0,ignoreBorder:!!e?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:e}=this,n=document.createElement("a");n.setAttribute("data-element-id",t.id);let r=!1;return t.url?(e.addLinkAttributes(n,t.url,t.newWindow),r=!0):t.action?(this._bindNamedAction(n,t.action,t.overlaidText),r=!0):t.attachment?(this.#ps(n,t.attachment,t.overlaidText,t.attachmentDest),r=!0):t.setOCGState?(this.#fs(n,t.setOCGState,t.overlaidText),r=!0):t.dest?(this._bindLink(n,t.dest,t.overlaidText),r=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,t),r=!0),t.resetForm?(this._bindResetFormAction(n,t.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,""),r=!0)),this.container.classList.add("linkAnnotation"),r&&this.container.append(n),this.container}#ms(){this.container.setAttribute("data-internal-link","")}_bindLink(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.goToDestination(e),!1),(e||""===e)&&this.#ms(),n&&(t.title=n)}_bindNamedAction(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),n&&(t.title=n),this.#ms()}#ps(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;t.href=this.linkService.getAnchorUrl(""),e.description?t.title=e.description:n&&(t.title=n),t.onclick=()=>(this.downloadManager?.openOrDownloadData(e.content,e.filename,r),!1),this.#ms()}#fs(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(e),!1),n&&(t.title=n),this.#ms()}_bindJSAction(t,e){t.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(e.actions)){const i=n.get(r);i&&(t[i]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e.id,name:r}}),!1))}e.overlaidText&&(t.title=e.overlaidText),t.onclick||(t.onclick=()=>!1),this.#ms()}_bindResetFormAction(t,e){const n=t.onclick;if(n||(t.href=this.linkService.getAnchorUrl("")),this.#ms(),!this._fieldObjects)return U('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(t.onclick=()=>!1));t.onclick=()=>{n?.();const{fields:t,refs:r,include:i}=e,s=[];if(0!==t.length||0!==r.length){const e=new Set(r);for(const n of t){const t=this._fieldObjects[n]||[];for(const{id:n}of t)e.add(n)}for(const t of Object.values(this._fieldObjects))for(const n of t)e.has(n.id)===i&&s.push(n)}else for(const e of Object.values(this._fieldObjects))s.push(...e);const a=this.annotationStorage,o=[];for(const e of s){const{id:t}=e;switch(o.push(t),e.type){case"text":{const n=e.defaultValue||"";a.setValue(t,{value:n});break}case"checkbox":case"radiobutton":{const n=e.defaultValue===e.exportValues;a.setValue(t,{value:n});break}case"combobox":case"listbox":{const n=e.defaultValue||"";a.setValue(t,{value:n});break}default:continue}const n=document.querySelector(`[data-element-id="${t}"]`);n&&(Mr.has(n)?n.dispatchEvent(new Event("resetform")):U(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:o,name:"ResetForm"}}),!1}}}class Lr extends Fr{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class Or extends Fr{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&("CANVAS"===t.previousSibling?.nodeName&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return rt.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,e,n,r,i){n.includes("mouse")?t.addEventListener(n,t=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:i(t),shift:t.shiftKey,modifier:this._getKeyModifier(t)}})}):t.addEventListener(n,t=>{if("blur"===n){if(!e.focused||!t.relatedTarget)return;e.focused=!1}else if("focus"===n){if(e.focused)return;e.focused=!0}i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:r,value:i(t)}})})}_setEventListeners(t,e,n,r){for(const[i,s]of n)("Action"===s||this.data.actions?.[s])&&("Focus"!==s&&"Blur"!==s||(e||={focused:!1}),this._setEventListener(t,e,i,s,r),"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(t,e,"focus","Focus",null):this._setEventListener(t,e,"blur","Blur",null))}_setBackgroundColor(t){const e=this.data.backgroundColor||null;t.style.backgroundColor=null===e?"transparent":st.makeHexColor(e[0],e[1],e[2])}_setTextStyle(t){const e=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,r=this.data.defaultAppearanceData.fontSize||9,i=t.style;let s;const o=t=>Math.round(10*t)/10;if(this.data.multiLine){const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2),e=t/(Math.round(t/(a*r))||1);s=Math.min(r,o(e/a))}else{const t=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(r,o(t/a))}i.fontSize=`calc(${s}px * var(--total-scale-factor))`,i.color=st.makeHexColor(n[0],n[1],n[2]),null!==this.data.textAlignment&&(i.textAlign=e[this.data.textAlignment])}_setRequired(t,e){e?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",e)}}class Br extends Or{constructor(t){super(t,{isRenderable:t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue})}setPropertyOnSiblings(t,e,n,r){const i=this.annotationStorage;for(const s of this._getElementsByName(t.name,t.id))s.domElement&&(s.domElement[e]=n),i.setValue(s.id,{[r]:n})}render(){const t=this.annotationStorage,e=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const r=t.getValue(e,{value:this.data.fieldValue});let i=r.value||"";const s=t.getValue(e,{charLimit:this.data.maxLen}).charLimit;s&&i.length>s&&(i=i.slice(0,s));let a=r.formattedValue||this.data.textContent?.join("\n")||null;a&&this.data.comb&&(a=a.replaceAll(/\s+/g,""));const o={userValue:i,formattedValue:a,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=a??i,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type=this.data.password?"password":"text",n.setAttribute("value",a??i),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),Mr.add(n),n.setAttribute("data-element-id",e),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=0;const{datetimeFormat:l,datetimeType:c,timeStep:h}=this.data,d=!!c&&this.enableScripting;l&&(n.title=l),this._setRequired(n,this.data.required),s&&(n.maxLength=s),n.addEventListener("input",r=>{t.setValue(e,{value:r.target.value}),this.setPropertyOnSiblings(n,"value",r.target.value,"value"),o.formattedValue=null}),n.addEventListener("resetform",t=>{const e=this.data.defaultFieldValue??"";n.value=o.userValue=e,o.formattedValue=null});let u=t=>{const{formattedValue:e}=o;null!==e&&void 0!==e&&(t.target.value=e),t.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",t=>{if(o.focused)return;const{target:e}=t;if(d&&(e.type=c,h&&(e.step=h)),o.userValue){const t=o.userValue;if(d)if("time"===c){const n=new Date(t),r=[n.getHours(),n.getMinutes(),n.getSeconds()];e.value=r.map(t=>t.toString().padStart(2,"0")).join(":")}else e.value=new Date(t-Pr).toISOString().split("date"===c?"T":".",1)[0];else e.value=t}o.lastCommittedValue=e.value,o.commitKey=1,this.data.actions?.Focus||(o.focused=!0)}),n.addEventListener("updatefromsandbox",n=>{this.showElementAndHideCanvas(n.target);const r={value(n){o.userValue=n.detail.value??"",d||t.setValue(e,{value:o.userValue.toString()}),n.target.value=o.userValue},formattedValue(n){const{formattedValue:r}=n.detail;o.formattedValue=r,null!==r&&void 0!==r&&n.target!==document.activeElement&&(n.target.value=r);const i={formattedValue:r};d&&(i.value=r),t.setValue(e,i)},selRange(t){t.target.setSelectionRange(...t.detail.selRange)},charLimit:n=>{const{charLimit:r}=n.detail,{target:i}=n;if(0===r)return void i.removeAttribute("maxLength");i.setAttribute("maxLength",r);let s=o.userValue;!s||s.length<=r||(s=s.slice(0,r),i.value=o.userValue=s,t.setValue(e,{value:s}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:s,willCommit:!0,commitKey:1,selStart:i.selectionStart,selEnd:i.selectionEnd}}))}};this._dispatchEventFromSandbox(r,n)}),n.addEventListener("keydown",t=>{o.commitKey=1;let n=-1;if("Escape"===t.key?n=0:"Enter"!==t.key||this.data.multiLine?"Tab"===t.key&&(o.commitKey=3):n=2,-1===n)return;const{value:r}=t.target;o.lastCommittedValue!==r&&(o.lastCommittedValue=r,o.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:r,willCommit:!0,commitKey:n,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}))});const r=u;u=null,n.addEventListener("blur",t=>{if(!o.focused||!t.relatedTarget)return;this.data.actions?.Blur||(o.focused=!1);const{target:n}=t;let{value:i}=n;if(d){if(i&&"time"===c){const t=i.split(":").map(t=>parseInt(t,10));i=new Date(2e3,0,1,t[0],t[1],t[2]||0).valueOf(),n.step=""}else i.includes("T")||(i=`${i}T00:00`),i=new Date(i).valueOf();n.type="text"}o.userValue=i,o.lastCommittedValue!==i&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:i,willCommit:!0,commitKey:o.commitKey,selStart:t.target.selectionStart,selEnd:t.target.selectionEnd}}),r(t)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",t=>{o.lastCommittedValue=null;const{data:n,target:r}=t,{value:i,selectionStart:s,selectionEnd:a}=r;let l=s,c=a;switch(t.inputType){case"deleteWordBackward":{const t=i.substring(0,s).match(/\w*[^\w]*$/);t&&(l-=t[0].length);break}case"deleteWordForward":{const t=i.substring(s).match(/^[^\w]*\w*/);t&&(c+=t[0].length);break}case"deleteContentBackward":s===a&&(l-=1);break;case"deleteContentForward":s===a&&(c+=1)}t.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:i,change:n||"",willCommit:!1,selStart:l,selEnd:c}})}),this._setEventListeners(n,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.value)}if(u&&n.addEventListener("blur",u),this.data.comb){const t=(this.data.rect[2]-this.data.rect[0])/s;n.classList.add("comb"),n.style.letterSpacing=`calc(${t}px * var(--total-scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class $r extends Or{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class zr extends Or{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,e=this.data,n=e.id;let r=t.getValue(n,{value:e.exportValue===e.fieldValue}).value;"string"===typeof r&&(r="Off"!==r,t.setValue(n,{value:r})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const i=document.createElement("input");return Mr.add(i),i.setAttribute("data-element-id",n),i.disabled=e.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=e.fieldName,r&&i.setAttribute("checked",!0),i.setAttribute("exportValue",e.exportValue),i.tabIndex=0,i.addEventListener("change",r=>{const{name:i,checked:s}=r.target;for(const a of this._getElementsByName(i,n)){const n=s&&a.exportValue===e.exportValue;a.domElement&&(a.domElement.checked=n),t.setValue(a.id,{value:n})}t.setValue(n,{value:s})}),i.addEventListener("resetform",t=>{const n=e.defaultFieldValue||"Off";t.target.checked=n===e.exportValue}),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",e=>{const r={value(e){e.target.checked="Off"!==e.detail.value,t.setValue(n,{value:e.target.checked})}};this._dispatchEventFromSandbox(r,e)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.checked)),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class jr extends Or{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,e=this.data,n=e.id;let r=t.getValue(n,{value:e.fieldValue===e.buttonValue}).value;if("string"===typeof r&&(r=r!==e.buttonValue,t.setValue(n,{value:r})),r)for(const s of this._getElementsByName(e.fieldName,n))t.setValue(s.id,{value:!1});const i=document.createElement("input");if(Mr.add(i),i.setAttribute("data-element-id",n),i.disabled=e.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=e.fieldName,r&&i.setAttribute("checked",!0),i.tabIndex=0,i.addEventListener("change",e=>{const{name:r,checked:i}=e.target;for(const s of this._getElementsByName(r,n))t.setValue(s.id,{value:!1});t.setValue(n,{value:i})}),i.addEventListener("resetform",t=>{const n=e.defaultFieldValue;t.target.checked=null!==n&&void 0!==n&&n===e.buttonValue}),this.enableScripting&&this.hasJSActions){const r=e.buttonValue;i.addEventListener("updatefromsandbox",e=>{const i={value:e=>{const i=r===e.detail.value;for(const r of this._getElementsByName(e.target.name)){const e=i&&r.id===n;r.domElement&&(r.domElement.checked=e),t.setValue(r.id,{value:e})}}};this._dispatchEventFromSandbox(i,e)}),this._setEventListeners(i,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],t=>t.target.checked)}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class Ur extends Nr{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const e=t.lastChild;return this.enableScripting&&this.hasJSActions&&e&&(this._setDefaultPropertiesFromJS(e),e.addEventListener("updatefromsandbox",t=>{this._dispatchEventFromSandbox({},t)})),t}}class Hr extends Or{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,e=this.data.id,n=t.getValue(e,{value:this.data.fieldValue}),r=document.createElement("select");Mr.add(r),r.setAttribute("data-element-id",e),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=0;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",t=>{const e=this.data.defaultFieldValue;for(const n of r.options)n.selected=n.value===e});for(const c of this.data.options){const t=document.createElement("option");t.textContent=c.displayValue,t.value=c.exportValue,n.value.includes(c.exportValue)&&(t.setAttribute("selected",!0),i=!1),r.append(t)}let s=null;if(i){const t=document.createElement("option");t.value=" ",t.setAttribute("hidden",!0),t.setAttribute("selected",!0),r.prepend(t),s=()=>{t.remove(),r.removeEventListener("input",s),s=null},r.addEventListener("input",s)}const a=t=>{const e=t?"value":"textContent",{options:n,multiple:i}=r;return i?Array.prototype.filter.call(n,t=>t.selected).map(t=>t[e]):-1===n.selectedIndex?null:n[n.selectedIndex][e]};let o=a(!1);const l=t=>{const e=t.target.options;return Array.prototype.map.call(e,t=>({displayValue:t.textContent,exportValue:t.value}))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",n=>{const i={value(n){s?.();const i=n.detail.value,l=new Set(Array.isArray(i)?i:[i]);for(const t of r.options)t.selected=l.has(t.value);t.setValue(e,{value:a(!0)}),o=a(!1)},multipleSelection(t){r.multiple=!0},remove(n){const i=r.options,s=n.detail.remove;if(i[s].selected=!1,r.remove(s),i.length>0){-1===Array.prototype.findIndex.call(i,t=>t.selected)&&(i[0].selected=!0)}t.setValue(e,{value:a(!0),items:l(n)}),o=a(!1)},clear(n){for(;0!==r.length;)r.remove(0);t.setValue(e,{value:null,items:[]}),o=a(!1)},insert(n){const{index:i,displayValue:s,exportValue:c}=n.detail.insert,h=r.children[i],d=document.createElement("option");d.textContent=s,d.value=c,h?h.before(d):r.append(d),t.setValue(e,{value:a(!0),items:l(n)}),o=a(!1)},items(n){const{items:i}=n.detail;for(;0!==r.length;)r.remove(0);for(const t of i){const{displayValue:e,exportValue:n}=t,i=document.createElement("option");i.textContent=e,i.value=n,r.append(i)}r.options.length>0&&(r.options[0].selected=!0),t.setValue(e,{value:a(!0),items:l(n)}),o=a(!1)},indices(n){const r=new Set(n.detail.indices);for(const t of n.target.options)t.selected=r.has(t.index);t.setValue(e,{value:a(!0)}),o=a(!1)},editable(t){t.target.disabled=!t.detail.editable}};this._dispatchEventFromSandbox(i,n)}),r.addEventListener("input",n=>{const r=a(!0),i=a(!1);t.setValue(e,{value:r}),n.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:e,name:"Keystroke",value:o,change:i,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(r,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],t=>t.target.value)):r.addEventListener("input",function(n){t.setValue(e,{value:a(!0)})}),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class Vr extends Fr{constructor(t){const{data:e,elements:n,parent:r}=t,i=!!r._commentManager;if(super(t,{isRenderable:!i&&Fr._hasPopupData(e)}),this.elements=n,i&&Fr._hasPopupData(e)){const t=this.popup=this.#gs();for(const e of n)e.popup=t}else this.popup=null}#gs(){return new qr({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open,commentManager:this.parent._commentManager})}render(){const{container:t}=this;t.classList.add("popupAnnotation"),t.role="comment";const e=this.popup=this.#gs(),n=[];for(const r of this.elements)r.popup=e,r.container.ariaHasPopup="dialog",n.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",n.map(t=>`${ct}${t}`).join(",")),this.container}}class qr{#$=null;#vs=this.#is.bind(this);#bs=this.#ys.bind(this);#ws=this.#_s.bind(this);#As=this.#xs.bind(this);#Es=null;#_t=null;#ks=null;#Cs=null;#Ss=null;#Ts=null;#Ds=null;#Ms=!1;#Ps=null;#Is=null;#T=null;#Fs=null;#Rs=null;#pe=null;#Ns=null;#ce=null;#Ls=null;#cs=null;#Os=!1;#Bs=null;#$s=null;constructor(t){let{container:e,color:n,elements:r,titleObj:i,modificationDate:s,contentsObj:a,richText:o,parent:l,rect:c,parentRect:h,open:d,commentManager:u=null}=t;this.#_t=e,this.#Ls=i,this.#ks=a,this.#ce=o,this.#Ts=l,this.#Es=n,this.#Ns=c,this.#Ds=h,this.#Ss=r,this.#$=u,this.#Bs=r[0],this.#Cs=kt.toDateObject(s),this.trigger=r.flatMap(t=>t.getElementsToTriggerPopup()),u?this.renderCommentButton():(this.#zs(),this.#_t.hidden=!0,d&&this.#xs())}#zs(){if(this.#Is)return;this.#Is=new AbortController;const{signal:t}=this.#Is;for(const e of this.trigger)e.addEventListener("click",this.#As,{signal:t}),e.addEventListener("pointerenter",this.#ws,{signal:t}),e.addEventListener("pointerleave",this.#bs,{signal:t}),e.classList.add("popupTriggerArea");for(const e of this.#Ss)e.container?.addEventListener("keydown",this.#vs,{signal:t})}#js(){const t=this.#Ss.find(t=>t.hasCommentButton);t&&(this.#Rs=t._normalizePoint(t.commentButtonPosition))}renderCommentButton(){if(this.#Fs)return;if(this.#Rs||this.#js(),!this.#Rs)return;const{signal:t}=this.#Is=new AbortController,e=!!this.#Bs.extraPopupElement,n=()=>{this.#$.toggleCommentPopup(this,!0,void 0,!e)},r=()=>{this.#$.toggleCommentPopup(this,!1,!0,!e)},i=()=>{this.#$.toggleCommentPopup(this,!1,!1)};if(e){this.#Fs=this.#Bs.container;for(const e of this.trigger)e.ariaHasPopup="dialog",e.ariaControls="commentPopup",e.addEventListener("keydown",this.#vs,{signal:t}),e.addEventListener("click",n,{signal:t}),e.addEventListener("pointerenter",r,{signal:t}),e.addEventListener("pointerleave",i,{signal:t}),e.classList.add("popupTriggerArea")}else{const e=this.#Fs=document.createElement("button");e.className="annotationCommentButton";const s=this.#Bs.container;e.style.zIndex=s.style.zIndex+1,e.tabIndex=0,e.ariaHasPopup="dialog",e.ariaControls="commentPopup",e.setAttribute("data-l10n-id","pdfjs-show-comment-button"),this.#Us(),this.#Hs(),e.addEventListener("keydown",this.#vs,{signal:t}),e.addEventListener("click",n,{signal:t}),e.addEventListener("pointerenter",r,{signal:t}),e.addEventListener("pointerleave",i,{signal:t}),s.after(e)}}#Hs(){if(this.#Bs.extraPopupElement&&!this.#Bs.editor)return;this.renderCommentButton();const[t,e]=this.#Rs,{style:n}=this.#Fs;n.left=`calc(${t}%)`,n.top=`calc(${e}% - var(--comment-button-dim))`}#Us(){this.#Bs.extraPopupElement||(this.renderCommentButton(),this.#Fs.style.backgroundColor=this.commentButtonColor||"")}get commentButtonColor(){const{color:t,opacity:e}=this.#Bs.commentData;return t?this.#Ts._commentManager.makeCommentColor(t,e):null}focusCommentButton(){setTimeout(()=>{this.#Fs?.focus()},0)}getData(){const{richText:t,color:e,opacity:n,creationDate:r,modificationDate:i}=this.#Bs.commentData;return{contentsObj:{str:this.comment},richText:t,color:e,opacity:n,creationDate:r,modificationDate:i}}get elementBeforePopup(){return this.#Fs}get comment(){return this.#$s||=this.#Bs.commentText,this.#$s}set comment(t){t!==this.comment&&(this.#Bs.commentText=this.#$s=t)}get parentBoundingClientRect(){return this.#Bs.layer.getBoundingClientRect()}setCommentButtonStates(t){let{selected:e,hasPopup:n}=t;this.#Fs&&(this.#Fs.classList.toggle("selected",e),this.#Fs.ariaExpanded=n)}setSelectedCommentButton(t){this.#Fs.classList.toggle("selected",t)}get commentPopupPosition(){if(this.#pe)return this.#pe;const{x:t,y:e,height:n}=this.#Fs.getBoundingClientRect(),{x:r,y:i,width:s,height:a}=this.#Bs.layer.getBoundingClientRect();return[(t-r)/s,(e+n-i)/a]}set commentPopupPosition(t){this.#pe=t}hasDefaultPopupPosition(){return null===this.#pe}get commentButtonPosition(){return this.#Rs}get commentButtonWidth(){return this.#Fs.getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(t){const[e,n]=this.#pe||this.commentButtonPosition.map(t=>t/100),r=this.parentBoundingClientRect,{x:i,y:s,width:a,height:o}=r;this.#$.showDialog(null,this,i+e*a,s+n*o,{...t,parentDimensions:r})}render(){if(this.#Ps)return;const t=this.#Ps=document.createElement("div");if(t.className="popup",this.#Es){const e=t.style.outlineColor=st.makeHexColor(...this.#Es);t.style.backgroundColor=`color-mix(in srgb, ${e} 30%, white)`}const e=document.createElement("span");if(e.className="header",this.#Ls?.str){const t=document.createElement("span");t.className="title",e.append(t),({dir:t.dir,str:t.textContent}=this.#Ls)}if(t.append(e),this.#Cs){const t=document.createElement("time");t.className="popupDate",t.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),t.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#Cs.valueOf()})),t.dateTime=this.#Cs.toISOString(),e.append(t)}Bt({html:this.#Vs||this.#ks.str,dir:this.#ks?.dir,className:"popupContent"},t),this.#_t.append(t)}get#Vs(){const t=this.#ce,e=this.#ks;return!t?.str||e?.str&&e.str!==t.str?null:this.#ce.html||null}get#qs(){return this.#Vs?.attributes?.style?.fontSize||0}get#Ws(){return this.#Vs?.attributes?.style?.color||null}#Gs(t){const e=[],n={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:e}]}},r={style:{color:this.#Ws,fontSize:this.#qs?`calc(${this.#qs}px * var(--total-scale-factor))`:""}};for(const i of t.split("\n"))e.push({name:"span",value:i,attributes:r});return n}#is(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||("Enter"===t.key||"Escape"===t.key&&this.#Ms)&&this.#xs()}updateEdited(t){let{rect:e,popup:n,deleted:r}=t;if(this.#$)return r?(this.remove(),this.#$s=null):n&&(n.deleted?this.remove():(this.#Us(),this.#$s=n.text)),void(e&&(this.#Rs=null,this.#js(),this.#Hs()));r||n?.deleted?this.remove():(this.#zs(),this.#cs||={contentsObj:this.#ks,richText:this.#ce},e&&(this.#T=null),n&&n.text&&(this.#ce=this.#Gs(n.text),this.#Cs=kt.toDateObject(n.date),this.#ks=null),this.#Ps?.remove(),this.#Ps=null)}resetEdited(){this.#cs&&(({contentsObj:this.#ks,richText:this.#ce}=this.#cs),this.#cs=null,this.#Ps?.remove(),this.#Ps=null,this.#T=null)}remove(){if(this.#Is?.abort(),this.#Is=null,this.#Ps?.remove(),this.#Ps=null,this.#Os=!1,this.#Ms=!1,this.#Fs?.remove(),this.#Fs=null,this.trigger)for(const t of this.trigger)t.classList.remove("popupTriggerArea")}#Ks(){if(null!==this.#T)return;const{page:{view:t},viewport:{rawDims:{pageWidth:e,pageHeight:n,pageX:r,pageY:i}}}=this.#Ts;let s=!!this.#Ds,a=s?this.#Ds:this.#Ns;for(const u of this.#Ss)if(!a||null!==st.intersect(u.data.rect,a)){a=u.data.rect,s=!0;break}const o=st.normalizeRect([a[0],t[3]-a[1]+t[1],a[2],t[3]-a[3]+t[1]]),l=s?a[2]-a[0]+5:0,c=o[0]+l,h=o[1];this.#T=[100*(c-r)/e,100*(h-i)/n];const{style:d}=this.#_t;d.left=`${this.#T[0]}%`,d.top=`${this.#T[1]}%`}#xs(){this.#$?this.#$.toggleCommentPopup(this,!1):(this.#Ms=!this.#Ms,this.#Ms?(this.#_s(),this.#_t.addEventListener("click",this.#As),this.#_t.addEventListener("keydown",this.#vs)):(this.#ys(),this.#_t.removeEventListener("click",this.#As),this.#_t.removeEventListener("keydown",this.#vs)))}#_s(){this.#Ps||this.render(),this.isVisible?this.#Ms&&this.#_t.classList.add("focused"):(this.#Ks(),this.#_t.hidden=!1,this.#_t.style.zIndex=parseInt(this.#_t.style.zIndex)+1e3)}#ys(){this.#_t.classList.remove("focused"),!this.#Ms&&this.isVisible&&(this.#_t.hidden=!0,this.#_t.style.zIndex=parseInt(this.#_t.style.zIndex)-1e3)}forceHide(){this.#Os=this.isVisible,this.#Os&&(this.#_t.hidden=!0)}maybeShow(){this.#$||(this.#zs(),this.#Os&&(this.#Ps||this.#_s(),this.#Os=!1,this.#_t.hidden=!1))}get isVisible(){return!this.#$&&!1===this.#_t.hidden}}class Wr extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=v.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const e of this.textContent){const n=document.createElement("span");n.textContent=e,t.append(n)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class Gr extends Fr{#Xs=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const{data:t,width:e,height:n}=this,r=this.svgFactory.create(e,n,!0),i=this.#Xs=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),i.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),i.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),i.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),i.setAttribute("stroke-width",t.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),r.append(i),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Xs}addHighlightArea(){this.container.classList.add("highlightArea")}}class Kr extends Fr{#Ys=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data:t,width:e,height:n}=this,r=this.svgFactory.create(e,n,!0),i=t.borderStyle.width,s=this.#Ys=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",i/2),s.setAttribute("y",i/2),s.setAttribute("width",e-i),s.setAttribute("height",n-i),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Ys}addHighlightArea(){this.container.classList.add("highlightArea")}}class Xr extends Fr{#Zs=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const{data:t,width:e,height:n}=this,r=this.svgFactory.create(e,n,!0),i=t.borderStyle.width,s=this.#Zs=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",e/2),s.setAttribute("cy",n/2),s.setAttribute("rx",e/2-i/2),s.setAttribute("ry",n/2-i/2),s.setAttribute("stroke-width",i||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),r.append(s),this.container.append(r),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Zs}addHighlightArea(){this.container.classList.add("highlightArea")}}class Yr extends Fr{#Js=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:e,borderStyle:n,popupRef:r},width:i,height:s}=this;if(!e)return this.container;const a=this.svgFactory.create(i,s,!0);let o=[];for(let c=0,h=e.length;c<h;c+=2){const n=e[c]-t[0],r=t[3]-e[c+1];o.push(`${n},${r}`)}o=o.join(" ");const l=this.#Js=this.svgFactory.createElement(this.svgElementName);return l.setAttribute("points",o),l.setAttribute("stroke-width",n.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!r&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Js}addHighlightArea(){this.container.classList.add("highlightArea")}}class Zr extends Yr{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class Jr extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class Qr extends Fr{#Qs=null;#ta=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType="InkHighlight"===this.data.it?v.HIGHLIGHT:v.INK}#ea(t,e){switch(t){case 90:return{transform:`rotate(90) translate(${-e[0]},${e[1]}) scale(1,-1)`,width:e[3]-e[1],height:e[2]-e[0]};case 180:return{transform:`rotate(180) translate(${-e[2]},${e[1]}) scale(1,-1)`,width:e[2]-e[0],height:e[3]-e[1]};case 270:return{transform:`rotate(270) translate(${-e[2]},${e[3]}) scale(1,-1)`,width:e[3]-e[1],height:e[2]-e[0]};default:return{transform:`translate(${-e[0]},${e[3]}) scale(1,-1)`,width:e[2]-e[0],height:e[3]-e[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,rotation:e,inkLists:n,borderStyle:r,popupRef:i}}=this,{transform:s,width:a,height:o}=this.#ea(e,t),l=this.svgFactory.create(a,o,!0),c=this.#Qs=this.svgFactory.createElement("svg:g");l.append(c),c.setAttribute("stroke-width",r.width||1),c.setAttribute("stroke-linecap","round"),c.setAttribute("stroke-linejoin","round"),c.setAttribute("stroke-miterlimit",10),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),c.setAttribute("transform",s);for(let h=0,d=n.length;h<d;h++){const t=this.svgFactory.createElement(this.svgElementName);this.#ta.push(t),t.setAttribute("points",n[h].join(",")),c.append(t)}return!i&&this.hasPopupData&&this._createPopup(),this.container.append(l),this._editOnDoubleClick(),this.container}updateEdited(t){super.updateEdited(t);const{thickness:e,points:n,rect:r}=t,i=this.#Qs;if(e>=0&&i.setAttribute("stroke-width",e||1),n)for(let s=0,a=this.#ta.length;s<a;s++)this.#ta[s].setAttribute("points",n[s].join(","));if(r){const{transform:t,width:e,height:n}=this.#ea(this.data.rotation,r);i.parentElement.setAttribute("viewBox",`0 0 ${e} ${n}`),i.setAttribute("transform",t)}}getElementsToTriggerPopup(){return this.#ta}addHighlightArea(){this.container.classList.add("highlightArea")}}class ti extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=v.HIGHLIGHT}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),t){const e=document.createElement("mark");e.classList.add("overlaidText"),e.textContent=t,this.container.append(e)}return this.container}}class ei extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),t){const e=document.createElement("u");e.classList.add("overlaidText"),e.textContent=t,this.container.append(e)}return this.container}}class ni extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),t){const e=document.createElement("u");e.classList.add("overlaidText"),e.textContent=t,this.container.append(e)}return this.container}}class ri extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText:t,popupRef:e}}=this;if(!e&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),t){const e=document.createElement("s");e.classList.add("overlaidText"),e.textContent=t,this.container.append(e)}return this.container}}class ii extends Fr{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=v.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class si extends Fr{#na=null;constructor(t){super(t,{isRenderable:!0});const{file:e}=this.data;this.filename=e.filename,this.content=e.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...e})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:e}=this;let n;e.hasAppearance||0===e.fillAlpha?n=document.createElement("div"):(n=document.createElement("img"),n.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(e.name)?"paperclip":"pushpin"}.svg`,e.fillAlpha&&e.fillAlpha<1&&(n.style=`filter: opacity(${Math.round(100*e.fillAlpha)}%);`)),n.addEventListener("dblclick",this.#ra.bind(this)),this.#na=n;const{isMac:r}=rt.platform;return t.addEventListener("keydown",t=>{"Enter"===t.key&&(r?t.metaKey:t.ctrlKey)&&this.#ra()}),!e.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),t.append(n),t}getElementsToTriggerPopup(){return this.#na}addHighlightArea(){this.container.classList.add("highlightArea")}#ra(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class ai{#ia=null;#sa=null;#L=null;#aa=(()=>new Map)();#oa=null;#la=null;constructor(t){let{div:e,accessibilityManager:n,annotationCanvasMap:r,annotationEditorUIManager:i,page:s,viewport:a,structTreeLayer:o,commentManager:l,linkService:c,annotationStorage:h}=t;this.div=e,this.#ia=n,this.#sa=r,this.#oa=o||null,this.#la=c||null,this.#L=h||new ie,this.page=s,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i,this._commentManager=l||null}hasEditableAnnotations(){return this.#aa.size>0}async#ca(t,e,n){const r=t.firstChild||t,i=r.id=`${ct}${e}`,s=await(this.#oa?.getAriaAttributes(i));if(s)for(const[a,o]of s)r.setAttribute(a,o);n?n.at(-1).container.after(t):(this.div.append(t),this.#ia?.moveElementInDOM(this.div,t,r,!1))}async render(t){const{annotations:e}=t,n=this.div;Dt(n,this.viewport);const r=new Map,i={data:null,layer:n,linkService:this.#la,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new Dr,annotationStorage:this.#L,enableComment:!0===t.enableComment,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const s of e){if(s.noHTML)continue;const t=s.annotationType===C.POPUP;if(t){const t=r.get(s.id);if(!t)continue;i.elements=t}else if(s.rect[2]===s.rect[0]||s.rect[3]===s.rect[1])continue;i.data=s;const e=Ir.create(i);if(!e.isRenderable)continue;if(!t&&s.popupRef){const t=r.get(s.popupRef);t?t.push(e):r.set(s.popupRef,[e])}const n=e.render();s.hidden&&(n.style.visibility="hidden"),await this.#ca(n,s.id,i.elements),e.extraPopupElement?.popup?.renderCommentButton(),e._isEditable&&(this.#aa.set(e.data.id,e),this._annotationEditorUIManager?.renderAnnotationElement(e))}this.#ha()}async addLinkAnnotations(t){const e={data:null,layer:this.div,linkService:this.#la,svgFactory:new Dr,parent:this};for(const n of t){n.borderStyle||=ai._defaultBorderStyle,e.data=n;const t=Ir.create(e);if(!t.isRenderable)continue;const r=t.render();await this.#ca(r,n.id,null)}}update(t){let{viewport:e}=t;const n=this.div;this.viewport=e,Dt(n,{rotation:e.rotation}),this.#ha(),n.hidden=!1}#ha(){if(!this.#sa)return;const t=this.div;for(const[e,n]of this.#sa){const r=t.querySelector(`[data-annotation-id="${e}"]`);if(!r)continue;n.className="annotationContent";const{firstChild:i}=r;i?"CANVAS"===i.nodeName?i.replaceWith(n):i.classList.contains("annotationContent")?i.after(n):i.before(n):r.append(n);const s=this.#aa.get(e);s&&(s._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(e,r.id,n),s._hasNoCanvas=!1):s.canvas=n)}this.#sa.clear()}getEditableAnnotations(){return Array.from(this.#aa.values())}getEditableAnnotation(t){return this.#aa.get(t)}addFakeAnnotation(t){const{div:e}=this,{id:n,rotation:r}=t,i=new Rr({data:{id:n,rect:t.getPDFRect(),rotation:r},editor:t,layer:e,parent:this,enableComment:!!this._commentManager,linkService:this.#la,annotationStorage:this.#L}),s=i.render();return e.append(s),this.#ia?.moveElementInDOM(e,s,s,!1),i.createOrUpdatePopup(),i}static get _defaultBorderStyle(){return G(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:S,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}const oi=/\r\n?|\n/g;class li extends Zt{#da="";#ua=`${this.id}-editor`;#pa=null;#qs;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=li.prototype,e=t=>t.isEmpty(),n=Gt.TRANSLATE_SMALL,r=Gt.TRANSLATE_BIG;return G(this,"_keyboardManager",new qt([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:e}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-r,0],checker:e}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:e}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[r,0],checker:e}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:e}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-r],checker:e}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:e}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,r],checker:e}]]))}static _type="freetext";static _editorType=(()=>v.FREETEXT)();constructor(t){super({...t,name:"freeTextEditor"}),this.color=t.color||li._defaultColor||Zt._defaultLineColor,this.#qs=t.fontSize||li._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(t,e){Zt.initialize(t,e);const n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,e){switch(t){case b.FREETEXT_SIZE:li._defaultFontSize=e;break;case b.FREETEXT_COLOR:li._defaultColor=e}}updateParams(t,e){switch(t){case b.FREETEXT_SIZE:this.#fa(e);break;case b.FREETEXT_COLOR:this.#Us(e)}}static get defaultPropertiesToUpdate(){return[[b.FREETEXT_SIZE,li._defaultFontSize],[b.FREETEXT_COLOR,li._defaultColor||Zt._defaultLineColor]]}get propertiesToUpdate(){return[[b.FREETEXT_SIZE,this.#qs],[b.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||=new Er(this),[["colorPicker",this._colorPicker]]}get colorType(){return b.FREETEXT_COLOR}#fa(t){const e=t=>{this.editorDiv.style.fontSize=`calc(${t}px * var(--total-scale-factor))`,this.translate(0,-(t-this.#qs)*this.parentScale),this.#qs=t,this.#ma()},n=this.#qs;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:b.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}onUpdatedColor(){this.editorDiv.style.color=this.color,this._colorPicker?.update(this.color),super.onUpdatedColor()}#Us(t){const e=t=>{this.color=t,this.onUpdatedColor()},n=this.color;this.addCommands({cmd:e.bind(this,t),undo:e.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:b.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,e){this._uiManager.translateSelectedEditors(t,e,!0)}getInitialTranslation(){const t=this.parentScale;return[-li._internalPadding*t,-(li._internalPadding+this.#qs)*t]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#pa=new AbortController;const t=this._uiManager.combinedSignal(this.#pa);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:t}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:t}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:t}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:t}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:t}),!0}disableEditMode(){return!!super.disableEditMode()&&(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#ua),this._isDraggable=!0,this.#pa?.abort(),this.#pa=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0)}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(t){this.width||(this.enableEditMode(),t&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#ga(){const t=[];this.editorDiv.normalize();let e=null;for(const n of this.editorDiv.childNodes)e?.nodeType===Node.TEXT_NODE&&"BR"===n.nodeName||(t.push(li.#va(n)),e=n);return t.join("\n")}#ma(){const[t,e]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:t,div:e}=this,r=e.style.display,i=e.classList.contains("hidden");e.classList.remove("hidden"),e.style.display="hidden",t.div.append(this.div),n=e.getBoundingClientRect(),e.remove(),e.style.display=r,e.classList.toggle("hidden",i)}this.rotation%180===this.parentRotation%180?(this.width=n.width/t,this.height=n.height/e):(this.width=n.height/t,this.height=n.width/e),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#da,e=this.#da=this.#ga().trimEnd();if(t===e)return;const n=t=>{this.#da=t,t?(this.#ba(),this._uiManager.rebuild(this),this.#ma()):this.remove()};this.addCommands({cmd:()=>{n(e)},undo:()=>{n(t)},mustExec:!1}),this.#ma()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(t){t.target===this.div&&"Enter"===t.key&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){li._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let t,e;(this._isCopy||this.annotationElementId)&&(t=this.x,e=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#ua),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#qs}px * var(--total-scale-factor))`,n.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[n,r]=this.parentDimensions;if(this.annotationElementId){const{position:i}=this._initialData;let[s,a]=this.getInitialTranslation();[s,a]=this.pageTranslationToScreen(s,a);const[o,l]=this.pageDimensions,[c,h]=this.pageTranslation;let d,u;switch(this.rotation){case 0:d=t+(i[0]-c)/o,u=e+this.height-(i[1]-h)/l;break;case 90:d=t+(i[0]-c)/o,u=e-(i[1]-h)/l,[s,a]=[a,-s];break;case 180:d=t-this.width+(i[0]-c)/o,u=e-(i[1]-h)/l,[s,a]=[-s,-a];break;case 270:d=t+(i[0]-c-this.height*l)/o,u=e+(i[1]-h-this.width*o)/l,[s,a]=[-a,s]}this.setAt(d*n,u*r,s,a)}else this._moveAfterPaste(t,e);this.#ba(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#va(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll(oi,"")}editorDivPaste(t){const e=t.clipboardData||window.clipboardData,{types:n}=e;if(1===n.length&&"text/plain"===n[0])return;t.preventDefault();const r=li.#ya(e.getData("text")||"").replaceAll(oi,"\n");if(!r)return;const i=window.getSelection();if(!i.rangeCount)return;this.editorDiv.normalize(),i.deleteFromDocument();const s=i.getRangeAt(0);if(!r.includes("\n"))return s.insertNode(document.createTextNode(r)),this.editorDiv.normalize(),void i.collapseToStart();const{startContainer:a,startOffset:o}=s,l=[],c=[];if(a.nodeType===Node.TEXT_NODE){const t=a.parentElement;if(c.push(a.nodeValue.slice(o).replaceAll(oi,"")),t!==this.editorDiv){let e=l;for(const n of this.editorDiv.childNodes)n!==t?e.push(li.#va(n)):e=c}l.push(a.nodeValue.slice(0,o).replaceAll(oi,""))}else if(a===this.editorDiv){let t=l,e=0;for(const n of this.editorDiv.childNodes)e++===o&&(t=c),t.push(li.#va(n))}this.#da=`${l.join("\n")}${r}${c.join("\n")}`,this.#ba();const h=new Range;let d=Math.sumPrecise(l.map(t=>t.length));for(const{firstChild:u}of this.editorDiv.childNodes)if(u.nodeType===Node.TEXT_NODE){const t=u.nodeValue.length;if(d<=t){h.setStart(u,d),h.setEnd(u,d);break}d-=t}i.removeAllRanges(),i.addRange(h)}#ba(){if(this.editorDiv.replaceChildren(),this.#da)for(const t of this.#da.split("\n")){const e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}#wa(){return this.#da.replaceAll("\xa0"," ")}static#ya(t){return t.replaceAll(" ","\xa0")}get contentDiv(){return this.editorDiv}getPDFRect(){const t=li._internalPadding*this.parentScale;return this.getRect(t,t)}static async deserialize(t,e,n){let r=null;if(t instanceof Wr){const{data:{defaultAppearanceData:{fontSize:e,fontColor:n},rect:i,rotation:s,id:a,popupRef:o,richText:l,contentsObj:c,creationDate:h,modificationDate:d},textContent:u,textPosition:p,parent:{page:{pageNumber:f}}}=t;if(!u||0===u.length)return null;r=t={annotationType:v.FREETEXT,color:Array.from(n),fontSize:e,value:u.join("\n"),position:p,pageIndex:f-1,rect:i.slice(0),rotation:s,annotationElementId:a,id:a,deleted:!1,popupRef:o,comment:c?.str||null,richText:l,creationDate:h,modificationDate:d}}const i=await super.deserialize(t,e,n);return i.#qs=t.fontSize,i.color=st.makeHexColor(...t.color),i.#da=li.#ya(t.value),i._initialData=r,t.comment&&i.setCommentData(t),i}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const e=Zt._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),n=Object.assign(super.serialize(t),{color:e,fontSize:this.#qs,value:this.#wa()});return this.addComment(n),t?(n.isCopy=!0,n):this.annotationElementId&&!this.#_a(n)?null:(n.id=this.annotationElementId,n)}#_a(t){const{value:e,fontSize:n,color:r,pageIndex:i}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||t.value!==e||t.fontSize!==n||t.color.some((t,e)=>t!==r[e])||t.pageIndex!==i}renderAnnotationElement(t){const e=super.renderAnnotationElement(t);if(!e)return null;const{style:n}=e;n.fontSize=`calc(${this.#qs}px * var(--total-scale-factor))`,n.color=this.color,e.replaceChildren();for(const r of this.#da.split("\n")){const t=document.createElement("div");t.append(r?document.createTextNode(r):document.createElement("br")),e.append(t)}return t.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:this.#da}}),e}resetAnnotationElement(t){super.resetAnnotationElement(t),t.resetEdited()}}class ci{static PRECISION=1e-4;toSVGPath(){H("Abstract method `toSVGPath` must be implemented.")}get box(){H("Abstract getter `box` must be implemented.")}serialize(t,e){H("Abstract method `serialize` must be implemented.")}static _rescale(t,e,n,r,i,s){s||=new Float32Array(t.length);for(let a=0,o=t.length;a<o;a+=2)s[a]=e+t[a]*r,s[a+1]=n+t[a+1]*i;return s}static _rescaleAndSwap(t,e,n,r,i,s){s||=new Float32Array(t.length);for(let a=0,o=t.length;a<o;a+=2)s[a]=e+t[a+1]*r,s[a+1]=n+t[a]*i;return s}static _translate(t,e,n,r){r||=new Float32Array(t.length);for(let i=0,s=t.length;i<s;i+=2)r[i]=e+t[i],r[i+1]=n+t[i+1];return r}static svgRound(t){return Math.round(1e4*t)}static _normalizePoint(t,e,n,r,i){switch(i){case 90:return[1-e/n,t/r];case 180:return[1-t/n,1-e/r];case 270:return[e/n,1-t/r];default:return[t/n,e/r]}}static _normalizePagePoint(t,e,n){switch(n){case 90:return[1-e,t];case 180:return[1-t,1-e];case 270:return[e,1-t];default:return[t,e]}}static createBezierPoints(t,e,n,r,i,s){return[(t+5*n)/6,(e+5*r)/6,(5*n+i)/6,(5*r+s)/6,(n+i)/2,(r+s)/2]}}class hi{#Aa;#xa=[];#Ea;#ka;#Ca=[];#Sa=(()=>new Float32Array(18))();#Ta;#Da;#Ma;#Pa;#Ia;#Fa;#Ra=[];static#Na=8;static#La=2;static#Oa=(()=>hi.#Na+hi.#La)();constructor(t,e,n,r,i){let{x:s,y:a}=t,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this.#Aa=e,this.#Fa=r*n,this.#ka=i,this.#Sa.set([NaN,NaN,NaN,NaN,s,a],6),this.#Ea=o,this.#Pa=hi.#Na*n,this.#Ma=hi.#Oa*n,this.#Ia=n,this.#Ra.push(s,a)}isEmpty(){return isNaN(this.#Sa[8])}#Ba(){const t=this.#Sa.subarray(4,6),e=this.#Sa.subarray(16,18),[n,r,i,s]=this.#Aa;return[(this.#Ta+(t[0]-e[0])/2-n)/i,(this.#Da+(t[1]-e[1])/2-r)/s,(this.#Ta+(e[0]-t[0])/2-n)/i,(this.#Da+(e[1]-t[1])/2-r)/s]}add(t){let{x:e,y:n}=t;this.#Ta=e,this.#Da=n;const[r,i,s,a]=this.#Aa;let[o,l,c,h]=this.#Sa.subarray(8,12);const d=e-c,u=n-h,p=Math.hypot(d,u);if(p<this.#Ma)return!1;const f=p-this.#Pa,m=f/p,g=m*d,v=m*u;let b=o,y=l;o=c,l=h,c+=g,h+=v,this.#Ra?.push(e,n);const w=g/f,_=-v/f*this.#Fa,A=w*this.#Fa;if(this.#Sa.set(this.#Sa.subarray(2,8),0),this.#Sa.set([c+_,h+A],4),this.#Sa.set(this.#Sa.subarray(14,18),12),this.#Sa.set([c-_,h-A],16),isNaN(this.#Sa[6]))return 0===this.#Ca.length&&(this.#Sa.set([o+_,l+A],2),this.#Ca.push(NaN,NaN,NaN,NaN,(o+_-r)/s,(l+A-i)/a),this.#Sa.set([o-_,l-A],14),this.#xa.push(NaN,NaN,NaN,NaN,(o-_-r)/s,(l-A-i)/a)),this.#Sa.set([b,y,o,l,c,h],6),!this.isEmpty();this.#Sa.set([b,y,o,l,c,h],6);return Math.abs(Math.atan2(y-l,b-o)-Math.atan2(v,g))<Math.PI/2?([o,l,c,h]=this.#Sa.subarray(2,6),this.#Ca.push(NaN,NaN,NaN,NaN,((o+c)/2-r)/s,((l+h)/2-i)/a),[o,l,b,y]=this.#Sa.subarray(14,18),this.#xa.push(NaN,NaN,NaN,NaN,((b+o)/2-r)/s,((y+l)/2-i)/a),!0):([b,y,o,l,c,h]=this.#Sa.subarray(0,6),this.#Ca.push(((b+5*o)/6-r)/s,((y+5*l)/6-i)/a,((5*o+c)/6-r)/s,((5*l+h)/6-i)/a,((o+c)/2-r)/s,((l+h)/2-i)/a),[c,h,o,l,b,y]=this.#Sa.subarray(12,18),this.#xa.push(((b+5*o)/6-r)/s,((y+5*l)/6-i)/a,((5*o+c)/6-r)/s,((5*l+h)/6-i)/a,((o+c)/2-r)/s,((l+h)/2-i)/a),!0)}toSVGPath(){if(this.isEmpty())return"";const t=this.#Ca,e=this.#xa;if(isNaN(this.#Sa[6])&&!this.isEmpty())return this.#$a();const n=[];n.push(`M${t[4]} ${t[5]}`);for(let r=6;r<t.length;r+=6)isNaN(t[r])?n.push(`L${t[r+4]} ${t[r+5]}`):n.push(`C${t[r]} ${t[r+1]} ${t[r+2]} ${t[r+3]} ${t[r+4]} ${t[r+5]}`);this.#za(n);for(let r=e.length-6;r>=6;r-=6)isNaN(e[r])?n.push(`L${e[r+4]} ${e[r+5]}`):n.push(`C${e[r]} ${e[r+1]} ${e[r+2]} ${e[r+3]} ${e[r+4]} ${e[r+5]}`);return this.#ja(n),n.join(" ")}#$a(){const[t,e,n,r]=this.#Aa,[i,s,a,o]=this.#Ba();return`M${(this.#Sa[2]-t)/n} ${(this.#Sa[3]-e)/r} L${(this.#Sa[4]-t)/n} ${(this.#Sa[5]-e)/r} L${i} ${s} L${a} ${o} L${(this.#Sa[16]-t)/n} ${(this.#Sa[17]-e)/r} L${(this.#Sa[14]-t)/n} ${(this.#Sa[15]-e)/r} Z`}#ja(t){const e=this.#xa;t.push(`L${e[4]} ${e[5]} Z`)}#za(t){const[e,n,r,i]=this.#Aa,s=this.#Sa.subarray(4,6),a=this.#Sa.subarray(16,18),[o,l,c,h]=this.#Ba();t.push(`L${(s[0]-e)/r} ${(s[1]-n)/i} L${o} ${l} L${c} ${h} L${(a[0]-e)/r} ${(a[1]-n)/i}`)}newFreeDrawOutline(t,e,n,r,i,s){return new di(t,e,n,r,i,s)}getOutlines(){const t=this.#Ca,e=this.#xa,n=this.#Sa,[r,i,s,a]=this.#Aa,o=new Float32Array((this.#Ra?.length??0)+2);for(let h=0,d=o.length-2;h<d;h+=2)o[h]=(this.#Ra[h]-r)/s,o[h+1]=(this.#Ra[h+1]-i)/a;if(o[o.length-2]=(this.#Ta-r)/s,o[o.length-1]=(this.#Da-i)/a,isNaN(n[6])&&!this.isEmpty())return this.#Ua(o);const l=new Float32Array(this.#Ca.length+24+this.#xa.length);let c=t.length;for(let h=0;h<c;h+=2)isNaN(t[h])?l[h]=l[h+1]=NaN:(l[h]=t[h],l[h+1]=t[h+1]);c=this.#Ha(l,c);for(let h=e.length-6;h>=6;h-=6)for(let t=0;t<6;t+=2)isNaN(e[h+t])?(l[c]=l[c+1]=NaN,c+=2):(l[c]=e[h+t],l[c+1]=e[h+t+1],c+=2);return this.#Va(l,c),this.newFreeDrawOutline(l,o,this.#Aa,this.#Ia,this.#Ea,this.#ka)}#Ua(t){const e=this.#Sa,[n,r,i,s]=this.#Aa,[a,o,l,c]=this.#Ba(),h=new Float32Array(36);return h.set([NaN,NaN,NaN,NaN,(e[2]-n)/i,(e[3]-r)/s,NaN,NaN,NaN,NaN,(e[4]-n)/i,(e[5]-r)/s,NaN,NaN,NaN,NaN,a,o,NaN,NaN,NaN,NaN,l,c,NaN,NaN,NaN,NaN,(e[16]-n)/i,(e[17]-r)/s,NaN,NaN,NaN,NaN,(e[14]-n)/i,(e[15]-r)/s],0),this.newFreeDrawOutline(h,t,this.#Aa,this.#Ia,this.#Ea,this.#ka)}#Va(t,e){const n=this.#xa;return t.set([NaN,NaN,NaN,NaN,n[4],n[5]],e),e+6}#Ha(t,e){const n=this.#Sa.subarray(4,6),r=this.#Sa.subarray(16,18),[i,s,a,o]=this.#Aa,[l,c,h,d]=this.#Ba();return t.set([NaN,NaN,NaN,NaN,(n[0]-i)/a,(n[1]-s)/o,NaN,NaN,NaN,NaN,l,c,NaN,NaN,NaN,NaN,h,d,NaN,NaN,NaN,NaN,(r[0]-i)/a,(r[1]-s)/o],e),e+24}}class di extends ci{#Aa;#qa=(()=>new Float32Array(4))();#Ea;#ka;#Ra;#Ia;#Wa;constructor(t,e,n,r,i,s){super(),this.#Wa=t,this.#Ra=e,this.#Aa=n,this.#Ia=r,this.#Ea=i,this.#ka=s,this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],this.#Ga(s);const[a,o,l,c]=this.#qa;for(let h=0,d=t.length;h<d;h+=2)t[h]=(t[h]-a)/l,t[h+1]=(t[h+1]-o)/c;for(let h=0,d=e.length;h<d;h+=2)e[h]=(e[h]-a)/l,e[h+1]=(e[h+1]-o)/c}toSVGPath(){const t=[`M${this.#Wa[4]} ${this.#Wa[5]}`];for(let e=6,n=this.#Wa.length;e<n;e+=6)isNaN(this.#Wa[e])?t.push(`L${this.#Wa[e+4]} ${this.#Wa[e+5]}`):t.push(`C${this.#Wa[e]} ${this.#Wa[e+1]} ${this.#Wa[e+2]} ${this.#Wa[e+3]} ${this.#Wa[e+4]} ${this.#Wa[e+5]}`);return t.push("Z"),t.join(" ")}serialize(t,e){let[n,r,i,s]=t;const a=i-n,o=s-r;let l,c;switch(e){case 0:l=ci._rescale(this.#Wa,n,s,a,-o),c=ci._rescale(this.#Ra,n,s,a,-o);break;case 90:l=ci._rescaleAndSwap(this.#Wa,n,r,a,o),c=ci._rescaleAndSwap(this.#Ra,n,r,a,o);break;case 180:l=ci._rescale(this.#Wa,i,r,-a,o),c=ci._rescale(this.#Ra,i,r,-a,o);break;case 270:l=ci._rescaleAndSwap(this.#Wa,i,s,-a,-o),c=ci._rescaleAndSwap(this.#Ra,i,s,-a,-o)}return{outline:Array.from(l),points:[Array.from(c)]}}#Ga(t){const e=this.#Wa;let n=e[4],r=e[5];const i=[n,r,n,r];let s=n,a=r,o=n,l=r;const c=t?Math.max:Math.min,h=new Float32Array(4);for(let u=6,p=e.length;u<p;u+=6){const t=e[u+4],d=e[u+5];isNaN(e[u])?(st.pointBoundingBox(t,d,i),a>d?(s=t,a=d):a===d&&(s=c(s,t)),l<d?(o=t,l=d):l===d&&(o=c(o,t))):(h[0]=h[1]=1/0,h[2]=h[3]=-1/0,st.bezierBoundingBox(n,r,...e.slice(u,u+6),h),st.rectBoundingBox(h[0],h[1],h[2],h[3],i),a>h[1]?(s=h[0],a=h[1]):a===h[1]&&(s=c(s,h[0])),l<h[3]?(o=h[2],l=h[3]):l===h[3]&&(o=c(o,h[2]))),n=t,r=d}const d=this.#qa;d[0]=i[0]-this.#Ea,d[1]=i[1]-this.#Ea,d[2]=i[2]-i[0]+2*this.#Ea,d[3]=i[3]-i[1]+2*this.#Ea,this.firstPoint=[s,a],this.lastPoint=[o,l]}get box(){return this.#qa}newOutliner(t,e,n,r,i){return new hi(t,e,n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0)}getNewOutline(t,e){const[n,r,i,s]=this.#qa,[a,o,l,c]=this.#Aa,h=i*l,d=s*c,u=n*l+a,p=r*c+o,f=this.newOutliner({x:this.#Ra[0]*h+u,y:this.#Ra[1]*d+p},this.#Aa,this.#Ia,t,this.#ka,e??this.#Ea);for(let m=2;m<this.#Ra.length;m+=2)f.add({x:this.#Ra[m]*h+u,y:this.#Ra[m+1]*d+p});return f.getOutlines()}}class ui{#Aa;#Ka;#Xa;#Ya=[];#Za=[];constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const i=[1/0,1/0,-1/0,-1/0],s=10**-4;for(const{x:f,y:m,width:g,height:v}of t){const t=Math.floor((f-e)/s)*s,n=Math.ceil((f+g+e)/s)*s,r=Math.floor((m-e)/s)*s,a=Math.ceil((m+v+e)/s)*s,o=[t,r,a,!0],l=[n,r,a,!1];this.#Ya.push(o,l),st.rectBoundingBox(t,r,n,a,i)}const a=i[2]-i[0]+2*n,o=i[3]-i[1]+2*n,l=i[0]-n,c=i[1]-n;let h=r?-1/0:1/0,d=1/0;const u=this.#Ya.at(r?-1:-2),p=[u[0],u[2]];for(const f of this.#Ya){const[t,e,n,i]=f;!i&&r?e<d?(d=e,h=t):e===d&&(h=Math.max(h,t)):i&&!r&&(e<d?(d=e,h=t):e===d&&(h=Math.min(h,t))),f[0]=(t-l)/a,f[1]=(e-c)/o,f[2]=(n-c)/o}this.#Aa=new Float32Array([l,c,a,o]),this.#Ka=[h,d],this.#Xa=p}getOutlines(){this.#Ya.sort((t,e)=>t[0]-e[0]||t[1]-e[1]||t[2]-e[2]);const t=[];for(const e of this.#Ya)e[3]?(t.push(...this.#Ja(e)),this.#Qa(e)):(this.#to(e),t.push(...this.#Ja(e)));return this.#eo(t)}#eo(t){const e=[],n=new Set;for(const s of t){const[t,n,r]=s;e.push([t,n,s],[t,r,s])}e.sort((t,e)=>t[1]-e[1]||t[0]-e[0]);for(let s=0,a=e.length;s<a;s+=2){const t=e[s][2],r=e[s+1][2];t.push(r),r.push(t),n.add(t),n.add(r)}const r=[];let i;for(;n.size>0;){const t=n.values().next().value;let[e,s,a,o,l]=t;n.delete(t);let c=e,h=s;for(i=[e,a],r.push(i);;){let t;if(n.has(o))t=o;else{if(!n.has(l))break;t=l}n.delete(t),[e,s,a,o,l]=t,c!==e&&(i.push(c,h,e,h===s?s:a),c=e),h=h===s?a:s}i.push(c,h)}return new pi(r,this.#Aa,this.#Ka,this.#Xa)}#no(t){const e=this.#Za;let n=0,r=e.length-1;for(;n<=r;){const i=n+r>>1,s=e[i][0];if(s===t)return i;s<t?n=i+1:r=i-1}return r+1}#Qa(t){let[,e,n]=t;const r=this.#no(e);this.#Za.splice(r,0,[e,n])}#to(t){let[,e,n]=t;const r=this.#no(e);for(let i=r;i<this.#Za.length;i++){const[t,r]=this.#Za[i];if(t!==e)break;if(t===e&&r===n)return void this.#Za.splice(i,1)}for(let i=r-1;i>=0;i--){const[t,r]=this.#Za[i];if(t!==e)break;if(t===e&&r===n)return void this.#Za.splice(i,1)}}#Ja(t){const[e,n,r]=t,i=[[e,n,r]],s=this.#no(r);for(let a=0;a<s;a++){const[t,n]=this.#Za[a];for(let r=0,s=i.length;r<s;r++){const[,a,o]=i[r];if(!(n<=a||o<=t))if(a>=t)if(o>n)i[r][1]=n;else{if(1===s)return[];i.splice(r,1),r--,s--}else i[r][2]=t,o>n&&i.push([e,n,o])}}return i}}class pi extends ci{#Aa;#ro;constructor(t,e,n,r){super(),this.#ro=t,this.#Aa=e,this.firstPoint=n,this.lastPoint=r}toSVGPath(){const t=[];for(const e of this.#ro){let[n,r]=e;t.push(`M${n} ${r}`);for(let i=2;i<e.length;i+=2){const s=e[i],a=e[i+1];s===n?(t.push(`V${a}`),r=a):a===r&&(t.push(`H${s}`),n=s)}t.push("Z")}return t.join(" ")}serialize(t,e){let[n,r,i,s]=t;const a=[],o=i-n,l=s-r;for(const c of this.#ro){const t=new Array(c.length);for(let e=0;e<c.length;e+=2)t[e]=n+c[e]*o,t[e+1]=s-c[e+1]*l;a.push(t)}return a}get box(){return this.#Aa}get classNamesForOutlining(){return["highlightOutline"]}}class fi extends hi{newFreeDrawOutline(t,e,n,r,i,s){return new mi(t,e,n,r,i,s)}}class mi extends di{newOutliner(t,e,n,r,i){return new fi(t,e,n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0)}}class gi extends Zt{#io=null;#so=0;#ao;#oo=null;#i=null;#lo=null;#co=null;#ho=0;#do=null;#uo=null;#_=null;#po=!1;#Ka=null;#Xa=null;#fo=null;#he="";#Fa;#mo="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=(()=>v.HIGHLIGHT)();static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const t=gi.prototype;return G(this,"_keyboardManager",new qt([[["ArrowLeft","mac+ArrowLeft"],t._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],t._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],t._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],t._moveCaret,{args:[3]}]]))}constructor(t){super({...t,name:"highlightEditor"}),this.color=t.color||gi._defaultColor,this.#Fa=t.thickness||gi._defaultThickness,this.opacity=t.opacity||gi._defaultOpacity,this.#ao=t.boxes||null,this.#mo=t.methodOfCreation||"",this.#he=t.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",t.highlightId>-1?(this.#po=!0,this.#go(t),this.#vo()):this.#ao&&(this.#io=t.anchorNode,this.#so=t.anchorOffset,this.#co=t.focusNode,this.#ho=t.focusOffset,this.#bo(),this.#vo(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#po?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#Fa,methodOfCreation:this.#mo}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(t){return{numberOfColors:t.get("color").size}}#bo(){const t=new ui(this.#ao,.001);this.#uo=t.getOutlines(),[this.x,this.y,this.width,this.height]=this.#uo.box;const e=new ui(this.#ao,.0025,.001,"ltr"===this._uiManager.direction);this.#lo=e.getOutlines();const{firstPoint:n}=this.#uo;this.#Ka=[(n[0]-this.x)/this.width,(n[1]-this.y)/this.height];const{lastPoint:r}=this.#lo;this.#Xa=[(r[0]-this.x)/this.width,(r[1]-this.y)/this.height]}#go(t){let{highlightOutlines:e,highlightId:n,clipPathId:r}=t;this.#uo=e;if(this.#lo=e.getNewOutline(this.#Fa/2+1.5,.0025),n>=0)this.#_=n,this.#oo=r,this.parent.drawLayer.finalizeDraw(n,{bbox:e.box,path:{d:e.toSVGPath()}}),this.#fo=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#lo.box,path:{d:this.#lo.toSVGPath()}},!0);else if(this.parent){const t=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#_,{bbox:gi.#yo(this.#uo.box,(t-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#fo,{bbox:gi.#yo(this.#lo.box,t),path:{d:this.#lo.toSVGPath()}})}const[i,s,a,o]=e.box;switch(this.rotation){case 0:this.x=i,this.y=s,this.width=a,this.height=o;break;case 90:{const[t,e]=this.parentDimensions;this.x=s,this.y=1-i,this.width=a*e/t,this.height=o*t/e;break}case 180:this.x=1-i,this.y=1-s,this.width=a,this.height=o;break;case 270:{const[t,e]=this.parentDimensions;this.x=1-s,this.y=i,this.width=a*e/t,this.height=o*t/e;break}}const{firstPoint:l}=e;this.#Ka=[(l[0]-i)/a,(l[1]-s)/o];const{lastPoint:c}=this.#lo;this.#Xa=[(c[0]-i)/a,(c[1]-s)/o]}static initialize(t,e){Zt.initialize(t,e),gi._defaultColor||=e.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(t,e){switch(t){case b.HIGHLIGHT_COLOR:gi._defaultColor=e;break;case b.HIGHLIGHT_THICKNESS:gi._defaultThickness=e}}translateInPage(t,e){}get toolbarPosition(){return this.#Xa}get commentButtonPosition(){return this.#Ka}updateParams(t,e){switch(t){case b.HIGHLIGHT_COLOR:this.#Us(e);break;case b.HIGHLIGHT_THICKNESS:this.#wo(e)}}static get defaultPropertiesToUpdate(){return[[b.HIGHLIGHT_COLOR,gi._defaultColor],[b.HIGHLIGHT_THICKNESS,gi._defaultThickness]]}get propertiesToUpdate(){return[[b.HIGHLIGHT_COLOR,this.color||gi._defaultColor],[b.HIGHLIGHT_THICKNESS,this.#Fa||gi._defaultThickness],[b.HIGHLIGHT_FREE,this.#po]]}onUpdatedColor(){this.parent?.drawLayer.updateProperties(this.#_,{root:{fill:this.color,"fill-opacity":this.opacity}}),this.#i?.updateColor(this.color),super.onUpdatedColor()}#Us(t){const e=(t,e)=>{this.color=t,this.opacity=e,this.onUpdatedColor()},n=this.color,r=this.opacity;this.addCommands({cmd:e.bind(this,t,gi._defaultOpacity),undo:e.bind(this,n,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:b.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(t)},!0)}#wo(t){const e=this.#Fa,n=t=>{this.#Fa=t,this.#_o(t)};this.addCommands({cmd:n.bind(this,t),undo:n.bind(this,e),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:b.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:t},!0)}get toolbarButtons(){if(this._uiManager.highlightColors){return[["colorPicker",this.#i=new xr({editor:this})]]}return super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#Ao())}getBaseTranslation(){return[0,0]}getRect(t,e){return super.getRect(t,e,this.#Ao())}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),t&&this.div.focus()}remove(){this.#xo(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#vo(),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let e=!1;this.parent&&!t?this.#xo():t&&(this.#vo(t),e=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),this.show(this._isVisible),e&&this.select()}#_o(t){this.#po&&(this.#go({highlightOutlines:this.#uo.getNewOutline(t/2)}),this.fixAndSetPosition(),this.setDims(this.width,this.height))}#xo(){null!==this.#_&&this.parent&&(this.parent.drawLayer.remove(this.#_),this.#_=null,this.parent.drawLayer.remove(this.#fo),this.#fo=null)}#vo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;null===this.#_&&(({id:this.#_,clipPathId:this.#oo}=t.drawLayer.draw({bbox:this.#uo.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:this.#po},path:{d:this.#uo.toSVGPath()}},!1,!0)),this.#fo=t.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#po},bbox:this.#lo.box,path:{d:this.#lo.toSVGPath()}},this.#po),this.#do&&(this.#do.style.clipPath=this.#oo))}static#yo(t,e){let[n,r,i,s]=t;switch(e){case 90:return[1-r-s,n,s,i];case 180:return[1-n-i,1-r-s,i,s];case 270:return[r,1-n-i,s,i]}return[n,r,i,s]}rotate(t){const{drawLayer:e}=this.parent;let n;this.#po?(t=(t-this.rotation+360)%360,n=gi.#yo(this.#uo.box,t)):n=gi.#yo([this.x,this.y,this.width,this.height],t),e.updateProperties(this.#_,{bbox:n,root:{"data-main-rotation":t}}),e.updateProperties(this.#fo,{bbox:gi.#yo(this.#lo.box,t),root:{"data-main-rotation":t}})}render(){if(this.div)return this.div;const t=super.render();this.#he&&(t.setAttribute("aria-label",this.#he),t.setAttribute("role","mark")),this.#po?t.classList.add("free"):this.div.addEventListener("keydown",this.#Eo.bind(this),{signal:this._uiManager._signal});const e=this.#do=document.createElement("div");return t.append(e),e.setAttribute("aria-hidden","true"),e.className="internal",e.style.clipPath=this.#oo,this.setDims(this.width,this.height),jt(this,this.#do,["pointerover","pointerleave"]),this.enableEditing(),t}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#fo,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#fo,{rootClass:{hovered:!1}})}#Eo(t){gi._keyboardManager.exec(this,t)}_moveCaret(t){switch(this.parent.unselect(this),t){case 0:case 2:this.#ko(!0);break;case 1:case 3:this.#ko(!1)}}#ko(t){if(!this.#io)return;const e=window.getSelection();t?e.setPosition(this.#io,this.#so):e.setPosition(this.#co,this.#ho)}select(){super.select(),this.#fo&&this.parent?.drawLayer.updateProperties(this.#fo,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#fo&&(this.parent?.drawLayer.updateProperties(this.#fo,{rootClass:{selected:!1}}),this.#po||this.#ko(!1))}get _mustFixPosition(){return!this.#po}show(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._isVisible;super.show(t),this.parent&&(this.parent.drawLayer.updateProperties(this.#_,{rootClass:{hidden:!t}}),this.parent.drawLayer.updateProperties(this.#fo,{rootClass:{hidden:!t}}))}#Ao(){return this.#po?this.rotation:0}#Co(){if(this.#po)return null;const[t,e]=this.pageDimensions,[n,r]=this.pageTranslation,i=this.#ao,s=new Float32Array(8*i.length);let a=0;for(const{x:o,y:l,width:c,height:h}of i){const i=o*t+n,d=(1-l)*e+r;s[a]=s[a+4]=i,s[a+1]=s[a+3]=d,s[a+2]=s[a+6]=i+c*t,s[a+5]=s[a+7]=d-h*e,a+=8}return s}#So(t){return this.#uo.serialize(t,this.#Ao())}static startHighlighting(t,e,n){let{target:r,x:i,y:s}=n;const{x:a,y:o,width:l,height:c}=r.getBoundingClientRect(),h=new AbortController,d=t.combinedSignal(h),u=e=>{h.abort(),this.#To(t,e)};window.addEventListener("blur",u,{signal:d}),window.addEventListener("pointerup",u,{signal:d}),window.addEventListener("pointerdown",Et,{capture:!0,passive:!1,signal:d}),window.addEventListener("contextmenu",xt,{signal:d}),r.addEventListener("pointermove",this.#Do.bind(this,t),{signal:d}),this._freeHighlight=new fi({x:i,y:s},[a,o,l,c],t.scale,this._defaultThickness/2,e,.001),({id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=t.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0))}static#Do(t,e){this._freeHighlight.add(e)&&t.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#To(t,e){this._freeHighlight.isEmpty()?t.drawLayer.remove(this._freeHighlightId):t.createAndAddNewEditor(e,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(t,e,n){let r=null;if(t instanceof ti){const{data:{quadPoints:e,rect:n,rotation:i,id:s,color:a,opacity:o,popupRef:l,richText:c,contentsObj:h,creationDate:d,modificationDate:u},parent:{page:{pageNumber:p}}}=t;r=t={annotationType:v.HIGHLIGHT,color:Array.from(a),opacity:o,quadPoints:e,boxes:null,pageIndex:p-1,rect:n.slice(0),rotation:i,annotationElementId:s,id:s,deleted:!1,popupRef:l,richText:c,comment:h?.str||null,creationDate:d,modificationDate:u}}else if(t instanceof Qr){const{data:{inkLists:e,rect:n,rotation:i,id:s,color:a,borderStyle:{rawWidth:o},popupRef:l,richText:c,contentsObj:h,creationDate:d,modificationDate:u},parent:{page:{pageNumber:p}}}=t;r=t={annotationType:v.HIGHLIGHT,color:Array.from(a),thickness:o,inkLists:e,boxes:null,pageIndex:p-1,rect:n.slice(0),rotation:i,annotationElementId:s,id:s,deleted:!1,popupRef:l,richText:c,comment:h?.str||null,creationDate:d,modificationDate:u}}const{color:i,quadPoints:s,inkLists:a,opacity:o}=t,l=await super.deserialize(t,e,n);l.color=st.makeHexColor(...i),l.opacity=o||1,a&&(l.#Fa=t.thickness),l._initialData=r,t.comment&&l.setCommentData(t);const[c,h]=l.pageDimensions,[d,u]=l.pageTranslation;if(s){const t=l.#ao=[];for(let e=0;e<s.length;e+=8)t.push({x:(s[e]-d)/c,y:1-(s[e+1]-u)/h,width:(s[e+2]-s[e])/c,height:(s[e+1]-s[e+5])/h});l.#bo(),l.#vo(),l.rotate(l.rotation)}else if(a){l.#po=!0;const t=a[0],n={x:t[0]-d,y:h-(t[1]-u)},r=new fi(n,[0,0,c,h],1,l.#Fa/2,!0,.001);for(let e=0,a=t.length;e<a;e+=2)n.x=t[e]-d,n.y=h-(t[e+1]-u),r.add(n);const{id:i,clipPathId:s}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:l.color,"fill-opacity":l._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:r.toSVGPath()}},!0,!0);l.#go({highlightOutlines:r.getOutlines(),highlightId:i,clipPathId:s}),l.#vo(),l.rotate(l.parentRotation)}return l}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty()||t)return null;if(this.deleted)return this.serializeDeleted();const e=Zt._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),n=super.serialize(t);return Object.assign(n,{color:e,opacity:this.opacity,thickness:this.#Fa,quadPoints:this.#Co(),outlines:this.#So(n.rect)}),this.addComment(n),this.annotationElementId&&!this.#_a(n)?null:(n.id=this.annotationElementId,n)}#_a(t){const{color:e}=this._initialData;return this.hasEditedComment||t.color.some((t,n)=>t!==e[n])}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}}class vi{#Mo=(()=>Object.create(null))();updateProperty(t,e){this[t]=e,this.updateSVGProperty(t,e)}updateProperties(t){if(t)for(const[e,n]of Object.entries(t))e.startsWith("_")||this.updateProperty(e,n)}updateSVGProperty(t,e){this.#Mo[t]=e}toSVGProperties(){const t=this.#Mo;return this.#Mo=Object.create(null),{root:t}}reset(){this.#Mo=Object.create(null)}updateAll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;this.updateProperties(t)}clone(){H("Not implemented")}}class bi extends Zt{#Po=null;#Io;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#Fo=null;static#Ro=null;static#No=null;static#Lo=NaN;static#Oo=null;static#Bo=null;static#$o=NaN;static _INNER_MARGIN=3;constructor(t){super(t),this.#Io=t.mustBeCommitted||!1,this._addOutlines(t)}onUpdatedColor(){this._colorPicker?.update(this.color),super.onUpdatedColor()}_addOutlines(t){t.drawOutlines&&(this.#zo(t),this.#vo())}#zo(t){let{drawOutlines:e,drawId:n,drawingOptions:r}=t;this.#Po=e,this._drawingOptions||=r,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),n>=0?(this._drawId=n,this.parent.drawLayer.finalizeDraw(n,e.defaultProperties)):this._drawId=this.#jo(e,this.parent),this.#Uo(e.box)}#jo(t,e){const{id:n}=e.drawLayer.draw(bi._mergeSVGProperties(this._drawingOptions.toSVGProperties(),t.defaultSVGProperties),!1,!1);return n}static _mergeSVGProperties(t,e){const n=new Set(Object.keys(t));for(const[r,i]of Object.entries(e))n.has(r)?Object.assign(t[r],i):t[r]=i;return t}static getDefaultDrawingOptions(t){H("Not implemented")}static get typesMap(){H("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(t,e){const n=this.typesMap.get(t);n&&this._defaultDrawingOptions.updateProperty(n,e),this._currentParent&&(bi.#Fo.updateProperty(n,e),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(t,e){const n=this.constructor.typesMap.get(t);n&&this._updateProperty(t,n,e)}static get defaultPropertiesToUpdate(){const t=[],e=this._defaultDrawingOptions;for(const[n,r]of this.typesMap)t.push([n,e[r]]);return t}get propertiesToUpdate(){const t=[],{_drawingOptions:e}=this;for(const[n,r]of this.constructor.typesMap)t.push([n,e[r]]);return t}_updateProperty(t,e,n){const r=this._drawingOptions,i=r[e],s=n=>{r.updateProperty(e,n);const i=this.#Po.updateProperty(e,n);i&&this.#Uo(i),this.parent?.drawLayer.updateProperties(this._drawId,r.toSVGProperties()),t===this.colorType&&this.onUpdatedColor()};this.addCommands({cmd:s.bind(this,n),undo:s.bind(this,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:t,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,bi._mergeSVGProperties(this.#Po.getPathResizingSVGProperties(this.#Ho()),{bbox:this.#Vo()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,bi._mergeSVGProperties(this.#Po.getPathResizedSVGProperties(this.#Ho()),{bbox:this.#Vo()}))}_onTranslating(t,e){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#Vo()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,bi._mergeSVGProperties(this.#Po.getPathTranslatedSVGProperties(this.#Ho(),this.parentDimensions),{bbox:this.#Vo()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(t){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#Io&&(this.#Io=!1,this.commit(),this.parent.setSelected(this),t&&this.isOnScreen&&this.div.focus())}remove(){this.#xo(),super.remove()}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.#vo(),this.#Uo(this.#Po.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(t){let e=!1;this.parent&&!t?(this._uiManager.removeShouldRescale(this),this.#xo()):t&&(this._uiManager.addShouldRescale(this),this.#vo(t),e=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(t),e&&this.select()}#xo(){null!==this._drawId&&this.parent&&(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#vo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent;null!==this._drawId&&this.parent===t||(null===this._drawId?(this._drawingOptions.updateAll(),this._drawId=this.#jo(this.#Po,t)):this.parent.drawLayer.updateParent(this._drawId,t.drawLayer))}#qo(t){let[e,n,r,i]=t;const{parentDimensions:[s,a],rotation:o}=this;switch(o){case 90:return[n,1-e,r*(a/s),i*(s/a)];case 180:return[1-e,1-n,r,i];case 270:return[1-n,e,r*(a/s),i*(s/a)];default:return[e,n,r,i]}}#Ho(){const{x:t,y:e,width:n,height:r,parentDimensions:[i,s],rotation:a}=this;switch(a){case 90:return[1-e,t,n*(i/s),r*(s/i)];case 180:return[1-t,1-e,n,r];case 270:return[e,1-t,n*(i/s),r*(s/i)];default:return[t,e,n,r]}}#Uo(t){[this.x,this.y,this.width,this.height]=this.#qo(t),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()}#Vo(){const{x:t,y:e,width:n,height:r,rotation:i,parentRotation:s,parentDimensions:[a,o]}=this;switch((4*i+s)/90){case 1:return[1-e-r,t,r,n];case 2:return[1-t-n,1-e-r,n,r];case 3:return[e,1-t-n,r,n];case 4:return[t,e-n*(a/o),r*(o/a),n*(a/o)];case 5:return[1-e,t,n*(a/o),r*(o/a)];case 6:return[1-t-r*(o/a),1-e,r*(o/a),n*(a/o)];case 7:return[e-n*(a/o),1-t-r*(o/a),n*(a/o),r*(o/a)];case 8:return[t-n,e-r,n,r];case 9:return[1-e,t-n,r,n];case 10:return[1-t,1-e,n,r];case 11:return[e-r,1-t,r,n];case 12:return[t-r*(o/a),e,r*(o/a),n*(a/o)];case 13:return[1-e-n*(a/o),t-r*(o/a),n*(a/o),r*(o/a)];case 14:return[1-t,1-e-n*(a/o),r*(o/a),n*(a/o)];case 15:return[e,1-t,n*(a/o),r*(o/a)];default:return[t,e,n,r]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,bi._mergeSVGProperties({bbox:this.#Vo()},this.#Po.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#Uo(this.#Po.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let t,e;this._isCopy&&(t=this.x,e=this.y);const n=super.render();n.classList.add("draw");const r=document.createElement("div");return n.append(r),r.setAttribute("aria-hidden","true"),r.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(t,e),n}static createDrawerInstance(t,e,n,r,i){H("Not implemented")}static startDrawing(t,e,n,r){const{target:i,offsetX:s,offsetY:a,pointerId:o,pointerType:l}=r;if(bi.#Oo&&bi.#Oo!==l)return;const{viewport:{rotation:c}}=t,{width:h,height:d}=i.getBoundingClientRect(),u=bi.#Ro=new AbortController,p=t.combinedSignal(u);bi.#Lo||=o,bi.#Oo??=l,window.addEventListener("pointerup",t=>{bi.#Lo===t.pointerId?this._endDraw(t):bi.#Bo?.delete(t.pointerId)},{signal:p}),window.addEventListener("pointercancel",t=>{bi.#Lo===t.pointerId?this._currentParent.endDrawingSession():bi.#Bo?.delete(t.pointerId)},{signal:p}),window.addEventListener("pointerdown",t=>{bi.#Oo===t.pointerType&&((bi.#Bo||=new Set).add(t.pointerId),bi.#Fo.isCancellable()&&(bi.#Fo.removeLastElement(),bi.#Fo.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:p}),window.addEventListener("contextmenu",xt,{signal:p}),i.addEventListener("pointermove",this._drawMove.bind(this),{signal:p}),i.addEventListener("touchmove",t=>{t.timeStamp===bi.#$o&&Et(t)},{signal:p}),t.toggleDrawing(),e._editorUndoBar?.hide(),bi.#Fo?t.drawLayer.updateProperties(this._currentDrawId,bi.#Fo.startNew(s,a,h,d,c)):(e.updateUIForDefaultProperties(this),bi.#Fo=this.createDrawerInstance(s,a,h,d,c),bi.#No=this.getDefaultDrawingOptions(),this._currentParent=t,({id:this._currentDrawId}=t.drawLayer.draw(this._mergeSVGProperties(bi.#No.toSVGProperties(),bi.#Fo.defaultSVGProperties),!0,!1)))}static _drawMove(t){if(bi.#$o=-1,!bi.#Fo)return;const{offsetX:e,offsetY:n,pointerId:r}=t;bi.#Lo===r&&(bi.#Bo?.size>=1?this._endDraw(t):(this._currentParent.drawLayer.updateProperties(this._currentDrawId,bi.#Fo.add(e,n)),bi.#$o=t.timeStamp,Et(t)))}static _cleanup(t){t&&(this._currentDrawId=-1,this._currentParent=null,bi.#Fo=null,bi.#No=null,bi.#Oo=null,bi.#$o=NaN),bi.#Ro&&(bi.#Ro.abort(),bi.#Ro=null,bi.#Lo=NaN,bi.#Bo=null)}static _endDraw(t){const e=this._currentParent;if(e){if(e.toggleDrawing(!0),this._cleanup(!1),t?.target===e.div&&e.drawLayer.updateProperties(this._currentDrawId,bi.#Fo.end(t.offsetX,t.offsetY)),this.supportMultipleDrawings){const t=bi.#Fo,n=this._currentDrawId,r=t.getLastElement();return void e.addCommands({cmd:()=>{e.drawLayer.updateProperties(n,t.setLastElement(r))},undo:()=>{e.drawLayer.updateProperties(n,t.removeLastElement())},mustExec:!1,type:b.DRAW_STEP})}this.endDrawing(!1)}}static endDrawing(t){const e=this._currentParent;if(!e)return null;if(e.toggleDrawing(!0),e.cleanUndoStack(b.DRAW_STEP),!bi.#Fo.isEmpty()){const{pageDimensions:[n,r],scale:i}=e,s=e.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:bi.#Fo.getOutlines(n*i,r*i,i,this._INNER_MARGIN),drawingOptions:bi.#No,mustBeCommitted:!t});return this._cleanup(!0),s}return e.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(t){}static deserializeDraw(t,e,n,r,i,s){H("Not implemented")}static async deserialize(t,e,n){const{rawDims:{pageWidth:r,pageHeight:i,pageX:s,pageY:a}}=e.viewport,o=this.deserializeDraw(s,a,r,i,this._INNER_MARGIN,t),l=await super.deserialize(t,e,n);return l.createDrawingOptions(t),l.#zo({drawOutlines:o}),l.#vo(),l.onScaleChanging(),l.rotate(),l}serializeDraw(t){const[e,n]=this.pageTranslation,[r,i]=this.pageDimensions;return this.#Po.serialize([e,n,r,i],t)}renderAnnotationElement(t){return t.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}}class yi{#Sa=(()=>new Float64Array(6))();#Xs;#Wo;#ri;#Fa;#Ra;#Go="";#Ko=0;#ro=(()=>new wi)();#Xo;#Yo;constructor(t,e,n,r,i,s){this.#Xo=n,this.#Yo=r,this.#ri=i,this.#Fa=s,[t,e]=this.#Zo(t,e);const a=this.#Xs=[NaN,NaN,NaN,NaN,t,e];this.#Ra=[t,e],this.#Wo=[{line:a,points:this.#Ra}],this.#Sa.set(a,0)}updateProperty(t,e){"stroke-width"===t&&(this.#Fa=e)}#Zo(t,e){return ci._normalizePoint(t,e,this.#Xo,this.#Yo,this.#ri)}isEmpty(){return!this.#Wo||0===this.#Wo.length}isCancellable(){return this.#Ra.length<=10}add(t,e){[t,e]=this.#Zo(t,e);const[n,r,i,s]=this.#Sa.subarray(2,6),a=t-i,o=e-s;return Math.hypot(this.#Xo*a,this.#Yo*o)<=2?null:(this.#Ra.push(t,e),isNaN(n)?(this.#Sa.set([i,s,t,e],2),this.#Xs.push(NaN,NaN,NaN,NaN,t,e),{path:{d:this.toSVGPath()}}):(isNaN(this.#Sa[0])&&this.#Xs.splice(6,6),this.#Sa.set([n,r,i,s,t,e],0),this.#Xs.push(...ci.createBezierPoints(n,r,i,s,t,e)),{path:{d:this.toSVGPath()}}))}end(t,e){const n=this.add(t,e);return n||(2===this.#Ra.length?{path:{d:this.toSVGPath()}}:null)}startNew(t,e,n,r,i){this.#Xo=n,this.#Yo=r,this.#ri=i,[t,e]=this.#Zo(t,e);const s=this.#Xs=[NaN,NaN,NaN,NaN,t,e];this.#Ra=[t,e];const a=this.#Wo.at(-1);return a&&(a.line=new Float32Array(a.line),a.points=new Float32Array(a.points)),this.#Wo.push({line:s,points:this.#Ra}),this.#Sa.set(s,0),this.#Ko=0,this.toSVGPath(),null}getLastElement(){return this.#Wo.at(-1)}setLastElement(t){return this.#Wo?(this.#Wo.push(t),this.#Xs=t.line,this.#Ra=t.points,this.#Ko=0,{path:{d:this.toSVGPath()}}):this.#ro.setLastElement(t)}removeLastElement(){if(!this.#Wo)return this.#ro.removeLastElement();this.#Wo.pop(),this.#Go="";for(let t=0,e=this.#Wo.length;t<e;t++){const{line:e,points:n}=this.#Wo[t];this.#Xs=e,this.#Ra=n,this.#Ko=0,this.toSVGPath()}return{path:{d:this.#Go}}}toSVGPath(){const t=ci.svgRound(this.#Xs[4]),e=ci.svgRound(this.#Xs[5]);if(2===this.#Ra.length)return this.#Go=`${this.#Go} M ${t} ${e} Z`,this.#Go;if(this.#Ra.length<=6){const n=this.#Go.lastIndexOf("M");this.#Go=`${this.#Go.slice(0,n)} M ${t} ${e}`,this.#Ko=6}if(4===this.#Ra.length){const t=ci.svgRound(this.#Xs[10]),e=ci.svgRound(this.#Xs[11]);return this.#Go=`${this.#Go} L ${t} ${e}`,this.#Ko=12,this.#Go}const n=[];0===this.#Ko&&(n.push(`M ${t} ${e}`),this.#Ko=6);for(let r=this.#Ko,i=this.#Xs.length;r<i;r+=6){const[t,e,i,s,a,o]=this.#Xs.slice(r,r+6).map(ci.svgRound);n.push(`C${t} ${e} ${i} ${s} ${a} ${o}`)}return this.#Go+=n.join(" "),this.#Ko=this.#Xs.length,this.#Go}getOutlines(t,e,n,r){const i=this.#Wo.at(-1);return i.line=new Float32Array(i.line),i.points=new Float32Array(i.points),this.#ro.build(this.#Wo,t,e,n,this.#ri,this.#Fa,r),this.#Sa=null,this.#Xs=null,this.#Wo=null,this.#Go=null,this.#ro}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class wi extends ci{#qa;#Jo=0;#Ea;#Wo;#Xo;#Yo;#Qo;#ri;#Fa;build(t,e,n,r,i,s,a){this.#Xo=e,this.#Yo=n,this.#Qo=r,this.#ri=i,this.#Fa=s,this.#Ea=a??0,this.#Wo=t,this.#tl()}get thickness(){return this.#Fa}setLastElement(t){return this.#Wo.push(t),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#Wo.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const t=[];for(const{line:e}of this.#Wo)if(t.push(`M${ci.svgRound(e[4])} ${ci.svgRound(e[5])}`),6!==e.length)if(12===e.length&&isNaN(e[6]))t.push(`L${ci.svgRound(e[10])} ${ci.svgRound(e[11])}`);else for(let n=6,r=e.length;n<r;n+=6){const[r,i,s,a,o,l]=e.subarray(n,n+6).map(ci.svgRound);t.push(`C${r} ${i} ${s} ${a} ${o} ${l}`)}else t.push("Z");return t.join("")}serialize(t,e){let[n,r,i,s]=t;const a=[],o=[],[l,c,h,d]=this.#el();let u,p,f,m,g,v,b,y,w;switch(this.#ri){case 0:w=ci._rescale,u=n,p=r+s,f=i,m=-s,g=n+l*i,v=r+(1-c-d)*s,b=n+(l+h)*i,y=r+(1-c)*s;break;case 90:w=ci._rescaleAndSwap,u=n,p=r,f=i,m=s,g=n+c*i,v=r+l*s,b=n+(c+d)*i,y=r+(l+h)*s;break;case 180:w=ci._rescale,u=n+i,p=r,f=-i,m=s,g=n+(1-l-h)*i,v=r+c*s,b=n+(1-l)*i,y=r+(c+d)*s;break;case 270:w=ci._rescaleAndSwap,u=n+i,p=r+s,f=-i,m=-s,g=n+(1-c-d)*i,v=r+(1-l-h)*s,b=n+(1-c)*i,y=r+(1-l)*s}for(const{line:_,points:A}of this.#Wo)a.push(w(_,u,p,f,m,e?new Array(_.length):null)),o.push(w(A,u,p,f,m,e?new Array(A.length):null));return{lines:a,points:o,rect:[g,v,b,y]}}static deserialize(t,e,n,r,i,s){let{paths:{lines:a,points:o},rotation:l,thickness:c}=s;const h=[];let d,u,p,f,m;switch(l){case 0:m=ci._rescale,d=-t/n,u=e/r+1,p=1/n,f=-1/r;break;case 90:m=ci._rescaleAndSwap,d=-e/r,u=-t/n,p=1/r,f=1/n;break;case 180:m=ci._rescale,d=t/n+1,u=-e/r,p=-1/n,f=1/r;break;case 270:m=ci._rescaleAndSwap,d=e/r+1,u=t/n+1,p=-1/r,f=-1/n}if(!a){a=[];for(const t of o){const e=t.length;if(2===e){a.push(new Float32Array([NaN,NaN,NaN,NaN,t[0],t[1]]));continue}if(4===e){a.push(new Float32Array([NaN,NaN,NaN,NaN,t[0],t[1],NaN,NaN,NaN,NaN,t[2],t[3]]));continue}const n=new Float32Array(3*(e-2));a.push(n);let[r,i,s,o]=t.subarray(0,4);n.set([NaN,NaN,NaN,NaN,r,i],0);for(let a=4;a<e;a+=2){const e=t[a],l=t[a+1];n.set(ci.createBezierPoints(r,i,s,o,e,l),3*(a-2)),[r,i,s,o]=[s,o,e,l]}}}for(let v=0,b=a.length;v<b;v++)h.push({line:m(a[v].map(t=>t??NaN),d,u,p,f),points:m(o[v].map(t=>t??NaN),d,u,p,f)});const g=new this.prototype.constructor;return g.build(h,n,r,1,l,c,i),g}#nl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#Fa;const e=this.#Ea+t/2*this.#Qo;return this.#ri%180===0?[e/this.#Xo,e/this.#Yo]:[e/this.#Yo,e/this.#Xo]}#el(){const[t,e,n,r]=this.#qa,[i,s]=this.#nl(0);return[t+i,e+s,n-2*i,r-2*s]}#tl(){const t=this.#qa=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{line:r}of this.#Wo){if(r.length<=12){for(let e=4,n=r.length;e<n;e+=6)st.pointBoundingBox(r[e],r[e+1],t);continue}let e=r[4],n=r[5];for(let i=6,s=r.length;i<s;i+=6){const[s,a,o,l,c,h]=r.subarray(i,i+6);st.bezierBoundingBox(e,n,s,a,o,l,c,h,t),e=c,n=h}}const[e,n]=this.#nl();t[0]=ht(t[0]-e,0,1),t[1]=ht(t[1]-n,0,1),t[2]=ht(t[2]+e,0,1),t[3]=ht(t[3]+n,0,1),t[2]-=t[0],t[3]-=t[1]}get box(){return this.#qa}updateProperty(t,e){return"stroke-width"===t?this.#wo(e):null}#wo(t){const[e,n]=this.#nl();this.#Fa=t;const[r,i]=this.#nl(),[s,a]=[r-e,i-n],o=this.#qa;return o[0]-=s,o[1]-=a,o[2]+=2*s,o[3]+=2*a,o}updateParentDimensions(t,e){let[n,r]=t;const[i,s]=this.#nl();this.#Xo=n,this.#Yo=r,this.#Qo=e;const[a,o]=this.#nl(),l=a-i,c=o-s,h=this.#qa;return h[0]-=l,h[1]-=c,h[2]+=2*l,h[3]+=2*c,h}updateRotation(t){return this.#Jo=t,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#qa.map(ci.svgRound).join(" ")}get defaultProperties(){const[t,e]=this.#qa;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ci.svgRound(t)} ${ci.svgRound(e)}`}}}get rotationTransform(){const[,,t,e]=this.#qa;let n=0,r=0,i=0,s=0,a=0,o=0;switch(this.#Jo){case 90:r=e/t,i=-t/e,a=t;break;case 180:n=-1,s=-1,a=t,o=e;break;case 270:r=-e/t,i=t/e,o=e;break;default:return""}return`matrix(${n} ${r} ${i} ${s} ${ci.svgRound(a)} ${ci.svgRound(o)})`}getPathResizingSVGProperties(t){let[e,n,r,i]=t;const[s,a]=this.#nl(),[o,l,c,h]=this.#qa;if(Math.abs(c-s)<=ci.PRECISION||Math.abs(h-a)<=ci.PRECISION){const t=e+r/2-(o+c/2),s=n+i/2-(l+h/2);return{path:{"transform-origin":`${ci.svgRound(e)} ${ci.svgRound(n)}`,transform:`${this.rotationTransform} translate(${t} ${s})`}}}const d=(r-2*s)/(c-2*s),u=(i-2*a)/(h-2*a),p=c/r,f=h/i;return{path:{"transform-origin":`${ci.svgRound(o)} ${ci.svgRound(l)}`,transform:`${this.rotationTransform} scale(${p} ${f}) translate(${ci.svgRound(s)} ${ci.svgRound(a)}) scale(${d} ${u}) translate(${ci.svgRound(-s)} ${ci.svgRound(-a)})`}}}getPathResizedSVGProperties(t){let[e,n,r,i]=t;const[s,a]=this.#nl(),o=this.#qa,[l,c,h,d]=o;if(o[0]=e,o[1]=n,o[2]=r,o[3]=i,Math.abs(h-s)<=ci.PRECISION||Math.abs(d-a)<=ci.PRECISION){const t=e+r/2-(l+h/2),s=n+i/2-(c+d/2);for(const{line:e,points:n}of this.#Wo)ci._translate(e,t,s,e),ci._translate(n,t,s,n);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ci.svgRound(e)} ${ci.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const u=(r-2*s)/(h-2*s),p=(i-2*a)/(d-2*a),f=-u*(l+s)+e+s,m=-p*(c+a)+n+a;if(1!==u||1!==p||0!==f||0!==m)for(const{line:g,points:v}of this.#Wo)ci._rescale(g,f,m,u,p,g),ci._rescale(v,f,m,u,p,v);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${ci.svgRound(e)} ${ci.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties(t,e){let[n,r]=t;const[i,s]=e,a=this.#qa,o=n-a[0],l=r-a[1];if(this.#Xo===i&&this.#Yo===s)for(const{line:c,points:h}of this.#Wo)ci._translate(c,o,l,c),ci._translate(h,o,l,h);else{const t=this.#Xo/i,e=this.#Yo/s;this.#Xo=i,this.#Yo=s;for(const{line:n,points:r}of this.#Wo)ci._rescale(n,o,l,t,e,n),ci._rescale(r,o,l,t,e,r);a[2]*=t,a[3]*=e}return a[0]=n,a[1]=r,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${ci.svgRound(n)} ${ci.svgRound(r)}`}}}get defaultSVGProperties(){const t=this.#qa;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${ci.svgRound(t[0])} ${ci.svgRound(t[1])}`,transform:this.rotationTransform||null},bbox:t}}}class _i extends vi{constructor(t){super(),this._viewParameters=t,super.updateProperties({fill:"none",stroke:Zt._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(t,e){"stroke-width"===t&&(e??=this["stroke-width"],e*=this._viewParameters.realScale),super.updateSVGProperty(t,e)}clone(){const t=new _i(this._viewParameters);return t.updateAll(this),t}}class Ai extends bi{static _type="ink";static _editorType=(()=>v.INK)();static _defaultDrawingOptions=null;constructor(t){super({...t,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(t,e){Zt.initialize(t,e),this._defaultDrawingOptions=new _i(e.viewParameters)}static getDefaultDrawingOptions(t){const e=this._defaultDrawingOptions.clone();return e.updateProperties(t),e}static get supportMultipleDrawings(){return!0}static get typesMap(){return G(this,"typesMap",new Map([[b.INK_THICKNESS,"stroke-width"],[b.INK_COLOR,"stroke"],[b.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(t,e,n,r,i){return new yi(t,e,n,r,i,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(t,e,n,r,i,s){return wi.deserialize(t,e,n,r,i,s)}static async deserialize(t,e,n){let r=null;if(t instanceof Qr){const{data:{inkLists:e,rect:n,rotation:i,id:s,color:a,opacity:o,borderStyle:{rawWidth:l},popupRef:c,richText:h,contentsObj:d,creationDate:u,modificationDate:p},parent:{page:{pageNumber:f}}}=t;r=t={annotationType:v.INK,color:Array.from(a),thickness:l,opacity:o,paths:{points:e},boxes:null,pageIndex:f-1,rect:n.slice(0),rotation:i,annotationElementId:s,id:s,deleted:!1,popupRef:c,richText:h,comment:d?.str||null,creationDate:u,modificationDate:p}}const i=await super.deserialize(t,e,n);return i._initialData=r,t.comment&&i.setCommentData(t),i}get toolbarButtons(){return this._colorPicker||=new Er(this),[["colorPicker",this._colorPicker]]}get colorType(){return b.INK_COLOR}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId:t,_drawingOptions:e,parent:n}=this;e.updateSVGProperty("stroke-width"),n.drawLayer.updateProperties(t,e.toSVGProperties())}static onScaleChangingWhenDrawing(){const t=this._currentParent;t&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),t.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions(t){let{color:e,thickness:n,opacity:r}=t;this._drawingOptions=Ai.getDefaultDrawingOptions({stroke:st.makeHexColor(...e),"stroke-width":n,"stroke-opacity":r})}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines:e,points:n}=this.serializeDraw(t),{_drawingOptions:{stroke:r,"stroke-opacity":i,"stroke-width":s}}=this,a=Object.assign(super.serialize(t),{color:Zt._colorManager.convert(r),opacity:i,thickness:s,paths:{lines:e,points:n}});return this.addComment(a),t?(a.isCopy=!0,a):this.annotationElementId&&!this.#_a(a)?null:(a.id=this.annotationElementId,a)}#_a(t){const{color:e,thickness:n,opacity:r,pageIndex:i}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||t.color.some((t,n)=>t!==e[n])||t.thickness!==n||t.opacity!==r||t.pageIndex!==i}renderAnnotationElement(t){if(this.deleted)return t.hide(),null;const{points:e,rect:n}=this.serializeDraw(!1);return t.updateEdited({rect:n,thickness:this._drawingOptions["stroke-width"],points:e,popup:this.comment}),null}}class xi extends wi{toSVGPath(){let t=super.toSVGPath();return t.endsWith("Z")||(t+="Z"),t}}class Ei{static#rl={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#il(t,e,n,r){return r-=e,0===(n-=t)?r>0?0:4:1===n?r+6:2-r}static#sl=(()=>new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]))();static#al(t,e,n,r,i,s,a){const o=this.#il(n,r,i,s);for(let l=0;l<8;l++){const i=(-l+o-a+16)%8;if(0!==t[(n+this.#sl[2*i])*e+(r+this.#sl[2*i+1])])return i}return-1}static#ol(t,e,n,r,i,s,a){const o=this.#il(n,r,i,s);for(let l=0;l<8;l++){const i=(l+o+a+16)%8;if(0!==t[(n+this.#sl[2*i])*e+(r+this.#sl[2*i+1])])return i}return-1}static#ll(t,e,n,r){const i=t.length,s=new Int32Array(i);for(let c=0;c<i;c++)s[c]=t[c]<=r?1:0;for(let c=1;c<n-1;c++)s[c*e]=s[c*e+e-1]=0;for(let c=0;c<e;c++)s[c]=s[e*n-1-c]=0;let a,o=1;const l=[];for(let c=1;c<n-1;c++){a=1;for(let t=1;t<e-1;t++){const n=c*e+t,r=s[n];if(0===r)continue;let i=c,h=t;if(1===r&&0===s[n-1])o+=1,h-=1;else{if(!(r>=1&&0===s[n+1])){1!==r&&(a=Math.abs(r));continue}o+=1,h+=1,r>1&&(a=r)}const d=[t,c],u=h===t+1,p={isHole:u,points:d,id:o,parent:0};let f;l.push(p);for(const t of l)if(t.id===a){f=t;break}f?f.isHole?p.parent=u?f.parent:a:p.parent=u?a:f.parent:p.parent=u?a:0;const m=this.#al(s,e,c,t,i,h,0);if(-1===m){s[n]=-o,1!==s[n]&&(a=Math.abs(s[n]));continue}let g=this.#sl[2*m],v=this.#sl[2*m+1];const b=c+g,y=t+v;i=b,h=y;let w=c,_=t;for(;;){const r=this.#ol(s,e,w,_,i,h,1);g=this.#sl[2*r],v=this.#sl[2*r+1];const l=w+g,u=_+v;d.push(u,l);const p=w*e+_;if(0===s[p+1]?s[p]=-o:1===s[p]&&(s[p]=o),l===c&&u===t&&w===b&&_===y){1!==s[n]&&(a=Math.abs(s[n]));break}i=w,h=_,w=l,_=u}}}return l}static#cl(t,e,n,r){if(n-e<=4){for(let i=e;i<n-2;i+=2)r.push(t[i],t[i+1]);return}const i=t[e],s=t[e+1],a=t[n-4]-i,o=t[n-3]-s,l=Math.hypot(a,o),c=a/l,h=o/l,d=c*s-h*i,u=o/a,p=1/l,f=Math.atan(u),m=Math.cos(f),g=Math.sin(f),v=p*(Math.abs(m)+Math.abs(g)),b=p*(1-v+v**2),y=Math.max(Math.atan(Math.abs(g+m)*b),Math.atan(Math.abs(g-m)*b));let w=0,_=e;for(let A=e+2;A<n-2;A+=2){const e=Math.abs(d-c*t[A+1]+h*t[A]);e>w&&(_=A,w=e)}w>(l*y)**2?(this.#cl(t,e,_+2,r),this.#cl(t,_,n,r)):r.push(i,s)}static#hl(t){const e=[],n=t.length;return this.#cl(t,0,n,e),e.push(t[n-2],t[n-1]),e.length<=4?null:e}static#dl(t,e,n,r,i,s){const a=new Float32Array(s**2),o=-2*r**2,l=s>>1;for(let f=0;f<s;f++){const t=(f-l)**2;for(let e=0;e<s;e++)a[f*s+e]=Math.exp((t+(e-l)**2)/o)}const c=new Float32Array(256),h=-2*i**2;for(let f=0;f<256;f++)c[f]=Math.exp(f**2/h);const d=t.length,u=new Uint8Array(d),p=new Uint32Array(256);for(let f=0;f<n;f++)for(let r=0;r<e;r++){const i=f*e+r,o=t[i];let h=0,d=0;for(let u=0;u<s;u++){const i=f+u-l;if(!(i<0||i>=n))for(let n=0;n<s;n++){const p=r+n-l;if(p<0||p>=e)continue;const f=t[i*e+p],m=a[u*s+n]*c[Math.abs(f-o)];h+=f*m,d+=m}}p[u[i]=Math.round(h/d)]++}return[u,p]}static#ul(t){const e=new Uint32Array(256);for(const n of t)e[n]++;return e}static#pl(t){const e=t.length,n=new Uint8ClampedArray(e>>2);let r=-1/0,i=1/0;for(let a=0,o=n.length;a<o;a++){const e=n[a]=t[a<<2];r=Math.max(r,e),i=Math.min(i,e)}const s=255/(r-i);for(let a=0,o=n.length;a<o;a++)n[a]=(n[a]-i)*s;return n}static#fl(t){let e,n=-1/0,r=-1/0;const i=t.findIndex(t=>0!==t);let s=i,a=i;for(e=i;e<256;e++){const i=t[e];i>n&&(e-s>r&&(r=e-s,a=e-1),n=i,s=e)}for(e=a-1;e>=0&&!(t[e]>t[e+1]);e--);return e}static#ml(t){const e=t,{width:n,height:r}=t,{maxDim:i}=this.#rl;let s=n,a=r;if(n>i||r>i){let o=n,l=r,c=Math.log2(Math.max(n,r)/i);const h=Math.floor(c);c=c===h?h-1:h;for(let n=0;n<c;n++){s=Math.ceil(o/2),a=Math.ceil(l/2);const n=new OffscreenCanvas(s,a);n.getContext("2d").drawImage(t,0,0,o,l,0,0,s,a),o=s,l=a,t!==e&&t.close(),t=n.transferToImageBitmap()}const d=Math.min(i/s,i/a);s=Math.round(s*d),a=Math.round(a*d)}const o=new OffscreenCanvas(s,a).getContext("2d",{willReadFrequently:!0});o.fillStyle="white",o.fillRect(0,0,s,a),o.filter="grayscale(1)",o.drawImage(t,0,0,t.width,t.height,0,0,s,a);const l=o.getImageData(0,0,s,a).data;return[this.#pl(l),s,a]}static extractContoursFromText(t,e,n,r,i,s){let{fontFamily:a,fontStyle:o,fontWeight:l}=e,c=new OffscreenCanvas(1,1),h=c.getContext("2d",{alpha:!1});const d=h.font=`${o} ${l} 200px ${a}`,{actualBoundingBoxLeft:u,actualBoundingBoxRight:p,actualBoundingBoxAscent:f,actualBoundingBoxDescent:m,fontBoundingBoxAscent:g,fontBoundingBoxDescent:v,width:b}=h.measureText(t),y=1.5,w=Math.ceil(Math.max(Math.abs(u)+Math.abs(p)||0,b)*y),_=Math.ceil(Math.max(Math.abs(f)+Math.abs(m)||200,Math.abs(g)+Math.abs(v)||200)*y);c=new OffscreenCanvas(w,_),h=c.getContext("2d",{alpha:!0,willReadFrequently:!0}),h.font=d,h.filter="grayscale(1)",h.fillStyle="white",h.fillRect(0,0,w,_),h.fillStyle="black",h.fillText(t,.5*w/2,1.5*_/2);const A=this.#pl(h.getImageData(0,0,w,_).data),x=this.#ul(A),E=this.#fl(x),k=this.#ll(A,w,_,E);return this.processDrawnLines({lines:{curves:k,width:w,height:_},pageWidth:n,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:!0,areContours:!0})}static process(t,e,n,r,i){const[s,a,o]=this.#ml(t),[l,c]=this.#dl(s,a,o,Math.hypot(a,o)*this.#rl.sigmaSFactor,this.#rl.sigmaR,this.#rl.kernelSize),h=this.#fl(c),d=this.#ll(l,a,o,h);return this.processDrawnLines({lines:{curves:d,width:a,height:o},pageWidth:e,pageHeight:n,rotation:r,innerMargin:i,mustSmooth:!0,areContours:!0})}static processDrawnLines(t){let{lines:e,pageWidth:n,pageHeight:r,rotation:i,innerMargin:s,mustSmooth:a,areContours:o}=t;i%180!==0&&([n,r]=[r,n]);const{curves:l,width:c,height:h}=e,d=e.thickness??0,u=[],p=Math.min(n/c,r/h),f=p/n,m=p/r,g=[];for(const{points:b}of l){const t=a?this.#hl(b):b;if(!t)continue;g.push(t);const e=t.length,n=new Float32Array(e),r=new Float32Array(3*(2===e?2:e-2));if(u.push({line:r,points:n}),2===e){n[0]=t[0]*f,n[1]=t[1]*m,r.set([NaN,NaN,NaN,NaN,n[0],n[1]],0);continue}let[i,s,o,l]=t;i*=f,s*=m,o*=f,l*=m,n.set([i,s,o,l],0),r.set([NaN,NaN,NaN,NaN,i,s],0);for(let a=4;a<e;a+=2){const e=n[a]=t[a]*f,c=n[a+1]=t[a+1]*m;r.set(ci.createBezierPoints(i,s,o,l,e,c),3*(a-2)),[i,s,o,l]=[o,l,e,c]}}if(0===u.length)return null;const v=o?new xi:new wi;return v.build(u,n,r,1,i,o?0:d,s),{outline:v,newCurves:g,areContours:o,thickness:d,width:c,height:h}}static async compressSignature(t){let e,{outlines:n,areContours:r,thickness:i,width:s,height:a}=t,o=1/0,l=-1/0,c=0;for(const b of n){c+=b.length;for(let t=2,e=b.length;t<e;t++){const e=b[t]-b[t-2];o=Math.min(o,e),l=Math.max(l,e)}}e=o>=-128&&l<=127?Int8Array:o>=-32768&&l<=32767?Int16Array:Int32Array;const h=n.length,d=8+3*h,u=new Uint32Array(d);let p=0;u[p++]=d*Uint32Array.BYTES_PER_ELEMENT+(c-2*h)*e.BYTES_PER_ELEMENT,u[p++]=0,u[p++]=s,u[p++]=a,u[p++]=r?0:1,u[p++]=Math.max(0,Math.floor(i??0)),u[p++]=h,u[p++]=e.BYTES_PER_ELEMENT;for(const b of n)u[p++]=b.length-2,u[p++]=b[0],u[p++]=b[1];const f=new CompressionStream("deflate-raw"),m=f.writable.getWriter();await m.ready,m.write(u);const g=e.prototype.constructor;for(const b of n){const t=new g(b.length-2);for(let e=2,n=b.length;e<n;e++)t[e-2]=b[e]-b[e-2];m.write(t)}m.close();const v=await new Response(f.readable).arrayBuffer();return dt(new Uint8Array(v))}static async decompressSignature(t){try{const n=(e=t,Uint8Array.fromBase64?Uint8Array.fromBase64(e):nt(atob(e))),{readable:r,writable:i}=new DecompressionStream("deflate-raw"),s=i.getWriter();await s.ready,s.write(n).then(async()=>{await s.ready,await s.close()}).catch(()=>{});let a=null,o=0;for await(const t of r)a||=new Uint8Array(new Uint32Array(t.buffer,0,4)[0]),a.set(t,o),o+=t.length;const l=new Uint32Array(a.buffer,0,a.length>>2),c=l[1];if(0!==c)throw new Error(`Invalid version: ${c}`);const h=l[2],d=l[3],u=0===l[4],p=l[5],f=l[6],m=l[7],g=[],v=(8+3*f)*Uint32Array.BYTES_PER_ELEMENT;let b;switch(m){case Int8Array.BYTES_PER_ELEMENT:b=new Int8Array(a.buffer,v);break;case Int16Array.BYTES_PER_ELEMENT:b=new Int16Array(a.buffer,v);break;case Int32Array.BYTES_PER_ELEMENT:b=new Int32Array(a.buffer,v)}o=0;for(let t=0;t<f;t++){const e=l[3*t+8],n=new Float32Array(e+2);g.push(n);for(let r=0;r<2;r++)n[r]=l[3*t+8+r+1];for(let t=0;t<e;t++)n[t+2]=n[t]+b[o++]}return{areContours:u,thickness:p,outlines:g,width:h,height:d}}catch(n){return U(`decompressSignature: ${n}`),null}var e}}class ki extends vi{constructor(){super(),super.updateProperties({fill:Zt._defaultLineColor,"stroke-width":0})}clone(){const t=new ki;return t.updateAll(this),t}}class Ci extends _i{constructor(t){super(t),super.updateProperties({stroke:Zt._defaultLineColor,"stroke-width":1})}clone(){const t=new Ci(this._viewParameters);return t.updateAll(this),t}}class Si extends bi{#gl=!1;#vl=null;#bl=null;#yl=null;static _type="signature";static _editorType=(()=>v.SIGNATURE)();static _defaultDrawingOptions=null;constructor(t){super({...t,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#bl=t.signatureData||null,this.#vl=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(t,e){Zt.initialize(t,e),this._defaultDrawingOptions=new ki,this._defaultDrawnSignatureOptions=new Ci(e.viewParameters)}static getDefaultDrawingOptions(t){const e=this._defaultDrawingOptions.clone();return e.updateProperties(t),e}static get supportMultipleDrawings(){return!1}static get typesMap(){return G(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#vl}}static computeTelemetryFinalData(t){const e=t.get("hasDescription");return{hasAltText:e.get(!0)??0,hasNoAltText:e.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){null!==this._drawId&&super.onScaleChanging()}render(){if(this.div)return this.div;let t,e;const{_isCopy:n}=this;if(n&&(this._isCopy=!1,t=this.x,e=this.y),super.render(),null===this._drawId)if(this.#bl){const{lines:t,mustSmooth:e,areContours:n,description:r,uuid:i,heightInPage:s}=this.#bl,{rawDims:{pageWidth:a,pageHeight:o},rotation:l}=this.parent.viewport,c=Ei.processDrawnLines({lines:t,pageWidth:a,pageHeight:o,rotation:l,innerMargin:Si._INNER_MARGIN,mustSmooth:e,areContours:n});this.addSignature(c,s,r,i)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#vl||""}));return n&&(this._isCopy=!0,this._moveAfterPaste(t,e)),this.div}setUuid(t){this.#yl=t,this.addEditToolbar()}getUuid(){return this.#yl}get description(){return this.#vl}set description(t){this.#vl=t,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:t})),super.addEditToolbar().then(e=>{e?.updateEditSignatureButton(t)}))}getSignaturePreview(){const{newCurves:t,areContours:e,thickness:n,width:r,height:i}=this.#bl,s=Math.max(r,i);return{areContours:e,outline:Ei.processDrawnLines({lines:{curves:t.map(t=>({points:t})),thickness:n,width:r,height:i},pageWidth:s,pageHeight:s,rotation:0,innerMargin:0,mustSmooth:!1,areContours:e}).outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(t,e,n,r){const{x:i,y:s}=this,{outline:a}=this.#bl=t;let o;this.#gl=a instanceof xi,this.description=n,this.#gl?o=Si.getDefaultDrawingOptions():(o=Si._defaultDrawnSignatureOptions.clone(),o.updateProperties({"stroke-width":a.thickness})),this._addOutlines({drawOutlines:a,drawingOptions:o});const[,l]=this.pageDimensions;let c=e/l;c=c>=1?.5:c,this.width*=c/this.height,this.width>=1&&(c*=.9/this.width,this.width=.9),this.height=c,this.setDims(),this.x=i,this.y=s,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(r),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!r,hasDescription:!!n}}),this.div.hidden=!1}getFromImage(t){const{rawDims:{pageWidth:e,pageHeight:n},rotation:r}=this.parent.viewport;return Ei.process(t,e,n,r,Si._INNER_MARGIN)}getFromText(t,e){const{rawDims:{pageWidth:n,pageHeight:r},rotation:i}=this.parent.viewport;return Ei.extractContoursFromText(t,e,n,r,i,Si._INNER_MARGIN)}getDrawnSignature(t){const{rawDims:{pageWidth:e,pageHeight:n},rotation:r}=this.parent.viewport;return Ei.processDrawnLines({lines:t,pageWidth:e,pageHeight:n,rotation:r,innerMargin:Si._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions(t){let{areContours:e,thickness:n}=t;e?this._drawingOptions=Si.getDefaultDrawingOptions():(this._drawingOptions=Si._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":n}))}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;const{lines:e,points:n}=this.serializeDraw(t),{_drawingOptions:{"stroke-width":r}}=this,i=Object.assign(super.serialize(t),{isSignature:!0,areContours:this.#gl,color:[0,0,0],thickness:this.#gl?0:r});return this.addComment(i),t?(i.paths={lines:e,points:n},i.uuid=this.#yl,i.isCopy=!0):i.lines=e,this.#vl&&(i.accessibilityData={type:"Figure",alt:this.#vl}),i}static deserializeDraw(t,e,n,r,i,s){return s.areContours?xi.deserialize(t,e,n,r,i,s):wi.deserialize(t,e,n,r,i,s)}static async deserialize(t,e,n){const r=await super.deserialize(t,e,n);return r.#gl=t.areContours,r.description=t.accessibilityData?.alt||"",r.#yl=t.uuid,r}}class Ti extends Zt{#wl=null;#_l=null;#Al=null;#xl=null;#El=null;#kl="";#Cl=null;#Sl=!1;#Tl=null;#Dl=!1;#Ml=!1;static _type="stamp";static _editorType=(()=>v.STAMP)();constructor(t){super({...t,name:"stampEditor"}),this.#xl=t.bitmapUrl,this.#El=t.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(t,e){Zt.initialize(t,e)}static isHandlingMimeForPasting(t){return Pt.includes(t)}static paste(t,e){e.pasteEditor({mode:v.STAMP},{bitmapFile:t.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(t){const e=t.get("hasAltText");return{hasAltText:e.get(!0)??0,hasNoAltText:e.get(!1)??0}}#Pl(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?(this.#wl=t.bitmap,e||(this.#_l=t.id,this.#Dl=t.isSvg),t.file&&(this.#kl=t.file.name),this.#Il()):this.remove()}#Fl(){if(this.#Al=null,this._uiManager.enableWaiting(!1),this.#Cl)if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#wl)this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});else{if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#wl){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.hasAltTextData())return null;const{mlManager:n}=this._uiManager;if(!n)throw new Error("No ML.");if(!await n.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data:r,width:i,height:s}=t||this.copyCanvas(null,null,!0).imageData,a=await n.guess({name:"altText",request:{data:r,width:i,height:s,channels:r.length/(i*s)}});if(!a)throw new Error("No response from the AI service.");if(a.error)throw new Error("Error from the AI service.");if(a.cancel)return null;if(!a.output)throw new Error("No valid response from the AI service.");const o=a.output;return await this.setGuessedAltText(o),e&&!this.hasAltTextData()&&(this.altTextData={alt:o,decorative:!1}),o}#Rl(){if(this.#_l)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#_l).then(t=>this.#Pl(t,!0)).finally(()=>this.#Fl());if(this.#xl){const t=this.#xl;return this.#xl=null,this._uiManager.enableWaiting(!0),void(this.#Al=this._uiManager.imageManager.getFromUrl(t).then(t=>this.#Pl(t)).finally(()=>this.#Fl()))}if(this.#El){const t=this.#El;return this.#El=null,this._uiManager.enableWaiting(!0),void(this.#Al=this._uiManager.imageManager.getFromFile(t).then(t=>this.#Pl(t)).finally(()=>this.#Fl()))}const t=document.createElement("input");t.type="file",t.accept=Pt.join(",");const e=this._uiManager._signal;this.#Al=new Promise(n=>{t.addEventListener("change",async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#Pl(e)}else this.remove();n()},{signal:e}),t.addEventListener("cancel",()=>{this.remove(),n()},{signal:e})}).finally(()=>this.#Fl()),t.click()}remove(){this.#_l&&(this.#wl=null,this._uiManager.imageManager.deleteId(this.#_l),this.#Cl?.remove(),this.#Cl=null,this.#Tl&&(clearTimeout(this.#Tl),this.#Tl=null)),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#_l&&null===this.#Cl&&this.#Rl(),this.isAttachedToDOM||this.parent.add(this))):this.#_l&&this.#Rl()}onceAdded(t){this._isDraggable=!0,t&&this.div.focus()}isEmpty(){return!(this.#Al||this.#wl||this.#xl||this.#El||this.#_l||this.#Sl)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let t,e;return this._isCopy&&(t=this.x,e=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#Sl||(this.#wl?this.#Il():this.#Rl()),this._isCopy&&this._moveAfterPaste(t,e),this._uiManager.addShouldRescale(this),this.div}setCanvas(t,e){const{id:n,bitmap:r}=this._uiManager.imageManager.getFromCanvas(t,e);e.remove(),n&&this._uiManager.imageManager.isValidId(n)&&(this.#_l=n,r&&(this.#wl=r),this.#Sl=!1,this.#Il())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;null!==this.#Tl&&clearTimeout(this.#Tl);this.#Tl=setTimeout(()=>{this.#Tl=null,this.#Nl()},200)}#Il(){const{div:t}=this;let{width:e,height:n}=this.#wl;const[r,i]=this.pageDimensions,s=.75;if(this.width)e=this.width*r,n=this.height*i;else if(e>s*r||n>s*i){const t=Math.min(s*r/e,s*i/n);e*=t,n*=t}this._uiManager.enableWaiting(!1);const a=this.#Cl=document.createElement("canvas");a.setAttribute("role","img"),this.addContainer(a),this.width=e/r,this.height=n/i,this.setDims(),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&!this.annotationElementId||(t.hidden=!1),this.#Nl(),this.#Ml||(this.parent.addUndoableEditor(this),this.#Ml=!0),this._reportTelemetry({action:"inserted_image"}),this.#kl&&this.div.setAttribute("aria-description",this.#kl),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(t=224);const{width:r,height:i}=this.#wl,s=new Mt;let a=this.#wl,o=r,l=i,c=null;if(e){if(r>e||i>e){const t=Math.min(e/r,e/i);o=Math.floor(r*t),l=Math.floor(i*t)}c=document.createElement("canvas");const t=c.width=Math.ceil(o*s.sx),n=c.height=Math.ceil(l*s.sy);this.#Dl||(a=this.#Ll(t,n));const h=c.getContext("2d");h.filter=this._uiManager.hcmFilter;let d="white",u="#cfcfd8";"none"!==this._uiManager.hcmFilter?u="black":It.isDarkMode&&(d="#8f8f9d",u="#42414d");const p=15,f=p*s.sx,m=p*s.sy,g=new OffscreenCanvas(2*f,2*m),v=g.getContext("2d");v.fillStyle=d,v.fillRect(0,0,2*f,2*m),v.fillStyle=u,v.fillRect(0,0,f,m),v.fillRect(f,m,f,m),h.fillStyle=h.createPattern(g,"repeat"),h.fillRect(0,0,t,n),h.drawImage(a,0,0,a.width,a.height,0,0,t,n)}let h=null;if(n){let e,n;if(s.symmetric&&a.width<t&&a.height<t)e=a.width,n=a.height;else if(a=this.#wl,r>t||i>t){const s=Math.min(t/r,t/i);e=Math.floor(r*s),n=Math.floor(i*s),this.#Dl||(a=this.#Ll(e,n))}const o=new OffscreenCanvas(e,n).getContext("2d",{willReadFrequently:!0});o.drawImage(a,0,0,a.width,a.height,0,0,e,n),h={width:e,height:n,data:o.getImageData(0,0,e,n).data}}return{canvas:c,width:o,height:l,imageData:h}}#Ll(t,e){const{width:n,height:r}=this.#wl;let i=n,s=r,a=this.#wl;for(;i>2*t||s>2*e;){const n=i,r=s;i>2*t&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2)),s>2*e&&(s=s>=16384?Math.floor(s/2)-1:Math.ceil(s/2));const o=new OffscreenCanvas(i,s);o.getContext("2d").drawImage(a,0,0,n,r,0,0,i,s),a=o.transferToImageBitmap()}return a}#Nl(){const[t,e]=this.parentDimensions,{width:n,height:r}=this,i=new Mt,s=Math.ceil(n*t*i.sx),a=Math.ceil(r*e*i.sy),o=this.#Cl;if(!o||o.width===s&&o.height===a)return;o.width=s,o.height=a;const l=this.#Dl?this.#wl:this.#Ll(s,a),c=o.getContext("2d");c.filter=this._uiManager.hcmFilter,c.drawImage(l,0,0,l.width,l.height,0,0,s,a)}#Ol(t){if(t){if(this.#Dl){const t=this._uiManager.imageManager.getSvgUrl(this.#_l);if(t)return t}const t=document.createElement("canvas");({width:t.width,height:t.height}=this.#wl);return t.getContext("2d").drawImage(this.#wl,0,0),t.toDataURL()}if(this.#Dl){const[t,e]=this.pageDimensions,n=Math.round(this.width*t*mt.PDF_TO_CSS_UNITS),r=Math.round(this.height*e*mt.PDF_TO_CSS_UNITS),i=new OffscreenCanvas(n,r);return i.getContext("2d").drawImage(this.#wl,0,0,this.#wl.width,this.#wl.height,0,0,n,r),i.transferToImageBitmap()}return structuredClone(this.#wl)}static async deserialize(t,e,n){let r=null,i=!1;if(t instanceof ii){const{data:{rect:s,rotation:a,id:o,structParent:l,popupRef:c,richText:h,contentsObj:d,creationDate:u,modificationDate:p},container:f,parent:{page:{pageNumber:m}},canvas:g}=t;let b,y;g?(delete t.canvas,({id:b,bitmap:y}=n.imageManager.getFromCanvas(f.id,g)),g.remove()):(i=!0,t._hasNoCanvas=!0);const w=(await e._structTree.getAriaAttributes(`${ct}${o}`))?.get("aria-label")||"";r=t={annotationType:v.STAMP,bitmapId:b,bitmap:y,pageIndex:m-1,rect:s.slice(0),rotation:a,annotationElementId:o,id:o,deleted:!1,accessibilityData:{decorative:!1,altText:w},isSvg:!1,structParent:l,popupRef:c,richText:h,comment:d?.str||null,creationDate:u,modificationDate:p}}const s=await super.deserialize(t,e,n),{rect:a,bitmap:o,bitmapUrl:l,bitmapId:c,isSvg:h,accessibilityData:d}=t;i?(n.addMissingCanvas(t.id,s),s.#Sl=!0):c&&n.imageManager.isValidId(c)?(s.#_l=c,o&&(s.#wl=o)):s.#xl=l,s.#Dl=h;const[u,p]=s.pageDimensions;return s.width=(a[2]-a[0])/u,s.height=(a[3]-a[1])/p,d&&(s.altTextData=d),s._initialData=r,t.comment&&s.setCommentData(t),s.#Ml=!!r,s}serialize(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const n=Object.assign(super.serialize(t),{bitmapId:this.#_l,isSvg:this.#Dl});if(this.addComment(n),t)return n.bitmapUrl=this.#Ol(!0),n.accessibilityData=this.serializeAltText(!0),n.isCopy=!0,n;const{decorative:r,altText:i}=this.serializeAltText(!1);if(!r&&i&&(n.accessibilityData={type:"Figure",alt:i}),this.annotationElementId){const t=this.#_a(n);return t.isSame?null:(t.isSameAltText?delete n.accessibilityData:n.accessibilityData.structParent=this._initialData.structParent??-1,n.id=this.annotationElementId,delete n.bitmapId,n)}if(null===e)return n;e.stamps||=new Map;const s=this.#Dl?(n.rect[2]-n.rect[0])*(n.rect[3]-n.rect[1]):null;if(e.stamps.has(this.#_l)){if(this.#Dl){const t=e.stamps.get(this.#_l);s>t.area&&(t.area=s,t.serialized.bitmap.close(),t.serialized.bitmap=this.#Ol(!1))}}else e.stamps.set(this.#_l,{area:s,serialized:n}),n.bitmap=this.#Ol(!1);return n}#_a(t){const{pageIndex:e,accessibilityData:{altText:n}}=this._initialData,r=t.pageIndex===e,i=(t.accessibilityData?.alt||"")===n;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&r&&i,isSameAltText:i}}renderAnnotationElement(t){return this.deleted?(t.hide(),null):(t.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}}class Di{#ia;#Bl=!1;#$l=null;#zl=null;#jl=null;#Ul=(()=>new Map)();#Hl=!1;#Vl=!1;#ql=!1;#Wl=null;#Gl=null;#Kl=null;#Xl=null;#Yl=null;#Zl=-1;#v;static _initialized=!1;static#q=(()=>new Map([li,Ai,Ti,gi,Si].map(t=>[t._editorType,t])))();constructor(t){let{uiManager:e,pageIndex:n,div:r,structTreeLayer:i,accessibilityManager:s,annotationLayer:a,drawLayer:o,textLayer:l,viewport:c,l10n:h}=t;const d=[...Di.#q.values()];if(!Di._initialized){Di._initialized=!0;for(const t of d)t.initialize(h,e)}e.registerEditorTypes(d),this.#v=e,this.pageIndex=n,this.div=r,this.#ia=s,this.#$l=a,this.viewport=c,this.#Kl=l,this.drawLayer=o,this._structTree=i,this.#v.addLayer(this)}get isEmpty(){return 0===this.#Ul.size}get isInvisible(){return this.isEmpty&&this.#v.getMode()===v.NONE}updateToolbar(t){this.#v.updateToolbar(t)}updateMode(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.#v.getMode();switch(this.#Jl(),t){case v.NONE:return this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),void this.disableClick();case v.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case v.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList:e}=this.div;if(e.toggle("nonEditing",!1),t===v.POPUP)e.toggle("commentEditing",!0);else{e.toggle("commentEditing",!1);for(const n of Di.#q.values())e.toggle(`${n._type}Editing`,t===n._editorType)}this.div.hidden=!1}hasTextLayer(t){return t===this.#Kl?.div}setEditingState(t){this.#v.setEditingState(t)}addCommands(t){this.#v.addCommands(t)}cleanUndoStack(t){this.#v.cleanUndoStack(t)}toggleDrawing(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("drawing",!t)}togglePointerEvents(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.div.classList.toggle("disabled",!t)}toggleAnnotationLayerPointerEvents(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.#$l?.div.classList.toggle("disabled",!t)}get#Ql(){return 0!==this.#Ul.size?this.#Ul.values():this.#v.getEditors(this.pageIndex)}async enable(){this.#ql=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),this.#Yl?.abort(),this.#Yl=null;const t=new Set;for(const n of this.#Ql)n.enableEditing(),n.show(!0),n.annotationElementId&&(this.#v.removeChangedExistingAnnotation(n),t.add(n.annotationElementId));const e=this.#$l;if(e)for(const n of e.getEditableAnnotations()){if(n.hide(),this.#v.isDeletedAnnotationElement(n.data.id))continue;if(t.has(n.data.id))continue;const e=await this.deserialize(n);e&&(this.addOrRebuild(e),e.enableEditing())}this.#ql=!1,this.#v._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){if(this.#Vl=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),this.#Kl&&!this.#Yl){this.#Yl=new AbortController;const t=this.#v.combinedSignal(this.#Yl);this.#Kl.div.addEventListener("pointerdown",t=>{const{clientX:e,clientY:n,timeStamp:r}=t;if(r-this.#Zl>500)return void(this.#Zl=r);this.#Zl=-1;const{classList:i}=this.div;i.toggle("getElements",!0);const s=document.elementsFromPoint(e,n);if(i.toggle("getElements",!1),!this.div.contains(s[0]))return;let a;const o=new RegExp(`^${g}[0-9]+$`);for(const c of s)if(o.test(c.id)){a=c.id;break}if(!a)return;const l=this.#Ul.get(a);null===l?.annotationElementId&&(t.stopPropagation(),t.preventDefault(),l.dblclick(t))},{signal:t,capture:!0})}const t=this.#$l;if(t){const e=new Map,n=new Map;for(const i of this.#Ql)i.disableEditing(),i.annotationElementId?null===i.serialize()?(n.set(i.annotationElementId,i),this.getEditableAnnotation(i.annotationElementId)?.show(),i.remove()):e.set(i.annotationElementId,i):i.updateFakeAnnotationElement(t);const r=t.getEditableAnnotations();for(const t of r){const{id:r}=t.data;if(this.#v.isDeletedAnnotationElement(r)){t.updateEdited({deleted:!0});continue}let i=n.get(r);i?(i.resetAnnotationElement(t),i.show(!1),t.show()):(i=e.get(r),i&&(this.#v.addChangedExistingAnnotation(i),i.renderAnnotationElement(t)&&i.show(!1)),t.show())}}this.#Jl(),this.isEmpty&&(this.div.hidden=!0);const{classList:e}=this.div;for(const n of Di.#q.values())e.remove(`${n._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#Vl=!1}getEditableAnnotation(t){return this.#$l?.getEditableAnnotation(t)||null}setActiveEditor(t){this.#v.getActive()!==t&&this.#v.setActiveEditor(t)}enableTextSelection(){if(this.div.tabIndex=-1,this.#Kl?.div&&!this.#Xl){this.#Xl=new AbortController;const t=this.#v.combinedSignal(this.#Xl);this.#Kl.div.addEventListener("pointerdown",this.#tc.bind(this),{signal:t}),this.#Kl.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#Kl?.div&&this.#Xl&&(this.#Xl.abort(),this.#Xl=null,this.#Kl.div.classList.remove("highlighting"))}#tc(t){this.#v.unselectAll();const{target:e}=t;if(e===this.#Kl.div||("img"===e.getAttribute("role")||e.classList.contains("endOfContent"))&&this.#Kl.div.contains(e)){const{isMac:e}=rt.platform;if(0!==t.button||t.ctrlKey&&e)return;this.#v.showAllEditors("highlight",!0,!0),this.#Kl.div.classList.add("free"),this.toggleDrawing(),gi.startHighlighting(this,"ltr"===this.#v.direction,{target:this.#Kl.div,x:t.x,y:t.y}),this.#Kl.div.addEventListener("pointerup",()=>{this.#Kl.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#v._signal}),t.preventDefault()}}enableClick(){if(this.#zl)return;this.#zl=new AbortController;const t=this.#v.combinedSignal(this.#zl);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:t});const e=this.pointerup.bind(this);this.div.addEventListener("pointerup",e,{signal:t}),this.div.addEventListener("pointercancel",e,{signal:t})}disableClick(){this.#zl?.abort(),this.#zl=null}attach(t){this.#Ul.set(t.id,t);const{annotationElementId:e}=t;e&&this.#v.isDeletedAnnotationElement(e)&&this.#v.removeDeletedAnnotationElement(t)}detach(t){this.#Ul.delete(t.id),this.#ia?.removePointerInTextLayer(t.contentDiv),!this.#Vl&&t.annotationElementId&&this.#v.addDeletedAnnotationElement(t)}remove(t){this.detach(t),this.#v.removeEditor(t),t.div.remove(),t.isAttachedToDOM=!1}changeParent(t){t.parent!==this&&(t.parent&&t.annotationElementId&&(this.#v.addDeletedAnnotationElement(t.annotationElementId),Zt.deleteAnnotationElement(t),t.annotationElementId=null),this.attach(t),t.parent?.detach(t),t.setParent(this),t.div&&t.isAttachedToDOM&&(t.div.remove(),this.div.append(t.div)))}add(t){if(t.parent!==this||!t.isAttachedToDOM){if(this.changeParent(t),this.#v.addEditor(t),this.attach(t),!t.isAttachedToDOM){const e=t.render();this.div.append(e),t.isAttachedToDOM=!0}t.fixAndSetPosition(),t.onceAdded(!this.#ql),this.#v.addToAnnotationStorage(t),t._reportTelemetry(t.telemetryInitialData)}}moveEditorInDOM(t){if(!t.isAttachedToDOM)return;const{activeElement:e}=document;t.div.contains(e)&&!this.#jl&&(t._focusEventsAllowed=!1,this.#jl=setTimeout(()=>{this.#jl=null,t.div.contains(document.activeElement)?t._focusEventsAllowed=!0:(t.div.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this.#v._signal}),e.focus())},0)),t._structTreeParentId=this.#ia?.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}addOrRebuild(t){t.needsToBeRebuilt()?(t.parent||=this,t.rebuild(),t.show()):this.add(t)}addUndoableEditor(t){this.addCommands({cmd:()=>t._uiManager.rebuild(t),undo:()=>{t.remove()},mustExec:!1})}getEditorByUID(t){for(const e of this.#Ul.values())if(e.uid===t)return e;return null}getNextId(){return this.#v.getId()}get#ec(){return Di.#q.get(this.#v.getMode())}combinedSignal(t){return this.#v.combinedSignal(t)}#nc(t){const e=this.#ec;return e?new e.prototype.constructor(t):null}canCreateNewEmptyEditor(){return this.#ec?.canCreateNewEmptyEditor()}async pasteEditor(t,e){this.updateToolbar(t),await this.#v.updateMode(t.mode);const{offsetX:n,offsetY:r}=this.#rc(),i=this.getNextId(),s=this.#nc({parent:this,id:i,x:n,y:r,uiManager:this.#v,isCentered:!0,...e});s&&this.add(s)}async deserialize(t){return await(Di.#q.get(t.annotationType??t.annotationEditorType)?.deserialize(t,this,this.#v))||null}createAndAddNewEditor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getNextId(),i=this.#nc({parent:this,id:r,x:t.offsetX,y:t.offsetY,uiManager:this.#v,isCentered:e,...n});return i&&this.add(i),i}get boundingClientRect(){return this.div.getBoundingClientRect()}#rc(){const{x:t,y:e,width:n,height:r}=this.boundingClientRect,i=Math.max(0,t),s=Math.max(0,e),a=(i+Math.min(window.innerWidth,t+n))/2-t,o=(s+Math.min(window.innerHeight,e+r))/2-e,[l,c]=this.viewport.rotation%180===0?[a,o]:[o,a];return{offsetX:l,offsetY:c}}addNewEditor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.createAndAddNewEditor(this.#rc(),!0,t)}setSelected(t){this.#v.setSelected(t)}toggleSelected(t){this.#v.toggleSelected(t)}unselect(t){this.#v.unselect(t)}pointerup(t){const{isMac:e}=rt.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;if(!this.#Hl)return;if(this.#Hl=!1,this.#ec?.isDrawer&&this.#ec.supportMultipleDrawings)return;if(!this.#Bl)return void(this.#Bl=!0);const n=this.#v.getMode();n!==v.STAMP&&n!==v.SIGNATURE?this.createAndAddNewEditor(t,!1):this.#v.unselectAll()}pointerdown(t){if(this.#v.getMode()===v.HIGHLIGHT&&this.enableTextSelection(),this.#Hl)return void(this.#Hl=!1);const{isMac:e}=rt.platform;if(0!==t.button||t.ctrlKey&&e)return;if(t.target!==this.div)return;if(this.#Hl=!0,this.#ec?.isDrawer)return void this.startDrawingSession(t);const n=this.#v.getActive();this.#Bl=!n||n.isEmpty()}startDrawingSession(t){if(this.div.focus({preventScroll:!0}),this.#Wl)return void this.#ec.startDrawing(this,this.#v,!1,t);this.#v.setCurrentDrawingSession(this),this.#Wl=new AbortController;const e=this.#v.combinedSignal(this.#Wl);this.div.addEventListener("blur",t=>{let{relatedTarget:e}=t;e&&!this.div.contains(e)&&(this.#Gl=null,this.commitOrRemove())},{signal:e}),this.#ec.startDrawing(this,this.#v,!1,t)}pause(t){if(t){const{activeElement:t}=document;return void(this.div.contains(t)&&(this.#Gl=t))}this.#Gl&&setTimeout(()=>{this.#Gl?.focus(),this.#Gl=null},0)}endDrawingSession(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.#Wl?(this.#v.setCurrentDrawingSession(null),this.#Wl.abort(),this.#Wl=null,this.#Gl=null,this.#ec.endDrawing(t)):null}findNewParent(t,e,n){const r=this.#v.findParent(e,n);return null!==r&&r!==this&&(r.changeParent(t),!0)}commitOrRemove(){return!!this.#Wl&&(this.endDrawingSession(),!0)}onScaleChanging(){this.#Wl&&this.#ec.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#v.getActive()?.parent===this&&(this.#v.commitOrRemove(),this.#v.setActiveEditor(null)),this.#jl&&(clearTimeout(this.#jl),this.#jl=null);for(const t of this.#Ul.values())this.#ia?.removePointerInTextLayer(t.contentDiv),t.setParent(null),t.isAttachedToDOM=!1,t.div.remove();this.div=null,this.#Ul.clear(),this.#v.removeLayer(this)}#Jl(){for(const t of this.#Ul.values())t.isEmpty()&&t.remove()}render(t){let{viewport:e}=t;this.viewport=e,Dt(this.div,e);for(const n of this.#v.getEditors(this.pageIndex))this.add(n),n.rebuild();this.updateMode()}update(t){let{viewport:e}=t;this.#v.commitOrRemove(),this.#Jl();const n=this.viewport.rotation,r=e.rotation;if(this.viewport=e,Dt(this.div,{rotation:r}),n!==r)for(const i of this.#Ul.values())i.rotate(r)}get pageDimensions(){const{pageWidth:t,pageHeight:e}=this.viewport.rawDims;return[t,e]}get scale(){return this.#v.viewParameters.realScale}}class Mi{#Ts=null;#ic=(()=>new Map)();#sc=(()=>new Map)();static#_=0;constructor(t){let{pageIndex:e}=t;this.pageIndex=e}setParent(t){if(this.#Ts){if(this.#Ts!==t){if(this.#ic.size>0)for(const e of this.#ic.values())e.remove(),t.append(e);this.#Ts=t}}else this.#Ts=t}static get _svgFactory(){return G(this,"_svgFactory",new Dr)}static#ac(t,e){let[n,r,i,s]=e;const{style:a}=t;a.top=100*r+"%",a.left=100*n+"%",a.width=100*i+"%",a.height=100*s+"%"}#oc(){const t=Mi._svgFactory.create(1,1,!0);return this.#Ts.append(t),t.setAttribute("aria-hidden",!0),t}#lc(t,e){const n=Mi._svgFactory.createElement("clipPath");t.append(n);const r=`clip_${e}`;n.setAttribute("id",r),n.setAttribute("clipPathUnits","objectBoundingBox");const i=Mi._svgFactory.createElement("use");return n.append(i),i.setAttribute("href",`#${e}`),i.classList.add("clip"),r}#cc(t,e){for(const[n,r]of Object.entries(e))null===r?t.removeAttribute(n):t.setAttribute(n,r)}draw(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=Mi.#_++,i=this.#oc(),s=Mi._svgFactory.createElement("defs");i.append(s);const a=Mi._svgFactory.createElement("path");s.append(a);const o=`path_p${this.pageIndex}_${r}`;a.setAttribute("id",o),a.setAttribute("vector-effect","non-scaling-stroke"),e&&this.#sc.set(r,a);const l=n?this.#lc(s,o):null,c=Mi._svgFactory.createElement("use");return i.append(c),c.setAttribute("href",`#${o}`),this.updateProperties(i,t),this.#ic.set(r,i),{id:r,clipPathId:`url(#${l})`}}drawOutline(t,e){const n=Mi.#_++,r=this.#oc(),i=Mi._svgFactory.createElement("defs");r.append(i);const s=Mi._svgFactory.createElement("path");i.append(s);const a=`path_p${this.pageIndex}_${n}`;let o;if(s.setAttribute("id",a),s.setAttribute("vector-effect","non-scaling-stroke"),e){const t=Mi._svgFactory.createElement("mask");i.append(t),o=`mask_p${this.pageIndex}_${n}`,t.setAttribute("id",o),t.setAttribute("maskUnits","objectBoundingBox");const e=Mi._svgFactory.createElement("rect");t.append(e),e.setAttribute("width","1"),e.setAttribute("height","1"),e.setAttribute("fill","white");const r=Mi._svgFactory.createElement("use");t.append(r),r.setAttribute("href",`#${a}`),r.setAttribute("stroke","none"),r.setAttribute("fill","black"),r.setAttribute("fill-rule","nonzero"),r.classList.add("mask")}const l=Mi._svgFactory.createElement("use");r.append(l),l.setAttribute("href",`#${a}`),o&&l.setAttribute("mask",`url(#${o})`);const c=l.cloneNode();return r.append(c),l.classList.add("mainOutline"),c.classList.add("secondaryOutline"),this.updateProperties(r,t),this.#ic.set(n,r),n}finalizeDraw(t,e){this.#sc.delete(t),this.updateProperties(t,e)}updateProperties(t,e){if(!e)return;const{root:n,bbox:r,rootClass:i,path:s}=e,a="number"===typeof t?this.#ic.get(t):t;if(a){if(n&&this.#cc(a,n),r&&Mi.#ac(a,r),i){const{classList:t}=a;for(const[e,n]of Object.entries(i))t.toggle(e,n)}if(s){const t=a.firstChild.firstChild;this.#cc(t,s)}}}updateParent(t,e){if(e===this)return;const n=this.#ic.get(t);n&&(e.#Ts.append(n),this.#ic.delete(t),e.#ic.set(t,n))}remove(t){this.#sc.delete(t),null!==this.#Ts&&(this.#ic.get(t).remove(),this.#ic.delete(t))}destroy(){this.#Ts=null;for(const t of this.#ic.values())t.remove();this.#ic.clear(),this.#sc.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner:ui},globalThis.pdfjsLib={AbortException:tt,AnnotationEditorLayer:Di,AnnotationEditorParamsType:b,AnnotationEditorType:v,AnnotationEditorUIManager:Gt,AnnotationLayer:ai,AnnotationMode:m,AnnotationType:C,applyOpacity:function(t,e,n,r){const i=255*(1-(r=Math.min(Math.max(r??1,0),1)));return[t=Math.round(t*r+i),e=Math.round(e*r+i),n=Math.round(n*r+i)]},build:"f56dc8601",ColorPicker:xr,createValidAbsoluteUrl:q,CSSConstants:class{static get commentForegroundColor(){const t=document.createElement("span");t.classList.add("comment","sidebar");const{style:e}=t;e.width=e.height="0",e.display="none",e.color="var(--comment-fg-color)",document.body.append(t);const{color:n}=window.getComputedStyle(t);return t.remove(),G(this,"commentForegroundColor",Ct(n))}},DOMSVGFactory:Dr,DrawLayer:Mi,FeatureTest:rt,fetchData:gt,findContrastColor:function(t,e){const n=t[0]+256*t[1]+65536*t[2]+16777216*e[0]+4294967296*e[1]+1099511627776*e[2];let r=Ot.get(n);if(r)return r;const i=new Float32Array(9),s=i.subarray(0,3),a=i.subarray(3,6);Ft(t,a);const o=i.subarray(6,9);Ft(e,o);const l=o[2]<.5,c=l?12:4.5;if(a[2]=l?Math.sqrt(a[2]):1-Math.sqrt(1-a[2]),Lt(a,o,s)<c){let t,e;l?(t=a[2],e=1):(t=0,e=a[2]);const n=.005;for(;e-t>n;){const n=a[2]=(t+e)/2;l===Lt(a,o,s)<c?t=n:e=n}a[2]=l?e:t}return Rt(a,s),r=st.makeHexColor(Math.round(255*s[0]),Math.round(255*s[1]),Math.round(255*s[2])),Ot.set(n,r),r},getDocument:fr,getFilenameFromUrl:function(t){return[t]=t.split(/[#?]/,1),t.substring(t.lastIndexOf("/")+1)},getPdfFilenameFromUrl:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!==typeof t)return e;if(yt(t))return U('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;const n=(t=>{try{return new URL(t)}catch{try{return new URL(decodeURIComponent(t))}catch{try{return new URL(t,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(t),"https://foo.bar")}catch{return null}}}}})(t);if(!n)return e;const r=t=>{try{let e=decodeURIComponent(t);return e.includes("/")?(e=e.split("/").at(-1),e.test(/^\.pdf$/i)?e:t):e}catch{return t}},i=/\.pdf$/i,s=n.pathname.split("/").at(-1);if(i.test(s))return r(s);if(n.searchParams.size>0){const t=Array.from(n.searchParams.values()).reverse();for(const n of t)if(i.test(n))return r(n);const e=Array.from(n.searchParams.keys()).reverse();for(const n of e)if(i.test(n))return r(n)}if(n.hash){const t=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(n.hash);if(t)return r(t[0])}return e},getRGB:Ct,getUuid:lt,getXfaPageViewport:function(t,e){let{scale:n=1,rotation:r=0}=e;const{width:i,height:s}=t.attributes.style,a=[0,0,parseInt(i),parseInt(s)];return new vt({viewBox:a,userUnit:1,scale:n,rotation:r})},GlobalWorkerOptions:Bn,ImageKind:k,InvalidPDFException:Z,isDataScheme:yt,isPdfFile:wt,isValidExplicitDest:he,MathClamp:ht,noContextMenu:xt,normalizeUnicode:function(t){return at||(at=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ot=new Map([["\ufb05","\u017ft"]])),t.replaceAll(at,(t,e,n)=>e?e.normalize("NFKC"):ot.get(n))},OPS:F,OutputScale:Mt,PasswordResponses:{NEED_PASSWORD:1,INCORRECT_PASSWORD:2},PDFDataRangeTransport:gr,PDFDateString:kt,PDFWorker:yr,PermissionFlag:{PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},PixelsPerInch:mt,RenderingCancelledException:bt,renderRichText:Bt,ResponseException:J,setLayerDimensions:Dt,shadow:G,SignatureExtractor:Ei,stopEvent:Et,SupportedImageMimeTypes:Pt,TextLayer:pr,TouchManager:Yt,updateUrlHash:W,Util:st,VerbosityLevel:I,version:"5.4.296",XfaLayer:pt}},17402(t,e,n){"use strict";n.d(e,{A:()=>x});var r=n(89261),i=n(94922),s=n(47215),a=Object.prototype.hasOwnProperty;function o(t,e,n){for(n of t.keys())if(l(n,e))return n}function l(t,e){var n,r,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&l(t[r],e[r]););return-1===r}if(n===Set){if(t.size!==e.size)return!1;for(r of t){if((i=r)&&"object"===typeof i&&!(i=o(e,i)))return!1;if(!e.has(i))return!1}return!0}if(n===Map){if(t.size!==e.size)return!1;for(r of t){if((i=r[0])&&"object"===typeof i&&!(i=o(e,i)))return!1;if(!l(r[1],e.get(i)))return!1}return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((r=t.byteLength)===e.byteLength)for(;r--&&t.getInt8(r)===e.getInt8(r););return-1===r}if(ArrayBuffer.isView(t)){if((r=t.byteLength)===e.byteLength)for(;r--&&t[r]===e[r];);return-1===r}if(!n||"object"===typeof t){for(n in r=0,t){if(a.call(t,n)&&++r&&!a.call(e,n))return!1;if(!(n in e)||!l(t[n],e[n]))return!1}return Object.keys(e).length===r}}return t!==t&&e!==e}var c=n(78805),h=n(41338),d=n(31079),u=n(64288),p=n(98677),f=n(88648);class m{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(t){this.pdfDocument=t}setViewer(t){this.pdfViewer=t}setExternalLinkRel(t){this.externalLinkRel=t}setExternalLinkTarget(t){this.externalLinkTarget=t}setHash(){}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return(0,u.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(t){(0,u.A)(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=t}get rotation(){return 0}set rotation(t){}addLinkAttributes(t,e,n){t.href=e,t.rel=this.externalLinkRel||"noopener noreferrer nofollow",t.target=n?"_blank":this.externalLinkTarget||""}goToDestination(t){return new Promise(e=>{(0,u.A)(this.pdfDocument,"PDF document not loaded."),(0,u.A)(t,"Destination is not specified."),"string"===typeof t?this.pdfDocument.getDestination(t).then(e):Array.isArray(t)?e(t):t.then(e)}).then(t=>{(0,u.A)(Array.isArray(t),`"${t}" is not a valid destination array.`);const e=t[0];new Promise(t=>{(0,u.A)(this.pdfDocument,"PDF document not loaded."),e instanceof Object?this.pdfDocument.getPageIndex(e).then(e=>{t(e)}).catch(()=>{(0,u.A)(!1,`"${e}" is not a valid page reference.`)}):"number"===typeof e?t(e):(0,u.A)(!1,`"${e}" is not a valid destination reference.`)}).then(e=>{const n=e+1;(0,u.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,u.A)(n>=1&&n<=this.pagesCount,`"${n}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:t,pageIndex:e,pageNumber:n})})})}goToPage(t){const e=t-1;(0,u.A)(this.pdfViewer,"PDF viewer is not initialized."),(0,u.A)(t>=1&&t<=this.pagesCount,`"${t}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:e,pageNumber:t})}goToXY(){}cachePageRef(){}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}executeNamedAction(){}executeSetOCGState(){}isPageVisible(){return!0}isPageCached(){return!0}navigateTo(t){this.goToDestination(t)}}var g=n(60591);const v={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var b=n(7762),y=n(63185);const{Tm:w}=d,_=(t,e)=>{switch(e){case v.NEED_PASSWORD:t(prompt("Enter the password to open this PDF file."));break;case v.INCORRECT_PASSWORD:t(prompt("Invalid password. Please try again."));break}};function A(t){return"object"===typeof t&&null!==t&&("data"in t||"range"in t||"url"in t)}const x=(0,i.forwardRef)(function(t,e){let{children:n,className:a,error:o="Failed to load PDF file.",externalLinkRel:v,externalLinkTarget:x,file:E,inputRef:k,imageResourcesPath:C,loading:S="Loading PDF\u2026",noData:T="No PDF file specified.",onItemClick:D,onLoadError:M,onLoadProgress:P,onLoadSuccess:I,onPassword:F=_,onSourceError:R,onSourceSuccess:N,options:L,renderMode:O,rotate:B,scale:$,...z}=t;const[j,U]=(0,b.A)(),{value:H,error:V}=j,[q,W]=(0,b.A)(),{value:G,error:K}=q,X=(0,i.useRef)(new m),Y=(0,i.useRef)([]),Z=(0,i.useRef)(void 0),J=(0,i.useRef)(void 0);E&&E!==Z.current&&A(E)&&(p(!l(E,Z.current),'File prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.'),Z.current=E),L&&L!==J.current&&(p(!l(L,J.current),'Options prop passed to <Document /> changed, but it\'s equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.'),J.current=L);const Q=(0,i.useRef)({scrollPageIntoView:t=>{const{dest:e,pageNumber:n,pageIndex:r=n-1}=t;if(D)return void D({dest:e,pageIndex:r,pageNumber:n});const i=Y.current[r];i?i.scrollIntoView():p(!1,`An internal link leading to page ${n} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});(0,i.useImperativeHandle)(e,()=>({linkService:X,pages:Y,viewer:Q}),[]),(0,i.useEffect)(function(){U({type:"RESET"})},[E,U]);const tt=(0,i.useCallback)(async()=>{if(!E)return null;if("string"===typeof E){if((0,y.zL)(E)){return{data:(0,y.jA)(E)}}return(0,y.qC)(),{url:E}}if(E instanceof w)return{range:E};if((0,y.mw)(E))return{data:E};if(y.Bd&&(0,y.qf)(E)){return{data:await(0,y.h1)(E)}}if((0,u.A)("object"===typeof E,"Invalid parameter in file, need either Uint8Array, string or a parameter object"),(0,u.A)(A(E),"Invalid parameter object: need either .data, .range or .url"),"url"in E&&"string"===typeof E.url){if((0,y.zL)(E.url)){const{url:t,...e}=E;return{data:(0,y.jA)(t),...e}}(0,y.qC)()}return E},[E]);(0,i.useEffect)(()=>{const t=(0,c.A)(tt());return t.promise.then(t=>{U({type:"RESOLVE",value:t})}).catch(t=>{U({type:"REJECT",error:t})}),()=>{(0,y.xL)(t)}},[tt,U]),(0,i.useEffect)(()=>{"undefined"!==typeof H&&(!1!==H?N&&N():V&&(p(!1,V.toString()),R&&R(V)))},[H]),(0,i.useEffect)(function(){W({type:"RESET"})},[W,H]),(0,i.useEffect)(function(){if(!H)return;const t=L?{...H,...L}:H,e=d.YE(t);P&&(e.onProgress=P),F&&(e.onPassword=F);const n=e;return n.promise.then(t=>{n.destroyed||W({type:"RESOLVE",value:t})}).catch(t=>{n.destroyed||W({type:"REJECT",error:t})}),()=>{n.destroy()}},[L,W,H]),(0,i.useEffect)(()=>{"undefined"!==typeof G&&(!1!==G?G&&(I&&I(G),Y.current=new Array(G.numPages),X.current.setDocument(G)):K&&(p(!1,K.toString()),M&&M(K)))},[G]),(0,i.useEffect)(function(){X.current.setViewer(Q.current),X.current.setExternalLinkRel(v),X.current.setExternalLinkTarget(x)},[v,x]);const et=(0,i.useCallback)((t,e)=>{Y.current[t]=e},[]),nt=(0,i.useCallback)(t=>{delete Y.current[t]},[]),rt=(0,i.useMemo)(()=>({imageResourcesPath:C,linkService:X.current,onItemClick:D,pdf:G,registerPage:et,renderMode:O,rotate:B,scale:$,unregisterPage:nt}),[C,D,G,et,O,B,$,nt]),it=(0,i.useMemo)(()=>(0,h.Ay)(z,()=>G),[z,G]);return(0,r.jsx)("div",{className:(0,s.A)("react-pdf__Document",a),ref:k,...it,children:E?void 0===G||null===G?(0,r.jsx)(g.A,{type:"loading",children:"function"===typeof S?S():S}):!1===G?(0,r.jsx)(g.A,{type:"error",children:"function"===typeof o?o():o}):function(){if(t=rt,!Boolean(null===t||void 0===t?void 0:t.pdf))throw new Error("pdf is undefined");var t;const e="function"===typeof n?n(rt):n;return(0,r.jsx)(f.A.Provider,{value:rt,children:e})}():(0,r.jsx)(g.A,{type:"no-data",children:"function"===typeof T?T():T})})})},88648(t,e,n){"use strict";n.d(e,{A:()=>r});const r=(0,n(94922).createContext)(null)},60591(t,e,n){"use strict";n.d(e,{A:()=>i});var r=n(89261);function i(t){let{children:e,type:n}=t;return(0,r.jsx)("div",{className:`react-pdf__message react-pdf__message--${n}`,children:e})}},2153(t,e,n){"use strict";n.d(e,{A:()=>L});var r=n(89261),i=n(94922),s=n(47215),a=n(78805),o=n(41338);function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.filter(Boolean);return n.length<=1?n[0]||null:function(t){for(var e=0,r=n;e<r.length;e++){var i=r[e];"function"===typeof i?i(t):i&&(i.current=t)}}}var c=n(64288),h=n(98677),d=n(60591),u=n(31079),p=n(88648);function f(){return(0,i.useContext)(p.A)}const m=(0,i.createContext)(null);function g(){return(0,i.useContext)(m)}var v=n(7762),b=n(63185);function y(){const t=f(),e=g();(0,c.A)(e,"Unable to find Page context.");const n={...t,...e},{filterAnnotations:o,imageResourcesPath:l,linkService:d,onGetAnnotationsError:p,onGetAnnotationsSuccess:m,onRenderAnnotationLayerError:y,onRenderAnnotationLayerSuccess:w,page:_,pdf:A,renderForms:x,rotate:E,scale:k=1}=n;(0,c.A)(A,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),(0,c.A)(_,"Attempted to load page annotations, but no page was specified."),(0,c.A)(d,"Attempted to load page annotations, but no linkService was specified.");const[C,S]=(0,v.A)(),{value:T,error:D}=C,M=(0,i.useRef)(null);h(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10),"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations"),(0,i.useEffect)(function(){S({type:"RESET"})},[S,_]),(0,i.useEffect)(function(){if(!_)return;const t=(0,a.A)(_.getAnnotations()),e=t;return t.promise.then(t=>{S({type:"RESOLVE",value:t})}).catch(t=>{S({type:"REJECT",error:t})}),()=>{(0,b.xL)(e)}},[S,_]),(0,i.useEffect)(()=>{void 0!==T&&(!1!==T?T&&m&&m(T):D&&(h(!1,D.toString()),p&&p(D)))},[T]);const P=(0,i.useMemo)(()=>_.getViewport({scale:k,rotation:E}),[_,E,k]);return(0,i.useEffect)(function(){if(!A||!_||!d||!T)return;const{current:t}=M;if(!t)return;const e=P.clone({dontFlip:!0}),n={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,annotationStorage:A.annotationStorage,commentManager:null,div:t,l10n:null,linkService:d,page:_,structTreeLayer:null,viewport:e},r={annotations:o?o({annotations:T}):T,annotationStorage:A.annotationStorage,div:t,imageResourcesPath:l,linkService:d,page:_,renderForms:x,viewport:e};t.innerHTML="";try{new u.dU(n).render(r),w&&w()}catch(i){!function(t){h(!1,`${t}`),y&&y(t)}(i)}return()=>{}},[T,o,l,d,_,A,x,P]),(0,r.jsx)("div",{className:(0,s.A)("react-pdf__Page__annotations","annotationLayer"),ref:M})}const w={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},_=/^H(\d+)$/;function A(t){return"children"in t}function x(t){return!!A(t)&&(1===t.children.length&&0 in t.children&&"id"in t.children[0])}function E(t){const e={};if(A(t)){const{role:n}=t,r=n.match(_);if(r)e.role="heading",e["aria-level"]=Number(r[1]);else if(function(t){return t in w}(n)){const t=w[n];t&&(e.role=t)}}return e}function k(t){const e={};if(A(t)){if(void 0!==t.alt&&(e["aria-label"]=t.alt),void 0!==t.lang&&(e.lang=t.lang),x(t)){const[n]=t.children;if(n){const t=k(n);return{...e,...t}}}}else"id"in t&&(e["aria-owns"]=t.id);return e}function C(t){let{className:e,node:n}=t;const s=(0,i.useMemo)(()=>function(t){return t?{...E(t),...k(t)}:null}(n),[n]),a=(0,i.useMemo)(()=>A(n)?x(n)?null:n.children.map((t,e)=>(0,r.jsx)(C,{node:t},e)):null,[n]);return(0,r.jsx)("span",{className:e,...s,children:a})}function S(){const t=g();(0,c.A)(t,"Unable to find Page context.");const{onGetStructTreeError:e,onGetStructTreeSuccess:n}=t,[s,o]=(0,v.A)(),{value:l,error:d}=s,{customTextRenderer:u,page:p}=t;return(0,i.useEffect)(function(){o({type:"RESET"})},[o,p]),(0,i.useEffect)(function(){if(u)return;if(!p)return;const t=(0,a.A)(p.getStructTree()),e=t;return t.promise.then(t=>{o({type:"RESOLVE",value:t})}).catch(t=>{o({type:"REJECT",error:t})}),()=>(0,b.xL)(e)},[u,p,o]),(0,i.useEffect)(()=>{void 0!==l&&(!1!==l?l&&n&&n(l):d&&(h(!1,d.toString()),e&&e(d)))},[l]),l?(0,r.jsx)(C,{className:"react-pdf__Page__structTree structTree",node:l}):null}const T=u.ng;function D(t){const e=g();(0,c.A)(e,"Unable to find Page context.");const n={...e,...t},{_className:s,canvasBackground:a,devicePixelRatio:o=(0,b.mZ)(),onRenderError:d,onRenderSuccess:u,page:p,renderForms:f,renderTextLayer:m,pageColors:v,rotate:y,scale:w}=n,{canvasRef:_}=t;(0,c.A)(p,"Attempted to render page canvas, but no page was specified.");const A=(0,i.useRef)(null);function x(t){(0,b.Kp)(t)||(h(!1,t.toString()),d&&d(t))}const E=(0,i.useMemo)(()=>p.getViewport({scale:w*o,rotation:y}),[o,p,y,w]),k=(0,i.useMemo)(()=>p.getViewport({scale:w,rotation:y}),[p,y,w]);(0,i.useEffect)(function(){if(!p)return;p.cleanup();const{current:t}=A;if(!t)return;t.width=E.width,t.height=E.height,t.style.width=`${Math.floor(k.width)}px`,t.style.height=`${Math.floor(k.height)}px`,t.style.visibility="hidden";const e={annotationMode:f?T.ENABLE_FORMS:T.ENABLE,canvas:t,canvasContext:t.getContext("2d",{alpha:!1}),pageColors:v,viewport:E};a&&(e.background=a);const n=p.render(e),r=n;return n.promise.then(()=>{t.style.visibility="",p&&u&&u((0,b.vS)(p,w))}).catch(x),()=>(0,b.xL)(r)},[a,p,v,f,E,k]);const C=(0,i.useCallback)(()=>{const{current:t}=A;t&&(t.width=0,t.height=0)},[]);return(0,i.useEffect)(()=>C,[C]),(0,r.jsx)("canvas",{className:`${s}__canvas`,dir:"ltr",ref:l(_,A),style:{display:"block",userSelect:"none"},children:m?(0,r.jsx)(S,{}):null})}const M=new Set(["base","embed","iframe","link","meta","object","script","style","template"]),P=new Set(["action","formaction","href","poster","src","xlink:href"]);function I(t){return function(t){return t.nodeType===Node.ELEMENT_NODE}(t)&&t instanceof HTMLElement}function F(t){var e;return I(t)&&!function(t){return I(t)&&M.has(t.tagName.toLowerCase())}(t)?function(t){const e=document.createElement(t.tagName.toLowerCase());return Array.from(t.attributes).forEach(t=>{const n=t.name.toLowerCase();n.startsWith("on")||"srcdoc"===n||P.has(n)&&function(t){let e="";for(const n of t){const t=n.charCodeAt(0);t<=32||127===t||(e+=n.toLowerCase())}return e.startsWith("javascript:")||e.startsWith("vbscript:")}(t.value)||e.setAttribute(t.name,t.value)}),Array.from(t.childNodes).forEach(t=>{e.append(F(t))}),e}(t):document.createTextNode(null!==(e=t.textContent)&&void 0!==e?e:"")}function R(){const t=g();(0,c.A)(t,"Unable to find Page context.");const{customTextRenderer:e,onGetTextError:n,onGetTextSuccess:o,onRenderTextLayerError:l,onRenderTextLayerSuccess:d,page:p,pageIndex:f,pageNumber:m,rotate:y,scale:w}=t;(0,c.A)(p,"Attempted to load page text content, but no page was specified.");const[_,A]=(0,v.A)(),{value:x,error:E}=_,k=(0,i.useRef)(null);h(1===Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10),"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer"),(0,i.useEffect)(function(){A({type:"RESET"})},[p,A]),(0,i.useEffect)(function(){if(!p)return;const t=(0,a.A)(p.getTextContent()),e=t;return t.promise.then(t=>{A({type:"RESOLVE",value:t})}).catch(t=>{A({type:"REJECT",error:t})}),()=>(0,b.xL)(e)},[p,A]),(0,i.useEffect)(()=>{void 0!==x&&(!1!==x?x&&o&&o(x):E&&(h(!1,E.toString()),n&&n(E)))},[x]);const C=(0,i.useCallback)(()=>{d&&d()},[d]),S=(0,i.useCallback)(t=>{(0,b.Kp)(t)||(h(!1,t.toString()),l&&l(t))},[l]);const T=(0,i.useMemo)(()=>p.getViewport({scale:w,rotation:y}),[p,y,w]);return(0,i.useLayoutEffect)(function(){if(!p||!x)return;const{current:t}=k;if(!t)return;t.innerHTML="";const n=p.streamTextContent({includeMarkedContent:!0}),r={container:t,textContentSource:n,viewport:T},i=new u.D6(r),s=i;return i.render().then(()=>{const n=document.createElement("div");n.className="endOfContent",t.append(n);const r=t.querySelectorAll('[role="presentation"]');if(e){let t=0;x.items.forEach((n,i)=>{if(!function(t){return"str"in t}(n))return;const s=r[t];if(!s)return;!function(t,e){const n=document.createElement("template");n.innerHTML=e;const r=document.createDocumentFragment();Array.from(n.content.childNodes).forEach(t=>{r.append(F(t))}),t.replaceChildren(r)}(s,e({pageIndex:f,pageNumber:m,itemIndex:i,...n})),t+=n.str&&n.hasEOL?2:1})}C()}).catch(S),()=>(0,b.xL)(s)},[e,S,C,p,f,m,x,T]),(0,r.jsx)("div",{className:(0,s.A)("react-pdf__Page__textContent","textLayer"),onMouseUp:function(){const t=k.current;t&&t.classList.remove("selecting")},onMouseDown:function(){const t=k.current;t&&t.classList.add("selecting")},ref:k})}const N=1;function L(t){const e={...f(),...t},{_className:n="react-pdf__Page",_enableRegisterUnregisterPage:u=!0,canvasBackground:p,canvasRef:g,children:w,className:_,customRenderer:A,customTextRenderer:x,devicePixelRatio:E,error:k="Failed to load the page.",filterAnnotations:C,height:S,inputRef:T,loading:M="Loading page\u2026",noData:P="No page specified.",onGetAnnotationsError:I,onGetAnnotationsSuccess:F,onGetStructTreeError:L,onGetStructTreeSuccess:O,onGetTextError:B,onGetTextSuccess:$,onLoadError:z,onLoadSuccess:j,onRenderAnnotationLayerError:U,onRenderAnnotationLayerSuccess:H,onRenderError:V,onRenderSuccess:q,onRenderTextLayerError:W,onRenderTextLayerSuccess:G,pageColors:K,pageIndex:X,pageNumber:Y,pdf:Z,registerPage:J,renderAnnotationLayer:Q=!0,renderForms:tt=!1,renderMode:et="canvas",renderTextLayer:nt=!0,rotate:rt,scale:it=N,unregisterPage:st,width:at,...ot}=e,[lt,ct]=(0,v.A)(),{value:ht,error:dt}=lt,ut=(0,i.useRef)(null);(0,c.A)(Z,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const pt=(0,b.ci)(Y)?Y-1:null!==X&&void 0!==X?X:null,ft=null!==Y&&void 0!==Y?Y:(0,b.ci)(X)?X+1:null,mt=null!==rt&&void 0!==rt?rt:ht?ht.rotate:null,gt=(0,i.useMemo)(()=>{if(!ht)return null;let t=1;const e=null!==it&&void 0!==it?it:N;if(at||S){const e=ht.getViewport({scale:1,rotation:mt});at?t=at/e.width:S&&(t=S/e.height)}return e*t},[S,ht,mt,it,at]);(0,i.useEffect)(function(){return()=>{(0,b.ci)(pt)&&u&&st&&st(pt)}},[u,Z,pt,st]),(0,i.useEffect)(function(){ct({type:"RESET"})},[ct,Z,pt]),(0,i.useEffect)(function(){if(!Z||!ft)return;const t=(0,a.A)(Z.getPage(ft)),e=t;return t.promise.then(t=>{ct({type:"RESOLVE",value:t})}).catch(t=>{ct({type:"REJECT",error:t})}),()=>(0,b.xL)(e)},[ct,Z,ft]),(0,i.useEffect)(()=>{void 0!==ht&&(!1!==ht?function(){if(j){if(!ht||!gt)return;j((0,b.vS)(ht,gt))}if(u&&J){if(!(0,b.ci)(pt)||!ut.current)return;J(pt,ut.current)}}():dt&&(h(!1,dt.toString()),z&&z(dt)))},[ht,gt]);const vt=(0,i.useMemo)(()=>(0,b.ci)(pt)&&ft&&(0,b.ci)(mt)&&(0,b.ci)(gt)?{_className:n,canvasBackground:p,customTextRenderer:x,devicePixelRatio:E,filterAnnotations:C,onGetAnnotationsError:I,onGetAnnotationsSuccess:F,onGetStructTreeError:L,onGetStructTreeSuccess:O,onGetTextError:B,onGetTextSuccess:$,onRenderAnnotationLayerError:U,onRenderAnnotationLayerSuccess:H,onRenderError:V,onRenderSuccess:q,onRenderTextLayerError:W,onRenderTextLayerSuccess:G,page:ht,pageColors:K,pageIndex:pt,pageNumber:ft,renderForms:tt,renderTextLayer:nt,rotate:mt,scale:gt}:null,[n,p,x,E,C,I,F,L,O,B,$,U,H,V,q,W,G,ht,K,pt,ft,tt,nt,mt,gt]),bt=(0,i.useMemo)(()=>(0,o.Ay)(ot,()=>ht?gt?(0,b.vS)(ht,gt):void 0:ht),[ot,ht,gt]),yt=`${pt}@${gt}/${mt}`;function wt(){switch(et){case"custom":return(0,c.A)(A,'renderMode was set to "custom", but no customRenderer was passed.'),(0,r.jsx)(A,{},`${yt}_custom`);case"none":return null;default:return(0,r.jsx)(D,{canvasRef:g},`${yt}_canvas`)}}return(0,r.jsx)("div",{className:(0,s.A)(n,_),"data-page-number":ft,ref:l(T,ut),style:{"--scale-round-x":"1px","--scale-round-y":"1px","--scale-factor":"1","--user-unit":`${gt}`,"--total-scale-factor":"calc(var(--scale-factor) * var(--user-unit))",backgroundColor:p||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"},...bt,children:ft?null===Z||void 0===ht||null===ht?(0,r.jsx)(d.A,{type:"loading",children:"function"===typeof M?M():M}):!1===Z||!1===ht?(0,r.jsx)(d.A,{type:"error",children:"function"===typeof k?k():k}):function(){if(t=vt,!Boolean(null===t||void 0===t?void 0:t.page))throw new Error("page is undefined");var t;const e="function"===typeof w?w(vt):w;return(0,r.jsxs)(m.Provider,{value:vt,children:[wt(),nt?(0,r.jsx)(R,{},`${yt}_text`):null,Q?(0,r.jsx)(y,{},`${yt}_annotations`):null,e]})}():(0,r.jsx)(d.A,{type:"no-data",children:"function"===typeof P?P():P})})}},7762(t,e,n){"use strict";n.d(e,{A:()=>s});var r=n(94922);function i(t,e){switch(e.type){case"RESOLVE":return{value:e.value,error:void 0};case"REJECT":return{value:!1,error:e.error};case"RESET":return{value:void 0,error:void 0};default:return t}}function s(){return(0,r.useReducer)(i,{value:void 0,error:void 0})}},63185(t,e,n){"use strict";n.d(e,{Bd:()=>s,Kp:()=>v,ci:()=>o,h1:()=>b,jA:()=>d,mZ:()=>u,mw:()=>l,qC:()=>f,qf:()=>c,vS:()=>g,xL:()=>m,zL:()=>h});var r=n(64288),i=n(98677);const s="undefined"!==typeof window,a=s&&"file:"===window.location.protocol;function o(t){return function(t){return"undefined"!==typeof t}(t)&&null!==t}function l(t){return t instanceof ArrayBuffer}function c(t){return(0,r.A)(s,"isBlob can only be used in a browser environment"),t instanceof Blob}function h(t){return function(t){return"string"===typeof t}(t)&&/^data:/.test(t)}function d(t){(0,r.A)(h(t),"Invalid data URI.");const[e="",n=""]=t.split(",");return-1!==e.split(";").indexOf("base64")?atob(n):unescape(n)}function u(){return s&&window.devicePixelRatio||1}const p="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function f(){i(!a,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${p}`)}function m(t){(null===t||void 0===t?void 0:t.cancel)&&t.cancel()}function g(t,e){return Object.defineProperty(t,"width",{get(){return this.getViewport({scale:e}).width},configurable:!0}),Object.defineProperty(t,"height",{get(){return this.getViewport({scale:e}).height},configurable:!0}),Object.defineProperty(t,"originalWidth",{get(){return this.getViewport({scale:1}).width},configurable:!0}),Object.defineProperty(t,"originalHeight",{get(){return this.getViewport({scale:1}).height},configurable:!0}),t}function v(t){return"AbortException"===t.name||"RenderingCancelledException"===t.name}function b(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=()=>{if(!r.result)return n(new Error("Error while reading a file."));e(r.result)},r.onerror=t=>{if(!t.target)return n(new Error("Error while reading a file."));const{error:e}=t.target;if(!e)return n(new Error("Error while reading a file."));switch(e.code){case e.NOT_FOUND_ERR:return n(new Error("Error while reading a file: File not found."));case e.SECURITY_ERR:return n(new Error("Error while reading a file: Security error."));case e.ABORT_ERR:return n(new Error("Error while reading a file: Aborted."));default:return n(new Error("Error while reading a file."))}},r.readAsArrayBuffer(t)})}},87639(t,e,n){"use strict";n.d(e,{R:()=>p});var r=n(94922);const i="printWindow";function s(t){let{level:e="error",messages:n,suppressErrors:r=!1}=t;r||("error"===e?console.error(n):"warning"===e?console.warn(n):console.debug(n))}function a(t,e){if(e||!t){const t=document.getElementById(i);t&&document.body.removeChild(t)}}function o(t){return t instanceof Error?t:new Error("Unknown Error")}function l(t,e){const{documentTitle:n,onAfterPrint:r,onPrintError:i,preserveAfterPrint:l,print:c,suppressErrors:h}=e;setTimeout(()=>{if(t.contentWindow){let e=function(){r?.(),a(l)};if(t.contentWindow.focus(),c)c(t).then(e).catch(t=>{i?i("print",o(t)):s({messages:["An error was thrown by the specified `print` function"],suppressErrors:h})});else{if(t.contentWindow.print){const e=t.contentDocument?.title??"",r=t.ownerDocument.title,i="function"==typeof n?n():n;i&&(t.ownerDocument.title=i,t.contentDocument&&(t.contentDocument.title=i)),t.contentWindow.print(),i&&(t.ownerDocument.title=r,t.contentDocument&&(t.contentDocument.title=e))}else s({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:h});[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(t=>(navigator.userAgent??navigator.vendor??("opera"in window&&window.opera)).match(t))?setTimeout(e,500):e()}}else s({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:h})},500)}function c(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null);let r=n.nextNode();for(;r;)e.push(r),r=n.nextNode();return e}function h(t,e,n){const r=c(t),i=c(e);if(r.length===i.length)for(let s=0;s<r.length;s++){const t=r[s],e=i[s],a=t.shadowRoot;if(null!==a){const t=e.attachShadow({mode:a.mode});t.innerHTML=a.innerHTML,h(a,t,n)}}else s({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",t,e],suppressErrors:n})}function d(t,e,n){const{contentNode:r,clonedContentNode:i,clonedImgNodes:a,clonedVideoNodes:c,numResourcesToLoad:d,originalCanvasNodes:u}=e,{bodyClass:p,fonts:f,ignoreGlobalStyles:m,pageStyle:g,nonce:v,suppressErrors:b,copyShadowRoots:y}=n,w=[],_=[];function A(e,r){w.includes(e)?s({level:"debug",messages:["Tried to mark a resource that has already been handled",e],suppressErrors:b}):(r?(s({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...r],suppressErrors:b}),_.push(e)):w.push(e),w.length+_.length===d&&l(t,n))}t.onload=null;const x=t.contentDocument??t.contentWindow?.document;if(x){const e=x.body.appendChild(i);y&&h(r,e,!!b),f&&(t.contentDocument?.fonts&&t.contentWindow?.FontFace?f.forEach(e=>{const n=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});t.contentDocument.fonts.add(n),n.loaded.then(()=>{A(n)}).catch(t=>{A(n,["Failed loading the font:",n,"Load error:",o(t)])})}):(f.forEach(t=>{A(t)}),s({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:b})));const n=g??'\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */\n print-color-adjust: exact; /* Firefox/Safari */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n }\n }\n',l=x.createElement("style");v&&(l.setAttribute("nonce",v),x.head.setAttribute("nonce",v)),l.appendChild(x.createTextNode(n)),x.head.appendChild(l),p&&x.body.classList.add(...p.split(" "));const d=x.querySelectorAll("canvas");for(let t=0;t<u.length;++t){const e=u[t],n=d[t];if(void 0===n){s({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",e],suppressErrors:b});continue}const r=n.getContext("2d");r&&r.drawImage(e,0,0)}for(let t=0;t<a.length;t++){const e=a[t],n=e.getAttribute("src");if(n){const t=new Image;t.onload=()=>{A(e)},t.onerror=(t,n,r,i,s)=>{A(e,["Error loading <img>",e,"Error",s])},t.src=n}else A(e,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',e])}for(let t=0;t<c.length;t++){const e=c[t];e.preload="auto";const n=e.getAttribute("poster");if(n){const t=new Image;t.onload=()=>{A(e)},t.onerror=(t,r,i,s,a)=>{A(e,["Error loading video poster",n,"for video",e,"Error:",a])},t.src=n}else e.readyState>=2?A(e):e.src?(e.onloadeddata=()=>{A(e)},e.onerror=(t,n,r,i,s)=>{A(e,["Error loading video",e,"Error",s])},e.onstalled=()=>{A(e,["Loading video stalled, skipping",e])}):A(e,["Error loading video, `src` is empty",e])}const w="select",_=r.querySelectorAll(w),k=x.querySelectorAll(w);for(let t=0;t<_.length;t++)k[t].value=_[t].value;if(!m){const t=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let e=0,n=t.length;e<n;++e){const n=t[e];if("style"===n.tagName.toLowerCase()){const t=x.createElement(n.tagName),r=n.sheet;if(r){let i="";try{const t=r.cssRules.length;for(let e=0;e<t;++e)"string"==typeof r.cssRules[e].cssText&&(i+=`${r.cssRules[e].cssText}\r\n`)}catch(E){s({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n,`Original error: ${o(E).message}`],level:"warning"})}t.setAttribute("id",`react-to-print-${e}`),v&&t.setAttribute("nonce",v),t.appendChild(x.createTextNode(i)),x.head.appendChild(t)}}else if(n.getAttribute("href"))if(n.hasAttribute("disabled"))s({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],level:"warning"}),A(n);else{const t=x.createElement(n.tagName);for(let e=0,r=n.attributes.length;e<r;++e){const r=n.attributes[e];r&&t.setAttribute(r.nodeName,r.nodeValue??"")}t.onload=()=>{A(t)},t.onerror=(e,n,r,i,s)=>{A(t,["Failed to load",t,"Error:",s])},v&&t.setAttribute("nonce",v),x.head.appendChild(t)}else s({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],level:"warning"}),A(n)}}}0===d&&l(t,n)}function u(t,e){const{contentRef:n,fonts:r,ignoreGlobalStyles:i,suppressErrors:a}=e,o=function(t){let{contentRef:e,optionalContent:n,suppressErrors:r}=t;return n&&"function"==typeof n?(e&&s({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),n()):e?e.current:void s({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:r})}({contentRef:n,optionalContent:t,suppressErrors:a});if(!o)return;const l=o.cloneNode(!0),c=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),h=l.querySelectorAll("img"),d=l.querySelectorAll("video"),u=r?r.length:0;return{contentNode:o,clonedContentNode:l,clonedImgNodes:h,clonedVideoNodes:d,numResourcesToLoad:(i?0:c.length)+h.length+d.length+u,originalCanvasNodes:o.querySelectorAll("canvas")}}function p(t){let{bodyClass:e,contentRef:n,copyShadowRoots:l,documentTitle:c,fonts:h,ignoreGlobalStyles:p,nonce:f,onAfterPrint:m,onBeforePrint:g,onPrintError:v,pageStyle:b,preserveAfterPrint:y,print:w,printIframeProps:_,suppressErrors:A}=t;return(0,r.useCallback)(t=>{function r(){const r={bodyClass:e,contentRef:n,copyShadowRoots:l,documentTitle:c,fonts:h,ignoreGlobalStyles:p,nonce:f,onAfterPrint:m,onPrintError:v,pageStyle:b,preserveAfterPrint:y,print:w,suppressErrors:A},a=function(t){const e=document.createElement("iframe");return e.width=`${document.documentElement.clientWidth}px`,e.height=`${document.documentElement.clientHeight}px`,e.style.position="absolute",e.style.top=`-${document.documentElement.clientHeight+100}px`,e.style.left=`-${document.documentElement.clientWidth+100}px`,e.id=i,e.srcdoc="<!DOCTYPE html>",t&&(t.allow&&(e.allow=t.allow),void 0!==t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),void 0!==t.sandbox&&(e.sandbox=t.sandbox)),e}(_),o=u(t,r);o?function(t,e,n){t.onload=()=>{d(t,e,n)},document.body.appendChild(t)}(a,o,r):s({messages:["There is nothing to print"],suppressErrors:A})}a(y,!0),g?g().then(()=>{r()}).catch(t=>{v?.("onBeforePrint",o(t))}):r()},[e,n,l,c,h,p,f,m,g,v,b,y,_,w,A])}},64288(t,e,n){"use strict";n.d(e,{A:()=>i});var r="Invariant failed";function i(t,e){if(!t)throw new Error(r)}},99209(t){"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},70211(t){"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}}]);
|
|
9
|
-
//# sourceMappingURL=418.0e897104.chunk.js.map
|