@zyzgroup/core-web 0.0.61 → 0.0.63
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/dist/animate_ce.css +15 -0
- package/dist/better.css +13 -12
- package/dist/zyzgroup_core_web.iife.js +21 -21
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +6723 -10128
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +21 -21
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +2 -2
- package/types/animate/AnimateOperation.d.ts +8 -5
- package/types/animate/AnimateOperation.d.ts.map +1 -1
- package/types/animate/tween/index.d.ts +1 -0
- package/types/animate/tween/index.d.ts.map +1 -1
- package/types/dom/DOMEventBus.d.ts +37 -10
- package/types/dom/DOMEventBus.d.ts.map +1 -1
- package/types/dom/DOMUtil.d.ts +4 -0
- package/types/dom/DOMUtil.d.ts.map +1 -1
- package/types/{video.d.ts → dom/DOMVideo.d.ts} +5 -5
- package/types/dom/DOMVideo.d.ts.map +1 -0
- package/types/dom/index.d.ts +1 -3
- package/types/dom/index.d.ts.map +1 -1
- package/types/file.d.ts.map +1 -1
- package/types/{UPNG.d.ts → image/UPNG.d.ts} +1 -1
- package/types/image/UPNG.d.ts.map +1 -0
- package/types/image/image-gif.d.ts.map +1 -0
- package/types/{image.d.ts → image/image.d.ts} +5 -1
- package/types/image/image.d.ts.map +1 -0
- package/types/image/index.d.ts +4 -0
- package/types/image/index.d.ts.map +1 -0
- package/types/image/qrcode.d.ts.map +1 -0
- package/types/index.d.ts +1 -4
- package/types/index.d.ts.map +1 -1
- package/types/math/Matrix.d.ts +14 -0
- package/types/math/Matrix.d.ts.map +1 -1
- package/types/math/math.d.ts +0 -1
- package/types/math/math.d.ts.map +1 -1
- package/types/position.d.ts +37 -13
- package/types/position.d.ts.map +1 -1
- package/types/shape/shapes/ShapeBase.d.ts.map +1 -1
- package/types/shape/shapes/ShapeHeart.d.ts +15 -0
- package/types/shape/shapes/ShapeHeart.d.ts.map +1 -0
- package/types/shape/shapes/index.d.ts +1 -0
- package/types/shape/shapes/index.d.ts.map +1 -1
- package/types/theme.d.ts +2 -0
- package/types/theme.d.ts.map +1 -1
- package/types/webrtc/index.d.ts +3 -3
- package/types/webrtc/index.d.ts.map +1 -1
- package/types/UPNG.d.ts.map +0 -1
- package/types/canvas/konva/KonvaApp.d.ts +0 -158
- package/types/canvas/konva/KonvaApp.d.ts.map +0 -1
- package/types/canvas/konva/plugins/AlignmentPlugin.d.ts +0 -37
- package/types/canvas/konva/plugins/AlignmentPlugin.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/HistoryPlugin.d.ts +0 -51
- package/types/canvas/konva/plugins/HistoryPlugin/HistoryPlugin.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/add-object-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/add-object-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/base.d.ts +0 -57
- package/types/canvas/konva/plugins/HistoryPlugin/commands/base.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/decompose-group-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/decompose-group-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/index.d.ts +0 -8
- package/types/canvas/konva/plugins/HistoryPlugin/commands/index.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/make-group-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/make-group-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/modified-object-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/modified-object-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/move-zIndex-object-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/move-zIndex-object-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/HistoryPlugin/commands/remove-object-cmd.d.ts +0 -9
- package/types/canvas/konva/plugins/HistoryPlugin/commands/remove-object-cmd.d.ts.map +0 -1
- package/types/canvas/konva/plugins/SelectorPlugin.d.ts +0 -72
- package/types/canvas/konva/plugins/SelectorPlugin.d.ts.map +0 -1
- package/types/canvas/konva/plugins/index.d.ts +0 -4
- package/types/canvas/konva/plugins/index.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/ellipse.d.ts +0 -2
- package/types/canvas/konva/polyfill/ellipse.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/image.d.ts +0 -2
- package/types/canvas/konva/polyfill/image.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/index.d.ts +0 -8
- package/types/canvas/konva/polyfill/index.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/line.d.ts +0 -2
- package/types/canvas/konva/polyfill/line.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/node.d.ts +0 -2
- package/types/canvas/konva/polyfill/node.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/rect.d.ts +0 -2
- package/types/canvas/konva/polyfill/rect.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/regular-polygon.d.ts +0 -2
- package/types/canvas/konva/polyfill/regular-polygon.d.ts.map +0 -1
- package/types/canvas/konva/polyfill/text.d.ts +0 -2
- package/types/canvas/konva/polyfill/text.d.ts.map +0 -1
- package/types/canvas/konva/services/Mouse.d.ts +0 -16
- package/types/canvas/konva/services/Mouse.d.ts.map +0 -1
- package/types/canvas/konva/services/Tooler.d.ts +0 -19
- package/types/canvas/konva/services/Tooler.d.ts.map +0 -1
- package/types/canvas/konva/services/index.d.ts +0 -3
- package/types/canvas/konva/services/index.d.ts.map +0 -1
- package/types/canvas/konva/services/types.d.ts +0 -7
- package/types/canvas/konva/services/types.d.ts.map +0 -1
- package/types/canvas/konva/tools/DiamondTool.d.ts +0 -20
- package/types/canvas/konva/tools/DiamondTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/DrawingTool.d.ts +0 -20
- package/types/canvas/konva/tools/DrawingTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/EllipseTool.d.ts +0 -20
- package/types/canvas/konva/tools/EllipseTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/EraserTool.d.ts +0 -16
- package/types/canvas/konva/tools/EraserTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/ImageTool.d.ts +0 -21
- package/types/canvas/konva/tools/ImageTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/LineTool.d.ts +0 -21
- package/types/canvas/konva/tools/LineTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/RectTool.d.ts +0 -21
- package/types/canvas/konva/tools/RectTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/SelectTool.d.ts +0 -10
- package/types/canvas/konva/tools/SelectTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/TextTool.d.ts +0 -18
- package/types/canvas/konva/tools/TextTool.d.ts.map +0 -1
- package/types/canvas/konva/tools/index.d.ts +0 -10
- package/types/canvas/konva/tools/index.d.ts.map +0 -1
- package/types/canvas/konva/utils/index.d.ts +0 -22
- package/types/canvas/konva/utils/index.d.ts.map +0 -1
- package/types/dom/DOMEvent.d.ts +0 -7
- package/types/dom/DOMEvent.d.ts.map +0 -1
- package/types/dom/DOMMedia.d.ts +0 -8
- package/types/dom/DOMMedia.d.ts.map +0 -1
- package/types/dom/DOMScroll.d.ts +0 -11
- package/types/dom/DOMScroll.d.ts.map +0 -1
- package/types/image-gif.d.ts.map +0 -1
- package/types/image.d.ts.map +0 -1
- package/types/qrcode.d.ts.map +0 -1
- package/types/video.d.ts.map +0 -1
- /package/types/{image-gif.d.ts → image/image-gif.d.ts} +0 -0
- /package/types/{qrcode.d.ts → image/qrcode.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ZYZGroupCoreWeb=function(
|
|
1
|
+
var ZYZGroupCoreWeb=function(M){"use strict";const Vn=typeof window=="object"&&typeof document=="object";typeof process<"u"&&process.versions!=null&&process.versions.node!=null;const ta=i=>{let t=null;switch(i){case"bin":t=/^[0-1]+$/;break;case"oct":t=/^(0b)?[0-7]+$/i;break;case"hex":t=/^(0x)?[0-9a-fA-F]+$/i;break;case"int":t=/^[-+]?[0-9]+$/;break;case"number":t=/[-+]?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;break;case"phone-number":t=/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/gi;break;case"email":t=/^[A-Za-z0-9_!#$%&'*+/=?`{|}~^.-]+@[A-Za-z0-9._-]+$/gm;break;case"ip":t=/^((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]?)$/;break;case"base64-data":t=/^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i;break;case"var-name":t=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/;break;case"hex-color":t=/^#([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;break;case"chinese-name":t=/^(?:[\u4e00-\u9fa5·]{2,16})$/;break;case"chinese":t=new RegExp(String.raw`
|
|
2
2
|
[\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]
|
|
3
3
|
|[\u{4E00}-\u{9FCC}]
|
|
4
4
|
|[\u{3400}-\u{4DB5}]
|
|
@@ -7,38 +7,38 @@ var ZYZGroupCoreWeb=function(O){"use strict";const Xi=typeof window=="object"&&t
|
|
|
7
7
|
|[\u{2B740}-\u{2B81D}]
|
|
8
8
|
|[\u{2B820}-\u{2CEAF}]
|
|
9
9
|
|[\u{2CEB0}-\u{2EBEF}]
|
|
10
|
-
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t};function mc(n){const t={matchIndex:-1,fullMatch:null,groupMatchs:[]};if(n){t.matchIndex=typeof n.index=="number"?n.index:-1;for(let e=0,i=n.length;e<i;e++)e==0?t.fullMatch=n[e]:t.groupMatchs.push(n[e])}return t}const sa=(n,t)=>{typeof n=="string"&&(n=gc(n)||new RegExp(n));const e=[],i=t.matchAll(n);for(const r of i)e.push(mc(r));return e};function aa(n){return n.replace(/(^\w|[_-]\w)/g,function(t){return t.slice(-1).toUpperCase()})}function oa(n){let t="";for(let e=0,i=n.length;e<i;e++){const r=n.charCodeAt(e);r>=1&&r<=127?t+=n.charAt(e):r>2047?(t+=String.fromCharCode(224|r>>12&15),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|r>>0&63)):(t+=String.fromCharCode(192|r>>6&31),t+=String.fromCharCode(128|r>>0&63))}return t}var Ue=(n=>(n.UNKNOWN="",n.HTML="text/html",n.CSS="text/css",n.XML="text/xml",n.TEXT="text/plain",n.MD="text/plain",n.JPEG="image/jpeg",n.PNG="image/png",n.GIF="image/gif",n.WEBP="image/webp",n.SVG="image/svg+xml",n.ICO="image/x-icon",n.MPEG="audio/mpeg",n.MP3="audio/mpeg",n.OGG="audio/ogg",n.WAV="audio/wav",n.MP4="video/mp4",n.WEBM="video/webm",n.JSON="application/json",n.JAVASCRIPT="application/javascript",n.ECMASCRIPT="application/ecmascript",n.EXCEL="application/vnb.ms-excel",n.XWWW="application/x-www-form-urlencoded",n.DOC="application/msword",n.CSV="application/x-csv",n.PDF="application/pdf",n.ZIP="application/zip",n.TGZ="application/x-gtar",n.TAR_GZ="application/x-gzip",n.EOT="appliaction/vnd.ms-fontobject",n.TTF="aplication/font-sfnt",n))(Ue||{});const On=(n,t=16)=>(n=n.toLowerCase(),(n.indexOf("0b")==0||n.indexOf("0o")==0||n.indexOf("0x")==0)&&(n=n.slice(2)),parseInt(n,t));function vc(){const n=Uint32Array.of(305419896),t=new Uint8Array(n.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}const la=n=>{let t=Ue.UNKNOWN;switch(new DataView(n).getUint32(0,vc()).toString(16).toUpperCase()){case"FFD8FFDB":t=Ue.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Ue.JPEG;break;case"89504E47":t=Ue.PNG;break;case"47494638":t=Ue.GIF;break;case"52494646":t=Ue.WEBP;break;case"25504446":t=Ue.PDF;break;case"504B0304":t=Ue.ZIP;break}return t},ca=function(){const n=[];return{writeByte(t){n.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,i=t.length){for(let r=0;r<i;r++)this.writeByte(t[r+e])},writeString(t){for(let e=0,i=t.length;e<i;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return n},toString(){let t="[";for(let e=0,i=n.length;e<i;e++)e>0&&(t+=","),t+=n[e];return t+="]",t}}},_c=function(){let n=0,t=0,e=0,i="";const r=function(a){if(!(a<0)){if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47}throw new Error("n:"+a)},s=function(a){i+=String.fromCharCode(r(a&63))};return{writeByte(a){for(n=n<<8|a&255,t+=8,e+=1;t>=6;)s(n>>>t-6),t-=6},flush(){if(t>0&&(s(n<<6-t),n=0,t=0),e%3!=0){const a=3-e%3;for(let o=0;o<a;o++)i+="="}},toString(){return i}}};function wc(n){const t=typeof n;return t!=="object"?t:Object.prototype.toString.call(n).replace(/^\[object (\S+)\]$/,"$1").toLowerCase()}function Br(n){return wc(n)==="object"}function ha(n,t=new WeakMap){if(n==null)return n;if(n.constructor===Date)return new Date(n);if(n.constructor===RegExp)return new RegExp(n);if(typeof n!="object")return n;if(t.has(n))return t.get(n);const e=Object.getOwnPropertyDescriptors(n),i=Object.create(Object.getPrototypeOf(n),e);t.set(n,i);for(const r of Reflect.ownKeys(n))i[r]=Br(n[r])?ha(n[r],t):n[r];return i}function fa(n,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(n-t)<e}function ua(n,t=12){return+n.toPrecision(t)}var yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var da={exports:{}},Fn=typeof Reflect=="object"?Reflect:null,pa=Fn&&typeof Fn.apply=="function"?Fn.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)},Zi;Fn&&typeof Fn.ownKeys=="function"?Zi=Fn.ownKeys:Object.getOwnPropertySymbols?Zi=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Zi=function(t){return Object.getOwnPropertyNames(t)};function xc(n){console&&console.warn&&console.warn(n)}var ga=Number.isNaN||function(t){return t!==t};function Ut(){Ut.init.call(this)}da.exports=Ut,da.exports.once=Ec,Ut.EventEmitter=Ut,Ut.prototype._events=void 0,Ut.prototype._eventsCount=0,Ut.prototype._maxListeners=void 0;var ma=10;function $i(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(Ut,"defaultMaxListeners",{enumerable:!0,get:function(){return ma},set:function(n){if(typeof n!="number"||n<0||ga(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");ma=n}}),Ut.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ut.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||ga(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function va(n){return n._maxListeners===void 0?Ut.defaultMaxListeners:n._maxListeners}Ut.prototype.getMaxListeners=function(){return va(this)},Ut.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var r=t==="error",s=this._events;if(s!==void 0)r=r&&s.error===void 0;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=s[t];if(l===void 0)return!1;if(typeof l=="function")pa(l,this,e);else for(var c=l.length,u=ba(l,c),i=0;i<c;++i)pa(u[i],this,e);return!0};function _a(n,t,e,i){var r,s,a;if($i(e),s=n._events,s===void 0?(s=n._events=Object.create(null),n._eventsCount=0):(s.newListener!==void 0&&(n.emit("newListener",t,e.listener?e.listener:e),s=n._events),a=s[t]),a===void 0)a=s[t]=e,++n._eventsCount;else if(typeof a=="function"?a=s[t]=i?[e,a]:[a,e]:i?a.unshift(e):a.push(e),r=va(n),r>0&&a.length>r&&!a.warned){a.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=a.length,xc(o)}return n}Ut.prototype.addListener=function(t,e){return _a(this,t,e,!1)},Ut.prototype.on=Ut.prototype.addListener,Ut.prototype.prependListener=function(t,e){return _a(this,t,e,!0)};function bc(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wa(n,t,e){var i={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},r=bc.bind(i);return r.listener=e,i.wrapFn=r,r}Ut.prototype.once=function(t,e){return $i(e),this.on(t,wa(this,t,e)),this},Ut.prototype.prependOnceListener=function(t,e){return $i(e),this.prependListener(t,wa(this,t,e)),this},Ut.prototype.removeListener=function(t,e){var i,r,s,a,o;if($i(e),r=this._events,r===void 0)return this;if(i=r[t],i===void 0)return this;if(i===e||i.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if(typeof i!="function"){for(s=-1,a=i.length-1;a>=0;a--)if(i[a]===e||i[a].listener===e){o=i[a].listener,s=a;break}if(s<0)return this;s===0?i.shift():Tc(i,s),i.length===1&&(r[t]=i[0]),r.removeListener!==void 0&&this.emit("removeListener",t,o||e)}return this},Ut.prototype.off=Ut.prototype.removeListener,Ut.prototype.removeAllListeners=function(t){var e,i,r;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var s=Object.keys(i),a;for(r=0;r<s.length;++r)a=s[r],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=i[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this};function ya(n,t,e){var i=n._events;if(i===void 0)return[];var r=i[t];return r===void 0?[]:typeof r=="function"?e?[r.listener||r]:[r]:e?Cc(r):ba(r,r.length)}Ut.prototype.listeners=function(t){return ya(this,t,!0)},Ut.prototype.rawListeners=function(t){return ya(this,t,!1)},Ut.listenerCount=function(n,t){return typeof n.listenerCount=="function"?n.listenerCount(t):xa.call(n,t)},Ut.prototype.listenerCount=xa;function xa(n){var t=this._events;if(t!==void 0){var e=t[n];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}Ut.prototype.eventNames=function(){return this._eventsCount>0?Zi(this._events):[]};function ba(n,t){for(var e=new Array(t),i=0;i<t;++i)e[i]=n[i];return e}function Tc(n,t){for(;t+1<n.length;t++)n[t]=n[t+1];n.pop()}function Cc(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}function Ec(n,t){return new Promise(function(e,i){function r(a){n.removeListener(t,s),i(a)}function s(){typeof n.removeListener=="function"&&n.removeListener("error",r),e([].slice.call(arguments))}Ta(n,t,s,{once:!0}),t!=="error"&&kc(n,r,{once:!0})})}function kc(n,t,e){typeof n.on=="function"&&Ta(n,"error",t,e)}function Ta(n,t,e,i){if(typeof n.on=="function")i.once?n.once(t,e):n.on(t,e);else if(typeof n.addEventListener=="function")n.addEventListener(t,function r(s){i.once&&n.removeEventListener(t,r),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}class Sc{events;constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}addListener(t,e){this.on(t,e)}prependListener(t,e){this.events[t]||(this.events[t]=[]),this.events[t].unshift(e)}removeListener(t,e){this.events[t]&&(this.events[t]=this.events[t].filter(i=>i!==e))}off(t,e){this.removeListener(t,e)}removeAllListeners(t){t?this.events[t]=[]:this.events={}}emit(t,...e){this.events[t]&&this.events[t].forEach(i=>{Reflect.apply(i,this,e)})}once(t,e){const r=(()=>{let s=!1;return(...a)=>{s||(s=!0,Reflect.apply(e,this,a),this.off(t,r))}})();this.on(t,r)}}var Ca=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ac(n,t={}){var e=1,i=1;function r(st){var ht=st.match(/\n/g);ht&&(e+=ht.length);var L=st.lastIndexOf(`
|
|
11
|
-
`);i=~L?st.length-L:i+st.length}function s(){var st={line:e,column:i};return function(ht){return ht.position=new a(st),y(),ht}}function a(st){this.start=st,this.end={line:e,column:i},this.source=t.source}a.prototype.content=n;var o=[];function l(st){var ht=new Error(t.source+":"+e+":"+i+": "+st);if(ht.reason=st,ht.filename=t.source,ht.line=e,ht.column=i,ht.source=n,t.silent)o.push(ht);else throw ht}function c(){var st=p();return{type:"stylesheet",stylesheet:{source:t.source,rules:st,parsingErrors:o}}}function u(){return d(/^{\s*/)}function g(){return d(/^}/)}function p(){var st,ht=[];for(y(),x(ht);n.length&&n.charAt(0)!="}"&&(st=St()||tt());)st!==!1&&(ht.push(st),x(ht));return ht}function d(st){var ht=st.exec(n);if(ht){var L=ht[0];return r(L),n=n.slice(L.length),ht}}function y(){d(/^\s*/)}function x(st){var ht;for(st=st||[];ht=C();)ht!==!1&&st.push(ht);return st}function C(){var st=s();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var ht=2;n.charAt(ht)!=""&&(n.charAt(ht)!="*"||n.charAt(ht+1)!="/");)++ht;if(ht+=2,n.charAt(ht-1)==="")return l("End of comment missing");var L=n.slice(2,ht-2);return i+=2,r(L),n=n.slice(ht),i+=2,st({type:"comment",comment:L})}}function A(){var st=d(/^([^{]+)/);if(st)return Ne(st[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(ht){return ht.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(ht){return ht.replace(/\u200C/g,",")})}function P(){var st=s(),ht=d(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(ht){if(ht=Ne(ht[0]),!d(/^:\s*/))return l("property missing ':'");var L=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),k=st({type:"declaration",property:ht.replace(Ca,""),value:L?Ne(L[0]).replace(Ca,""):""});return d(/^[;\s]*/),k}}function M(){var st=[];if(!u())return l("missing '{'");x(st);for(var ht;ht=P();)ht!==!1&&(st.push(ht),x(st));return g()?st:l("missing '}'")}function D(){for(var st,ht=[],L=s();st=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)ht.push(st[1]),d(/^,\s*/);if(ht.length)return L({type:"keyframe",values:ht,declarations:M()})}function z(){var st=s(),ht=d(/^@([-\w]+)?keyframes\s*/);if(ht){var L=ht[1];if(ht=d(/^([-\w]+)\s*/),!ht)return l("@keyframes missing name");var k=ht[1];if(!u())return l("@keyframes missing '{'");for(var E,R=x();E=D();)R.push(E),R=R.concat(x());return g()?st({type:"keyframes",name:k,vendor:L,keyframes:R}):l("@keyframes missing '}'")}}function N(){var st=s(),ht=d(/^@supports *([^{]+)/);if(ht){var L=Ne(ht[1]);if(!u())return l("@supports missing '{'");var k=x().concat(p());return g()?st({type:"supports",supports:L,rules:k}):l("@supports missing '}'")}}function F(){var st=s(),ht=d(/^@host\s*/);if(ht){if(!u())return l("@host missing '{'");var L=x().concat(p());return g()?st({type:"host",rules:L}):l("@host missing '}'")}}function G(){var st=s(),ht=d(/^@media *([^{]+)/);if(ht){var L=Ne(ht[1]);if(!u())return l("@media missing '{'");var k=x().concat(p());return g()?st({type:"media",media:L,rules:k}):l("@media missing '}'")}}function H(){var st=s(),ht=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(ht)return st({type:"custom-media",name:Ne(ht[1]),media:Ne(ht[2])})}function Z(){var st=s(),ht=d(/^@page */);if(ht){var L=A()||[];if(!u())return l("@page missing '{'");for(var k=x(),E;E=P();)k.push(E),k=k.concat(x());return g()?st({type:"page",selectors:L,declarations:k}):l("@page missing '}'")}}function X(){var st=s(),ht=d(/^@([-\w]+)?document *([^{]+)/);if(ht){var L=Ne(ht[1]),k=Ne(ht[2]);if(!u())return l("@document missing '{'");var E=x().concat(p());return g()?st({type:"document",document:k,vendor:L,rules:E}):l("@document missing '}'")}}function J(){var st=s(),ht=d(/^@font-face\s*/);if(ht){if(!u())return l("@font-face missing '{'");for(var L=x(),k;k=P();)L.push(k),L=L.concat(x());return g()?st({type:"font-face",declarations:L}):l("@font-face missing '}'")}}var dt=kt("import"),ft=kt("charset"),gt=kt("namespace");function kt(st){var ht=new RegExp("^@"+st+"\\s*([^;]+);");return function(){var L=s(),k=d(ht);if(k){var E={type:st};return E[st]=k[1].trim(),L(E)}}}function St(){if(n[0]=="@")return z()||G()||H()||N()||dt()||ft()||gt()||X()||Z()||F()||J()}function tt(){var st=s(),ht=A();return ht?(x(),st({type:"rule",selectors:ht,declarations:M()})):l("selector missing")}return Gr(c())}function Ne(n){return n?n.replace(/^\s+|\s+$/g,""):""}function Gr(n,t){var e=n&&typeof n.type=="string",i=e?n:t;for(var r in n){var s=n[r];Array.isArray(s)?s.forEach(function(a){Gr(a,i)}):s&&typeof s=="object"&&Gr(s,i)}return e&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),n}const Hr=(n,t="image/svg+xml",e="utf-8")=>new Blob([n],{type:`${t};charset=${e}`}),Ea=n=>new XMLSerializer().serializeToString(n),Pc=(n,t="text/html")=>new DOMParser().parseFromString(n,t),ka=(n,t="image/svg+xml",e="utf-8")=>Hr(Ea(n),t,e),jr=(n,t)=>{const e=document.createElement("a");e.style.visibility="hidden",document.body.appendChild(e),e.download=t,typeof n=="string"?e.href=n:e.href=window.URL.createObjectURL(n),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href)};function Ic(n=["*"],t){if(!globalThis.document||!(globalThis.document instanceof Document))throw new Error("This is not a browser environment");const e=globalThis.document.createElement("input");return e.setAttribute("type","file"),e.setAttribute("visibility","hidden"),Array.isArray(n)&&n.length>0&&e.setAttribute("accept",n.join(",")),t&&e.setAttribute("multiple","true"),e.click(),new Promise((i,r)=>{globalThis.addEventListener("focus",()=>{setTimeout(()=>{(!e.files||e.files?.length===0)&&r(new Error("Cancel select"))},1e3)},{once:!0}),e.addEventListener("change",()=>{if(!e.files||e.files?.length===0)r(new Error("Cancel select"));else{const s=Array.from(e.files);!n.includes("*")&&s.some(a=>!n.includes(`.${Pa(a)}`))&&r(new Error(`Please select files in ${n} format`)),i(s)}})})}function Sa(n,t="text",e){return new Promise((i,r)=>{const s=new FileReader;switch(s.addEventListener("progress",a=>{e?.(a.loaded,a.total)}),s.addEventListener("load",a=>{i(a.target?.result)}),s.addEventListener("error",a=>{r(a)}),t){case"dataURL":s.readAsDataURL(n);break;case"binaryString":s.readAsBinaryString(n);break;case"arrayBuffer":s.readAsArrayBuffer(n);break;default:s.readAsText(n)}})}function Aa(n,t,e){return Sa(n.slice(t,e),"arrayBuffer")}async function Mc(n){const t=await Aa(n,0,4);return la(t)}const Pa=n=>{let t;return n instanceof File?t=n.name:t=n,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]??""};function Lc(n,t){n.addEventListener("change",function(){t(n.files)},!1)}function Dc(n,t){n.addEventListener("dragover",function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")},!1),n.addEventListener("drop",function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer&&t(e.dataTransfer.files)},!1)}function Rc(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(t=>setTimeout(()=>{throw t}))}function Oc(n,t={},e=[]){return{tag:n,props:t,children:e}}function fi(n,t){if(n.el)return;const e=n.el=document.createElement(n.tag);if(n.props)for(const i in n.props){const r=n.props[i];i.startsWith("on")?e.addEventListener(i.slice(2).toLowerCase(),r):e.setAttribute(i,r)}n.children&&(typeof n.children=="string"?e.textContent=n.children:n.children.forEach(i=>{fi(i,e)})),t.appendChild(e)}function Ia(n,t){if(n.tag!==t.tag){if(!n.el)return;const e=n.el.parentElement||document.body;e.removeChild(n.el),fi(t,e)}else{const e=t.el=n.el;if(!e)return;const i=n.props,r=t.props;for(const o in i)o in r||(o.startsWith("on")?e.removeEventListener(o.slice(2).toLowerCase(),i[o]):e.removeAttribute(o));for(const o in r){const l=i[o],c=r[o];c!=l&&(o.startsWith("on")?e.addEventListener(o.slice(2).toLowerCase(),c):e.setAttribute(o,c))}const s=n.children||[],a=t.children||[];if(typeof a=="string")e.innerHTML=a;else if(typeof s=="string")e.innerHTML="",a.forEach(o=>{fi(o,e)});else{const o=Math.min(s.length,a.length);for(let l=0;l<o;l++)Ia(s[l],a[l]);a.length>s.length&&a.slice(s.length).forEach(l=>{fi(l,e)}),a.length<s.length&&s.slice(a.length).forEach(l=>{l.el&&e.removeChild(l.el)})}}}function Ma(n,t,e){if(!n){e&&t&&e.appendChild(t);return}if(!n.isEqualNode(t)){if(n.nodeName!==t.nodeName){e.replaceChild(t,n);return}if(n.nodeType===Node.TEXT_NODE){n.textContent!==t.textContent&&(n.textContent=t.textContent);return}for(let i=n.attributes.length-1;i>=0;i--){const r=n.attributes[i].name;!t.hasAttribute(r)&&r!=="open"&&n.removeAttribute(r)}for(let i=0;i<t.attributes.length;i++){const r=t.attributes[i].name,s=t.attributes[i].value;n.setAttribute(r,s)}for(let i=0;i<t.childNodes.length;i++)n.childNodes[i]?Ma(n.childNodes[i],t.childNodes[i],n):n.appendChild(t.childNodes[i].cloneNode(!0));for(;n.childNodes.length>t.childNodes.length;)n.lastChild&&n.removeChild(n.lastChild)}}class Fc{url;socket;waitingResponse={};sendMessageQueue=[];constructor(t){this.url=t,this.createSocket()}createSocket(){console.log("Socket Create Attempted"),this.socket=new WebSocket(this.url),this.socket.onopen=()=>{this.sendMessageQueue.forEach(t=>this.socket?.send(t)),this.sendMessageQueue=[]},this.socket.onclose=t=>{const{code:e,reason:i,wasClean:r}=t;console.log(`ws closed : ${e} ${i} ${r}`)},this.socket.onerror=t=>{console.log(`ws error : ${t.type}`)},this.socket.onmessage=t=>{this.processMessage(t)}}recreateSocket(t){console.log("Socket Recreate Attempted"),this.sendMessageQueue.push(t),this.createSocket()}closeSocket(){this.socket&&(this.socket.close(),console.log("Socket closed"))}openSocket(){this.createSocket(),console.log("Socket opened manually")}sendWithRetry(t){this.socket?.readyState===WebSocket.OPEN?this.socket.send(t):this.recreateSocket(t)}async processMessage(t){if(typeof t.data=="string")try{const e=JSON.parse(t.data);if(Object.prototype.hasOwnProperty.call(e,"requestid")){const i=this.waitingResponse[e.requestid];i?i.resolve?.(e):console.warn("Got data but found no associated request, already timed out?",e)}else console.warn("Got data without request id",e)}catch{console.log(`Received String : ${t.data}`)}else t.data instanceof ArrayBuffer?console.log(`Received ArrayBuffer : ${t.data}`):t.data instanceof Blob&&console.log(`Received Blob : ${t.data}`)}async sendPayload(t){const e=+new Date,i=this.waitingResponse[e]={requestid:e};try{let r;t instanceof Blob||t instanceof ArrayBuffer||typeof t=="string"?r=t:r=JSON.stringify({...i,...t});const s=await new Promise((a,o)=>{i.resolve=a,this.sendWithRetry(r),setTimeout(()=>{o("Timeout")},5e3)});return console.info("Time took",(+new Date-i.requestid)/1e3),s}catch(r){return Promise.reject(r)}finally{delete this.waitingResponse[e]}}async send(t,e,i=r=>{console.log(r)}){this.sendPayload(t).then(e,i)}}function Vr(){return document.compatMode=="BackCompat"?document.body:document.documentElement}function zn(){const n=Vr();return{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,scrollHeight:n.scrollHeight}}function qi(){const n=Vr();return{clientTop:n.clientTop,clientLeft:n.clientLeft,clientWidth:n.clientWidth,clientHeight:n.clientHeight}}function Wi(){const{clientWidth:n,clientHeight:t}=qi();return{width:n,height:t}}function zc(){const{scrollWidth:n,scrollHeight:t}=zn(),{width:e,height:i}=Wi();return{width:Math.max(n,e),height:Math.max(t,i)}}function Uc(n){const{width:t,height:e}=Wi(),{top:i,left:r,right:s,bottom:a}=n.getBoundingClientRect();return(i>=0&&i<=e||a>=0&&a<=e)&&(r>=0&&r<=t||s>=0&&s<=t)}function Nc(n,t,e){const i={threshold:1};new IntersectionObserver(function(s,a){let o=s[0];if(s.length>1){const c=s.find(u=>u.isIntersecting);c&&(o=c)}o.isIntersecting&&o.intersectionRatio>=i.threshold?t(o.target):e?.(o.target)},i).observe(n)}function La(n){const{top:t,left:e}=n.getBoundingClientRect(),i=zn();return{x:e+i.scrollLeft,y:t+i.scrollTop}}function Bc(n){return{x:Da(n),y:Ra(n)}}function Da(n){let t=0;for(;n!==null;)t+=n.offsetLeft,n=n.offsetParent;return t}function Ra(n){let t=0;for(;n!==null;)t+=n.offsetTop,n=n.offsetParent;return t}function Gc(n){const t=n.getBoundingClientRect();return{x:t.left,y:t.top}}function Hc(n,t){const e=n.getBoundingClientRect(),i=t.getBoundingClientRect();return{x:i.x-e.x,y:i.y-e.y,width:i.width,height:i.height}}function Oa(n){if("center"in n)return n.center;if(n.pageX&&n.pageY)return{x:n.pageX,y:n.pageY};const t=zn();return{x:n.clientX+t.scrollLeft,y:n.clientY+t.scrollTop}}function jc(n){return{x:n.clientX,y:n.clientY}}function Ji(n,t){const e=Oa(t),i=La(n);return{x:e.x-i.x,y:e.y-i.y}}function Xr(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}const Ki=()=>{const n=navigator.userAgent.toLowerCase();let t="Unknown";return/mac/i.test(n)?t="macOS":/win/i.test(n)?t="Windows":/android/i.test(n)?t="Android":/iphone|ipad|ipod/i.test(n)?t="iOS":/linux/i.test(n)?t="Linux":/bsd/i.test(n)&&(t="BSD"),t.toLowerCase()},Vc=()=>{const n=navigator.userAgent;let t="Unknown";if(/Windows NT/.test(n)){const e=n.match(/Windows NT (\d+\.\d+)/);e&&(t=e[1])}else if(/Mac OS X/.test(n)){const e=n.match(/Mac OS X (\d+_\d+)/);e&&(t=e[1].replace("_","."))}else if(/Android/.test(n)){const e=n.match(/Android (\d+\.\d+)/);e&&(t=e[1])}else if(/iPhone|iPad|iPod/.test(n)){const e=n.match(/OS (\d+_\d+)/);e&&(t=e[1].replace("_","."))}return t.toLowerCase()},Yr=()=>{const n=navigator.userAgent.toLowerCase();let t="Unknown";return/chrome/i.test(n)?t="Chrome":/firefox/i.test(n)?t="Firefox":/safari/i.test(n)?t="Safari":/edge/i.test(n)?t="Edge":/msie|trident/i.test(n)?t="IE":/MicroMessenger/i.test(n)?t="Wechat":/alipay/i.test(n)&&(t="Ali"),t.toLowerCase()},Xc=()=>{const n=navigator.userAgent;let t="Unknown";if(/Chrome/.test(n)){const e=n.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(n)){const e=n.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(n)){const e=n.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(n)){const e=n.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(n)){const e=n.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t},Yc=()=>"geolocation"in navigator?new Promise((n,t)=>{navigator.geolocation.getCurrentPosition(e=>{const i=e.coords.latitude,r=e.coords.longitude;n({latitude:i,longitude:r})},e=>{t(e)})}):Promise.reject("Geolocation is not available.");function Zc(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function $c(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Zr(){return Ki()==="ios"}function $r(){return Ki()==="macos"}function qc(){return Zr()|$r()}function Fa(){return Ki()==="android"}function Wc(){return Zr()||Fa()}function Jc(){return typeof window=="object"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function za(){const n=window.navigator.userAgent,t=n.indexOf("MSIE ");if(t>0)return parseInt(n.substring(t+5,n.indexOf(".",t)),10);if(n.indexOf("Trident/")>0){const r=n.indexOf("rv:");return parseInt(n.substring(r+3,n.indexOf(".",r)),10)}const i=n.indexOf("Edge/");return i>0?parseInt(n.substring(i+5,n.indexOf(".",i)),10):-1}function Ua(){return Yr()==="wechat"}function Na(){return Yr()==="ali"}function Kc(){return Ua()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Qc(){return Na()&&navigator.userAgent.match(/miniprogram/i)}const th=za()!==-1,eh=typeof document<"u",Ba=typeof window<"u",nh=typeof history<"u",ih=Ba&&window.File&&window.FileReader&&window.FileList&&window.Blob,Ga=(()=>{const n=Xr();return!!(n.Worker&&n.Blob&&n.Promise&&n.OffscreenCanvas&&n.OffscreenCanvasRenderingContext2D&&n.HTMLCanvasElement&&n.HTMLCanvasElement.prototype.transferControlToOffscreen&&n.URL&&n.URL.createObjectURL)})(),rh=typeof Path2D=="function"&&typeof DOMMatrix=="function",sh=function(){if(!Xr().OffscreenCanvas)return!1;var t=new OffscreenCanvas(1,1),e=t.getContext("2d");e.fillRect(0,0,1,1);var i=t.transferToImageBitmap();try{e.createPattern(i,"no-repeat")}catch{return!1}return!0}();function ah(n,t){let e=n[t];Object.defineProperty(n,"prop",{get:()=>e,set:i=>{e=i;debugger}})}function oh(n){return new Proxy(n,{get(t,e,i){return Reflect.get(t,e,i)},set(t,e,i,r){debugger;return Reflect.set(t,e,i,r)}})}function lh(n){var t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;var i=100,r=function(){var s=Math.min(t.clientWidth,n);t.dataset.width=s,t.dataset.rem=i=Math.round(100*(s/n)),t.style.fontSize=i+"px"};r(),window.rem2px=function(s){return s=parseFloat(s),s*i},window.px2rem=function(s){return s=parseFloat(s),s/i},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",r,!1)}var Ha={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
10
|
+
`.replace(/\s+/g,""),"u");break;case"mime-image":t=/^image\//;break;case"mime-video":t=/^video\//;break;case"mime-audio":t=/^audio\//;break;case"mime-document-word":t=/^application\/(?:vnd\.openxmlformats-officedocument\.wordprocessingml\.document|msword|vnd\.ms-word\.document\.macroenabled\.12|vnd\.openxmlformats-officedocument\.wordprocessingml\.template|vnd\.ms-word\.template\.macroenabled\.12)$/;break;case"mime-document-excel":t=/^application\/(?:vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|vnd\.ms-excel|vnd\.ms-excel\.sheet\.macroenabled\.12|vnd\.openxmlformats-officedocument\.spreadsheetml\.template|vnd\.ms-excel\.template\.macroenabled\.12)$/;break;case"mime-document-ppt":t=/^application\/(?:vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml\.presentation|vnd\.ms-powerpoint\.presentation\.macroenabled\.12|vnd\.openxmlformats-officedocument\.presentationml\.template|vnd\.ms-powerpoint\.template\.macroenabled\.12)$/;break;case"mime-document-json":t=/^application\/json$/;break;case"mime-document-xml":t=/^(?:application|text)\/(?:xml|xhtml\+xml)$/;break}return t};function ea(i){const t={matchIndex:-1,fullMatch:null,groupMatchs:[]};if(i){t.matchIndex=typeof i.index=="number"?i.index:-1;for(let e=0,n=i.length;e<n;e++)e==0?t.fullMatch=i[e]:t.groupMatchs.push(i[e])}return t}const dr=(i,t)=>{typeof i=="string"&&(i=ta(i)||new RegExp(i));const e=[],n=t.matchAll(i);for(const r of n)e.push(ea(r));return e};function pr(i){return i.replace(/(^\w|[_-]\w)/g,function(t){return t.slice(-1).toUpperCase()})}function mr(i){let t="";for(let e=0,n=i.length;e<n;e++){const r=i.charCodeAt(e);r>=1&&r<=127?t+=i.charAt(e):r>2047?(t+=String.fromCharCode(224|r>>12&15),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|r>>0&63)):(t+=String.fromCharCode(192|r>>6&31),t+=String.fromCharCode(128|r>>0&63))}return t}var Ce=(i=>(i.UNKNOWN="",i.HTML="text/html",i.CSS="text/css",i.XML="text/xml",i.TEXT="text/plain",i.MD="text/plain",i.JPEG="image/jpeg",i.PNG="image/png",i.GIF="image/gif",i.WEBP="image/webp",i.SVG="image/svg+xml",i.ICO="image/x-icon",i.MPEG="audio/mpeg",i.MP3="audio/mpeg",i.OGG="audio/ogg",i.WAV="audio/wav",i.MP4="video/mp4",i.WEBM="video/webm",i.JSON="application/json",i.JAVASCRIPT="application/javascript",i.ECMASCRIPT="application/ecmascript",i.EXCEL="application/vnb.ms-excel",i.XWWW="application/x-www-form-urlencoded",i.DOC="application/msword",i.CSV="application/x-csv",i.PDF="application/pdf",i.ZIP="application/zip",i.TGZ="application/x-gtar",i.TAR_GZ="application/x-gzip",i.EOT="appliaction/vnd.ms-fontobject",i.TTF="aplication/font-sfnt",i))(Ce||{});const an=(i,t=16)=>(i=i.toLowerCase(),(i.indexOf("0b")==0||i.indexOf("0o")==0||i.indexOf("0x")==0)&&(i=i.slice(2)),parseInt(i,t));function na(){const i=Uint32Array.of(305419896),t=new Uint8Array(i.buffer);switch(t[0]*16777216+t[1]*65536+t[2]*256+t[3]){case 305419896:return!1;case 2018915346:return!0}}const gr=i=>{let t=Ce.UNKNOWN;switch(new DataView(i).getUint32(0,na()).toString(16).toUpperCase()){case"FFD8FFDB":t=Ce.JPEG;break;case"FFD8FFE0":case"FFD8FFE1":case"FFD8FFE2":case"FFD8FFE3":t=Ce.JPEG;break;case"89504E47":t=Ce.PNG;break;case"47494638":t=Ce.GIF;break;case"52494646":t=Ce.WEBP;break;case"25504446":t=Ce.PDF;break;case"504B0304":t=Ce.ZIP;break}return t},vr=function(){const i=[];return{writeByte(t){i.push(t&255)},writeShort(t){this.writeByte(t),this.writeByte(t>>>8)},writeBytes(t,e=0,n=t.length){for(let r=0;r<n;r++)this.writeByte(t[r+e])},writeString(t){for(let e=0,n=t.length;e<n;e++)this.writeByte(t.charCodeAt(e))},toByteArray(){return i},toString(){let t="[";for(let e=0,n=i.length;e<n;e++)e>0&&(t+=","),t+=i[e];return t+="]",t}}},ia=function(){let i=0,t=0,e=0,n="";const r=function(o){if(!(o<0)){if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47}throw new Error("n:"+o)},s=function(o){n+=String.fromCharCode(r(o&63))};return{writeByte(o){for(i=i<<8|o&255,t+=8,e+=1;t>=6;)s(i>>>t-6),t-=6},flush(){if(t>0&&(s(i<<6-t),i=0,t=0),e%3!=0){const o=3-e%3;for(let a=0;a<o;a++)n+="="}},toString(){return n}}};function ra(i){const t=typeof i;return t!=="object"?t:Object.prototype.toString.call(i).replace(/^\[object (\S+)\]$/,"$1").toLowerCase()}function Ti(i){return ra(i)==="object"}function yr(i,t=new WeakMap){if(i==null)return i;if(i.constructor===Date)return new Date(i);if(i.constructor===RegExp)return new RegExp(i);if(typeof i!="object")return i;if(t.has(i))return t.get(i);const e=Object.getOwnPropertyDescriptors(i),n=Object.create(Object.getPrototypeOf(i),e);t.set(i,n);for(const r of Reflect.ownKeys(i))n[r]=Ti(i[r])?yr(i[r],t):i[r];return n}function Si(i,t,e=Number.EPSILON*Math.pow(2,2)){return Math.abs(i-t)<e}function wr(i,t=12){return+i.toPrecision(t)}var sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ei(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xr={exports:{}},on=typeof Reflect=="object"?Reflect:null,br=on&&typeof on.apply=="function"?on.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)},jn;on&&typeof on.ownKeys=="function"?jn=on.ownKeys:Object.getOwnPropertySymbols?jn=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:jn=function(t){return Object.getOwnPropertyNames(t)};function aa(i){console&&console.warn&&console.warn(i)}var _r=Number.isNaN||function(t){return t!==t};function Ot(){Ot.init.call(this)}xr.exports=Ot,xr.exports.once=la,Ot.EventEmitter=Ot,Ot.prototype._events=void 0,Ot.prototype._eventsCount=0,Ot.prototype._maxListeners=void 0;var Cr=10;function Xn(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(Ot,"defaultMaxListeners",{enumerable:!0,get:function(){return Cr},set:function(i){if(typeof i!="number"||i<0||_r(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Cr=i}}),Ot.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ot.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||_r(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Tr(i){return i._maxListeners===void 0?Ot.defaultMaxListeners:i._maxListeners}Ot.prototype.getMaxListeners=function(){return Tr(this)},Ot.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r=t==="error",s=this._events;if(s!==void 0)r=r&&s.error===void 0;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var h=s[t];if(h===void 0)return!1;if(typeof h=="function")br(h,this,e);else for(var m=h.length,g=Ar(h,m),n=0;n<m;++n)br(g[n],this,e);return!0};function Sr(i,t,e,n){var r,s,o;if(Xn(e),s=i._events,s===void 0?(s=i._events=Object.create(null),i._eventsCount=0):(s.newListener!==void 0&&(i.emit("newListener",t,e.listener?e.listener:e),s=i._events),o=s[t]),o===void 0)o=s[t]=e,++i._eventsCount;else if(typeof o=="function"?o=s[t]=n?[e,o]:[o,e]:n?o.unshift(e):o.push(e),r=Tr(i),r>0&&o.length>r&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=t,a.count=o.length,aa(a)}return i}Ot.prototype.addListener=function(t,e){return Sr(this,t,e,!1)},Ot.prototype.on=Ot.prototype.addListener,Ot.prototype.prependListener=function(t,e){return Sr(this,t,e,!0)};function oa(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Er(i,t,e){var n={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},r=oa.bind(n);return r.listener=e,n.wrapFn=r,r}Ot.prototype.once=function(t,e){return Xn(e),this.on(t,Er(this,t,e)),this},Ot.prototype.prependOnceListener=function(t,e){return Xn(e),this.prependListener(t,Er(this,t,e)),this},Ot.prototype.removeListener=function(t,e){var n,r,s,o,a;if(Xn(e),r=this._events,r===void 0)return this;if(n=r[t],n===void 0)return this;if(n===e||n.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():ha(n,s),n.length===1&&(r[t]=n[0]),r.removeListener!==void 0&&this.emit("removeListener",t,a||e)}return this},Ot.prototype.off=Ot.prototype.removeListener,Ot.prototype.removeAllListeners=function(t){var e,n,r;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var s=Object.keys(n),o;for(r=0;r<s.length;++r)o=s[r],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(e=n[t],typeof e=="function")this.removeListener(t,e);else if(e!==void 0)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this};function Pr(i,t,e){var n=i._events;if(n===void 0)return[];var r=n[t];return r===void 0?[]:typeof r=="function"?e?[r.listener||r]:[r]:e?ca(r):Ar(r,r.length)}Ot.prototype.listeners=function(t){return Pr(this,t,!0)},Ot.prototype.rawListeners=function(t){return Pr(this,t,!1)},Ot.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):kr.call(i,t)},Ot.prototype.listenerCount=kr;function kr(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}Ot.prototype.eventNames=function(){return this._eventsCount>0?jn(this._events):[]};function Ar(i,t){for(var e=new Array(t),n=0;n<t;++n)e[n]=i[n];return e}function ha(i,t){for(;t+1<i.length;t++)i[t]=i[t+1];i.pop()}function ca(i){for(var t=new Array(i.length),e=0;e<t.length;++e)t[e]=i[e].listener||i[e];return t}function la(i,t){return new Promise(function(e,n){function r(o){i.removeListener(t,s),n(o)}function s(){typeof i.removeListener=="function"&&i.removeListener("error",r),e([].slice.call(arguments))}Mr(i,t,s,{once:!0}),t!=="error"&&ua(i,r,{once:!0})})}function ua(i,t,e){typeof i.on=="function"&&Mr(i,"error",t,e)}function Mr(i,t,e,n){if(typeof i.on=="function")n.once?i.once(t,e):i.on(t,e);else if(typeof i.addEventListener=="function")i.addEventListener(t,function r(s){n.once&&i.removeEventListener(t,r),e(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}class fa{events;constructor(){this.events={}}on(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this}addListener(t,e){return this.on(t,e),this}prependListener(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].unshift(e),this}removeListener(t,e){if(this.events[t])return this.events[t]=this.events[t].filter(n=>n!==e),this}off(t,e){return this.removeListener(t,e),this}removeAllListeners(t){return t?this.events[t]=[]:this.events={},this}emit(t,...e){return this.events[t]&&this.events[t].forEach(n=>{Reflect.apply(n,this,e)}),this}once(t,e){const r=(()=>{let s=!1;return(...o)=>{s||(s=!0,Reflect.apply(e,this,o),this.off(t,r))}})();return this.on(t,r),this}}var Ir=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function da(i,t={}){var e=1,n=1;function r(it){var st=it.match(/\n/g);st&&(e+=st.length);var E=it.lastIndexOf(`
|
|
11
|
+
`);n=~E?it.length-E:n+it.length}function s(){var it={line:e,column:n};return function(st){return st.position=new o(it),k(),st}}function o(it){this.start=it,this.end={line:e,column:n},this.source=t.source}o.prototype.content=i;var a=[];function h(it){var st=new Error(t.source+":"+e+":"+n+": "+it);if(st.reason=it,st.filename=t.source,st.line=e,st.column=n,st.source=i,t.silent)a.push(st);else throw st}function m(){var it=y();return{type:"stylesheet",stylesheet:{source:t.source,rules:it,parsingErrors:a}}}function g(){return w(/^{\s*/)}function x(){return w(/^}/)}function y(){var it,st=[];for(k(),P(st);i.length&&i.charAt(0)!="}"&&(it=Dt()||K());)it!==!1&&(st.push(it),P(st));return st}function w(it){var st=it.exec(i);if(st){var E=st[0];return r(E),i=i.slice(E.length),st}}function k(){w(/^\s*/)}function P(it){var st;for(it=it||[];st=D();)st!==!1&&it.push(st);return it}function D(){var it=s();if(!(i.charAt(0)!="/"||i.charAt(1)!="*")){for(var st=2;i.charAt(st)!=""&&(i.charAt(st)!="*"||i.charAt(st+1)!="/");)++st;if(st+=2,i.charAt(st-1)==="")return h("End of comment missing");var E=i.slice(2,st-2);return n+=2,r(E),i=i.slice(st),n+=2,it({type:"comment",comment:E})}}function N(){var it=w(/^([^{]+)/);if(it)return Te(it[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(st){return st.replace(/,/g,"")}).split(/\s*(?![^(]*\)),\s*/).map(function(st){return st.replace(/\u200C/g,",")})}function R(){var it=s(),st=w(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(st){if(st=Te(st[0]),!w(/^:\s*/))return h("property missing ':'");var E=w(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/),C=it({type:"declaration",property:st.replace(Ir,""),value:E?Te(E[0]).replace(Ir,""):""});return w(/^[;\s]*/),C}}function O(){var it=[];if(!g())return h("missing '{'");P(it);for(var st;st=R();)st!==!1&&(it.push(st),P(it));return x()?it:h("missing '}'")}function X(){for(var it,st=[],E=s();it=w(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)st.push(it[1]),w(/^,\s*/);if(st.length)return E({type:"keyframe",values:st,declarations:O()})}function Y(){var it=s(),st=w(/^@([-\w]+)?keyframes\s*/);if(st){var E=st[1];if(st=w(/^([-\w]+)\s*/),!st)return h("@keyframes missing name");var C=st[1];if(!g())return h("@keyframes missing '{'");for(var b,A=P();b=X();)A.push(b),A=A.concat(P());return x()?it({type:"keyframes",name:C,vendor:E,keyframes:A}):h("@keyframes missing '}'")}}function nt(){var it=s(),st=w(/^@supports *([^{]+)/);if(st){var E=Te(st[1]);if(!g())return h("@supports missing '{'");var C=P().concat(y());return x()?it({type:"supports",supports:E,rules:C}):h("@supports missing '}'")}}function V(){var it=s(),st=w(/^@host\s*/);if(st){if(!g())return h("@host missing '{'");var E=P().concat(y());return x()?it({type:"host",rules:E}):h("@host missing '}'")}}function ot(){var it=s(),st=w(/^@media *([^{]+)/);if(st){var E=Te(st[1]);if(!g())return h("@media missing '{'");var C=P().concat(y());return x()?it({type:"media",media:E,rules:C}):h("@media missing '}'")}}function ct(){var it=s(),st=w(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(st)return it({type:"custom-media",name:Te(st[1]),media:Te(st[2])})}function vt(){var it=s(),st=w(/^@page */);if(st){var E=N()||[];if(!g())return h("@page missing '{'");for(var C=P(),b;b=R();)C.push(b),C=C.concat(P());return x()?it({type:"page",selectors:E,declarations:C}):h("@page missing '}'")}}function dt(){var it=s(),st=w(/^@([-\w]+)?document *([^{]+)/);if(st){var E=Te(st[1]),C=Te(st[2]);if(!g())return h("@document missing '{'");var b=P().concat(y());return x()?it({type:"document",document:C,vendor:E,rules:b}):h("@document missing '}'")}}function ht(){var it=s(),st=w(/^@font-face\s*/);if(st){if(!g())return h("@font-face missing '{'");for(var E=P(),C;C=R();)E.push(C),E=E.concat(P());return x()?it({type:"font-face",declarations:E}):h("@font-face missing '}'")}}var pt=kt("import"),ut=kt("charset"),Pt=kt("namespace");function kt(it){var st=new RegExp("^@"+it+"\\s*([^;]+);");return function(){var E=s(),C=w(st);if(C){var b={type:it};return b[it]=C[1].trim(),E(b)}}}function Dt(){if(i[0]=="@")return Y()||ot()||ct()||nt()||pt()||ut()||Pt()||dt()||vt()||V()||ht()}function K(){var it=s(),st=N();return st?(P(),it({type:"rule",selectors:st,declarations:O()})):h("selector missing")}return Pi(m())}function Te(i){return i?i.replace(/^\s+|\s+$/g,""):""}function Pi(i,t){var e=i&&typeof i.type=="string",n=e?i:t;for(var r in i){var s=i[r];Array.isArray(s)?s.forEach(function(o){Pi(o,n)}):s&&typeof s=="object"&&Pi(s,n)}return e&&Object.defineProperty(i,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),i}const ki=(i,t="image/svg+xml",e="utf-8")=>new Blob([i],{type:`${t};charset=${e}`}),Lr=i=>new XMLSerializer().serializeToString(i),pa=(i,t="text/html")=>new DOMParser().parseFromString(i,t),Dr=(i,t="image/svg+xml",e="utf-8")=>ki(Lr(i),t,e),Ai=(i,t)=>{const e=document.createElement("a");e.style.visibility="hidden",document.body.appendChild(e),e.download=t,typeof i=="string"?e.href=i:e.href=window.URL.createObjectURL(i),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(e.href)};function Rr(i=["*"],t){return new Promise((e,n)=>{if(!globalThis.document||!(globalThis.document instanceof Document))return n(new Error("This is not a browser environment"));const r=globalThis.document.createElement("input");r.setAttribute("type","file"),r.setAttribute("visibility","hidden"),Array.isArray(i)&&i.length>0&&r.setAttribute("accept",i.join(",")),t&&r.setAttribute("multiple","true"),globalThis.addEventListener("focus",()=>{setTimeout(()=>{(!r.files||r.files?.length===0)&&n(new Error("Cancel select"))},1e3)},{once:!0});const s=()=>{if(r.removeEventListener("change",s),!r.files||r.files?.length===0)n(new Error("Cancel select"));else{const o=Array.from(r.files);!i.includes("*")&&o.some(a=>!i.includes(`.${Nr(a)}`))&&n(new Error(`Please select files in ${i} format`)),r.remove(),e(o)}};r.addEventListener("change",s),r.click()})}function Mi(i,t="text",e){return new Promise((n,r)=>{const s=new FileReader;switch(s.addEventListener("progress",o=>{e?.(o.loaded,o.total)}),s.addEventListener("load",o=>{n(o.target?.result)}),s.addEventListener("error",o=>{r(o)}),t){case"dataURL":s.readAsDataURL(i);break;case"binaryString":s.readAsBinaryString(i);break;case"arrayBuffer":s.readAsArrayBuffer(i);break;default:s.readAsText(i)}})}function Or(i,t,e){return Mi(i.slice(t,e),"arrayBuffer")}async function ma(i){const t=await Or(i,0,4);return gr(t)}const Nr=i=>{let t;return i instanceof File?t=i.name:t=i,t.match(/\.([0-9a-z]+)(?:[\\?#]|$)/i)?.[1]??""};function ga(i,t){i.addEventListener("change",function(){t(i.files)},!1)}function va(i,t){i.addEventListener("dragover",function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")},!1),i.addEventListener("drop",function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer&&t(e.dataTransfer.files)},!1)}function ya(i){typeof queueMicrotask=="function"?queueMicrotask(i):Promise.resolve().then(i).catch(t=>setTimeout(()=>{throw t}))}function wa(i,t={},e=[]){return{tag:i,props:t,children:e}}function Pn(i,t){if(i.el)return;const e=i.el=document.createElement(i.tag);if(i.props)for(const n in i.props){const r=i.props[n];n.startsWith("on")?e.addEventListener(n.slice(2).toLowerCase(),r):e.setAttribute(n,r)}i.children&&(typeof i.children=="string"?e.textContent=i.children:i.children.forEach(n=>{Pn(n,e)})),t.appendChild(e)}function Br(i,t){if(i.tag!==t.tag){if(!i.el)return;const e=i.el.parentElement||document.body;e.removeChild(i.el),Pn(t,e)}else{const e=t.el=i.el;if(!e)return;const n=i.props,r=t.props;for(const a in n)a in r||(a.startsWith("on")?e.removeEventListener(a.slice(2).toLowerCase(),n[a]):e.removeAttribute(a));for(const a in r){const h=n[a],m=r[a];m!=h&&(a.startsWith("on")?e.addEventListener(a.slice(2).toLowerCase(),m):e.setAttribute(a,m))}const s=i.children||[],o=t.children||[];if(typeof o=="string")e.innerHTML=o;else if(typeof s=="string")e.innerHTML="",o.forEach(a=>{Pn(a,e)});else{const a=Math.min(s.length,o.length);for(let h=0;h<a;h++)Br(s[h],o[h]);o.length>s.length&&o.slice(s.length).forEach(h=>{Pn(h,e)}),o.length<s.length&&s.slice(o.length).forEach(h=>{h.el&&e.removeChild(h.el)})}}}function Fr(i,t,e){if(!i){e&&t&&e.appendChild(t);return}if(!i.isEqualNode(t)){if(i.nodeName!==t.nodeName){e.replaceChild(t,i);return}if(i.nodeType===Node.TEXT_NODE){i.textContent!==t.textContent&&(i.textContent=t.textContent);return}for(let n=i.attributes.length-1;n>=0;n--){const r=i.attributes[n].name;!t.hasAttribute(r)&&r!=="open"&&i.removeAttribute(r)}for(let n=0;n<t.attributes.length;n++){const r=t.attributes[n].name,s=t.attributes[n].value;i.setAttribute(r,s)}for(let n=0;n<t.childNodes.length;n++)i.childNodes[n]?Fr(i.childNodes[n],t.childNodes[n],i):i.appendChild(t.childNodes[n].cloneNode(!0));for(;i.childNodes.length>t.childNodes.length;)i.lastChild&&i.removeChild(i.lastChild)}}class xa{url;socket;waitingResponse={};sendMessageQueue=[];constructor(t){this.url=t,this.createSocket()}createSocket(){console.log("Socket Create Attempted"),this.socket=new WebSocket(this.url),this.socket.onopen=()=>{this.sendMessageQueue.forEach(t=>this.socket?.send(t)),this.sendMessageQueue=[]},this.socket.onclose=t=>{const{code:e,reason:n,wasClean:r}=t;console.log(`ws closed : ${e} ${n} ${r}`)},this.socket.onerror=t=>{console.log(`ws error : ${t.type}`)},this.socket.onmessage=t=>{this.processMessage(t)}}recreateSocket(t){console.log("Socket Recreate Attempted"),this.sendMessageQueue.push(t),this.createSocket()}closeSocket(){this.socket&&(this.socket.close(),console.log("Socket closed"))}openSocket(){this.createSocket(),console.log("Socket opened manually")}sendWithRetry(t){this.socket?.readyState===WebSocket.OPEN?this.socket.send(t):this.recreateSocket(t)}async processMessage(t){if(typeof t.data=="string")try{const e=JSON.parse(t.data);if(Object.prototype.hasOwnProperty.call(e,"requestid")){const n=this.waitingResponse[e.requestid];n?n.resolve?.(e):console.warn("Got data but found no associated request, already timed out?",e)}else console.warn("Got data without request id",e)}catch{console.log(`Received String : ${t.data}`)}else t.data instanceof ArrayBuffer?console.log(`Received ArrayBuffer : ${t.data}`):t.data instanceof Blob&&console.log(`Received Blob : ${t.data}`)}async sendPayload(t){const e=+new Date,n=this.waitingResponse[e]={requestid:e};try{let r;t instanceof Blob||t instanceof ArrayBuffer||typeof t=="string"?r=t:r=JSON.stringify({...n,...t});const s=await new Promise((o,a)=>{n.resolve=o,this.sendWithRetry(r),setTimeout(()=>{a("Timeout")},5e3)});return console.info("Time took",(+new Date-n.requestid)/1e3),s}catch(r){return Promise.reject(r)}finally{delete this.waitingResponse[e]}}async send(t,e,n=r=>{console.log(r)}){this.sendPayload(t).then(e,n)}}function ba(){const i=window.screen;return{screenWidth:i.width,screenHeight:i.height,screenX:window.screenX,screenY:window.screenY}}function _a(){const i=document.body;return{clientWidth:i.clientWidth,clientHeight:i.clientHeight,clientTop:i.clientTop,clientLeft:i.clientLeft,scrollWidth:i.scrollWidth,scrollHeight:i.scrollHeight,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft,pageX:i.getBoundingClientRect().x,pageY:i.getBoundingClientRect().y}}function hn(){const i=document.documentElement;return{clientWidth:i.clientWidth,clientHeight:i.clientHeight,clientTop:i.clientTop,clientLeft:i.clientLeft,scrollWidth:i.scrollWidth,scrollHeight:i.scrollHeight,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft,offsetWidth:i.offsetWidth,offsetHeight:i.offsetHeight,offsetTop:i.offsetTop,offsetLeft:i.offsetLeft,offsetParent:i.offsetParent,clientX:i.getBoundingClientRect().x,clientY:i.getBoundingClientRect().y}}function zr(){const{clientWidth:i,clientHeight:t}=hn();return{width:i||window.innerWidth,height:t||window.innerHeight}}function Ca(){const{scrollWidth:i,scrollHeight:t}=hn();return{width:i,height:t}}function Ur(i){const{top:t,left:e}=i.getBoundingClientRect(),{scrollLeft:n,scrollTop:r}=hn();return{x:e+n,y:t+r}}function Ta(i){return{x:Gr(i),y:Vr(i)}}function Gr(i){let t=0;for(;i!==null;)t+=i.offsetLeft,i=i.offsetParent;return t}function Vr(i){let t=0;for(;i!==null;)t+=i.offsetTop,i=i.offsetParent;return t}function Sa(i){const t=i.getBoundingClientRect();return{x:t.left,y:t.top}}function Ea(i,t){const e=i.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:n.x-e.x,y:n.y-e.y,width:n.width||n.right-n.left,height:n.height||n.bottom-n.top}}function Pa(){const{clientHeight:i,scrollTop:t,scrollHeight:e}=hn(),n=e-i;return n<=0?0:t/n*100}function ka(i){return{x:i.clientX,y:i.clientY}}function jr(i){if("center"in i)return i.center;if(i.pageX&&i.pageY)return{x:i.pageX,y:i.pageY};const{scrollLeft:t,scrollTop:e}=hn();return{x:i.clientX+t,y:i.clientY+e}}function Hn(i,t){const e=jr(t),n=Ur(i);return{x:e.x-n.x,y:e.y-n.y}}function Ii(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}const Wn=()=>{const i=navigator.userAgent.toLowerCase();let t="Unknown";return/mac/i.test(i)?t="macOS":/win/i.test(i)?t="Windows":/android/i.test(i)?t="Android":/iphone|ipad|ipod/i.test(i)?t="iOS":/linux/i.test(i)?t="Linux":/bsd/i.test(i)&&(t="BSD"),t.toLowerCase()},Aa=()=>{const i=navigator.userAgent;let t="Unknown";if(/Windows NT/.test(i)){const e=i.match(/Windows NT (\d+\.\d+)/);e&&(t=e[1])}else if(/Mac OS X/.test(i)){const e=i.match(/Mac OS X (\d+_\d+)/);e&&(t=e[1].replace("_","."))}else if(/Android/.test(i)){const e=i.match(/Android (\d+\.\d+)/);e&&(t=e[1])}else if(/iPhone|iPad|iPod/.test(i)){const e=i.match(/OS (\d+_\d+)/);e&&(t=e[1].replace("_","."))}return t.toLowerCase()},Li=()=>{const i=navigator.userAgent.toLowerCase();let t="Unknown";return/chrome/i.test(i)?t="Chrome":/firefox/i.test(i)?t="Firefox":/safari/i.test(i)?t="Safari":/edge/i.test(i)?t="Edge":/msie|trident/i.test(i)?t="IE":/MicroMessenger/i.test(i)?t="Wechat":/alipay/i.test(i)&&(t="Ali"),t.toLowerCase()},Ma=()=>{const i=navigator.userAgent;let t="Unknown";if(/Chrome/.test(i)){const e=i.match(/Chrome\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Firefox/.test(i)){const e=i.match(/Firefox\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Safari/.test(i)){const e=i.match(/Version\/(\d+\.\d+)/);e&&(t=e[1])}else if(/Edge/.test(i)){const e=i.match(/Edge\/(\d+\.\d+)/);e&&(t=e[1])}else if(/MSIE|Trident/.test(i)){const e=i.match(/(?:MSIE|rv:)(\d+\.\d+)/);e&&(t=e[1])}return t},Ia=()=>"geolocation"in navigator?new Promise((i,t)=>{navigator.geolocation.getCurrentPosition(e=>{const n=e.coords.latitude,r=e.coords.longitude;i({latitude:n,longitude:r})},e=>{t(e)})}):Promise.reject("Geolocation is not available.");function La(){return(navigator.browserLanguage||navigator.language).toLowerCase()}function Da(){return Intl.DateTimeFormat().resolvedOptions().timeZone.toLowerCase()}function Di(){return Wn()==="ios"}function Ri(){return Wn()==="macos"}function Ra(){return Di()|Ri()}function Xr(){return Wn()==="android"}function Oa(){return Di()||Xr()}function Na(){return typeof window=="object"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function Hr(){const i=window.navigator.userAgent,t=i.indexOf("MSIE ");if(t>0)return parseInt(i.substring(t+5,i.indexOf(".",t)),10);if(i.indexOf("Trident/")>0){const r=i.indexOf("rv:");return parseInt(i.substring(r+3,i.indexOf(".",r)),10)}const n=i.indexOf("Edge/");return n>0?parseInt(i.substring(n+5,i.indexOf(".",n)),10):-1}function Wr(){return Li()==="wechat"}function Yr(){return Li()==="ali"}function Ba(){return Wr()&&navigator.userAgent.match(/miniprogram/i)||window.__wxjs_environment==="miniprogram"}function Fa(){return Yr()&&navigator.userAgent.match(/miniprogram/i)}const za=Hr()!==-1,Ua=typeof document<"u",qr=typeof window<"u",Ga=typeof history<"u",Va=qr&&window.File&&window.FileReader&&window.FileList&&window.Blob,$r=(()=>{const i=Ii();return!!(i.Worker&&i.Blob&&i.Promise&&i.OffscreenCanvas&&i.OffscreenCanvasRenderingContext2D&&i.HTMLCanvasElement&&i.HTMLCanvasElement.prototype.transferControlToOffscreen&&i.URL&&i.URL.createObjectURL)})(),ja=typeof Path2D=="function"&&typeof DOMMatrix=="function",Xa=function(){if(!Ii().OffscreenCanvas)return!1;var t=new OffscreenCanvas(1,1),e=t.getContext("2d");e.fillRect(0,0,1,1);var n=t.transferToImageBitmap();try{e.createPattern(n,"no-repeat")}catch{return!1}return!0}();function Ha(i,t){let e=i[t];Object.defineProperty(i,"prop",{get:()=>e,set:n=>{e=n;debugger}})}function Wa(i){return new Proxy(i,{get(t,e,n){return Reflect.get(t,e,n)},set(t,e,n,r){debugger;return Reflect.set(t,e,n,r)}})}function Ya(i){const t=document.documentElement,e=window.top===window.self?window.devicePixelRatio:1;t.dataset.dpr=e;let n=100;const r=function(){const s=Math.min(t.clientWidth,i);t.dataset.width=s,t.dataset.rem=n=Math.round(100*(s/i)),t.style.fontSize=n+"px"};r(),window.rem2px=function(s){return s=parseFloat(s),s*n},window.px2rem=function(s){return s=parseFloat(s),s/n},window.addEventListener&&window.addEventListener("orientationchange"in window?"orientationchange":"resize",r,!1)}var Jr={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
12
12
|
* http://hammerjs.github.io/
|
|
13
13
|
*
|
|
14
14
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
15
|
-
* Licensed under the MIT license */(function(
|
|
16
|
-
`+
|
|
17
|
-
`;return function(){var S=new Error("get-stack-trace"),I=S&&S.stack?S.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",U=t.console&&(t.console.warn||t.console.log);return U&&U.call(t.console,b,I),h.apply(this,arguments)}}var x;typeof Object.assign!="function"?x=function(m){if(m===r||m===null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(m),b=1;b<arguments.length;b++){var S=arguments[b];if(S!==r&&S!==null)for(var I in S)S.hasOwnProperty(I)&&(w[I]=S[I])}return w}:x=Object.assign;var C=y(function(m,w,b){for(var S=Object.keys(w),I=0;I<S.length;)(!b||b&&m[S[I]]===r)&&(m[S[I]]=w[S[I]]),I++;return m},"extend","Use `assign`."),A=y(function(m,w){return C(m,w,!0)},"merge","Use `assign`.");function P(h,m,w){var b=m.prototype,S;S=h.prototype=Object.create(b),S.constructor=h,S._super=b,w&&x(S,w)}function M(h,m){return function(){return h.apply(m,arguments)}}function D(h,m){return typeof h==o?h.apply(m&&m[0]||r,m):h}function z(h,m){return h===r?m:h}function N(h,m,w){d(Z(m),function(b){h.addEventListener(b,w,!1)})}function F(h,m,w){d(Z(m),function(b){h.removeEventListener(b,w,!1)})}function G(h,m){for(;h;){if(h==m)return!0;h=h.parentNode}return!1}function H(h,m){return h.indexOf(m)>-1}function Z(h){return h.trim().split(/\s+/g)}function X(h,m,w){if(h.indexOf&&!w)return h.indexOf(m);for(var b=0;b<h.length;){if(w&&h[b][w]==m||!w&&h[b]===m)return b;b++}return-1}function J(h){return Array.prototype.slice.call(h,0)}function dt(h,m,w){for(var b=[],S=[],I=0;I<h.length;){var U=m?h[I][m]:h[I];X(S,U)<0&&b.push(h[I]),S[I]=U,I++}return w&&(m?b=b.sort(function(Q,W){return Q[m]>W[m]}):b=b.sort()),b}function ft(h,m){for(var w,b,S=m[0].toUpperCase()+m.slice(1),I=0;I<s.length;){if(w=s[I],b=w?w+S:m,b in h)return b;I++}return r}var gt=1;function kt(){return gt++}function St(h){var m=h.ownerDocument||h;return m.defaultView||m.parentWindow||t}var tt=/mobile|tablet|ip(ad|hone|od)|android/i,st="ontouchstart"in t,ht=ft(t,"PointerEvent")!==r,L=st&&tt.test(navigator.userAgent),k="touch",E="pen",R="mouse",B="kinect",V=25,j=1,et=2,Y=4,it=8,pt=1,vt=2,yt=4,At=8,xt=16,It=vt|yt,Mt=At|xt,Dt=It|Mt,_t=["x","y"],Nt=["clientX","clientY"];function Rt(h,m){var w=this;this.manager=h,this.callback=m,this.element=h.element,this.target=h.options.inputTarget,this.domHandler=function(b){D(h.options.enable,[h])&&w.handler(b)},this.init()}Rt.prototype={handler:function(){},init:function(){this.evEl&&N(this.element,this.evEl,this.domHandler),this.evTarget&&N(this.target,this.evTarget,this.domHandler),this.evWin&&N(St(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&F(this.element,this.evEl,this.domHandler),this.evTarget&&F(this.target,this.evTarget,this.domHandler),this.evWin&&F(St(this.element),this.evWin,this.domHandler)}};function Vt(h){var m,w=h.options.inputClass;return w?m=w:ht?m=we:L?m=qe:st?m=ei:m=Ee,new m(h,zt)}function zt(h,m,w){var b=w.pointers.length,S=w.changedPointers.length,I=m&j&&b-S===0,U=m&(Y|it)&&b-S===0;w.isFirst=!!I,w.isFinal=!!U,I&&(h.session={}),w.eventType=m,ie(h,w),h.emit("hammer.input",w),h.recognize(w),h.session.prevInput=w}function ie(h,m){var w=h.session,b=m.pointers,S=b.length;w.firstInput||(w.firstInput=fn(m)),S>1&&!w.firstMultiple?w.firstMultiple=fn(m):S===1&&(w.firstMultiple=!1);var I=w.firstInput,U=w.firstMultiple,$=U?U.center:I.center,Q=m.center=Ce(b);m.timeStamp=u(),m.deltaTime=m.timeStamp-I.timeStamp,m.angle=De($,Q),m.distance=Le($,Q),Wt(w,m),m.offsetDirection=Xe(m.deltaX,m.deltaY);var W=Ve(m.deltaTime,m.deltaX,m.deltaY);m.overallVelocityX=W.x,m.overallVelocityY=W.y,m.overallVelocity=c(W.x)>c(W.y)?W.x:W.y,m.scale=U?$t(U.pointers,b):1,m.rotation=U?Kn(U.pointers,b):0,m.maxPointers=w.prevInput?m.pointers.length>w.prevInput.maxPointers?m.pointers.length:w.prevInput.maxPointers:m.pointers.length,Me(w,m);var q=h.element;G(m.srcEvent.target,q)&&(q=m.srcEvent.target),m.target=q}function Wt(h,m){var w=m.center,b=h.offsetDelta||{},S=h.prevDelta||{},I=h.prevInput||{};(m.eventType===j||I.eventType===Y)&&(S=h.prevDelta={x:I.deltaX||0,y:I.deltaY||0},b=h.offsetDelta={x:w.x,y:w.y}),m.deltaX=S.x+(w.x-b.x),m.deltaY=S.y+(w.y-b.y)}function Me(h,m){var w=h.lastInterval||m,b=m.timeStamp-w.timeStamp,S,I,U,$;if(m.eventType!=it&&(b>V||w.velocity===r)){var Q=m.deltaX-w.deltaX,W=m.deltaY-w.deltaY,q=Ve(b,Q,W);I=q.x,U=q.y,S=c(q.x)>c(q.y)?q.x:q.y,$=Xe(Q,W),h.lastInterval=m}else S=w.velocity,I=w.velocityX,U=w.velocityY,$=w.direction;m.velocity=S,m.velocityX=I,m.velocityY=U,m.direction=$}function fn(h){for(var m=[],w=0;w<h.pointers.length;)m[w]={clientX:l(h.pointers[w].clientX),clientY:l(h.pointers[w].clientY)},w++;return{timeStamp:u(),pointers:m,center:Ce(m),deltaX:h.deltaX,deltaY:h.deltaY}}function Ce(h){var m=h.length;if(m===1)return{x:l(h[0].clientX),y:l(h[0].clientY)};for(var w=0,b=0,S=0;S<m;)w+=h[S].clientX,b+=h[S].clientY,S++;return{x:l(w/m),y:l(b/m)}}function Ve(h,m,w){return{x:m/h||0,y:w/h||0}}function Xe(h,m){return h===m?pt:c(h)>=c(m)?h<0?vt:yt:m<0?At:xt}function Le(h,m,w){w||(w=_t);var b=m[w[0]]-h[w[0]],S=m[w[1]]-h[w[1]];return Math.sqrt(b*b+S*S)}function De(h,m,w){w||(w=_t);var b=m[w[0]]-h[w[0]],S=m[w[1]]-h[w[1]];return Math.atan2(S,b)*180/Math.PI}function Kn(h,m){return De(m[1],m[0],Nt)+De(h[1],h[0],Nt)}function $t(h,m){return Le(m[0],m[1],Nt)/Le(h[0],h[1],Nt)}var Re={mousedown:j,mousemove:et,mouseup:Y},un="mousedown",ae="mousemove mouseup";function Ee(){this.evEl=un,this.evWin=ae,this.pressed=!1,Rt.apply(this,arguments)}P(Ee,Rt,{handler:function(m){var w=Re[m.type];w&j&&m.button===0&&(this.pressed=!0),w&et&&m.which!==1&&(w=Y),this.pressed&&(w&Y&&(this.pressed=!1),this.callback(this.manager,w,{pointers:[m],changedPointers:[m],pointerType:R,srcEvent:m}))}});var de={pointerdown:j,pointermove:et,pointerup:Y,pointercancel:it,pointerout:it},Pn={2:k,3:E,4:R,5:B},Ye="pointerdown",dn="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ye="MSPointerDown",dn="MSPointerMove MSPointerUp MSPointerCancel");function we(){this.evEl=Ye,this.evWin=dn,Rt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}P(we,Rt,{handler:function(m){var w=this.store,b=!1,S=m.type.toLowerCase().replace("ms",""),I=de[S],U=Pn[m.pointerType]||m.pointerType,$=U==k,Q=X(w,m.pointerId,"pointerId");I&j&&(m.button===0||$)?Q<0&&(w.push(m),Q=w.length-1):I&(Y|it)&&(b=!0),!(Q<0)&&(w[Q]=m,this.callback(this.manager,I,{pointers:w,changedPointers:[m],pointerType:U,srcEvent:m}),b&&w.splice(Q,1))}});var Qt={touchstart:j,touchmove:et,touchend:Y,touchcancel:it},Ar="touchstart",pn="touchstart touchmove touchend touchcancel";function Ze(){this.evTarget=Ar,this.evWin=pn,this.started=!1,Rt.apply(this,arguments)}P(Ze,Rt,{handler:function(m){var w=Qt[m.type];if(w===j&&(this.started=!0),!!this.started){var b=Oe.call(this,m,w);w&(Y|it)&&b[0].length-b[1].length===0&&(this.started=!1),this.callback(this.manager,w,{pointers:b[0],changedPointers:b[1],pointerType:k,srcEvent:m})}}});function Oe(h,m){var w=J(h.touches),b=J(h.changedTouches);return m&(Y|it)&&(w=dt(w.concat(b),"identifier",!0)),[w,b]}var Qn={touchstart:j,touchmove:et,touchend:Y,touchcancel:it},$e="touchstart touchmove touchend touchcancel";function qe(){this.evTarget=$e,this.targetIds={},Rt.apply(this,arguments)}P(qe,Rt,{handler:function(m){var w=Qn[m.type],b=In.call(this,m,w);b&&this.callback(this.manager,w,{pointers:b[0],changedPointers:b[1],pointerType:k,srcEvent:m})}});function In(h,m){var w=J(h.touches),b=this.targetIds;if(m&(j|et)&&w.length===1)return b[w[0].identifier]=!0,[w,w];var S,I,U=J(h.changedTouches),$=[],Q=this.target;if(I=w.filter(function(W){return G(W.target,Q)}),m===j)for(S=0;S<I.length;)b[I[S].identifier]=!0,S++;for(S=0;S<U.length;)b[U[S].identifier]&&$.push(U[S]),m&(Y|it)&&delete b[U[S].identifier],S++;if($.length)return[dt(I.concat($),"identifier",!0),$]}var ti=2500,Pr=25;function ei(){Rt.apply(this,arguments);var h=M(this.handler,this);this.touch=new qe(this.manager,h),this.mouse=new Ee(this.manager,h),this.primaryTouch=null,this.lastTouches=[]}P(ei,Rt,{handler:function(m,w,b){var S=b.pointerType==k,I=b.pointerType==R;if(!(I&&b.sourceCapabilities&&b.sourceCapabilities.firesTouchEvents)){if(S)Ir.call(this,w,b);else if(I&&We.call(this,b))return;this.callback(m,w,b)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ir(h,m){h&j?(this.primaryTouch=m.changedPointers[0].identifier,Mr.call(this,m)):h&(Y|it)&&Mr.call(this,m)}function Mr(h){var m=h.changedPointers[0];if(m.identifier===this.primaryTouch){var w={x:m.clientX,y:m.clientY};this.lastTouches.push(w);var b=this.lastTouches,S=function(){var I=b.indexOf(w);I>-1&&b.splice(I,1)};setTimeout(S,ti)}}function We(h){for(var m=h.srcEvent.clientX,w=h.srcEvent.clientY,b=0;b<this.lastTouches.length;b++){var S=this.lastTouches[b],I=Math.abs(m-S.x),U=Math.abs(w-S.y);if(I<=Pr&&U<=Pr)return!0}return!1}var Lr=ft(a.style,"touchAction"),Dr=Lr!==r,Rr="compute",Or="auto",ni="manipulation",Je="none",oe="pan-x",Ke="pan-y",gn=mn();function Ot(h,m){this.manager=h,this.set(m)}Ot.prototype={set:function(h){h==Rr&&(h=this.compute()),Dr&&this.manager.element.style&&gn[h]&&(this.manager.element.style[Lr]=h),this.actions=h.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var h=[];return d(this.manager.recognizers,function(m){D(m.options.enable,[m])&&(h=h.concat(m.getTouchAction()))}),Fr(h.join(" "))},preventDefaults:function(h){var m=h.srcEvent,w=h.offsetDirection;if(this.manager.session.prevented){m.preventDefault();return}var b=this.actions,S=H(b,Je)&&!gn[Je],I=H(b,Ke)&&!gn[Ke],U=H(b,oe)&&!gn[oe];if(S){var $=h.pointers.length===1,Q=h.distance<2,W=h.deltaTime<250;if($&&Q&&W)return}if(!(U&&I)&&(S||I&&w&It||U&&w&Mt))return this.preventSrc(m)},preventSrc:function(h){this.manager.session.prevented=!0,h.preventDefault()}};function Fr(h){if(H(h,Je))return Je;var m=H(h,oe),w=H(h,Ke);return m&&w?Je:m||w?m?oe:Ke:H(h,ni)?ni:Or}function mn(){if(!Dr)return!1;var h={},m=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(w){h[w]=m?t.CSS.supports("touch-action",w):!0}),h}var Mn=1,te=2,Fe=4,ke=8,ye=ke,Qe=16,Ht=32;function bt(h){this.options=x({},this.defaults,h||{}),this.id=kt(),this.manager=null,this.options.enable=z(this.options.enable,!0),this.state=Mn,this.simultaneous={},this.requireFail=[]}bt.prototype={defaults:{},set:function(h){return x(this.options,h),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(h){if(p(h,"recognizeWith",this))return this;var m=this.simultaneous;return h=vn(h,this),m[h.id]||(m[h.id]=h,h.recognizeWith(this)),this},dropRecognizeWith:function(h){return p(h,"dropRecognizeWith",this)?this:(h=vn(h,this),delete this.simultaneous[h.id],this)},requireFailure:function(h){if(p(h,"requireFailure",this))return this;var m=this.requireFail;return h=vn(h,this),X(m,h)===-1&&(m.push(h),h.requireFailure(this)),this},dropRequireFailure:function(h){if(p(h,"dropRequireFailure",this))return this;h=vn(h,this);var m=X(this.requireFail,h);return m>-1&&this.requireFail.splice(m,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(h){return!!this.simultaneous[h.id]},emit:function(h){var m=this,w=this.state;function b(S){m.manager.emit(S,h)}w<ke&&b(m.options.event+ji(w)),b(m.options.event),h.additionalEvent&&b(h.additionalEvent),w>=ke&&b(m.options.event+ji(w))},tryEmit:function(h){if(this.canEmit())return this.emit(h);this.state=Ht},canEmit:function(){for(var h=0;h<this.requireFail.length;){if(!(this.requireFail[h].state&(Ht|Mn)))return!1;h++}return!0},recognize:function(h){var m=x({},h);if(!D(this.options.enable,[this,m])){this.reset(),this.state=Ht;return}this.state&(ye|Qe|Ht)&&(this.state=Mn),this.state=this.process(m),this.state&(te|Fe|ke|Qe)&&this.tryEmit(m)},process:function(h){},getTouchAction:function(){},reset:function(){}};function ji(h){return h&Qe?"cancel":h&ke?"end":h&Fe?"move":h&te?"start":""}function ii(h){return h==xt?"down":h==At?"up":h==vt?"left":h==yt?"right":""}function vn(h,m){var w=m.manager;return w?w.get(h):h}function pe(){bt.apply(this,arguments)}P(pe,bt,{defaults:{pointers:1},attrTest:function(h){var m=this.options.pointers;return m===0||h.pointers.length===m},process:function(h){var m=this.state,w=h.eventType,b=m&(te|Fe),S=this.attrTest(h);return b&&(w&it||!S)?m|Qe:b||S?w&Y?m|ke:m&te?m|Fe:te:Ht}});function le(){pe.apply(this,arguments),this.pX=null,this.pY=null}P(le,pe,{defaults:{event:"pan",threshold:10,pointers:1,direction:Dt},getTouchAction:function(){var h=this.options.direction,m=[];return h&It&&m.push(Ke),h&Mt&&m.push(oe),m},directionTest:function(h){var m=this.options,w=!0,b=h.distance,S=h.direction,I=h.deltaX,U=h.deltaY;return S&m.direction||(m.direction&It?(S=I===0?pt:I<0?vt:yt,w=I!=this.pX,b=Math.abs(h.deltaX)):(S=U===0?pt:U<0?At:xt,w=U!=this.pY,b=Math.abs(h.deltaY))),h.direction=S,w&&b>m.threshold&&S&m.direction},attrTest:function(h){return pe.prototype.attrTest.call(this,h)&&(this.state&te||!(this.state&te)&&this.directionTest(h))},emit:function(h){this.pX=h.deltaX,this.pY=h.deltaY;var m=ii(h.direction);m&&(h.additionalEvent=this.options.event+m),this._super.emit.call(this,h)}});function tn(){pe.apply(this,arguments)}P(tn,pe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.scale-1)>this.options.threshold||this.state&te)},emit:function(h){if(h.scale!==1){var m=h.scale<1?"in":"out";h.additionalEvent=this.options.event+m}this._super.emit.call(this,h)}});function ri(){bt.apply(this,arguments),this._timer=null,this._input=null}P(ri,bt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Or]},process:function(h){var m=this.options,w=h.pointers.length===m.pointers,b=h.distance<m.threshold,S=h.deltaTime>m.time;if(this._input=h,!b||!w||h.eventType&(Y|it)&&!S)this.reset();else if(h.eventType&j)this.reset(),this._timer=g(function(){this.state=ye,this.tryEmit()},m.time,this);else if(h.eventType&Y)return ye;return Ht},reset:function(){clearTimeout(this._timer)},emit:function(h){this.state===ye&&(h&&h.eventType&Y?this.manager.emit(this.options.event+"up",h):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function si(){pe.apply(this,arguments)}P(si,pe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.rotation)>this.options.threshold||this.state&te)}});function ai(){pe.apply(this,arguments)}P(ai,pe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:It|Mt,pointers:1},getTouchAction:function(){return le.prototype.getTouchAction.call(this)},attrTest:function(h){var m=this.options.direction,w;return m&(It|Mt)?w=h.overallVelocity:m&It?w=h.overallVelocityX:m&Mt&&(w=h.overallVelocityY),this._super.attrTest.call(this,h)&&m&h.offsetDirection&&h.distance>this.options.threshold&&h.maxPointers==this.options.pointers&&c(w)>this.options.velocity&&h.eventType&Y},emit:function(h){var m=ii(h.offsetDirection);m&&this.manager.emit(this.options.event+m,h),this.manager.emit(this.options.event,h)}});function xe(){bt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}P(xe,bt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ni]},process:function(h){var m=this.options,w=h.pointers.length===m.pointers,b=h.distance<m.threshold,S=h.deltaTime<m.time;if(this.reset(),h.eventType&j&&this.count===0)return this.failTimeout();if(b&&S&&w){if(h.eventType!=Y)return this.failTimeout();var I=this.pTime?h.timeStamp-this.pTime<m.interval:!0,U=!this.pCenter||Le(this.pCenter,h.center)<m.posThreshold;this.pTime=h.timeStamp,this.pCenter=h.center,!U||!I?this.count=1:this.count+=1,this._input=h;var $=this.count%m.taps;if($===0)return this.hasRequireFailures()?(this._timer=g(function(){this.state=ye,this.tryEmit()},m.interval,this),te):ye}return Ht},failTimeout:function(){return this._timer=g(function(){this.state=Ht},this.options.interval,this),Ht},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ye&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function be(h,m){return m=m||{},m.recognizers=z(m.recognizers,be.defaults.preset),new Dn(h,m)}be.VERSION="2.0.7",be.defaults={domEvents:!1,touchAction:Rr,enable:!0,inputTarget:null,inputClass:null,preset:[[si,{enable:!1}],[tn,{enable:!1},["rotate"]],[ai,{direction:It}],[le,{direction:It},["swipe"]],[xe],[xe,{event:"doubletap",taps:2},["tap"]],[ri]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ln=1,Xt=2;function Dn(h,m){this.options=x({},be.defaults,m||{}),this.options.inputTarget=this.options.inputTarget||h,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=h,this.input=Vt(this),this.touchAction=new Ot(this,this.options.touchAction),f(this,!0),d(this.options.recognizers,function(w){var b=this.add(new w[0](w[1]));w[2]&&b.recognizeWith(w[2]),w[3]&&b.requireFailure(w[3])},this)}Dn.prototype={set:function(h){return x(this.options,h),h.touchAction&&this.touchAction.update(),h.inputTarget&&(this.input.destroy(),this.input.target=h.inputTarget,this.input.init()),this},stop:function(h){this.session.stopped=h?Xt:Ln},recognize:function(h){var m=this.session;if(!m.stopped){this.touchAction.preventDefaults(h);var w,b=this.recognizers,S=m.curRecognizer;(!S||S&&S.state&ye)&&(S=m.curRecognizer=null);for(var I=0;I<b.length;)w=b[I],m.stopped!==Xt&&(!S||w==S||w.canRecognizeWith(S))?w.recognize(h):w.reset(),!S&&w.state&(te|Fe|ke)&&(S=m.curRecognizer=w),I++}},get:function(h){if(h instanceof bt)return h;for(var m=this.recognizers,w=0;w<m.length;w++)if(m[w].options.event==h)return m[w];return null},add:function(h){if(p(h,"add",this))return this;var m=this.get(h.options.event);return m&&this.remove(m),this.recognizers.push(h),h.manager=this,this.touchAction.update(),h},remove:function(h){if(p(h,"remove",this))return this;if(h=this.get(h),h){var m=this.recognizers,w=X(m,h);w!==-1&&(m.splice(w,1),this.touchAction.update())}return this},on:function(h,m){if(h!==r&&m!==r){var w=this.handlers;return d(Z(h),function(b){w[b]=w[b]||[],w[b].push(m)}),this}},off:function(h,m){if(h!==r){var w=this.handlers;return d(Z(h),function(b){m?w[b]&&w[b].splice(X(w[b],m),1):delete w[b]}),this}},emit:function(h,m){this.options.domEvents&&v(h,m);var w=this.handlers[h]&&this.handlers[h].slice();if(!(!w||!w.length)){m.type=h,m.preventDefault=function(){m.srcEvent.preventDefault()};for(var b=0;b<w.length;)w[b](m),b++}},destroy:function(){this.element&&f(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function f(h,m){var w=h.element;if(w.style){var b;d(h.options.cssProps,function(S,I){b=ft(w.style,I),m?(h.oldCssProps[b]=w.style[b],w.style[b]=S):w.style[b]=h.oldCssProps[b]||""}),m||(h.oldCssProps={})}}function v(h,m){var w=e.createEvent("Event");w.initEvent(h,!0,!0),w.gesture=m,m.target.dispatchEvent(w)}x(be,{INPUT_START:j,INPUT_MOVE:et,INPUT_END:Y,INPUT_CANCEL:it,STATE_POSSIBLE:Mn,STATE_BEGAN:te,STATE_CHANGED:Fe,STATE_ENDED:ke,STATE_RECOGNIZED:ye,STATE_CANCELLED:Qe,STATE_FAILED:Ht,DIRECTION_NONE:pt,DIRECTION_LEFT:vt,DIRECTION_RIGHT:yt,DIRECTION_UP:At,DIRECTION_DOWN:xt,DIRECTION_HORIZONTAL:It,DIRECTION_VERTICAL:Mt,DIRECTION_ALL:Dt,Manager:Dn,Input:Rt,TouchAction:Ot,TouchInput:qe,MouseInput:Ee,PointerEventInput:we,TouchMouseInput:ei,SingleTouchInput:Ze,Recognizer:bt,AttrRecognizer:pe,Tap:xe,Pan:le,Swipe:ai,Pinch:tn,Rotate:si,Press:ri,on:N,off:F,each:d,merge:A,extend:C,assign:x,inherit:P,bindFn:M,prefixed:ft});var _=typeof t<"u"?t:typeof self<"u"?self:{};_.Hammer=be,typeof r=="function"&&r.amd?r(function(){return be}):n.exports?n.exports=be:t[i]=be})(window,document,"Hammer")})(Ha);var ch=Ha.exports;const hh=Yi(ch);function Qi(n){return n*Math.PI/180}function qr(n){return n*180/Math.PI}function ja(n,t,e,i){const r=n-e,s=t-i;return Math.sqrt(r*r+s*s)}function Wr(n,t,e,i){const r=e-n,s=i-t;return Math.atan2(s,r)}function Jr(n,t){return{x:Math.cos(n)*t,y:Math.sin(n)*t}}function tr(n,t){return Math.sqrt(n*n+t*t)}function Kr(n,t){const e=tr(n,t);return{x:n/=e,y:t/=e}}function fh(n,t,e,i,r=10){if(Math.abs(e-n)<r&&Math.abs(i-t)<r)return"no";const s=qr(Wr(n,t,e,i));return s>=-135&&s<=-45?"up":s>45&&s<135?"down":s>=135&&s<=180||s>=-180&&s<-135?"left":s>=-45&&s<=45?"right":"no"}class er{x;y;vx;vy;ax;ay;mass;constructor(t){this.x=t.x,this.y=t.y,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||0}distanceTo(t){return ja(this.x,this.y,t.x,t.y)}angleTo(t){return Wr(this.x,this.y,t.x,t.y)}velocityTo(t){return{vx:t.x-this.x,vy:t.y-this.y}}followTo(t,e=3){const i=this.angleTo(t),{x:r,y:s}=Jr(i,e);this.vx=r,this.vy=s,this.nextFrame()}followAccelerationTo(t,e=.05){const i=this.angleTo(t),{x:r,y:s}=Jr(i,e);this.ax=r,this.ay=s,this.nextFrame()}nextFrame(t){const e=t?.gravity??0,i=t?.friction??0;if(this.vx+=this.ax,this.vy+=this.ay,this.vy+=e,i>0){const r=Math.atan2(this.vy,this.vx);let s=Math.sqrt(this.vx*this.vx+this.vy*this.vy);s>i?s-=i:s=0,this.vx=Math.cos(r)*s,this.vy=Math.sin(r)*s}this.x+=this.vx,this.y+=this.vy}nextFrameEaseTo(t,e){const i=e?.gravity??0,r=e?.friction??1,s=e?.easing??.05,a=t.x-this.x,o=t.y-this.y;this.vx=a*s,this.vy=o*s,this.vy+=i,this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}nextFrameSpringTo(t,e){const i=e?.gravity??0,r=e?.friction??.95,s=e?.spring??.03;(Array.isArray(t)?t:[t]).forEach(o=>{const l=o.x-this.x,c=o.y-this.y,u=l*s,g=c*s;this.vx+=u,this.vy+=g}),this.vy+=i,this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}nextFrameSpringConnect(t,e){const i=e?.gravity??0,r=e?.friction??.95,s=e?.spring??.03,a=e?.springLength??100,o=this.angleTo(t);this.nextFrameSpringTo(new er({x:t.x-Math.cos(o)*a,y:t.y-Math.sin(o)*a}),{spring:s,friction:r,gravity:i})}}class Un extends er{width;height;constructor(t){super(t),this.width=t.width,this.height=t.height}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return!(t.x<this.x||t.x>this.x+this.width||t.y<this.y||t.y>this.y+this.height)}toArray(){return[this.x,this.y,this.width,this.height]}clone(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}}class Te extends er{radius;constructor(t){super(t),this.radius=t?.radius??0}toSVGPathData(){return[this.x,this.y]}toSVGPathD(){return`${this.x},${this.y}`}setX(t){this.x=t}setY(t){this.y=t}setXY(t,e){this.x=t,this.y=e}eq(t){return this.x===t.x&&this.y===t.y}midPointBtw(t){return new Te({x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2})}toArray(){return[this.x,this.y]}clone(t){this.setXY(t.x,t.y)}getBoundRect(){return new Un({x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2})}nextFrameCollisionTo(t){const e=t.x-this.x,i=t.y-this.y;if(Math.sqrt(e*e+i*i)<this.radius+t.radius){const a=Math.atan2(i,e),o=Math.sin(a),l=Math.cos(a),c={x:0,y:0},u=s(e,i,o,l,!0),g=s(this.vx,this.vy,o,l,!0),p=s(t.vx,t.vy,o,l,!0),d=g.x-p.x;g.x=((this.mass-t.mass)*g.x+2*t.mass*p.x)/(this.mass+t.mass),p.x=d+g.x;const y=Math.abs(g.x)+Math.abs(p.x),x=this.radius+t.radius-Math.abs(c.x-u.x);c.x+=g.x/y*x,u.x+=p.x/y*x;const C=s(c.x,c.y,o,l,!1),A=s(u.x,u.y,o,l,!1);t.x=this.x+A.x,t.y=this.y+A.y,this.x=this.x+C.x,this.y=this.y+C.y;const P=s(g.x,g.y,o,l,!1),M=s(p.x,p.y,o,l,!1);this.vx=P.x,this.vy=P.y,t.vx=M.x,t.vy=M.y}function s(a,o,l,c,u=!1){return{x:u?a*c+o*l:a*c-o*l,y:u?o*c-a*l:o*c+a*l}}}nextFrameBounce(t,e){const i=t.x,r=t.y,s=t.x+t.width,a=t.y+t.height,o=e?.bounce??-1;this.x+this.radius>s?(this.x=s-this.radius,this.vx*=o):this.x-this.radius<i&&(this.x=i+this.radius,this.vx*=o),this.y+this.radius>a?(this.y=a-this.radius,this.vy*=o):this.y-this.radius<r&&(this.y=r+this.radius,this.vy*=o)}}class Va{constructor(){}static getFormatKeyNames(t){const e=$r(),i=[];return t.ctrl&&i.push(e?"Cmd":"Ctrl"),t.shift&&i.push("Shift"),t.alt&&i.push("Alt"),typeof t.key=="string"?i.push(aa(t.key)):Array.isArray(t.key)&&(t.key.map(r=>aa(r)),i.push(...t.key)),i}static matchKeyScheme(t,e){const i=t.ctrl??!1,r=t.shift??!1,s=t.alt??!1;if(t.exact)return(i===e.metaKey||i===e.ctrlKey)&&r===e.shiftKey&&s===e.altKey;const a=[];return i&&a.push(i===e.metaKey||i===e.ctrlKey),r&&a.push(r===e.shiftKey),s&&a.push(s===e.altKey),a.every(o=>o)}static on(t,e){if(t?.key===void 0||t?.key===null)return e;const i=t?.target??window;let r=!1;const s=this.getFormatKeyNames(t),a=o=>{if(o.stopPropagation(),!r&&o.key!=="Control"&&o.key!=="Meta"&&o.key!=="Shift"&&o.key!=="Option"&&o.key!=="Alt"&&s.find(l=>l.toLowerCase()===o.key.toLowerCase())&&this.matchKeyScheme(t,o)){o.preventDefault();const l=e(o);if(typeof l!="function")return;const c=u=>{u.preventDefault(),l(u),i.removeEventListener("keyup",c)};i.addEventListener("keyup",c)}};return e.title=t?.title??"",e.formatedKeyNames=s,e.pause=()=>r=!0,e.restart=()=>r=!1,e.removeListener=()=>i.removeEventListener("keydown",a),i.addEventListener("keydown",a),e}}const Xa=uh("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function uh(n,t=10){const e={},i=n.split(",");for(let r=0;r<i.length;r+=2){const s="&"+i[r+1]+";",a=parseInt(i[r],t);e[s]="&#"+a+";"}return e["\\xa0"]=" ",e}function ee(n,t){const e=Object.keys(t);for(let i=0;i<e.length;i++)n=n.replace(new RegExp("{"+e[i]+"}","gi"),""+t[e[i]]);return n}function nr(n){let t,e;if(!n)throw new Error("cannot create a random attribute name for an undefined object");const i="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=i[Math.floor(Math.random()*i.length)];while(n[t]);return t}function dh(n){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[n]||t.start}function ph(n){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[n]||t.alphabetic}const ui={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"}};class ir{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const i=this.__ctx.__createElement("stop");if(i.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const s=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);s&&(i.setAttribute("stop-color",ee("rgb({r},{g},{b})",{r:s[1],g:s[2],b:s[3]})),i.setAttribute("stop-opacity",s[4]))}else i.setAttribute("stop-color",e);this.__root.appendChild(i)}}class Qr{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class di{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:i=500,enableMirroring:r=!1}){this.enableMirroring=r,t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=i),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(ui);for(let e=0,i=t.length;e<i;e++){const r=t[e];this[r]=ui[r].canvas}}__getStyleState(){const t={},e=Object.keys(ui);for(let i=0,r=e.length;i<r;i++){const s=e[i];t[s]=this[s]}return t}__applyStyleState(t){const e=Object.keys(t);for(let i=0,r=e.length;i<r;i++){const s=e[i];this[s]=t[s]}}__createElement(t,e={},i=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);i&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let a=0;a<s.length;a++){const o=s[a];r.setAttribute(o,e[o])}return r}__applyStyleToCurrentElement(t){let e=this.__currentElement;const i=this.__currentElementsToStyle;i&&(e.setAttribute(t,""),e=i.element,i.children.forEach(s=>{s.setAttribute(t,"")}));const r=Object.keys(ui);for(let s=0;s<r.length;s++){const a=ui[r[s]],o=this[r[s]];if(a.apply){if(o instanceof Qr){if(o.__ctx)for(;o.__ctx.__SVGdefs.childNodes.length;){const l=o.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[l]=l,this.__SVGdefs.appendChild(o.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(a.apply,ee("url(#{id})",{id:o.__root.getAttribute("id")}))}else if(o instanceof ir)e.setAttribute(a.apply,ee("url(#{id})",{id:o.__root.getAttribute("id")}));else if(a.apply.indexOf(t)!==-1&&a.svg!==o)if((a.svgAttr==="stroke"||a.svgAttr==="fill")&&o.indexOf("rgba")!==-1){const c=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(o);e.setAttribute(a.svgAttr,ee("rgb({r},{g},{b})",{r:c[1],g:c[2],b:c[3]}));let u=parseFloat(c[4]);const g=this.globalAlpha;g!=null&&(u*=g),e.setAttribute(a.svgAttr+"-opacity",""+u)}else{let l=a.svgAttr;if(r[s]==="globalAlpha"&&(l=t+"-"+a.svgAttr,e.getAttribute(l)))continue;l&&e.setAttribute(l,o)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const r=Object.keys(Xa);for(let s=0,a=r.length;s<a;s++){const o=r[s],l=Xa[o],c=new RegExp(o,"gi");c.test(e)&&(e=e.replace(c,l))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const r=this.__createElement("g");e.appendChild(r),this.__currentElement=r}let i=this.__currentElement.getAttribute("transform");i?i+=" ":i="",i+=t,this.__currentElement.setAttribute("transform",i)}scale(t,e){e===void 0&&(e=t),this.__addTransform(ee("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(ee("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(ee("translate({x},{y})",{x:t,y:e}))}transform(t,e,i,r,s,a){this.__addTransform(ee("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:i,d:r,e:s,f:a}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(ee("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(ee("L {x} {y}",this.__currentPosition)):this.__addPathCommand(ee("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,i,r,s,a){this.__currentPosition={x:s,y:a},this.__addPathCommand(ee("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:i,cp2y:r,x:s,y:a}))}quadraticCurveTo(t,e,i,r){this.__currentPosition={x:i,y:r},this.__addPathCommand(ee("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:i,y:r}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,i,r,s){const a=this.__currentPosition&&this.__currentPosition.x,o=this.__currentPosition&&this.__currentPosition.y;if(typeof a>"u"||typeof o>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(a===t&&o===e||t===i&&e===r||s===0){this.lineTo(t,e);return}const l=this.normalize([a-t,o-e]),c=this.normalize([i-t,r-e]);if(l[0]*c[1]===l[1]*c[0]){this.lineTo(t,e);return}const u=l[0]*c[0]+l[1]*c[1],g=Math.acos(Math.abs(u)),p=this.normalize([l[0]+c[0],l[1]+c[1]]),d=s/Math.sin(g/2),y=t+d*p[0],x=e+d*p[1],C=[-l[1],l[0]],A=[c[1],-c[0]],P=function(z){const N=z[0];return z[1]>=0?Math.acos(N):-Math.acos(N)},M=P(C),D=P(A);this.lineTo(y+C[0]*s,x+C[1]*s),this.arc(y,x,s,M,D)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,i,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()}fillRect(t,e,i,r){const s=this.__createElement("rect",{x:t,y:e,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,i,r){const s=this.__createElement("rect",{x:t,y:e,width:i,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),i=this.__rootSVG.childNodes[1],r=i.childNodes;for(let s=r.length-1;s>=0;s--)r[s]&&i.removeChild(r[s]);this.__currentElement=i,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,i,r){if(t===0&&e===0&&i===this.width&&r===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),a=this.__createElement("rect",{x:t,y:e,width:i,height:r,fill:"#FFFFFF"},!0);s.appendChild(a)}createLinearGradient(t,e,i,r){const s=this.__createElement("linearGradient",{id:nr(this.__ids),x1:t+"px",x2:i+"px",y1:e+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new ir(s,this)}createRadialGradient(t,e,i,r,s,a){const o=this.__createElement("radialGradient",{id:nr(this.__ids),cx:r+"px",cy:s+"px",r:a+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(o),new ir(o,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),i={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(i.decoration="underline"),this.__fontHref&&(i.href=this.__fontHref),i}__wrapTextLink(t,e){if(t.href){const i=this.__createElement("a");return i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),i.appendChild(e),i}return e}__applyText(t,e,i,r){const s=this.__parseFont(),a=this.__closestGroupOrSvg(),o=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:e,y:i,"text-anchor":dh(this.textAlign),"dominant-baseline":ph(this.textBaseline)},!0);o.appendChild(this.__document.createTextNode(t)),this.__currentElement=o,this.__applyStyleToCurrentElement(r),a.appendChild(this.__wrapTextLink(s,o))}fillText(t,e,i){this.__applyText(t,e,i,"fill")}strokeText(t,e,i){this.__applyText(t,e,i,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,i,r,s,a){if(r===s)return;r=r%(2*Math.PI),s=s%(2*Math.PI),r===s&&(s=(s+2*Math.PI-.001*(a?-1:1))%(2*Math.PI));const o=t+i*Math.cos(s),l=e+i*Math.sin(s),c=t+i*Math.cos(r),u=e+i*Math.sin(r),g=a?0:1;let p=0,d=s-r;d<0&&(d+=2*Math.PI),a?p=d>Math.PI?0:1:p=d>Math.PI?1:0,this.lineTo(c,u),this.__addPathCommand(ee("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:i,ry:i,xAxisRotation:0,largeArcFlag:p,sweepFlag:g,endX:o,endY:l})),this.__currentPosition={x:o,y:l}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),i=nr(this.__ids),r=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",i),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",ee("url(#{id})",{id:i})),t.appendChild(r),this.__currentElement=r}drawImage(...t){let e=t[0],i,r,s,a,o=0,l=0,c,u,g,p,d,y,x,C;if(t.length===3)i=t[1],r=t[2],c=e.width,u=e.height,s=c,a=u;else if(t.length===5)i=t[1],r=t[2],s=t[3],a=t[4],c=e.width,u=e.height;else if(t.length===9)o=t[1],l=t[2],c=t[3],u=t[4],i=t[5],r=t[6],s=t[7],a=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const A=this.__closestGroupOrSvg();this.__currentElement;const P="translate("+i+", "+r+")";if(e instanceof di){if(g=e.getSvg().cloneNode(!0),g.childNodes&&g.childNodes.length>1){for(p=g.childNodes[0];p.childNodes.length;)C=p.childNodes[0].getAttribute("id"),this.__ids[C]=C,this.__SVGdefs.appendChild(p.childNodes[0]);if(d=g.childNodes[1],d){const M=d.getAttribute("transform");let D;M?D=M+" "+P:D=P,d.setAttribute("transform",D),A.appendChild(d)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(y=this.__createElement("image"),y.setAttribute("width",s),y.setAttribute("height",a),y.setAttribute("preserveAspectRatio","none"),(o||l||c!==e.width||u!==e.height)&&(x=this.__document.createElement("canvas"),x.width=s,x.height=a,x.getContext("2d")?.drawImage(e,o,l,c,u,0,0,s,a),e=x),y.setAttribute("transform",P),y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),A.appendChild(y))}createPattern(t,e){const i=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=nr(this.__ids);let s;return i.setAttribute("id",r),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),i.appendChild(s),this.__SVGdefs.appendChild(i)):t instanceof di&&(i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(i)),new Qr(i,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}function gh(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ya={},ts={exports:{}},Za;function mh(){return Za||(Za=1,function(n){(function(t){var e="0.4.0",i="hasOwnProperty",r=/[\.\/]/,s="*",a=function(){},o=function(p,d){return p-d},l,c,u={n:{}},g=function(p,d){var y=c,x=Array.prototype.slice.call(arguments,2),C=g.listeners(p),A=0,P,M=[],D={},z=[];l=p,c=0;for(var N=0,F=C.length;N<F;N++)"zIndex"in C[N]&&(M.push(C[N].zIndex),C[N].zIndex<0&&(D[C[N].zIndex]=C[N]));for(M.sort(o);M[A]<0;)if(P=D[M[A++]],z.push(P.apply(d,x)),c)return c=y,z;for(N=0;N<F;N++)if(P=C[N],"zIndex"in P)if(P.zIndex==M[A]){if(z.push(P.apply(d,x)),c)return c=y,z;do if(A++,P=D[M[A]],P&&z.push(P.apply(d,x)),c)return c=y,z;while(P)}else D[P.zIndex]=P;else if(z.push(P.apply(d,x)),c)return c=y,z;return c=y,z.length?z:null};g.listeners=function(p){var d=p.split(r),y=u,x,C,A,P,M,D,z,N,F=[y],G=[];for(P=0,M=d.length;P<M;P++){for(N=[],D=0,z=F.length;D<z;D++)for(y=F[D].n,C=[y[d[P]],y[s]],A=2;A--;)x=C[A],x&&(N.push(x),G=G.concat(x.f||[]));F=N}return G},g.on=function(p,d){for(var y=p.split(r),x=u,C=0,A=y.length;C<A;C++)x=x.n,!x[y[C]]&&(x[y[C]]={n:{}}),x=x[y[C]];for(x.f=x.f||[],C=0,A=x.f.length;C<A;C++)if(x.f[C]==d)return a;return x.f.push(d),function(P){+P==+P&&(d.zIndex=+P)}},g.stop=function(){c=1},g.nt=function(p){return p?new RegExp("(?:\\.|\\/|^)"+p+"(?:\\.|\\/|$)").test(l):l},g.unbind=function(p,d){var y=p.split(r),x,C,A,P,M,D,z,N=[u];for(P=0,M=y.length;P<M;P++)for(D=0;D<N.length;D+=A.length-2){if(A=[D,1],x=N[D].n,y[P]!=s)x[y[P]]&&A.push(x[y[P]]);else for(C in x)x[i](C)&&A.push(x[C]);N.splice.apply(N,A)}for(P=0,M=N.length;P<M;P++)for(x=N[P];x.n;){if(d){if(x.f){for(D=0,z=x.f.length;D<z;D++)if(x.f[D]==d){x.f.splice(D,1);break}!x.f.length&&delete x.f}for(C in x.n)if(x.n[i](C)&&x.n[C].f){var F=x.n[C].f;for(D=0,z=F.length;D<z;D++)if(F[D]==d){F.splice(D,1);break}!F.length&&delete x.n[C].f}}else{delete x.f;for(C in x.n)x.n[i](C)&&x.n[C].f&&delete x.n[C].f}x=x.n}},g.once=function(p,d){var y=function(){d.apply(this,arguments),g.unbind(p,y)};return g.on(p,y)},g.version=e,g.toString=function(){return"You are running Eve "+e},n.exports?n.exports=g:t.eve=g})(yc)}(ts)),ts.exports}(function(n){if(typeof gh=="function")var t=mh();(function(){function e(p){var d=function(y){d.parse(y)};return d.mode="text",d.type=String(p||"html").toLowerCase(),d.textchunk="",d.raw="",d.parse=l,d.on=a,d.event=s,d.end=r,d}function i(p,d,y){p==`
|
|
18
|
-
`&&this.event("newline"),g[this.mode].call(this,p,d,y)}function r(){i.call(this,"eof"),this.event("eof")}function s(p,d,y){typeof t=="function"&&t("elemental."+p+"."+d,null,d,y||"",this.raw);for(var x=this.events&&this.events[p],C=x&&x.length;C--;)try{this.events[p][C](d,y||"",this.raw)}catch{}this.raw=""}function a(p,d){this.events=this.events||{},this.events[p]=this.events[p]||[],this.events[p].push(d)}function o(p,d){return p&&(p.charAt?p.charAt(d):p[d])}function l(p){p=p||Object(p);for(var d=1,y=p.length+1,x,C,A=o(p,0);d<y;d++)x=C,C=A,A=o(p,d),this.raw+=C,i.call(this,C,A,x);this._beforeEnd=function(){i.call(this,"","",C)}}var c=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/,u=function(){for(var p in this.attr)this.attr.hasOwnProperty(p)&&this.event("attr",p,{value:this.attr[p],tagname:this.tagname,attr:this.attr})},g={text:function(p,d,y){switch(p){case"<":case"eof":this.nodename="",this.attr={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event("text",this.textchunk),this.raw+=p,this.textchunk="";break;default:this.textchunk+=p}},special:function(p,d,y){if(y=="!"&&p=="-"&&d=="-")this.mode="comment start";else{if(this.textchunk=="[CDATA"&&p=="["){this.mode="cdata",this.textchunk="";return}if(p==">"||p=="eof"){this.event("special",this.textchunk),this.mode="text",this.textchunk="";return}this.textchunk+=p}},cdata:function(p,d,y){y=="]"&&p=="]"&&d==">"?(this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1)):(p=="eof"&&g["cdata end"].call(this),this.textchunk+=p)},"cdata end":function(p,d,y){this.event("cdata",this.textchunk),this.textchunk="",this.mode="text"},"comment start":function(p,d,y){d==">"||p=="eof"?(this.event("comment",""),this.mode="comment instant end"):this.mode="comment"},"comment instant end":function(p,d,y){this.mode="text"},comment:function(p,d,y){p=="-"&&y=="-"&&d==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):p=="eof"?this.event("comment",this.textchunk):this.textchunk+=p},"comment end":function(p,d,y){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},declaration:function(p,d,y){p=="?"&&d==">"?this.mode="declaration end":(p=="eof"&&this.event("comment",this.textchunk),this.textchunk+=p)},"declaration end":function(p,d,y){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},"tag name start":function(p,d,y){if(p=="eof")this.event("text","<");else if(!c.test(p)){if(this.mode="tag name",p=="/"){this.mode="close tag name start";return}if(p=="!"){this.mode="special",this.textchunk="";return}if(p=="?"){this.mode="declaration";return}g[this.mode].call(this,p,d,y)}},"close tag name start":function(p,d,y){c.test(p)||(this.mode="close tag name",this.tagname="",this.nodename="",g[this.mode].call(this,p,d,y))},"close tag name":function(p,d,y){if(c.test(p))this.tagname=this.nodename;else switch(p){case">":this.event("/tag",this.tagname||this.nodename),this.mode="text";break;default:!this.tagname&&(this.nodename+=p)}},"tag name":function(p,d,y){if(c.test(p))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(p){case">":this.event("tag",this.nodename),this.mode="text";break;default:this.nodename+=p}},"attr start":function(p,d,y){c.test(p)||(this.mode="attr",this.nodename="",g[this.mode].call(this,p,d,y))},attr:function(p,d,y){if(c.test(p)||p=="=")this.attr[this.nodename]="",this.mode="attr value start";else switch(p){case">":this.nodename=="/"?(delete this.attr["/"],this.event("tag",this.tagname,this.attr),u.call(this),this.event("/tag",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=""),this.event("tag",this.tagname,this.attr),u.call(this)),this.mode="text";break;default:this.nodename+=p}},"attr value start":function(p,d,y){if(!c.test(p)){if(this.mode="attr value",this.quote=!1,p=="'"||p=='"'){this.quote=p;return}g[this.mode].call(this,p,d,y)}},"attr value":function(p,d,y){if(c.test(p)&&!this.quote)this.mode="attr start";else if(p==">"&&!this.quote)this.event("tag",this.tagname,this.attr),this.mode="text";else switch(p){case'"':case"'":this.quote==p&&y!="\\"&&(this.mode="attr start");break;default:this.attr[this.nodename]+=p}}};e.version="0.2.1",n.elemental=e,n.eve=t})()})(Ya);const $a=Yi(Ya),qa=[1,0,0,1,0,0],Wa=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Jt{value;matrix3d;isEverTo3d=!1;_prev_translate_z=0;_prev_rotate=0;_prev_rotate_x=0;_prev_rotate_y=0;_prev_rotate_z=0;_prev_scale_z=1;constructor(t=qa){this.value=Array.from(t),this.matrix3d=this.toMatrix3D()}unit(){return this.value=Array.from(qa),this.matrix3d=this.toMatrix3D(),this}transformPoint(t,e,i=0,r=0){const s=t-i,a=e-r;return t=s*this.value[0]+a*this.value[2]+this.value[4],e=s*this.value[1]+a*this.value[3]+this.value[5],[t+i,e+r]}fromString(t){const e=sa("number",t);return e.length===6?e.forEach((i,r)=>{i.fullMatch&&(this.value[r]=parseFloat(i.fullMatch))}):this.unit(),this}toMatrix3D(t=this.matrix3d){const e=[this.value[0],this.value[1],0,0,this.value[2],this.value[3],0,0,0,0,1,0,this.value[4],this.value[5],0,1];return t?(t.value=e,t):new wn(e)}offset(t=0,e=0){return[t-this.value[4],e-this.value[5]]}clone(){return new Jt(this.value)}multiply(t){const e=this.value;let i;t instanceof Jt?i=t.value:i=t;const r=e[0]*i[0]+e[2]*i[1],s=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],l=e[0]*i[4]+e[2]*i[5]+e[4],c=e[1]*i[4]+e[3]*i[5]+e[5];return e[0]=r,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=c,this}inverse(){const t=new Jt(this.value),e=t.value,i=1/(e[0]*e[3]-e[1]*e[2]),r=e[3]*i,s=-e[1]*i,a=-e[2]*i,o=e[0]*i,l=i*(e[2]*e[5]-e[3]*e[4]),c=i*(e[1]*e[4]-e[0]*e[5]);return e[0]=r,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=c,t}translate(t,e){return this.matrix3d.translate(t,e,0),this.multiply([1,0,0,1,t,e])}translateTo(t,e){const i=this.offset(t,e);return this.translate(i[0],i[1])}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.value[5])}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.value[4],t)}translateZ(t){return this.isEverTo3d=!0,this.matrix3d.translate(0,0,t)}translateZTo(t){return this.translateZ(t-this._prev_translate_z),this._prev_translate_z=t,this}translate3d(t,e,i){return this.isEverTo3d=!0,this.matrix3d.translate(t,e,i)}translate3dTo(t,e,i){return this.translate3d(t-this.matrix3d.value[12],t-this.matrix3d.value[13],i-this._prev_translate_z),this._prev_translate_z=i,this}rotate(t,e=0,i=0){const r=Qi(t),s=+Math.cos(r).toFixed(9),a=+Math.sin(r).toFixed(9);return this.multiply([s,a,-a,s,e,i]),this.translate(-e,-i),this}rotateTo(t,e=0,i=0){return this.rotate(t-this._prev_rotate,e,i),this._prev_rotate=t,this}rotateX(t){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t)}rotateXTo(t){return this.rotateX(t-this._prev_rotate_x),this._prev_rotate_x=t,this}rotateY(t){return this.isEverTo3d=!0,this.matrix3d.rotate("y",t)}rotateYTo(t){return this.rotateY(t-this._prev_rotate_y),this._prev_rotate_y=t,this}rotateZ(t){return this.isEverTo3d=!0,this.matrix3d.rotate("z",t)}rotateZTo(t){return this.rotateZ(t-this._prev_rotate_z),this._prev_rotate_z=t,this}rotate3d(t,e,i){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t).rotate("y",e).rotate("z",i)}rotate3dTo(t,e,i){return this.rotate3d(t-this._prev_rotate_x,e-this._prev_rotate_y,i-this._prev_rotate_z),this._prev_rotate_x=t,this._prev_rotate_y=e,this._prev_rotate_z=i,this}scale(t,e=t,i=0,r=0){return this.matrix3d.scale(t,e,1),this.translate(i,r),this.multiply([t,0,0,e,0,0]),this.translate(-i,-r),this}scaleTo(t,e=t,i=0,r=0){return this.scale(t/this.value[0],e/this.value[3],i,r),this}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.value[0],1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.value[3])}scaleZ(t){return this.isEverTo3d=!0,this.matrix3d.scale(1,1,t)}scaleZTo(t){return this.scaleZ(t/this._prev_scale_z),this._prev_scale_z=t,this}scale3d(t,e,i){return this.isEverTo3d=!0,this.matrix3d.scale(t,e,i)}scale3dTo(t,e,i){return this.scale3d(t/this.matrix3d.value[0],e/this.matrix3d.value[5],i/this._prev_scale_z),this._prev_scale_z=i,this}skew(t,e=t){const i=t*Math.PI/180,r=e*Math.PI/180,s=Math.tan(i),a=Math.tan(r);return this.multiply([1,a,s,1,0,0])}skewTo(t,e=t){return this.skew(t-this.value[2],e-this.value[1])}skewX(t){return this.skew(t,this.value[1])}skewXTo(t){return this.skewTo(t,this.value[1])}skewY(t){return this.skew(this.value[2],t)}skewYTo(t){return this.skewTo(this.value[2],t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,i){return this}skew3dTo(t,e,i){return this}split(){const t={dx:0,dy:0,scalex:1,scaley:1,shear:1,rotate:0,isSimple:!0,isSuperSimple:!0,noRotation:!1};t.dx=this.value[4],t.dy=this.value[5];const e=[[this.value[0],this.value[2]],[this.value[1],this.value[3]]];t.scalex=tr(e[0][0],e[0][1]);let i=Kr(e[0][0],e[0][1]);e[0][0]=i.x,e[0][1]=i.y,t.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*t.shear,e[1][1]-e[0][1]*t.shear],t.scaley=tr(e[1][0],e[1][1]),i=Kr(e[1][0],e[1][1]),e[1][0]=i.x,e[1][1]=i.y,t.shear/=t.scaley;const r=-e[0][1],s=e[1][1];return s<0?(t.rotate=qr(Math.acos(s)),r<0&&(t.rotate=360-t.rotate)):t.rotate=Qi(Math.asin(r)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t}toTransformString(){const t=this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx&&t.dy?"t"+[t.dx,t.dy]:"")+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:"")+(t.rotate?"r"+[t.rotate,0,0]:"")):"matrix"+[this.value[0],this.value[1],this.value[2],this.value[3],this.value[4],this.value[5]]}toString(){return this.isEverTo3d?this.toMatrix3DString():`matrix(${this.value.map(t=>ua(t,6)).join(",")})`}toMatrix3DString(){return this.matrix3d.toString()}toFilter(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.value[0]+", M12="+this.value[2]+", M21="+this.value[1]+", M22="+this.value[3]+", Dx="+this.value[4]+", Dy="+this.value[5]+", sizingmethod='auto expand')"}}class wn{value;constructor(t=Wa){this.value=Array.from(t)}unit(){return this.value=Array.from(Wa),this}fromString(t){const e=sa("number",t);return e.length===16?e.forEach((i,r)=>{i.fullMatch&&(this.value[r]=parseFloat(i.fullMatch))}):this.unit(),this}toMatrix(t){const e=[this.value[0],this.value[1],this.value[4],this.value[5],this.value[12],this.value[13]];return t?(t.value=e,t):new Jt(e)}multiplyMatrix(t){const e=this.value[0],i=this.value[1],r=this.value[2],s=this.value[3],a=this.value[4],o=this.value[5],l=this.value[6],c=this.value[7],u=this.value[8],g=this.value[9],p=this.value[10],d=this.value[11],y=this.value[12],x=this.value[13],C=this.value[14],A=this.value[15],P=t.value[0],M=t.value[1],D=t.value[2],z=t.value[3],N=P*e+M*a+D*u+z*y,F=P*i+M*o+D*g+z*x,G=P*r+M*l+D*p+z*C,H=P*s+M*c+D*d+z*A;return new Jt([N,F,G,H,0,0])}multiply(t){const e=new Jt([t.value[0],t.value[1],t.value[2],t.value[3],0,0]),i=new Jt([t.value[4],t.value[5],t.value[6],t.value[7],0,0]),r=new Jt([t.value[8],t.value[9],t.value[10],t.value[11],0,0]),s=new Jt([t.value[12],t.value[13],t.value[14],t.value[15],0,0]),a=this.multiplyMatrix(e),o=this.multiplyMatrix(i),l=this.multiplyMatrix(r),c=this.multiplyMatrix(s);return this.value[0]=a.value[0],this.value[1]=a.value[1],this.value[2]=a.value[2],this.value[3]=a.value[3],this.value[4]=o.value[0],this.value[5]=o.value[1],this.value[6]=o.value[2],this.value[7]=o.value[3],this.value[8]=l.value[0],this.value[9]=l.value[1],this.value[10]=l.value[2],this.value[11]=l.value[3],this.value[12]=c.value[0],this.value[13]=c.value[1],this.value[14]=c.value[2],this.value[15]=c.value[3],this}translate(t=0,e=0,i=0){return this.multiply(new wn([1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1]))}scale(t=1,e=1,i=1){return this.multiply(new wn([t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1]))}rotate(t,e){const i=Qi(e),r=Math.sin,s=Math.cos;let a;switch(t){case"x":a=[1,0,0,0,0,s(i),r(i),0,0,-r(i),s(i),0,0,0,0,1];break;case"y":a=[s(i),0,-r(i),0,0,1,0,0,r(i),0,s(i),0,0,0,0,1];break;case"z":a=[s(i),r(i),0,0,-r(i),s(i),0,0,0,0,1,0,0,0,0,1];break}return this.multiply(new wn(a))}toString(){return`matrix3d(${this.value.map(t=>ua(t,6)).join(",")})`}}function Nn(n){const t=new Jt;return n.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,i,r){r.indexOf(",")>=0?r=r.split(/\s*,\s*/):r=r.split(/\s+/);const s=[];for(let a=0,o=r.length;a<o;a++)r[a].trim()&&s.push(parseFloat(""+r[a]));switch(i.toLowerCase()){case"t":case"translate":t.translate(s[0],s[1]);break;case"translatex":t.translateX(s[0]);break;case"translatey":t.translateY(s[0]);break;case"translatez":t.translateZ(s[0]);break;case"translate3d":t.translate3d(s[0],s[1],s[2]);break;case"r":case"rotate":t.rotate(s[0],s[1]??0,s[2]??0);break;case"rotatex":t.rotateX(s[0]);break;case"rotatey":t.rotateY(s[0]);break;case"rotatez":t.rotateZ(s[0]);break;case"rotate3d":t.rotate3d(s[0],s[1],s[2]);break;case"s":case"scale":t.scale(s[0],s[1]??s[0]);break;case"scalex":t.scaleX(s[0]);break;case"scaley":t.scaleY(s[0]);break;case"scalez":t.scaleZ(s[0]);break;case"scale3d":t.scale3d(s[0],s[1],s[2]);break;case"skew":t.skew(s[0],s[1]??0);break;case"skewx":t.skewX(s[0]);break;case"skewy":t.skewY(s[0]);break;case"skewz":t.skewZ(s[0]);break;case"skew3d":t.skew3d(s[0],s[1],s[2]);break;case"m":case"matrix":t.multiply([s[0],s[1],s[2],s[3],s[4],s[5]]);break;case"matrix3d":t.matrix3d.multiply(new wn(s));break}return""}),t}function es(n,t,e,i,r,s){if(typeof r>"u"||typeof s>"u"){const a=n-e,o=t-i;return!a&&!o?0:(180+Math.atan2(-o,-a)*180/Math.PI+360)%360}else return es(n,t,r,s)-es(e,i,r,s)}const Et=$a.eve,vh=$a.elemental,rr={cursor:1,cx:0,cy:0,fill:1,"fill-opacity":0,font:1,"font-family":1,"font-size":0,"font-style":1,"font-weight":1,height:0,"letter-spacing":0,opacity:0,r:0,rx:0,ry:0,src:1,stroke:1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":1,width:0,x:0,y:0};function ns(n,t,e){for(var i=(n+"").split(";"),r=/^\s+|\s+$/g,s,a=0,o=i.length;a<o;a++){var l=i[a].split(":");s=l[0].replace(r,"").replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()}),(!e||s in e)&&(t[s]=l[1].replace(r,""),e&&!e[s]&&(t[s]=parseFloat(t[s])))}}function Ja(n){const t=vh(),e=[],i=[],r={};let s,a,o;const l={};function c(u,g){return function(p,d){const y={type:g||u};e.push(y);for(let x in d)Object.prototype.hasOwnProperty.call(d,x)&&Et("rappar."+u+".attr."+x,y,d[x],x);Et("rappar."+u+".attrend",y,d)}}return Et.on("rappar.polygon.attr.points",function(u){this.path="M"+u+"z",Et.stop()}),Et.on("rappar.image.attr.xlink:href",function(u){this.src=u,Et.stop()}),Et.on("rappar.path.attr.d",function(u){this.path=u,Et.stop()}),Et.on("rappar.*.attr.transform",function(u){this.transform=Nn(u).toTransformString(),Et.stop()}),Et.on("rappar.*.attr.fill",function(u){var g=u.match(/url\(#([^)]+)\)/),p=this;g&&(g=g[1],r[g]?this.fill=r[g]:Et.on("rappar.found."+g,function(d){p.fill=d}),Et.stop())}),Et.on("rappar.line.attrend",function(u){this.path="M"+[u.x1,u.y1,u.x2,u.y2]}),Et.on("rappar.*.attrend",function(){for(var u=i.length;u--;)if(i[u]!=this){let p="",d="";for(var g in i[u])g=="transform"?p=i[u].transform:g=="class"&&l["."+i[u][g]]?d=l["."+i[u][g]].join(";")+";"+d:g=="id"&&l["#"+i[u][g]]?d=l["#"+i[u][g]].join(";")+";"+d:typeof this[g]>"u"&&(this[g]=i[u][g]);this.type&&(typeof this.transform>"u"?this.transform=p:this.transform+=p,typeof this.style>"u"?this.style=d:this.style=d+this.style,ns(this.style,this,rr))}}),Et.on("rappar.*.attr.style",function(u){var g=function(){ns(u,this,rr),Et.unbind("rappar.*.attrend",g)};Et.on("rappar.*.attrend",g),Et.stop()}),Et.on("rappar.*.attr.*",function(u,g){g in rr&&(this[g]=rr[g]?u:parseFloat(u))}),Et.on("elemental.tag.circle",c("circle")),Et.on("elemental.tag.ellipse",c("ellipse")),Et.on("elemental.tag.polygon",c("polygon","path")),Et.on("elemental.tag.path",c("path")),Et.on("elemental.tag.line",c("line","path")),Et.on("elemental.tag.rect",c("rect")),Et.on("elemental.tag.image",c("image")),Et.on("elemental.tag.text",c("text")),Et.on("elemental.text",function(u){try{const g=Ac(u);for(let p of g.stylesheet.rules){for(let d of p.selectors)l[d]=[];for(let d of p.declarations)for(let y of p.selectors)l[y].push(`${d.property}:${d.value}`)}}catch{}}),Et.on("elemental.tag.svg",function(u,g){let p=g.width||0,d=g.height||0;if(!p||!d){const y=g.viewBox.split(/\s+/gi);p=parseFloat(y[2])-parseFloat(y[0]),d=parseFloat(y[3])-parseFloat(y[1])}e.push({type:"viewbox",width:p,height:d})}),Et.on("rappar.text.attrend",function(){s="",a=this,this["text-anchor"]=this["text-anchor"]||"start"}),Et.on("elemental.text",function(u,g,p){a&&(s+=p)}),Et.on("elemental./tag.text",function(){a.text=s,a=null}),Et.on("elemental.tag.g",function(u,g){var p={};i.push(p);for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&(p[d]=g[d],Et("rappar.g.attr."+d,p,g[d],d));Et("rappar.g.attrend",p)}),Et.on("elemental./tag.g",function(u,g){i.pop()}),Et.on("elemental.tag.linearGradient",function(u,g){o={id:g.id,angle:+(360+es(g.x1,g.y1,g.x2,g.y2,g.x1+100,g.y1)).toFixed(2),stops:[]}}),Et.on("elemental./tag.linearGradient",function(){for(var u=[o.angle],g,p=0,d=o.stops.length;p<d;p++)g=o.stops[p],p&&p!=d-1?u.push(g.color+":"+g.offset):u.push(g.color);r[o.id]=u.join("-"),Et("rappar.found."+o.id,null,r[o.id])}),Et.on("elemental.tag.radialGradient",function(u,g){o={id:g.id,stops:[]}}),Et.on("elemental./tag.radialGradient",function(){for(var u=[],g,p=0,d=o.stops.length;p<d;p++)g=o.stops[p],p&&p!=d-1?u.push(g.color+":"+g.offset):u.push(g.color);r[o.id]="r"+u.join("-"),Et("rappar.found."+o.id,null,r[o.id])}),Et.on("elemental.tag.stop",function(u,g){var p={};g.style&&ns(g.style,p),p.offset=p.offset||g.offset,p.color=p["stop-color"]||g["stop-color"],p.opacity=p["stop-opacity"]||g["stop-opacity"],~(p.offset+"").indexOf("%")?p.offset=parseFloat(p.offset):p.offset=parseFloat(p.offset)*100,p.offset=+p.offset.toFixed(2),o.stops.push(p)}),t(n),t.end(),e}function Ka(n){return typeof n!="string"?!1:(n=n.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(n)&&/[\dz]$/i.test(n)&&n.length>4)}const is={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},_h=/([astvzqmhlc])([^astvzqmhlc]*)/gi,wh=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function yh(n){const t=n.match(wh);return t?t.map(Number):[]}function sr(n){const t=[];return n.replace(_h,function(e,i,r){let s=i.toLowerCase();for(r=yh(r),s=="m"&&r.length>2&&(t.push([i].concat(r.splice(0,2))),s="l",i=i=="m"?"l":"L");;){if(r.length==is[s])return r.unshift(i),t.push(r);if(r.length<is[s])throw new Error("malformed path data");t.push([i].concat(r.splice(0,is[s])))}}),t}function ar(n){var t=0,e=0,i=0,r=0;return n.map(function(s){s=s.slice();var a=s[0],o=a.toUpperCase();if(a!=o)switch(s[0]=o,a){case"a":s[6]+=i,s[7]+=r;break;case"v":s[1]+=r;break;case"h":s[1]+=i;break;default:for(var l=1;l<s.length;)s[l++]+=i,s[l++]+=r}switch(o){case"Z":i=t,r=e;break;case"H":i=s[1];break;case"V":r=s[1];break;case"M":i=t=s[1],r=e=s[2];break;default:i=s[s.length-2],r=s[s.length-1]}return s})}function xh(n){var t=0,e=0,i=0,r=0;return n.map(function(s){s=s.slice();var a=s[0],o=a.toLowerCase();if(a!=o)switch(s[0]=o,a){case"A":s[6]-=i,s[7]-=r;break;case"V":s[1]-=r;break;case"H":s[1]-=i;break;default:for(var l=1;l<s.length;)s[l++]-=i,s[l++]-=r}switch(o){case"z":i=t,r=e;break;case"h":i+=s[1];break;case"v":r+=s[1];break;case"m":i+=s[1],r+=s[2],t+=s[1],e+=s[2];break;default:i+=s[s.length-2],r+=s[s.length-1]}return s})}const pi=Math.PI*2;function Qa(n,t,e,i){const r=n*i-t*e<0?-1:1;let s=n*e+t*i;return s>1&&(s=1),s<-1&&(s=-1),r*Math.acos(s)}function bh(n,t,e,i,r,s,a,o,l,c){const u=c*(n-e)/2+l*(t-i)/2,g=-l*(n-e)/2+c*(t-i)/2,p=a*a,d=o*o,y=u*u,x=g*g;let C=p*d-p*x-d*y;C<0&&(C=0),C/=p*x+d*y,C=Math.sqrt(C)*(r===s?-1:1);const A=C*a/o*g,P=C*-o/a*u,M=c*A-l*P+(n+e)/2,D=l*A+c*P+(t+i)/2,z=(u-A)/a,N=(g-P)/o,F=(-u-A)/a,G=(-g-P)/o,H=Qa(1,0,z,N);let Z=Qa(z,N,F,G);return s===0&&Z>0&&(Z-=pi),s===1&&Z<0&&(Z+=pi),[M,D,H,Z]}function Th(n,t){const e=1.3333333333333333*Math.tan(t/4),i=Math.cos(n),r=Math.sin(n),s=Math.cos(n+t),a=Math.sin(n+t);return[i,r,i-r*e,r+i*e,s+a*e,a-s*e,s,a]}function Ch(n,t,e,i,r,s,a,o,l){const c=Math.sin(l*pi/360),u=Math.cos(l*pi/360),g=u*(n-e)/2+c*(t-i)/2,p=-c*(n-e)/2+u*(t-i)/2;if(g===0&&p===0)return[];if(a===0||o===0)return[];a=Math.abs(a),o=Math.abs(o);const d=g*g/(a*a)+p*p/(o*o);d>1&&(a*=Math.sqrt(d),o*=Math.sqrt(d));const y=bh(n,t,e,i,r,s,a,o,c,u),x=[];let C=y[2],A=y[3];const P=Math.max(Math.ceil(Math.abs(A)/(pi/4)),1);A/=P;for(let M=0;M<P;M++)x.push(Th(C,A)),C+=A;return x.map(M=>{for(let D=0;D<M.length;D+=2){let z=M[D+0],N=M[D+1];z*=a,N*=o;const F=u*z-c*N,G=c*z+u*N;M[D+0]=F+y[0],M[D+1]=G+y[1]}return M})}function or(n){for(var t,e=[],i=0,r=0,s=0,a=0,o=null,l=null,c=0,u=0,g=0,p=n.length;g<p;g++){var d=n[g],y=d[0];switch(y){case"M":s=d[1],a=d[2];break;case"A":var x=Ch(c,u,d[6],d[7],d[4],d[5],d[1],d[2],d[3]);if(!x.length)continue;x=x.map(D=>{const[z,N,F,G,H,Z,X,J]=D;return{x1:F,y1:G,x2:H,y2:Z,x:X,y:J}});for(var C=0,A;C<x.length;C++)A=x[C],d=["C",A.x1,A.y1,A.x2,A.y2,A.x,A.y],C<x.length-1&&e.push(d);break;case"S":var P=c,M=u;(t=="C"||t=="S")&&(P+=P-i,M+=M-r),d=["C",P,M,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(o=c*2-o,l=u*2-l):(o=c,l=u),d=to(c,u,o,l,d[1],d[2]);break;case"Q":o=d[1],l=d[2],d=to(c,u,d[1],d[2],d[3],d[4]);break;case"L":d=lr(c,u,d[1],d[2]);break;case"H":d=lr(c,u,d[1],u);break;case"V":d=lr(c,u,c,d[1]);break;case"Z":d=lr(c,u,s,a);break}t=y,c=d[d.length-2],u=d[d.length-1],d.length>4?(i=d[d.length-4],r=d[d.length-3]):(i=c,r=u),e.push(d)}return e}function lr(n,t,e,i){return["C",n,t,e,i,e,i]}function to(n,t,e,i,r,s){return["C",n/3+.6666666666666666*e,t/3+.6666666666666666*i,r/3+.6666666666666666*e,s/3+.6666666666666666*i,r,s]}const Eh=n=>Array.isArray(n);function Bn(n){if(!(this instanceof Bn))return new Bn(n);this._path=Eh(n)?n:sr(n),this._path=ar(this._path),this._path=Sh(this._path),this._path=kh(this._path)}Bn.prototype.at=function(n,t){return this._walk(n,t).pos},Bn.prototype.length=function(){return this._walk(null).length},Bn.prototype._walk=function(n,t){let e=[0,0],i=[0,0,0],r=[0,0],s=0;for(let u=0;u<this._path.length;u++){let g=this._path[u];if(g[0]==="M"){if(e[0]=g[1],e[1]=g[2],n===0)return{length:s,pos:e}}else if(g[0]==="C"){i[0]=r[0]=e[0],i[1]=r[1]=e[1],i[2]=s;let p=100;for(let d=0;d<=p;d++){let y=d/p,x=a(g,y),C=o(g,y);if(s+=rs(e[0],e[1],x,C),e[0]=x,e[1]=C,typeof n=="number"&&s>=n){let A=(s-n)/(s-i[2]),P=[e[0]*(1-A)+i[0]*A,e[1]*(1-A)+i[1]*A];return{length:s,pos:P}}i[0]=e[0],i[1]=e[1],i[2]=s}}else if(g[0]==="Q"){i[0]=r[0]=e[0],i[1]=r[1]=e[1],i[2]=s;let p=100;for(let d=0;d<=p;d++){let y=d/p,x=l(g,y),C=c(g,y);if(s+=rs(e[0],e[1],x,C),e[0]=x,e[1]=C,typeof n=="number"&&s>=n){let A=(s-n)/(s-i[2]),P=[e[0]*(1-A)+i[0]*A,e[1]*(1-A)+i[1]*A];return{length:s,pos:P}}i[0]=e[0],i[1]=e[1],i[2]=s}}else if(g[0]==="L"){if(i[0]=e[0],i[1]=e[1],i[2]=s,s+=rs(e[0],e[1],g[1],g[2]),e[0]=g[1],e[1]=g[2],typeof n=="number"&&s>=n){let p=(s-n)/(s-i[2]),d=[e[0]*(1-p)+i[0]*p,e[1]*(1-p)+i[1]*p];return{length:s,pos:d}}i[0]=e[0],i[1]=e[1],i[2]=s}}return{length:s,pos:e};function a(u,g){return Math.pow(1-g,3)*r[0]+3*Math.pow(1-g,2)*g*u[1]+3*(1-g)*Math.pow(g,2)*u[3]+Math.pow(g,3)*u[5]}function o(u,g){return Math.pow(1-g,3)*r[1]+3*Math.pow(1-g,2)*g*u[2]+3*(1-g)*Math.pow(g,2)*u[4]+Math.pow(g,3)*u[6]}function l(u,g){return Math.pow(1-g,2)*r[0]+2*(1-g)*g*u[1]+Math.pow(g,2)*u[3]}function c(u,g){return Math.pow(1-g,2)*r[1]+2*(1-g)*g*u[2]+Math.pow(g,2)*u[4]}};function rs(n,t,e,i){let r=n-e,s=t-i;return Math.sqrt(r*r+s*s)}function kh(n){let t,e=0,i=0,r={S:{to:"C",x:3},T:{to:"Q",x:1}};for(let s=0,a=n.length;s<a;s++){let o=n[s],l=r[o[0]];l&&(o[0]=l.to,t&&(t[0]===l.to?(e=2*t[l.x+2]-t[l.x],i=2*t[l.x+3]-t[l.x+1]):(e=t[t.length-2],i=t[t.length-1])),o.splice(1,0,e,i)),t=o}return n}function Sh(n){let t=[],e=["L",0,0],i;for(let r=0,s=n.length;r<s;r++){let a=n[r];switch(a[0]){case"M":e=["L",a[1],a[2]],t.push(a);break;case"Z":t.push(e);break;case"H":i=t[t.length-1]||["L",0,0],t.push(["L",a[1],i[i.length-1]]);break;case"V":i=t[t.length-1]||["L",0,0],t.push(["L",i[i.length-2],a[1]]);break;default:t.push(a)}}return t}const ss=n=>{if(typeof n=="function"||Object(n)!==n)return n;const t=new n.constructor;for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=ss(n[e]));return t};function as(n){const t=as.ps=as.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(()=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==n&&(t[e].sleep--,t[e].sleep||delete t[e])}),t[n]}function gi(n,t,e,i){return n==null&&(n=t=e=i=0),t==null&&(t=n.y,e=n.width,i=n.height,n=n.x),{x:n,y:t,width:e,w:e,height:i,h:i,x2:n+e,y2:t+i,cx:n+e/2,cy:t+i/2,r1:Math.min(e,i)/2,r2:Math.max(e,i)/2,r0:Math.sqrt(e*e+i*i)/2,path:Rh(n,t,e,i),vb:[n,t,e,i].join(" ")}}function eo(n,t,e,i,r,s,a,o,l){const c=1-l,u=c**3,g=c**2,p=l*l,d=p*l,y=u*n+g*3*l*e+c*3*l*l*r+d*a,x=u*t+g*3*l*i+c*3*l*l*s+d*o,C=n+2*l*(e-n)+p*(r-2*e+n),A=t+2*l*(i-t)+p*(s-2*i+t),P=e+2*l*(r-e)+p*(a-2*r+e),M=i+2*l*(s-i)+p*(o-2*s+i),D=c*n+l*e,z=c*t+l*i,N=c*r+l*a,F=c*s+l*o,G=90-Math.atan2(C-P,A-M)*180/Math.PI;return{x:y,y:x,m:{x:C,y:A},n:{x:P,y:M},start:{x:D,y:z},end:{x:N,y:F},alpha:G}}function no(n,t,e,i,r,s,a,o){Array.isArray(n)||(n=[n,t,e,i,r,s,a,o]);const l=so(...n);return gi(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)}function Ah(n,t,e){return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height}function Ph(n,t){n=gi(n),t=gi(t);const{x:e,y:i,width:r,height:s}=n,{x:a,y:o,width:l,height:c}=t,u=e+r/2,g=i+s/2,p=a+l/2,d=o+c/2;return Math.abs(u-p)<=(r+l)/2||Math.abs(g-d)<=(s+c)/2}function io(n,t,e,i,r){const s=-3*t+9*e-9*i+3*r,a=n*s+6*t-12*e+6*i;return n*a-3*t+3*e}function ro(n,t,e,i,r,s,a,o,l){l==null&&(l=1),l=Math.max(0,Math.min(l,1));const c=l/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let d=0;for(let y=0;y<u;y++){const x=c*g[y]+c,C=io(x,n,e,r,a),A=io(x,t,i,s,o),P=C*C+A*A;d+=p[y]*Math.sqrt(P)}return c*d}function Ih(n,t,e,i,r,s,a,o){if(Math.max(n,e)<Math.min(r,a)||Math.min(n,e)>Math.max(r,a)||Math.max(t,i)<Math.min(s,o)||Math.min(t,i)>Math.max(s,o))return;const l=(n*i-t*e)*(r-a)-(n-e)*(r*o-s*a),c=(n*i-t*e)*(s-o)-(t-i)*(r*o-s*a),u=(n-e)*(s-o)-(t-i)*(r-a);if(!u)return;const g=l/u,p=c/u,d=Number(g.toFixed(2)),y=Number(p.toFixed(2));if(!(d<Number(Math.min(n,e).toFixed(2))||d>Number(Math.max(n,e).toFixed(2))||d<Number(Math.min(r,a).toFixed(2))||d>Number(Math.max(r,a).toFixed(2))||y<Number(Math.min(t,i).toFixed(2))||y>Number(Math.max(t,i).toFixed(2))||y<Number(Math.min(s,o).toFixed(2))||y>Number(Math.max(s,o).toFixed(2))))return{x:g,y:p}}function Mh(n,t,e){const i=no(n),r=no(t);if(!Ph(i,r))return e?0:[];const s=ro.apply(0,n),a=ro.apply(0,t),o=Math.ceil(s/8),l=Math.ceil(a/8),c=[],u=[],g={};let p=e?0:[];for(let d=0;d<o+1;d++){const y=eo.apply(0,n.concat(d/o));c.push({x:y.x,y:y.y,t:d/o})}for(let d=0;d<l+1;d++){const y=eo.apply(0,t.concat(d/l));u.push({x:y.x,y:y.y,t:d/l})}for(let d=0;d<o;d++)for(let y=0;y<l;y++){const x=c[d],C=c[d+1],A=u[y],P=u[y+1],M=Math.abs(C.x-x.x)<.001?"y":"x",D=Math.abs(P.x-A.x)<.001?"y":"x",z=Ih(x.x,x.y,C.x,C.y,A.x,A.y,P.x,P.y);if(z&&g[z.x.toFixed(4)]!==z.y.toFixed(4)){g[z.x.toFixed(4)]=z.y.toFixed(4);const N=x.t+Math.abs((z[M]-x[M])/(C[M]-x[M]))*(C.t-x.t),F=A.t+Math.abs((z[D]-A[D])/(P[D]-A[D]))*(P.t-A.t);N>=0&&N<=1&&F>=0&&F<=1&&(e?p++:p.push({x:z.x,y:z.y,t1:N,t2:F}))}}return p}function Lh(n,t,e){let i,r,s,a,o,l,c,u,g,p,d=e?0:[];for(let y=0,x=n.length;y<x;y++){const C=n[y];if(C[0]==="M")i=o=C[1],r=l=C[2];else{C[0]==="C"?(g=[i,r].concat(C.slice(1)),i=g[6],r=g[7]):(g=[i,r,i,r,o,l,o,l],i=o,r=l);for(let A=0,P=t.length;A<P;A++){const M=t[A];if(M[0]==="M")s=c=M[1],a=u=M[2];else{M[0]==="C"?(p=[s,a].concat(M.slice(1)),s=p[6],a=p[7]):(p=[s,a,s,a,c,u,c,u],s=c,a=u);const D=Mh(g,p,e);if(e)d+=D;else{for(let z=0,N=D.length;z<N;z++)D[z].segment1=y,D[z].segment2=A,D[z].bez1=g,D[z].bez2=p;d=d.concat(D)}}}}}return d}function Dh(n){const t=as(n);if(t.bbox)return ss(t.bbox);if(!n)return gi();let e=0,i=0,r=[],s=[],a=[];for(let p=0,d=n.length;p<d;p++)if(a=n[p],a[0]==="M")e=a[1],i=a[2],r.push(e),s.push(i);else{const y=so(e,i,a[1],a[2],a[3],a[4],a[5],a[6]);r=r.concat(y.min.x,y.max.x),s=s.concat(y.min.y,y.max.y),e=a[5],i=a[6]}const o=Math.min.apply(0,r),l=Math.min.apply(0,s),c=Math.max.apply(0,r),u=Math.max.apply(0,s),g=gi(o,l,c-o,u-l);return t.bbox=ss(g),g}function Rh(n,t,e,i,r){return r?[["M",Number(n)+Number(r),t],["l",e-r*2,0],["a",r,r,0,0,1,r,r],["l",0,i-r*2],["a",r,r,0,0,1,-r,r],["l",r*2-e,0],["a",r,r,0,0,1,-r,-r],["l",0,r*2-i],["a",r,r,0,0,1,r,-r],["z"]]:[["M",n,t],["l",e,0],["l",0,i],["l",-e,0],["z"]]}function so(n,t,e,i,r,s,a,o){const l=[],c=[[],[]];let u,g,p,d,y,x,C,A;for(let z=0;z<2;++z){if(z===0?(g=6*n-12*e+6*r,u=-3*n+9*e-9*r+3*a,p=3*e-3*n):(g=6*t-12*i+6*s,u=-3*t+9*i-9*s+3*o,p=3*i-3*t),Math.abs(u)<1e-12){if(Math.abs(g)<1e-12)continue;d=-p/g,d>0&&d<1&&l.push(d);continue}C=g*g-4*p*u,A=Math.sqrt(C),!(C<0)&&(y=(-g+A)/(2*u),y>0&&y<1&&l.push(y),x=(-g-A)/(2*u),x>0&&x<1&&l.push(x))}let P=l.length,M;const D=P;for(;P--;)d=l[P],M=1-d,c[0][P]=M*M*M*n+3*M*M*d*e+3*M*d*d*r+d*d*d*a,c[1][P]=M*M*M*t+3*M*M*d*i+3*M*d*d*s+d*d*d*o;return c[0][D]=n,c[1][D]=t,c[0][D+1]=a,c[1][D+1]=o,c[0].length=c[1].length=D+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}function Oh(n,t,e){const i=Dh(n);return!(!Ah(i,t,e)||Lh(n,or([["M",t,e],["H",i.x2+10]]),1)%2!==1)}const os=new Map;function ao(n){if(os.has(n))return os.get(n);const t=Bn(n);return os.set(n,t),t}function oo(n){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",n),t}function lo(n,t){return Xi?oo(n).getTotalLength(t):ao(n).length()}function co(n,t){if(Xi)return oo(n).getPointAtLength(t);{const e=ao(n),[i,r]=e.at(t);return{x:i,y:r}}}let ge=null;function ho(n,t,e){if(Xi){ge||(ge=document.createElement("canvas").getContext("2d"));const i=new Path2D(n);return ge.isPointInPath(i,t,e)}else return Oh(n,t,e)}function fo(n,t,e,{lineWidth:i=1,lineCap:r="butt",lineJoin:s="miter"}){if(Xi){if(ge||(ge=document.createElement("canvas").getContext("2d")),ge.isPointInStroke){ge.save(),ge.lineWidth=i,ge.lineCap=r,ge.lineJoin=s;const a=new Path2D(n),o=ge.isPointInStroke(a,t,e);return ge.restore(),o}}else return null}class ls{point;constructor(t){this.point=new Te(t)}static fromSVGPathData(t){if(t.length<3)throw new Error("Line 参数个数错误");if(t[0].toUpperCase()!=="L")throw new Error("Line command 错误");return new ls({x:t[1],y:t[2]})}toSVGPathData(){return["L",this.point.x,this.point.y]}toSVGPathD(){return"L "+this.point.toSVGPathD()}}const uo=ls;class cs extends uo{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1}static fromSVGPathData(t){if(t.length<8)throw new Error("Arc 参数个数错误");if(t[0].toUpperCase()!=="A")throw new Error("Arc command 错误");return new cs({x:t[6],y:t[7],rx:t[1],ry:t[2],xAxisRotate:t[3],largeArcFlag:t[4],sweepFlag:t[5]})}toSVGPathData(){return["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.point.x,this.point.y]}toSVGPathD(){return`A ${this.rx},${this.ry} ${this.xAxisRotate} ${this.largeArcFlag},${this.sweepFlag} ${this.point.toSVGPathD()}`}}const po=cs;class hs extends uo{ctrlPoints=[];constructor(t){super(t),this.ctrlPoints.push(new Te({x:t.c1x,y:t.c1y})),this.ctrlPoints.push(new Te({x:t.c2x,y:t.c2y}))}static fromSVGPathData(t){if(t.length<7)throw new Error("CubicBezier 参数个数错误");if(t[0].toUpperCase()!=="C")throw new Error("CubicBezier command 错误");return new hs({c1x:t[1],c1y:t[2],c2x:t[3],c2y:t[4],x:t[5],y:t[6]})}toSVGPathData(){return["C",this.ctrlPoints[0].x,this.ctrlPoints[0].y,this.ctrlPoints[1].x,this.ctrlPoints[1].y,this.point.x,this.point.y]}toSVGPathD(){return`C ${this.ctrlPoints.map(t=>t.toSVGPathD()).join(" ")} ${this.point.toSVGPathD()}`}}const fs=hs;class yn{startPoint;isClosed=!1;lines=[];normalizedLines=[];constructor(t){this.startPoint=t?.startPoint??null,this.isClosed=t?.isClosed??!1,t?.lines?.forEach(this.addLine),this.normalize()}setStartPoint(t,e){return this.startPoint=new Te({x:t,y:e}),this}addLine(t){return this.lines.push(t),this}normalize(){let t=this.lines.reduce((i,r)=>(i+=r.toSVGPathD(),i),"");this.startPoint&&(t="M "+this.startPoint.toSVGPathD()+t),this.isClosed&&(t+="Z"),this.normalizedLines=[];const e=or(ar(sr(t)));for(let i=0,r=e.length;i<r;i++){const s=e[i];if(i==0&&s[0]=="M"){this.setStartPoint(s[1],s[2]);continue}if(i==r-1&&s[0]=="Z"){this.isClosed=!0;continue}this.normalizedLines.push(fs.fromSVGPathData(s))}return this}static fromSVGPathD(t,e){if(!Ka(t))throw new Error("Not an SVG path!");const i=or(ar(sr(t)));return yn.fromSVGPathData(i,e)}static fromSVGPathData(t,e){const i=new yn;for(let s=0,a=t.length;s<a;s++){const o=t[s],l=o[0];if(s==0&&l=="M"){i.setStartPoint(o[1],o[2]);continue}if(s==a-1&&l=="Z"){i.isClosed=!0;continue}i.addLine(new fs({c1x:o[1],c1y:o[2],c2x:o[3],c2y:o[4],x:o[5],y:o[6]}))}i.normalize();const r=Nn(e??"");return i.transform(r)}toSVGPathD(){let t="";this.startPoint&&(t+="M "+this.startPoint.toSVGPathD());for(let e=0,i=this.normalizedLines.length;e<i;e++)t+=this.normalizedLines[e].toSVGPathD();return this.isClosed&&(t+="Z"),t}toSVGPathData(){const t=[];this.startPoint&&t.push(["M",...this.startPoint.toSVGPathData()]);for(let e=0,i=this.normalizedLines.length;e<i;e++)t.push(this.normalizedLines[e].toSVGPathData());return this.isClosed&&t.push(["Z"]),t}toCanvas(t){const e=this.normalizedLines;e.length&&(this.startPoint&&(t.beginPath(),t.moveTo(this.startPoint.x,this.startPoint.y)),e.forEach(i=>{const[r,...s]=i.toSVGPathData();r==="M"?t.moveTo(s[0],s[1]):r==="Z"?t.closePath():t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}),this.isClosed&&t.closePath())}get bounds(){let t=[0,0,0,0];if(this.normalizedLines.length){t=[1/0,1/0,-1/0,-1/0];for(let e=0,i=this.normalizedLines.length;e<i;e++){const r=this.normalizedLines[e],s=[...r.ctrlPoints,r.point];for(let a=0;a<s.length;a++){const o=s[a].x,l=s[a].y;o<t[0]&&(t[0]=o),l<t[1]&&(t[1]=l),o>t[2]&&(t[2]=o),l>t[3]&&(t[3]=l)}}}return t}get size(){const t=this.bounds;return[t[2]-t[0],t[3]-t[1]]}get center(){const[t,e,i,r]=this.bounds;return[(t+i)/2,(e+r)/2]}getTotalLength(){return lo(this.toSVGPathD())}getPointAtLength(t){return co(this.toSVGPathD(),t)}isPointInPath(t,e){return ho(this.toSVGPathD(),t,e)}isPointInStroke(t,e,i={lineWidth:1,lineCap:"butt",lineJoin:"miter"}){return fo(this.toSVGPathD(),t,e,i)}transform(t){if(this.startPoint){const[e,i]=t.transformPoint(this.startPoint.x,this.startPoint.y);this.setStartPoint(e,i)}return this.normalizedLines=this.normalizedLines.map(e=>{const[i,...r]=e.toSVGPathData(),s=[i];for(let a=0,o=r.length;a<o;a+=2){const l=r[a],c=r[a+1],[u,g]=t.transformPoint(l,c);s.push(u,g)}return fs.fromSVGPathData(s)}),this}translate(t,e){const i=new Jt().translate(t,e);return this.transform(i)}rotate(t,e=0,i=0){const r=new Jt().rotate(t,e,i);return this.transform(r)}scale(t,e=t,i=0,r=0){const s=new Jt().scale(t,e,i,r);return this.transform(s)}skew(t,e=0){const i=new Jt().skew(t,e);return this.transform(i)}trim(){const[t,e]=this.bounds;return this.translate(-t,-e),this}static generateRosetta(t,e,i,r,s){if(s==0)throw new Error("no dividing by zero, please");const a=new yn;a.setStartPoint(t,e);const o=360/s;for(let l=0;l<s;l+=1){const c=o*l*Math.PI/180,u=t+2*i*Math.cos(c),g=e+2*i*Math.sin(c);a.addLine(new po({x:u,y:g,rx:i,ry:r,xAxisRotate:o*l,largeArcFlag:1,sweepFlag:1})),a.addLine(new po({x:t,y:e,rx:i,ry:r,xAxisRotate:o*l,largeArcFlag:1,sweepFlag:1}))}return a.normalize(),a}}var go={exports:{}};(function(n,t){(function(e,i){n.exports=i()})(window,function(){return function(e){var i={};function r(s){if(i[s])return i[s].exports;var a=i[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=i,r.d=function(s,a,o){r.o(s,a)||Object.defineProperty(s,a,{enumerable:!0,get:o})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,a){if(1&a&&(s=r(s)),8&a||4&a&&typeof s=="object"&&s&&s.__esModule)return s;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:s}),2&a&&typeof s!="string")for(var l in s)r.d(o,l,function(c){return s[c]}.bind(null,l));return o},r.n=function(s){var a=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(a,"a",a),a},r.o=function(s,a){return Object.prototype.hasOwnProperty.call(s,a)},r.p="",r(r.s=1)}([function(e,i,r){var s,a;s=[r(2)],(a=function(o){function l(f){if(l.is(f,"function"))return c?f():o.on("raphael.DOMload",f);if(l.is(f,st))return l._engine.create[P](l,f.splice(0,3+l.is(f[0],tt))).add(f);var v=Array.prototype.slice.call(arguments,0);if(l.is(v[v.length-1],"function")){var _=v.pop();return c?_.call(l._engine.create[P](l,v)):o.on("raphael.DOMload",function(){_.call(l._engine.create[P](l,v))})}return l._engine.create[P](l,arguments)}l.version="2.3.0",l.eve=o;var c,u,g=/[, ]+/,p={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,y="hasOwnProperty",x={doc:document,win:window},C={was:Object.prototype[y].call(x.win,"Raphael"),is:x.win.Raphael},A=function(){this.ca=this.customAttributes={}},P="apply",M="concat",D="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,z="",N=" ",F=String,G="split",H="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[G](N),Z={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},X=F.prototype.toLowerCase,J=Math,dt=J.max,ft=J.min,gt=J.abs,kt=J.pow,St=J.PI,tt="number",st="array",ht=Object.prototype.toString,L=(l._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),k={NaN:1,Infinity:1,"-Infinity":1},E=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,R=J.round,B=parseFloat,V=parseInt,j=F.prototype.toUpperCase,et=l._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},Y=l._availableAnimAttrs={blur:tt,"clip-rect":"csv",cx:tt,cy:tt,fill:"colour","fill-opacity":tt,"font-size":tt,height:tt,opacity:tt,path:"path",r:tt,rx:tt,ry:tt,stroke:"colour","stroke-opacity":tt,"stroke-width":tt,transform:"transform",width:tt,x:tt,y:tt},it=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,pt={hs:1,rg:1},vt=/,?([achlmqrstvxz]),?/gi,yt=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,At=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,xt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,It=(l._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),Mt=function(f,v){return B(f)-B(v)},Dt=function(f){return f},_t=l._rectPath=function(f,v,_,h,m){return m?[["M",f+m,v],["l",_-2*m,0],["a",m,m,0,0,1,m,m],["l",0,h-2*m],["a",m,m,0,0,1,-m,m],["l",2*m-_,0],["a",m,m,0,0,1,-m,-m],["l",0,2*m-h],["a",m,m,0,0,1,m,-m],["z"]]:[["M",f,v],["l",_,0],["l",0,h],["l",-_,0],["z"]]},Nt=function(f,v,_,h){return h==null&&(h=_),[["M",f,v],["m",0,-h],["a",_,h,0,1,1,0,2*h],["a",_,h,0,1,1,0,-2*h],["z"]]},Rt=l._getPath={path:function(f){return f.attr("path")},circle:function(f){var v=f.attrs;return Nt(v.cx,v.cy,v.r)},ellipse:function(f){var v=f.attrs;return Nt(v.cx,v.cy,v.rx,v.ry)},rect:function(f){var v=f.attrs;return _t(v.x,v.y,v.width,v.height,v.r)},image:function(f){var v=f.attrs;return _t(v.x,v.y,v.width,v.height)},text:function(f){var v=f._getBBox();return _t(v.x,v.y,v.width,v.height)},set:function(f){var v=f._getBBox();return _t(v.x,v.y,v.width,v.height)}},Vt=l.mapPath=function(f,v){if(!v)return f;var _,h,m,w,b,S,I;for(m=0,b=(f=In(f)).length;m<b;m++)for(w=1,S=(I=f[m]).length;w<S;w+=2)_=v.x(I[w],I[w+1]),h=v.y(I[w],I[w+1]),I[w]=_,I[w+1]=h;return f};if(l._g=x,l.type=x.win.SVGAngle||x.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",l.type=="VML"){var zt,ie=x.doc.createElement("div");if(ie.innerHTML='<v:shape adj="1"/>',(zt=ie.firstChild).style.behavior="url(#default#VML)",!zt||typeof zt.adj!="object")return l.type=z;ie=null}function Wt(f){if(typeof f=="function"||Object(f)!==f)return f;var v=new f.constructor;for(var _ in f)f[y](_)&&(v[_]=Wt(f[_]));return v}l.svg=!(l.vml=l.type=="VML"),l._Paper=A,l.fn=u=A.prototype=l.prototype,l._id=0,l.is=function(f,v){return(v=X.call(v))=="finite"?!k[y](+f):v=="array"?f instanceof Array:v=="null"&&f===null||v==typeof f&&f!==null||v=="object"&&f===Object(f)||v=="array"&&Array.isArray&&Array.isArray(f)||ht.call(f).slice(8,-1).toLowerCase()==v},l.angle=function(f,v,_,h,m,w){if(m==null){var b=f-_,S=v-h;return b||S?(180+180*J.atan2(-S,-b)/St+360)%360:0}return l.angle(f,v,m,w)-l.angle(_,h,m,w)},l.rad=function(f){return f%360*St/180},l.deg=function(f){return Math.round(180*f/St%360*1e3)/1e3},l.snapTo=function(f,v,_){if(_=l.is(_,"finite")?_:10,l.is(f,st)){for(var h=f.length;h--;)if(gt(f[h]-v)<=_)return f[h]}else{var m=v%(f=+f);if(m<_)return v-m;if(m>f-_)return v-m+f}return v};var Me,fn;l.createUUID=(Me=/[xy]/g,fn=function(f){var v=16*J.random()|0;return(f=="x"?v:3&v|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Me,fn).toUpperCase()}),l.setWindow=function(f){o("raphael.setWindow",l,x.win,f),x.win=f,x.doc=x.win.document,l._engine.initWin&&l._engine.initWin(x.win)};var Ce=function(f){if(l.vml){var v,_=/^\s+|\s+$/g;try{var h=new ActiveXObject("htmlfile");h.write("<body>"),h.close(),v=h.body}catch{v=createPopup().document.body}var m=v.createTextRange();Ce=$t(function(b){try{v.style.color=F(b).replace(_,z);var S=m.queryCommandValue("ForeColor");return"#"+("000000"+(S=(255&S)<<16|65280&S|(16711680&S)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var w=x.doc.createElement("i");w.title="Raphaël Colour Picker",w.style.display="none",x.doc.body.appendChild(w),Ce=$t(function(b){return w.style.color=b,x.doc.defaultView.getComputedStyle(w,z).getPropertyValue("color")})}return Ce(f)},Ve=function(){return"hsb("+[this.h,this.s,this.b]+")"},Xe=function(){return"hsl("+[this.h,this.s,this.l]+")"},Le=function(){return this.hex},De=function(f,v,_){if(v==null&&l.is(f,"object")&&"r"in f&&"g"in f&&"b"in f&&(_=f.b,v=f.g,f=f.r),v==null&&l.is(f,"string")){var h=l.getRGB(f);f=h.r,v=h.g,_=h.b}return(f>1||v>1||_>1)&&(f/=255,v/=255,_/=255),[f,v,_]},Kn=function(f,v,_,h){var m={r:f*=255,g:v*=255,b:_*=255,hex:l.rgb(f,v,_),toString:Le};return l.is(h,"finite")&&(m.opacity=h),m};function $t(f,v,_){return function h(){var m=Array.prototype.slice.call(arguments,0),w=m.join("␀"),b=h.cache=h.cache||{},S=h.count=h.count||[];return b[y](w)?(function(I,U){for(var $=0,Q=I.length;$<Q;$++)if(I[$]===U)return I.push(I.splice($,1)[0])}(S,w),_?_(b[w]):b[w]):(S.length>=1e3&&delete b[S.shift()],S.push(w),b[w]=f[P](v,m),_?_(b[w]):b[w])}}l.color=function(f){var v;return l.is(f,"object")&&"h"in f&&"s"in f&&"b"in f?(v=l.hsb2rgb(f),f.r=v.r,f.g=v.g,f.b=v.b,f.hex=v.hex):l.is(f,"object")&&"h"in f&&"s"in f&&"l"in f?(v=l.hsl2rgb(f),f.r=v.r,f.g=v.g,f.b=v.b,f.hex=v.hex):(l.is(f,"string")&&(f=l.getRGB(f)),l.is(f,"object")&&"r"in f&&"g"in f&&"b"in f?(v=l.rgb2hsl(f),f.h=v.h,f.s=v.s,f.l=v.l,v=l.rgb2hsb(f),f.v=v.b):(f={hex:"none"}).r=f.g=f.b=f.h=f.s=f.v=f.l=-1),f.toString=Le,f},l.hsb2rgb=function(f,v,_,h){var m,w,b,S,I;return this.is(f,"object")&&"h"in f&&"s"in f&&"b"in f&&(_=f.b,v=f.s,h=f.o,f=f.h),S=(I=_*v)*(1-gt((f=(f*=360)%360/60)%2-1)),m=w=b=_-I,Kn(m+=[I,S,0,0,S,I][f=~~f],w+=[S,I,I,S,0,0][f],b+=[0,0,S,I,I,S][f],h)},l.hsl2rgb=function(f,v,_,h){var m,w,b,S,I;return this.is(f,"object")&&"h"in f&&"s"in f&&"l"in f&&(_=f.l,v=f.s,f=f.h),(f>1||v>1||_>1)&&(f/=360,v/=100,_/=100),S=(I=2*v*(_<.5?_:1-_))*(1-gt((f=(f*=360)%360/60)%2-1)),m=w=b=_-I/2,Kn(m+=[I,S,0,0,S,I][f=~~f],w+=[S,I,I,S,0,0][f],b+=[0,0,S,I,I,S][f],h)},l.rgb2hsb=function(f,v,_){var h,m;return f=(_=De(f,v,_))[0],v=_[1],_=_[2],{h:(((m=(h=dt(f,v,_))-ft(f,v,_))==0?null:h==f?(v-_)/m:h==v?(_-f)/m+2:(f-v)/m+4)+360)%6*60/360,s:m==0?0:m/h,b:h,toString:Ve}},l.rgb2hsl=function(f,v,_){var h,m,w,b;return f=(_=De(f,v,_))[0],v=_[1],_=_[2],h=((m=dt(f,v,_))+(w=ft(f,v,_)))/2,{h:(((b=m-w)==0?null:m==f?(v-_)/b:m==v?(_-f)/b+2:(f-v)/b+4)+360)%6*60/360,s:b==0?0:h<.5?b/(2*h):b/(2-2*h),l:h,toString:Xe}},l._path2string=function(){return this.join(",").replace(vt,"$1")},l._preload=function(f,v){var _=x.doc.createElement("img");_.style.cssText="position:absolute;left:-9999em;top:-9999em",_.onload=function(){v.call(this),this.onload=null,x.doc.body.removeChild(this)},_.onerror=function(){x.doc.body.removeChild(this)},x.doc.body.appendChild(_),_.src=f};function Re(){return this.hex}function un(f,v){for(var _=[],h=0,m=f.length;m-2*!v>h;h+=2){var w=[{x:+f[h-2],y:+f[h-1]},{x:+f[h],y:+f[h+1]},{x:+f[h+2],y:+f[h+3]},{x:+f[h+4],y:+f[h+5]}];v?h?m-4==h?w[3]={x:+f[0],y:+f[1]}:m-2==h&&(w[2]={x:+f[0],y:+f[1]},w[3]={x:+f[2],y:+f[3]}):w[0]={x:+f[m-2],y:+f[m-1]}:m-4==h?w[3]=w[2]:h||(w[0]={x:+f[h],y:+f[h+1]}),_.push(["C",(-w[0].x+6*w[1].x+w[2].x)/6,(-w[0].y+6*w[1].y+w[2].y)/6,(w[1].x+6*w[2].x-w[3].x)/6,(w[1].y+6*w[2].y-w[3].y)/6,w[2].x,w[2].y])}return _}l.getRGB=$t(function(f){if(!f||(f=F(f)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Re};if(f=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:Re};!pt[y](f.toLowerCase().substring(0,2))&&f.charAt()!="#"&&(f=Ce(f));var v,_,h,m,w,b,S=f.match(L);return S?(S[2]&&(h=V(S[2].substring(5),16),_=V(S[2].substring(3,5),16),v=V(S[2].substring(1,3),16)),S[3]&&(h=V((w=S[3].charAt(3))+w,16),_=V((w=S[3].charAt(2))+w,16),v=V((w=S[3].charAt(1))+w,16)),S[4]&&(b=S[4][G](it),v=B(b[0]),b[0].slice(-1)=="%"&&(v*=2.55),_=B(b[1]),b[1].slice(-1)=="%"&&(_*=2.55),h=B(b[2]),b[2].slice(-1)=="%"&&(h*=2.55),S[1].toLowerCase().slice(0,4)=="rgba"&&(m=B(b[3])),b[3]&&b[3].slice(-1)=="%"&&(m/=100)),S[5]?(b=S[5][G](it),v=B(b[0]),b[0].slice(-1)=="%"&&(v*=2.55),_=B(b[1]),b[1].slice(-1)=="%"&&(_*=2.55),h=B(b[2]),b[2].slice(-1)=="%"&&(h*=2.55),(b[0].slice(-3)=="deg"||b[0].slice(-1)=="°")&&(v/=360),S[1].toLowerCase().slice(0,4)=="hsba"&&(m=B(b[3])),b[3]&&b[3].slice(-1)=="%"&&(m/=100),l.hsb2rgb(v,_,h,m)):S[6]?(b=S[6][G](it),v=B(b[0]),b[0].slice(-1)=="%"&&(v*=2.55),_=B(b[1]),b[1].slice(-1)=="%"&&(_*=2.55),h=B(b[2]),b[2].slice(-1)=="%"&&(h*=2.55),(b[0].slice(-3)=="deg"||b[0].slice(-1)=="°")&&(v/=360),S[1].toLowerCase().slice(0,4)=="hsla"&&(m=B(b[3])),b[3]&&b[3].slice(-1)=="%"&&(m/=100),l.hsl2rgb(v,_,h,m)):((S={r:v,g:_,b:h,toString:Re}).hex="#"+(16777216|h|_<<8|v<<16).toString(16).slice(1),l.is(m,"finite")&&(S.opacity=m),S)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Re}},l),l.hsb=$t(function(f,v,_){return l.hsb2rgb(f,v,_).hex}),l.hsl=$t(function(f,v,_){return l.hsl2rgb(f,v,_).hex}),l.rgb=$t(function(f,v,_){function h(m){return m+.5|0}return"#"+(16777216|h(_)|h(v)<<8|h(f)<<16).toString(16).slice(1)}),l.getColor=function(f){var v=this.getColor.start=this.getColor.start||{h:0,s:1,b:f||.75},_=this.hsb2rgb(v.h,v.s,v.b);return v.h+=.075,v.h>1&&(v.h=0,v.s-=.2,v.s<=0&&(this.getColor.start={h:0,s:1,b:v.b})),_.hex},l.getColor.reset=function(){delete this.start},l.parsePathString=function(f){if(!f)return null;var v=ae(f);if(v.arr)return Qt(v.arr);var _={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},h=[];return l.is(f,st)&&l.is(f[0],st)&&(h=Qt(f)),h.length||F(f).replace(yt,function(m,w,b){var S=[],I=w.toLowerCase();if(b.replace(xt,function(U,$){$&&S.push(+$)}),I=="m"&&S.length>2&&(h.push([w][M](S.splice(0,2))),I="l",w=w=="m"?"l":"L"),I=="r")h.push([w][M](S));else for(;S.length>=_[I]&&(h.push([w][M](S.splice(0,_[I]))),_[I]););}),h.toString=l._path2string,v.arr=Qt(h),h},l.parseTransformString=$t(function(f){if(!f)return null;var v=[];return l.is(f,st)&&l.is(f[0],st)&&(v=Qt(f)),v.length||F(f).replace(At,function(_,h,m){var w=[];X.call(h),m.replace(xt,function(b,S){S&&w.push(+S)}),v.push([h][M](w))}),v.toString=l._path2string,v},this,function(f){if(!f)return f;for(var v=[],_=0;_<f.length;_++){for(var h=[],m=0;m<f[_].length;m++)h.push(f[_][m]);v.push(h)}return v});var ae=function(f){var v=ae.ps=ae.ps||{};return v[f]?v[f].sleep=100:v[f]={sleep:100},setTimeout(function(){for(var _ in v)v[y](_)&&_!=f&&(v[_].sleep--,!v[_].sleep&&delete v[_])}),v[f]};function Ee(f,v,_,h,m){return f*(f*(-3*v+9*_-9*h+3*m)+6*v-12*_+6*h)-3*v+3*_}function de(f,v,_,h,m,w,b,S,I){I==null&&(I=1);for(var U=(I=I>1?1:I<0?0:I)/2,$=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],Q=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],W=0,q=0;q<12;q++){var nt=U*$[q]+U,at=Ee(nt,f,_,m,b),rt=Ee(nt,v,h,w,S),K=at*at+rt*rt;W+=Q[q]*J.sqrt(K)}return U*W}function Pn(f,v,_,h,m,w,b,S){if(!(dt(f,_)<ft(m,b)||ft(f,_)>dt(m,b)||dt(v,h)<ft(w,S)||ft(v,h)>dt(w,S))){var I=(f-_)*(w-S)-(v-h)*(m-b);if(I){var U=((f*h-v*_)*(m-b)-(f-_)*(m*S-w*b))/I,$=((f*h-v*_)*(w-S)-(v-h)*(m*S-w*b))/I,Q=+U.toFixed(2),W=+$.toFixed(2);if(!(Q<+ft(f,_).toFixed(2)||Q>+dt(f,_).toFixed(2)||Q<+ft(m,b).toFixed(2)||Q>+dt(m,b).toFixed(2)||W<+ft(v,h).toFixed(2)||W>+dt(v,h).toFixed(2)||W<+ft(w,S).toFixed(2)||W>+dt(w,S).toFixed(2)))return{x:U,y:$}}}}function Ye(f,v,_){var h=l.bezierBBox(f),m=l.bezierBBox(v);if(!l.isBBoxIntersect(h,m))return _?0:[];for(var w=de.apply(0,f),b=de.apply(0,v),S=dt(~~(w/5),1),I=dt(~~(b/5),1),U=[],$=[],Q={},W=_?0:[],q=0;q<S+1;q++){var nt=l.findDotsAtSegment.apply(l,f.concat(q/S));U.push({x:nt.x,y:nt.y,t:q/S})}for(q=0;q<I+1;q++)nt=l.findDotsAtSegment.apply(l,v.concat(q/I)),$.push({x:nt.x,y:nt.y,t:q/I});for(q=0;q<S;q++)for(var at=0;at<I;at++){var rt=U[q],K=U[q+1],mt=$[at],ot=$[at+1],ut=gt(K.x-rt.x)<.001?"y":"x",lt=gt(ot.x-mt.x)<.001?"y":"x",Tt=Pn(rt.x,rt.y,K.x,K.y,mt.x,mt.y,ot.x,ot.y);if(Tt){if(Q[Tt.x.toFixed(4)]==Tt.y.toFixed(4))continue;Q[Tt.x.toFixed(4)]=Tt.y.toFixed(4);var wt=rt.t+gt((Tt[ut]-rt[ut])/(K[ut]-rt[ut]))*(K.t-rt.t),Ct=mt.t+gt((Tt[lt]-mt[lt])/(ot[lt]-mt[lt]))*(ot.t-mt.t);wt>=0&&wt<=1.001&&Ct>=0&&Ct<=1.001&&(_?W++:W.push({x:Tt.x,y:Tt.y,t1:ft(wt,1),t2:ft(Ct,1)}))}}return W}function dn(f,v,_){f=l._path2curve(f),v=l._path2curve(v);for(var h,m,w,b,S,I,U,$,Q,W,q=_?0:[],nt=0,at=f.length;nt<at;nt++){var rt=f[nt];if(rt[0]=="M")h=S=rt[1],m=I=rt[2];else{rt[0]=="C"?(Q=[h,m].concat(rt.slice(1)),h=Q[6],m=Q[7]):(Q=[h,m,h,m,S,I,S,I],h=S,m=I);for(var K=0,mt=v.length;K<mt;K++){var ot=v[K];if(ot[0]=="M")w=U=ot[1],b=$=ot[2];else{ot[0]=="C"?(W=[w,b].concat(ot.slice(1)),w=W[6],b=W[7]):(W=[w,b,w,b,U,$,U,$],w=U,b=$);var ut=Ye(Q,W,_);if(_)q+=ut;else{for(var lt=0,Tt=ut.length;lt<Tt;lt++)ut[lt].segment1=nt,ut[lt].segment2=K,ut[lt].bez1=Q,ut[lt].bez2=W;q=q.concat(ut)}}}}}return q}l.findDotsAtSegment=function(f,v,_,h,m,w,b,S,I){var U=1-I,$=kt(U,3),Q=kt(U,2),W=I*I,q=W*I,nt=$*f+3*Q*I*_+3*U*I*I*m+q*b,at=$*v+3*Q*I*h+3*U*I*I*w+q*S,rt=f+2*I*(_-f)+W*(m-2*_+f),K=v+2*I*(h-v)+W*(w-2*h+v),mt=_+2*I*(m-_)+W*(b-2*m+_),ot=h+2*I*(w-h)+W*(S-2*w+h),ut=U*f+I*_,lt=U*v+I*h,Tt=U*m+I*b,wt=U*w+I*S,Ct=90-180*J.atan2(rt-mt,K-ot)/St;return(rt>mt||K<ot)&&(Ct+=180),{x:nt,y:at,m:{x:rt,y:K},n:{x:mt,y:ot},start:{x:ut,y:lt},end:{x:Tt,y:wt},alpha:Ct}},l.bezierBBox=function(f,v,_,h,m,w,b,S){l.is(f,"array")||(f=[f,v,_,h,m,w,b,S]);var I=qe.apply(null,f);return{x:I.min.x,y:I.min.y,x2:I.max.x,y2:I.max.y,width:I.max.x-I.min.x,height:I.max.y-I.min.y}},l.isPointInsideBBox=function(f,v,_){return v>=f.x&&v<=f.x2&&_>=f.y&&_<=f.y2},l.isBBoxIntersect=function(f,v){var _=l.isPointInsideBBox;return _(v,f.x,f.y)||_(v,f.x2,f.y)||_(v,f.x,f.y2)||_(v,f.x2,f.y2)||_(f,v.x,v.y)||_(f,v.x2,v.y)||_(f,v.x,v.y2)||_(f,v.x2,v.y2)||(f.x<v.x2&&f.x>v.x||v.x<f.x2&&v.x>f.x)&&(f.y<v.y2&&f.y>v.y||v.y<f.y2&&v.y>f.y)},l.pathIntersection=function(f,v){return dn(f,v)},l.pathIntersectionNumber=function(f,v){return dn(f,v,1)},l.isPointInsidePath=function(f,v,_){var h=l.pathBBox(f);return l.isPointInsideBBox(h,v,_)&&dn(f,[["M",v,_],["H",h.x2+10]],1)%2==1},l._removedFactory=function(f){return function(){o("raphael.log",null,"Raphaël: you are calling to method “"+f+"” of removed object",f)}};var we=l.pathBBox=function(f){var v=ae(f);if(v.bbox)return Wt(v.bbox);if(!f)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var _,h=0,m=0,w=[],b=[],S=0,I=(f=In(f)).length;S<I;S++)if((_=f[S])[0]=="M")h=_[1],m=_[2],w.push(h),b.push(m);else{var U=qe(h,m,_[1],_[2],_[3],_[4],_[5],_[6]);w=w[M](U.min.x,U.max.x),b=b[M](U.min.y,U.max.y),h=_[5],m=_[6]}var $=ft[P](0,w),Q=ft[P](0,b),W=dt[P](0,w),q=dt[P](0,b),nt=W-$,at=q-Q,rt={x:$,y:Q,x2:W,y2:q,width:nt,height:at,cx:$+nt/2,cy:Q+at/2};return v.bbox=Wt(rt),rt},Qt=function(f){var v=Wt(f);return v.toString=l._path2string,v},Ar=l._pathToRelative=function(f){var v=ae(f);if(v.rel)return Qt(v.rel);l.is(f,st)&&l.is(f&&f[0],st)||(f=l.parsePathString(f));var _=[],h=0,m=0,w=0,b=0,S=0;f[0][0]=="M"&&(w=h=f[0][1],b=m=f[0][2],S++,_.push(["M",h,m]));for(var I=S,U=f.length;I<U;I++){var $=_[I]=[],Q=f[I];if(Q[0]!=X.call(Q[0]))switch($[0]=X.call(Q[0]),$[0]){case"a":$[1]=Q[1],$[2]=Q[2],$[3]=Q[3],$[4]=Q[4],$[5]=Q[5],$[6]=+(Q[6]-h).toFixed(3),$[7]=+(Q[7]-m).toFixed(3);break;case"v":$[1]=+(Q[1]-m).toFixed(3);break;case"m":w=Q[1],b=Q[2];default:for(var W=1,q=Q.length;W<q;W++)$[W]=+(Q[W]-(W%2?h:m)).toFixed(3)}else{$=_[I]=[],Q[0]=="m"&&(w=Q[1]+h,b=Q[2]+m);for(var nt=0,at=Q.length;nt<at;nt++)_[I][nt]=Q[nt]}var rt=_[I].length;switch(_[I][0]){case"z":h=w,m=b;break;case"h":h+=+_[I][rt-1];break;case"v":m+=+_[I][rt-1];break;default:h+=+_[I][rt-2],m+=+_[I][rt-1]}}return _.toString=l._path2string,v.rel=Qt(_),_},pn=l._pathToAbsolute=function(f){var v=ae(f);if(v.abs)return Qt(v.abs);if(l.is(f,st)&&l.is(f&&f[0],st)||(f=l.parsePathString(f)),!f||!f.length)return[["M",0,0]];var _=[],h=0,m=0,w=0,b=0,S=0;f[0][0]=="M"&&(w=h=+f[0][1],b=m=+f[0][2],S++,_[0]=["M",h,m]);for(var I,U,$=f.length==3&&f[0][0]=="M"&&f[1][0].toUpperCase()=="R"&&f[2][0].toUpperCase()=="Z",Q=S,W=f.length;Q<W;Q++){if(_.push(I=[]),(U=f[Q])[0]!=j.call(U[0]))switch(I[0]=j.call(U[0]),I[0]){case"A":I[1]=U[1],I[2]=U[2],I[3]=U[3],I[4]=U[4],I[5]=U[5],I[6]=+(U[6]+h),I[7]=+(U[7]+m);break;case"V":I[1]=+U[1]+m;break;case"H":I[1]=+U[1]+h;break;case"R":for(var q=[h,m][M](U.slice(1)),nt=2,at=q.length;nt<at;nt++)q[nt]=+q[nt]+h,q[++nt]=+q[nt]+m;_.pop(),_=_[M](un(q,$));break;case"M":w=+U[1]+h,b=+U[2]+m;default:for(nt=1,at=U.length;nt<at;nt++)I[nt]=+U[nt]+(nt%2?h:m)}else if(U[0]=="R")q=[h,m][M](U.slice(1)),_.pop(),_=_[M](un(q,$)),I=["R"][M](U.slice(-2));else for(var rt=0,K=U.length;rt<K;rt++)I[rt]=U[rt];switch(I[0]){case"Z":h=w,m=b;break;case"H":h=I[1];break;case"V":m=I[1];break;case"M":w=I[I.length-2],b=I[I.length-1];default:h=I[I.length-2],m=I[I.length-1]}}return _.toString=l._path2string,v.abs=Qt(_),_},Ze=function(f,v,_,h){return[f,v,_,h,_,h]},Oe=function(f,v,_,h,m,w){return[1/3*f+2/3*_,1/3*v+2/3*h,1/3*m+2/3*_,1/3*w+2/3*h,m,w]},Qn=function(f,v,_,h,m,w,b,S,I,U){var $,Q=120*St/180,W=St/180*(+m||0),q=[],nt=$t(function(dc,pc,Nr){return{x:dc*J.cos(Nr)-pc*J.sin(Nr),y:dc*J.sin(Nr)+pc*J.cos(Nr)}});if(U)wt=U[0],Ct=U[1],lt=U[2],Tt=U[3];else{f=($=nt(f,v,-W)).x,v=$.y,S=($=nt(S,I,-W)).x,I=$.y;var at=(f-S)/2,rt=(v-I)/2,K=at*at/(_*_)+rt*rt/(h*h);K>1&&(_*=K=J.sqrt(K),h*=K);var mt=_*_,ot=h*h,ut=(w==b?-1:1)*J.sqrt(gt((mt*ot-mt*rt*rt-ot*at*at)/(mt*rt*rt+ot*at*at))),lt=ut*_*rt/h+(f+S)/2,Tt=ut*-h*at/_+(v+I)/2,wt=J.asin(((v-Tt)/h).toFixed(9)),Ct=J.asin(((I-Tt)/h).toFixed(9));(wt=f<lt?St-wt:wt)<0&&(wt=2*St+wt),(Ct=S<lt?St-Ct:Ct)<0&&(Ct=2*St+Ct),b&&wt>Ct&&(wt-=2*St),!b&&Ct>wt&&(Ct-=2*St)}var oi=Ct-wt;if(gt(oi)>Q){var Vi=Ct,ce=S,ze=I;Ct=wt+Q*(b&&Ct>wt?1:-1),S=lt+_*J.cos(Ct),I=Tt+h*J.sin(Ct),q=Qn(S,I,_,h,m,0,b,ce,ze,[Ct,Vi,lt,Tt])}oi=Ct-wt;var li=J.cos(wt),ci=J.sin(wt),zr=J.cos(Ct),en=J.sin(Ct),Rn=J.tan(oi/4),Ur=4/3*_*Rn,lc=4/3*h*Rn,cc=[f,v],hi=[f+Ur*ci,v-lc*li],hc=[S+Ur*en,I-lc*zr],fc=[S,I];if(hi[0]=2*cc[0]-hi[0],hi[1]=2*cc[1]-hi[1],U)return[hi,hc,fc][M](q);for(var uc=[],_n=0,c1=(q=[hi,hc,fc][M](q).join()[G](",")).length;_n<c1;_n++)uc[_n]=_n%2?nt(q[_n-1],q[_n],W).y:nt(q[_n],q[_n+1],W).x;return uc},$e=function(f,v,_,h,m,w,b,S,I){var U=1-I;return{x:kt(U,3)*f+3*kt(U,2)*I*_+3*U*I*I*m+kt(I,3)*b,y:kt(U,3)*v+3*kt(U,2)*I*h+3*U*I*I*w+kt(I,3)*S}},qe=$t(function(f,v,_,h,m,w,b,S){var I,U=m-2*_+f-(b-2*m+_),$=2*(_-f)-2*(m-_),Q=f-_,W=(-$+J.sqrt($*$-4*U*Q))/2/U,q=(-$-J.sqrt($*$-4*U*Q))/2/U,nt=[v,S],at=[f,b];return gt(W)>"1e12"&&(W=.5),gt(q)>"1e12"&&(q=.5),W>0&&W<1&&(I=$e(f,v,_,h,m,w,b,S,W),at.push(I.x),nt.push(I.y)),q>0&&q<1&&(I=$e(f,v,_,h,m,w,b,S,q),at.push(I.x),nt.push(I.y)),U=w-2*h+v-(S-2*w+h),Q=v-h,W=(-($=2*(h-v)-2*(w-h))+J.sqrt($*$-4*U*Q))/2/U,q=(-$-J.sqrt($*$-4*U*Q))/2/U,gt(W)>"1e12"&&(W=.5),gt(q)>"1e12"&&(q=.5),W>0&&W<1&&(I=$e(f,v,_,h,m,w,b,S,W),at.push(I.x),nt.push(I.y)),q>0&&q<1&&(I=$e(f,v,_,h,m,w,b,S,q),at.push(I.x),nt.push(I.y)),{min:{x:ft[P](0,at),y:ft[P](0,nt)},max:{x:dt[P](0,at),y:dt[P](0,nt)}}}),In=l._path2curve=$t(function(f,v){var _=!v&&ae(f);if(!v&&_.curve)return Qt(_.curve);for(var h=pn(f),m=v&&pn(v),w={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},S=function(ut,lt,Tt){var wt,Ct;if(!ut)return["C",lt.x,lt.y,lt.x,lt.y,lt.x,lt.y];switch(!(ut[0]in{T:1,Q:1})&&(lt.qx=lt.qy=null),ut[0]){case"M":lt.X=ut[1],lt.Y=ut[2];break;case"A":ut=["C"][M](Qn[P](0,[lt.x,lt.y][M](ut.slice(1))));break;case"S":Tt=="C"||Tt=="S"?(wt=2*lt.x-lt.bx,Ct=2*lt.y-lt.by):(wt=lt.x,Ct=lt.y),ut=["C",wt,Ct][M](ut.slice(1));break;case"T":Tt=="Q"||Tt=="T"?(lt.qx=2*lt.x-lt.qx,lt.qy=2*lt.y-lt.qy):(lt.qx=lt.x,lt.qy=lt.y),ut=["C"][M](Oe(lt.x,lt.y,lt.qx,lt.qy,ut[1],ut[2]));break;case"Q":lt.qx=ut[1],lt.qy=ut[2],ut=["C"][M](Oe(lt.x,lt.y,ut[1],ut[2],ut[3],ut[4]));break;case"L":ut=["C"][M](Ze(lt.x,lt.y,ut[1],ut[2]));break;case"H":ut=["C"][M](Ze(lt.x,lt.y,ut[1],lt.y));break;case"V":ut=["C"][M](Ze(lt.x,lt.y,lt.x,ut[1]));break;case"Z":ut=["C"][M](Ze(lt.x,lt.y,lt.X,lt.Y))}return ut},I=function(ut,lt){if(ut[lt].length>7){ut[lt].shift();for(var Tt=ut[lt];Tt.length;)$[lt]="A",m&&(Q[lt]="A"),ut.splice(lt++,0,["C"][M](Tt.splice(0,6)));ut.splice(lt,1),at=dt(h.length,m&&m.length||0)}},U=function(ut,lt,Tt,wt,Ct){ut&<&&ut[Ct][0]=="M"&<[Ct][0]!="M"&&(lt.splice(Ct,0,["M",wt.x,wt.y]),Tt.bx=0,Tt.by=0,Tt.x=ut[Ct][1],Tt.y=ut[Ct][2],at=dt(h.length,m&&m.length||0))},$=[],Q=[],W="",q="",nt=0,at=dt(h.length,m&&m.length||0);nt<at;nt++){h[nt]&&(W=h[nt][0]),W!="C"&&($[nt]=W,nt&&(q=$[nt-1])),h[nt]=S(h[nt],w,q),$[nt]!="A"&&W=="C"&&($[nt]="C"),I(h,nt),m&&(m[nt]&&(W=m[nt][0]),W!="C"&&(Q[nt]=W,nt&&(q=Q[nt-1])),m[nt]=S(m[nt],b,q),Q[nt]!="A"&&W=="C"&&(Q[nt]="C"),I(m,nt)),U(h,m,w,b,nt),U(m,h,b,w,nt);var rt=h[nt],K=m&&m[nt],mt=rt.length,ot=m&&K.length;w.x=rt[mt-2],w.y=rt[mt-1],w.bx=B(rt[mt-4])||w.x,w.by=B(rt[mt-3])||w.y,b.bx=m&&(B(K[ot-4])||b.x),b.by=m&&(B(K[ot-3])||b.y),b.x=m&&K[ot-2],b.y=m&&K[ot-1]}return m||(_.curve=Qt(h)),m?[h,m]:h},null,Qt),ti=(l._parseDots=$t(function(f){for(var v=[],_=0,h=f.length;_<h;_++){var m={},w=f[_].match(/^([^:]*):?([\d\.]*)/);if(m.color=l.getRGB(w[1]),m.color.error)return null;m.opacity=m.color.opacity,m.color=m.color.hex,w[2]&&(m.offset=w[2]+"%"),v.push(m)}for(_=1,h=v.length-1;_<h;_++)if(!v[_].offset){for(var b=B(v[_-1].offset||0),S=0,I=_+1;I<h;I++)if(v[I].offset){S=v[I].offset;break}S||(S=100,I=h);for(var U=((S=B(S))-b)/(I-_+1);_<I;_++)b+=U,v[_].offset=b+"%"}return v}),l._tear=function(f,v){f==v.top&&(v.top=f.prev),f==v.bottom&&(v.bottom=f.next),f.next&&(f.next.prev=f.prev),f.prev&&(f.prev.next=f.next)}),Pr=(l._tofront=function(f,v){v.top!==f&&(ti(f,v),f.next=null,f.prev=v.top,v.top.next=f,v.top=f)},l._toback=function(f,v){v.bottom!==f&&(ti(f,v),f.next=v.bottom,f.prev=null,v.bottom.prev=f,v.bottom=f)},l._insertafter=function(f,v,_){ti(f,_),v==_.top&&(_.top=f),v.next&&(v.next.prev=f),f.next=v.next,f.prev=v,v.next=f},l._insertbefore=function(f,v,_){ti(f,_),v==_.bottom&&(_.bottom=f),v.prev&&(v.prev.next=f),f.prev=v.prev,v.prev=f,f.next=v},l.toMatrix=function(f,v){var _=we(f),h={_:{transform:z},getBBox:function(){return _}};return ei(h,v),h.matrix}),ei=(l.transformPath=function(f,v){return Vt(f,Pr(f,v))},l._extractTransform=function(f,v){if(v==null)return f._.transform;v=F(v).replace(/\.{3}|\u2026/g,f._.transform||z);var _,h,m=l.parseTransformString(v),w=0,b=1,S=1,I=f._,U=new We;if(I.transform=m||[],m)for(var $=0,Q=m.length;$<Q;$++){var W,q,nt,at,rt,K=m[$],mt=K.length,ot=F(K[0]).toLowerCase(),ut=K[0]!=ot,lt=ut?U.invert():0;ot=="t"&&mt==3?ut?(W=lt.x(0,0),q=lt.y(0,0),nt=lt.x(K[1],K[2]),at=lt.y(K[1],K[2]),U.translate(nt-W,at-q)):U.translate(K[1],K[2]):ot=="r"?mt==2?(rt=rt||f.getBBox(1),U.rotate(K[1],rt.x+rt.width/2,rt.y+rt.height/2),w+=K[1]):mt==4&&(ut?(nt=lt.x(K[2],K[3]),at=lt.y(K[2],K[3]),U.rotate(K[1],nt,at)):U.rotate(K[1],K[2],K[3]),w+=K[1]):ot=="s"?mt==2||mt==3?(rt=rt||f.getBBox(1),U.scale(K[1],K[mt-1],rt.x+rt.width/2,rt.y+rt.height/2),b*=K[1],S*=K[mt-1]):mt==5&&(ut?(nt=lt.x(K[3],K[4]),at=lt.y(K[3],K[4]),U.scale(K[1],K[2],nt,at)):U.scale(K[1],K[2],K[3],K[4]),b*=K[1],S*=K[2]):ot=="m"&&mt==7&&U.add(K[1],K[2],K[3],K[4],K[5],K[6]),I.dirtyT=1,f.matrix=U}f.matrix=U,I.sx=b,I.sy=S,I.deg=w,I.dx=_=U.e,I.dy=h=U.f,b==1&&S==1&&!w&&I.bbox?(I.bbox.x+=+_,I.bbox.y+=+h):I.dirtyT=1}),Ir=function(f){var v=f[0];switch(v.toLowerCase()){case"t":return[v,0,0];case"m":return[v,1,0,0,1,0,0];case"r":return f.length==4?[v,0,f[2],f[3]]:[v,0];case"s":return f.length==5?[v,1,1,f[3],f[4]]:f.length==3?[v,1,1]:[v,1]}},Mr=l._equaliseTransform=function(f,v){v=F(v).replace(/\.{3}|\u2026/g,f),f=l.parseTransformString(f)||[],v=l.parseTransformString(v)||[];for(var _,h,m,w,b=dt(f.length,v.length),S=[],I=[],U=0;U<b;U++){if(m=f[U]||Ir(v[U]),w=v[U]||Ir(m),m[0]!=w[0]||m[0].toLowerCase()=="r"&&(m[2]!=w[2]||m[3]!=w[3])||m[0].toLowerCase()=="s"&&(m[3]!=w[3]||m[4]!=w[4]))return;for(S[U]=[],I[U]=[],_=0,h=dt(m.length,w.length);_<h;_++)_ in m&&(S[U][_]=m[_]),_ in w&&(I[U][_]=w[_])}return{from:S,to:I}};function We(f,v,_,h,m,w){f!=null?(this.a=+f,this.b=+v,this.c=+_,this.d=+h,this.e=+m,this.f=+w):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}l._getContainer=function(f,v,_,h){var m;if((m=h!=null||l.is(f,"object")?f:x.doc.getElementById(f))!=null)return m.tagName?v==null?{container:m,width:m.style.pixelWidth||m.offsetWidth,height:m.style.pixelHeight||m.offsetHeight}:{container:m,width:v,height:_}:{container:1,x:f,y:v,width:_,height:h}},l.pathToRelative=Ar,l._engine={},l.path2curve=In,l.matrix=function(f,v,_,h,m,w){return new We(f,v,_,h,m,w)},function(f){function v(h){return h[0]*h[0]+h[1]*h[1]}function _(h){var m=J.sqrt(v(h));h[0]&&(h[0]/=m),h[1]&&(h[1]/=m)}f.add=function(h,m,w,b,S,I){var U,$,Q,W,q=[[],[],[]],nt=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],at=[[h,w,S],[m,b,I],[0,0,1]];for(h&&h instanceof We&&(at=[[h.a,h.c,h.e],[h.b,h.d,h.f],[0,0,1]]),U=0;U<3;U++)for($=0;$<3;$++){for(W=0,Q=0;Q<3;Q++)W+=nt[U][Q]*at[Q][$];q[U][$]=W}this.a=q[0][0],this.b=q[1][0],this.c=q[0][1],this.d=q[1][1],this.e=q[0][2],this.f=q[1][2]},f.invert=function(){var h=this,m=h.a*h.d-h.b*h.c;return new We(h.d/m,-h.b/m,-h.c/m,h.a/m,(h.c*h.f-h.d*h.e)/m,(h.b*h.e-h.a*h.f)/m)},f.clone=function(){return new We(this.a,this.b,this.c,this.d,this.e,this.f)},f.translate=function(h,m){this.add(1,0,0,1,h,m)},f.scale=function(h,m,w,b){m==null&&(m=h),(w||b)&&this.add(1,0,0,1,w,b),this.add(h,0,0,m,0,0),(w||b)&&this.add(1,0,0,1,-w,-b)},f.rotate=function(h,m,w){h=l.rad(h),m=m||0,w=w||0;var b=+J.cos(h).toFixed(9),S=+J.sin(h).toFixed(9);this.add(b,S,-S,b,m,w),this.add(1,0,0,1,-m,-w)},f.x=function(h,m){return h*this.a+m*this.c+this.e},f.y=function(h,m){return h*this.b+m*this.d+this.f},f.get=function(h){return+this[F.fromCharCode(97+h)].toFixed(4)},f.toString=function(){return l.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},f.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},f.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},f.split=function(){var h={};h.dx=this.e,h.dy=this.f;var m=[[this.a,this.c],[this.b,this.d]];h.scalex=J.sqrt(v(m[0])),_(m[0]),h.shear=m[0][0]*m[1][0]+m[0][1]*m[1][1],m[1]=[m[1][0]-m[0][0]*h.shear,m[1][1]-m[0][1]*h.shear],h.scaley=J.sqrt(v(m[1])),_(m[1]),h.shear/=h.scaley;var w=-m[0][1],b=m[1][1];return b<0?(h.rotate=l.deg(J.acos(b)),w<0&&(h.rotate=360-h.rotate)):h.rotate=l.deg(J.asin(w)),h.isSimple=!(+h.shear.toFixed(9)||h.scalex.toFixed(9)!=h.scaley.toFixed(9)&&h.rotate),h.isSuperSimple=!+h.shear.toFixed(9)&&h.scalex.toFixed(9)==h.scaley.toFixed(9)&&!h.rotate,h.noRotation=!+h.shear.toFixed(9)&&!h.rotate,h},f.toTransformString=function(h){var m=h||this[G]();return m.isSimple?(m.scalex=+m.scalex.toFixed(4),m.scaley=+m.scaley.toFixed(4),m.rotate=+m.rotate.toFixed(4),(m.dx||m.dy?"t"+[m.dx,m.dy]:z)+(m.scalex!=1||m.scaley!=1?"s"+[m.scalex,m.scaley,0,0]:z)+(m.rotate?"r"+[m.rotate,0,0]:z)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(We.prototype);for(var Lr=function(){this.returnValue=!1},Dr=function(){return this.originalEvent.preventDefault()},Rr=function(){this.cancelBubble=!0},Or=function(){return this.originalEvent.stopPropagation()},ni=function(f){var v=x.doc.documentElement.scrollTop||x.doc.body.scrollTop,_=x.doc.documentElement.scrollLeft||x.doc.body.scrollLeft;return{x:f.clientX+_,y:f.clientY+v}},Je=x.doc.addEventListener?function(f,v,_,h){var m=function(b){var S=ni(b);return _.call(h,b,S.x,S.y)};if(f.addEventListener(v,m,!1),D&&Z[v]){var w=function(b){for(var S=ni(b),I=b,U=0,$=b.targetTouches&&b.targetTouches.length;U<$;U++)if(b.targetTouches[U].target==f){(b=b.targetTouches[U]).originalEvent=I,b.preventDefault=Dr,b.stopPropagation=Or;break}return _.call(h,b,S.x,S.y)};f.addEventListener(Z[v],w,!1)}return function(){return f.removeEventListener(v,m,!1),D&&Z[v]&&f.removeEventListener(Z[v],w,!1),!0}}:x.doc.attachEvent?function(f,v,_,h){var m=function(w){w=w||x.win.event;var b=x.doc.documentElement.scrollTop||x.doc.body.scrollTop,S=x.doc.documentElement.scrollLeft||x.doc.body.scrollLeft,I=w.clientX+S,U=w.clientY+b;return w.preventDefault=w.preventDefault||Lr,w.stopPropagation=w.stopPropagation||Rr,_.call(h,w,I,U)};return f.attachEvent("on"+v,m),function(){return f.detachEvent("on"+v,m),!0}}:void 0,oe=[],Ke=function(f){for(var v,_=f.clientX,h=f.clientY,m=x.doc.documentElement.scrollTop||x.doc.body.scrollTop,w=x.doc.documentElement.scrollLeft||x.doc.body.scrollLeft,b=oe.length;b--;){if(v=oe[b],D&&f.touches){for(var S,I=f.touches.length;I--;)if((S=f.touches[I]).identifier==v.el._drag.id){_=S.clientX,h=S.clientY,(f.originalEvent?f.originalEvent:f).preventDefault();break}}else f.preventDefault();var U,$=v.el.node,Q=$.nextSibling,W=$.parentNode,q=$.style.display;x.win.opera&&W.removeChild($),$.style.display="none",U=v.el.paper.getElementByPoint(_,h),$.style.display=q,x.win.opera&&(Q?W.insertBefore($,Q):W.appendChild($)),U&&o("raphael.drag.over."+v.el.id,v.el,U),_+=w,h+=m,o("raphael.drag.move."+v.el.id,v.move_scope||v.el,_-v.el._drag.x,h-v.el._drag.y,_,h,f)}},gn=function(f){l.unmousemove(Ke).unmouseup(gn);for(var v,_=oe.length;_--;)(v=oe[_]).el._drag={},o("raphael.drag.end."+v.el.id,v.end_scope||v.start_scope||v.move_scope||v.el,f);oe=[]},Ot=l.el={},Fr=H.length;Fr--;)(function(f){l[f]=Ot[f]=function(v,_){return l.is(v,"function")&&(this.events=this.events||[],this.events.push({name:f,f:v,unbind:Je(this.shape||this.node||x.doc,f,v,_||this)})),this},l["un"+f]=Ot["un"+f]=function(v){for(var _=this.events||[],h=_.length;h--;)_[h].name!=f||!l.is(v,"undefined")&&_[h].f!=v||(_[h].unbind(),_.splice(h,1),!_.length&&delete this.events);return this}})(H[Fr]);Ot.data=function(f,v){var _=It[this.id]=It[this.id]||{};if(arguments.length==0)return _;if(arguments.length==1){if(l.is(f,"object")){for(var h in f)f[y](h)&&this.data(h,f[h]);return this}return o("raphael.data.get."+this.id,this,_[f],f),_[f]}return _[f]=v,o("raphael.data.set."+this.id,this,v,f),this},Ot.removeData=function(f){return f==null?delete It[this.id]:It[this.id]&&delete It[this.id][f],this},Ot.getData=function(){return Wt(It[this.id]||{})},Ot.hover=function(f,v,_,h){return this.mouseover(f,_).mouseout(v,h||_)},Ot.unhover=function(f,v){return this.unmouseover(f).unmouseout(v)};var mn=[];Ot.drag=function(f,v,_,h,m,w){function b(S){(S.originalEvent||S).preventDefault();var I=S.clientX,U=S.clientY,$=x.doc.documentElement.scrollTop||x.doc.body.scrollTop,Q=x.doc.documentElement.scrollLeft||x.doc.body.scrollLeft;if(this._drag.id=S.identifier,D&&S.touches){for(var W,q=S.touches.length;q--;)if(W=S.touches[q],this._drag.id=W.identifier,W.identifier==this._drag.id){I=W.clientX,U=W.clientY;break}}this._drag.x=I+Q,this._drag.y=U+$,!oe.length&&l.mousemove(Ke).mouseup(gn),oe.push({el:this,move_scope:h,start_scope:m,end_scope:w}),v&&o.on("raphael.drag.start."+this.id,v),f&&o.on("raphael.drag.move."+this.id,f),_&&o.on("raphael.drag.end."+this.id,_),o("raphael.drag.start."+this.id,m||h||this,this._drag.x,this._drag.y,S)}return this._drag={},mn.push({el:this,start:b}),this.mousedown(b),this},Ot.onDragOver=function(f){f?o.on("raphael.drag.over."+this.id,f):o.unbind("raphael.drag.over."+this.id)},Ot.undrag=function(){for(var f=mn.length;f--;)mn[f].el==this&&(this.unmousedown(mn[f].start),mn.splice(f,1),o.unbind("raphael.drag.*."+this.id));!mn.length&&l.unmousemove(Ke).unmouseup(gn),oe=[]},u.circle=function(f,v,_){var h=l._engine.circle(this,f||0,v||0,_||0);return this.__set__&&this.__set__.push(h),h},u.rect=function(f,v,_,h,m){var w=l._engine.rect(this,f||0,v||0,_||0,h||0,m||0);return this.__set__&&this.__set__.push(w),w},u.ellipse=function(f,v,_,h){var m=l._engine.ellipse(this,f||0,v||0,_||0,h||0);return this.__set__&&this.__set__.push(m),m},u.path=function(f){f&&!l.is(f,"string")&&!l.is(f[0],st)&&(f+=z);var v=l._engine.path(l.format[P](l,arguments),this);return this.__set__&&this.__set__.push(v),v},u.image=function(f,v,_,h,m){var w=l._engine.image(this,f||"about:blank",v||0,_||0,h||0,m||0);return this.__set__&&this.__set__.push(w),w},u.text=function(f,v,_){var h=l._engine.text(this,f||0,v||0,F(_));return this.__set__&&this.__set__.push(h),h},u.set=function(f){!l.is(f,"array")&&(f=Array.prototype.splice.call(arguments,0,arguments.length));var v=new Ln(f);return this.__set__&&this.__set__.push(v),v.paper=this,v.type="set",v},u.setStart=function(f){this.__set__=f||this.set()},u.setFinish=function(f){var v=this.__set__;return delete this.__set__,v},u.getSize=function(){var f=this.canvas.parentNode;return{width:f.offsetWidth,height:f.offsetHeight}},u.setSize=function(f,v){return l._engine.setSize.call(this,f,v)},u.setViewBox=function(f,v,_,h,m){return l._engine.setViewBox.call(this,f,v,_,h,m)},u.top=u.bottom=null,u.raphael=l;function Mn(){return this.x+N+this.y+N+this.width+" × "+this.height}u.getElementByPoint=function(f,v){var _,h,m,w,b,S,I,U=this.canvas,$=x.doc.elementFromPoint(f,v);if(x.win.opera&&$.tagName=="svg"){var Q=(h=(_=U).getBoundingClientRect(),m=_.ownerDocument,w=m.body,b=m.documentElement,S=b.clientTop||w.clientTop||0,I=b.clientLeft||w.clientLeft||0,{y:h.top+(x.win.pageYOffset||b.scrollTop||w.scrollTop)-S,x:h.left+(x.win.pageXOffset||b.scrollLeft||w.scrollLeft)-I}),W=U.createSVGRect();W.x=f-Q.x,W.y=v-Q.y,W.width=W.height=1;var q=U.getIntersectionList(W,null);q.length&&($=q[q.length-1])}if(!$)return null;for(;$.parentNode&&$!=U.parentNode&&!$.raphael;)$=$.parentNode;return $==this.canvas.parentNode&&($=U),$=$&&$.raphael?this.getById($.raphaelid):null},u.getElementsByBBox=function(f){var v=this.set();return this.forEach(function(_){l.isBBoxIntersect(_.getBBox(),f)&&v.push(_)}),v},u.getById=function(f){for(var v=this.bottom;v;){if(v.id==f)return v;v=v.next}return null},u.forEach=function(f,v){for(var _=this.bottom;_;){if(f.call(v,_)===!1)return this;_=_.next}return this},u.getElementsByPoint=function(f,v){var _=this.set();return this.forEach(function(h){h.isPointInside(f,v)&&_.push(h)}),_},Ot.isPointInside=function(f,v){var _=this.realPath=Rt[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(_=l.transformPath(_,this.attr("transform"))),l.isPointInsidePath(_,f,v)},Ot.getBBox=function(f){if(this.removed)return{};var v=this._;return f?(!v.dirty&&v.bboxwt||(this.realPath=Rt[this.type](this),v.bboxwt=we(this.realPath),v.bboxwt.toString=Mn,v.dirty=0),v.bboxwt):((v.dirty||v.dirtyT||!v.bbox)&&(!v.dirty&&this.realPath||(v.bboxwt=0,this.realPath=Rt[this.type](this)),v.bbox=we(Vt(this.realPath,this.matrix)),v.bbox.toString=Mn,v.dirty=v.dirtyT=0),v.bbox)},Ot.clone=function(){if(this.removed)return null;var f=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(f),f},Ot.glow=function(f){if(this.type=="text")return null;var v={width:((f=f||{}).width||10)+(+this.attr("stroke-width")||1),fill:f.fill||!1,opacity:f.opacity==null?.5:f.opacity,offsetx:f.offsetx||0,offsety:f.offsety||0,color:f.color||"#000"},_=v.width/2,h=this.paper,m=h.set(),w=this.realPath||Rt[this.type](this);w=this.matrix?Vt(w,this.matrix):w;for(var b=1;b<_+1;b++)m.push(h.path(w).attr({stroke:v.color,fill:v.fill?v.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(v.width/_*b).toFixed(3),opacity:+(v.opacity/_).toFixed(3)}));return m.insertBefore(this).translate(v.offsetx,v.offsety)};var te=function(f,v,_,h,m,w,b,S,I){return I==null?de(f,v,_,h,m,w,b,S):l.findDotsAtSegment(f,v,_,h,m,w,b,S,function(U,$,Q,W,q,nt,at,rt,K){if(!(K<0||de(U,$,Q,W,q,nt,at,rt)<K)){var mt,ot=.5,ut=1-ot;for(mt=de(U,$,Q,W,q,nt,at,rt,ut);gt(mt-K)>.01;)mt=de(U,$,Q,W,q,nt,at,rt,ut+=(mt<K?1:-1)*(ot/=2));return ut}}(f,v,_,h,m,w,b,S,I))},Fe=function(f,v){return function(_,h,m){for(var w,b,S,I,U,$="",Q={},W=0,q=0,nt=(_=In(_)).length;q<nt;q++){if((S=_[q])[0]=="M")w=+S[1],b=+S[2];else{if(W+(I=te(w,b,S[1],S[2],S[3],S[4],S[5],S[6]))>h){if(v&&!Q.start){if($+=["C"+(U=te(w,b,S[1],S[2],S[3],S[4],S[5],S[6],h-W)).start.x,U.start.y,U.m.x,U.m.y,U.x,U.y],m)return $;Q.start=$,$=["M"+U.x,U.y+"C"+U.n.x,U.n.y,U.end.x,U.end.y,S[5],S[6]].join(),W+=I,w=+S[5],b=+S[6];continue}if(!f&&!v)return{x:(U=te(w,b,S[1],S[2],S[3],S[4],S[5],S[6],h-W)).x,y:U.y,alpha:U.alpha}}W+=I,w=+S[5],b=+S[6]}$+=S.shift()+S}return Q.end=$,(U=f?W:v?Q:l.findDotsAtSegment(w,b,S[0],S[1],S[2],S[3],S[4],S[5],1)).alpha&&(U={x:U.x,y:U.y,alpha:U.alpha}),U}},ke=Fe(1),ye=Fe(),Qe=Fe(0,1);l.getTotalLength=ke,l.getPointAtLength=ye,l.getSubpath=function(f,v,_){if(this.getTotalLength(f)-_<1e-6)return Qe(f,v).end;var h=Qe(f,_,1);return v?Qe(h,v).end:h},Ot.getTotalLength=function(){var f=this.getPath();if(f)return this.node.getTotalLength?this.node.getTotalLength():ke(f)},Ot.getPointAtLength=function(f){var v=this.getPath();if(v)return ye(v,f)},Ot.getPath=function(){var f,v=l._getPath[this.type];if(this.type!="text"&&this.type!="set")return v&&(f=v(this)),f},Ot.getSubpath=function(f,v){var _=this.getPath();if(_)return l.getSubpath(_,f,v)};var Ht=l.easing_formulas={linear:function(f){return f},"<":function(f){return kt(f,1.7)},">":function(f){return kt(f,.48)},"<>":function(f){var v=.48-f/1.04,_=J.sqrt(.1734+v*v),h=_-v,m=-_-v,w=kt(gt(h),1/3)*(h<0?-1:1)+kt(gt(m),1/3)*(m<0?-1:1)+.5;return 3*(1-w)*w*w+w*w*w},backIn:function(f){var v=1.70158;return f*f*((v+1)*f-v)},backOut:function(f){var v=1.70158;return(f-=1)*f*((v+1)*f+v)+1},elastic:function(f){return f==!!f?f:kt(2,-10*f)*J.sin(2*St*(f-.075)/.3)+1},bounce:function(f){var v=7.5625,_=2.75;return f<1/_?v*f*f:f<2/_?v*(f-=1.5/_)*f+.75:f<2.5/_?v*(f-=2.25/_)*f+.9375:v*(f-=2.625/_)*f+.984375}};Ht.easeIn=Ht["ease-in"]=Ht["<"],Ht.easeOut=Ht["ease-out"]=Ht[">"],Ht.easeInOut=Ht["ease-in-out"]=Ht["<>"],Ht["back-in"]=Ht.backIn,Ht["back-out"]=Ht.backOut;var bt=[],ji=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(f){setTimeout(f,16)},ii=function(){for(var f=+new Date,v=0;v<bt.length;v++){var _=bt[v];if(!_.el.removed&&!_.paused){var h,m,w=f-_.start,b=_.ms,S=_.easing,I=_.from,U=_.diff,$=_.to,Q=(_.t,_.el),W={},q={};if(_.initstatus?(w=(_.initstatus*_.anim.top-_.prev)/(_.percent-_.prev)*b,_.status=_.initstatus,delete _.initstatus,_.stop&&bt.splice(v--,1)):_.status=(_.prev+(_.percent-_.prev)*(w/b))/_.anim.top,!(w<0))if(w<b){var nt=S(w/b);for(var at in I)if(I[y](at)){switch(Y[at]){case tt:h=+I[at]+nt*b*U[at];break;case"colour":h="rgb("+[vn(R(I[at].r+nt*b*U[at].r)),vn(R(I[at].g+nt*b*U[at].g)),vn(R(I[at].b+nt*b*U[at].b))].join(",")+")";break;case"path":h=[];for(var rt=0,K=I[at].length;rt<K;rt++){h[rt]=[I[at][rt][0]];for(var mt=1,ot=I[at][rt].length;mt<ot;mt++)h[rt][mt]=+I[at][rt][mt]+nt*b*U[at][rt][mt];h[rt]=h[rt].join(N)}h=h.join(N);break;case"transform":if(U[at].real)for(h=[],rt=0,K=I[at].length;rt<K;rt++)for(h[rt]=[I[at][rt][0]],mt=1,ot=I[at][rt].length;mt<ot;mt++)h[rt][mt]=I[at][rt][mt]+nt*b*U[at][rt][mt];else{var ut=function(Tt){return+I[at][Tt]+nt*b*U[at][Tt]};h=[["m",ut(0),ut(1),ut(2),ut(3),ut(4),ut(5)]]}break;case"csv":if(at=="clip-rect")for(h=[],rt=4;rt--;)h[rt]=+I[at][rt]+nt*b*U[at][rt];break;default:var lt=[][M](I[at]);for(h=[],rt=Q.paper.customAttributes[at].length;rt--;)h[rt]=+lt[rt]+nt*b*U[at][rt]}W[at]=h}Q.attr(W),function(Tt,wt,Ct){setTimeout(function(){o("raphael.anim.frame."+Tt,wt,Ct)})}(Q.id,Q,_.anim)}else{if(function(Tt,wt,Ct){setTimeout(function(){o("raphael.anim.frame."+wt.id,wt,Ct),o("raphael.anim.finish."+wt.id,wt,Ct),l.is(Tt,"function")&&Tt.call(wt)})}(_.callback,Q,_.anim),Q.attr($),bt.splice(v--,1),_.repeat>1&&!_.next){for(m in $)$[y](m)&&(q[m]=_.totalOrigin[m]);_.el.attr(q),tn(_.anim,_.el,_.anim.percents[0],null,_.totalOrigin,_.repeat-1)}_.next&&!_.stop&&tn(_.anim,_.el,_.next,null,_.totalOrigin,_.repeat)}}}bt.length&&ji(ii)},vn=function(f){return f>255?255:f<0?0:f};function pe(f,v,_,h,m,w){var b=3*v,S=3*(h-v)-b,I=1-b-S,U=3*_,$=3*(m-_)-U,Q=1-U-$;function W(q){return((I*q+S)*q+b)*q}return function(q,nt){var at=function(rt,K){var mt,ot,ut,lt,Tt,wt;for(ut=rt,wt=0;wt<8;wt++){if(lt=W(ut)-rt,gt(lt)<K)return ut;if(gt(Tt=(3*I*ut+2*S)*ut+b)<1e-6)break;ut-=lt/Tt}if(ot=1,(ut=rt)<(mt=0))return mt;if(ut>ot)return ot;for(;mt<ot;){if(lt=W(ut),gt(lt-rt)<K)return ut;rt>lt?mt=ut:ot=ut,ut=(ot-mt)/2+mt}return ut}(q,nt);return((Q*at+$)*at+U)*at}(f,1/(200*w))}function le(f,v){var _=[],h={};if(this.ms=v,this.times=1,f){for(var m in f)f[y](m)&&(h[B(m)]=f[m],_.push(B(m)));_.sort(Mt)}this.anim=h,this.top=_[_.length-1],this.percents=_}function tn(f,v,_,h,m,w){_=B(_);var b,S,I,U,$,Q,W=f.ms,q={},nt={},at={};if(h)for(K=0,mt=bt.length;K<mt;K++){var rt=bt[K];if(rt.el.id==v.id&&rt.anim==f){rt.percent!=_?(bt.splice(K,1),I=1):S=rt,v.attr(rt.totalOrigin);break}}else h=+nt;for(var K=0,mt=f.percents.length;K<mt;K++){if(f.percents[K]==_||f.percents[K]>h*f.top){_=f.percents[K],$=f.percents[K-1]||0,W=W/f.top*(_-$),U=f.percents[K+1],b=f.anim[_];break}h&&v.attr(f.anim[f.percents[K]])}if(b){if(S)S.initstatus=h,S.start=new Date-S.ms*h;else{for(var ot in b)if(b[y](ot)&&(Y[y](ot)||v.paper.customAttributes[y](ot)))switch(q[ot]=v.attr(ot),q[ot]==null&&(q[ot]=et[ot]),nt[ot]=b[ot],Y[ot]){case tt:at[ot]=(nt[ot]-q[ot])/W;break;case"colour":q[ot]=l.getRGB(q[ot]);var ut=l.getRGB(nt[ot]);at[ot]={r:(ut.r-q[ot].r)/W,g:(ut.g-q[ot].g)/W,b:(ut.b-q[ot].b)/W};break;case"path":var lt=In(q[ot],nt[ot]),Tt=lt[1];for(q[ot]=lt[0],at[ot]=[],K=0,mt=q[ot].length;K<mt;K++){at[ot][K]=[0];for(var wt=1,Ct=q[ot][K].length;wt<Ct;wt++)at[ot][K][wt]=(Tt[K][wt]-q[ot][K][wt])/W}break;case"transform":var oi=v._,Vi=Mr(oi[ot],nt[ot]);if(Vi)for(q[ot]=Vi.from,nt[ot]=Vi.to,at[ot]=[],at[ot].real=!0,K=0,mt=q[ot].length;K<mt;K++)for(at[ot][K]=[q[ot][K][0]],wt=1,Ct=q[ot][K].length;wt<Ct;wt++)at[ot][K][wt]=(nt[ot][K][wt]-q[ot][K][wt])/W;else{var ce=v.matrix||new We,ze={_:{transform:oi.transform},getBBox:function(){return v.getBBox(1)}};q[ot]=[ce.a,ce.b,ce.c,ce.d,ce.e,ce.f],ei(ze,nt[ot]),nt[ot]=ze._.transform,at[ot]=[(ze.matrix.a-ce.a)/W,(ze.matrix.b-ce.b)/W,(ze.matrix.c-ce.c)/W,(ze.matrix.d-ce.d)/W,(ze.matrix.e-ce.e)/W,(ze.matrix.f-ce.f)/W]}break;case"csv":var li=F(b[ot])[G](g),ci=F(q[ot])[G](g);if(ot=="clip-rect")for(q[ot]=ci,at[ot]=[],K=ci.length;K--;)at[ot][K]=(li[K]-q[ot][K])/W;nt[ot]=li;break;default:for(li=[][M](b[ot]),ci=[][M](q[ot]),at[ot]=[],K=v.paper.customAttributes[ot].length;K--;)at[ot][K]=((li[K]||0)-(ci[K]||0))/W}var zr=b.easing,en=l.easing_formulas[zr];if(!en)if((en=F(zr).match(E))&&en.length==5){var Rn=en;en=function(Ur){return pe(Ur,+Rn[1],+Rn[2],+Rn[3],+Rn[4],W)}}else en=Dt;if(rt={anim:f,percent:_,timestamp:Q=b.start||f.start||+new Date,start:Q+(f.del||0),status:0,initstatus:h||0,stop:!1,ms:W,easing:en,from:q,diff:at,to:nt,el:v,callback:b.callback,prev:$,next:U,repeat:w||f.times,origin:v.attr(),totalOrigin:m},bt.push(rt),h&&!S&&!I&&(rt.stop=!0,rt.start=new Date-W*h,bt.length==1))return ii();I&&(rt.start=new Date-rt.ms*h),bt.length==1&&ji(ii)}o("raphael.anim.start."+v.id,v,f)}}function ri(f){for(var v=0;v<bt.length;v++)bt[v].el.paper==f&&bt.splice(v--,1)}Ot.animateWith=function(f,v,_,h,m,w){if(this.removed)return w&&w.call(this),this;var b=_ instanceof le?_:l.animation(_,h,m,w);tn(b,this,b.percents[0],null,this.attr());for(var S=0,I=bt.length;S<I;S++)if(bt[S].anim==v&&bt[S].el==f){bt[I-1].start=bt[S].start;break}return this},Ot.onAnimation=function(f){return f?o.on("raphael.anim.frame."+this.id,f):o.unbind("raphael.anim.frame."+this.id),this},le.prototype.delay=function(f){var v=new le(this.anim,this.ms);return v.times=this.times,v.del=+f||0,v},le.prototype.repeat=function(f){var v=new le(this.anim,this.ms);return v.del=this.del,v.times=J.floor(dt(f,0))||1,v},l.animation=function(f,v,_,h){if(f instanceof le)return f;!l.is(_,"function")&&_||(h=h||_||null,_=null),f=Object(f),v=+v||0;var m,w,b={};for(w in f)f[y](w)&&B(w)!=w&&B(w)+"%"!=w&&(m=!0,b[w]=f[w]);if(m)return _&&(b.easing=_),h&&(b.callback=h),new le({100:b},v);if(h){var S=0;for(var I in f){var U=V(I);f[y](I)&&U>S&&(S=U)}!f[S+="%"].callback&&(f[S].callback=h)}return new le(f,v)},Ot.animate=function(f,v,_,h){if(this.removed)return h&&h.call(this),this;var m=f instanceof le?f:l.animation(f,v,_,h);return tn(m,this,m.percents[0],null,this.attr()),this},Ot.setTime=function(f,v){return f&&v!=null&&this.status(f,ft(v,f.ms)/f.ms),this},Ot.status=function(f,v){var _,h,m=[],w=0;if(v!=null)return tn(f,this,-1,ft(v,1)),this;for(_=bt.length;w<_;w++)if((h=bt[w]).el.id==this.id&&(!f||h.anim==f)){if(f)return h.status;m.push({anim:h.anim,status:h.status})}return f?0:m},Ot.pause=function(f){for(var v=0;v<bt.length;v++)bt[v].el.id!=this.id||f&&bt[v].anim!=f||o("raphael.anim.pause."+this.id,this,bt[v].anim)!==!1&&(bt[v].paused=!0);return this},Ot.resume=function(f){for(var v=0;v<bt.length;v++)if(bt[v].el.id==this.id&&(!f||bt[v].anim==f)){var _=bt[v];o("raphael.anim.resume."+this.id,this,_.anim)!==!1&&(delete _.paused,this.status(_.anim,_.status))}return this},Ot.stop=function(f){for(var v=0;v<bt.length;v++)bt[v].el.id!=this.id||f&&bt[v].anim!=f||o("raphael.anim.stop."+this.id,this,bt[v].anim)!==!1&&bt.splice(v--,1);return this},o.on("raphael.remove",ri),o.on("raphael.clear",ri),Ot.toString=function(){return"Raphaël’s object"};var si,ai,xe,be,Ln=function(f){if(this.items=[],this.length=0,this.type="set",f)for(var v=0,_=f.length;v<_;v++)!f[v]||f[v].constructor!=Ot.constructor&&f[v].constructor!=Ln||(this[this.items.length]=this.items[this.items.length]=f[v],this.length++)},Xt=Ln.prototype;for(var Dn in Xt.push=function(){for(var f,v,_=0,h=arguments.length;_<h;_++)!(f=arguments[_])||f.constructor!=Ot.constructor&&f.constructor!=Ln||(this[v=this.items.length]=this.items[v]=f,this.length++);return this},Xt.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Xt.forEach=function(f,v){for(var _=0,h=this.items.length;_<h;_++)if(f.call(v,this.items[_],_)===!1)return this;return this},Ot)Ot[y](Dn)&&(Xt[Dn]=function(f){return function(){var v=arguments;return this.forEach(function(_){_[f][P](_,v)})}}(Dn));return Xt.attr=function(f,v){if(f&&l.is(f,st)&&l.is(f[0],"object"))for(var _=0,h=f.length;_<h;_++)this.items[_].attr(f[_]);else for(var m=0,w=this.items.length;m<w;m++)this.items[m].attr(f,v);return this},Xt.clear=function(){for(;this.length;)this.pop()},Xt.splice=function(f,v,_){f=f<0?dt(this.length+f,0):f,v=dt(0,ft(this.length-f,v));var h,m=[],w=[],b=[];for(h=2;h<arguments.length;h++)b.push(arguments[h]);for(h=0;h<v;h++)w.push(this[f+h]);for(;h<this.length-f;h++)m.push(this[f+h]);var S=b.length;for(h=0;h<S+m.length;h++)this.items[f+h]=this[f+h]=h<S?b[h]:m[h-S];for(h=this.items.length=this.length-=v-S;this[h];)delete this[h++];return new Ln(w)},Xt.exclude=function(f){for(var v=0,_=this.length;v<_;v++)if(this[v]==f)return this.splice(v,1),!0},Xt.animate=function(f,v,_,h){(l.is(_,"function")||!_)&&(h=_||null);var m,w,b=this.items.length,S=b,I=this;if(!b)return this;h&&(w=function(){!--b&&h.call(I)}),_=l.is(_,"string")?_:w;var U=l.animation(f,v,_,w);for(m=this.items[--S].animate(U);S--;)this.items[S]&&!this.items[S].removed&&this.items[S].animateWith(m,U,U),this.items[S]&&!this.items[S].removed||b--;return this},Xt.insertAfter=function(f){for(var v=this.items.length;v--;)this.items[v].insertAfter(f);return this},Xt.getBBox=function(){for(var f=[],v=[],_=[],h=[],m=this.items.length;m--;)if(!this.items[m].removed){var w=this.items[m].getBBox();f.push(w.x),v.push(w.y),_.push(w.x+w.width),h.push(w.y+w.height)}return{x:f=ft[P](0,f),y:v=ft[P](0,v),x2:_=dt[P](0,_),y2:h=dt[P](0,h),width:_-f,height:h-v}},Xt.clone=function(f){f=this.paper.set();for(var v=0,_=this.items.length;v<_;v++)f.push(this.items[v].clone());return f},Xt.toString=function(){return"Raphaël‘s set"},Xt.glow=function(f){var v=this.paper.set();return this.forEach(function(_,h){var m=_.glow(f);m?.forEach(function(w,b){v.push(w)})}),v},Xt.isPointInside=function(f,v){var _=!1;return this.forEach(function(h){if(h.isPointInside(f,v))return _=!0,!1}),_},l.registerFont=function(f){if(!f.face)return f;this.fonts=this.fonts||{};var v={w:f.w,face:{},glyphs:{}},_=f.face["font-family"];for(var h in f.face)f.face[y](h)&&(v.face[h]=f.face[h]);if(this.fonts[_]?this.fonts[_].push(v):this.fonts[_]=[v],!f.svg){for(var m in v.face["units-per-em"]=V(f.face["units-per-em"],10),f.glyphs)if(f.glyphs[y](m)){var w=f.glyphs[m];if(v.glyphs[m]={w:w.w,k:{},d:w.d&&"M"+w.d.replace(/[mlcxtrv]/g,function(S){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[S]||"M"})+"z"},w.k)for(var b in w.k)w[y](b)&&(v.glyphs[m].k[b]=w.k[b])}}return f},u.getFont=function(f,v,_,h){if(h=h||"normal",_=_||"normal",v=+v||{normal:400,bold:700,lighter:300,bolder:800}[v]||400,l.fonts){var m,w=l.fonts[f];if(!w){var b=new RegExp("(^|\\s)"+f.replace(/[^\w\d\s+!~.:_-]/g,z)+"(\\s|$)","i");for(var S in l.fonts)if(l.fonts[y](S)&&b.test(S)){w=l.fonts[S];break}}if(w)for(var I=0,U=w.length;I<U&&((m=w[I]).face["font-weight"]!=v||m.face["font-style"]!=_&&m.face["font-style"]||m.face["font-stretch"]!=h);I++);return m}},u.print=function(f,v,_,h,m,w,b,S){w=w||"middle",b=dt(ft(b||0,1),-1),S=dt(ft(S||1,3),1);var I,U=F(_)[G](z),$=0,Q=0,W=z;if(l.is(h,"string")&&(h=this.getFont(h)),h){I=(m||16)/h.face["units-per-em"];for(var q=h.face.bbox[G](g),nt=+q[0],at=q[3]-q[1],rt=0,K=+q[1]+(w=="baseline"?at+ +h.face.descent:at/2),mt=0,ot=U.length;mt<ot;mt++){if(U[mt]==`
|
|
19
|
-
`)
|
|
20
|
-
You are running Raphaël `+this.version};var
|
|
21
|
-
`),et=[],Y=0,it=j.length;Y<it;Y++)V=F("tspan"),Y&&F(V,{dy:1.2*B,x:E.x}),V.appendChild(o._g.doc.createTextNode(j[Y])),R.appendChild(V),et[Y]=V}else for(Y=0,it=(et=R.getElementsByTagName("tspan")).length;Y<it;Y++)Y?F(et[Y],{dy:1.2*B,x:E.x}):F(et[0],{dy:0});F(R,{x:E.x,y:E.y}),L._.dirty=1;var pt=L._getBBox(),vt=E.y-(pt.y+pt.height/2);vt&&o.is(vt,"finite")&&F(et[0],{dy:vt})}},kt=function(L){return L.parentNode&&L.parentNode.tagName.toLowerCase()==="a"?L.parentNode:L},St=function(L,k){this[0]=this.node=L,L.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),L.raphaelid=this.id,this.matrix=o.matrix(),this.realPath=null,this.paper=k,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!k.bottom&&(k.bottom=this),this.prev=k.top,k.top&&(k.top.next=this),k.top=this,this.next=null},tt=o.el;St.prototype=tt,tt.constructor=St,o._engine.path=function(L,k){var E=F("path");k.canvas&&k.canvas.appendChild(E);var R=new St(E,k);return R.type="path",ft(R,{fill:"none",stroke:"#000",path:L}),R},tt.rotate=function(L,k,E){if(this.removed)return this;if((L=c(L).split(C)).length-1&&(k=u(L[1]),E=u(L[2])),L=u(L[0]),E==null&&(k=E),k==null||E==null){var R=this.getBBox(1);k=R.x+R.width/2,E=R.y+R.height/2}return this.transform(this._.transform.concat([["r",L,k,E]])),this},tt.scale=function(L,k,E,R){if(this.removed)return this;if((L=c(L).split(C)).length-1&&(k=u(L[1]),E=u(L[2]),R=u(L[3])),L=u(L[0]),k==null&&(k=L),R==null&&(E=R),E==null||R==null)var B=this.getBBox(1);return E=E??B.x+B.width/2,R=R??B.y+B.height/2,this.transform(this._.transform.concat([["s",L,k,E,R]])),this},tt.translate=function(L,k){return this.removed?this:((L=c(L).split(C)).length-1&&(k=u(L[1])),L=u(L[0])||0,k=+k||0,this.transform(this._.transform.concat([["t",L,k]])),this)},tt.transform=function(L){var k=this._;if(L==null)return k.transform;if(o._extractTransform(this,L),this.clip&&F(this.clip,{transform:this.matrix.invert()}),this.pattern&&Z(this),this.node&&F(this.node,{transform:this.matrix}),k.sx!=1||k.sy!=1){var E=this.attrs[l]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":E})}return this},tt.hide=function(){return this.removed||(this.node.style.display="none"),this},tt.show=function(){return this.removed||(this.node.style.display=""),this},tt.remove=function(){var L=kt(this.node);if(!this.removed&&L.parentNode){var k=this.paper;for(var E in k.__set__&&k.__set__.exclude(this),A.unbind("raphael.*.*."+this.id),this.gradient&&k.defs.removeChild(this.gradient),o._tear(this,k),L.parentNode.removeChild(L),this.removeData(),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},tt._getBBox=function(){if(this.node.style.display=="none"){this.show();var L=!0}var k,E=!1;this.paper.canvas.parentElement?k=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(k=this.paper.canvas.parentNode.style),k&&k.display=="none"&&(E=!0,k.display="");var R={};try{R=this.node.getBBox()}catch{R={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{R=R||{},E&&(k.display="none")}return L&&this.hide(),R},tt.attr=function(L,k){if(this.removed)return this;if(L==null){var E={};for(var R in this.attrs)this.attrs[l](R)&&(E[R]=this.attrs[R]);return E.gradient&&E.fill=="none"&&(E.fill=E.gradient)&&delete E.gradient,E.transform=this._.transform,E}if(k==null&&o.is(L,"string")){if(L=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(L=="transform")return this._.transform;for(var B=L.split(C),V={},j=0,et=B.length;j<et;j++)(L=B[j])in this.attrs?V[L]=this.attrs[L]:o.is(this.paper.customAttributes[L],"function")?V[L]=this.paper.customAttributes[L].def:V[L]=o._availableAttrs[L];return et-1?V:V[B[0]]}if(k==null&&o.is(L,"array")){for(V={},j=0,et=L.length;j<et;j++)V[L[j]]=this.attr(L[j]);return V}if(k!=null){var Y={};Y[L]=k}else L!=null&&o.is(L,"object")&&(Y=L);for(var it in Y)A("raphael.attr."+it+"."+this.id,this,Y[it]);for(it in this.paper.customAttributes)if(this.paper.customAttributes[l](it)&&Y[l](it)&&o.is(this.paper.customAttributes[it],"function")){var pt=this.paper.customAttributes[it].apply(this,[].concat(Y[it]));for(var vt in this.attrs[it]=Y[it],pt)pt[l](vt)&&(Y[vt]=pt[vt])}return ft(this,Y),this},tt.toFront=function(){if(this.removed)return this;var L=kt(this.node);L.parentNode.appendChild(L);var k=this.paper;return k.top!=this&&o._tofront(this,k),this},tt.toBack=function(){if(this.removed)return this;var L=kt(this.node),k=L.parentNode;return k.insertBefore(L,k.firstChild),o._toback(this,this.paper),this.paper,this},tt.insertAfter=function(L){if(this.removed||!L)return this;var k=kt(this.node),E=kt(L.node||L[L.length-1].node);return E.nextSibling?E.parentNode.insertBefore(k,E.nextSibling):E.parentNode.appendChild(k),o._insertafter(this,L,this.paper),this},tt.insertBefore=function(L){if(this.removed||!L)return this;var k=kt(this.node),E=kt(L.node||L[0].node);return E.parentNode.insertBefore(k,E),o._insertbefore(this,L,this.paper),this},tt.blur=function(L){var k=this;if(+L!=0){var E=F("filter"),R=F("feGaussianBlur");k.attrs.blur=L,E.id=o.createUUID(),F(R,{stdDeviation:+L||1.5}),E.appendChild(R),k.paper.defs.appendChild(E),k._blur=E,F(k.node,{filter:"url(#"+E.id+")"})}else k._blur&&(k._blur.parentNode.removeChild(k._blur),delete k._blur,delete k.attrs.blur),k.node.removeAttribute("filter");return k},o._engine.circle=function(L,k,E,R){var B=F("circle");L.canvas&&L.canvas.appendChild(B);var V=new St(B,L);return V.attrs={cx:k,cy:E,r:R,fill:"none",stroke:"#000"},V.type="circle",F(B,V.attrs),V},o._engine.rect=function(L,k,E,R,B,V){var j=F("rect");L.canvas&&L.canvas.appendChild(j);var et=new St(j,L);return et.attrs={x:k,y:E,width:R,height:B,rx:V||0,ry:V||0,fill:"none",stroke:"#000"},et.type="rect",F(j,et.attrs),et},o._engine.ellipse=function(L,k,E,R,B){var V=F("ellipse");L.canvas&&L.canvas.appendChild(V);var j=new St(V,L);return j.attrs={cx:k,cy:E,rx:R,ry:B,fill:"none",stroke:"#000"},j.type="ellipse",F(V,j.attrs),j},o._engine.image=function(L,k,E,R,B,V){var j=F("image");F(j,{x:E,y:R,width:B,height:V,preserveAspectRatio:"none"}),j.setAttributeNS(D,"href",k),L.canvas&&L.canvas.appendChild(j);var et=new St(j,L);return et.attrs={x:E,y:R,width:B,height:V,src:k},et.type="image",et},o._engine.text=function(L,k,E,R){var B=F("text");L.canvas&&L.canvas.appendChild(B);var V=new St(B,L);return V.attrs={x:k,y:E,"text-anchor":"middle",text:R,"font-family":o._availableAttrs["font-family"],"font-size":o._availableAttrs["font-size"],stroke:"none",fill:"#000"},V.type="text",ft(V,V.attrs),V},o._engine.setSize=function(L,k){return this.width=L||this.width,this.height=k||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},o._engine.create=function(){var L=o._getContainer.apply(0,arguments),k=L&&L.container;if(!k)throw new Error("SVG container not found.");var E,R=L.x,B=L.y,V=L.width,j=L.height,et=F("svg"),Y="overflow:hidden;";return R=R||0,B=B||0,F(et,{height:j=j||342,version:1.1,width:V=V||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),k==1?(et.style.cssText=Y+"position:absolute;left:"+R+"px;top:"+B+"px",o._g.doc.body.appendChild(et),E=1):(et.style.cssText=Y+"position:relative",k.firstChild?k.insertBefore(et,k.firstChild):k.appendChild(et)),(k=new o._Paper).width=V,k.height=j,k.canvas=et,k.clear(),k._left=k._top=0,E&&(k.renderfix=function(){}),k.renderfix(),k},o._engine.setViewBox=function(L,k,E,R,B){A("raphael.setViewBox",this,this._viewBox,[L,k,E,R,B]);var V,j,et=this.getSize(),Y=d(E/et.width,R/et.height),it=this.top,pt=B?"xMidYMid meet":"xMinYMin";for(L==null?(this._vbSize&&(Y=1),delete this._vbSize,V="0 0 "+this.width+M+this.height):(this._vbSize=Y,V=L+M+k+M+E+M+R),F(this.canvas,{viewBox:V,preserveAspectRatio:pt});Y&⁢)j="stroke-width"in it.attrs?it.attrs["stroke-width"]:1,it.attr({"stroke-width":j}),it._.dirty=1,it._.dirtyT=1,it=it.prev;return this._viewBox=[L,k,E,R,!!B],this},o.prototype.renderfix=function(){var L,k=this.canvas,E=k.style;try{L=k.getScreenCTM()||k.createSVGMatrix()}catch{L=k.createSVGMatrix()}var R=-L.e%1,B=-L.f%1;(R||B)&&(R&&(this._left=(this._left+R)%1,E.left=this._left+"px"),B&&(this._top=(this._top+B)%1,E.top=this._top+"px"))},o.prototype.clear=function(){o.eve("raphael.clear",this);for(var L=this.canvas;L.firstChild;)L.removeChild(L.firstChild);this.bottom=this.top=null,(this.desc=F("desc")).appendChild(o._g.doc.createTextNode("Created with Raphaël "+o.version)),L.appendChild(this.desc),L.appendChild(this.defs=F("defs"))},o.prototype.remove=function(){for(var L in A("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[L]=typeof this[L]=="function"?o._removedFactory(L):null};var st=o.st;for(var ht in tt)tt[l](ht)&&!st[l](ht)&&(st[ht]=function(L){return function(){var k=arguments;return this.forEach(function(E){E[L].apply(E,k)})}}(ht))}}.apply(i,s))===void 0||(e.exports=a)},function(e,i,r){var s,a;s=[r(0)],(a=function(o){if(!o||o.vml){var l="hasOwnProperty",c=String,u=parseFloat,g=Math,p=g.round,d=g.max,y=g.min,x=g.abs,C=/[, ]+/,A=o.eve,P=" ",M="",D={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},z=/([clmz]),?([^clmz]*)/gi,N=/ progid:\S+Blur\([^\)]+\)/g,F=/-?[^,\s-]+/g,G="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",H=21600,Z={path:1,rect:1,image:1},X={circle:1,ellipse:1},J=function(k,E,R){var B=o.matrix();return B.rotate(-k,.5,.5),{dx:B.x(E,R),dy:B.y(E,R)}},dt=function(k,E,R,B,V,j){var et=k._,Y=k.matrix,it=et.fillpos,pt=k.node,vt=pt.style,yt=1,At="",xt=H/E,It=H/R;if(vt.visibility="hidden",E&&R){if(pt.coordsize=x(xt)+P+x(It),vt.rotation=j*(E*R<0?-1:1),j){var Mt=J(j,B,V);B=Mt.dx,V=Mt.dy}if(E<0&&(At+="x"),R<0&&(At+=" y")&&(yt=-1),vt.flip=At,pt.coordorigin=B*-xt+P+V*-It,it||et.fillsize){var Dt=pt.getElementsByTagName("fill");Dt=Dt&&Dt[0],pt.removeChild(Dt),it&&(Mt=J(j,Y.x(it[0],it[1]),Y.y(it[0],it[1])),Dt.position=Mt.dx*yt+P+Mt.dy*yt),et.fillsize&&(Dt.size=et.fillsize[0]*x(E)+P+et.fillsize[1]*x(R)),pt.appendChild(Dt)}vt.visibility="visible"}};o.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
|
|
22
|
-
You are running Raphaël `+this.version};var ft,gt=function(k,E,R){for(var B=c(E).toLowerCase().split("-"),V=R?"end":"start",j=B.length,et="classic",Y="medium",it="medium";j--;)switch(B[j]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":et=B[j];break;case"wide":case"narrow":it=B[j];break;case"long":case"short":Y=B[j]}var pt=k.node.getElementsByTagName("stroke")[0];pt[V+"arrow"]=et,pt[V+"arrowlength"]=Y,pt[V+"arrowwidth"]=it},kt=function(k,E){k.attrs=k.attrs||{};var R=k.node,B=k.attrs,V=R.style,j=Z[k.type]&&(E.x!=B.x||E.y!=B.y||E.width!=B.width||E.height!=B.height||E.cx!=B.cx||E.cy!=B.cy||E.rx!=B.rx||E.ry!=B.ry||E.r!=B.r),et=X[k.type]&&(B.cx!=E.cx||B.cy!=E.cy||B.r!=E.r||B.rx!=E.rx||B.ry!=E.ry),Y=k;for(var it in E)E[l](it)&&(B[it]=E[it]);if(j&&(B.path=o._getPath[k.type](k),k._.dirty=1),E.href&&(R.href=E.href),E.title&&(R.title=E.title),E.target&&(R.target=E.target),E.cursor&&(V.cursor=E.cursor),"blur"in E&&k.blur(E.blur),(E.path&&k.type=="path"||j)&&(R.path=function($t){var Re=/[ahqstv]/gi,un=o._pathToAbsolute;if(c($t).match(Re)&&(un=o._path2curve),Re=/[clmz]/g,un==o._pathToAbsolute&&!c($t).match(Re)){var ae=c($t).replace(z,function(Ar,pn,Ze){var Oe=[],Qn=pn.toLowerCase()=="m",$e=D[pn];return Ze.replace(F,function(qe){Qn&&Oe.length==2&&($e+=Oe+D[pn=="m"?"l":"L"],Oe=[]),Oe.push(p(qe*H))}),$e+Oe});return ae}var Ee,de,Pn=un($t);ae=[];for(var Ye=0,dn=Pn.length;Ye<dn;Ye++){Ee=Pn[Ye],(de=Pn[Ye][0].toLowerCase())=="z"&&(de="x");for(var we=1,Qt=Ee.length;we<Qt;we++)de+=p(Ee[we]*H)+(we!=Qt-1?",":M);ae.push(de)}return ae.join(P)}(~c(B.path).toLowerCase().indexOf("r")?o._pathToAbsolute(B.path):B.path),k._.dirty=1,k.type=="image"&&(k._.fillpos=[B.x,B.y],k._.fillsize=[B.width,B.height],dt(k,1,1,0,0,0))),"transform"in E&&k.transform(E.transform),et){var pt=+B.cx,vt=+B.cy,yt=+B.rx||+B.r||0,At=+B.ry||+B.r||0;R.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",p((pt-yt)*H),p((vt-At)*H),p((pt+yt)*H),p((vt+At)*H),p(pt*H)),k._.dirty=1}if("clip-rect"in E){var xt=c(E["clip-rect"]).split(C);if(xt.length==4){xt[2]=+xt[2]+ +xt[0],xt[3]=+xt[3]+ +xt[1];var It=R.clipRect||o._g.doc.createElement("div"),Mt=It.style;Mt.clip=o.format("rect({1}px {2}px {3}px {0}px)",xt),R.clipRect||(Mt.position="absolute",Mt.top=0,Mt.left=0,Mt.width=k.paper.width+"px",Mt.height=k.paper.height+"px",R.parentNode.insertBefore(It,R),It.appendChild(R),R.clipRect=It)}E["clip-rect"]||R.clipRect&&(R.clipRect.style.clip="auto")}if(k.textpath){var Dt=k.textpath.style;E.font&&(Dt.font=E.font),E["font-family"]&&(Dt.fontFamily='"'+E["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,M)+'"'),E["font-size"]&&(Dt.fontSize=E["font-size"]),E["font-weight"]&&(Dt.fontWeight=E["font-weight"]),E["font-style"]&&(Dt.fontStyle=E["font-style"])}if("arrow-start"in E&>(Y,E["arrow-start"]),"arrow-end"in E&>(Y,E["arrow-end"],1),E.opacity!=null||E.fill!=null||E.src!=null||E.stroke!=null||E["stroke-width"]!=null||E["stroke-opacity"]!=null||E["fill-opacity"]!=null||E["stroke-dasharray"]!=null||E["stroke-miterlimit"]!=null||E["stroke-linejoin"]!=null||E["stroke-linecap"]!=null){var _t=R.getElementsByTagName("fill");if(!(_t=_t&&_t[0])&&(_t=ft("fill")),k.type=="image"&&E.src&&(_t.src=E.src),E.fill&&(_t.on=!0),_t.on!=null&&E.fill!="none"&&E.fill!==null||(_t.on=!1),_t.on&&E.fill){var Nt=c(E.fill).match(o._ISURL);if(Nt){_t.parentNode==R&&R.removeChild(_t),_t.rotate=!0,_t.src=Nt[1],_t.type="tile";var Rt=k.getBBox(1);_t.position=Rt.x+P+Rt.y,k._.fillpos=[Rt.x,Rt.y],o._preload(Nt[1],function(){k._.fillsize=[this.offsetWidth,this.offsetHeight]})}else _t.color=o.getRGB(E.fill).hex,_t.src=M,_t.type="solid",o.getRGB(E.fill).error&&(Y.type in{circle:1,ellipse:1}||c(E.fill).charAt()!="r")&&St(Y,E.fill,_t)&&(B.fill="none",B.gradient=E.fill,_t.rotate=!1)}if("fill-opacity"in E||"opacity"in E){var Vt=((+B["fill-opacity"]+1||2)-1)*((+B.opacity+1||2)-1)*((+o.getRGB(E.fill).o+1||2)-1);Vt=y(d(Vt,0),1),_t.opacity=Vt,_t.src&&(_t.color="none")}R.appendChild(_t);var zt=R.getElementsByTagName("stroke")&&R.getElementsByTagName("stroke")[0],ie=!1;!zt&&(ie=zt=ft("stroke")),(E.stroke&&E.stroke!="none"||E["stroke-width"]||E["stroke-opacity"]!=null||E["stroke-dasharray"]||E["stroke-miterlimit"]||E["stroke-linejoin"]||E["stroke-linecap"])&&(zt.on=!0),(E.stroke=="none"||E.stroke===null||zt.on==null||E.stroke==0||E["stroke-width"]==0)&&(zt.on=!1);var Wt=o.getRGB(E.stroke);zt.on&&E.stroke&&(zt.color=Wt.hex),Vt=((+B["stroke-opacity"]+1||2)-1)*((+B.opacity+1||2)-1)*((+Wt.o+1||2)-1);var Me=.75*(u(E["stroke-width"])||1);if(Vt=y(d(Vt,0),1),E["stroke-width"]==null&&(Me=B["stroke-width"]),E["stroke-width"]&&(zt.weight=Me),Me&&Me<1&&(Vt*=Me)&&(zt.weight=1),zt.opacity=Vt,E["stroke-linejoin"]&&(zt.joinstyle=E["stroke-linejoin"]||"miter"),zt.miterlimit=E["stroke-miterlimit"]||8,E["stroke-linecap"]&&(zt.endcap=E["stroke-linecap"]=="butt"?"flat":E["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in E){var fn={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};zt.dashstyle=fn[l](E["stroke-dasharray"])?fn[E["stroke-dasharray"]]:M}ie&&R.appendChild(zt)}if(Y.type=="text"){Y.paper.canvas.style.display=M;var Ce=Y.paper.span,Ve=B.font&&B.font.match(/\d+(?:\.\d*)?(?=px)/);V=Ce.style,B.font&&(V.font=B.font),B["font-family"]&&(V.fontFamily=B["font-family"]),B["font-weight"]&&(V.fontWeight=B["font-weight"]),B["font-style"]&&(V.fontStyle=B["font-style"]),Ve=u(B["font-size"]||Ve&&Ve[0])||10,V.fontSize=100*Ve+"px",Y.textpath.string&&(Ce.innerHTML=c(Y.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var Xe=Ce.getBoundingClientRect();Y.W=B.w=(Xe.right-Xe.left)/100,Y.H=B.h=(Xe.bottom-Xe.top)/100,Y.X=B.x,Y.Y=B.y+Y.H/2,("x"in E||"y"in E)&&(Y.path.v=o.format("m{0},{1}l{2},{1}",p(B.x*H),p(B.y*H),p(B.x*H)+1));for(var Le=["x","y","text","font","font-family","font-weight","font-style","font-size"],De=0,Kn=Le.length;De<Kn;De++)if(Le[De]in E){Y._.dirty=1;break}switch(B["text-anchor"]){case"start":Y.textpath.style["v-text-align"]="left",Y.bbx=Y.W/2;break;case"end":Y.textpath.style["v-text-align"]="right",Y.bbx=-Y.W/2;break;default:Y.textpath.style["v-text-align"]="center",Y.bbx=0}Y.textpath.style["v-text-kern"]=!0}},St=function(k,E,R){k.attrs=k.attrs||{},k.attrs;var B=Math.pow,V="linear",j=".5 .5";if(k.attrs.gradient=E,E=(E=c(E).replace(o._radial_gradient,function(yt,At,xt){return V="radial",At&&xt&&(At=u(At),xt=u(xt),B(At-.5,2)+B(xt-.5,2)>.25&&(xt=g.sqrt(.25-B(At-.5,2))*(2*(xt>.5)-1)+.5),j=At+P+xt),M})).split(/\s*\-\s*/),V=="linear"){var et=E.shift();if(et=-u(et),isNaN(et))return null}var Y=o._parseDots(E);if(!Y)return null;if(k=k.shape||k.node,Y.length){k.removeChild(R),R.on=!0,R.method="none",R.color=Y[0].color,R.color2=Y[Y.length-1].color;for(var it=[],pt=0,vt=Y.length;pt<vt;pt++)Y[pt].offset&&it.push(Y[pt].offset+P+Y[pt].color);R.colors=it.length?it.join():"0% "+R.color,V=="radial"?(R.type="gradientTitle",R.focus="100%",R.focussize="0 0",R.focusposition=j,R.angle=0):(R.type="gradient",R.angle=(270-et)%360),k.appendChild(R)}return 1},tt=function(k,E){this[0]=this.node=k,k.raphael=!0,this.id=o._oid++,k.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=E,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},st=o.el;tt.prototype=st,st.constructor=tt,st.transform=function(k){if(k==null)return this._.transform;var E,R=this.paper._viewBoxShift,B=R?"s"+[R.scale,R.scale]+"-1-1t"+[R.dx,R.dy]:M;R&&(E=k=c(k).replace(/\.{3}|\u2026/g,this._.transform||M)),o._extractTransform(this,B+k);var V,j=this.matrix.clone(),et=this.skew,Y=this.node,it=~c(this.attrs.fill).indexOf("-"),pt=!c(this.attrs.fill).indexOf("url(");if(j.translate(1,1),pt||it||this.type=="image")if(et.matrix="1 0 0 1",et.offset="0 0",V=j.split(),it&&V.noRotation||!V.isSimple){Y.style.filter=j.toFilter();var vt=this.getBBox(),yt=this.getBBox(1),At=vt.x-yt.x,xt=vt.y-yt.y;Y.coordorigin=At*-H+P+xt*-H,dt(this,1,1,At,xt,0)}else Y.style.filter=M,dt(this,V.scalex,V.scaley,V.dx,V.dy,V.rotate);else Y.style.filter=M,et.matrix=c(j),et.offset=j.offset();return E!==null&&(this._.transform=E,o._extractTransform(this,E)),this},st.rotate=function(k,E,R){if(this.removed)return this;if(k!=null){if((k=c(k).split(C)).length-1&&(E=u(k[1]),R=u(k[2])),k=u(k[0]),R==null&&(E=R),E==null||R==null){var B=this.getBBox(1);E=B.x+B.width/2,R=B.y+B.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",k,E,R]])),this}},st.translate=function(k,E){return this.removed?this:((k=c(k).split(C)).length-1&&(E=u(k[1])),k=u(k[0])||0,E=+E||0,this._.bbox&&(this._.bbox.x+=k,this._.bbox.y+=E),this.transform(this._.transform.concat([["t",k,E]])),this)},st.scale=function(k,E,R,B){if(this.removed)return this;if((k=c(k).split(C)).length-1&&(E=u(k[1]),R=u(k[2]),B=u(k[3]),isNaN(R)&&(R=null),isNaN(B)&&(B=null)),k=u(k[0]),E==null&&(E=k),B==null&&(R=B),R==null||B==null)var V=this.getBBox(1);return R=R??V.x+V.width/2,B=B??V.y+V.height/2,this.transform(this._.transform.concat([["s",k,E,R,B]])),this._.dirtyT=1,this},st.hide=function(){return!this.removed&&(this.node.style.display="none"),this},st.show=function(){return!this.removed&&(this.node.style.display=M),this},st.auxGetBBox=o.el.getBBox,st.getBBox=function(){var k=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var E={},R=1/this.paper._viewBoxShift.scale;return E.x=k.x-this.paper._viewBoxShift.dx,E.x*=R,E.y=k.y-this.paper._viewBoxShift.dy,E.y*=R,E.width=k.width*R,E.height=k.height*R,E.x2=E.x+E.width,E.y2=E.y+E.height,E}return k},st._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},st.remove=function(){if(!this.removed&&this.node.parentNode){for(var k in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[k]=typeof this[k]=="function"?o._removedFactory(k):null;this.removed=!0}},st.attr=function(k,E){if(this.removed)return this;if(k==null){var R={};for(var B in this.attrs)this.attrs[l](B)&&(R[B]=this.attrs[B]);return R.gradient&&R.fill=="none"&&(R.fill=R.gradient)&&delete R.gradient,R.transform=this._.transform,R}if(E==null&&o.is(k,"string")){if(k=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var V=k.split(C),j={},et=0,Y=V.length;et<Y;et++)(k=V[et])in this.attrs?j[k]=this.attrs[k]:o.is(this.paper.customAttributes[k],"function")?j[k]=this.paper.customAttributes[k].def:j[k]=o._availableAttrs[k];return Y-1?j:j[V[0]]}if(this.attrs&&E==null&&o.is(k,"array")){for(j={},et=0,Y=k.length;et<Y;et++)j[k[et]]=this.attr(k[et]);return j}var it;for(var pt in E!=null&&((it={})[k]=E),E==null&&o.is(k,"object")&&(it=k),it)A("raphael.attr."+pt+"."+this.id,this,it[pt]);if(it){for(pt in this.paper.customAttributes)if(this.paper.customAttributes[l](pt)&&it[l](pt)&&o.is(this.paper.customAttributes[pt],"function")){var vt=this.paper.customAttributes[pt].apply(this,[].concat(it[pt]));for(var yt in this.attrs[pt]=it[pt],vt)vt[l](yt)&&(it[yt]=vt[yt])}it.text&&this.type=="text"&&(this.textpath.string=it.text),kt(this,it)}return this},st.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},st.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},st.insertAfter=function(k){return this.removed?this:(k.constructor==o.st.constructor&&(k=k[k.length-1]),k.node.nextSibling?k.node.parentNode.insertBefore(this.node,k.node.nextSibling):k.node.parentNode.appendChild(this.node),o._insertafter(this,k,this.paper),this)},st.insertBefore=function(k){return this.removed?this:(k.constructor==o.st.constructor&&(k=k[0]),k.node.parentNode.insertBefore(this.node,k.node),o._insertbefore(this,k,this.paper),this)},st.blur=function(k){var E=this.node.runtimeStyle,R=E.filter;return R=R.replace(N,M),+k!=0?(this.attrs.blur=k,E.filter=R+P+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+k||1.5)+")",E.margin=o.format("-{0}px 0 0 -{0}px",p(+k||1.5))):(E.filter=R,E.margin=0,delete this.attrs.blur),this},o._engine.path=function(k,E){var R=ft("shape");R.style.cssText=G,R.coordsize=H+P+H,R.coordorigin=E.coordorigin;var B=new tt(R,E),V={fill:"none",stroke:"#000"};k&&(V.path=k),B.type="path",B.path=[],B.Path=M,kt(B,V),E.canvas&&E.canvas.appendChild(R);var j=ft("skew");return j.on=!0,R.appendChild(j),B.skew=j,B.transform(M),B},o._engine.rect=function(k,E,R,B,V,j){var et=o._rectPath(E,R,B,V,j),Y=k.path(et),it=Y.attrs;return Y.X=it.x=E,Y.Y=it.y=R,Y.W=it.width=B,Y.H=it.height=V,it.r=j,it.path=et,Y.type="rect",Y},o._engine.ellipse=function(k,E,R,B,V){var j=k.path();return j.attrs,j.X=E-B,j.Y=R-V,j.W=2*B,j.H=2*V,j.type="ellipse",kt(j,{cx:E,cy:R,rx:B,ry:V}),j},o._engine.circle=function(k,E,R,B){var V=k.path();return V.attrs,V.X=E-B,V.Y=R-B,V.W=V.H=2*B,V.type="circle",kt(V,{cx:E,cy:R,r:B}),V},o._engine.image=function(k,E,R,B,V,j){var et=o._rectPath(R,B,V,j),Y=k.path(et).attr({stroke:"none"}),it=Y.attrs,pt=Y.node,vt=pt.getElementsByTagName("fill")[0];return it.src=E,Y.X=it.x=R,Y.Y=it.y=B,Y.W=it.width=V,Y.H=it.height=j,it.path=et,Y.type="image",vt.parentNode==pt&&pt.removeChild(vt),vt.rotate=!0,vt.src=E,vt.type="tile",Y._.fillpos=[R,B],Y._.fillsize=[V,j],pt.appendChild(vt),dt(Y,1,1,0,0,0),Y},o._engine.text=function(k,E,R,B){var V=ft("shape"),j=ft("path"),et=ft("textpath");E=E||0,R=R||0,B=B||"",j.v=o.format("m{0},{1}l{2},{1}",p(E*H),p(R*H),p(E*H)+1),j.textpathok=!0,et.string=c(B),et.on=!0,V.style.cssText=G,V.coordsize=H+P+H,V.coordorigin="0 0";var Y=new tt(V,k),it={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:B};Y.shape=V,Y.path=j,Y.textpath=et,Y.type="text",Y.attrs.text=c(B),Y.attrs.x=E,Y.attrs.y=R,Y.attrs.w=1,Y.attrs.h=1,kt(Y,it),V.appendChild(et),V.appendChild(j),k.canvas.appendChild(V);var pt=ft("skew");return pt.on=!0,V.appendChild(pt),Y.skew=pt,Y.transform(M),Y},o._engine.setSize=function(k,E){var R=this.canvas.style;return this.width=k,this.height=E,k==+k&&(k+="px"),E==+E&&(E+="px"),R.width=k,R.height=E,R.clip="rect(0 "+k+" "+E+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(k,E,R,B,V){o.eve("raphael.setViewBox",this,this._viewBox,[k,E,R,B,V]);var j,et,Y=this.getSize(),it=Y.width,pt=Y.height;return V&&(R*(j=pt/B)<it&&(k-=(it-R*j)/2/j),B*(et=it/R)<pt&&(E-=(pt-B*et)/2/et)),this._viewBox=[k,E,R,B,!!V],this._viewBoxShift={dx:-k,dy:-E,scale:Y},this.forEach(function(vt){vt.transform("...")}),this},o._engine.initWin=function(k){var E=k.document;E.styleSheets.length<31?E.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):E.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!E.namespaces.rvml&&E.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),ft=function(R){return E.createElement("<rvml:"+R+' class="rvml">')}}catch{ft=function(B){return E.createElement("<"+B+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var k=o._getContainer.apply(0,arguments),E=k.container,R=k.height,B=k.width,V=k.x,j=k.y;if(!E)throw new Error("VML container not found.");var et=new o._Paper,Y=et.canvas=o._g.doc.createElement("div"),it=Y.style;return V=V||0,j=j||0,B=B||512,R=R||342,et.width=B,et.height=R,B==+B&&(B+="px"),R==+R&&(R+="px"),et.coordsize=216e5+P+216e5,et.coordorigin="0 0",et.span=o._g.doc.createElement("span"),et.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",Y.appendChild(et.span),it.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",B,R),E==1?(o._g.doc.body.appendChild(Y),it.left=V+"px",it.top=j+"px",it.position="absolute"):E.firstChild?E.insertBefore(Y,E.firstChild):E.appendChild(Y),et.renderfix=function(){},et},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var k in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[k]=typeof this[k]=="function"?o._removedFactory(k):null;return!0};var ht=o.st;for(var L in st)st[l](L)&&!ht[l](L)&&(ht[L]=function(k){return function(){var E=arguments;return this.forEach(function(R){R[k].apply(R,E)})}}(L))}}.apply(i,s))===void 0||(e.exports=a)}])})})(go);var Fh=go.exports;const Kt=Yi(Fh);class mi{points;constructor(t=[]){this.points=t}toSVGPathData(){const t=[];for(let e=0,i=this.length;e<i;e++)t.push([e===0?"M":"L",this.points[e].x,this.points[e].y]);return t}toSVGPathD(){let t="";for(let e=0,i=this.length;e<i;e++)t+=(e===0?"M":"L")+this.points[e].x+","+this.points[e].y;return t}get length(){return this.points.length}addPoint(t){this.points.push(t)}getPoint(t){return this.points[t]}isContainPoint(t){const e=t.x,i=t.y,r=this.length;let s=!1;const a=2e-10;for(let o=0,l=r-1;o<r;l=o,o++){const c=this.points[o].x,u=this.points[o].y,g=this.points[l].x,p=this.points[l].y;if(c===e&&u===i||g===e&&p===i||i===u&&i===p)return!0;if(i>=u&&i<p||i<u&&i>=p){const d=(g-c)/(p-u),y=c+d*(i-u);if(y===e||Math.abs(y-e)<a)return!0;y>e&&(s=!s)}}return s}[Symbol.iterator](){let t=0;return{next:()=>({value:t>=this.length-1?this.points[++t]:void 0,done:t>=this.length})}}static generateInMultiplePoint(t,e,i,r,s=1){const a=new mi;for(let o=0;o<=s*i;o+=1){const l=Math.floor(o/s)/i*2*Math.PI,c=t+Math.cos(l)*r,u=e+Math.sin(l)*r;a.addPoint(new Te({x:c,y:u}))}return a}}Kt.easing_formulas.swing=function(n){return n+Math.sin(n*Math.PI*2)/2},Kt.easing_formulas.may_cause_seizures=function(n){return n+.2*Math.random()-.1};function zh(n,t,e){let i;return n&&typeof n=="object"&&n.canvas?i=n:n&&(typeof n=="string"||n instanceof HTMLElement)?i=Kt(n,t,e):i=Kt(0,0,t,e),i}Kt.fn.importSVG=function(n,t){const e=Uh.fromRawSVG(n);return e.toRaphael(this,(i,r)=>{e.save(),t&&t(i),r(),e.restore()}),this},Kt.fn.NPolygonPath=function(n,t,e,i,r=2){return{shape:this.path(mi.generateInMultiplePoint(n,t,e,i,r).toSVGPathD()),afterPath:mi.generateInMultiplePoint(n,t,e*r,i,1).toSVGPathD()}},Kt.fn.zoom=function(n=1){return this.setViewBox(0,0,this.width/n,this.height/n),this},Kt.fn.brickwall=function(n,t,e,i,r){for(var s=i/r,a=e/3,o={fill:"firebrick",stroke:"#CCC"},l=0;l<r;l+=1){var c=this.rect(0,0,a,s).attr(o),u=this.rect(0,0,2*a,s).attr(o);l%2?(c.transform("T"+n+","+(t+l*s)),u.transform("T"+(n+a)+","+(t+l*s))):(u.transform("T"+n+","+(t+l*s)),c.transform("T"+(n+2*a)+","+(t+l*s)))}},Kt.fn.rosetta=function(n,t,e,i,r){const s=yn.generateRosetta(n,t,e,i,r);return s.center,this.path(s.toSVGPathD())},Kt.fn.moon=function(n){n=n||{},n.r=typeof n.r=="number"?n.r:100,n.phase=typeof n.phase=="number"?n.phase:.25,n.x=typeof n.x=="number"?n.x:0,n.y=typeof n.y=="number"?n.y:0,this.circle(n.r+n.x,n.r+n.y,n.r).attr({"stroke-width":0,fill:"#999"});function t(i){i=typeof i=="number"?i:.25,i=Math.max(0,Math.min(1,i)),i=(i-.5)*2;let r="M"+n.r+",0";r+="a"+n.r+","+n.r+" 0 0,0 0,"+n.r*2;let s=i>0?0:1;return i=Math.abs(i),i=i||1e-4,n.inner_r=n.r/Math.pow(i,.5),r+="M"+n.r+","+n.r*2,r+="a"+n.inner_r+","+n.inner_r+" 0 0,"+s+" 0,"+n.r*-2,r}var e=this.path(t(n.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+n.x+","+n.y);return{setPhase:function(i){e.attr("path",t(i))}}},Kt.fn.star=function(n,t,e){let i="M"+n+","+(t-e);for(var r=0;r<6;r+=1){const s=270+r*144,a=n+e*Math.cos(s*Math.PI/180),o=t+e*Math.sin(s*Math.PI/180);i+="L"+a+","+o}return this.path(i).attr("stroke-width",0).attr("fill","red")},Kt.fn.heart=function(n=150,t=300){let e="M"+n+","+t;return e+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(e).attr("stroke","red").attr("fill","pink")},Kt.el.redder=function(){const n=Kt.getRGB(this.attr("fill"));n.r+=51,this.attr("fill","rgb("+n.r+","+n.g+","+n.b+")")},Kt.installCustomAttributes=function(n){n.customAttributes.redness=function(t){const e=255*(1-t/100);return{fill:"rgb(255,"+e+", "+e+")"}},n.customAttributes.progress=function(t){const e=this.data("progresspath"),i=this.attr(),r={x:0,y:0},s=this.data("progresstrail");if(!e)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(i,"width")&&(r.x=-this.attr("width")/2,r.y=-this.attr("height")/2);const a=e.getTotalLength(),o=e.getPointAtLength(t*a);return s&&s.attr("path",e.getSubpath(0,t*a)),{transform:"t"+(o.x+r.x)+","+(o.y+r.y)+"r"+o.alpha}}};const us=Kt;class nn{pgs=[];history=[];save(){this.history.push(ha(this.pgs))}restore(){const t=this.history.pop();t&&(this.pgs=t)}get size(){let t=0,e=0;return this.pgs.forEach(i=>{const r=i.pg;if(r){const[s,a,o,l]=r.bounds,[c,u]=r.size;t=Math.max(t,s,s+c,o),e=Math.max(e,a,a+u,l)}}),[Math.ceil(t),Math.ceil(e)]}static fromRawSVG(t){return nn.fromRawSVGUseRappar(t)}static fromRawSVGUseRappar(t){const e=new nn,i=Ja(t);for(let r=0,s=i.length;r<s;r++){const a=i[r];if(a.type=="viewbox"&&a.width&&a.height)continue;const o={attrs:{}};for(const l in a)l==="type"||l==="path"||l==="transform"||(o.attrs[l]=a[l]);switch(a.type){case"path":o.d=a.path,o.pg=yn.fromSVGPathD(a.path,a.transform);break}e.pgs.push(o)}return e}toRaphael(t,e){let i;t instanceof HTMLElement?i=us(HTMLElement):typeof t=="string"?i=us(document.getElementById(t)):i=t;const[r,s]=this.size;i.setSize(r,s);const a=(o=!1)=>{for(let l=0,c=this.pgs.length;l<c;l++){const u=this.pgs[l];if(u.pg&&(u.raphaelPath?u.raphaelPath.attr("path",u.pg.toSVGPathD()):u.raphaelPath=i.path(u.pg.toSVGPathD()),u.raphaelPath.attr(u.attrs)),o&&e){const g=p=>{const{x:d,y}=Ji(i.canvas,p),x=this.pgs.find(C=>C.raphaelPath?.isPointInside(d,y));x&&e?.(x,a)};u.raphaelPath?.unclick(g),u.raphaelPath?.click(g)}}};return a(!0),i}toCanvasOperation(t,e){let i;typeof t=="string"?i=document.getElementById(t):i=t;const[r,s]=this.size;i.width=r,i.height=s;const a=new ds(i),o=()=>{a.clearRect(0,0,r,s);for(let c=0,u=this.pgs.length;c<u;c++){const g=this.pgs[c];g.pg&&(a.save(),this.toCanvasAttrs(a,g.attrs),g.pg.toCanvas(a),g.attrs.stroke!=="none"&&a.stroke(),g.attrs.fill!=="none"&&a.fill(),a.restore())}};o();const l=c=>{const{x:u,y:g}=Ji(a.canvas,c),p=this.pgs.find(d=>d.pg?.isPointInPath(u,g));p&&e?.(p,o)};return i.removeEventListener("click",l),i.addEventListener("click",l),a}toCanvasAttrs(t,e){for(const i in e){const r=e[i];switch(i){case"fill":t.fillStyle=String(r);break;case"stroke":t.strokeStyle=String(r);break;case"stroke-width":t.lineWidth=Number(r);break;case"stroke-linecap":t.lineCap=r;break;case"stroke-linejoin":t.lineJoin=r;break}}}static toDownloadSVGElement(t,e="shape"){jr(ka(t),`${e}.svg`)}toDownloadSVGElement(t,e="shape"){return nn.toDownloadSVGElement(t,e),this}static toDownloadSVGString(t,e="shape"){jr(Hr(t),`${e}.svg`)}toDownloadSVGString(t,e="shape"){return nn.toDownloadSVGString(t,e),this}static getSVGDOM(t){if(t instanceof HTMLObjectElement||t instanceof HTMLIFrameElement)return t.contentDocument;if(t instanceof HTMLEmbedElement)return t.getSVGDocument()}}const Uh=nn;class ds{canvas;context;customContext;constructor(t){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this.customContext=new di({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(t){this.context.lineWidth=t,this.customContext.lineWidth=t}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.context.lineCap=t,this.customContext.lineCap=t}get lineCap(){return this.context.lineCap}set lineJoin(t){this.context.lineJoin=t,this.customContext.lineCap=t}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.context.lineDashOffset=t,this.customContext.lineDashOffset=t}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.context.miterLimit=t,this.customContext.miterLimit=t}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext.globalAlpha=t}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext.fillStyle=t):(this.context.fillStyle=t.gradient,this.customContext.fillStyle=t.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext.strokeStyle=t):(this.context.strokeStyle=t.gradient,this.customContext.strokeStyle=t.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext.font=t}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(t,e,i,r){return this.context.fillRect(t,e,i,r),this.customContext.fillRect(t,e,i,r),this}fillText(t,e,i,r){return this.context.fillText(t,e,i,r),this.customContext.fillText(t,e,i),this}setLineDash(t){return this.context.setLineDash(t),this.customContext.setLineDash(t),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(t,e,i,r){return this.context.strokeText(t,e,i,r),this.customContext.strokeText(t,e,i),this}strokeRect(t,e,i,r){return this.context.strokeRect(t,e,i,r),this.customContext.strokeRect(t,e,i,r),this}clearRect(t=0,e=0,i=this.canvas.width,r=this.canvas.height){return this.context.clearRect(t,e,i,r),this.customContext.clearRect(t,e,i,r),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}isPointInPath(t,e){return this.context.isPointInPath(t,e)}moveTo(t,e){return this.context.moveTo(t,e),this.customContext.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext.lineTo(t,e),this}arc(t,e,i,r,s,a){return this.context.arc(t,e,i,r,s,a),this.customContext.arc(t,e,i,r,s,a?-1:1),this}arcTo(t,e,i,r,s){return this.context.arcTo(t,e,i,r,s),this.customContext.arcTo(t,e,i,r,s),this}quadraticCurveTo(t,e,i,r){return this.context.quadraticCurveTo(t,e,i,r),this.customContext.quadraticCurveTo(t,e,i,r),this}bezierCurveTo(t,e,i,r,s,a){return this.context.bezierCurveTo(t,e,i,r,s,a),this.customContext.bezierCurveTo(t,e,i,r,s,a),this}rect(t,e,i,r){return this.context.rect(t,e,i,r),this.customContext.rect(t,e,i,r),this}translate(t,e){return this.context.translate(t,e),this.customContext.translate(t,e),this}rotate(t){return this.context.rotate(t),this.customContext.rotate(t),this}scale(t,e){return this.context.scale(t,e),this.customContext.scale(t,e),this}createLinearGradient(t,e,i,r,s){const a=this.context.createLinearGradient(t,e,i,r),o=this.customContext.createLinearGradient(t,e,i,r);return s&&Object.keys(s).forEach(l=>{const c=parseFloat(l);a.addColorStop(c,s[c]),o.addColorStop(c,s[c])}),{gradient:a,gradientCustom:o}}createRadialGradient(t,e,i,r,s,a,o){const l=this.context.createRadialGradient(t,e,i,r,s,a),c=this.customContext.createRadialGradient(t,e,i,r,s,a);return o&&Object.keys(o).forEach(u=>{const g=parseFloat(u);l.addColorStop(g,o[g]),c.addColorStop(g,o[g])}),{gradient:l,gradientCustom:c}}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const i=e[0],r=e[1];this.context.drawImage(t,i,r)}else if(e.length===4){const i=e[0],r=e[1],s=e[2],a=e[3];this.context.drawImage(t,i,r,s,a)}else if(e.length===8){const i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7];this.context.drawImage(t,i,r,s,a,o,l,c,u)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext.drawImage(t,...e),this}getImageData(t,e,i,r,s){return this.context.getImageData(t,e,i,r,s)}putImageData(t,e=0,i=0){return this.context.putImageData(t,e,i)}toRawSVG(){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}toSVGOperation(){const{raw:t}=this.toRawSVG();return nn.fromRawSVG(t)}}class mo extends Sc{container;hammer;mousePoint;ctx;removeEventListeners;constructor(t=document.documentElement){super(),this.container=t,this.hammer=new hh(this.container),this.mousePoint=new Te({x:0,y:0}),this.container instanceof HTMLCanvasElement&&(this.ctx=new ds(this.container)),this.removeEventListeners=[this.initEventListeners()],this.on("pointerMove",this.setMousePoint),this.addRemoveWhenDestroy(()=>{this.off("pointerMove",this.setMousePoint)})}destroy(){this.removeEventListeners.forEach(t=>t()),this.removeAllListeners()}addRemoveWhenDestroy(t){this.removeEventListeners.push(t)}setMousePoint(t){const e=Ji(this.container,t);this.mousePoint.x=e.x,this.mousePoint.y=e.y}initEventListeners(){const t=new ResizeObserver(tt=>{const{width:st,height:ht}=tt[0].contentRect;this.emit("resize",st,ht)}),e=tt=>{this.emit("mouseDown",tt),this.container.style.userSelect="none"},i=tt=>{this.emit("mouseUp",tt),this.container.style.userSelect=""},r=tt=>{this.emit("mouseMove",tt)},s=tt=>{this.emit("mouseOver",tt)},a=tt=>{this.emit("mouseOut",tt),this.container.style.userSelect=""},o=tt=>{this.emit("mouseClick",tt)},l=tt=>{this.emit("mouseDoubleClick",tt)},c=tt=>{this.emit("mouseWheel",tt)},u=tt=>{this.emit("mouseContextMenu",tt)},g=tt=>{this.emit("touchStart",tt),this.container.style.userSelect="none"},p=tt=>{this.emit("touchEnd",tt),this.container.style.userSelect=""},d=tt=>{this.emit("touchCancel",tt),this.container.style.userSelect=""},y=tt=>{this.emit("touchMove",tt)},x=tt=>{this.emit("pointerDown",tt),this.container.style.userSelect="none"},C=tt=>{this.emit("pointerUp",tt),this.container.style.userSelect=""},A=tt=>{this.emit("pointerCancel",tt),this.container.style.userSelect=""},P=tt=>{this.emit("pointerMove",tt)},M=tt=>{this.emit("pan",tt)},D=tt=>{this.emit("panStart",tt),this.container.style.userSelect="none"},z=tt=>{this.emit("panMove",tt)},N=tt=>{this.emit("panEnd",tt),this.container.style.userSelect=""},F=tt=>{this.emit("panCancel",tt),this.container.style.userSelect=""},G=tt=>{this.emit("panLeft",tt)},H=tt=>{this.emit("panRight",tt)},Z=tt=>{this.emit("panUp",tt),this.container.style.userSelect=""},X=tt=>{this.emit("panDown",tt),this.container.style.userSelect="none"},J=tt=>{this.emit("pinch",tt)},dt=tt=>{this.emit("press",tt)},ft=tt=>{this.emit("rotate",tt)},gt=tt=>{this.emit("swipe",tt)},kt=tt=>{this.emit("tap",tt)},St=tt=>{!tt.target||this.container==tt.target||this.container.contains(tt.target)||this.emit("tapOutSide",tt)};return t.observe(this.container),this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",i),this.container.addEventListener("mousemove",r),this.container.addEventListener("mouseover",s),this.container.addEventListener("mouseout",a),this.container.addEventListener("click",o),this.container.addEventListener("dblclick",l),this.container.addEventListener("wheel",c),this.container.addEventListener("contextmenu",u),this.container.addEventListener("touchstart",g),this.container.addEventListener("touchend",p),this.container.addEventListener("touchcancel",d),this.container.addEventListener("touchmove",y),this.container.addEventListener("pointerdown",x),this.container.addEventListener("pointerup",C),this.container.addEventListener("pointercancel",A),this.container.addEventListener("pointermove",P),this.hammer.on("pan",M),this.hammer.on("panstart",D),this.hammer.on("panmove",z),this.hammer.on("panend",N),this.hammer.on("pancancel",F),this.hammer.on("panleft",G),this.hammer.on("panright",H),this.hammer.on("panup",Z),this.hammer.on("pandown",X),this.hammer.on("pinch",J),this.hammer.on("press",dt),this.hammer.on("rotate",ft),this.hammer.on("swipe",gt),this.hammer.on("tap",kt),document.addEventListener("pointerdown",St,!1),()=>{t.unobserve(this.container),this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",i),this.container.removeEventListener("mousemove",r),this.container.removeEventListener("mouseover",s),this.container.removeEventListener("mouseout",a),this.container.removeEventListener("click",o),this.container.removeEventListener("dblclick",l),this.container.removeEventListener("wheel",c),this.container.removeEventListener("contextmenu",u),this.container.removeEventListener("touchstart",g),this.container.removeEventListener("touchend",p),this.container.removeEventListener("touchcancel",d),this.container.removeEventListener("touchmove",y),this.container.removeEventListener("pointerdown",x),this.container.removeEventListener("pointerup",C),this.container.removeEventListener("pointercancel",A),this.container.removeEventListener("pointermove",P),this.hammer.off("pan",M),this.hammer.off("panstart",D),this.hammer.off("panmove",z),this.hammer.off("panend",N),this.hammer.off("pancancel",F),this.hammer.off("panleft",G),this.hammer.off("panright",H),this.hammer.off("panup",Z),this.hammer.off("pandown",X),this.hammer.off("pinch",J),this.hammer.off("press",dt),this.hammer.off("rotate",ft),this.hammer.off("swipe",gt),this.hammer.off("tap",kt),document.removeEventListener("pointerdown",St,!1),document.removeEventListener("touchstart",St,!1),document.removeEventListener("mousedown",St,!1)}}registerKeyDown(t,e,i){const r=Va.on(t,a=>(e(a,r.formatedKeyNames,r.pause,r.restart),i)),s=()=>{r.removeListener?.()};return this.addRemoveWhenDestroy(s),s}drawMouseMoveLine(t,e){if(!this.ctx)return;let i=!1;switch(t){case"brush":const r=(e&&e.brushSize)??10,s=(e&&e.brushDensity)??50,a=(e&&e.brushColor)??"#000000",o=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),l=o.data,c=hr(a);this.captureMove({start:()=>{i=!0},end:()=>{i=!1},move:()=>{if(i){for(let u=0;u<s;u++){const g=Math.random()*Math.PI*2,p=Math.random()*r,d=this.mousePoint.x+Math.cos(g)*p|0,y=this.mousePoint.y+Math.sin(g)*p|0,x=(d+y*o.width)*4;l[x]=c>>16&255,l[x+1]=c>>8&255,l[x+2]=c&255,l[x+3]=255}this.ctx.putImageData(o)}}});break;case"line":default:this.captureMove({start:u=>{i=!0,this.ctx.beginPath(),this.setMousePoint(u),this.ctx.moveTo(this.mousePoint.x,this.mousePoint.y)},end:()=>{i=!1,this.ctx.closePath()},move:()=>{i&&(this.ctx.lineTo(this.mousePoint.x,this.mousePoint.y),this.ctx.stroke())}})}}static isTouchEnabled(){return"ontouchstart"in window||navigator.maxTouchPoints>0}captureMove(t){return this.captureMoveUsePointer(t)}captureMoveUseMouse(t){const e=a=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",i,!1),this.container.style.userSelect="none",t?.start?.(a)},i=a=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",i,!1),this.container.style.userSelect="",t?.end?.(a)},r=a=>{t?.move?.(a)};this.on("mouseDown",e);const s=()=>{this.off("mouseDown",e)};return this.addRemoveWhenDestroy(s),s}captureMoveUseTouch(t){const e=a=>{a.preventDefault(),t?.start?.(a)},i=a=>{t?.end?.(a)},r=a=>{t?.move?.(a)};this.on("touchStart",e),this.on("touchEnd",i),this.on("touchCancel",i),this.on("touchMove",r);const s=()=>{this.off("touchStart",e),this.off("touchEnd",i),this.off("touchCancel",i),this.off("touchMove",r)};return this.addRemoveWhenDestroy(s),s}captureMoveUsePointer(t){const e=a=>{this.container.setPointerCapture(a.pointerId),this.container.style.userSelect="none",t?.start?.(a)},i=a=>{this.container.style.userSelect="",t?.end?.(a)},r=a=>{t?.move?.(a)};this.on("pointerDown",e),this.on("pointerUp",i),this.on("pointerCancel",i),this.on("pointerMove",r);const s=()=>{this.off("pointerDown",e),this.off("pointerUp",i),this.off("pointerCancel",i),this.off("pointerMove",r)};return this.addRemoveWhenDestroy(s),s}static getMouseButton(t){if(document.implementation.hasFeature("MouseEvents","2.0"))return t.button;switch(t.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}}class Pt{static onDocumentReady(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}static getCSSVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}static setCSSVar(t,e){document.documentElement.style.setProperty(t,e)}static safeExec(t){const e=new Proxy(window,{get(i,r,s){if(typeof r=="string"&&["open","location","document"].includes(r))throw new Error(`禁止访问 key: ${r}`);return r==="window"?e:Reflect.get(i,r,s)},set(i,r,s,a){return Reflect.set(i,r,s,a)}});new Function("window",`with(window) { ${t} }`)(e,null)}static dom=new Proxy({},{get(t,e){return function(i={},...r){const s=document.createElement(e);for(const a of Object.keys(i))s.setAttribute(a,i[a]);for(const a of r)typeof a=="string"?s.appendChild(document.createTextNode(a)):s.appendChild(a);return s}}});static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
15
|
+
* Licensed under the MIT license */(function(i){(function(t,e,n,r){var s=["","webkit","Moz","MS","ms","o"],o=e.createElement("div"),a="function",h=Math.round,m=Math.abs,g=Date.now;function x(c,u,p){return setTimeout(O(c,p),u)}function y(c,u,p){return Array.isArray(c)?(w(c,p[u],p),!0):!1}function w(c,u,p){var v;if(c)if(c.forEach)c.forEach(u,p);else if(c.length!==r)for(v=0;v<c.length;)u.call(p,c[v],v,c),v++;else for(v in c)c.hasOwnProperty(v)&&u.call(p,c[v],v,c)}function k(c,u,p){var v="DEPRECATED METHOD: "+u+`
|
|
16
|
+
`+p+` AT
|
|
17
|
+
`;return function(){var _=new Error("get-stack-trace"),S=_&&_.stack?_.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",I=t.console&&(t.console.warn||t.console.log);return I&&I.call(t.console,v,S),c.apply(this,arguments)}}var P;typeof Object.assign!="function"?P=function(u){if(u===r||u===null)throw new TypeError("Cannot convert undefined or null to object");for(var p=Object(u),v=1;v<arguments.length;v++){var _=arguments[v];if(_!==r&&_!==null)for(var S in _)_.hasOwnProperty(S)&&(p[S]=_[S])}return p}:P=Object.assign;var D=k(function(u,p,v){for(var _=Object.keys(p),S=0;S<_.length;)(!v||v&&u[_[S]]===r)&&(u[_[S]]=p[_[S]]),S++;return u},"extend","Use `assign`."),N=k(function(u,p){return D(u,p,!0)},"merge","Use `assign`.");function R(c,u,p){var v=u.prototype,_;_=c.prototype=Object.create(v),_.constructor=c,_._super=v,p&&P(_,p)}function O(c,u){return function(){return c.apply(u,arguments)}}function X(c,u){return typeof c==a?c.apply(u&&u[0]||r,u):c}function Y(c,u){return c===r?u:c}function nt(c,u,p){w(vt(u),function(v){c.addEventListener(v,p,!1)})}function V(c,u,p){w(vt(u),function(v){c.removeEventListener(v,p,!1)})}function ot(c,u){for(;c;){if(c==u)return!0;c=c.parentNode}return!1}function ct(c,u){return c.indexOf(u)>-1}function vt(c){return c.trim().split(/\s+/g)}function dt(c,u,p){if(c.indexOf&&!p)return c.indexOf(u);for(var v=0;v<c.length;){if(p&&c[v][p]==u||!p&&c[v]===u)return v;v++}return-1}function ht(c){return Array.prototype.slice.call(c,0)}function pt(c,u,p){for(var v=[],_=[],S=0;S<c.length;){var I=u?c[S][u]:c[S];dt(_,I)<0&&v.push(c[S]),_[S]=I,S++}return p&&(u?v=v.sort(function(W,j){return W[u]>j[u]}):v=v.sort()),v}function ut(c,u){for(var p,v,_=u[0].toUpperCase()+u.slice(1),S=0;S<s.length;){if(p=s[S],v=p?p+_:u,v in c)return v;S++}return r}var Pt=1;function kt(){return Pt++}function Dt(c){var u=c.ownerDocument||c;return u.defaultView||u.parentWindow||t}var K=/mobile|tablet|ip(ad|hone|od)|android/i,it="ontouchstart"in t,st=ut(t,"PointerEvent")!==r,E=it&&K.test(navigator.userAgent),C="touch",b="pen",A="mouse",L="kinect",F=25,B=1,q=2,z=4,J=8,at=1,ft=2,yt=4,Tt=8,wt=16,Et=ft|yt,At=Tt|wt,Mt=Et|At,mt=["x","y"],Nt=["clientX","clientY"];function It(c,u){var p=this;this.manager=c,this.callback=u,this.element=c.element,this.target=c.options.inputTarget,this.domHandler=function(v){X(c.options.enable,[c])&&p.handler(v)},this.init()}It.prototype={handler:function(){},init:function(){this.evEl&&nt(this.element,this.evEl,this.domHandler),this.evTarget&&nt(this.target,this.evTarget,this.domHandler),this.evWin&&nt(Dt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&V(this.element,this.evEl,this.domHandler),this.evTarget&&V(this.target,this.evTarget,this.domHandler),this.evWin&&V(Dt(this.element),this.evWin,this.domHandler)}};function Ut(c){var u,p=c.options.inputClass;return p?u=p:st?u=he:E?u=Ie:it?u=vn:u=pe,new u(c,Rt)}function Rt(c,u,p){var v=p.pointers.length,_=p.changedPointers.length,S=u&B&&v-_===0,I=u&(z|J)&&v-_===0;p.isFirst=!!S,p.isFinal=!!I,S&&(c.session={}),p.eventType=u,Zt(c,p),c.emit("hammer.input",p),c.recognize(p),c.session.prevInput=p}function Zt(c,u){var p=c.session,v=u.pointers,_=v.length;p.firstInput||(p.firstInput=Ve(u)),_>1&&!p.firstMultiple?p.firstMultiple=Ve(u):_===1&&(p.firstMultiple=!1);var S=p.firstInput,I=p.firstMultiple,U=I?I.center:S.center,W=u.center=de(v);u.timeStamp=g(),u.deltaTime=u.timeStamp-S.timeStamp,u.angle=ye(U,W),u.distance=ve(U,W),Wt(p,u),u.offsetDirection=Pe(u.deltaX,u.deltaY);var j=Ee(u.deltaTime,u.deltaX,u.deltaY);u.overallVelocityX=j.x,u.overallVelocityY=j.y,u.overallVelocity=m(j.x)>m(j.y)?j.x:j.y,u.scale=I?Xt(I.pointers,v):1,u.rotation=I?pn(I.pointers,v):0,u.maxPointers=p.prevInput?u.pointers.length>p.prevInput.maxPointers?u.pointers.length:p.prevInput.maxPointers:u.pointers.length,ge(p,u);var G=c.element;ot(u.srcEvent.target,G)&&(G=u.srcEvent.target),u.target=G}function Wt(c,u){var p=u.center,v=c.offsetDelta||{},_=c.prevDelta||{},S=c.prevInput||{};(u.eventType===B||S.eventType===z)&&(_=c.prevDelta={x:S.deltaX||0,y:S.deltaY||0},v=c.offsetDelta={x:p.x,y:p.y}),u.deltaX=_.x+(p.x-v.x),u.deltaY=_.y+(p.y-v.y)}function ge(c,u){var p=c.lastInterval||u,v=u.timeStamp-p.timeStamp,_,S,I,U;if(u.eventType!=J&&(v>F||p.velocity===r)){var W=u.deltaX-p.deltaX,j=u.deltaY-p.deltaY,G=Ee(v,W,j);S=G.x,I=G.y,_=m(G.x)>m(G.y)?G.x:G.y,U=Pe(W,j),c.lastInterval=u}else _=p.velocity,S=p.velocityX,I=p.velocityY,U=p.direction;u.velocity=_,u.velocityX=S,u.velocityY=I,u.direction=U}function Ve(c){for(var u=[],p=0;p<c.pointers.length;)u[p]={clientX:h(c.pointers[p].clientX),clientY:h(c.pointers[p].clientY)},p++;return{timeStamp:g(),pointers:u,center:de(u),deltaX:c.deltaX,deltaY:c.deltaY}}function de(c){var u=c.length;if(u===1)return{x:h(c[0].clientX),y:h(c[0].clientY)};for(var p=0,v=0,_=0;_<u;)p+=c[_].clientX,v+=c[_].clientY,_++;return{x:h(p/u),y:h(v/u)}}function Ee(c,u,p){return{x:u/c||0,y:p/c||0}}function Pe(c,u){return c===u?at:m(c)>=m(u)?c<0?ft:yt:u<0?Tt:wt}function ve(c,u,p){p||(p=mt);var v=u[p[0]]-c[p[0]],_=u[p[1]]-c[p[1]];return Math.sqrt(v*v+_*_)}function ye(c,u,p){p||(p=mt);var v=u[p[0]]-c[p[0]],_=u[p[1]]-c[p[1]];return Math.atan2(_,v)*180/Math.PI}function pn(c,u){return ye(u[1],u[0],Nt)+ye(c[1],c[0],Nt)}function Xt(c,u){return ve(u[0],u[1],Nt)/ve(c[0],c[1],Nt)}var we={mousedown:B,mousemove:q,mouseup:z},je="mousedown",Qt="mousemove mouseup";function pe(){this.evEl=je,this.evWin=Qt,this.pressed=!1,It.apply(this,arguments)}R(pe,It,{handler:function(u){var p=we[u.type];p&B&&u.button===0&&(this.pressed=!0),p&q&&u.which!==1&&(p=z),this.pressed&&(p&z&&(this.pressed=!1),this.callback(this.manager,p,{pointers:[u],changedPointers:[u],pointerType:A,srcEvent:u}))}});var re={pointerdown:B,pointermove:q,pointerup:z,pointercancel:J,pointerout:J},Qe={2:C,3:b,4:A,5:L},ke="pointerdown",Xe="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(ke="MSPointerDown",Xe="MSPointerMove MSPointerUp MSPointerCancel");function he(){this.evEl=ke,this.evWin=Xe,It.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}R(he,It,{handler:function(u){var p=this.store,v=!1,_=u.type.toLowerCase().replace("ms",""),S=re[_],I=Qe[u.pointerType]||u.pointerType,U=I==C,W=dt(p,u.pointerId,"pointerId");S&B&&(u.button===0||U)?W<0&&(p.push(u),W=p.length-1):S&(z|J)&&(v=!0),!(W<0)&&(p[W]=u,this.callback(this.manager,S,{pointers:p,changedPointers:[u],pointerType:I,srcEvent:u}),v&&p.splice(W,1))}});var qt={touchstart:B,touchmove:q,touchend:z,touchcancel:J},fi="touchstart",He="touchstart touchmove touchend touchcancel";function Ae(){this.evTarget=fi,this.evWin=He,this.started=!1,It.apply(this,arguments)}R(Ae,It,{handler:function(u){var p=qt[u.type];if(p===B&&(this.started=!0),!!this.started){var v=xe.call(this,u,p);p&(z|J)&&v[0].length-v[1].length===0&&(this.started=!1),this.callback(this.manager,p,{pointers:v[0],changedPointers:v[1],pointerType:C,srcEvent:u})}}});function xe(c,u){var p=ht(c.touches),v=ht(c.changedTouches);return u&(z|J)&&(p=pt(p.concat(v),"identifier",!0)),[p,v]}var mn={touchstart:B,touchmove:q,touchend:z,touchcancel:J},Me="touchstart touchmove touchend touchcancel";function Ie(){this.evTarget=Me,this.targetIds={},It.apply(this,arguments)}R(Ie,It,{handler:function(u){var p=mn[u.type],v=tn.call(this,u,p);v&&this.callback(this.manager,p,{pointers:v[0],changedPointers:v[1],pointerType:C,srcEvent:u})}});function tn(c,u){var p=ht(c.touches),v=this.targetIds;if(u&(B|q)&&p.length===1)return v[p[0].identifier]=!0,[p,p];var _,S,I=ht(c.changedTouches),U=[],W=this.target;if(S=p.filter(function(j){return ot(j.target,W)}),u===B)for(_=0;_<S.length;)v[S[_].identifier]=!0,_++;for(_=0;_<I.length;)v[I[_].identifier]&&U.push(I[_]),u&(z|J)&&delete v[I[_].identifier],_++;if(U.length)return[pt(S.concat(U),"identifier",!0),U]}var gn=2500,di=25;function vn(){It.apply(this,arguments);var c=O(this.handler,this);this.touch=new Ie(this.manager,c),this.mouse=new pe(this.manager,c),this.primaryTouch=null,this.lastTouches=[]}R(vn,It,{handler:function(u,p,v){var _=v.pointerType==C,S=v.pointerType==A;if(!(S&&v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents)){if(_)pi.call(this,p,v);else if(S&&Le.call(this,v))return;this.callback(u,p,v)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function pi(c,u){c&B?(this.primaryTouch=u.changedPointers[0].identifier,mi.call(this,u)):c&(z|J)&&mi.call(this,u)}function mi(c){var u=c.changedPointers[0];if(u.identifier===this.primaryTouch){var p={x:u.clientX,y:u.clientY};this.lastTouches.push(p);var v=this.lastTouches,_=function(){var S=v.indexOf(p);S>-1&&v.splice(S,1)};setTimeout(_,gn)}}function Le(c){for(var u=c.srcEvent.clientX,p=c.srcEvent.clientY,v=0;v<this.lastTouches.length;v++){var _=this.lastTouches[v],S=Math.abs(u-_.x),I=Math.abs(p-_.y);if(S<=di&&I<=di)return!0}return!1}var gi=ut(o.style,"touchAction"),vi=gi!==r,yi="compute",wi="auto",yn="manipulation",De="none",te="pan-x",Re="pan-y",We=Ye();function Lt(c,u){this.manager=c,this.set(u)}Lt.prototype={set:function(c){c==yi&&(c=this.compute()),vi&&this.manager.element.style&&We[c]&&(this.manager.element.style[gi]=c),this.actions=c.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var c=[];return w(this.manager.recognizers,function(u){X(u.options.enable,[u])&&(c=c.concat(u.getTouchAction()))}),xi(c.join(" "))},preventDefaults:function(c){var u=c.srcEvent,p=c.offsetDirection;if(this.manager.session.prevented){u.preventDefault();return}var v=this.actions,_=ct(v,De)&&!We[De],S=ct(v,Re)&&!We[Re],I=ct(v,te)&&!We[te];if(_){var U=c.pointers.length===1,W=c.distance<2,j=c.deltaTime<250;if(U&&W&&j)return}if(!(I&&S)&&(_||S&&p&Et||I&&p&At))return this.preventSrc(u)},preventSrc:function(c){this.manager.session.prevented=!0,c.preventDefault()}};function xi(c){if(ct(c,De))return De;var u=ct(c,te),p=ct(c,Re);return u&&p?De:u||p?u?te:Re:ct(c,yn)?yn:wi}function Ye(){if(!vi)return!1;var c={},u=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(p){c[p]=u?t.CSS.supports("touch-action",p):!0}),c}var en=1,$t=2,be=4,me=8,ce=me,Oe=16,Ft=32;function xt(c){this.options=P({},this.defaults,c||{}),this.id=kt(),this.manager=null,this.options.enable=Y(this.options.enable,!0),this.state=en,this.simultaneous={},this.requireFail=[]}xt.prototype={defaults:{},set:function(c){return P(this.options,c),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(c){if(y(c,"recognizeWith",this))return this;var u=this.simultaneous;return c=qe(c,this),u[c.id]||(u[c.id]=c,c.recognizeWith(this)),this},dropRecognizeWith:function(c){return y(c,"dropRecognizeWith",this)?this:(c=qe(c,this),delete this.simultaneous[c.id],this)},requireFailure:function(c){if(y(c,"requireFailure",this))return this;var u=this.requireFail;return c=qe(c,this),dt(u,c)===-1&&(u.push(c),c.requireFailure(this)),this},dropRequireFailure:function(c){if(y(c,"dropRequireFailure",this))return this;c=qe(c,this);var u=dt(this.requireFail,c);return u>-1&&this.requireFail.splice(u,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(c){return!!this.simultaneous[c.id]},emit:function(c){var u=this,p=this.state;function v(_){u.manager.emit(_,c)}p<me&&v(u.options.event+Un(p)),v(u.options.event),c.additionalEvent&&v(c.additionalEvent),p>=me&&v(u.options.event+Un(p))},tryEmit:function(c){if(this.canEmit())return this.emit(c);this.state=Ft},canEmit:function(){for(var c=0;c<this.requireFail.length;){if(!(this.requireFail[c].state&(Ft|en)))return!1;c++}return!0},recognize:function(c){var u=P({},c);if(!X(this.options.enable,[this,u])){this.reset(),this.state=Ft;return}this.state&(ce|Oe|Ft)&&(this.state=en),this.state=this.process(u),this.state&($t|be|me|Oe)&&this.tryEmit(u)},process:function(c){},getTouchAction:function(){},reset:function(){}};function Un(c){return c&Oe?"cancel":c&me?"end":c&be?"move":c&$t?"start":""}function wn(c){return c==wt?"down":c==Tt?"up":c==ft?"left":c==yt?"right":""}function qe(c,u){var p=u.manager;return p?p.get(c):c}function se(){xt.apply(this,arguments)}R(se,xt,{defaults:{pointers:1},attrTest:function(c){var u=this.options.pointers;return u===0||c.pointers.length===u},process:function(c){var u=this.state,p=c.eventType,v=u&($t|be),_=this.attrTest(c);return v&&(p&J||!_)?u|Oe:v||_?p&z?u|me:u&$t?u|be:$t:Ft}});function ee(){se.apply(this,arguments),this.pX=null,this.pY=null}R(ee,se,{defaults:{event:"pan",threshold:10,pointers:1,direction:Mt},getTouchAction:function(){var c=this.options.direction,u=[];return c&Et&&u.push(Re),c&At&&u.push(te),u},directionTest:function(c){var u=this.options,p=!0,v=c.distance,_=c.direction,S=c.deltaX,I=c.deltaY;return _&u.direction||(u.direction&Et?(_=S===0?at:S<0?ft:yt,p=S!=this.pX,v=Math.abs(c.deltaX)):(_=I===0?at:I<0?Tt:wt,p=I!=this.pY,v=Math.abs(c.deltaY))),c.direction=_,p&&v>u.threshold&&_&u.direction},attrTest:function(c){return se.prototype.attrTest.call(this,c)&&(this.state&$t||!(this.state&$t)&&this.directionTest(c))},emit:function(c){this.pX=c.deltaX,this.pY=c.deltaY;var u=wn(c.direction);u&&(c.additionalEvent=this.options.event+u),this._super.emit.call(this,c)}});function Ne(){se.apply(this,arguments)}R(Ne,se,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[De]},attrTest:function(c){return this._super.attrTest.call(this,c)&&(Math.abs(c.scale-1)>this.options.threshold||this.state&$t)},emit:function(c){if(c.scale!==1){var u=c.scale<1?"in":"out";c.additionalEvent=this.options.event+u}this._super.emit.call(this,c)}});function xn(){xt.apply(this,arguments),this._timer=null,this._input=null}R(xn,xt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[wi]},process:function(c){var u=this.options,p=c.pointers.length===u.pointers,v=c.distance<u.threshold,_=c.deltaTime>u.time;if(this._input=c,!v||!p||c.eventType&(z|J)&&!_)this.reset();else if(c.eventType&B)this.reset(),this._timer=x(function(){this.state=ce,this.tryEmit()},u.time,this);else if(c.eventType&z)return ce;return Ft},reset:function(){clearTimeout(this._timer)},emit:function(c){this.state===ce&&(c&&c.eventType&z?this.manager.emit(this.options.event+"up",c):(this._input.timeStamp=g(),this.manager.emit(this.options.event,this._input)))}});function bn(){se.apply(this,arguments)}R(bn,se,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[De]},attrTest:function(c){return this._super.attrTest.call(this,c)&&(Math.abs(c.rotation)>this.options.threshold||this.state&$t)}});function _n(){se.apply(this,arguments)}R(_n,se,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Et|At,pointers:1},getTouchAction:function(){return ee.prototype.getTouchAction.call(this)},attrTest:function(c){var u=this.options.direction,p;return u&(Et|At)?p=c.overallVelocity:u&Et?p=c.overallVelocityX:u&At&&(p=c.overallVelocityY),this._super.attrTest.call(this,c)&&u&c.offsetDirection&&c.distance>this.options.threshold&&c.maxPointers==this.options.pointers&&m(p)>this.options.velocity&&c.eventType&z},emit:function(c){var u=wn(c.offsetDirection);u&&this.manager.emit(this.options.event+u,c),this.manager.emit(this.options.event,c)}});function le(){xt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}R(le,xt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[yn]},process:function(c){var u=this.options,p=c.pointers.length===u.pointers,v=c.distance<u.threshold,_=c.deltaTime<u.time;if(this.reset(),c.eventType&B&&this.count===0)return this.failTimeout();if(v&&_&&p){if(c.eventType!=z)return this.failTimeout();var S=this.pTime?c.timeStamp-this.pTime<u.interval:!0,I=!this.pCenter||ve(this.pCenter,c.center)<u.posThreshold;this.pTime=c.timeStamp,this.pCenter=c.center,!I||!S?this.count=1:this.count+=1,this._input=c;var U=this.count%u.taps;if(U===0)return this.hasRequireFailures()?(this._timer=x(function(){this.state=ce,this.tryEmit()},u.interval,this),$t):ce}return Ft},failTimeout:function(){return this._timer=x(function(){this.state=Ft},this.options.interval,this),Ft},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ce&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function ue(c,u){return u=u||{},u.recognizers=Y(u.recognizers,ue.defaults.preset),new rn(c,u)}ue.VERSION="2.0.7",ue.defaults={domEvents:!1,touchAction:yi,enable:!0,inputTarget:null,inputClass:null,preset:[[bn,{enable:!1}],[Ne,{enable:!1},["rotate"]],[_n,{direction:Et}],[ee,{direction:Et},["swipe"]],[le],[le,{event:"doubletap",taps:2},["tap"]],[xn]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var nn=1,Vt=2;function rn(c,u){this.options=P({},ue.defaults,u||{}),this.options.inputTarget=this.options.inputTarget||c,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=c,this.input=Ut(this),this.touchAction=new Lt(this,this.options.touchAction),l(this,!0),w(this.options.recognizers,function(p){var v=this.add(new p[0](p[1]));p[2]&&v.recognizeWith(p[2]),p[3]&&v.requireFailure(p[3])},this)}rn.prototype={set:function(c){return P(this.options,c),c.touchAction&&this.touchAction.update(),c.inputTarget&&(this.input.destroy(),this.input.target=c.inputTarget,this.input.init()),this},stop:function(c){this.session.stopped=c?Vt:nn},recognize:function(c){var u=this.session;if(!u.stopped){this.touchAction.preventDefaults(c);var p,v=this.recognizers,_=u.curRecognizer;(!_||_&&_.state&ce)&&(_=u.curRecognizer=null);for(var S=0;S<v.length;)p=v[S],u.stopped!==Vt&&(!_||p==_||p.canRecognizeWith(_))?p.recognize(c):p.reset(),!_&&p.state&($t|be|me)&&(_=u.curRecognizer=p),S++}},get:function(c){if(c instanceof xt)return c;for(var u=this.recognizers,p=0;p<u.length;p++)if(u[p].options.event==c)return u[p];return null},add:function(c){if(y(c,"add",this))return this;var u=this.get(c.options.event);return u&&this.remove(u),this.recognizers.push(c),c.manager=this,this.touchAction.update(),c},remove:function(c){if(y(c,"remove",this))return this;if(c=this.get(c),c){var u=this.recognizers,p=dt(u,c);p!==-1&&(u.splice(p,1),this.touchAction.update())}return this},on:function(c,u){if(c!==r&&u!==r){var p=this.handlers;return w(vt(c),function(v){p[v]=p[v]||[],p[v].push(u)}),this}},off:function(c,u){if(c!==r){var p=this.handlers;return w(vt(c),function(v){u?p[v]&&p[v].splice(dt(p[v],u),1):delete p[v]}),this}},emit:function(c,u){this.options.domEvents&&f(c,u);var p=this.handlers[c]&&this.handlers[c].slice();if(!(!p||!p.length)){u.type=c,u.preventDefault=function(){u.srcEvent.preventDefault()};for(var v=0;v<p.length;)p[v](u),v++}},destroy:function(){this.element&&l(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function l(c,u){var p=c.element;if(p.style){var v;w(c.options.cssProps,function(_,S){v=ut(p.style,S),u?(c.oldCssProps[v]=p.style[v],p.style[v]=_):p.style[v]=c.oldCssProps[v]||""}),u||(c.oldCssProps={})}}function f(c,u){var p=e.createEvent("Event");p.initEvent(c,!0,!0),p.gesture=u,u.target.dispatchEvent(p)}P(ue,{INPUT_START:B,INPUT_MOVE:q,INPUT_END:z,INPUT_CANCEL:J,STATE_POSSIBLE:en,STATE_BEGAN:$t,STATE_CHANGED:be,STATE_ENDED:me,STATE_RECOGNIZED:ce,STATE_CANCELLED:Oe,STATE_FAILED:Ft,DIRECTION_NONE:at,DIRECTION_LEFT:ft,DIRECTION_RIGHT:yt,DIRECTION_UP:Tt,DIRECTION_DOWN:wt,DIRECTION_HORIZONTAL:Et,DIRECTION_VERTICAL:At,DIRECTION_ALL:Mt,Manager:rn,Input:It,TouchAction:Lt,TouchInput:Ie,MouseInput:pe,PointerEventInput:he,TouchMouseInput:vn,SingleTouchInput:Ae,Recognizer:xt,AttrRecognizer:se,Tap:le,Pan:ee,Swipe:_n,Pinch:Ne,Rotate:bn,Press:xn,on:nt,off:V,each:w,merge:N,extend:D,assign:P,inherit:R,bindFn:O,prefixed:ut});var d=typeof t<"u"?t:typeof self<"u"?self:{};d.Hammer=ue,typeof r=="function"&&r.amd?r(function(){return ue}):i.exports?i.exports=ue:t[n]=ue})(window,document,"Hammer")})(Jr);var qa=Jr.exports;const $a=Ei(qa);function Yn(i){return i*Math.PI/180}function Oi(i){return i*180/Math.PI}function Zr(i,t,e,n){const r=i-e,s=t-n;return Math.sqrt(r*r+s*s)}function Ni(i,t,e,n){const r=e-i,s=n-t;return Math.atan2(s,r)}function Bi(i,t){return{x:Math.cos(i)*t,y:Math.sin(i)*t}}function Fi(i,t){const e=Math.sqrt(Math.pow(i,2)+Math.pow(t,2));return{x:i/=e,y:t/=e}}function Ja(i,t,e,n,r=10){if(Math.abs(e-i)<r&&Math.abs(n-t)<r)return"no";const s=Oi(Ni(i,t,e,n));return s>=-135&&s<=-45?"up":s>45&&s<135?"down":s>=135&&s<=180||s>=-180&&s<-135?"left":s>=-45&&s<=45?"right":"no"}class qn{x;y;vx;vy;ax;ay;mass;constructor(t){this.x=t.x,this.y=t.y,this.vx=t?.vx||0,this.vy=t?.vy||0,this.ax=t?.ax||0,this.ay=t?.ay||0,this.mass=t?.mass||0}distanceTo(t){return Zr(this.x,this.y,t.x,t.y)}angleTo(t){return Ni(this.x,this.y,t.x,t.y)}velocityTo(t){return{vx:t.x-this.x,vy:t.y-this.y}}followTo(t,e=3){const n=this.angleTo(t),{x:r,y:s}=Bi(n,e);this.vx=r,this.vy=s,this.nextFrame()}followAccelerationTo(t,e=.05){const n=this.angleTo(t),{x:r,y:s}=Bi(n,e);this.ax=r,this.ay=s,this.nextFrame()}nextFrame(t){const e=t?.gravity??0,n=t?.friction??0;if(this.vx+=this.ax,this.vy+=this.ay,this.vy+=e,n>0){const r=Math.atan2(this.vy,this.vx);let s=Math.sqrt(this.vx*this.vx+this.vy*this.vy);s>n?s-=n:s=0,this.vx=Math.cos(r)*s,this.vy=Math.sin(r)*s}this.x+=this.vx,this.y+=this.vy}nextFrameEaseTo(t,e){const n=e?.gravity??0,r=e?.friction??1,s=e?.easing??.05,o=t.x-this.x,a=t.y-this.y;this.vx=o*s,this.vy=a*s,this.vy+=n,this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}nextFrameSpringTo(t,e){const n=e?.gravity??0,r=e?.friction??.95,s=e?.spring??.03;(Array.isArray(t)?t:[t]).forEach(a=>{const h=a.x-this.x,m=a.y-this.y,g=h*s,x=m*s;this.vx+=g,this.vy+=x}),this.vy+=n,this.vx*=r,this.vy*=r,this.x+=this.vx,this.y+=this.vy}nextFrameSpringConnect(t,e){const n=e?.gravity??0,r=e?.friction??.95,s=e?.spring??.03,o=e?.springLength??100,a=this.angleTo(t);this.nextFrameSpringTo(new qn({x:t.x-Math.cos(a)*o,y:t.y-Math.sin(a)*o}),{spring:s,friction:r,gravity:n})}}class cn extends qn{width;height;constructor(t){super(t),this.width=t.width,this.height=t.height}eq(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}isIntersectRect(t){return!(this.x+this.width<t.x||t.x+t.width<this.x||this.y+this.height<t.y||t.y+t.height<this.y)}isContainPoint(t){return!(t.x<this.x||t.x>this.x+this.width||t.y<this.y||t.y>this.y+this.height)}toArray(){return[this.x,this.y,this.width,this.height]}clone(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}}class fe extends qn{radius;constructor(t){super(t),this.radius=t?.radius??0}toSVGPathData(){return[this.x,this.y]}toSVGPathD(){return`${this.x},${this.y}`}setX(t){this.x=t}setY(t){this.y=t}setXY(t,e){this.x=t,this.y=e}eq(t){return this.x===t.x&&this.y===t.y}midPointBtw(t){return new fe({x:this.x+(t.x-this.x)/2,y:this.y+(t.y-this.y)/2})}toArray(){return[this.x,this.y]}clone(t){this.setXY(t.x,t.y)}getBoundRect(){return new cn({x:this.x-this.radius,y:this.y-this.radius,width:this.radius*2,height:this.radius*2})}nextFrameCollisionTo(t){const e=t.x-this.x,n=t.y-this.y;if(Math.sqrt(e*e+n*n)<this.radius+t.radius){const o=Math.atan2(n,e),a=Math.sin(o),h=Math.cos(o),m={x:0,y:0},g=s(e,n,a,h,!0),x=s(this.vx,this.vy,a,h,!0),y=s(t.vx,t.vy,a,h,!0),w=x.x-y.x;x.x=((this.mass-t.mass)*x.x+2*t.mass*y.x)/(this.mass+t.mass),y.x=w+x.x;const k=Math.abs(x.x)+Math.abs(y.x),P=this.radius+t.radius-Math.abs(m.x-g.x);m.x+=x.x/k*P,g.x+=y.x/k*P;const D=s(m.x,m.y,a,h,!1),N=s(g.x,g.y,a,h,!1);t.x=this.x+N.x,t.y=this.y+N.y,this.x=this.x+D.x,this.y=this.y+D.y;const R=s(x.x,x.y,a,h,!1),O=s(y.x,y.y,a,h,!1);this.vx=R.x,this.vy=R.y,t.vx=O.x,t.vy=O.y}function s(o,a,h,m,g=!1){return{x:g?o*m+a*h:o*m-a*h,y:g?a*m-o*h:a*m+o*h}}}nextFrameBounce(t,e){const n=t.x,r=t.y,s=t.x+t.width,o=t.y+t.height,a=e?.bounce??-1;this.x+this.radius>s?(this.x=s-this.radius,this.vx*=a):this.x-this.radius<n&&(this.x=n+this.radius,this.vx*=a),this.y+this.radius>o?(this.y=o-this.radius,this.vy*=a):this.y-this.radius<r&&(this.y=r+this.radius,this.vy*=a)}}class Kr{constructor(){}static getFormatKeyNames(t){const e=Ri(),n=[];return t.ctrl&&n.push(e?"Cmd":"Ctrl"),t.shift&&n.push("Shift"),t.alt&&n.push("Alt"),typeof t.key=="string"?n.push(pr(t.key)):Array.isArray(t.key)&&(t.key.map(r=>pr(r)),n.push(...t.key)),n}static matchKeyScheme(t,e){const n=t.ctrl??!1,r=t.shift??!1,s=t.alt??!1;if(t.exact)return(n===e.metaKey||n===e.ctrlKey)&&r===e.shiftKey&&s===e.altKey;const o=[];return n&&o.push(n===e.metaKey||n===e.ctrlKey),r&&o.push(r===e.shiftKey),s&&o.push(s===e.altKey),o.every(a=>a)}static on(t,e){if(t?.key===void 0||t?.key===null)return e;const n=t?.target??window;let r=!1;const s=this.getFormatKeyNames(t),o=a=>{if(a.stopPropagation(),!r&&a.key!=="Control"&&a.key!=="Meta"&&a.key!=="Shift"&&a.key!=="Option"&&a.key!=="Alt"&&s.find(h=>h.toLowerCase()===a.key.toLowerCase())&&this.matchKeyScheme(t,a)){a.preventDefault();const h=e(a);if(typeof h!="function")return;const m=g=>{g.preventDefault(),h(g),n.removeEventListener("keyup",m)};n.addEventListener("keyup",m)}};return e.title=t?.title??"",e.formatedKeyNames=s,e.pause=()=>r=!0,e.restart=()=>r=!1,e.removeListener=()=>n.removeEventListener("keydown",o),n.addEventListener("keydown",o),e}}const Qr=Za("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);function Za(i,t=10){const e={},n=i.split(",");for(let r=0;r<n.length;r+=2){const s="&"+n[r+1]+";",o=parseInt(n[r],t);e[s]="&#"+o+";"}return e["\\xa0"]=" ",e}function Jt(i,t){const e=Object.keys(t);for(let n=0;n<e.length;n++)i=i.replace(new RegExp("{"+e[n]+"}","gi"),""+t[e[n]]);return i}function $n(i){let t,e;if(!i)throw new Error("cannot create a random attribute name for an undefined object");const n="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";t="";do for(t="",e=0;e<12;e++)t+=n[Math.floor(Math.random()*n.length)];while(i[t]);return t}function Ka(i){const t={left:"start",right:"end",center:"middle",start:"start",end:"end"};return t[i]||t.start}function Qa(i){const t={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return t[i]||t.alphabetic}const kn={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"},lineDash:{svgAttr:"stroke-dasharray",canvas:[],svg:null,apply:"stroke"}};class Jn{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}addColorStop(t,e){const n=this.__ctx.__createElement("stop");if(n.setAttribute("offset",""+t),e.indexOf("rgba")!==-1){const s=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(e);s&&(n.setAttribute("stop-color",Jt("rgb({r},{g},{b})",{r:s[1],g:s[2],b:s[3]})),n.setAttribute("stop-opacity",s[4]))}else n.setAttribute("stop-color",e);this.__root.appendChild(n)}}class zi{__root;__ctx;constructor(t,e){this.__root=t,this.__ctx=e}}class An{__document=document;__canvas;__ctx;width;height;__styleStack;__groupStack;__rootSVG;__ids;__SVGdefs;__currentElement;__currentElementsToStyle=null;constructor({canvas:t,width:e=500,height:n=500,enableMirroring:r=!1}){this.enableMirroring=r,t?(this.__canvas=t,this.__ctx=t.getContext("2d"),this.width=t.width,this.height=t.height):(this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.width=e,this.height=n),this.__setDefaultStyles(),this.__styleStack=[this.__getStyleState()],this.__groupStack=[],this.__rootSVG=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__rootSVG.setAttribute("version","1.1"),this.__rootSVG.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__rootSVG.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__rootSVG.setAttribute("width",""+this.width),this.__rootSVG.setAttribute("height",""+this.height),this.__ids={},this.__SVGdefs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__rootSVG.appendChild(this.__SVGdefs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__rootSVG.appendChild(this.__currentElement)}__setDefaultStyles(){const t=Object.keys(kn);for(let e=0,n=t.length;e<n;e++){const r=t[e];this[r]=kn[r].canvas}}__getStyleState(){const t={},e=Object.keys(kn);for(let n=0,r=e.length;n<r;n++){const s=e[n];t[s]=this[s]}return t}__applyStyleState(t){const e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){const s=e[n];this[s]=t[s]}}__createElement(t,e={},n=!1){const r=this.__document.createElementNS("http://www.w3.org/2000/svg",t),s=Object.keys(e);n&&(r.setAttribute("fill","none"),r.setAttribute("stroke","none"));for(let o=0;o<s.length;o++){const a=s[o];r.setAttribute(a,e[a])}return r}__applyStyleToCurrentElement(t){let e=this.__currentElement;const n=this.__currentElementsToStyle;n&&(e.setAttribute(t,""),e=n.element,n.children.forEach(s=>{s.setAttribute(t,"")}));const r=Object.keys(kn);for(let s=0;s<r.length;s++){const o=kn[r[s]],a=this[r[s]];if(o.apply){if(a instanceof zi){if(a.__ctx)for(;a.__ctx.__SVGdefs.childNodes.length;){const h=a.__ctx.__SVGdefs.childNodes[0].getAttribute("id");this.__ids[h]=h,this.__SVGdefs.appendChild(a.__ctx.__SVGdefs.childNodes[0])}e.setAttribute(o.apply,Jt("url(#{id})",{id:a.__root.getAttribute("id")}))}else if(a instanceof Jn)e.setAttribute(o.apply,Jt("url(#{id})",{id:a.__root.getAttribute("id")}));else if(o.apply.indexOf(t)!==-1&&o.svg!==a)if((o.svgAttr==="stroke"||o.svgAttr==="fill")&&a.indexOf("rgba")!==-1){const m=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(a);e.setAttribute(o.svgAttr,Jt("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]}));let g=parseFloat(m[4]);const x=this.globalAlpha;x!=null&&(g*=x),e.setAttribute(o.svgAttr+"-opacity",""+g)}else{let h=o.svgAttr;if(r[s]==="globalAlpha"&&(h=t+"-"+o.svgAttr,e.getAttribute(h)))continue;h&&e.setAttribute(h,a)}}}}__closestGroupOrSvg(t){return t=t||this.__currentElement,t.nodeName==="g"||t.nodeName==="svg"?t:this.__closestGroupOrSvg(t.parentNode)}getSerializedSvg(t){let e=new XMLSerializer().serializeToString(this.__rootSVG);if(/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi.test(e)&&(e=e.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),t){const r=Object.keys(Qr);for(let s=0,o=r.length;s<o;s++){const a=r[s],h=Qr[a],m=new RegExp(a,"gi");m.test(e)&&(e=e.replace(m,h))}}return e}getSvg(){return this.__rootSVG}save(){const t=this.__createElement("g"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__styleStack.push(this.__getStyleState())}restore(){this.__currentElementsToStyle=null;const t=this.__groupStack.pop();t?this.__currentElement=t:this.__currentElement=this.__rootSVG.childNodes[1];const e=this.__styleStack.pop();e&&this.__applyStyleState(e)}__addTransform(t){const e=this.__closestGroupOrSvg();if(e.childNodes.length>0){this.__currentElement.nodeName==="path"&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());const r=this.__createElement("g");e.appendChild(r),this.__currentElement=r}let n=this.__currentElement.getAttribute("transform");n?n+=" ":n="",n+=t,this.__currentElement.setAttribute("transform",n)}scale(t,e){e===void 0&&(e=t),this.__addTransform(Jt("scale({x},{y})",{x:t,y:e}))}rotate(t){const e=t*180/Math.PI;this.__addTransform(Jt("rotate({angle},{cx},{cy})",{angle:e,cx:0,cy:0}))}translate(t,e){this.__addTransform(Jt("translate({x},{y})",{x:t,y:e}))}transform(t,e,n,r,s,o){this.__addTransform(Jt("matrix({a},{b},{c},{d},{e},{f})",{a:t,b:e,c:n,d:r,e:s,f:o}))}beginPath(){this.__currentDefaultPath="",this.__currentPosition={};const t=this.__createElement("path",{},!0);this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t}__applyCurrentDefaultPath(){const t=this.__currentElement;t.nodeName==="path"?t.setAttribute("d",this.__currentDefaultPath):console.error("Attempted to apply path command to node",t.nodeName)}__addPathCommand(t){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=t}moveTo(t,e){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(Jt("M {x} {y}",this.__currentPosition))}closePath(){this.__currentDefaultPath&&this.__addPathCommand("Z")}lineTo(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(Jt("L {x} {y}",this.__currentPosition)):this.__addPathCommand(Jt("M {x} {y}",this.__currentPosition))}bezierCurveTo(t,e,n,r,s,o){this.__currentPosition={x:s,y:o},this.__addPathCommand(Jt("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:t,cp1y:e,cp2x:n,cp2y:r,x:s,y:o}))}quadraticCurveTo(t,e,n,r){this.__currentPosition={x:n,y:r},this.__addPathCommand(Jt("Q {cpx} {cpy} {x} {y}",{cpx:t,cpy:e,x:n,y:r}))}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}arcTo(t,e,n,r,s){const o=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(typeof o>"u"||typeof a>"u")return;if(s<0)throw new Error("IndexSizeError: The radius provided ("+s+") is negative.");if(o===t&&a===e||t===n&&e===r||s===0){this.lineTo(t,e);return}const h=this.normalize([o-t,a-e]),m=this.normalize([n-t,r-e]);if(h[0]*m[1]===h[1]*m[0]){this.lineTo(t,e);return}const g=h[0]*m[0]+h[1]*m[1],x=Math.acos(Math.abs(g)),y=this.normalize([h[0]+m[0],h[1]+m[1]]),w=s/Math.sin(x/2),k=t+w*y[0],P=e+w*y[1],D=[-h[1],h[0]],N=[m[1],-m[0]],R=function(Y){const nt=Y[0];return Y[1]>=0?Math.acos(nt):-Math.acos(nt)},O=R(D),X=R(N);this.lineTo(k+D[0]*s,P+D[1]*s),this.arc(k,P,s,O,X)}stroke(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")}fill(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")}rect(t,e,n,r){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()}fillRect(t,e,n,r){const s=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("fill")}strokeRect(t,e,n,r){const s=this.__createElement("rect",{x:t,y:e,width:n,height:r},!0);this.__closestGroupOrSvg().appendChild(s),this.__currentElement=s,this.__applyStyleToCurrentElement("stroke")}__clearCanvas(){const e=this.__closestGroupOrSvg().getAttribute("transform"),n=this.__rootSVG.childNodes[1],r=n.childNodes;for(let s=r.length-1;s>=0;s--)r[s]&&n.removeChild(r[s]);this.__currentElement=n,this.__groupStack=[],e&&this.__addTransform(e)}clearRect(t,e,n,r){if(t===0&&e===0&&n===this.width&&r===this.height){this.__clearCanvas();return}const s=this.__closestGroupOrSvg(),o=this.__createElement("rect",{x:t,y:e,width:n,height:r,fill:"#FFFFFF"},!0);s.appendChild(o)}createLinearGradient(t,e,n,r){const s=this.__createElement("linearGradient",{id:$n(this.__ids),x1:t+"px",x2:n+"px",y1:e+"px",y2:r+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(s),new Jn(s,this)}createRadialGradient(t,e,n,r,s,o){const a=this.__createElement("radialGradient",{id:$n(this.__ids),cx:r+"px",cy:s+"px",r:o+"px",fx:t+"px",fy:e+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__SVGdefs.appendChild(a),new Jn(a,this)}__parseFont(){const e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext]))(?:\s*\/\s*(normal|[.\d]+(?:%|in|[cem]m|ex|p[CustomCanvasContext])))?\s*([-,'"\sa-z0-9]+?)\s*$/i.exec(this.font),n={style:e[1]||"normal",size:e[4]||"10px",family:e[6]||"sans-serif",weight:e[3]||"normal",decoration:e[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(n.decoration="underline"),this.__fontHref&&(n.href=this.__fontHref),n}__wrapTextLink(t,e){if(t.href){const n=this.__createElement("a");return n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.href),n.appendChild(e),n}return e}__applyText(t,e,n,r){const s=this.__parseFont(),o=this.__closestGroupOrSvg(),a=this.__createElement("text",{"font-family":s.family,"font-size":s.size,"font-style":s.style,"font-weight":s.weight,"text-decoration":s.decoration,x:e,y:n,"text-anchor":Ka(this.textAlign),"dominant-baseline":Qa(this.textBaseline)},!0);a.appendChild(this.__document.createTextNode(t)),this.__currentElement=a,this.__applyStyleToCurrentElement(r),o.appendChild(this.__wrapTextLink(s,a))}fillText(t,e,n){this.__applyText(t,e,n,"fill")}strokeText(t,e,n){this.__applyText(t,e,n,"stroke")}measureText(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)}arc(t,e,n,r,s,o){if(r===s)return;r=r%(2*Math.PI),s=s%(2*Math.PI),r===s&&(s=(s+2*Math.PI-.001*(o?-1:1))%(2*Math.PI));const a=t+n*Math.cos(s),h=e+n*Math.sin(s),m=t+n*Math.cos(r),g=e+n*Math.sin(r),x=o?0:1;let y=0,w=s-r;w<0&&(w+=2*Math.PI),o?y=w>Math.PI?0:1:y=w>Math.PI?1:0,this.lineTo(m,g),this.__addPathCommand(Jt("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:y,sweepFlag:x,endX:a,endY:h})),this.__currentPosition={x:a,y:h}}clip(){const t=this.__closestGroupOrSvg(),e=this.__createElement("clipPath"),n=$n(this.__ids),r=this.__createElement("g");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute("id",n),e.appendChild(this.__currentElement),this.__SVGdefs.appendChild(e),t.setAttribute("clip-path",Jt("url(#{id})",{id:n})),t.appendChild(r),this.__currentElement=r}drawImage(...t){let e=t[0],n,r,s,o,a=0,h=0,m,g,x,y,w,k,P,D;if(t.length===3)n=t[1],r=t[2],m=e.width,g=e.height,s=m,o=g;else if(t.length===5)n=t[1],r=t[2],s=t[3],o=t[4],m=e.width,g=e.height;else if(t.length===9)a=t[1],h=t[2],m=t[3],g=t[4],n=t[5],r=t[6],s=t[7],o=t[8];else throw new Error("Invalid number of arguments passed to drawImage: "+arguments.length);const N=this.__closestGroupOrSvg();this.__currentElement;const R="translate("+n+", "+r+")";if(e instanceof An){if(x=e.getSvg().cloneNode(!0),x.childNodes&&x.childNodes.length>1){for(y=x.childNodes[0];y.childNodes.length;)D=y.childNodes[0].getAttribute("id"),this.__ids[D]=D,this.__SVGdefs.appendChild(y.childNodes[0]);if(w=x.childNodes[1],w){const O=w.getAttribute("transform");let X;O?X=O+" "+R:X=R,w.setAttribute("transform",X),N.appendChild(w)}}}else(e.nodeName==="CANVAS"||e.nodeName==="IMG")&&(k=this.__createElement("image"),k.setAttribute("width",s),k.setAttribute("height",o),k.setAttribute("preserveAspectRatio","none"),(a||h||m!==e.width||g!==e.height)&&(P=this.__document.createElement("canvas"),P.width=s,P.height=o,P.getContext("2d")?.drawImage(e,a,h,m,g,0,0,s,o),e=P),k.setAttribute("transform",R),k.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.nodeName==="CANVAS"?e.toDataURL():e.getAttribute("src")),N.appendChild(k))}createPattern(t,e){const n=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),r=$n(this.__ids);let s;return n.setAttribute("id",r),t.nodeName==="CANVAS"||t.nodeName==="IMG"?(s=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),s.setAttribute("width",""+t.width),s.setAttribute("height",""+t.height),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.nodeName==="CANVAS"?t.toDataURL():t.getAttribute("src")),n.appendChild(s),this.__SVGdefs.appendChild(n)):t instanceof An&&(n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.appendChild(t.__rootSVG.childNodes[1]),this.__SVGdefs.appendChild(n)),new zi(n,this)}setLineDash(t){t&&t.length>0?this.lineDash=t.join(","):this.lineDash=null}drawFocusRing(){}createImageData(){}getImageData(){}putImageData(){}globalCompositeOperation(){}setTransform(){}}function to(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ts={},Ui={exports:{}},es;function eo(){return es||(es=1,function(i){(function(t){var e="0.4.0",n="hasOwnProperty",r=/[\.\/]/,s="*",o=function(){},a=function(y,w){return y-w},h,m,g={n:{}},x=function(y,w){var k=m,P=Array.prototype.slice.call(arguments,2),D=x.listeners(y),N=0,R,O=[],X={},Y=[];h=y,m=0;for(var nt=0,V=D.length;nt<V;nt++)"zIndex"in D[nt]&&(O.push(D[nt].zIndex),D[nt].zIndex<0&&(X[D[nt].zIndex]=D[nt]));for(O.sort(a);O[N]<0;)if(R=X[O[N++]],Y.push(R.apply(w,P)),m)return m=k,Y;for(nt=0;nt<V;nt++)if(R=D[nt],"zIndex"in R)if(R.zIndex==O[N]){if(Y.push(R.apply(w,P)),m)return m=k,Y;do if(N++,R=X[O[N]],R&&Y.push(R.apply(w,P)),m)return m=k,Y;while(R)}else X[R.zIndex]=R;else if(Y.push(R.apply(w,P)),m)return m=k,Y;return m=k,Y.length?Y:null};x.listeners=function(y){var w=y.split(r),k=g,P,D,N,R,O,X,Y,nt,V=[k],ot=[];for(R=0,O=w.length;R<O;R++){for(nt=[],X=0,Y=V.length;X<Y;X++)for(k=V[X].n,D=[k[w[R]],k[s]],N=2;N--;)P=D[N],P&&(nt.push(P),ot=ot.concat(P.f||[]));V=nt}return ot},x.on=function(y,w){for(var k=y.split(r),P=g,D=0,N=k.length;D<N;D++)P=P.n,!P[k[D]]&&(P[k[D]]={n:{}}),P=P[k[D]];for(P.f=P.f||[],D=0,N=P.f.length;D<N;D++)if(P.f[D]==w)return o;return P.f.push(w),function(R){+R==+R&&(w.zIndex=+R)}},x.stop=function(){m=1},x.nt=function(y){return y?new RegExp("(?:\\.|\\/|^)"+y+"(?:\\.|\\/|$)").test(h):h},x.unbind=function(y,w){var k=y.split(r),P,D,N,R,O,X,Y,nt=[g];for(R=0,O=k.length;R<O;R++)for(X=0;X<nt.length;X+=N.length-2){if(N=[X,1],P=nt[X].n,k[R]!=s)P[k[R]]&&N.push(P[k[R]]);else for(D in P)P[n](D)&&N.push(P[D]);nt.splice.apply(nt,N)}for(R=0,O=nt.length;R<O;R++)for(P=nt[R];P.n;){if(w){if(P.f){for(X=0,Y=P.f.length;X<Y;X++)if(P.f[X]==w){P.f.splice(X,1);break}!P.f.length&&delete P.f}for(D in P.n)if(P.n[n](D)&&P.n[D].f){var V=P.n[D].f;for(X=0,Y=V.length;X<Y;X++)if(V[X]==w){V.splice(X,1);break}!V.length&&delete P.n[D].f}}else{delete P.f;for(D in P.n)P.n[n](D)&&P.n[D].f&&delete P.n[D].f}P=P.n}},x.once=function(y,w){var k=function(){w.apply(this,arguments),x.unbind(y,k)};return x.on(y,k)},x.version=e,x.toString=function(){return"You are running Eve "+e},i.exports?i.exports=x:t.eve=x})(sa)}(Ui)),Ui.exports}(function(i){if(typeof to=="function")var t=eo();(function(){function e(y){var w=function(k){w.parse(k)};return w.mode="text",w.type=String(y||"html").toLowerCase(),w.textchunk="",w.raw="",w.parse=h,w.on=o,w.event=s,w.end=r,w}function n(y,w,k){y==`
|
|
18
|
+
`&&this.event("newline"),x[this.mode].call(this,y,w,k)}function r(){n.call(this,"eof"),this.event("eof")}function s(y,w,k){typeof t=="function"&&t("elemental."+y+"."+w,null,w,k||"",this.raw);for(var P=this.events&&this.events[y],D=P&&P.length;D--;)try{this.events[y][D](w,k||"",this.raw)}catch{}this.raw=""}function o(y,w){this.events=this.events||{},this.events[y]=this.events[y]||[],this.events[y].push(w)}function a(y,w){return y&&(y.charAt?y.charAt(w):y[w])}function h(y){y=y||Object(y);for(var w=1,k=y.length+1,P,D,N=a(y,0);w<k;w++)P=D,D=N,N=a(y,w),this.raw+=D,n.call(this,D,N,P);this._beforeEnd=function(){n.call(this,"","",D)}}var m=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/,g=function(){for(var y in this.attr)this.attr.hasOwnProperty(y)&&this.event("attr",y,{value:this.attr[y],tagname:this.tagname,attr:this.attr})},x={text:function(y,w,k){switch(y){case"<":case"eof":this.nodename="",this.attr={},this.mode="tag name start",this.raw=this.raw.slice(0,-1),this.textchunk&&this.event("text",this.textchunk),this.raw+=y,this.textchunk="";break;default:this.textchunk+=y}},special:function(y,w,k){if(k=="!"&&y=="-"&&w=="-")this.mode="comment start";else{if(this.textchunk=="[CDATA"&&y=="["){this.mode="cdata",this.textchunk="";return}if(y==">"||y=="eof"){this.event("special",this.textchunk),this.mode="text",this.textchunk="";return}this.textchunk+=y}},cdata:function(y,w,k){k=="]"&&y=="]"&&w==">"?(this.mode="cdata end",this.textchunk=this.textchunk.slice(0,-1)):(y=="eof"&&x["cdata end"].call(this),this.textchunk+=y)},"cdata end":function(y,w,k){this.event("cdata",this.textchunk),this.textchunk="",this.mode="text"},"comment start":function(y,w,k){w==">"||y=="eof"?(this.event("comment",""),this.mode="comment instant end"):this.mode="comment"},"comment instant end":function(y,w,k){this.mode="text"},comment:function(y,w,k){y=="-"&&k=="-"&&w==">"?(this.mode="comment end",this.textchunk=this.textchunk.slice(0,-1)):y=="eof"?this.event("comment",this.textchunk):this.textchunk+=y},"comment end":function(y,w,k){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},declaration:function(y,w,k){y=="?"&&w==">"?this.mode="declaration end":(y=="eof"&&this.event("comment",this.textchunk),this.textchunk+=y)},"declaration end":function(y,w,k){this.event("comment",this.textchunk),this.textchunk="",this.mode="text"},"tag name start":function(y,w,k){if(y=="eof")this.event("text","<");else if(!m.test(y)){if(this.mode="tag name",y=="/"){this.mode="close tag name start";return}if(y=="!"){this.mode="special",this.textchunk="";return}if(y=="?"){this.mode="declaration";return}x[this.mode].call(this,y,w,k)}},"close tag name start":function(y,w,k){m.test(y)||(this.mode="close tag name",this.tagname="",this.nodename="",x[this.mode].call(this,y,w,k))},"close tag name":function(y,w,k){if(m.test(y))this.tagname=this.nodename;else switch(y){case">":this.event("/tag",this.tagname||this.nodename),this.mode="text";break;default:!this.tagname&&(this.nodename+=y)}},"tag name":function(y,w,k){if(m.test(y))this.tagname=this.nodename,this.nodename="",this.mode="attr start";else switch(y){case">":this.event("tag",this.nodename),this.mode="text";break;default:this.nodename+=y}},"attr start":function(y,w,k){m.test(y)||(this.mode="attr",this.nodename="",x[this.mode].call(this,y,w,k))},attr:function(y,w,k){if(m.test(y)||y=="=")this.attr[this.nodename]="",this.mode="attr value start";else switch(y){case">":this.nodename=="/"?(delete this.attr["/"],this.event("tag",this.tagname,this.attr),g.call(this),this.event("/tag",this.tagname,!0)):(this.nodename&&(this.attr[this.nodename]=""),this.event("tag",this.tagname,this.attr),g.call(this)),this.mode="text";break;default:this.nodename+=y}},"attr value start":function(y,w,k){if(!m.test(y)){if(this.mode="attr value",this.quote=!1,y=="'"||y=='"'){this.quote=y;return}x[this.mode].call(this,y,w,k)}},"attr value":function(y,w,k){if(m.test(y)&&!this.quote)this.mode="attr start";else if(y==">"&&!this.quote)this.event("tag",this.tagname,this.attr),this.mode="text";else switch(y){case'"':case"'":this.quote==y&&k!="\\"&&(this.mode="attr start");break;default:this.attr[this.nodename]+=y}}};e.version="0.2.1",i.elemental=e,i.eve=t})()})(ts);const ns=Ei(ts),is=[1,0,0,1,0,0],rs=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];class Ht{value;matrix3d;isEverTo3d=!1;_prev_translate_z=0;_prev_rotate=0;_prev_rotate_x=0;_prev_rotate_y=0;_prev_rotate_z=0;_prev_scale_z=1;constructor(t=is){this.value=Array.from(t),this.matrix3d=this.toMatrix3D()}unit(){return this.value=Array.from(is),this.matrix3d=this.toMatrix3D(),this}transformPoint(t,e,n=0,r=0){const s=t-n,o=e-r;return t=s*this.value[0]+o*this.value[2]+this.value[4],e=s*this.value[1]+o*this.value[3]+this.value[5],[t+n,e+r]}fromString(t){const e=dr("number",t);return e.length===6?e.forEach((n,r)=>{n.fullMatch&&(this.value[r]=parseFloat(n.fullMatch))}):this.unit(),this}toMatrix3D(t=this.matrix3d){const e=[this.value[0],this.value[1],0,0,this.value[2],this.value[3],0,0,0,0,1,0,this.value[4],this.value[5],0,1];return t?(t.value=e,t):new Je(e)}offset(t=0,e=0){return[t-this.value[4],e-this.value[5]]}clone(){return new Ht(this.value)}multiply(t){const e=this.value;let n;t instanceof Ht?n=t.value:n=t;const r=e[0]*n[0]+e[2]*n[1],s=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],h=e[0]*n[4]+e[2]*n[5]+e[4],m=e[1]*n[4]+e[3]*n[5]+e[5];return e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=h,e[5]=m,this}inverse(){const t=new Ht(this.value),e=t.value,n=1/(e[0]*e[3]-e[1]*e[2]),r=e[3]*n,s=-e[1]*n,o=-e[2]*n,a=e[0]*n,h=n*(e[2]*e[5]-e[3]*e[4]),m=n*(e[1]*e[4]-e[0]*e[5]);return e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=h,e[5]=m,t}translate(t,e){return this.matrix3d.translate(t,e,0),this.multiply([1,0,0,1,t,e])}translateTo(t,e){const n=this.offset(t,e);return this.translate(n[0],n[1])}translateX(t){return this.translate(t,0)}translateXTo(t){return this.translateTo(t,this.value[5])}translateY(t){return this.translate(0,t)}translateYTo(t){return this.translateTo(this.value[4],t)}translateZ(t){return this.isEverTo3d=!0,this.matrix3d.translate(0,0,t)}translateZTo(t){return this.translateZ(t-this._prev_translate_z),this._prev_translate_z=t,this}translate3d(t,e,n){return this.isEverTo3d=!0,this.matrix3d.translate(t,e,n)}translate3dTo(t,e,n){return this.translate3d(t-this.matrix3d.value[12],t-this.matrix3d.value[13],n-this._prev_translate_z),this._prev_translate_z=n,this}rotate(t,e=0,n=0){const r=Yn(t),s=+Math.cos(r).toFixed(9),o=+Math.sin(r).toFixed(9);return this.multiply([s,o,-o,s,e,n]),this.translate(-e,-n),this}rotateTo(t,e=0,n=0){return this.rotate(t-this._prev_rotate,e,n),this._prev_rotate=t,this}rotateX(t){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t)}rotateXTo(t){return this.rotateX(t-this._prev_rotate_x),this._prev_rotate_x=t,this}rotateY(t){return this.isEverTo3d=!0,this.matrix3d.rotate("y",t)}rotateYTo(t){return this.rotateY(t-this._prev_rotate_y),this._prev_rotate_y=t,this}rotateZ(t){return this.isEverTo3d=!0,this.matrix3d.rotate("z",t)}rotateZTo(t){return this.rotateZ(t-this._prev_rotate_z),this._prev_rotate_z=t,this}rotate3d(t,e,n){return this.isEverTo3d=!0,this.matrix3d.rotate("x",t).rotate("y",e).rotate("z",n)}rotate3dTo(t,e,n){return this.rotate3d(t-this._prev_rotate_x,e-this._prev_rotate_y,n-this._prev_rotate_z),this._prev_rotate_x=t,this._prev_rotate_y=e,this._prev_rotate_z=n,this}scale(t,e=t,n=0,r=0){return this.matrix3d.scale(t,e,1),this.translate(n,r),this.multiply([t,0,0,e,0,0]),this.translate(-n,-r),this}scaleTo(t,e=t,n=0,r=0){return this.scale(t/this.value[0],e/this.value[3],n,r),this}scaleX(t){return this.scale(t,1)}scaleXTo(t){return this.scale(t/this.value[0],1)}scaleY(t){return this.scale(1,t)}scaleYTo(t){return this.scale(1,t/this.value[3])}scaleZ(t){return this.isEverTo3d=!0,this.matrix3d.scale(1,1,t)}scaleZTo(t){return this.scaleZ(t/this._prev_scale_z),this._prev_scale_z=t,this}scale3d(t,e,n){return this.isEverTo3d=!0,this.matrix3d.scale(t,e,n)}scale3dTo(t,e,n){return this.scale3d(t/this.matrix3d.value[0],e/this.matrix3d.value[5],n/this._prev_scale_z),this._prev_scale_z=n,this}skew(t,e=t){const n=t*Math.PI/180,r=e*Math.PI/180,s=Math.tan(n),o=Math.tan(r);return this.multiply([1,o,s,1,0,0])}skewTo(t,e=t){return this.skew(t-this.value[2],e-this.value[1])}skewX(t){return this.skew(t,this.value[1])}skewXTo(t){return this.skewTo(t,this.value[1])}skewY(t){return this.skew(this.value[2],t)}skewYTo(t){return this.skewTo(this.value[2],t)}skewZ(t){return this}skewZTo(t){return this}skew3d(t,e,n){return this}skew3dTo(t,e,n){return this}split(){const t={dx:0,dy:0,scalex:1,scaley:1,shear:1,rotate:0,isSimple:!0,isSuperSimple:!0,noRotation:!1};t.dx=this.value[4],t.dy=this.value[5];const e=[[this.value[0],this.value[2]],[this.value[1],this.value[3]]];t.scalex=Math.sqrt(Math.pow(e[0][0],2)+Math.pow(e[0][1],2));let n=Fi(e[0][0],e[0][1]);e[0][0]=n.x,e[0][1]=n.y,t.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*t.shear,e[1][1]-e[0][1]*t.shear],t.scaley=Math.sqrt(Math.pow(e[1][0],2)+Math.pow(e[1][1],2)),n=Fi(e[1][0],e[1][1]),e[1][0]=n.x,e[1][1]=n.y,t.shear/=t.scaley;const r=-e[0][1],s=e[1][1];return s<0?(t.rotate=Oi(Math.acos(s)),r<0&&(t.rotate=360-t.rotate)):t.rotate=Yn(Math.asin(r)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t}static split2(t){const e=Math.atan2(t[1],t[0]),n=Math.pow(t[0],2)+Math.pow(t[1],2),r=Math.sqrt(n),s=(t[0]*t[3]-t[2]*t[1])/r;return{rotation:e/(Math.PI/180),scaleX:r,scaleY:s,x:t[4],y:t[5]}}static getGroupCoords(t,e){const n=t[0],r=t[1],s=t[2],o=t[3],a=t[4],h=t[5],m=e[0],g=e[1],x=e[2],y=e[3],w=e[4],k=e[5],P=m*y,D=g*x,N=(x*r-n*y)/(D-P),R=(m*r-n*g)/(P-D),O=(x*o-s*y)/(D-P),X=(m*o-s*g)/(P-D),Y=(x*(h-k)+y*(w-a))/(D-P),nt=(m*(h-k)+g*(w-a))/(P-D),V=[N,R,O,X,Y,nt];return Ht.split2(V)}toTransformString(){const t=this.split();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx&&t.dy?"t"+[t.dx,t.dy]:"")+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:"")+(t.rotate?"r"+[t.rotate,0,0]:"")):"matrix"+[this.value[0],this.value[1],this.value[2],this.value[3],this.value[4],this.value[5]]}toString(){return this.isEverTo3d?this.toMatrix3DString():`matrix(${this.value.map(t=>wr(t,6)).join(",")})`}toMatrix3DString(){return this.matrix3d.toString()}toFilter(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.value[0]+", M12="+this.value[2]+", M21="+this.value[1]+", M22="+this.value[3]+", Dx="+this.value[4]+", Dy="+this.value[5]+", sizingmethod='auto expand')"}}class Je{value;constructor(t=rs){this.value=Array.from(t)}unit(){return this.value=Array.from(rs),this}fromString(t){const e=dr("number",t);return e.length===16?e.forEach((n,r)=>{n.fullMatch&&(this.value[r]=parseFloat(n.fullMatch))}):this.unit(),this}toMatrix(t){const e=[this.value[0],this.value[1],this.value[4],this.value[5],this.value[12],this.value[13]];return t?(t.value=e,t):new Ht(e)}multiplyMatrix(t){const e=this.value[0],n=this.value[1],r=this.value[2],s=this.value[3],o=this.value[4],a=this.value[5],h=this.value[6],m=this.value[7],g=this.value[8],x=this.value[9],y=this.value[10],w=this.value[11],k=this.value[12],P=this.value[13],D=this.value[14],N=this.value[15],R=t.value[0],O=t.value[1],X=t.value[2],Y=t.value[3],nt=R*e+O*o+X*g+Y*k,V=R*n+O*a+X*x+Y*P,ot=R*r+O*h+X*y+Y*D,ct=R*s+O*m+X*w+Y*N;return new Ht([nt,V,ot,ct,0,0])}multiply(t){const e=new Ht([t.value[0],t.value[1],t.value[2],t.value[3],0,0]),n=new Ht([t.value[4],t.value[5],t.value[6],t.value[7],0,0]),r=new Ht([t.value[8],t.value[9],t.value[10],t.value[11],0,0]),s=new Ht([t.value[12],t.value[13],t.value[14],t.value[15],0,0]),o=this.multiplyMatrix(e),a=this.multiplyMatrix(n),h=this.multiplyMatrix(r),m=this.multiplyMatrix(s);return this.value[0]=o.value[0],this.value[1]=o.value[1],this.value[2]=o.value[2],this.value[3]=o.value[3],this.value[4]=a.value[0],this.value[5]=a.value[1],this.value[6]=a.value[2],this.value[7]=a.value[3],this.value[8]=h.value[0],this.value[9]=h.value[1],this.value[10]=h.value[2],this.value[11]=h.value[3],this.value[12]=m.value[0],this.value[13]=m.value[1],this.value[14]=m.value[2],this.value[15]=m.value[3],this}translate(t=0,e=0,n=0){return this.multiply(new Je([1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1]))}scale(t=1,e=1,n=1){return this.multiply(new Je([t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1]))}rotate(t,e){const n=Yn(e),r=Math.sin,s=Math.cos;let o;switch(t){case"x":o=[1,0,0,0,0,s(n),r(n),0,0,-r(n),s(n),0,0,0,0,1];break;case"y":o=[s(n),0,-r(n),0,0,1,0,0,r(n),0,s(n),0,0,0,0,1];break;case"z":o=[s(n),r(n),0,0,-r(n),s(n),0,0,0,0,1,0,0,0,0,1];break}return this.multiply(new Je(o))}toString(){return`matrix3d(${this.value.map(t=>wr(t,6)).join(",")})`}}function ln(i){const t=new Ht;return i.replace(/([a-z0-9]+)\s*\(?\s*((-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)*[a-z%]*\s*,?\s*)+)\)?/gi,function(e,n,r){r.indexOf(",")>=0?r=r.split(/\s*,\s*/):r=r.split(/\s+/);const s=[];for(let o=0,a=r.length;o<a;o++)r[o].trim()&&s.push(parseFloat(""+r[o]));switch(n.toLowerCase()){case"t":case"translate":t.translate(s[0],s[1]);break;case"translatex":t.translateX(s[0]);break;case"translatey":t.translateY(s[0]);break;case"translatez":t.translateZ(s[0]);break;case"translate3d":t.translate3d(s[0],s[1],s[2]);break;case"r":case"rotate":t.rotate(s[0],s[1]??0,s[2]??0);break;case"rotatex":t.rotateX(s[0]);break;case"rotatey":t.rotateY(s[0]);break;case"rotatez":t.rotateZ(s[0]);break;case"rotate3d":t.rotate3d(s[0],s[1],s[2]);break;case"s":case"scale":t.scale(s[0],s[1]??s[0]);break;case"scalex":t.scaleX(s[0]);break;case"scaley":t.scaleY(s[0]);break;case"scalez":t.scaleZ(s[0]);break;case"scale3d":t.scale3d(s[0],s[1],s[2]);break;case"skew":t.skew(s[0],s[1]??0);break;case"skewx":t.skewX(s[0]);break;case"skewy":t.skewY(s[0]);break;case"skewz":t.skewZ(s[0]);break;case"skew3d":t.skew3d(s[0],s[1],s[2]);break;case"m":case"matrix":t.multiply([s[0],s[1],s[2],s[3],s[4],s[5]]);break;case"matrix3d":t.matrix3d.multiply(new Je(s));break}return""}),t}function Gi(i,t,e,n,r,s){if(typeof r>"u"||typeof s>"u"){const o=i-e,a=t-n;return!o&&!a?0:(180+Math.atan2(-a,-o)*180/Math.PI+360)%360}else return Gi(i,t,r,s)-Gi(e,n,r,s)}const Ct=ns.eve,no=ns.elemental,Zn={cursor:1,cx:0,cy:0,fill:1,"fill-opacity":0,font:1,"font-family":1,"font-size":0,"font-style":1,"font-weight":1,height:0,"letter-spacing":0,opacity:0,r:0,rx:0,ry:0,src:1,stroke:1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":1,width:0,x:0,y:0};function Vi(i,t,e){for(var n=(i+"").split(";"),r=/^\s+|\s+$/g,s,o=0,a=n.length;o<a;o++){var h=n[o].split(":");s=h[0].replace(r,"").replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()}),(!e||s in e)&&(t[s]=h[1].replace(r,""),e&&!e[s]&&(t[s]=parseFloat(t[s])))}}function ss(i){const t=no(),e=[],n=[],r={};let s,o,a;const h={};function m(g,x){return function(y,w){const k={type:x||g};e.push(k);for(let P in w)Object.prototype.hasOwnProperty.call(w,P)&&Ct("rappar."+g+".attr."+P,k,w[P],P);Ct("rappar."+g+".attrend",k,w)}}return Ct.on("rappar.polygon.attr.points",function(g){this.path="M"+g+"z",Ct.stop()}),Ct.on("rappar.image.attr.xlink:href",function(g){this.src=g,Ct.stop()}),Ct.on("rappar.path.attr.d",function(g){this.path=g,Ct.stop()}),Ct.on("rappar.*.attr.transform",function(g){this.transform=ln(g).toTransformString(),Ct.stop()}),Ct.on("rappar.*.attr.fill",function(g){var x=g.match(/url\(#([^)]+)\)/),y=this;x&&(x=x[1],r[x]?this.fill=r[x]:Ct.on("rappar.found."+x,function(w){y.fill=w}),Ct.stop())}),Ct.on("rappar.line.attrend",function(g){this.path="M"+[g.x1,g.y1,g.x2,g.y2]}),Ct.on("rappar.*.attrend",function(){for(var g=n.length;g--;)if(n[g]!=this){let y="",w="";for(var x in n[g])x=="transform"?y=n[g].transform:x=="class"&&h["."+n[g][x]]?w=h["."+n[g][x]].join(";")+";"+w:x=="id"&&h["#"+n[g][x]]?w=h["#"+n[g][x]].join(";")+";"+w:typeof this[x]>"u"&&(this[x]=n[g][x]);this.type&&(typeof this.transform>"u"?this.transform=y:this.transform+=y,typeof this.style>"u"?this.style=w:this.style=w+this.style,Vi(this.style,this,Zn))}}),Ct.on("rappar.*.attr.style",function(g){var x=function(){Vi(g,this,Zn),Ct.unbind("rappar.*.attrend",x)};Ct.on("rappar.*.attrend",x),Ct.stop()}),Ct.on("rappar.*.attr.*",function(g,x){x in Zn&&(this[x]=Zn[x]?g:parseFloat(g))}),Ct.on("elemental.tag.circle",m("circle")),Ct.on("elemental.tag.ellipse",m("ellipse")),Ct.on("elemental.tag.polygon",m("polygon","path")),Ct.on("elemental.tag.path",m("path")),Ct.on("elemental.tag.line",m("line","path")),Ct.on("elemental.tag.rect",m("rect")),Ct.on("elemental.tag.image",m("image")),Ct.on("elemental.tag.text",m("text")),Ct.on("elemental.text",function(g){try{const x=da(g);for(let y of x.stylesheet.rules){for(let w of y.selectors)h[w]=[];for(let w of y.declarations)for(let k of y.selectors)h[k].push(`${w.property}:${w.value}`)}}catch{}}),Ct.on("elemental.tag.svg",function(g,x){let y=x.width||0,w=x.height||0;if(!y||!w){const k=x.viewBox.split(/\s+/gi);y=parseFloat(k[2])-parseFloat(k[0]),w=parseFloat(k[3])-parseFloat(k[1])}e.push({type:"viewbox",width:y,height:w})}),Ct.on("rappar.text.attrend",function(){s="",o=this,this["text-anchor"]=this["text-anchor"]||"start"}),Ct.on("elemental.text",function(g,x,y){o&&(s+=y)}),Ct.on("elemental./tag.text",function(){o.text=s,o=null}),Ct.on("elemental.tag.g",function(g,x){var y={};n.push(y);for(var w in x)Object.prototype.hasOwnProperty.call(x,w)&&(y[w]=x[w],Ct("rappar.g.attr."+w,y,x[w],w));Ct("rappar.g.attrend",y)}),Ct.on("elemental./tag.g",function(g,x){n.pop()}),Ct.on("elemental.tag.linearGradient",function(g,x){a={id:x.id,angle:+(360+Gi(x.x1,x.y1,x.x2,x.y2,x.x1+100,x.y1)).toFixed(2),stops:[]}}),Ct.on("elemental./tag.linearGradient",function(){for(var g=[a.angle],x,y=0,w=a.stops.length;y<w;y++)x=a.stops[y],y&&y!=w-1?g.push(x.color+":"+x.offset):g.push(x.color);r[a.id]=g.join("-"),Ct("rappar.found."+a.id,null,r[a.id])}),Ct.on("elemental.tag.radialGradient",function(g,x){a={id:x.id,stops:[]}}),Ct.on("elemental./tag.radialGradient",function(){for(var g=[],x,y=0,w=a.stops.length;y<w;y++)x=a.stops[y],y&&y!=w-1?g.push(x.color+":"+x.offset):g.push(x.color);r[a.id]="r"+g.join("-"),Ct("rappar.found."+a.id,null,r[a.id])}),Ct.on("elemental.tag.stop",function(g,x){var y={};x.style&&Vi(x.style,y),y.offset=y.offset||x.offset,y.color=y["stop-color"]||x["stop-color"],y.opacity=y["stop-opacity"]||x["stop-opacity"],~(y.offset+"").indexOf("%")?y.offset=parseFloat(y.offset):y.offset=parseFloat(y.offset)*100,y.offset=+y.offset.toFixed(2),a.stops.push(y)}),t(i),t.end(),e}function as(i){return typeof i!="string"?!1:(i=i.trim(),/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(i)&&/[\dz]$/i.test(i)&&i.length>4)}const ji={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},io=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ro=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function so(i){const t=i.match(ro);return t?t.map(Number):[]}function Kn(i){const t=[];return i.replace(io,function(e,n,r){let s=n.toLowerCase();for(r=so(r),s=="m"&&r.length>2&&(t.push([n].concat(r.splice(0,2))),s="l",n=n=="m"?"l":"L");;){if(r.length==ji[s])return r.unshift(n),t.push(r);if(r.length<ji[s])throw new Error("malformed path data");t.push([n].concat(r.splice(0,ji[s])))}}),t}function Qn(i){var t=0,e=0,n=0,r=0;return i.map(function(s){s=s.slice();var o=s[0],a=o.toUpperCase();if(o!=a)switch(s[0]=a,o){case"a":s[6]+=n,s[7]+=r;break;case"v":s[1]+=r;break;case"h":s[1]+=n;break;default:for(var h=1;h<s.length;)s[h++]+=n,s[h++]+=r}switch(a){case"Z":n=t,r=e;break;case"H":n=s[1];break;case"V":r=s[1];break;case"M":n=t=s[1],r=e=s[2];break;default:n=s[s.length-2],r=s[s.length-1]}return s})}function ao(i){var t=0,e=0,n=0,r=0;return i.map(function(s){s=s.slice();var o=s[0],a=o.toLowerCase();if(o!=a)switch(s[0]=a,o){case"A":s[6]-=n,s[7]-=r;break;case"V":s[1]-=r;break;case"H":s[1]-=n;break;default:for(var h=1;h<s.length;)s[h++]-=n,s[h++]-=r}switch(a){case"z":n=t,r=e;break;case"h":n+=s[1];break;case"v":r+=s[1];break;case"m":n+=s[1],r+=s[2],t+=s[1],e+=s[2];break;default:n+=s[s.length-2],r+=s[s.length-1]}return s})}const Mn=Math.PI*2;function os(i,t,e,n){const r=i*n-t*e<0?-1:1;let s=i*e+t*n;return s>1&&(s=1),s<-1&&(s=-1),r*Math.acos(s)}function oo(i,t,e,n,r,s,o,a,h,m){const g=m*(i-e)/2+h*(t-n)/2,x=-h*(i-e)/2+m*(t-n)/2,y=o*o,w=a*a,k=g*g,P=x*x;let D=y*w-y*P-w*k;D<0&&(D=0),D/=y*P+w*k,D=Math.sqrt(D)*(r===s?-1:1);const N=D*o/a*x,R=D*-a/o*g,O=m*N-h*R+(i+e)/2,X=h*N+m*R+(t+n)/2,Y=(g-N)/o,nt=(x-R)/a,V=(-g-N)/o,ot=(-x-R)/a,ct=os(1,0,Y,nt);let vt=os(Y,nt,V,ot);return s===0&&vt>0&&(vt-=Mn),s===1&&vt<0&&(vt+=Mn),[O,X,ct,vt]}function ho(i,t){const e=1.3333333333333333*Math.tan(t/4),n=Math.cos(i),r=Math.sin(i),s=Math.cos(i+t),o=Math.sin(i+t);return[n,r,n-r*e,r+n*e,s+o*e,o-s*e,s,o]}function co(i,t,e,n,r,s,o,a,h){const m=Math.sin(h*Mn/360),g=Math.cos(h*Mn/360),x=g*(i-e)/2+m*(t-n)/2,y=-m*(i-e)/2+g*(t-n)/2;if(x===0&&y===0)return[];if(o===0||a===0)return[];o=Math.abs(o),a=Math.abs(a);const w=x*x/(o*o)+y*y/(a*a);w>1&&(o*=Math.sqrt(w),a*=Math.sqrt(w));const k=oo(i,t,e,n,r,s,o,a,m,g),P=[];let D=k[2],N=k[3];const R=Math.max(Math.ceil(Math.abs(N)/(Mn/4)),1);N/=R;for(let O=0;O<R;O++)P.push(ho(D,N)),D+=N;return P.map(O=>{for(let X=0;X<O.length;X+=2){let Y=O[X+0],nt=O[X+1];Y*=o,nt*=a;const V=g*Y-m*nt,ot=m*Y+g*nt;O[X+0]=V+k[0],O[X+1]=ot+k[1]}return O})}function ti(i){for(var t,e=[],n=0,r=0,s=0,o=0,a=null,h=null,m=0,g=0,x=0,y=i.length;x<y;x++){var w=i[x],k=w[0];switch(k){case"M":s=w[1],o=w[2];break;case"A":var P=co(m,g,w[6],w[7],w[4],w[5],w[1],w[2],w[3]);if(!P.length)continue;P=P.map(X=>{const[Y,nt,V,ot,ct,vt,dt,ht]=X;return{x1:V,y1:ot,x2:ct,y2:vt,x:dt,y:ht}});for(var D=0,N;D<P.length;D++)N=P[D],w=["C",N.x1,N.y1,N.x2,N.y2,N.x,N.y],D<P.length-1&&e.push(w);break;case"S":var R=m,O=g;(t=="C"||t=="S")&&(R+=R-n,O+=O-r),w=["C",R,O,w[1],w[2],w[3],w[4]];break;case"T":t=="Q"||t=="T"?(a=m*2-a,h=g*2-h):(a=m,h=g),w=hs(m,g,a,h,w[1],w[2]);break;case"Q":a=w[1],h=w[2],w=hs(m,g,w[1],w[2],w[3],w[4]);break;case"L":w=ei(m,g,w[1],w[2]);break;case"H":w=ei(m,g,w[1],g);break;case"V":w=ei(m,g,m,w[1]);break;case"Z":w=ei(m,g,s,o);break}t=k,m=w[w.length-2],g=w[w.length-1],w.length>4?(n=w[w.length-4],r=w[w.length-3]):(n=m,r=g),e.push(w)}return e}function ei(i,t,e,n){return["C",i,t,e,n,e,n]}function hs(i,t,e,n,r,s){return["C",i/3+.6666666666666666*e,t/3+.6666666666666666*n,r/3+.6666666666666666*e,s/3+.6666666666666666*n,r,s]}const lo=i=>Array.isArray(i);function un(i){if(!(this instanceof un))return new un(i);this._path=lo(i)?i:Kn(i),this._path=Qn(this._path),this._path=fo(this._path),this._path=uo(this._path)}un.prototype.at=function(i,t){return this._walk(i,t).pos},un.prototype.length=function(){return this._walk(null).length},un.prototype._walk=function(i,t){let e=[0,0],n=[0,0,0],r=[0,0],s=0;for(let g=0;g<this._path.length;g++){let x=this._path[g];if(x[0]==="M"){if(e[0]=x[1],e[1]=x[2],i===0)return{length:s,pos:e}}else if(x[0]==="C"){n[0]=r[0]=e[0],n[1]=r[1]=e[1],n[2]=s;let y=100;for(let w=0;w<=y;w++){let k=w/y,P=o(x,k),D=a(x,k);if(s+=Xi(e[0],e[1],P,D),e[0]=P,e[1]=D,typeof i=="number"&&s>=i){let N=(s-i)/(s-n[2]),R=[e[0]*(1-N)+n[0]*N,e[1]*(1-N)+n[1]*N];return{length:s,pos:R}}n[0]=e[0],n[1]=e[1],n[2]=s}}else if(x[0]==="Q"){n[0]=r[0]=e[0],n[1]=r[1]=e[1],n[2]=s;let y=100;for(let w=0;w<=y;w++){let k=w/y,P=h(x,k),D=m(x,k);if(s+=Xi(e[0],e[1],P,D),e[0]=P,e[1]=D,typeof i=="number"&&s>=i){let N=(s-i)/(s-n[2]),R=[e[0]*(1-N)+n[0]*N,e[1]*(1-N)+n[1]*N];return{length:s,pos:R}}n[0]=e[0],n[1]=e[1],n[2]=s}}else if(x[0]==="L"){if(n[0]=e[0],n[1]=e[1],n[2]=s,s+=Xi(e[0],e[1],x[1],x[2]),e[0]=x[1],e[1]=x[2],typeof i=="number"&&s>=i){let y=(s-i)/(s-n[2]),w=[e[0]*(1-y)+n[0]*y,e[1]*(1-y)+n[1]*y];return{length:s,pos:w}}n[0]=e[0],n[1]=e[1],n[2]=s}}return{length:s,pos:e};function o(g,x){return Math.pow(1-x,3)*r[0]+3*Math.pow(1-x,2)*x*g[1]+3*(1-x)*Math.pow(x,2)*g[3]+Math.pow(x,3)*g[5]}function a(g,x){return Math.pow(1-x,3)*r[1]+3*Math.pow(1-x,2)*x*g[2]+3*(1-x)*Math.pow(x,2)*g[4]+Math.pow(x,3)*g[6]}function h(g,x){return Math.pow(1-x,2)*r[0]+2*(1-x)*x*g[1]+Math.pow(x,2)*g[3]}function m(g,x){return Math.pow(1-x,2)*r[1]+2*(1-x)*x*g[2]+Math.pow(x,2)*g[4]}};function Xi(i,t,e,n){let r=i-e,s=t-n;return Math.sqrt(r*r+s*s)}function uo(i){let t,e=0,n=0,r={S:{to:"C",x:3},T:{to:"Q",x:1}};for(let s=0,o=i.length;s<o;s++){let a=i[s],h=r[a[0]];h&&(a[0]=h.to,t&&(t[0]===h.to?(e=2*t[h.x+2]-t[h.x],n=2*t[h.x+3]-t[h.x+1]):(e=t[t.length-2],n=t[t.length-1])),a.splice(1,0,e,n)),t=a}return i}function fo(i){let t=[],e=["L",0,0],n;for(let r=0,s=i.length;r<s;r++){let o=i[r];switch(o[0]){case"M":e=["L",o[1],o[2]],t.push(o);break;case"Z":t.push(e);break;case"H":n=t[t.length-1]||["L",0,0],t.push(["L",o[1],n[n.length-1]]);break;case"V":n=t[t.length-1]||["L",0,0],t.push(["L",n[n.length-2],o[1]]);break;default:t.push(o)}}return t}const Hi=i=>{if(typeof i=="function"||Object(i)!==i)return i;const t=new i.constructor;for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=Hi(i[e]));return t};function Wi(i){const t=Wi.ps=Wi.ps||{};return t[i]?t[i].sleep=100:t[i]={sleep:100},setTimeout(()=>{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==i&&(t[e].sleep--,t[e].sleep||delete t[e])}),t[i]}function In(i,t,e,n){return i==null&&(i=t=e=n=0),t==null&&(t=i.y,e=i.width,n=i.height,i=i.x),{x:i,y:t,width:e,w:e,height:n,h:n,x2:i+e,y2:t+n,cx:i+e/2,cy:t+n/2,r1:Math.min(e,n)/2,r2:Math.max(e,n)/2,r0:Math.sqrt(e*e+n*n)/2,path:xo(i,t,e,n),vb:[i,t,e,n].join(" ")}}function cs(i,t,e,n,r,s,o,a,h){const m=1-h,g=m**3,x=m**2,y=h*h,w=y*h,k=g*i+x*3*h*e+m*3*h*h*r+w*o,P=g*t+x*3*h*n+m*3*h*h*s+w*a,D=i+2*h*(e-i)+y*(r-2*e+i),N=t+2*h*(n-t)+y*(s-2*n+t),R=e+2*h*(r-e)+y*(o-2*r+e),O=n+2*h*(s-n)+y*(a-2*s+n),X=m*i+h*e,Y=m*t+h*n,nt=m*r+h*o,V=m*s+h*a,ot=90-Math.atan2(D-R,N-O)*180/Math.PI;return{x:k,y:P,m:{x:D,y:N},n:{x:R,y:O},start:{x:X,y:Y},end:{x:nt,y:V},alpha:ot}}function ls(i,t,e,n,r,s,o,a){Array.isArray(i)||(i=[i,t,e,n,r,s,o,a]);const h=ds(...i);return In(h.min.x,h.min.y,h.max.x-h.min.x,h.max.y-h.min.y)}function po(i,t,e){return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height}function mo(i,t){i=In(i),t=In(t);const{x:e,y:n,width:r,height:s}=i,{x:o,y:a,width:h,height:m}=t,g=e+r/2,x=n+s/2,y=o+h/2,w=a+m/2;return Math.abs(g-y)<=(r+h)/2||Math.abs(x-w)<=(s+m)/2}function us(i,t,e,n,r){const s=-3*t+9*e-9*n+3*r,o=i*s+6*t-12*e+6*n;return i*o-3*t+3*e}function fs(i,t,e,n,r,s,o,a,h){h==null&&(h=1),h=Math.max(0,Math.min(h,1));const m=h/2,g=12,x=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],y=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472];let w=0;for(let k=0;k<g;k++){const P=m*x[k]+m,D=us(P,i,e,r,o),N=us(P,t,n,s,a),R=D*D+N*N;w+=y[k]*Math.sqrt(R)}return m*w}function go(i,t,e,n,r,s,o,a){if(Math.max(i,e)<Math.min(r,o)||Math.min(i,e)>Math.max(r,o)||Math.max(t,n)<Math.min(s,a)||Math.min(t,n)>Math.max(s,a))return;const h=(i*n-t*e)*(r-o)-(i-e)*(r*a-s*o),m=(i*n-t*e)*(s-a)-(t-n)*(r*a-s*o),g=(i-e)*(s-a)-(t-n)*(r-o);if(!g)return;const x=h/g,y=m/g,w=Number(x.toFixed(2)),k=Number(y.toFixed(2));if(!(w<Number(Math.min(i,e).toFixed(2))||w>Number(Math.max(i,e).toFixed(2))||w<Number(Math.min(r,o).toFixed(2))||w>Number(Math.max(r,o).toFixed(2))||k<Number(Math.min(t,n).toFixed(2))||k>Number(Math.max(t,n).toFixed(2))||k<Number(Math.min(s,a).toFixed(2))||k>Number(Math.max(s,a).toFixed(2))))return{x,y}}function vo(i,t,e){const n=ls(i),r=ls(t);if(!mo(n,r))return e?0:[];const s=fs.apply(0,i),o=fs.apply(0,t),a=Math.ceil(s/8),h=Math.ceil(o/8),m=[],g=[],x={};let y=e?0:[];for(let w=0;w<a+1;w++){const k=cs.apply(0,i.concat(w/a));m.push({x:k.x,y:k.y,t:w/a})}for(let w=0;w<h+1;w++){const k=cs.apply(0,t.concat(w/h));g.push({x:k.x,y:k.y,t:w/h})}for(let w=0;w<a;w++)for(let k=0;k<h;k++){const P=m[w],D=m[w+1],N=g[k],R=g[k+1],O=Math.abs(D.x-P.x)<.001?"y":"x",X=Math.abs(R.x-N.x)<.001?"y":"x",Y=go(P.x,P.y,D.x,D.y,N.x,N.y,R.x,R.y);if(Y&&x[Y.x.toFixed(4)]!==Y.y.toFixed(4)){x[Y.x.toFixed(4)]=Y.y.toFixed(4);const nt=P.t+Math.abs((Y[O]-P[O])/(D[O]-P[O]))*(D.t-P.t),V=N.t+Math.abs((Y[X]-N[X])/(R[X]-N[X]))*(R.t-N.t);nt>=0&&nt<=1&&V>=0&&V<=1&&(e?y++:y.push({x:Y.x,y:Y.y,t1:nt,t2:V}))}}return y}function yo(i,t,e){let n,r,s,o,a,h,m,g,x,y,w=e?0:[];for(let k=0,P=i.length;k<P;k++){const D=i[k];if(D[0]==="M")n=a=D[1],r=h=D[2];else{D[0]==="C"?(x=[n,r].concat(D.slice(1)),n=x[6],r=x[7]):(x=[n,r,n,r,a,h,a,h],n=a,r=h);for(let N=0,R=t.length;N<R;N++){const O=t[N];if(O[0]==="M")s=m=O[1],o=g=O[2];else{O[0]==="C"?(y=[s,o].concat(O.slice(1)),s=y[6],o=y[7]):(y=[s,o,s,o,m,g,m,g],s=m,o=g);const X=vo(x,y,e);if(e)w+=X;else{for(let Y=0,nt=X.length;Y<nt;Y++)X[Y].segment1=k,X[Y].segment2=N,X[Y].bez1=x,X[Y].bez2=y;w=w.concat(X)}}}}}return w}function wo(i){const t=Wi(i);if(t.bbox)return Hi(t.bbox);if(!i)return In();let e=0,n=0,r=[],s=[],o=[];for(let y=0,w=i.length;y<w;y++)if(o=i[y],o[0]==="M")e=o[1],n=o[2],r.push(e),s.push(n);else{const k=ds(e,n,o[1],o[2],o[3],o[4],o[5],o[6]);r=r.concat(k.min.x,k.max.x),s=s.concat(k.min.y,k.max.y),e=o[5],n=o[6]}const a=Math.min.apply(0,r),h=Math.min.apply(0,s),m=Math.max.apply(0,r),g=Math.max.apply(0,s),x=In(a,h,m-a,g-h);return t.bbox=Hi(x),x}function xo(i,t,e,n,r){return r?[["M",Number(i)+Number(r),t],["l",e-r*2,0],["a",r,r,0,0,1,r,r],["l",0,n-r*2],["a",r,r,0,0,1,-r,r],["l",r*2-e,0],["a",r,r,0,0,1,-r,-r],["l",0,r*2-n],["a",r,r,0,0,1,r,-r],["z"]]:[["M",i,t],["l",e,0],["l",0,n],["l",-e,0],["z"]]}function ds(i,t,e,n,r,s,o,a){const h=[],m=[[],[]];let g,x,y,w,k,P,D,N;for(let Y=0;Y<2;++Y){if(Y===0?(x=6*i-12*e+6*r,g=-3*i+9*e-9*r+3*o,y=3*e-3*i):(x=6*t-12*n+6*s,g=-3*t+9*n-9*s+3*a,y=3*n-3*t),Math.abs(g)<1e-12){if(Math.abs(x)<1e-12)continue;w=-y/x,w>0&&w<1&&h.push(w);continue}D=x*x-4*y*g,N=Math.sqrt(D),!(D<0)&&(k=(-x+N)/(2*g),k>0&&k<1&&h.push(k),P=(-x-N)/(2*g),P>0&&P<1&&h.push(P))}let R=h.length,O;const X=R;for(;R--;)w=h[R],O=1-w,m[0][R]=O*O*O*i+3*O*O*w*e+3*O*w*w*r+w*w*w*o,m[1][R]=O*O*O*t+3*O*O*w*n+3*O*w*w*s+w*w*w*a;return m[0][X]=i,m[1][X]=t,m[0][X+1]=o,m[1][X+1]=a,m[0].length=m[1].length=X+2,{min:{x:Math.min.apply(0,m[0]),y:Math.min.apply(0,m[1])},max:{x:Math.max.apply(0,m[0]),y:Math.max.apply(0,m[1])}}}function bo(i,t,e){const n=wo(i);return!(!po(n,t,e)||yo(i,ti([["M",t,e],["H",n.x2+10]]),1)%2!==1)}const Yi=new Map;function ps(i){if(Yi.has(i))return Yi.get(i);const t=un(i);return Yi.set(i,t),t}function ms(i){const t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",i),t}function gs(i,t){return Vn?ms(i).getTotalLength(t):ps(i).length()}function vs(i,t){if(Vn)return ms(i).getPointAtLength(t);{const e=ps(i),[n,r]=e.at(t);return{x:n,y:r}}}let ae=null;function ys(i,t,e){if(Vn){ae||(ae=document.createElement("canvas").getContext("2d"));const n=new Path2D(i);return ae.isPointInPath(n,t,e)}else return bo(i,t,e)}function ws(i,t,e,{lineWidth:n=1,lineCap:r="butt",lineJoin:s="miter"}){if(Vn){if(ae||(ae=document.createElement("canvas").getContext("2d")),ae.isPointInStroke){ae.save(),ae.lineWidth=n,ae.lineCap=r,ae.lineJoin=s;const o=new Path2D(i),a=ae.isPointInStroke(o,t,e);return ae.restore(),a}}else return null}class qi{point;constructor(t){this.point=new fe(t)}static fromSVGPathData(t){if(t.length<3)throw new Error("Line 参数个数错误");if(t[0].toUpperCase()!=="L")throw new Error("Line command 错误");return new qi({x:t[1],y:t[2]})}toSVGPathData(){return["L",this.point.x,this.point.y]}toSVGPathD(){return"L "+this.point.toSVGPathD()}}const xs=qi;class $i extends xs{rx;ry;xAxisRotate;largeArcFlag;sweepFlag;constructor(t){super(t),this.rx=t.rx,this.ry=t.ry,this.xAxisRotate=t?.xAxisRotate??0,this.largeArcFlag=t?.largeArcFlag??1,this.sweepFlag=t?.sweepFlag??1}static fromSVGPathData(t){if(t.length<8)throw new Error("Arc 参数个数错误");if(t[0].toUpperCase()!=="A")throw new Error("Arc command 错误");return new $i({x:t[6],y:t[7],rx:t[1],ry:t[2],xAxisRotate:t[3],largeArcFlag:t[4],sweepFlag:t[5]})}toSVGPathData(){return["A",this.rx,this.ry,this.xAxisRotate,this.largeArcFlag,this.sweepFlag,this.point.x,this.point.y]}toSVGPathD(){return`A ${this.rx},${this.ry} ${this.xAxisRotate} ${this.largeArcFlag},${this.sweepFlag} ${this.point.toSVGPathD()}`}}const bs=$i;class Ji extends xs{ctrlPoints=[];constructor(t){super(t),this.ctrlPoints.push(new fe({x:t.c1x,y:t.c1y})),this.ctrlPoints.push(new fe({x:t.c2x,y:t.c2y}))}static fromSVGPathData(t){if(t.length<7)throw new Error("CubicBezier 参数个数错误");if(t[0].toUpperCase()!=="C")throw new Error("CubicBezier command 错误");return new Ji({c1x:t[1],c1y:t[2],c2x:t[3],c2y:t[4],x:t[5],y:t[6]})}toSVGPathData(){return["C",this.ctrlPoints[0].x,this.ctrlPoints[0].y,this.ctrlPoints[1].x,this.ctrlPoints[1].y,this.point.x,this.point.y]}toSVGPathD(){return`C ${this.ctrlPoints.map(t=>t.toSVGPathD()).join(" ")} ${this.point.toSVGPathD()}`}}const Zi=Ji;class Ze{startPoint;isClosed=!1;lines=[];normalizedLines=[];constructor(t){this.startPoint=t?.startPoint??null,this.isClosed=t?.isClosed??!1,t?.lines?.forEach(this.addLine),this.normalize()}setStartPoint(t,e){return this.startPoint=new fe({x:t,y:e}),this}addLine(t){return this.lines.push(t),this}normalize(){let t=this.lines.reduce((n,r)=>(n+=r.toSVGPathD(),n),"");this.startPoint&&(t="M "+this.startPoint.toSVGPathD()+t),this.isClosed&&(t+="Z"),this.normalizedLines=[];const e=ti(Qn(Kn(t)));for(let n=0,r=e.length;n<r;n++){const s=e[n];if(n==0&&s[0]=="M"){this.setStartPoint(s[1],s[2]);continue}if(n==r-1&&s[0]=="Z"){this.isClosed=!0;continue}this.normalizedLines.push(Zi.fromSVGPathData(s))}return this}static fromSVGPathD(t,e){if(!as(t))throw new Error("Not an SVG path!");const n=ti(Qn(Kn(t)));return Ze.fromSVGPathData(n,e)}static fromSVGPathData(t,e){const n=new Ze;for(let s=0,o=t.length;s<o;s++){const a=t[s],h=a[0];if(s==0&&h=="M"){n.setStartPoint(a[1],a[2]);continue}if(s==o-1&&h=="Z"){n.isClosed=!0;continue}n.addLine(new Zi({c1x:a[1],c1y:a[2],c2x:a[3],c2y:a[4],x:a[5],y:a[6]}))}n.normalize();const r=ln(e??"");return n.transform(r)}toSVGPathD(){let t="";this.startPoint&&(t+="M "+this.startPoint.toSVGPathD());for(let e=0,n=this.normalizedLines.length;e<n;e++)t+=this.normalizedLines[e].toSVGPathD();return this.isClosed&&(t+="Z"),t}toSVGPathData(){const t=[];this.startPoint&&t.push(["M",...this.startPoint.toSVGPathData()]);for(let e=0,n=this.normalizedLines.length;e<n;e++)t.push(this.normalizedLines[e].toSVGPathData());return this.isClosed&&t.push(["Z"]),t}toCanvas(t){const e=this.normalizedLines;e.length&&(this.startPoint&&(t.beginPath(),t.moveTo(this.startPoint.x,this.startPoint.y)),e.forEach(n=>{const[r,...s]=n.toSVGPathData();r==="M"?t.moveTo(s[0],s[1]):r==="Z"?t.closePath():t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5])}),this.isClosed&&t.closePath())}get bounds(){let t=[0,0,0,0];if(this.normalizedLines.length){t=[1/0,1/0,-1/0,-1/0];for(let e=0,n=this.normalizedLines.length;e<n;e++){const r=this.normalizedLines[e],s=[...r.ctrlPoints,r.point];for(let o=0;o<s.length;o++){const a=s[o].x,h=s[o].y;a<t[0]&&(t[0]=a),h<t[1]&&(t[1]=h),a>t[2]&&(t[2]=a),h>t[3]&&(t[3]=h)}}}return t}get size(){const t=this.bounds;return[t[2]-t[0],t[3]-t[1]]}get center(){const[t,e,n,r]=this.bounds;return[(t+n)/2,(e+r)/2]}getTotalLength(){return gs(this.toSVGPathD())}getPointAtLength(t){return vs(this.toSVGPathD(),t)}isPointInPath(t,e){return ys(this.toSVGPathD(),t,e)}isPointInStroke(t,e,n={lineWidth:1,lineCap:"butt",lineJoin:"miter"}){return ws(this.toSVGPathD(),t,e,n)}transform(t){if(this.startPoint){const[e,n]=t.transformPoint(this.startPoint.x,this.startPoint.y);this.setStartPoint(e,n)}return this.normalizedLines=this.normalizedLines.map(e=>{const[n,...r]=e.toSVGPathData(),s=[n];for(let o=0,a=r.length;o<a;o+=2){const h=r[o],m=r[o+1],[g,x]=t.transformPoint(h,m);s.push(g,x)}return Zi.fromSVGPathData(s)}),this}translate(t,e){const n=new Ht().translate(t,e);return this.transform(n)}rotate(t,e=0,n=0){const r=new Ht().rotate(t,e,n);return this.transform(r)}scale(t,e=t,n=0,r=0){const s=new Ht().scale(t,e,n,r);return this.transform(s)}skew(t,e=0){const n=new Ht().skew(t,e);return this.transform(n)}trim(){const[t,e]=this.bounds;return this.translate(-t,-e),this}static generateRosetta(t,e,n,r,s){if(s==0)throw new Error("no dividing by zero, please");const o=new Ze;o.setStartPoint(t,e);const a=360/s;for(let h=0;h<s;h+=1){const m=a*h*Math.PI/180,g=t+2*n*Math.cos(m),x=e+2*n*Math.sin(m);o.addLine(new bs({x:g,y:x,rx:n,ry:r,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1})),o.addLine(new bs({x:t,y:e,rx:n,ry:r,xAxisRotate:a*h,largeArcFlag:1,sweepFlag:1}))}return o.normalize(),o}}var _s={exports:{}};(function(i,t){(function(e,n){i.exports=n()})(window,function(){return function(e){var n={};function r(s){if(n[s])return n[s].exports;var o=n[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(s,o,a){r.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:a})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,o){if(1&o&&(s=r(s)),8&o||4&o&&typeof s=="object"&&s&&s.__esModule)return s;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:s}),2&o&&typeof s!="string")for(var h in s)r.d(a,h,function(m){return s[m]}.bind(null,h));return a},r.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(o,"a",o),o},r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},r.p="",r(r.s=1)}([function(e,n,r){var s,o;s=[r(2)],(o=function(a){function h(l){if(h.is(l,"function"))return m?l():a.on("raphael.DOMload",l);if(h.is(l,it))return h._engine.create[R](h,l.splice(0,3+h.is(l[0],K))).add(l);var f=Array.prototype.slice.call(arguments,0);if(h.is(f[f.length-1],"function")){var d=f.pop();return m?d.call(h._engine.create[R](h,f)):a.on("raphael.DOMload",function(){d.call(h._engine.create[R](h,f))})}return h._engine.create[R](h,arguments)}h.version="2.3.0",h.eve=a;var m,g,x=/[, ]+/,y={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},w=/\{(\d+)\}/g,k="hasOwnProperty",P={doc:document,win:window},D={was:Object.prototype[k].call(P.win,"Raphael"),is:P.win.Raphael},N=function(){this.ca=this.customAttributes={}},R="apply",O="concat",X="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,Y="",nt=" ",V=String,ot="split",ct="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[ot](nt),vt={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},dt=V.prototype.toLowerCase,ht=Math,pt=ht.max,ut=ht.min,Pt=ht.abs,kt=ht.pow,Dt=ht.PI,K="number",it="array",st=Object.prototype.toString,E=(h._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),C={NaN:1,Infinity:1,"-Infinity":1},b=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,A=ht.round,L=parseFloat,F=parseInt,B=V.prototype.toUpperCase,q=h._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},z=h._availableAnimAttrs={blur:K,"clip-rect":"csv",cx:K,cy:K,fill:"colour","fill-opacity":K,"font-size":K,height:K,opacity:K,path:"path",r:K,rx:K,ry:K,stroke:"colour","stroke-opacity":K,"stroke-width":K,transform:"transform",width:K,x:K,y:K},J=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,at={hs:1,rg:1},ft=/,?([achlmqrstvxz]),?/gi,yt=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Tt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,wt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,Et=(h._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),At=function(l,f){return L(l)-L(f)},Mt=function(l){return l},mt=h._rectPath=function(l,f,d,c,u){return u?[["M",l+u,f],["l",d-2*u,0],["a",u,u,0,0,1,u,u],["l",0,c-2*u],["a",u,u,0,0,1,-u,u],["l",2*u-d,0],["a",u,u,0,0,1,-u,-u],["l",0,2*u-c],["a",u,u,0,0,1,u,-u],["z"]]:[["M",l,f],["l",d,0],["l",0,c],["l",-d,0],["z"]]},Nt=function(l,f,d,c){return c==null&&(c=d),[["M",l,f],["m",0,-c],["a",d,c,0,1,1,0,2*c],["a",d,c,0,1,1,0,-2*c],["z"]]},It=h._getPath={path:function(l){return l.attr("path")},circle:function(l){var f=l.attrs;return Nt(f.cx,f.cy,f.r)},ellipse:function(l){var f=l.attrs;return Nt(f.cx,f.cy,f.rx,f.ry)},rect:function(l){var f=l.attrs;return mt(f.x,f.y,f.width,f.height,f.r)},image:function(l){var f=l.attrs;return mt(f.x,f.y,f.width,f.height)},text:function(l){var f=l._getBBox();return mt(f.x,f.y,f.width,f.height)},set:function(l){var f=l._getBBox();return mt(f.x,f.y,f.width,f.height)}},Ut=h.mapPath=function(l,f){if(!f)return l;var d,c,u,p,v,_,S;for(u=0,v=(l=tn(l)).length;u<v;u++)for(p=1,_=(S=l[u]).length;p<_;p+=2)d=f.x(S[p],S[p+1]),c=f.y(S[p],S[p+1]),S[p]=d,S[p+1]=c;return l};if(h._g=P,h.type=P.win.SVGAngle||P.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",h.type=="VML"){var Rt,Zt=P.doc.createElement("div");if(Zt.innerHTML='<v:shape adj="1"/>',(Rt=Zt.firstChild).style.behavior="url(#default#VML)",!Rt||typeof Rt.adj!="object")return h.type=Y;Zt=null}function Wt(l){if(typeof l=="function"||Object(l)!==l)return l;var f=new l.constructor;for(var d in l)l[k](d)&&(f[d]=Wt(l[d]));return f}h.svg=!(h.vml=h.type=="VML"),h._Paper=N,h.fn=g=N.prototype=h.prototype,h._id=0,h.is=function(l,f){return(f=dt.call(f))=="finite"?!C[k](+l):f=="array"?l instanceof Array:f=="null"&&l===null||f==typeof l&&l!==null||f=="object"&&l===Object(l)||f=="array"&&Array.isArray&&Array.isArray(l)||st.call(l).slice(8,-1).toLowerCase()==f},h.angle=function(l,f,d,c,u,p){if(u==null){var v=l-d,_=f-c;return v||_?(180+180*ht.atan2(-_,-v)/Dt+360)%360:0}return h.angle(l,f,u,p)-h.angle(d,c,u,p)},h.rad=function(l){return l%360*Dt/180},h.deg=function(l){return Math.round(180*l/Dt%360*1e3)/1e3},h.snapTo=function(l,f,d){if(d=h.is(d,"finite")?d:10,h.is(l,it)){for(var c=l.length;c--;)if(Pt(l[c]-f)<=d)return l[c]}else{var u=f%(l=+l);if(u<d)return f-u;if(u>l-d)return f-u+l}return f};var ge,Ve;h.createUUID=(ge=/[xy]/g,Ve=function(l){var f=16*ht.random()|0;return(l=="x"?f:3&f|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(ge,Ve).toUpperCase()}),h.setWindow=function(l){a("raphael.setWindow",h,P.win,l),P.win=l,P.doc=P.win.document,h._engine.initWin&&h._engine.initWin(P.win)};var de=function(l){if(h.vml){var f,d=/^\s+|\s+$/g;try{var c=new ActiveXObject("htmlfile");c.write("<body>"),c.close(),f=c.body}catch{f=createPopup().document.body}var u=f.createTextRange();de=Xt(function(v){try{f.style.color=V(v).replace(d,Y);var _=u.queryCommandValue("ForeColor");return"#"+("000000"+(_=(255&_)<<16|65280&_|(16711680&_)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var p=P.doc.createElement("i");p.title="Raphaël Colour Picker",p.style.display="none",P.doc.body.appendChild(p),de=Xt(function(v){return p.style.color=v,P.doc.defaultView.getComputedStyle(p,Y).getPropertyValue("color")})}return de(l)},Ee=function(){return"hsb("+[this.h,this.s,this.b]+")"},Pe=function(){return"hsl("+[this.h,this.s,this.l]+")"},ve=function(){return this.hex},ye=function(l,f,d){if(f==null&&h.is(l,"object")&&"r"in l&&"g"in l&&"b"in l&&(d=l.b,f=l.g,l=l.r),f==null&&h.is(l,"string")){var c=h.getRGB(l);l=c.r,f=c.g,d=c.b}return(l>1||f>1||d>1)&&(l/=255,f/=255,d/=255),[l,f,d]},pn=function(l,f,d,c){var u={r:l*=255,g:f*=255,b:d*=255,hex:h.rgb(l,f,d),toString:ve};return h.is(c,"finite")&&(u.opacity=c),u};function Xt(l,f,d){return function c(){var u=Array.prototype.slice.call(arguments,0),p=u.join("␀"),v=c.cache=c.cache||{},_=c.count=c.count||[];return v[k](p)?(function(S,I){for(var U=0,W=S.length;U<W;U++)if(S[U]===I)return S.push(S.splice(U,1)[0])}(_,p),d?d(v[p]):v[p]):(_.length>=1e3&&delete v[_.shift()],_.push(p),v[p]=l[R](f,u),d?d(v[p]):v[p])}}h.color=function(l){var f;return h.is(l,"object")&&"h"in l&&"s"in l&&"b"in l?(f=h.hsb2rgb(l),l.r=f.r,l.g=f.g,l.b=f.b,l.hex=f.hex):h.is(l,"object")&&"h"in l&&"s"in l&&"l"in l?(f=h.hsl2rgb(l),l.r=f.r,l.g=f.g,l.b=f.b,l.hex=f.hex):(h.is(l,"string")&&(l=h.getRGB(l)),h.is(l,"object")&&"r"in l&&"g"in l&&"b"in l?(f=h.rgb2hsl(l),l.h=f.h,l.s=f.s,l.l=f.l,f=h.rgb2hsb(l),l.v=f.b):(l={hex:"none"}).r=l.g=l.b=l.h=l.s=l.v=l.l=-1),l.toString=ve,l},h.hsb2rgb=function(l,f,d,c){var u,p,v,_,S;return this.is(l,"object")&&"h"in l&&"s"in l&&"b"in l&&(d=l.b,f=l.s,c=l.o,l=l.h),_=(S=d*f)*(1-Pt((l=(l*=360)%360/60)%2-1)),u=p=v=d-S,pn(u+=[S,_,0,0,_,S][l=~~l],p+=[_,S,S,_,0,0][l],v+=[0,0,_,S,S,_][l],c)},h.hsl2rgb=function(l,f,d,c){var u,p,v,_,S;return this.is(l,"object")&&"h"in l&&"s"in l&&"l"in l&&(d=l.l,f=l.s,l=l.h),(l>1||f>1||d>1)&&(l/=360,f/=100,d/=100),_=(S=2*f*(d<.5?d:1-d))*(1-Pt((l=(l*=360)%360/60)%2-1)),u=p=v=d-S/2,pn(u+=[S,_,0,0,_,S][l=~~l],p+=[_,S,S,_,0,0][l],v+=[0,0,_,S,S,_][l],c)},h.rgb2hsb=function(l,f,d){var c,u;return l=(d=ye(l,f,d))[0],f=d[1],d=d[2],{h:(((u=(c=pt(l,f,d))-ut(l,f,d))==0?null:c==l?(f-d)/u:c==f?(d-l)/u+2:(l-f)/u+4)+360)%6*60/360,s:u==0?0:u/c,b:c,toString:Ee}},h.rgb2hsl=function(l,f,d){var c,u,p,v;return l=(d=ye(l,f,d))[0],f=d[1],d=d[2],c=((u=pt(l,f,d))+(p=ut(l,f,d)))/2,{h:(((v=u-p)==0?null:u==l?(f-d)/v:u==f?(d-l)/v+2:(l-f)/v+4)+360)%6*60/360,s:v==0?0:c<.5?v/(2*c):v/(2-2*c),l:c,toString:Pe}},h._path2string=function(){return this.join(",").replace(ft,"$1")},h._preload=function(l,f){var d=P.doc.createElement("img");d.style.cssText="position:absolute;left:-9999em;top:-9999em",d.onload=function(){f.call(this),this.onload=null,P.doc.body.removeChild(this)},d.onerror=function(){P.doc.body.removeChild(this)},P.doc.body.appendChild(d),d.src=l};function we(){return this.hex}function je(l,f){for(var d=[],c=0,u=l.length;u-2*!f>c;c+=2){var p=[{x:+l[c-2],y:+l[c-1]},{x:+l[c],y:+l[c+1]},{x:+l[c+2],y:+l[c+3]},{x:+l[c+4],y:+l[c+5]}];f?c?u-4==c?p[3]={x:+l[0],y:+l[1]}:u-2==c&&(p[2]={x:+l[0],y:+l[1]},p[3]={x:+l[2],y:+l[3]}):p[0]={x:+l[u-2],y:+l[u-1]}:u-4==c?p[3]=p[2]:c||(p[0]={x:+l[c],y:+l[c+1]}),d.push(["C",(-p[0].x+6*p[1].x+p[2].x)/6,(-p[0].y+6*p[1].y+p[2].y)/6,(p[1].x+6*p[2].x-p[3].x)/6,(p[1].y+6*p[2].y-p[3].y)/6,p[2].x,p[2].y])}return d}h.getRGB=Xt(function(l){if(!l||(l=V(l)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:we};if(l=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:we};!at[k](l.toLowerCase().substring(0,2))&&l.charAt()!="#"&&(l=de(l));var f,d,c,u,p,v,_=l.match(E);return _?(_[2]&&(c=F(_[2].substring(5),16),d=F(_[2].substring(3,5),16),f=F(_[2].substring(1,3),16)),_[3]&&(c=F((p=_[3].charAt(3))+p,16),d=F((p=_[3].charAt(2))+p,16),f=F((p=_[3].charAt(1))+p,16)),_[4]&&(v=_[4][ot](J),f=L(v[0]),v[0].slice(-1)=="%"&&(f*=2.55),d=L(v[1]),v[1].slice(-1)=="%"&&(d*=2.55),c=L(v[2]),v[2].slice(-1)=="%"&&(c*=2.55),_[1].toLowerCase().slice(0,4)=="rgba"&&(u=L(v[3])),v[3]&&v[3].slice(-1)=="%"&&(u/=100)),_[5]?(v=_[5][ot](J),f=L(v[0]),v[0].slice(-1)=="%"&&(f*=2.55),d=L(v[1]),v[1].slice(-1)=="%"&&(d*=2.55),c=L(v[2]),v[2].slice(-1)=="%"&&(c*=2.55),(v[0].slice(-3)=="deg"||v[0].slice(-1)=="°")&&(f/=360),_[1].toLowerCase().slice(0,4)=="hsba"&&(u=L(v[3])),v[3]&&v[3].slice(-1)=="%"&&(u/=100),h.hsb2rgb(f,d,c,u)):_[6]?(v=_[6][ot](J),f=L(v[0]),v[0].slice(-1)=="%"&&(f*=2.55),d=L(v[1]),v[1].slice(-1)=="%"&&(d*=2.55),c=L(v[2]),v[2].slice(-1)=="%"&&(c*=2.55),(v[0].slice(-3)=="deg"||v[0].slice(-1)=="°")&&(f/=360),_[1].toLowerCase().slice(0,4)=="hsla"&&(u=L(v[3])),v[3]&&v[3].slice(-1)=="%"&&(u/=100),h.hsl2rgb(f,d,c,u)):((_={r:f,g:d,b:c,toString:we}).hex="#"+(16777216|c|d<<8|f<<16).toString(16).slice(1),h.is(u,"finite")&&(_.opacity=u),_)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:we}},h),h.hsb=Xt(function(l,f,d){return h.hsb2rgb(l,f,d).hex}),h.hsl=Xt(function(l,f,d){return h.hsl2rgb(l,f,d).hex}),h.rgb=Xt(function(l,f,d){function c(u){return u+.5|0}return"#"+(16777216|c(d)|c(f)<<8|c(l)<<16).toString(16).slice(1)}),h.getColor=function(l){var f=this.getColor.start=this.getColor.start||{h:0,s:1,b:l||.75},d=this.hsb2rgb(f.h,f.s,f.b);return f.h+=.075,f.h>1&&(f.h=0,f.s-=.2,f.s<=0&&(this.getColor.start={h:0,s:1,b:f.b})),d.hex},h.getColor.reset=function(){delete this.start},h.parsePathString=function(l){if(!l)return null;var f=Qt(l);if(f.arr)return qt(f.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},c=[];return h.is(l,it)&&h.is(l[0],it)&&(c=qt(l)),c.length||V(l).replace(yt,function(u,p,v){var _=[],S=p.toLowerCase();if(v.replace(wt,function(I,U){U&&_.push(+U)}),S=="m"&&_.length>2&&(c.push([p][O](_.splice(0,2))),S="l",p=p=="m"?"l":"L"),S=="r")c.push([p][O](_));else for(;_.length>=d[S]&&(c.push([p][O](_.splice(0,d[S]))),d[S]););}),c.toString=h._path2string,f.arr=qt(c),c},h.parseTransformString=Xt(function(l){if(!l)return null;var f=[];return h.is(l,it)&&h.is(l[0],it)&&(f=qt(l)),f.length||V(l).replace(Tt,function(d,c,u){var p=[];dt.call(c),u.replace(wt,function(v,_){_&&p.push(+_)}),f.push([c][O](p))}),f.toString=h._path2string,f},this,function(l){if(!l)return l;for(var f=[],d=0;d<l.length;d++){for(var c=[],u=0;u<l[d].length;u++)c.push(l[d][u]);f.push(c)}return f});var Qt=function(l){var f=Qt.ps=Qt.ps||{};return f[l]?f[l].sleep=100:f[l]={sleep:100},setTimeout(function(){for(var d in f)f[k](d)&&d!=l&&(f[d].sleep--,!f[d].sleep&&delete f[d])}),f[l]};function pe(l,f,d,c,u){return l*(l*(-3*f+9*d-9*c+3*u)+6*f-12*d+6*c)-3*f+3*d}function re(l,f,d,c,u,p,v,_,S){S==null&&(S=1);for(var I=(S=S>1?1:S<0?0:S)/2,U=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],W=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],j=0,G=0;G<12;G++){var $=I*U[G]+I,Q=pe($,l,d,u,v),Z=pe($,f,c,p,_),H=Q*Q+Z*Z;j+=W[G]*ht.sqrt(H)}return I*j}function Qe(l,f,d,c,u,p,v,_){if(!(pt(l,d)<ut(u,v)||ut(l,d)>pt(u,v)||pt(f,c)<ut(p,_)||ut(f,c)>pt(p,_))){var S=(l-d)*(p-_)-(f-c)*(u-v);if(S){var I=((l*c-f*d)*(u-v)-(l-d)*(u*_-p*v))/S,U=((l*c-f*d)*(p-_)-(f-c)*(u*_-p*v))/S,W=+I.toFixed(2),j=+U.toFixed(2);if(!(W<+ut(l,d).toFixed(2)||W>+pt(l,d).toFixed(2)||W<+ut(u,v).toFixed(2)||W>+pt(u,v).toFixed(2)||j<+ut(f,c).toFixed(2)||j>+pt(f,c).toFixed(2)||j<+ut(p,_).toFixed(2)||j>+pt(p,_).toFixed(2)))return{x:I,y:U}}}}function ke(l,f,d){var c=h.bezierBBox(l),u=h.bezierBBox(f);if(!h.isBBoxIntersect(c,u))return d?0:[];for(var p=re.apply(0,l),v=re.apply(0,f),_=pt(~~(p/5),1),S=pt(~~(v/5),1),I=[],U=[],W={},j=d?0:[],G=0;G<_+1;G++){var $=h.findDotsAtSegment.apply(h,l.concat(G/_));I.push({x:$.x,y:$.y,t:G/_})}for(G=0;G<S+1;G++)$=h.findDotsAtSegment.apply(h,f.concat(G/S)),U.push({x:$.x,y:$.y,t:G/S});for(G=0;G<_;G++)for(var Q=0;Q<S;Q++){var Z=I[G],H=I[G+1],lt=U[Q],tt=U[Q+1],rt=Pt(H.x-Z.x)<.001?"y":"x",et=Pt(tt.x-lt.x)<.001?"y":"x",bt=Qe(Z.x,Z.y,H.x,H.y,lt.x,lt.y,tt.x,tt.y);if(bt){if(W[bt.x.toFixed(4)]==bt.y.toFixed(4))continue;W[bt.x.toFixed(4)]=bt.y.toFixed(4);var gt=Z.t+Pt((bt[rt]-Z[rt])/(H[rt]-Z[rt]))*(H.t-Z.t),_t=lt.t+Pt((bt[et]-lt[et])/(tt[et]-lt[et]))*(tt.t-lt.t);gt>=0&><=1.001&&_t>=0&&_t<=1.001&&(d?j++:j.push({x:bt.x,y:bt.y,t1:ut(gt,1),t2:ut(_t,1)}))}}return j}function Xe(l,f,d){l=h._path2curve(l),f=h._path2curve(f);for(var c,u,p,v,_,S,I,U,W,j,G=d?0:[],$=0,Q=l.length;$<Q;$++){var Z=l[$];if(Z[0]=="M")c=_=Z[1],u=S=Z[2];else{Z[0]=="C"?(W=[c,u].concat(Z.slice(1)),c=W[6],u=W[7]):(W=[c,u,c,u,_,S,_,S],c=_,u=S);for(var H=0,lt=f.length;H<lt;H++){var tt=f[H];if(tt[0]=="M")p=I=tt[1],v=U=tt[2];else{tt[0]=="C"?(j=[p,v].concat(tt.slice(1)),p=j[6],v=j[7]):(j=[p,v,p,v,I,U,I,U],p=I,v=U);var rt=ke(W,j,d);if(d)G+=rt;else{for(var et=0,bt=rt.length;et<bt;et++)rt[et].segment1=$,rt[et].segment2=H,rt[et].bez1=W,rt[et].bez2=j;G=G.concat(rt)}}}}}return G}h.findDotsAtSegment=function(l,f,d,c,u,p,v,_,S){var I=1-S,U=kt(I,3),W=kt(I,2),j=S*S,G=j*S,$=U*l+3*W*S*d+3*I*S*S*u+G*v,Q=U*f+3*W*S*c+3*I*S*S*p+G*_,Z=l+2*S*(d-l)+j*(u-2*d+l),H=f+2*S*(c-f)+j*(p-2*c+f),lt=d+2*S*(u-d)+j*(v-2*u+d),tt=c+2*S*(p-c)+j*(_-2*p+c),rt=I*l+S*d,et=I*f+S*c,bt=I*u+S*v,gt=I*p+S*_,_t=90-180*ht.atan2(Z-lt,H-tt)/Dt;return(Z>lt||H<tt)&&(_t+=180),{x:$,y:Q,m:{x:Z,y:H},n:{x:lt,y:tt},start:{x:rt,y:et},end:{x:bt,y:gt},alpha:_t}},h.bezierBBox=function(l,f,d,c,u,p,v,_){h.is(l,"array")||(l=[l,f,d,c,u,p,v,_]);var S=Ie.apply(null,l);return{x:S.min.x,y:S.min.y,x2:S.max.x,y2:S.max.y,width:S.max.x-S.min.x,height:S.max.y-S.min.y}},h.isPointInsideBBox=function(l,f,d){return f>=l.x&&f<=l.x2&&d>=l.y&&d<=l.y2},h.isBBoxIntersect=function(l,f){var d=h.isPointInsideBBox;return d(f,l.x,l.y)||d(f,l.x2,l.y)||d(f,l.x,l.y2)||d(f,l.x2,l.y2)||d(l,f.x,f.y)||d(l,f.x2,f.y)||d(l,f.x,f.y2)||d(l,f.x2,f.y2)||(l.x<f.x2&&l.x>f.x||f.x<l.x2&&f.x>l.x)&&(l.y<f.y2&&l.y>f.y||f.y<l.y2&&f.y>l.y)},h.pathIntersection=function(l,f){return Xe(l,f)},h.pathIntersectionNumber=function(l,f){return Xe(l,f,1)},h.isPointInsidePath=function(l,f,d){var c=h.pathBBox(l);return h.isPointInsideBBox(c,f,d)&&Xe(l,[["M",f,d],["H",c.x2+10]],1)%2==1},h._removedFactory=function(l){return function(){a("raphael.log",null,"Raphaël: you are calling to method “"+l+"” of removed object",l)}};var he=h.pathBBox=function(l){var f=Qt(l);if(f.bbox)return Wt(f.bbox);if(!l)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var d,c=0,u=0,p=[],v=[],_=0,S=(l=tn(l)).length;_<S;_++)if((d=l[_])[0]=="M")c=d[1],u=d[2],p.push(c),v.push(u);else{var I=Ie(c,u,d[1],d[2],d[3],d[4],d[5],d[6]);p=p[O](I.min.x,I.max.x),v=v[O](I.min.y,I.max.y),c=d[5],u=d[6]}var U=ut[R](0,p),W=ut[R](0,v),j=pt[R](0,p),G=pt[R](0,v),$=j-U,Q=G-W,Z={x:U,y:W,x2:j,y2:G,width:$,height:Q,cx:U+$/2,cy:W+Q/2};return f.bbox=Wt(Z),Z},qt=function(l){var f=Wt(l);return f.toString=h._path2string,f},fi=h._pathToRelative=function(l){var f=Qt(l);if(f.rel)return qt(f.rel);h.is(l,it)&&h.is(l&&l[0],it)||(l=h.parsePathString(l));var d=[],c=0,u=0,p=0,v=0,_=0;l[0][0]=="M"&&(p=c=l[0][1],v=u=l[0][2],_++,d.push(["M",c,u]));for(var S=_,I=l.length;S<I;S++){var U=d[S]=[],W=l[S];if(W[0]!=dt.call(W[0]))switch(U[0]=dt.call(W[0]),U[0]){case"a":U[1]=W[1],U[2]=W[2],U[3]=W[3],U[4]=W[4],U[5]=W[5],U[6]=+(W[6]-c).toFixed(3),U[7]=+(W[7]-u).toFixed(3);break;case"v":U[1]=+(W[1]-u).toFixed(3);break;case"m":p=W[1],v=W[2];default:for(var j=1,G=W.length;j<G;j++)U[j]=+(W[j]-(j%2?c:u)).toFixed(3)}else{U=d[S]=[],W[0]=="m"&&(p=W[1]+c,v=W[2]+u);for(var $=0,Q=W.length;$<Q;$++)d[S][$]=W[$]}var Z=d[S].length;switch(d[S][0]){case"z":c=p,u=v;break;case"h":c+=+d[S][Z-1];break;case"v":u+=+d[S][Z-1];break;default:c+=+d[S][Z-2],u+=+d[S][Z-1]}}return d.toString=h._path2string,f.rel=qt(d),d},He=h._pathToAbsolute=function(l){var f=Qt(l);if(f.abs)return qt(f.abs);if(h.is(l,it)&&h.is(l&&l[0],it)||(l=h.parsePathString(l)),!l||!l.length)return[["M",0,0]];var d=[],c=0,u=0,p=0,v=0,_=0;l[0][0]=="M"&&(p=c=+l[0][1],v=u=+l[0][2],_++,d[0]=["M",c,u]);for(var S,I,U=l.length==3&&l[0][0]=="M"&&l[1][0].toUpperCase()=="R"&&l[2][0].toUpperCase()=="Z",W=_,j=l.length;W<j;W++){if(d.push(S=[]),(I=l[W])[0]!=B.call(I[0]))switch(S[0]=B.call(I[0]),S[0]){case"A":S[1]=I[1],S[2]=I[2],S[3]=I[3],S[4]=I[4],S[5]=I[5],S[6]=+(I[6]+c),S[7]=+(I[7]+u);break;case"V":S[1]=+I[1]+u;break;case"H":S[1]=+I[1]+c;break;case"R":for(var G=[c,u][O](I.slice(1)),$=2,Q=G.length;$<Q;$++)G[$]=+G[$]+c,G[++$]=+G[$]+u;d.pop(),d=d[O](je(G,U));break;case"M":p=+I[1]+c,v=+I[2]+u;default:for($=1,Q=I.length;$<Q;$++)S[$]=+I[$]+($%2?c:u)}else if(I[0]=="R")G=[c,u][O](I.slice(1)),d.pop(),d=d[O](je(G,U)),S=["R"][O](I.slice(-2));else for(var Z=0,H=I.length;Z<H;Z++)S[Z]=I[Z];switch(S[0]){case"Z":c=p,u=v;break;case"H":c=S[1];break;case"V":u=S[1];break;case"M":p=S[S.length-2],v=S[S.length-1];default:c=S[S.length-2],u=S[S.length-1]}}return d.toString=h._path2string,f.abs=qt(d),d},Ae=function(l,f,d,c){return[l,f,d,c,d,c]},xe=function(l,f,d,c,u,p){return[1/3*l+2/3*d,1/3*f+2/3*c,1/3*u+2/3*d,1/3*p+2/3*c,u,p]},mn=function(l,f,d,c,u,p,v,_,S,I){var U,W=120*Dt/180,j=Dt/180*(+u||0),G=[],$=Xt(function(Ks,Qs,Ci){return{x:Ks*ht.cos(Ci)-Qs*ht.sin(Ci),y:Ks*ht.sin(Ci)+Qs*ht.cos(Ci)}});if(I)gt=I[0],_t=I[1],et=I[2],bt=I[3];else{l=(U=$(l,f,-j)).x,f=U.y,_=(U=$(_,S,-j)).x,S=U.y;var Q=(l-_)/2,Z=(f-S)/2,H=Q*Q/(d*d)+Z*Z/(c*c);H>1&&(d*=H=ht.sqrt(H),c*=H);var lt=d*d,tt=c*c,rt=(p==v?-1:1)*ht.sqrt(Pt((lt*tt-lt*Z*Z-tt*Q*Q)/(lt*Z*Z+tt*Q*Q))),et=rt*d*Z/c+(l+_)/2,bt=rt*-c*Q/d+(f+S)/2,gt=ht.asin(((f-bt)/c).toFixed(9)),_t=ht.asin(((S-bt)/c).toFixed(9));(gt=l<et?Dt-gt:gt)<0&&(gt=2*Dt+gt),(_t=_<et?Dt-_t:_t)<0&&(_t=2*Dt+_t),v&>>_t&&(gt-=2*Dt),!v&&_t>gt&&(_t-=2*Dt)}var Cn=_t-gt;if(Pt(Cn)>W){var Gn=_t,ne=_,_e=S;_t=gt+W*(v&&_t>gt?1:-1),_=et+d*ht.cos(_t),S=bt+c*ht.sin(_t),G=mn(_,S,d,c,u,0,v,ne,_e,[_t,Gn,et,bt])}Cn=_t-gt;var Tn=ht.cos(gt),Sn=ht.sin(gt),bi=ht.cos(_t),Be=ht.sin(_t),sn=ht.tan(Cn/4),_i=4/3*d*sn,Ys=4/3*c*sn,qs=[l,f],En=[l+_i*Sn,f-Ys*Tn],$s=[_+_i*Be,S-Ys*bi],Js=[_,S];if(En[0]=2*qs[0]-En[0],En[1]=2*qs[1]-En[1],I)return[En,$s,Js][O](G);for(var Zs=[],$e=0,$c=(G=[En,$s,Js][O](G).join()[ot](",")).length;$e<$c;$e++)Zs[$e]=$e%2?$(G[$e-1],G[$e],j).y:$(G[$e],G[$e+1],j).x;return Zs},Me=function(l,f,d,c,u,p,v,_,S){var I=1-S;return{x:kt(I,3)*l+3*kt(I,2)*S*d+3*I*S*S*u+kt(S,3)*v,y:kt(I,3)*f+3*kt(I,2)*S*c+3*I*S*S*p+kt(S,3)*_}},Ie=Xt(function(l,f,d,c,u,p,v,_){var S,I=u-2*d+l-(v-2*u+d),U=2*(d-l)-2*(u-d),W=l-d,j=(-U+ht.sqrt(U*U-4*I*W))/2/I,G=(-U-ht.sqrt(U*U-4*I*W))/2/I,$=[f,_],Q=[l,v];return Pt(j)>"1e12"&&(j=.5),Pt(G)>"1e12"&&(G=.5),j>0&&j<1&&(S=Me(l,f,d,c,u,p,v,_,j),Q.push(S.x),$.push(S.y)),G>0&&G<1&&(S=Me(l,f,d,c,u,p,v,_,G),Q.push(S.x),$.push(S.y)),I=p-2*c+f-(_-2*p+c),W=f-c,j=(-(U=2*(c-f)-2*(p-c))+ht.sqrt(U*U-4*I*W))/2/I,G=(-U-ht.sqrt(U*U-4*I*W))/2/I,Pt(j)>"1e12"&&(j=.5),Pt(G)>"1e12"&&(G=.5),j>0&&j<1&&(S=Me(l,f,d,c,u,p,v,_,j),Q.push(S.x),$.push(S.y)),G>0&&G<1&&(S=Me(l,f,d,c,u,p,v,_,G),Q.push(S.x),$.push(S.y)),{min:{x:ut[R](0,Q),y:ut[R](0,$)},max:{x:pt[R](0,Q),y:pt[R](0,$)}}}),tn=h._path2curve=Xt(function(l,f){var d=!f&&Qt(l);if(!f&&d.curve)return qt(d.curve);for(var c=He(l),u=f&&He(f),p={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},v={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},_=function(rt,et,bt){var gt,_t;if(!rt)return["C",et.x,et.y,et.x,et.y,et.x,et.y];switch(!(rt[0]in{T:1,Q:1})&&(et.qx=et.qy=null),rt[0]){case"M":et.X=rt[1],et.Y=rt[2];break;case"A":rt=["C"][O](mn[R](0,[et.x,et.y][O](rt.slice(1))));break;case"S":bt=="C"||bt=="S"?(gt=2*et.x-et.bx,_t=2*et.y-et.by):(gt=et.x,_t=et.y),rt=["C",gt,_t][O](rt.slice(1));break;case"T":bt=="Q"||bt=="T"?(et.qx=2*et.x-et.qx,et.qy=2*et.y-et.qy):(et.qx=et.x,et.qy=et.y),rt=["C"][O](xe(et.x,et.y,et.qx,et.qy,rt[1],rt[2]));break;case"Q":et.qx=rt[1],et.qy=rt[2],rt=["C"][O](xe(et.x,et.y,rt[1],rt[2],rt[3],rt[4]));break;case"L":rt=["C"][O](Ae(et.x,et.y,rt[1],rt[2]));break;case"H":rt=["C"][O](Ae(et.x,et.y,rt[1],et.y));break;case"V":rt=["C"][O](Ae(et.x,et.y,et.x,rt[1]));break;case"Z":rt=["C"][O](Ae(et.x,et.y,et.X,et.Y))}return rt},S=function(rt,et){if(rt[et].length>7){rt[et].shift();for(var bt=rt[et];bt.length;)U[et]="A",u&&(W[et]="A"),rt.splice(et++,0,["C"][O](bt.splice(0,6)));rt.splice(et,1),Q=pt(c.length,u&&u.length||0)}},I=function(rt,et,bt,gt,_t){rt&&et&&rt[_t][0]=="M"&&et[_t][0]!="M"&&(et.splice(_t,0,["M",gt.x,gt.y]),bt.bx=0,bt.by=0,bt.x=rt[_t][1],bt.y=rt[_t][2],Q=pt(c.length,u&&u.length||0))},U=[],W=[],j="",G="",$=0,Q=pt(c.length,u&&u.length||0);$<Q;$++){c[$]&&(j=c[$][0]),j!="C"&&(U[$]=j,$&&(G=U[$-1])),c[$]=_(c[$],p,G),U[$]!="A"&&j=="C"&&(U[$]="C"),S(c,$),u&&(u[$]&&(j=u[$][0]),j!="C"&&(W[$]=j,$&&(G=W[$-1])),u[$]=_(u[$],v,G),W[$]!="A"&&j=="C"&&(W[$]="C"),S(u,$)),I(c,u,p,v,$),I(u,c,v,p,$);var Z=c[$],H=u&&u[$],lt=Z.length,tt=u&&H.length;p.x=Z[lt-2],p.y=Z[lt-1],p.bx=L(Z[lt-4])||p.x,p.by=L(Z[lt-3])||p.y,v.bx=u&&(L(H[tt-4])||v.x),v.by=u&&(L(H[tt-3])||v.y),v.x=u&&H[tt-2],v.y=u&&H[tt-1]}return u||(d.curve=qt(c)),u?[c,u]:c},null,qt),gn=(h._parseDots=Xt(function(l){for(var f=[],d=0,c=l.length;d<c;d++){var u={},p=l[d].match(/^([^:]*):?([\d\.]*)/);if(u.color=h.getRGB(p[1]),u.color.error)return null;u.opacity=u.color.opacity,u.color=u.color.hex,p[2]&&(u.offset=p[2]+"%"),f.push(u)}for(d=1,c=f.length-1;d<c;d++)if(!f[d].offset){for(var v=L(f[d-1].offset||0),_=0,S=d+1;S<c;S++)if(f[S].offset){_=f[S].offset;break}_||(_=100,S=c);for(var I=((_=L(_))-v)/(S-d+1);d<S;d++)v+=I,f[d].offset=v+"%"}return f}),h._tear=function(l,f){l==f.top&&(f.top=l.prev),l==f.bottom&&(f.bottom=l.next),l.next&&(l.next.prev=l.prev),l.prev&&(l.prev.next=l.next)}),di=(h._tofront=function(l,f){f.top!==l&&(gn(l,f),l.next=null,l.prev=f.top,f.top.next=l,f.top=l)},h._toback=function(l,f){f.bottom!==l&&(gn(l,f),l.next=f.bottom,l.prev=null,f.bottom.prev=l,f.bottom=l)},h._insertafter=function(l,f,d){gn(l,d),f==d.top&&(d.top=l),f.next&&(f.next.prev=l),l.next=f.next,l.prev=f,f.next=l},h._insertbefore=function(l,f,d){gn(l,d),f==d.bottom&&(d.bottom=l),f.prev&&(f.prev.next=l),l.prev=f.prev,f.prev=l,l.next=f},h.toMatrix=function(l,f){var d=he(l),c={_:{transform:Y},getBBox:function(){return d}};return vn(c,f),c.matrix}),vn=(h.transformPath=function(l,f){return Ut(l,di(l,f))},h._extractTransform=function(l,f){if(f==null)return l._.transform;f=V(f).replace(/\.{3}|\u2026/g,l._.transform||Y);var d,c,u=h.parseTransformString(f),p=0,v=1,_=1,S=l._,I=new Le;if(S.transform=u||[],u)for(var U=0,W=u.length;U<W;U++){var j,G,$,Q,Z,H=u[U],lt=H.length,tt=V(H[0]).toLowerCase(),rt=H[0]!=tt,et=rt?I.invert():0;tt=="t"&<==3?rt?(j=et.x(0,0),G=et.y(0,0),$=et.x(H[1],H[2]),Q=et.y(H[1],H[2]),I.translate($-j,Q-G)):I.translate(H[1],H[2]):tt=="r"?lt==2?(Z=Z||l.getBBox(1),I.rotate(H[1],Z.x+Z.width/2,Z.y+Z.height/2),p+=H[1]):lt==4&&(rt?($=et.x(H[2],H[3]),Q=et.y(H[2],H[3]),I.rotate(H[1],$,Q)):I.rotate(H[1],H[2],H[3]),p+=H[1]):tt=="s"?lt==2||lt==3?(Z=Z||l.getBBox(1),I.scale(H[1],H[lt-1],Z.x+Z.width/2,Z.y+Z.height/2),v*=H[1],_*=H[lt-1]):lt==5&&(rt?($=et.x(H[3],H[4]),Q=et.y(H[3],H[4]),I.scale(H[1],H[2],$,Q)):I.scale(H[1],H[2],H[3],H[4]),v*=H[1],_*=H[2]):tt=="m"&<==7&&I.add(H[1],H[2],H[3],H[4],H[5],H[6]),S.dirtyT=1,l.matrix=I}l.matrix=I,S.sx=v,S.sy=_,S.deg=p,S.dx=d=I.e,S.dy=c=I.f,v==1&&_==1&&!p&&S.bbox?(S.bbox.x+=+d,S.bbox.y+=+c):S.dirtyT=1}),pi=function(l){var f=l[0];switch(f.toLowerCase()){case"t":return[f,0,0];case"m":return[f,1,0,0,1,0,0];case"r":return l.length==4?[f,0,l[2],l[3]]:[f,0];case"s":return l.length==5?[f,1,1,l[3],l[4]]:l.length==3?[f,1,1]:[f,1]}},mi=h._equaliseTransform=function(l,f){f=V(f).replace(/\.{3}|\u2026/g,l),l=h.parseTransformString(l)||[],f=h.parseTransformString(f)||[];for(var d,c,u,p,v=pt(l.length,f.length),_=[],S=[],I=0;I<v;I++){if(u=l[I]||pi(f[I]),p=f[I]||pi(u),u[0]!=p[0]||u[0].toLowerCase()=="r"&&(u[2]!=p[2]||u[3]!=p[3])||u[0].toLowerCase()=="s"&&(u[3]!=p[3]||u[4]!=p[4]))return;for(_[I]=[],S[I]=[],d=0,c=pt(u.length,p.length);d<c;d++)d in u&&(_[I][d]=u[d]),d in p&&(S[I][d]=p[d])}return{from:_,to:S}};function Le(l,f,d,c,u,p){l!=null?(this.a=+l,this.b=+f,this.c=+d,this.d=+c,this.e=+u,this.f=+p):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}h._getContainer=function(l,f,d,c){var u;if((u=c!=null||h.is(l,"object")?l:P.doc.getElementById(l))!=null)return u.tagName?f==null?{container:u,width:u.style.pixelWidth||u.offsetWidth,height:u.style.pixelHeight||u.offsetHeight}:{container:u,width:f,height:d}:{container:1,x:l,y:f,width:d,height:c}},h.pathToRelative=fi,h._engine={},h.path2curve=tn,h.matrix=function(l,f,d,c,u,p){return new Le(l,f,d,c,u,p)},function(l){function f(c){return c[0]*c[0]+c[1]*c[1]}function d(c){var u=ht.sqrt(f(c));c[0]&&(c[0]/=u),c[1]&&(c[1]/=u)}l.add=function(c,u,p,v,_,S){var I,U,W,j,G=[[],[],[]],$=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],Q=[[c,p,_],[u,v,S],[0,0,1]];for(c&&c instanceof Le&&(Q=[[c.a,c.c,c.e],[c.b,c.d,c.f],[0,0,1]]),I=0;I<3;I++)for(U=0;U<3;U++){for(j=0,W=0;W<3;W++)j+=$[I][W]*Q[W][U];G[I][U]=j}this.a=G[0][0],this.b=G[1][0],this.c=G[0][1],this.d=G[1][1],this.e=G[0][2],this.f=G[1][2]},l.invert=function(){var c=this,u=c.a*c.d-c.b*c.c;return new Le(c.d/u,-c.b/u,-c.c/u,c.a/u,(c.c*c.f-c.d*c.e)/u,(c.b*c.e-c.a*c.f)/u)},l.clone=function(){return new Le(this.a,this.b,this.c,this.d,this.e,this.f)},l.translate=function(c,u){this.add(1,0,0,1,c,u)},l.scale=function(c,u,p,v){u==null&&(u=c),(p||v)&&this.add(1,0,0,1,p,v),this.add(c,0,0,u,0,0),(p||v)&&this.add(1,0,0,1,-p,-v)},l.rotate=function(c,u,p){c=h.rad(c),u=u||0,p=p||0;var v=+ht.cos(c).toFixed(9),_=+ht.sin(c).toFixed(9);this.add(v,_,-_,v,u,p),this.add(1,0,0,1,-u,-p)},l.x=function(c,u){return c*this.a+u*this.c+this.e},l.y=function(c,u){return c*this.b+u*this.d+this.f},l.get=function(c){return+this[V.fromCharCode(97+c)].toFixed(4)},l.toString=function(){return h.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},l.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},l.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},l.split=function(){var c={};c.dx=this.e,c.dy=this.f;var u=[[this.a,this.c],[this.b,this.d]];c.scalex=ht.sqrt(f(u[0])),d(u[0]),c.shear=u[0][0]*u[1][0]+u[0][1]*u[1][1],u[1]=[u[1][0]-u[0][0]*c.shear,u[1][1]-u[0][1]*c.shear],c.scaley=ht.sqrt(f(u[1])),d(u[1]),c.shear/=c.scaley;var p=-u[0][1],v=u[1][1];return v<0?(c.rotate=h.deg(ht.acos(v)),p<0&&(c.rotate=360-c.rotate)):c.rotate=h.deg(ht.asin(p)),c.isSimple=!(+c.shear.toFixed(9)||c.scalex.toFixed(9)!=c.scaley.toFixed(9)&&c.rotate),c.isSuperSimple=!+c.shear.toFixed(9)&&c.scalex.toFixed(9)==c.scaley.toFixed(9)&&!c.rotate,c.noRotation=!+c.shear.toFixed(9)&&!c.rotate,c},l.toTransformString=function(c){var u=c||this[ot]();return u.isSimple?(u.scalex=+u.scalex.toFixed(4),u.scaley=+u.scaley.toFixed(4),u.rotate=+u.rotate.toFixed(4),(u.dx||u.dy?"t"+[u.dx,u.dy]:Y)+(u.scalex!=1||u.scaley!=1?"s"+[u.scalex,u.scaley,0,0]:Y)+(u.rotate?"r"+[u.rotate,0,0]:Y)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Le.prototype);for(var gi=function(){this.returnValue=!1},vi=function(){return this.originalEvent.preventDefault()},yi=function(){this.cancelBubble=!0},wi=function(){return this.originalEvent.stopPropagation()},yn=function(l){var f=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,d=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft;return{x:l.clientX+d,y:l.clientY+f}},De=P.doc.addEventListener?function(l,f,d,c){var u=function(v){var _=yn(v);return d.call(c,v,_.x,_.y)};if(l.addEventListener(f,u,!1),X&&vt[f]){var p=function(v){for(var _=yn(v),S=v,I=0,U=v.targetTouches&&v.targetTouches.length;I<U;I++)if(v.targetTouches[I].target==l){(v=v.targetTouches[I]).originalEvent=S,v.preventDefault=vi,v.stopPropagation=wi;break}return d.call(c,v,_.x,_.y)};l.addEventListener(vt[f],p,!1)}return function(){return l.removeEventListener(f,u,!1),X&&vt[f]&&l.removeEventListener(vt[f],p,!1),!0}}:P.doc.attachEvent?function(l,f,d,c){var u=function(p){p=p||P.win.event;var v=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,_=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft,S=p.clientX+_,I=p.clientY+v;return p.preventDefault=p.preventDefault||gi,p.stopPropagation=p.stopPropagation||yi,d.call(c,p,S,I)};return l.attachEvent("on"+f,u),function(){return l.detachEvent("on"+f,u),!0}}:void 0,te=[],Re=function(l){for(var f,d=l.clientX,c=l.clientY,u=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,p=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft,v=te.length;v--;){if(f=te[v],X&&l.touches){for(var _,S=l.touches.length;S--;)if((_=l.touches[S]).identifier==f.el._drag.id){d=_.clientX,c=_.clientY,(l.originalEvent?l.originalEvent:l).preventDefault();break}}else l.preventDefault();var I,U=f.el.node,W=U.nextSibling,j=U.parentNode,G=U.style.display;P.win.opera&&j.removeChild(U),U.style.display="none",I=f.el.paper.getElementByPoint(d,c),U.style.display=G,P.win.opera&&(W?j.insertBefore(U,W):j.appendChild(U)),I&&a("raphael.drag.over."+f.el.id,f.el,I),d+=p,c+=u,a("raphael.drag.move."+f.el.id,f.move_scope||f.el,d-f.el._drag.x,c-f.el._drag.y,d,c,l)}},We=function(l){h.unmousemove(Re).unmouseup(We);for(var f,d=te.length;d--;)(f=te[d]).el._drag={},a("raphael.drag.end."+f.el.id,f.end_scope||f.start_scope||f.move_scope||f.el,l);te=[]},Lt=h.el={},xi=ct.length;xi--;)(function(l){h[l]=Lt[l]=function(f,d){return h.is(f,"function")&&(this.events=this.events||[],this.events.push({name:l,f,unbind:De(this.shape||this.node||P.doc,l,f,d||this)})),this},h["un"+l]=Lt["un"+l]=function(f){for(var d=this.events||[],c=d.length;c--;)d[c].name!=l||!h.is(f,"undefined")&&d[c].f!=f||(d[c].unbind(),d.splice(c,1),!d.length&&delete this.events);return this}})(ct[xi]);Lt.data=function(l,f){var d=Et[this.id]=Et[this.id]||{};if(arguments.length==0)return d;if(arguments.length==1){if(h.is(l,"object")){for(var c in l)l[k](c)&&this.data(c,l[c]);return this}return a("raphael.data.get."+this.id,this,d[l],l),d[l]}return d[l]=f,a("raphael.data.set."+this.id,this,f,l),this},Lt.removeData=function(l){return l==null?delete Et[this.id]:Et[this.id]&&delete Et[this.id][l],this},Lt.getData=function(){return Wt(Et[this.id]||{})},Lt.hover=function(l,f,d,c){return this.mouseover(l,d).mouseout(f,c||d)},Lt.unhover=function(l,f){return this.unmouseover(l).unmouseout(f)};var Ye=[];Lt.drag=function(l,f,d,c,u,p){function v(_){(_.originalEvent||_).preventDefault();var S=_.clientX,I=_.clientY,U=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,W=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft;if(this._drag.id=_.identifier,X&&_.touches){for(var j,G=_.touches.length;G--;)if(j=_.touches[G],this._drag.id=j.identifier,j.identifier==this._drag.id){S=j.clientX,I=j.clientY;break}}this._drag.x=S+W,this._drag.y=I+U,!te.length&&h.mousemove(Re).mouseup(We),te.push({el:this,move_scope:c,start_scope:u,end_scope:p}),f&&a.on("raphael.drag.start."+this.id,f),l&&a.on("raphael.drag.move."+this.id,l),d&&a.on("raphael.drag.end."+this.id,d),a("raphael.drag.start."+this.id,u||c||this,this._drag.x,this._drag.y,_)}return this._drag={},Ye.push({el:this,start:v}),this.mousedown(v),this},Lt.onDragOver=function(l){l?a.on("raphael.drag.over."+this.id,l):a.unbind("raphael.drag.over."+this.id)},Lt.undrag=function(){for(var l=Ye.length;l--;)Ye[l].el==this&&(this.unmousedown(Ye[l].start),Ye.splice(l,1),a.unbind("raphael.drag.*."+this.id));!Ye.length&&h.unmousemove(Re).unmouseup(We),te=[]},g.circle=function(l,f,d){var c=h._engine.circle(this,l||0,f||0,d||0);return this.__set__&&this.__set__.push(c),c},g.rect=function(l,f,d,c,u){var p=h._engine.rect(this,l||0,f||0,d||0,c||0,u||0);return this.__set__&&this.__set__.push(p),p},g.ellipse=function(l,f,d,c){var u=h._engine.ellipse(this,l||0,f||0,d||0,c||0);return this.__set__&&this.__set__.push(u),u},g.path=function(l){l&&!h.is(l,"string")&&!h.is(l[0],it)&&(l+=Y);var f=h._engine.path(h.format[R](h,arguments),this);return this.__set__&&this.__set__.push(f),f},g.image=function(l,f,d,c,u){var p=h._engine.image(this,l||"about:blank",f||0,d||0,c||0,u||0);return this.__set__&&this.__set__.push(p),p},g.text=function(l,f,d){var c=h._engine.text(this,l||0,f||0,V(d));return this.__set__&&this.__set__.push(c),c},g.set=function(l){!h.is(l,"array")&&(l=Array.prototype.splice.call(arguments,0,arguments.length));var f=new nn(l);return this.__set__&&this.__set__.push(f),f.paper=this,f.type="set",f},g.setStart=function(l){this.__set__=l||this.set()},g.setFinish=function(l){var f=this.__set__;return delete this.__set__,f},g.getSize=function(){var l=this.canvas.parentNode;return{width:l.offsetWidth,height:l.offsetHeight}},g.setSize=function(l,f){return h._engine.setSize.call(this,l,f)},g.setViewBox=function(l,f,d,c,u){return h._engine.setViewBox.call(this,l,f,d,c,u)},g.top=g.bottom=null,g.raphael=h;function en(){return this.x+nt+this.y+nt+this.width+" × "+this.height}g.getElementByPoint=function(l,f){var d,c,u,p,v,_,S,I=this.canvas,U=P.doc.elementFromPoint(l,f);if(P.win.opera&&U.tagName=="svg"){var W=(c=(d=I).getBoundingClientRect(),u=d.ownerDocument,p=u.body,v=u.documentElement,_=v.clientTop||p.clientTop||0,S=v.clientLeft||p.clientLeft||0,{y:c.top+(P.win.pageYOffset||v.scrollTop||p.scrollTop)-_,x:c.left+(P.win.pageXOffset||v.scrollLeft||p.scrollLeft)-S}),j=I.createSVGRect();j.x=l-W.x,j.y=f-W.y,j.width=j.height=1;var G=I.getIntersectionList(j,null);G.length&&(U=G[G.length-1])}if(!U)return null;for(;U.parentNode&&U!=I.parentNode&&!U.raphael;)U=U.parentNode;return U==this.canvas.parentNode&&(U=I),U=U&&U.raphael?this.getById(U.raphaelid):null},g.getElementsByBBox=function(l){var f=this.set();return this.forEach(function(d){h.isBBoxIntersect(d.getBBox(),l)&&f.push(d)}),f},g.getById=function(l){for(var f=this.bottom;f;){if(f.id==l)return f;f=f.next}return null},g.forEach=function(l,f){for(var d=this.bottom;d;){if(l.call(f,d)===!1)return this;d=d.next}return this},g.getElementsByPoint=function(l,f){var d=this.set();return this.forEach(function(c){c.isPointInside(l,f)&&d.push(c)}),d},Lt.isPointInside=function(l,f){var d=this.realPath=It[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=h.transformPath(d,this.attr("transform"))),h.isPointInsidePath(d,l,f)},Lt.getBBox=function(l){if(this.removed)return{};var f=this._;return l?(!f.dirty&&f.bboxwt||(this.realPath=It[this.type](this),f.bboxwt=he(this.realPath),f.bboxwt.toString=en,f.dirty=0),f.bboxwt):((f.dirty||f.dirtyT||!f.bbox)&&(!f.dirty&&this.realPath||(f.bboxwt=0,this.realPath=It[this.type](this)),f.bbox=he(Ut(this.realPath,this.matrix)),f.bbox.toString=en,f.dirty=f.dirtyT=0),f.bbox)},Lt.clone=function(){if(this.removed)return null;var l=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(l),l},Lt.glow=function(l){if(this.type=="text")return null;var f={width:((l=l||{}).width||10)+(+this.attr("stroke-width")||1),fill:l.fill||!1,opacity:l.opacity==null?.5:l.opacity,offsetx:l.offsetx||0,offsety:l.offsety||0,color:l.color||"#000"},d=f.width/2,c=this.paper,u=c.set(),p=this.realPath||It[this.type](this);p=this.matrix?Ut(p,this.matrix):p;for(var v=1;v<d+1;v++)u.push(c.path(p).attr({stroke:f.color,fill:f.fill?f.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(f.width/d*v).toFixed(3),opacity:+(f.opacity/d).toFixed(3)}));return u.insertBefore(this).translate(f.offsetx,f.offsety)};var $t=function(l,f,d,c,u,p,v,_,S){return S==null?re(l,f,d,c,u,p,v,_):h.findDotsAtSegment(l,f,d,c,u,p,v,_,function(I,U,W,j,G,$,Q,Z,H){if(!(H<0||re(I,U,W,j,G,$,Q,Z)<H)){var lt,tt=.5,rt=1-tt;for(lt=re(I,U,W,j,G,$,Q,Z,rt);Pt(lt-H)>.01;)lt=re(I,U,W,j,G,$,Q,Z,rt+=(lt<H?1:-1)*(tt/=2));return rt}}(l,f,d,c,u,p,v,_,S))},be=function(l,f){return function(d,c,u){for(var p,v,_,S,I,U="",W={},j=0,G=0,$=(d=tn(d)).length;G<$;G++){if((_=d[G])[0]=="M")p=+_[1],v=+_[2];else{if(j+(S=$t(p,v,_[1],_[2],_[3],_[4],_[5],_[6]))>c){if(f&&!W.start){if(U+=["C"+(I=$t(p,v,_[1],_[2],_[3],_[4],_[5],_[6],c-j)).start.x,I.start.y,I.m.x,I.m.y,I.x,I.y],u)return U;W.start=U,U=["M"+I.x,I.y+"C"+I.n.x,I.n.y,I.end.x,I.end.y,_[5],_[6]].join(),j+=S,p=+_[5],v=+_[6];continue}if(!l&&!f)return{x:(I=$t(p,v,_[1],_[2],_[3],_[4],_[5],_[6],c-j)).x,y:I.y,alpha:I.alpha}}j+=S,p=+_[5],v=+_[6]}U+=_.shift()+_}return W.end=U,(I=l?j:f?W:h.findDotsAtSegment(p,v,_[0],_[1],_[2],_[3],_[4],_[5],1)).alpha&&(I={x:I.x,y:I.y,alpha:I.alpha}),I}},me=be(1),ce=be(),Oe=be(0,1);h.getTotalLength=me,h.getPointAtLength=ce,h.getSubpath=function(l,f,d){if(this.getTotalLength(l)-d<1e-6)return Oe(l,f).end;var c=Oe(l,d,1);return f?Oe(c,f).end:c},Lt.getTotalLength=function(){var l=this.getPath();if(l)return this.node.getTotalLength?this.node.getTotalLength():me(l)},Lt.getPointAtLength=function(l){var f=this.getPath();if(f)return ce(f,l)},Lt.getPath=function(){var l,f=h._getPath[this.type];if(this.type!="text"&&this.type!="set")return f&&(l=f(this)),l},Lt.getSubpath=function(l,f){var d=this.getPath();if(d)return h.getSubpath(d,l,f)};var Ft=h.easing_formulas={linear:function(l){return l},"<":function(l){return kt(l,1.7)},">":function(l){return kt(l,.48)},"<>":function(l){var f=.48-l/1.04,d=ht.sqrt(.1734+f*f),c=d-f,u=-d-f,p=kt(Pt(c),1/3)*(c<0?-1:1)+kt(Pt(u),1/3)*(u<0?-1:1)+.5;return 3*(1-p)*p*p+p*p*p},backIn:function(l){var f=1.70158;return l*l*((f+1)*l-f)},backOut:function(l){var f=1.70158;return(l-=1)*l*((f+1)*l+f)+1},elastic:function(l){return l==!!l?l:kt(2,-10*l)*ht.sin(2*Dt*(l-.075)/.3)+1},bounce:function(l){var f=7.5625,d=2.75;return l<1/d?f*l*l:l<2/d?f*(l-=1.5/d)*l+.75:l<2.5/d?f*(l-=2.25/d)*l+.9375:f*(l-=2.625/d)*l+.984375}};Ft.easeIn=Ft["ease-in"]=Ft["<"],Ft.easeOut=Ft["ease-out"]=Ft[">"],Ft.easeInOut=Ft["ease-in-out"]=Ft["<>"],Ft["back-in"]=Ft.backIn,Ft["back-out"]=Ft.backOut;var xt=[],Un=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(l){setTimeout(l,16)},wn=function(){for(var l=+new Date,f=0;f<xt.length;f++){var d=xt[f];if(!d.el.removed&&!d.paused){var c,u,p=l-d.start,v=d.ms,_=d.easing,S=d.from,I=d.diff,U=d.to,W=(d.t,d.el),j={},G={};if(d.initstatus?(p=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*v,d.status=d.initstatus,delete d.initstatus,d.stop&&xt.splice(f--,1)):d.status=(d.prev+(d.percent-d.prev)*(p/v))/d.anim.top,!(p<0))if(p<v){var $=_(p/v);for(var Q in S)if(S[k](Q)){switch(z[Q]){case K:c=+S[Q]+$*v*I[Q];break;case"colour":c="rgb("+[qe(A(S[Q].r+$*v*I[Q].r)),qe(A(S[Q].g+$*v*I[Q].g)),qe(A(S[Q].b+$*v*I[Q].b))].join(",")+")";break;case"path":c=[];for(var Z=0,H=S[Q].length;Z<H;Z++){c[Z]=[S[Q][Z][0]];for(var lt=1,tt=S[Q][Z].length;lt<tt;lt++)c[Z][lt]=+S[Q][Z][lt]+$*v*I[Q][Z][lt];c[Z]=c[Z].join(nt)}c=c.join(nt);break;case"transform":if(I[Q].real)for(c=[],Z=0,H=S[Q].length;Z<H;Z++)for(c[Z]=[S[Q][Z][0]],lt=1,tt=S[Q][Z].length;lt<tt;lt++)c[Z][lt]=S[Q][Z][lt]+$*v*I[Q][Z][lt];else{var rt=function(bt){return+S[Q][bt]+$*v*I[Q][bt]};c=[["m",rt(0),rt(1),rt(2),rt(3),rt(4),rt(5)]]}break;case"csv":if(Q=="clip-rect")for(c=[],Z=4;Z--;)c[Z]=+S[Q][Z]+$*v*I[Q][Z];break;default:var et=[][O](S[Q]);for(c=[],Z=W.paper.customAttributes[Q].length;Z--;)c[Z]=+et[Z]+$*v*I[Q][Z]}j[Q]=c}W.attr(j),function(bt,gt,_t){setTimeout(function(){a("raphael.anim.frame."+bt,gt,_t)})}(W.id,W,d.anim)}else{if(function(bt,gt,_t){setTimeout(function(){a("raphael.anim.frame."+gt.id,gt,_t),a("raphael.anim.finish."+gt.id,gt,_t),h.is(bt,"function")&&bt.call(gt)})}(d.callback,W,d.anim),W.attr(U),xt.splice(f--,1),d.repeat>1&&!d.next){for(u in U)U[k](u)&&(G[u]=d.totalOrigin[u]);d.el.attr(G),Ne(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&Ne(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}}xt.length&&Un(wn)},qe=function(l){return l>255?255:l<0?0:l};function se(l,f,d,c,u,p){var v=3*f,_=3*(c-f)-v,S=1-v-_,I=3*d,U=3*(u-d)-I,W=1-I-U;function j(G){return((S*G+_)*G+v)*G}return function(G,$){var Q=function(Z,H){var lt,tt,rt,et,bt,gt;for(rt=Z,gt=0;gt<8;gt++){if(et=j(rt)-Z,Pt(et)<H)return rt;if(Pt(bt=(3*S*rt+2*_)*rt+v)<1e-6)break;rt-=et/bt}if(tt=1,(rt=Z)<(lt=0))return lt;if(rt>tt)return tt;for(;lt<tt;){if(et=j(rt),Pt(et-Z)<H)return rt;Z>et?lt=rt:tt=rt,rt=(tt-lt)/2+lt}return rt}(G,$);return((W*Q+U)*Q+I)*Q}(l,1/(200*p))}function ee(l,f){var d=[],c={};if(this.ms=f,this.times=1,l){for(var u in l)l[k](u)&&(c[L(u)]=l[u],d.push(L(u)));d.sort(At)}this.anim=c,this.top=d[d.length-1],this.percents=d}function Ne(l,f,d,c,u,p){d=L(d);var v,_,S,I,U,W,j=l.ms,G={},$={},Q={};if(c)for(H=0,lt=xt.length;H<lt;H++){var Z=xt[H];if(Z.el.id==f.id&&Z.anim==l){Z.percent!=d?(xt.splice(H,1),S=1):_=Z,f.attr(Z.totalOrigin);break}}else c=+$;for(var H=0,lt=l.percents.length;H<lt;H++){if(l.percents[H]==d||l.percents[H]>c*l.top){d=l.percents[H],U=l.percents[H-1]||0,j=j/l.top*(d-U),I=l.percents[H+1],v=l.anim[d];break}c&&f.attr(l.anim[l.percents[H]])}if(v){if(_)_.initstatus=c,_.start=new Date-_.ms*c;else{for(var tt in v)if(v[k](tt)&&(z[k](tt)||f.paper.customAttributes[k](tt)))switch(G[tt]=f.attr(tt),G[tt]==null&&(G[tt]=q[tt]),$[tt]=v[tt],z[tt]){case K:Q[tt]=($[tt]-G[tt])/j;break;case"colour":G[tt]=h.getRGB(G[tt]);var rt=h.getRGB($[tt]);Q[tt]={r:(rt.r-G[tt].r)/j,g:(rt.g-G[tt].g)/j,b:(rt.b-G[tt].b)/j};break;case"path":var et=tn(G[tt],$[tt]),bt=et[1];for(G[tt]=et[0],Q[tt]=[],H=0,lt=G[tt].length;H<lt;H++){Q[tt][H]=[0];for(var gt=1,_t=G[tt][H].length;gt<_t;gt++)Q[tt][H][gt]=(bt[H][gt]-G[tt][H][gt])/j}break;case"transform":var Cn=f._,Gn=mi(Cn[tt],$[tt]);if(Gn)for(G[tt]=Gn.from,$[tt]=Gn.to,Q[tt]=[],Q[tt].real=!0,H=0,lt=G[tt].length;H<lt;H++)for(Q[tt][H]=[G[tt][H][0]],gt=1,_t=G[tt][H].length;gt<_t;gt++)Q[tt][H][gt]=($[tt][H][gt]-G[tt][H][gt])/j;else{var ne=f.matrix||new Le,_e={_:{transform:Cn.transform},getBBox:function(){return f.getBBox(1)}};G[tt]=[ne.a,ne.b,ne.c,ne.d,ne.e,ne.f],vn(_e,$[tt]),$[tt]=_e._.transform,Q[tt]=[(_e.matrix.a-ne.a)/j,(_e.matrix.b-ne.b)/j,(_e.matrix.c-ne.c)/j,(_e.matrix.d-ne.d)/j,(_e.matrix.e-ne.e)/j,(_e.matrix.f-ne.f)/j]}break;case"csv":var Tn=V(v[tt])[ot](x),Sn=V(G[tt])[ot](x);if(tt=="clip-rect")for(G[tt]=Sn,Q[tt]=[],H=Sn.length;H--;)Q[tt][H]=(Tn[H]-G[tt][H])/j;$[tt]=Tn;break;default:for(Tn=[][O](v[tt]),Sn=[][O](G[tt]),Q[tt]=[],H=f.paper.customAttributes[tt].length;H--;)Q[tt][H]=((Tn[H]||0)-(Sn[H]||0))/j}var bi=v.easing,Be=h.easing_formulas[bi];if(!Be)if((Be=V(bi).match(b))&&Be.length==5){var sn=Be;Be=function(_i){return se(_i,+sn[1],+sn[2],+sn[3],+sn[4],j)}}else Be=Mt;if(Z={anim:l,percent:d,timestamp:W=v.start||l.start||+new Date,start:W+(l.del||0),status:0,initstatus:c||0,stop:!1,ms:j,easing:Be,from:G,diff:Q,to:$,el:f,callback:v.callback,prev:U,next:I,repeat:p||l.times,origin:f.attr(),totalOrigin:u},xt.push(Z),c&&!_&&!S&&(Z.stop=!0,Z.start=new Date-j*c,xt.length==1))return wn();S&&(Z.start=new Date-Z.ms*c),xt.length==1&&Un(wn)}a("raphael.anim.start."+f.id,f,l)}}function xn(l){for(var f=0;f<xt.length;f++)xt[f].el.paper==l&&xt.splice(f--,1)}Lt.animateWith=function(l,f,d,c,u,p){if(this.removed)return p&&p.call(this),this;var v=d instanceof ee?d:h.animation(d,c,u,p);Ne(v,this,v.percents[0],null,this.attr());for(var _=0,S=xt.length;_<S;_++)if(xt[_].anim==f&&xt[_].el==l){xt[S-1].start=xt[_].start;break}return this},Lt.onAnimation=function(l){return l?a.on("raphael.anim.frame."+this.id,l):a.unbind("raphael.anim.frame."+this.id),this},ee.prototype.delay=function(l){var f=new ee(this.anim,this.ms);return f.times=this.times,f.del=+l||0,f},ee.prototype.repeat=function(l){var f=new ee(this.anim,this.ms);return f.del=this.del,f.times=ht.floor(pt(l,0))||1,f},h.animation=function(l,f,d,c){if(l instanceof ee)return l;!h.is(d,"function")&&d||(c=c||d||null,d=null),l=Object(l),f=+f||0;var u,p,v={};for(p in l)l[k](p)&&L(p)!=p&&L(p)+"%"!=p&&(u=!0,v[p]=l[p]);if(u)return d&&(v.easing=d),c&&(v.callback=c),new ee({100:v},f);if(c){var _=0;for(var S in l){var I=F(S);l[k](S)&&I>_&&(_=I)}!l[_+="%"].callback&&(l[_].callback=c)}return new ee(l,f)},Lt.animate=function(l,f,d,c){if(this.removed)return c&&c.call(this),this;var u=l instanceof ee?l:h.animation(l,f,d,c);return Ne(u,this,u.percents[0],null,this.attr()),this},Lt.setTime=function(l,f){return l&&f!=null&&this.status(l,ut(f,l.ms)/l.ms),this},Lt.status=function(l,f){var d,c,u=[],p=0;if(f!=null)return Ne(l,this,-1,ut(f,1)),this;for(d=xt.length;p<d;p++)if((c=xt[p]).el.id==this.id&&(!l||c.anim==l)){if(l)return c.status;u.push({anim:c.anim,status:c.status})}return l?0:u},Lt.pause=function(l){for(var f=0;f<xt.length;f++)xt[f].el.id!=this.id||l&&xt[f].anim!=l||a("raphael.anim.pause."+this.id,this,xt[f].anim)!==!1&&(xt[f].paused=!0);return this},Lt.resume=function(l){for(var f=0;f<xt.length;f++)if(xt[f].el.id==this.id&&(!l||xt[f].anim==l)){var d=xt[f];a("raphael.anim.resume."+this.id,this,d.anim)!==!1&&(delete d.paused,this.status(d.anim,d.status))}return this},Lt.stop=function(l){for(var f=0;f<xt.length;f++)xt[f].el.id!=this.id||l&&xt[f].anim!=l||a("raphael.anim.stop."+this.id,this,xt[f].anim)!==!1&&xt.splice(f--,1);return this},a.on("raphael.remove",xn),a.on("raphael.clear",xn),Lt.toString=function(){return"Raphaël’s object"};var bn,_n,le,ue,nn=function(l){if(this.items=[],this.length=0,this.type="set",l)for(var f=0,d=l.length;f<d;f++)!l[f]||l[f].constructor!=Lt.constructor&&l[f].constructor!=nn||(this[this.items.length]=this.items[this.items.length]=l[f],this.length++)},Vt=nn.prototype;for(var rn in Vt.push=function(){for(var l,f,d=0,c=arguments.length;d<c;d++)!(l=arguments[d])||l.constructor!=Lt.constructor&&l.constructor!=nn||(this[f=this.items.length]=this.items[f]=l,this.length++);return this},Vt.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Vt.forEach=function(l,f){for(var d=0,c=this.items.length;d<c;d++)if(l.call(f,this.items[d],d)===!1)return this;return this},Lt)Lt[k](rn)&&(Vt[rn]=function(l){return function(){var f=arguments;return this.forEach(function(d){d[l][R](d,f)})}}(rn));return Vt.attr=function(l,f){if(l&&h.is(l,it)&&h.is(l[0],"object"))for(var d=0,c=l.length;d<c;d++)this.items[d].attr(l[d]);else for(var u=0,p=this.items.length;u<p;u++)this.items[u].attr(l,f);return this},Vt.clear=function(){for(;this.length;)this.pop()},Vt.splice=function(l,f,d){l=l<0?pt(this.length+l,0):l,f=pt(0,ut(this.length-l,f));var c,u=[],p=[],v=[];for(c=2;c<arguments.length;c++)v.push(arguments[c]);for(c=0;c<f;c++)p.push(this[l+c]);for(;c<this.length-l;c++)u.push(this[l+c]);var _=v.length;for(c=0;c<_+u.length;c++)this.items[l+c]=this[l+c]=c<_?v[c]:u[c-_];for(c=this.items.length=this.length-=f-_;this[c];)delete this[c++];return new nn(p)},Vt.exclude=function(l){for(var f=0,d=this.length;f<d;f++)if(this[f]==l)return this.splice(f,1),!0},Vt.animate=function(l,f,d,c){(h.is(d,"function")||!d)&&(c=d||null);var u,p,v=this.items.length,_=v,S=this;if(!v)return this;c&&(p=function(){!--v&&c.call(S)}),d=h.is(d,"string")?d:p;var I=h.animation(l,f,d,p);for(u=this.items[--_].animate(I);_--;)this.items[_]&&!this.items[_].removed&&this.items[_].animateWith(u,I,I),this.items[_]&&!this.items[_].removed||v--;return this},Vt.insertAfter=function(l){for(var f=this.items.length;f--;)this.items[f].insertAfter(l);return this},Vt.getBBox=function(){for(var l=[],f=[],d=[],c=[],u=this.items.length;u--;)if(!this.items[u].removed){var p=this.items[u].getBBox();l.push(p.x),f.push(p.y),d.push(p.x+p.width),c.push(p.y+p.height)}return{x:l=ut[R](0,l),y:f=ut[R](0,f),x2:d=pt[R](0,d),y2:c=pt[R](0,c),width:d-l,height:c-f}},Vt.clone=function(l){l=this.paper.set();for(var f=0,d=this.items.length;f<d;f++)l.push(this.items[f].clone());return l},Vt.toString=function(){return"Raphaël‘s set"},Vt.glow=function(l){var f=this.paper.set();return this.forEach(function(d,c){var u=d.glow(l);u?.forEach(function(p,v){f.push(p)})}),f},Vt.isPointInside=function(l,f){var d=!1;return this.forEach(function(c){if(c.isPointInside(l,f))return d=!0,!1}),d},h.registerFont=function(l){if(!l.face)return l;this.fonts=this.fonts||{};var f={w:l.w,face:{},glyphs:{}},d=l.face["font-family"];for(var c in l.face)l.face[k](c)&&(f.face[c]=l.face[c]);if(this.fonts[d]?this.fonts[d].push(f):this.fonts[d]=[f],!l.svg){for(var u in f.face["units-per-em"]=F(l.face["units-per-em"],10),l.glyphs)if(l.glyphs[k](u)){var p=l.glyphs[u];if(f.glyphs[u]={w:p.w,k:{},d:p.d&&"M"+p.d.replace(/[mlcxtrv]/g,function(_){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[_]||"M"})+"z"},p.k)for(var v in p.k)p[k](v)&&(f.glyphs[u].k[v]=p.k[v])}}return l},g.getFont=function(l,f,d,c){if(c=c||"normal",d=d||"normal",f=+f||{normal:400,bold:700,lighter:300,bolder:800}[f]||400,h.fonts){var u,p=h.fonts[l];if(!p){var v=new RegExp("(^|\\s)"+l.replace(/[^\w\d\s+!~.:_-]/g,Y)+"(\\s|$)","i");for(var _ in h.fonts)if(h.fonts[k](_)&&v.test(_)){p=h.fonts[_];break}}if(p)for(var S=0,I=p.length;S<I&&((u=p[S]).face["font-weight"]!=f||u.face["font-style"]!=d&&u.face["font-style"]||u.face["font-stretch"]!=c);S++);return u}},g.print=function(l,f,d,c,u,p,v,_){p=p||"middle",v=pt(ut(v||0,1),-1),_=pt(ut(_||1,3),1);var S,I=V(d)[ot](Y),U=0,W=0,j=Y;if(h.is(c,"string")&&(c=this.getFont(c)),c){S=(u||16)/c.face["units-per-em"];for(var G=c.face.bbox[ot](x),$=+G[0],Q=G[3]-G[1],Z=0,H=+G[1]+(p=="baseline"?Q+ +c.face.descent:Q/2),lt=0,tt=I.length;lt<tt;lt++){if(I[lt]==`
|
|
19
|
+
`)U=0,et=0,W=0,Z+=Q*_;else{var rt=W&&c.glyphs[I[lt-1]]||{},et=c.glyphs[I[lt]];U+=W?(rt.w||c.w)+(rt.k&&rt.k[I[lt]]||0)+c.w*v:0,W=1}et&&et.d&&(j+=h.transformPath(et.d,["t",U*S,Z*S,"s",S,S,$,H,"t",(l-$)/S,(f-H)/S]))}}return this.path(j).attr({fill:"#000",stroke:"none"})},g.add=function(l){if(h.is(l,"array"))for(var f,d=this.set(),c=0,u=l.length;c<u;c++)f=l[c]||{},y[k](f.type)&&d.push(this[f.type]().attr(f));return d},h.format=function(l,f){var d=h.is(f,it)?[0][O](f):arguments;return l&&h.is(l,"string")&&d.length-1&&(l=l.replace(w,function(c,u){return d[++u]==null?Y:d[u]})),l||Y},h.fullfill=(bn=/\{([^\}]+)\}/g,_n=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(l,f){return String(l).replace(bn,function(d,c){return function(u,p,v){var _=v;return p.replace(_n,function(S,I,U,W,j){I=I||W,_&&(I in _&&(_=_[I]),typeof _=="function"&&j&&(_=_()))}),_=(_==null||_==v?u:_)+""}(d,c,f)})}),h.ninja=function(){if(D.was)P.win.Raphael=D.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return h},h.st=Vt,a.on("raphael.DOMload",function(){m=!0}),(le=document).readyState==null&&le.addEventListener&&(le.addEventListener("DOMContentLoaded",ue=function(){le.removeEventListener("DOMContentLoaded",ue,!1),le.readyState="complete"},!1),le.readyState="loading"),function l(){/in/.test(le.readyState)?setTimeout(l,9):h.eve("raphael.DOMload")}(),h}.apply(n,s))===void 0||(e.exports=o)},function(e,n,r){var s,o;s=[r(0),r(3),r(4)],(o=function(a){return a}.apply(n,s))===void 0||(e.exports=o)},function(e,n,r){var s,o,a,h,m,g,x,y,w,k,P,D,N,R;h="hasOwnProperty",m=/[\.\/]/,g=/\s*,\s*/,x=function(O,X){return O-X},y={n:{}},w=function(){for(var O=0,X=this.length;O<X;O++)if(this[O]!==void 0)return this[O]},k=function(){for(var O=this.length;--O;)if(this[O]!==void 0)return this[O]},P=Object.prototype.toString,D=String,N=Array.isArray||function(O){return O instanceof Array||P.call(O)=="[object Array]"},(R=function(O,X){var Y,nt=a,V=Array.prototype.slice.call(arguments,2),ot=R.listeners(O),ct=0,vt=[],dt={},ht=[],pt=o;ht.firstDefined=w,ht.lastDefined=k,o=O,a=0;for(var ut=0,Pt=ot.length;ut<Pt;ut++)"zIndex"in ot[ut]&&(vt.push(ot[ut].zIndex),ot[ut].zIndex<0&&(dt[ot[ut].zIndex]=ot[ut]));for(vt.sort(x);vt[ct]<0;)if(Y=dt[vt[ct++]],ht.push(Y.apply(X,V)),a)return a=nt,ht;for(ut=0;ut<Pt;ut++)if("zIndex"in(Y=ot[ut]))if(Y.zIndex==vt[ct]){if(ht.push(Y.apply(X,V)),a)break;do if((Y=dt[vt[++ct]])&&ht.push(Y.apply(X,V)),a)break;while(Y)}else dt[Y.zIndex]=Y;else if(ht.push(Y.apply(X,V)),a)break;return a=nt,o=pt,ht})._events=y,R.listeners=function(O){var X,Y,nt,V,ot,ct,vt,dt,ht=N(O)?O:O.split(m),pt=y,ut=[pt],Pt=[];for(V=0,ot=ht.length;V<ot;V++){for(dt=[],ct=0,vt=ut.length;ct<vt;ct++)for(Y=[(pt=ut[ct].n)[ht[V]],pt["*"]],nt=2;nt--;)(X=Y[nt])&&(dt.push(X),Pt=Pt.concat(X.f||[]));ut=dt}return Pt},R.separator=function(O){O?(O="["+(O=D(O).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",m=new RegExp(O)):m=/[\.\/]/},R.on=function(O,X){if(typeof X!="function")return function(){};for(var Y=N(O)?N(O[0])?O:[O]:D(O).split(g),nt=0,V=Y.length;nt<V;nt++)(function(ot){for(var ct,vt=N(ot)?ot:D(ot).split(m),dt=y,ht=0,pt=vt.length;ht<pt;ht++)dt=(dt=dt.n).hasOwnProperty(vt[ht])&&dt[vt[ht]]||(dt[vt[ht]]={n:{}});for(dt.f=dt.f||[],ht=0,pt=dt.f.length;ht<pt;ht++)if(dt.f[ht]==X){ct=!0;break}!ct&&dt.f.push(X)})(Y[nt]);return function(ot){+ot==+ot&&(X.zIndex=+ot)}},R.f=function(O){var X=[].slice.call(arguments,1);return function(){R.apply(null,[O,null].concat(X).concat([].slice.call(arguments,0)))}},R.stop=function(){a=1},R.nt=function(O){var X=N(o)?o.join("."):o;return O?new RegExp("(?:\\.|\\/|^)"+O+"(?:\\.|\\/|$)").test(X):X},R.nts=function(){return N(o)?o:o.split(m)},R.off=R.unbind=function(O,X){if(O){var Y=N(O)?N(O[0])?O:[O]:D(O).split(g);if(Y.length>1)for(var nt=0,V=Y.length;nt<V;nt++)R.off(Y[nt],X);else{Y=N(O)?O:D(O).split(m);var ot,ct,vt,dt,ht,pt=[y];for(nt=0,V=Y.length;nt<V;nt++)for(dt=0;dt<pt.length;dt+=vt.length-2){if(vt=[dt,1],ot=pt[dt].n,Y[nt]!="*")ot[Y[nt]]&&vt.push(ot[Y[nt]]);else for(ct in ot)ot[h](ct)&&vt.push(ot[ct]);pt.splice.apply(pt,vt)}for(nt=0,V=pt.length;nt<V;nt++)for(ot=pt[nt];ot.n;){if(X){if(ot.f){for(dt=0,ht=ot.f.length;dt<ht;dt++)if(ot.f[dt]==X){ot.f.splice(dt,1);break}!ot.f.length&&delete ot.f}for(ct in ot.n)if(ot.n[h](ct)&&ot.n[ct].f){var ut=ot.n[ct].f;for(dt=0,ht=ut.length;dt<ht;dt++)if(ut[dt]==X){ut.splice(dt,1);break}!ut.length&&delete ot.n[ct].f}}else for(ct in delete ot.f,ot.n)ot.n[h](ct)&&ot.n[ct].f&&delete ot.n[ct].f;ot=ot.n}}}else R._events=y={n:{}}},R.once=function(O,X){var Y=function(){return R.off(O,Y),X.apply(this,arguments)};return R.on(O,Y)},R.version="0.5.0",R.toString=function(){return"You are running Eve 0.5.0"},e.exports?e.exports=R:(s=function(){return R}.apply(n,[]))===void 0||(e.exports=s)},function(e,n,r){var s,o;s=[r(0)],(o=function(a){if(!a||a.svg){var h="hasOwnProperty",m=String,g=parseFloat,x=parseInt,y=Math,w=y.max,k=y.abs,P=y.pow,D=/[, ]+/,N=a.eve,R="",O=" ",X="http://www.w3.org/1999/xlink",Y={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},nt={};a.toString=function(){return`Your browser supports SVG.
|
|
20
|
+
You are running Raphaël `+this.version};var V=function(E,C){if(C)for(var b in typeof E=="string"&&(E=V(E)),C)C[h](b)&&(b.substring(0,6)=="xlink:"?E.setAttributeNS(X,b.substring(6),m(C[b])):E.setAttribute(b,m(C[b])));else(E=a._g.doc.createElementNS("http://www.w3.org/2000/svg",E)).style&&(E.style.webkitTapHighlightColor="rgba(0,0,0,0)");return E},ot=function(E,C){var b="linear",A=E.id+C,L=.5,F=.5,B=E.node,q=E.paper,z=B.style,J=a._g.doc.getElementById(A);if(!J){if(C=(C=m(C).replace(a._radial_gradient,function(At,Mt,mt){if(b="radial",Mt&&mt){L=g(Mt);var Nt=2*((F=g(mt))>.5)-1;P(L-.5,2)+P(F-.5,2)>.25&&(F=y.sqrt(.25-P(L-.5,2))*Nt+.5)&&F!=.5&&(F=F.toFixed(5)-1e-5*Nt)}return R})).split(/\s*\-\s*/),b=="linear"){var at=C.shift();if(at=-g(at),isNaN(at))return null;var ft=[0,0,y.cos(a.rad(at)),y.sin(a.rad(at))],yt=1/(w(k(ft[2]),k(ft[3]))||1);ft[2]*=yt,ft[3]*=yt,ft[2]<0&&(ft[0]=-ft[2],ft[2]=0),ft[3]<0&&(ft[1]=-ft[3],ft[3]=0)}var Tt=a._parseDots(C);if(!Tt)return null;if(A=A.replace(/[\(\)\s,\xb0#]/g,"_"),E.gradient&&A!=E.gradient.id&&(q.defs.removeChild(E.gradient),delete E.gradient),!E.gradient){J=V(b+"Gradient",{id:A}),E.gradient=J,V(J,b=="radial"?{fx:L,fy:F}:{x1:ft[0],y1:ft[1],x2:ft[2],y2:ft[3],gradientTransform:E.matrix.invert()}),q.defs.appendChild(J);for(var wt=0,Et=Tt.length;wt<Et;wt++)J.appendChild(V("stop",{offset:Tt[wt].offset?Tt[wt].offset:wt?"100%":"0%","stop-color":Tt[wt].color||"#fff","stop-opacity":isFinite(Tt[wt].opacity)?Tt[wt].opacity:1}))}}return V(B,{fill:ct(A),opacity:1,"fill-opacity":1}),z.fill=R,z.opacity=1,z.fillOpacity=1,1},ct=function(E){if((C=document.documentMode)&&(C===9||C===10))return"url('#"+E+"')";var C,b=document.location;return"url('"+(b.protocol+"//"+b.host+b.pathname+b.search)+"#"+E+"')"},vt=function(E){var C=E.getBBox(1);V(E.pattern,{patternTransform:E.matrix.invert()+" translate("+C.x+","+C.y+")"})},dt=function(E,C,b){if(E.type=="path"){for(var A,L,F,B,q,z=m(C).toLowerCase().split("-"),J=E.paper,at=b?"end":"start",ft=E.node,yt=E.attrs,Tt=yt["stroke-width"],wt=z.length,Et="classic",At=3,Mt=3,mt=5;wt--;)switch(z[wt]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":Et=z[wt];break;case"wide":Mt=5;break;case"narrow":Mt=2;break;case"long":At=5;break;case"short":At=2}if(Et=="open"?(At+=2,Mt+=2,mt+=2,F=1,B=b?4:1,q={fill:"none",stroke:yt.stroke}):(B=F=At/2,q={fill:yt.stroke,stroke:"none"}),E._.arrows?b?(E._.arrows.endPath&&nt[E._.arrows.endPath]--,E._.arrows.endMarker&&nt[E._.arrows.endMarker]--):(E._.arrows.startPath&&nt[E._.arrows.startPath]--,E._.arrows.startMarker&&nt[E._.arrows.startMarker]--):E._.arrows={},Et!="none"){var Nt="raphael-marker-"+Et,It="raphael-marker-"+at+Et+At+Mt+"-obj"+E.id;a._g.doc.getElementById(Nt)?nt[Nt]++:(J.defs.appendChild(V(V("path"),{"stroke-linecap":"round",d:Y[Et],id:Nt})),nt[Nt]=1);var Ut,Rt=a._g.doc.getElementById(It);Rt?(nt[It]++,Ut=Rt.getElementsByTagName("use")[0]):(Rt=V(V("marker"),{id:It,markerHeight:Mt,markerWidth:At,orient:"auto",refX:B,refY:Mt/2}),Ut=V(V("use"),{"xlink:href":"#"+Nt,transform:(b?"rotate(180 "+At/2+" "+Mt/2+") ":R)+"scale("+At/mt+","+Mt/mt+")","stroke-width":(1/((At/mt+Mt/mt)/2)).toFixed(4)}),Rt.appendChild(Ut),J.defs.appendChild(Rt),nt[It]=1),V(Ut,q);var Zt=F*(Et!="diamond"&&Et!="oval");b?(A=E._.arrows.startdx*Tt||0,L=a.getTotalLength(yt.path)-Zt*Tt):(A=Zt*Tt,L=a.getTotalLength(yt.path)-(E._.arrows.enddx*Tt||0)),(q={})["marker-"+at]="url(#"+It+")",(L||A)&&(q.d=a.getSubpath(yt.path,A,L)),V(ft,q),E._.arrows[at+"Path"]=Nt,E._.arrows[at+"Marker"]=It,E._.arrows[at+"dx"]=Zt,E._.arrows[at+"Type"]=Et,E._.arrows[at+"String"]=C}else b?(A=E._.arrows.startdx*Tt||0,L=a.getTotalLength(yt.path)-A):(A=0,L=a.getTotalLength(yt.path)-(E._.arrows.enddx*Tt||0)),E._.arrows[at+"Path"]&&V(ft,{d:a.getSubpath(yt.path,A,L)}),delete E._.arrows[at+"Path"],delete E._.arrows[at+"Marker"],delete E._.arrows[at+"dx"],delete E._.arrows[at+"Type"],delete E._.arrows[at+"String"];for(q in nt)if(nt[h](q)&&!nt[q]){var Wt=a._g.doc.getElementById(q);Wt&&Wt.parentNode.removeChild(Wt)}}},ht={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},pt=function(E,C,b){if(C=ht[m(C).toLowerCase()]){for(var A=E.attrs["stroke-width"]||"1",L={round:A,square:A,butt:0}[E.attrs["stroke-linecap"]||b["stroke-linecap"]]||0,F=[],B=C.length;B--;)F[B]=C[B]*A+(B%2?1:-1)*L;V(E.node,{"stroke-dasharray":F.join(",")})}else V(E.node,{"stroke-dasharray":"none"})},ut=function(E,C){var b=E.node,A=E.attrs,L=b.style.visibility;for(var F in b.style.visibility="hidden",C)if(C[h](F)){if(!a._availableAttrs[h](F))continue;var B=C[F];switch(A[F]=B,F){case"blur":E.blur(B);break;case"title":var q=b.getElementsByTagName("title");if(q.length&&(q=q[0]))q.firstChild.nodeValue=B;else{q=V("title");var z=a._g.doc.createTextNode(B);q.appendChild(z),b.appendChild(q)}break;case"href":case"target":var J=b.parentNode;if(J.tagName.toLowerCase()!="a"){var at=V("a");J.insertBefore(at,b),at.appendChild(b),J=at}F=="target"?J.setAttributeNS(X,"show",B=="blank"?"new":B):J.setAttributeNS(X,F,B);break;case"cursor":b.style.cursor=B;break;case"transform":E.transform(B);break;case"arrow-start":dt(E,B);break;case"arrow-end":dt(E,B,1);break;case"clip-rect":var ft=m(B).split(D);if(ft.length==4){E.clip&&E.clip.parentNode.parentNode.removeChild(E.clip.parentNode);var yt=V("clipPath"),Tt=V("rect");yt.id=a.createUUID(),V(Tt,{x:ft[0],y:ft[1],width:ft[2],height:ft[3]}),yt.appendChild(Tt),E.paper.defs.appendChild(yt),V(b,{"clip-path":"url(#"+yt.id+")"}),E.clip=Tt}if(!B){var wt=b.getAttribute("clip-path");if(wt){var Et=a._g.doc.getElementById(wt.replace(/(^url\(#|\)$)/g,R));Et&&Et.parentNode.removeChild(Et),V(b,{"clip-path":R}),delete E.clip}}break;case"path":E.type=="path"&&(V(b,{d:B?A.path=a._pathToAbsolute(B):"M0,0"}),E._.dirty=1,E._.arrows&&("startString"in E._.arrows&&dt(E,E._.arrows.startString),"endString"in E._.arrows&&dt(E,E._.arrows.endString,1)));break;case"width":if(b.setAttribute(F,B),E._.dirty=1,!A.fx)break;F="x",B=A.x;case"x":A.fx&&(B=-A.x-(A.width||0));case"rx":if(F=="rx"&&E.type=="rect")break;case"cx":b.setAttribute(F,B),E.pattern&&vt(E),E._.dirty=1;break;case"height":if(b.setAttribute(F,B),E._.dirty=1,!A.fy)break;F="y",B=A.y;case"y":A.fy&&(B=-A.y-(A.height||0));case"ry":if(F=="ry"&&E.type=="rect")break;case"cy":b.setAttribute(F,B),E.pattern&&vt(E),E._.dirty=1;break;case"r":E.type=="rect"?V(b,{rx:B,ry:B}):b.setAttribute(F,B),E._.dirty=1;break;case"src":E.type=="image"&&b.setAttributeNS(X,"href",B);break;case"stroke-width":E._.sx==1&&E._.sy==1||(B/=w(k(E._.sx),k(E._.sy))||1),b.setAttribute(F,B),A["stroke-dasharray"]&&pt(E,A["stroke-dasharray"],C),E._.arrows&&("startString"in E._.arrows&&dt(E,E._.arrows.startString),"endString"in E._.arrows&&dt(E,E._.arrows.endString,1));break;case"stroke-dasharray":pt(E,B,C);break;case"fill":var At=m(B).match(a._ISURL);if(At){yt=V("pattern");var Mt=V("image");yt.id=a.createUUID(),V(yt,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),V(Mt,{x:0,y:0,"xlink:href":At[1]}),yt.appendChild(Mt),function(Rt){a._preload(At[1],function(){var Zt=this.offsetWidth,Wt=this.offsetHeight;V(Rt,{width:Zt,height:Wt}),V(Mt,{width:Zt,height:Wt})})}(yt),E.paper.defs.appendChild(yt),V(b,{fill:"url(#"+yt.id+")"}),E.pattern=yt,E.pattern&&vt(E);break}var mt=a.getRGB(B);if(mt.error){if((E.type=="circle"||E.type=="ellipse"||m(B).charAt()!="r")&&ot(E,B)){if("opacity"in A||"fill-opacity"in A){var Nt=a._g.doc.getElementById(b.getAttribute("fill").replace(/^url\(#|\)$/g,R));if(Nt){var It=Nt.getElementsByTagName("stop");V(It[It.length-1],{"stop-opacity":("opacity"in A?A.opacity:1)*("fill-opacity"in A?A["fill-opacity"]:1)})}}A.gradient=B,A.fill="none";break}}else delete C.gradient,delete A.gradient,!a.is(A.opacity,"undefined")&&a.is(C.opacity,"undefined")&&V(b,{opacity:A.opacity}),!a.is(A["fill-opacity"],"undefined")&&a.is(C["fill-opacity"],"undefined")&&V(b,{"fill-opacity":A["fill-opacity"]});mt[h]("opacity")&&V(b,{"fill-opacity":mt.opacity>1?mt.opacity/100:mt.opacity});case"stroke":mt=a.getRGB(B),b.setAttribute(F,mt.hex),F=="stroke"&&mt[h]("opacity")&&V(b,{"stroke-opacity":mt.opacity>1?mt.opacity/100:mt.opacity}),F=="stroke"&&E._.arrows&&("startString"in E._.arrows&&dt(E,E._.arrows.startString),"endString"in E._.arrows&&dt(E,E._.arrows.endString,1));break;case"gradient":(E.type=="circle"||E.type=="ellipse"||m(B).charAt()!="r")&&ot(E,B);break;case"opacity":A.gradient&&!A[h]("stroke-opacity")&&V(b,{"stroke-opacity":B>1?B/100:B});case"fill-opacity":if(A.gradient){(Nt=a._g.doc.getElementById(b.getAttribute("fill").replace(/^url\(#|\)$/g,R)))&&(It=Nt.getElementsByTagName("stop"),V(It[It.length-1],{"stop-opacity":B}));break}default:F=="font-size"&&(B=x(B,10)+"px");var Ut=F.replace(/(\-.)/g,function(Rt){return Rt.substring(1).toUpperCase()});b.style[Ut]=B,E._.dirty=1,b.setAttribute(F,B)}}Pt(E,C),b.style.visibility=L},Pt=function(E,C){if(E.type=="text"&&(C[h]("text")||C[h]("font")||C[h]("font-size")||C[h]("x")||C[h]("y"))){var b=E.attrs,A=E.node,L=A.firstChild?x(a._g.doc.defaultView.getComputedStyle(A.firstChild,R).getPropertyValue("font-size"),10):10;if(C[h]("text")){for(b.text=C.text;A.firstChild;)A.removeChild(A.firstChild);for(var F,B=m(C.text).split(`
|
|
21
|
+
`),q=[],z=0,J=B.length;z<J;z++)F=V("tspan"),z&&V(F,{dy:1.2*L,x:b.x}),F.appendChild(a._g.doc.createTextNode(B[z])),A.appendChild(F),q[z]=F}else for(z=0,J=(q=A.getElementsByTagName("tspan")).length;z<J;z++)z?V(q[z],{dy:1.2*L,x:b.x}):V(q[0],{dy:0});V(A,{x:b.x,y:b.y}),E._.dirty=1;var at=E._getBBox(),ft=b.y-(at.y+at.height/2);ft&&a.is(ft,"finite")&&V(q[0],{dy:ft})}},kt=function(E){return E.parentNode&&E.parentNode.tagName.toLowerCase()==="a"?E.parentNode:E},Dt=function(E,C){this[0]=this.node=E,E.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),E.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=C,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!C.bottom&&(C.bottom=this),this.prev=C.top,C.top&&(C.top.next=this),C.top=this,this.next=null},K=a.el;Dt.prototype=K,K.constructor=Dt,a._engine.path=function(E,C){var b=V("path");C.canvas&&C.canvas.appendChild(b);var A=new Dt(b,C);return A.type="path",ut(A,{fill:"none",stroke:"#000",path:E}),A},K.rotate=function(E,C,b){if(this.removed)return this;if((E=m(E).split(D)).length-1&&(C=g(E[1]),b=g(E[2])),E=g(E[0]),b==null&&(C=b),C==null||b==null){var A=this.getBBox(1);C=A.x+A.width/2,b=A.y+A.height/2}return this.transform(this._.transform.concat([["r",E,C,b]])),this},K.scale=function(E,C,b,A){if(this.removed)return this;if((E=m(E).split(D)).length-1&&(C=g(E[1]),b=g(E[2]),A=g(E[3])),E=g(E[0]),C==null&&(C=E),A==null&&(b=A),b==null||A==null)var L=this.getBBox(1);return b=b??L.x+L.width/2,A=A??L.y+L.height/2,this.transform(this._.transform.concat([["s",E,C,b,A]])),this},K.translate=function(E,C){return this.removed?this:((E=m(E).split(D)).length-1&&(C=g(E[1])),E=g(E[0])||0,C=+C||0,this.transform(this._.transform.concat([["t",E,C]])),this)},K.transform=function(E){var C=this._;if(E==null)return C.transform;if(a._extractTransform(this,E),this.clip&&V(this.clip,{transform:this.matrix.invert()}),this.pattern&&vt(this),this.node&&V(this.node,{transform:this.matrix}),C.sx!=1||C.sy!=1){var b=this.attrs[h]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":b})}return this},K.hide=function(){return this.removed||(this.node.style.display="none"),this},K.show=function(){return this.removed||(this.node.style.display=""),this},K.remove=function(){var E=kt(this.node);if(!this.removed&&E.parentNode){var C=this.paper;for(var b in C.__set__&&C.__set__.exclude(this),N.unbind("raphael.*.*."+this.id),this.gradient&&C.defs.removeChild(this.gradient),a._tear(this,C),E.parentNode.removeChild(E),this.removeData(),this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;this.removed=!0}},K._getBBox=function(){if(this.node.style.display=="none"){this.show();var E=!0}var C,b=!1;this.paper.canvas.parentElement?C=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(C=this.paper.canvas.parentNode.style),C&&C.display=="none"&&(b=!0,C.display="");var A={};try{A=this.node.getBBox()}catch{A={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{A=A||{},b&&(C.display="none")}return E&&this.hide(),A},K.attr=function(E,C){if(this.removed)return this;if(E==null){var b={};for(var A in this.attrs)this.attrs[h](A)&&(b[A]=this.attrs[A]);return b.gradient&&b.fill=="none"&&(b.fill=b.gradient)&&delete b.gradient,b.transform=this._.transform,b}if(C==null&&a.is(E,"string")){if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(E=="transform")return this._.transform;for(var L=E.split(D),F={},B=0,q=L.length;B<q;B++)(E=L[B])in this.attrs?F[E]=this.attrs[E]:a.is(this.paper.customAttributes[E],"function")?F[E]=this.paper.customAttributes[E].def:F[E]=a._availableAttrs[E];return q-1?F:F[L[0]]}if(C==null&&a.is(E,"array")){for(F={},B=0,q=E.length;B<q;B++)F[E[B]]=this.attr(E[B]);return F}if(C!=null){var z={};z[E]=C}else E!=null&&a.is(E,"object")&&(z=E);for(var J in z)N("raphael.attr."+J+"."+this.id,this,z[J]);for(J in this.paper.customAttributes)if(this.paper.customAttributes[h](J)&&z[h](J)&&a.is(this.paper.customAttributes[J],"function")){var at=this.paper.customAttributes[J].apply(this,[].concat(z[J]));for(var ft in this.attrs[J]=z[J],at)at[h](ft)&&(z[ft]=at[ft])}return ut(this,z),this},K.toFront=function(){if(this.removed)return this;var E=kt(this.node);E.parentNode.appendChild(E);var C=this.paper;return C.top!=this&&a._tofront(this,C),this},K.toBack=function(){if(this.removed)return this;var E=kt(this.node),C=E.parentNode;return C.insertBefore(E,C.firstChild),a._toback(this,this.paper),this.paper,this},K.insertAfter=function(E){if(this.removed||!E)return this;var C=kt(this.node),b=kt(E.node||E[E.length-1].node);return b.nextSibling?b.parentNode.insertBefore(C,b.nextSibling):b.parentNode.appendChild(C),a._insertafter(this,E,this.paper),this},K.insertBefore=function(E){if(this.removed||!E)return this;var C=kt(this.node),b=kt(E.node||E[0].node);return b.parentNode.insertBefore(C,b),a._insertbefore(this,E,this.paper),this},K.blur=function(E){var C=this;if(+E!=0){var b=V("filter"),A=V("feGaussianBlur");C.attrs.blur=E,b.id=a.createUUID(),V(A,{stdDeviation:+E||1.5}),b.appendChild(A),C.paper.defs.appendChild(b),C._blur=b,V(C.node,{filter:"url(#"+b.id+")"})}else C._blur&&(C._blur.parentNode.removeChild(C._blur),delete C._blur,delete C.attrs.blur),C.node.removeAttribute("filter");return C},a._engine.circle=function(E,C,b,A){var L=V("circle");E.canvas&&E.canvas.appendChild(L);var F=new Dt(L,E);return F.attrs={cx:C,cy:b,r:A,fill:"none",stroke:"#000"},F.type="circle",V(L,F.attrs),F},a._engine.rect=function(E,C,b,A,L,F){var B=V("rect");E.canvas&&E.canvas.appendChild(B);var q=new Dt(B,E);return q.attrs={x:C,y:b,width:A,height:L,rx:F||0,ry:F||0,fill:"none",stroke:"#000"},q.type="rect",V(B,q.attrs),q},a._engine.ellipse=function(E,C,b,A,L){var F=V("ellipse");E.canvas&&E.canvas.appendChild(F);var B=new Dt(F,E);return B.attrs={cx:C,cy:b,rx:A,ry:L,fill:"none",stroke:"#000"},B.type="ellipse",V(F,B.attrs),B},a._engine.image=function(E,C,b,A,L,F){var B=V("image");V(B,{x:b,y:A,width:L,height:F,preserveAspectRatio:"none"}),B.setAttributeNS(X,"href",C),E.canvas&&E.canvas.appendChild(B);var q=new Dt(B,E);return q.attrs={x:b,y:A,width:L,height:F,src:C},q.type="image",q},a._engine.text=function(E,C,b,A){var L=V("text");E.canvas&&E.canvas.appendChild(L);var F=new Dt(L,E);return F.attrs={x:C,y:b,"text-anchor":"middle",text:A,"font-family":a._availableAttrs["font-family"],"font-size":a._availableAttrs["font-size"],stroke:"none",fill:"#000"},F.type="text",ut(F,F.attrs),F},a._engine.setSize=function(E,C){return this.width=E||this.width,this.height=C||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},a._engine.create=function(){var E=a._getContainer.apply(0,arguments),C=E&&E.container;if(!C)throw new Error("SVG container not found.");var b,A=E.x,L=E.y,F=E.width,B=E.height,q=V("svg"),z="overflow:hidden;";return A=A||0,L=L||0,V(q,{height:B=B||342,version:1.1,width:F=F||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),C==1?(q.style.cssText=z+"position:absolute;left:"+A+"px;top:"+L+"px",a._g.doc.body.appendChild(q),b=1):(q.style.cssText=z+"position:relative",C.firstChild?C.insertBefore(q,C.firstChild):C.appendChild(q)),(C=new a._Paper).width=F,C.height=B,C.canvas=q,C.clear(),C._left=C._top=0,b&&(C.renderfix=function(){}),C.renderfix(),C},a._engine.setViewBox=function(E,C,b,A,L){N("raphael.setViewBox",this,this._viewBox,[E,C,b,A,L]);var F,B,q=this.getSize(),z=w(b/q.width,A/q.height),J=this.top,at=L?"xMidYMid meet":"xMinYMin";for(E==null?(this._vbSize&&(z=1),delete this._vbSize,F="0 0 "+this.width+O+this.height):(this._vbSize=z,F=E+O+C+O+b+O+A),V(this.canvas,{viewBox:F,preserveAspectRatio:at});z&&J;)B="stroke-width"in J.attrs?J.attrs["stroke-width"]:1,J.attr({"stroke-width":B}),J._.dirty=1,J._.dirtyT=1,J=J.prev;return this._viewBox=[E,C,b,A,!!L],this},a.prototype.renderfix=function(){var E,C=this.canvas,b=C.style;try{E=C.getScreenCTM()||C.createSVGMatrix()}catch{E=C.createSVGMatrix()}var A=-E.e%1,L=-E.f%1;(A||L)&&(A&&(this._left=(this._left+A)%1,b.left=this._left+"px"),L&&(this._top=(this._top+L)%1,b.top=this._top+"px"))},a.prototype.clear=function(){a.eve("raphael.clear",this);for(var E=this.canvas;E.firstChild;)E.removeChild(E.firstChild);this.bottom=this.top=null,(this.desc=V("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),E.appendChild(this.desc),E.appendChild(this.defs=V("defs"))},a.prototype.remove=function(){for(var E in N("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[E]=typeof this[E]=="function"?a._removedFactory(E):null};var it=a.st;for(var st in K)K[h](st)&&!it[h](st)&&(it[st]=function(E){return function(){var C=arguments;return this.forEach(function(b){b[E].apply(b,C)})}}(st))}}.apply(n,s))===void 0||(e.exports=o)},function(e,n,r){var s,o;s=[r(0)],(o=function(a){if(!a||a.vml){var h="hasOwnProperty",m=String,g=parseFloat,x=Math,y=x.round,w=x.max,k=x.min,P=x.abs,D=/[, ]+/,N=a.eve,R=" ",O="",X={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},Y=/([clmz]),?([^clmz]*)/gi,nt=/ progid:\S+Blur\([^\)]+\)/g,V=/-?[^,\s-]+/g,ot="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",ct=21600,vt={path:1,rect:1,image:1},dt={circle:1,ellipse:1},ht=function(C,b,A){var L=a.matrix();return L.rotate(-C,.5,.5),{dx:L.x(b,A),dy:L.y(b,A)}},pt=function(C,b,A,L,F,B){var q=C._,z=C.matrix,J=q.fillpos,at=C.node,ft=at.style,yt=1,Tt="",wt=ct/b,Et=ct/A;if(ft.visibility="hidden",b&&A){if(at.coordsize=P(wt)+R+P(Et),ft.rotation=B*(b*A<0?-1:1),B){var At=ht(B,L,F);L=At.dx,F=At.dy}if(b<0&&(Tt+="x"),A<0&&(Tt+=" y")&&(yt=-1),ft.flip=Tt,at.coordorigin=L*-wt+R+F*-Et,J||q.fillsize){var Mt=at.getElementsByTagName("fill");Mt=Mt&&Mt[0],at.removeChild(Mt),J&&(At=ht(B,z.x(J[0],J[1]),z.y(J[0],J[1])),Mt.position=At.dx*yt+R+At.dy*yt),q.fillsize&&(Mt.size=q.fillsize[0]*P(b)+R+q.fillsize[1]*P(A)),at.appendChild(Mt)}ft.visibility="visible"}};a.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
|
|
22
|
+
You are running Raphaël `+this.version};var ut,Pt=function(C,b,A){for(var L=m(b).toLowerCase().split("-"),F=A?"end":"start",B=L.length,q="classic",z="medium",J="medium";B--;)switch(L[B]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":q=L[B];break;case"wide":case"narrow":J=L[B];break;case"long":case"short":z=L[B]}var at=C.node.getElementsByTagName("stroke")[0];at[F+"arrow"]=q,at[F+"arrowlength"]=z,at[F+"arrowwidth"]=J},kt=function(C,b){C.attrs=C.attrs||{};var A=C.node,L=C.attrs,F=A.style,B=vt[C.type]&&(b.x!=L.x||b.y!=L.y||b.width!=L.width||b.height!=L.height||b.cx!=L.cx||b.cy!=L.cy||b.rx!=L.rx||b.ry!=L.ry||b.r!=L.r),q=dt[C.type]&&(L.cx!=b.cx||L.cy!=b.cy||L.r!=b.r||L.rx!=b.rx||L.ry!=b.ry),z=C;for(var J in b)b[h](J)&&(L[J]=b[J]);if(B&&(L.path=a._getPath[C.type](C),C._.dirty=1),b.href&&(A.href=b.href),b.title&&(A.title=b.title),b.target&&(A.target=b.target),b.cursor&&(F.cursor=b.cursor),"blur"in b&&C.blur(b.blur),(b.path&&C.type=="path"||B)&&(A.path=function(Xt){var we=/[ahqstv]/gi,je=a._pathToAbsolute;if(m(Xt).match(we)&&(je=a._path2curve),we=/[clmz]/g,je==a._pathToAbsolute&&!m(Xt).match(we)){var Qt=m(Xt).replace(Y,function(fi,He,Ae){var xe=[],mn=He.toLowerCase()=="m",Me=X[He];return Ae.replace(V,function(Ie){mn&&xe.length==2&&(Me+=xe+X[He=="m"?"l":"L"],xe=[]),xe.push(y(Ie*ct))}),Me+xe});return Qt}var pe,re,Qe=je(Xt);Qt=[];for(var ke=0,Xe=Qe.length;ke<Xe;ke++){pe=Qe[ke],(re=Qe[ke][0].toLowerCase())=="z"&&(re="x");for(var he=1,qt=pe.length;he<qt;he++)re+=y(pe[he]*ct)+(he!=qt-1?",":O);Qt.push(re)}return Qt.join(R)}(~m(L.path).toLowerCase().indexOf("r")?a._pathToAbsolute(L.path):L.path),C._.dirty=1,C.type=="image"&&(C._.fillpos=[L.x,L.y],C._.fillsize=[L.width,L.height],pt(C,1,1,0,0,0))),"transform"in b&&C.transform(b.transform),q){var at=+L.cx,ft=+L.cy,yt=+L.rx||+L.r||0,Tt=+L.ry||+L.r||0;A.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",y((at-yt)*ct),y((ft-Tt)*ct),y((at+yt)*ct),y((ft+Tt)*ct),y(at*ct)),C._.dirty=1}if("clip-rect"in b){var wt=m(b["clip-rect"]).split(D);if(wt.length==4){wt[2]=+wt[2]+ +wt[0],wt[3]=+wt[3]+ +wt[1];var Et=A.clipRect||a._g.doc.createElement("div"),At=Et.style;At.clip=a.format("rect({1}px {2}px {3}px {0}px)",wt),A.clipRect||(At.position="absolute",At.top=0,At.left=0,At.width=C.paper.width+"px",At.height=C.paper.height+"px",A.parentNode.insertBefore(Et,A),Et.appendChild(A),A.clipRect=Et)}b["clip-rect"]||A.clipRect&&(A.clipRect.style.clip="auto")}if(C.textpath){var Mt=C.textpath.style;b.font&&(Mt.font=b.font),b["font-family"]&&(Mt.fontFamily='"'+b["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,O)+'"'),b["font-size"]&&(Mt.fontSize=b["font-size"]),b["font-weight"]&&(Mt.fontWeight=b["font-weight"]),b["font-style"]&&(Mt.fontStyle=b["font-style"])}if("arrow-start"in b&&Pt(z,b["arrow-start"]),"arrow-end"in b&&Pt(z,b["arrow-end"],1),b.opacity!=null||b.fill!=null||b.src!=null||b.stroke!=null||b["stroke-width"]!=null||b["stroke-opacity"]!=null||b["fill-opacity"]!=null||b["stroke-dasharray"]!=null||b["stroke-miterlimit"]!=null||b["stroke-linejoin"]!=null||b["stroke-linecap"]!=null){var mt=A.getElementsByTagName("fill");if(!(mt=mt&&mt[0])&&(mt=ut("fill")),C.type=="image"&&b.src&&(mt.src=b.src),b.fill&&(mt.on=!0),mt.on!=null&&b.fill!="none"&&b.fill!==null||(mt.on=!1),mt.on&&b.fill){var Nt=m(b.fill).match(a._ISURL);if(Nt){mt.parentNode==A&&A.removeChild(mt),mt.rotate=!0,mt.src=Nt[1],mt.type="tile";var It=C.getBBox(1);mt.position=It.x+R+It.y,C._.fillpos=[It.x,It.y],a._preload(Nt[1],function(){C._.fillsize=[this.offsetWidth,this.offsetHeight]})}else mt.color=a.getRGB(b.fill).hex,mt.src=O,mt.type="solid",a.getRGB(b.fill).error&&(z.type in{circle:1,ellipse:1}||m(b.fill).charAt()!="r")&&Dt(z,b.fill,mt)&&(L.fill="none",L.gradient=b.fill,mt.rotate=!1)}if("fill-opacity"in b||"opacity"in b){var Ut=((+L["fill-opacity"]+1||2)-1)*((+L.opacity+1||2)-1)*((+a.getRGB(b.fill).o+1||2)-1);Ut=k(w(Ut,0),1),mt.opacity=Ut,mt.src&&(mt.color="none")}A.appendChild(mt);var Rt=A.getElementsByTagName("stroke")&&A.getElementsByTagName("stroke")[0],Zt=!1;!Rt&&(Zt=Rt=ut("stroke")),(b.stroke&&b.stroke!="none"||b["stroke-width"]||b["stroke-opacity"]!=null||b["stroke-dasharray"]||b["stroke-miterlimit"]||b["stroke-linejoin"]||b["stroke-linecap"])&&(Rt.on=!0),(b.stroke=="none"||b.stroke===null||Rt.on==null||b.stroke==0||b["stroke-width"]==0)&&(Rt.on=!1);var Wt=a.getRGB(b.stroke);Rt.on&&b.stroke&&(Rt.color=Wt.hex),Ut=((+L["stroke-opacity"]+1||2)-1)*((+L.opacity+1||2)-1)*((+Wt.o+1||2)-1);var ge=.75*(g(b["stroke-width"])||1);if(Ut=k(w(Ut,0),1),b["stroke-width"]==null&&(ge=L["stroke-width"]),b["stroke-width"]&&(Rt.weight=ge),ge&&ge<1&&(Ut*=ge)&&(Rt.weight=1),Rt.opacity=Ut,b["stroke-linejoin"]&&(Rt.joinstyle=b["stroke-linejoin"]||"miter"),Rt.miterlimit=b["stroke-miterlimit"]||8,b["stroke-linecap"]&&(Rt.endcap=b["stroke-linecap"]=="butt"?"flat":b["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in b){var Ve={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Rt.dashstyle=Ve[h](b["stroke-dasharray"])?Ve[b["stroke-dasharray"]]:O}Zt&&A.appendChild(Rt)}if(z.type=="text"){z.paper.canvas.style.display=O;var de=z.paper.span,Ee=L.font&&L.font.match(/\d+(?:\.\d*)?(?=px)/);F=de.style,L.font&&(F.font=L.font),L["font-family"]&&(F.fontFamily=L["font-family"]),L["font-weight"]&&(F.fontWeight=L["font-weight"]),L["font-style"]&&(F.fontStyle=L["font-style"]),Ee=g(L["font-size"]||Ee&&Ee[0])||10,F.fontSize=100*Ee+"px",z.textpath.string&&(de.innerHTML=m(z.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var Pe=de.getBoundingClientRect();z.W=L.w=(Pe.right-Pe.left)/100,z.H=L.h=(Pe.bottom-Pe.top)/100,z.X=L.x,z.Y=L.y+z.H/2,("x"in b||"y"in b)&&(z.path.v=a.format("m{0},{1}l{2},{1}",y(L.x*ct),y(L.y*ct),y(L.x*ct)+1));for(var ve=["x","y","text","font","font-family","font-weight","font-style","font-size"],ye=0,pn=ve.length;ye<pn;ye++)if(ve[ye]in b){z._.dirty=1;break}switch(L["text-anchor"]){case"start":z.textpath.style["v-text-align"]="left",z.bbx=z.W/2;break;case"end":z.textpath.style["v-text-align"]="right",z.bbx=-z.W/2;break;default:z.textpath.style["v-text-align"]="center",z.bbx=0}z.textpath.style["v-text-kern"]=!0}},Dt=function(C,b,A){C.attrs=C.attrs||{},C.attrs;var L=Math.pow,F="linear",B=".5 .5";if(C.attrs.gradient=b,b=(b=m(b).replace(a._radial_gradient,function(yt,Tt,wt){return F="radial",Tt&&wt&&(Tt=g(Tt),wt=g(wt),L(Tt-.5,2)+L(wt-.5,2)>.25&&(wt=x.sqrt(.25-L(Tt-.5,2))*(2*(wt>.5)-1)+.5),B=Tt+R+wt),O})).split(/\s*\-\s*/),F=="linear"){var q=b.shift();if(q=-g(q),isNaN(q))return null}var z=a._parseDots(b);if(!z)return null;if(C=C.shape||C.node,z.length){C.removeChild(A),A.on=!0,A.method="none",A.color=z[0].color,A.color2=z[z.length-1].color;for(var J=[],at=0,ft=z.length;at<ft;at++)z[at].offset&&J.push(z[at].offset+R+z[at].color);A.colors=J.length?J.join():"0% "+A.color,F=="radial"?(A.type="gradientTitle",A.focus="100%",A.focussize="0 0",A.focusposition=B,A.angle=0):(A.type="gradient",A.angle=(270-q)%360),C.appendChild(A)}return 1},K=function(C,b){this[0]=this.node=C,C.raphael=!0,this.id=a._oid++,C.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},it=a.el;K.prototype=it,it.constructor=K,it.transform=function(C){if(C==null)return this._.transform;var b,A=this.paper._viewBoxShift,L=A?"s"+[A.scale,A.scale]+"-1-1t"+[A.dx,A.dy]:O;A&&(b=C=m(C).replace(/\.{3}|\u2026/g,this._.transform||O)),a._extractTransform(this,L+C);var F,B=this.matrix.clone(),q=this.skew,z=this.node,J=~m(this.attrs.fill).indexOf("-"),at=!m(this.attrs.fill).indexOf("url(");if(B.translate(1,1),at||J||this.type=="image")if(q.matrix="1 0 0 1",q.offset="0 0",F=B.split(),J&&F.noRotation||!F.isSimple){z.style.filter=B.toFilter();var ft=this.getBBox(),yt=this.getBBox(1),Tt=ft.x-yt.x,wt=ft.y-yt.y;z.coordorigin=Tt*-ct+R+wt*-ct,pt(this,1,1,Tt,wt,0)}else z.style.filter=O,pt(this,F.scalex,F.scaley,F.dx,F.dy,F.rotate);else z.style.filter=O,q.matrix=m(B),q.offset=B.offset();return b!==null&&(this._.transform=b,a._extractTransform(this,b)),this},it.rotate=function(C,b,A){if(this.removed)return this;if(C!=null){if((C=m(C).split(D)).length-1&&(b=g(C[1]),A=g(C[2])),C=g(C[0]),A==null&&(b=A),b==null||A==null){var L=this.getBBox(1);b=L.x+L.width/2,A=L.y+L.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",C,b,A]])),this}},it.translate=function(C,b){return this.removed?this:((C=m(C).split(D)).length-1&&(b=g(C[1])),C=g(C[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=C,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",C,b]])),this)},it.scale=function(C,b,A,L){if(this.removed)return this;if((C=m(C).split(D)).length-1&&(b=g(C[1]),A=g(C[2]),L=g(C[3]),isNaN(A)&&(A=null),isNaN(L)&&(L=null)),C=g(C[0]),b==null&&(b=C),L==null&&(A=L),A==null||L==null)var F=this.getBBox(1);return A=A??F.x+F.width/2,L=L??F.y+F.height/2,this.transform(this._.transform.concat([["s",C,b,A,L]])),this._.dirtyT=1,this},it.hide=function(){return!this.removed&&(this.node.style.display="none"),this},it.show=function(){return!this.removed&&(this.node.style.display=O),this},it.auxGetBBox=a.el.getBBox,it.getBBox=function(){var C=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var b={},A=1/this.paper._viewBoxShift.scale;return b.x=C.x-this.paper._viewBoxShift.dx,b.x*=A,b.y=C.y-this.paper._viewBoxShift.dy,b.y*=A,b.width=C.width*A,b.height=C.height*A,b.x2=b.x+b.width,b.y2=b.y+b.height,b}return C},it._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},it.remove=function(){if(!this.removed&&this.node.parentNode){for(var C in this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[C]=typeof this[C]=="function"?a._removedFactory(C):null;this.removed=!0}},it.attr=function(C,b){if(this.removed)return this;if(C==null){var A={};for(var L in this.attrs)this.attrs[h](L)&&(A[L]=this.attrs[L]);return A.gradient&&A.fill=="none"&&(A.fill=A.gradient)&&delete A.gradient,A.transform=this._.transform,A}if(b==null&&a.is(C,"string")){if(C=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var F=C.split(D),B={},q=0,z=F.length;q<z;q++)(C=F[q])in this.attrs?B[C]=this.attrs[C]:a.is(this.paper.customAttributes[C],"function")?B[C]=this.paper.customAttributes[C].def:B[C]=a._availableAttrs[C];return z-1?B:B[F[0]]}if(this.attrs&&b==null&&a.is(C,"array")){for(B={},q=0,z=C.length;q<z;q++)B[C[q]]=this.attr(C[q]);return B}var J;for(var at in b!=null&&((J={})[C]=b),b==null&&a.is(C,"object")&&(J=C),J)N("raphael.attr."+at+"."+this.id,this,J[at]);if(J){for(at in this.paper.customAttributes)if(this.paper.customAttributes[h](at)&&J[h](at)&&a.is(this.paper.customAttributes[at],"function")){var ft=this.paper.customAttributes[at].apply(this,[].concat(J[at]));for(var yt in this.attrs[at]=J[at],ft)ft[h](yt)&&(J[yt]=ft[yt])}J.text&&this.type=="text"&&(this.textpath.string=J.text),kt(this,J)}return this},it.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper),this},it.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper)),this)},it.insertAfter=function(C){return this.removed?this:(C.constructor==a.st.constructor&&(C=C[C.length-1]),C.node.nextSibling?C.node.parentNode.insertBefore(this.node,C.node.nextSibling):C.node.parentNode.appendChild(this.node),a._insertafter(this,C,this.paper),this)},it.insertBefore=function(C){return this.removed?this:(C.constructor==a.st.constructor&&(C=C[0]),C.node.parentNode.insertBefore(this.node,C.node),a._insertbefore(this,C,this.paper),this)},it.blur=function(C){var b=this.node.runtimeStyle,A=b.filter;return A=A.replace(nt,O),+C!=0?(this.attrs.blur=C,b.filter=A+R+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+C||1.5)+")",b.margin=a.format("-{0}px 0 0 -{0}px",y(+C||1.5))):(b.filter=A,b.margin=0,delete this.attrs.blur),this},a._engine.path=function(C,b){var A=ut("shape");A.style.cssText=ot,A.coordsize=ct+R+ct,A.coordorigin=b.coordorigin;var L=new K(A,b),F={fill:"none",stroke:"#000"};C&&(F.path=C),L.type="path",L.path=[],L.Path=O,kt(L,F),b.canvas&&b.canvas.appendChild(A);var B=ut("skew");return B.on=!0,A.appendChild(B),L.skew=B,L.transform(O),L},a._engine.rect=function(C,b,A,L,F,B){var q=a._rectPath(b,A,L,F,B),z=C.path(q),J=z.attrs;return z.X=J.x=b,z.Y=J.y=A,z.W=J.width=L,z.H=J.height=F,J.r=B,J.path=q,z.type="rect",z},a._engine.ellipse=function(C,b,A,L,F){var B=C.path();return B.attrs,B.X=b-L,B.Y=A-F,B.W=2*L,B.H=2*F,B.type="ellipse",kt(B,{cx:b,cy:A,rx:L,ry:F}),B},a._engine.circle=function(C,b,A,L){var F=C.path();return F.attrs,F.X=b-L,F.Y=A-L,F.W=F.H=2*L,F.type="circle",kt(F,{cx:b,cy:A,r:L}),F},a._engine.image=function(C,b,A,L,F,B){var q=a._rectPath(A,L,F,B),z=C.path(q).attr({stroke:"none"}),J=z.attrs,at=z.node,ft=at.getElementsByTagName("fill")[0];return J.src=b,z.X=J.x=A,z.Y=J.y=L,z.W=J.width=F,z.H=J.height=B,J.path=q,z.type="image",ft.parentNode==at&&at.removeChild(ft),ft.rotate=!0,ft.src=b,ft.type="tile",z._.fillpos=[A,L],z._.fillsize=[F,B],at.appendChild(ft),pt(z,1,1,0,0,0),z},a._engine.text=function(C,b,A,L){var F=ut("shape"),B=ut("path"),q=ut("textpath");b=b||0,A=A||0,L=L||"",B.v=a.format("m{0},{1}l{2},{1}",y(b*ct),y(A*ct),y(b*ct)+1),B.textpathok=!0,q.string=m(L),q.on=!0,F.style.cssText=ot,F.coordsize=ct+R+ct,F.coordorigin="0 0";var z=new K(F,C),J={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:L};z.shape=F,z.path=B,z.textpath=q,z.type="text",z.attrs.text=m(L),z.attrs.x=b,z.attrs.y=A,z.attrs.w=1,z.attrs.h=1,kt(z,J),F.appendChild(q),F.appendChild(B),C.canvas.appendChild(F);var at=ut("skew");return at.on=!0,F.appendChild(at),z.skew=at,z.transform(O),z},a._engine.setSize=function(C,b){var A=this.canvas.style;return this.width=C,this.height=b,C==+C&&(C+="px"),b==+b&&(b+="px"),A.width=C,A.height=b,A.clip="rect(0 "+C+" "+b+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox),this},a._engine.setViewBox=function(C,b,A,L,F){a.eve("raphael.setViewBox",this,this._viewBox,[C,b,A,L,F]);var B,q,z=this.getSize(),J=z.width,at=z.height;return F&&(A*(B=at/L)<J&&(C-=(J-A*B)/2/B),L*(q=J/A)<at&&(b-=(at-L*q)/2/q)),this._viewBox=[C,b,A,L,!!F],this._viewBoxShift={dx:-C,dy:-b,scale:z},this.forEach(function(ft){ft.transform("...")}),this},a._engine.initWin=function(C){var b=C.document;b.styleSheets.length<31?b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):b.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),ut=function(A){return b.createElement("<rvml:"+A+' class="rvml">')}}catch{ut=function(L){return b.createElement("<"+L+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var C=a._getContainer.apply(0,arguments),b=C.container,A=C.height,L=C.width,F=C.x,B=C.y;if(!b)throw new Error("VML container not found.");var q=new a._Paper,z=q.canvas=a._g.doc.createElement("div"),J=z.style;return F=F||0,B=B||0,L=L||512,A=A||342,q.width=L,q.height=A,L==+L&&(L+="px"),A==+A&&(A+="px"),q.coordsize=216e5+R+216e5,q.coordorigin="0 0",q.span=a._g.doc.createElement("span"),q.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",z.appendChild(q.span),J.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",L,A),b==1?(a._g.doc.body.appendChild(z),J.left=F+"px",J.top=B+"px",J.position="absolute"):b.firstChild?b.insertBefore(z,b.firstChild):b.appendChild(z),q.renderfix=function(){},q},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=O,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){for(var C in a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[C]=typeof this[C]=="function"?a._removedFactory(C):null;return!0};var st=a.st;for(var E in it)it[h](E)&&!st[h](E)&&(st[E]=function(C){return function(){var b=arguments;return this.forEach(function(A){A[C].apply(A,b)})}}(E))}}.apply(n,s))===void 0||(e.exports=o)}])})})(_s);var _o=_s.exports;const Yt=Ei(_o);class Ln{points;constructor(t=[]){this.points=t}toSVGPathData(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push([e===0?"M":"L",this.points[e].x,this.points[e].y]);return t}toSVGPathD(){let t="";for(let e=0,n=this.length;e<n;e++)t+=(e===0?"M":"L")+this.points[e].x+","+this.points[e].y;return t}get length(){return this.points.length}addPoint(t){this.points.push(t)}getPoint(t){return this.points[t]}isContainPoint(t){const e=t.x,n=t.y,r=this.length;let s=!1;const o=2e-10;for(let a=0,h=r-1;a<r;h=a,a++){const m=this.points[a].x,g=this.points[a].y,x=this.points[h].x,y=this.points[h].y;if(m===e&&g===n||x===e&&y===n||n===g&&n===y)return!0;if(n>=g&&n<y||n<g&&n>=y){const w=(x-m)/(y-g),k=m+w*(n-g);if(k===e||Math.abs(k-e)<o)return!0;k>e&&(s=!s)}}return s}[Symbol.iterator](){let t=0;return{next:()=>({value:t>=this.length-1?this.points[++t]:void 0,done:t>=this.length})}}static generateInMultiplePoint(t,e,n,r,s=1){const o=new Ln;for(let a=0;a<=s*n;a+=1){const h=Math.floor(a/s)/n*2*Math.PI,m=t+Math.cos(h)*r,g=e+Math.sin(h)*r;o.addPoint(new fe({x:m,y:g}))}return o}}Yt.easing_formulas.swing=function(i){return i+Math.sin(i*Math.PI*2)/2},Yt.easing_formulas.may_cause_seizures=function(i){return i+.2*Math.random()-.1};function Co(i,t,e){let n;return i&&typeof i=="object"&&i.canvas?n=i:i&&(typeof i=="string"||i instanceof HTMLElement)?n=Yt(i,t,e):n=Yt(0,0,t,e),n}Yt.fn.importSVG=function(i,t){const e=To.fromRawSVG(i);return e.toRaphael(this,(n,r)=>{e.save(),t&&t(n),r(),e.restore()}),this},Yt.fn.NPolygonPath=function(i,t,e,n,r=2){return{shape:this.path(Ln.generateInMultiplePoint(i,t,e,n,r).toSVGPathD()),afterPath:Ln.generateInMultiplePoint(i,t,e*r,n,1).toSVGPathD()}},Yt.fn.zoom=function(i=1){return this.setViewBox(0,0,this.width/i,this.height/i),this},Yt.fn.brickwall=function(i,t,e,n,r){for(var s=n/r,o=e/3,a={fill:"firebrick",stroke:"#CCC"},h=0;h<r;h+=1){var m=this.rect(0,0,o,s).attr(a),g=this.rect(0,0,2*o,s).attr(a);h%2?(m.transform("T"+i+","+(t+h*s)),g.transform("T"+(i+o)+","+(t+h*s))):(g.transform("T"+i+","+(t+h*s)),m.transform("T"+(i+2*o)+","+(t+h*s)))}},Yt.fn.rosetta=function(i,t,e,n,r){const s=Ze.generateRosetta(i,t,e,n,r);return s.center,this.path(s.toSVGPathD())},Yt.fn.moon=function(i){i=i||{},i.r=typeof i.r=="number"?i.r:100,i.phase=typeof i.phase=="number"?i.phase:.25,i.x=typeof i.x=="number"?i.x:0,i.y=typeof i.y=="number"?i.y:0,this.circle(i.r+i.x,i.r+i.y,i.r).attr({"stroke-width":0,fill:"#999"});function t(n){n=typeof n=="number"?n:.25,n=Math.max(0,Math.min(1,n)),n=(n-.5)*2;let r="M"+i.r+",0";r+="a"+i.r+","+i.r+" 0 0,0 0,"+i.r*2;let s=n>0?0:1;return n=Math.abs(n),n=n||1e-4,i.inner_r=i.r/Math.pow(n,.5),r+="M"+i.r+","+i.r*2,r+="a"+i.inner_r+","+i.inner_r+" 0 0,"+s+" 0,"+i.r*-2,r}var e=this.path(t(i.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+i.x+","+i.y);return{setPhase:function(n){e.attr("path",t(n))}}},Yt.fn.star=function(i,t,e){let n="M"+i+","+(t-e);for(var r=0;r<6;r+=1){const s=270+r*144,o=i+e*Math.cos(s*Math.PI/180),a=t+e*Math.sin(s*Math.PI/180);n+="L"+o+","+a}return this.path(n).attr("stroke-width",0).attr("fill","red")},Yt.fn.heart=function(i=150,t=300){let e="M"+i+","+t;return e+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(e).attr("stroke","red").attr("fill","pink")},Yt.el.redder=function(){const i=Yt.getRGB(this.attr("fill"));i.r+=51,this.attr("fill","rgb("+i.r+","+i.g+","+i.b+")")},Yt.installCustomAttributes=function(i){i.customAttributes.redness=function(t){const e=255*(1-t/100);return{fill:"rgb(255,"+e+", "+e+")"}},i.customAttributes.progress=function(t){const e=this.data("progresspath"),n=this.attr(),r={x:0,y:0},s=this.data("progresstrail");if(!e)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(n,"width")&&(r.x=-this.attr("width")/2,r.y=-this.attr("height")/2);const o=e.getTotalLength(),a=e.getPointAtLength(t*o);return s&&s.attr("path",e.getSubpath(0,t*o)),{transform:"t"+(a.x+r.x)+","+(a.y+r.y)+"r"+a.alpha}}};const Ki=Yt;class Fe{pgs=[];history=[];save(){this.history.push(yr(this.pgs))}restore(){const t=this.history.pop();t&&(this.pgs=t)}get size(){let t=0,e=0;return this.pgs.forEach(n=>{const r=n.pg;if(r){const[s,o,a,h]=r.bounds,[m,g]=r.size;t=Math.max(t,s,s+m,a),e=Math.max(e,o,o+g,h)}}),[Math.ceil(t),Math.ceil(e)]}static fromRawSVG(t){return Fe.fromRawSVGUseRappar(t)}static fromRawSVGUseRappar(t){const e=new Fe,n=ss(t);for(let r=0,s=n.length;r<s;r++){const o=n[r];if(o.type=="viewbox"&&o.width&&o.height)continue;const a={attrs:{}};for(const h in o)h==="type"||h==="path"||h==="transform"||(a.attrs[h]=o[h]);switch(o.type){case"path":a.d=o.path,a.pg=Ze.fromSVGPathD(o.path,o.transform);break}e.pgs.push(a)}return e}toRaphael(t,e){let n;t instanceof HTMLElement?n=Ki(HTMLElement):typeof t=="string"?n=Ki(document.getElementById(t)):n=t;const[r,s]=this.size;n.setSize(r,s);const o=(a=!1)=>{for(let h=0,m=this.pgs.length;h<m;h++){const g=this.pgs[h];if(g.pg&&(g.raphaelPath?g.raphaelPath.attr("path",g.pg.toSVGPathD()):g.raphaelPath=n.path(g.pg.toSVGPathD()),g.raphaelPath.attr(g.attrs)),a&&e){const x=y=>{const{x:w,y:k}=Hn(n.canvas,y),P=this.pgs.find(D=>D.raphaelPath?.isPointInside(w,k));P&&e?.(P,o)};g.raphaelPath?.unclick(x),g.raphaelPath?.click(x)}}};return o(!0),n}toCanvasOperation(t,e){let n;typeof t=="string"?n=document.getElementById(t):n=t;const[r,s]=this.size;n.width=r,n.height=s;const o=new Qi(n),a=()=>{o.clearRect(0,0,r,s);for(let m=0,g=this.pgs.length;m<g;m++){const x=this.pgs[m];x.pg&&(o.save(),this.toCanvasAttrs(o,x.attrs),x.pg.toCanvas(o),x.attrs.stroke!=="none"&&o.stroke(),x.attrs.fill!=="none"&&o.fill(),o.restore())}};a();const h=m=>{const{x:g,y:x}=Hn(o.canvas,m),y=this.pgs.find(w=>w.pg?.isPointInPath(g,x));y&&e?.(y,a)};return n.removeEventListener("click",h),n.addEventListener("click",h),o}toCanvasAttrs(t,e){for(const n in e){const r=e[n];switch(n){case"fill":t.fillStyle=String(r);break;case"stroke":t.strokeStyle=String(r);break;case"stroke-width":t.lineWidth=Number(r);break;case"stroke-linecap":t.lineCap=r;break;case"stroke-linejoin":t.lineJoin=r;break}}}static toDownloadSVGElement(t,e="shape"){Ai(Dr(t),`${e}.svg`)}toDownloadSVGElement(t,e="shape"){return Fe.toDownloadSVGElement(t,e),this}static toDownloadSVGString(t,e="shape"){Ai(ki(t),`${e}.svg`)}toDownloadSVGString(t,e="shape"){return Fe.toDownloadSVGString(t,e),this}static getSVGDOM(t){if(t instanceof HTMLObjectElement||t instanceof HTMLIFrameElement)return t.contentDocument;if(t instanceof HTMLEmbedElement)return t.getSVGDocument()}}const To=Fe;class Qi{canvas;context;customContext;constructor(t){this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this.customContext=new An({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(t){this.context.lineWidth=t,this.customContext.lineWidth=t}get lineWidth(){return this.context.lineWidth}set lineCap(t){this.context.lineCap=t,this.customContext.lineCap=t}get lineCap(){return this.context.lineCap}set lineJoin(t){this.context.lineJoin=t,this.customContext.lineCap=t}get lineJoin(){return this.context.lineJoin}set lineDashOffset(t){this.context.lineDashOffset=t,this.customContext.lineDashOffset=t}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(t){this.context.miterLimit=t,this.customContext.miterLimit=t}get miterLimit(){return this.context.miterLimit}set globalAlpha(t){this.context.globalAlpha=t,this.customContext.globalAlpha=t}get globalAlpha(){return this.context.globalAlpha}set fillStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.fillStyle=t,this.customContext.fillStyle=t):(this.context.fillStyle=t.gradient,this.customContext.fillStyle=t.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(t){typeof t=="string"||t instanceof CanvasGradient||t instanceof CanvasPattern?(this.context.strokeStyle=t,this.customContext.strokeStyle=t):(this.context.strokeStyle=t.gradient,this.customContext.strokeStyle=t.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(t){this.context.font=t,this.customContext.font=t}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(t,e,n,r){return this.context.fillRect(t,e,n,r),this.customContext.fillRect(t,e,n,r),this}fillText(t,e,n,r){return this.context.fillText(t,e,n,r),this.customContext.fillText(t,e,n),this}setLineDash(t){return this.context.setLineDash(t),this.customContext.setLineDash(t),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(t,e,n,r){return this.context.strokeText(t,e,n,r),this.customContext.strokeText(t,e,n),this}strokeRect(t,e,n,r){return this.context.strokeRect(t,e,n,r),this.customContext.strokeRect(t,e,n,r),this}clearRect(t=0,e=0,n=this.canvas.width,r=this.canvas.height){return this.context.clearRect(t,e,n,r),this.customContext.clearRect(t,e,n,r),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}isPointInPath(t,e){return this.context.isPointInPath(t,e)}moveTo(t,e){return this.context.moveTo(t,e),this.customContext.moveTo(t,e),this}lineTo(t,e){return this.context.lineTo(t,e),this.customContext.lineTo(t,e),this}arc(t,e,n,r,s,o){return this.context.arc(t,e,n,r,s,o),this.customContext.arc(t,e,n,r,s,o?-1:1),this}arcTo(t,e,n,r,s){return this.context.arcTo(t,e,n,r,s),this.customContext.arcTo(t,e,n,r,s),this}quadraticCurveTo(t,e,n,r){return this.context.quadraticCurveTo(t,e,n,r),this.customContext.quadraticCurveTo(t,e,n,r),this}bezierCurveTo(t,e,n,r,s,o){return this.context.bezierCurveTo(t,e,n,r,s,o),this.customContext.bezierCurveTo(t,e,n,r,s,o),this}rect(t,e,n,r){return this.context.rect(t,e,n,r),this.customContext.rect(t,e,n,r),this}translate(t,e){return this.context.translate(t,e),this.customContext.translate(t,e),this}rotate(t){return this.context.rotate(t),this.customContext.rotate(t),this}scale(t,e){return this.context.scale(t,e),this.customContext.scale(t,e),this}createLinearGradient(t,e,n,r,s){const o=this.context.createLinearGradient(t,e,n,r),a=this.customContext.createLinearGradient(t,e,n,r);return s&&Object.keys(s).forEach(h=>{const m=parseFloat(h);o.addColorStop(m,s[m]),a.addColorStop(m,s[m])}),{gradient:o,gradientCustom:a}}createRadialGradient(t,e,n,r,s,o,a){const h=this.context.createRadialGradient(t,e,n,r,s,o),m=this.customContext.createRadialGradient(t,e,n,r,s,o);return a&&Object.keys(a).forEach(g=>{const x=parseFloat(g);h.addColorStop(x,a[x]),m.addColorStop(x,a[x])}),{gradient:h,gradientCustom:m}}drawImage(t,...e){if(e.length===0)this.context.drawImage(t,0,0);else if(e.length===2){const n=e[0],r=e[1];this.context.drawImage(t,n,r)}else if(e.length===4){const n=e[0],r=e[1],s=e[2],o=e[3];this.context.drawImage(t,n,r,s,o)}else if(e.length===8){const n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],m=e[6],g=e[7];this.context.drawImage(t,n,r,s,o,a,h,m,g)}else throw new Error("Invalid number of arguments passed to drawImage: "+e.length);return this.customContext.drawImage(t,...e),this}getImageData(t,e,n,r,s){return this.context.getImageData(t,e,n,r,s)}putImageData(t,e=0,n=0){return this.context.putImageData(t,e,n)}toRawSVG(){const t=this.customContext.getSerializedSvg(!0),e=this.customContext.getSvg();return{raw:t,element:e}}toSVGOperation(){const{raw:t}=this.toRawSVG();return Fe.fromRawSVG(t)}}class Gt extends fa{container;mousePoint;ctx;hammer;domEventRemoveListeners=[];constructor(t=document.documentElement,e=!0){super(),this.container=t,this.hammer=new $a(this.container),this.mousePoint=new fe({x:0,y:0}),this.container instanceof HTMLCanvasElement&&(this.ctx=new Qi(this.container)),e&&this.start()}static singleton;static globalScrollChangeCallbacks=[];static get page(){if(!Gt.singleton){Gt.singleton=new Gt,Gt.singleton.registerKeyDown({title:"打开",key:"o",ctrl:!0,exact:!0},()=>{Rr().then(e=>Mi(e[0])).then(e=>{Gt.singleton.emit("openFile",e)}).catch(e=>{Gt.singleton.emit("openFileError",e)})}),Gt.singleton.registerMatchMediaChange("(prefers-color-scheme: dark)");const t=()=>Gt.globalScrollChangeCallbacks.forEach(e=>e());Gt.singleton.registerGlobalScrollChange=e=>{Gt.globalScrollChangeCallbacks.push(e),Gt.globalScrollChangeCallbacks.length==1&&document.addEventListener("scroll",t)},Gt.singleton.removeGlobalScrollChange=e=>{const n=Gt.globalScrollChangeCallbacks.findIndex(r=>r==e);n>=0&&(Gt.globalScrollChangeCallbacks.splice(n,1),Gt.globalScrollChangeCallbacks.length==0&&document.removeEventListener("scroll",t))}}return Gt.singleton}start(){this.initMouseEventListeners(),this.on("pointerMove",this.setMousePoint),this.addDOMEventRemoveListeners(()=>{this.off("pointerMove",this.setMousePoint)}),this.registerResizeObserver()}restart(){this.destroy(),this.start()}destroy(){this.domEventRemoveListeners.forEach(t=>t()),this.removeAllListeners()}addDOMEventRemoveListeners(t){this.domEventRemoveListeners.push(t)}setMousePoint(t){const e=Hn(this.container,t);return this.mousePoint.x=e.x,this.mousePoint.y=e.y,e}initMouseEventListeners(){const t=K=>{this.emit("mouseDown",K),this.container.style.userSelect="none"},e=K=>{this.emit("mouseUp",K),this.container.style.userSelect=""},n=K=>{this.emit("mouseMove",K)},r=K=>{this.emit("mouseOver",K)},s=K=>{this.emit("mouseOut",K),this.container.style.userSelect=""},o=K=>{this.emit("mouseClick",K)},a=K=>{this.emit("mouseDoubleClick",K)},h=K=>{this.emit("mouseWheel",K)},m=K=>{this.emit("mouseContextMenu",K)},g=K=>{this.emit("touchStart",K),this.container.style.userSelect="none"},x=K=>{this.emit("touchEnd",K),this.container.style.userSelect=""},y=K=>{this.emit("touchCancel",K),this.container.style.userSelect=""},w=K=>{this.emit("touchMove",K)},k=K=>{this.emit("pointerDown",K),this.container.style.userSelect="none"},P=K=>{this.emit("pointerUp",K),this.container.style.userSelect=""},D=K=>{this.emit("pointerCancel",K),this.container.style.userSelect=""},N=K=>{this.emit("pointerMove",K)},R=K=>{this.emit("pan",K)},O=K=>{this.emit("panStart",K),this.container.style.userSelect="none"},X=K=>{this.emit("panMove",K)},Y=K=>{this.emit("panEnd",K),this.container.style.userSelect=""},nt=K=>{this.emit("panCancel",K),this.container.style.userSelect=""},V=K=>{this.emit("panLeft",K)},ot=K=>{this.emit("panRight",K)},ct=K=>{this.emit("panUp",K),this.container.style.userSelect=""},vt=K=>{this.emit("panDown",K),this.container.style.userSelect="none"},dt=K=>{this.emit("pinch",K)},ht=K=>{this.emit("press",K)},pt=K=>{this.emit("rotate",K)},ut=K=>{this.emit("swipe",K)},Pt=K=>{this.emit("tap",K)},kt=K=>{!K.target||this.container==K.target||this.container.contains(K.target)||this.emit("tapOutSide",K)};this.container.addEventListener("mousedown",t),this.container.addEventListener("mouseup",e),this.container.addEventListener("mousemove",n),this.container.addEventListener("mouseover",r),this.container.addEventListener("mouseout",s),this.container.addEventListener("click",o),this.container.addEventListener("dblclick",a),this.container.addEventListener("wheel",h),this.container.addEventListener("contextmenu",m),this.container.addEventListener("touchstart",g),this.container.addEventListener("touchend",x),this.container.addEventListener("touchcancel",y),this.container.addEventListener("touchmove",w),this.container.addEventListener("pointerdown",k),this.container.addEventListener("pointerup",P),this.container.addEventListener("pointercancel",D),this.container.addEventListener("pointermove",N),this.hammer.on("pan",R),this.hammer.on("panstart",O),this.hammer.on("panmove",X),this.hammer.on("panend",Y),this.hammer.on("pancancel",nt),this.hammer.on("panleft",V),this.hammer.on("panright",ot),this.hammer.on("panup",ct),this.hammer.on("pandown",vt),this.hammer.on("pinch",dt),this.hammer.on("press",ht),this.hammer.on("rotate",pt),this.hammer.on("swipe",ut),this.hammer.on("tap",Pt),document.addEventListener("pointerdown",kt,!1);const Dt=()=>{this.container.removeEventListener("mousedown",t),this.container.removeEventListener("mouseup",e),this.container.removeEventListener("mousemove",n),this.container.removeEventListener("mouseover",r),this.container.removeEventListener("mouseout",s),this.container.removeEventListener("click",o),this.container.removeEventListener("dblclick",a),this.container.removeEventListener("wheel",h),this.container.removeEventListener("contextmenu",m),this.container.removeEventListener("touchstart",g),this.container.removeEventListener("touchend",x),this.container.removeEventListener("touchcancel",y),this.container.removeEventListener("touchmove",w),this.container.removeEventListener("pointerdown",k),this.container.removeEventListener("pointerup",P),this.container.removeEventListener("pointercancel",D),this.container.removeEventListener("pointermove",N),this.hammer.off("pan",R),this.hammer.off("panstart",O),this.hammer.off("panmove",X),this.hammer.off("panend",Y),this.hammer.off("pancancel",nt),this.hammer.off("panleft",V),this.hammer.off("panright",ot),this.hammer.off("panup",ct),this.hammer.off("pandown",vt),this.hammer.off("pinch",dt),this.hammer.off("press",ht),this.hammer.off("rotate",pt),this.hammer.off("swipe",ut),this.hammer.off("tap",Pt),document.removeEventListener("pointerdown",kt,!1),document.removeEventListener("touchstart",kt,!1),document.removeEventListener("mousedown",kt,!1)};return this.addDOMEventRemoveListeners(Dt),Dt}registerKeyDown(t,e,n){const r=Kr.on(t,o=>(e(o,r.formatedKeyNames,r.pause,r.restart),n)),s=()=>{r.removeListener?.()};return this.addDOMEventRemoveListeners(s),s}registerResizeObserver(){const t=new ResizeObserver(n=>{const{width:r,height:s}=n[0].contentRect;this.emit("resize",r,s)});t.observe(this.container);const e=()=>{t.unobserve(this.container)};return this.addDOMEventRemoveListeners(e),e}registerMatchMediaChange(t){let e="";switch(t){case"(prefers-color-scheme: dark)":e="matchMediaChangePrefersColorSchemeDark";break;default:e=t;break}const n=s=>{this.emit(e,s.matches)};window.matchMedia(t).addEventListener("change",n);const r=()=>{window.matchMedia(t).removeEventListener("change",n)};return this.addDOMEventRemoveListeners(r),r}registerElementDisplayInParentWhenScrollChange(t){const e={threshold:t?.threshold||.5,root:t?.parentElement},n=new IntersectionObserver((s,o)=>{let a=s[0];if(s.length>1){const m=s.find(g=>g.isIntersecting);m&&(a=m)}a.isIntersecting&&a.intersectionRatio>=e.threshold?this.emit("showInParent"):this.emit("showOffParent")},e);n.observe(this.container);const r=()=>{n.unobserve(this.container)};return this.addDOMEventRemoveListeners(r),r}registerPullDownRefresh(t){const e=t?.distance||50;let n=0,r=0;return this.captureMove({start:s=>{n=this.setMousePoint(s).y},move:()=>{r=this.mousePoint.y-n,r>0&&r<e&&this.emit("pullDownIng",r)},end:()=>{r>=e&&this.emit("pullDown")}})}registerPullUpLoading(t){const e=t?.distance||50;let n=0,r=0;return this.captureMove({start:s=>{n=this.setMousePoint(s).y},move:()=>{r=n-this.mousePoint.y,r>0&&r<e&&this.emit("pullUpIng",r)},end:()=>{r>=e&&this.emit("pullUp")}})}static isTouchEnabled(){return"ontouchstart"in window||navigator.maxTouchPoints>0}captureMove(t){return this.captureMoveUsePointer(t)}captureMoveUseMouse(t){const e=o=>{document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",n,!1),this.container.style.userSelect="none",t?.start?.(o)},n=o=>{document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",n,!1),this.container.style.userSelect="",t?.end?.(o)},r=o=>{t?.move?.(o)};this.on("mouseDown",e);const s=()=>{this.off("mouseDown",e)};return this.addDOMEventRemoveListeners(s),s}captureMoveUseTouch(t){const e=o=>{o.preventDefault(),t?.start?.(o)},n=o=>{t?.end?.(o)},r=o=>{t?.move?.(o)};this.on("touchStart",e),this.on("touchEnd",n),this.on("touchCancel",n),this.on("touchMove",r);const s=()=>{this.off("touchStart",e),this.off("touchEnd",n),this.off("touchCancel",n),this.off("touchMove",r)};return this.addDOMEventRemoveListeners(s),s}captureMoveUsePointer(t){const e=o=>{this.container.setPointerCapture(o.pointerId),this.container.style.userSelect="none",t?.start?.(o)},n=o=>{this.container.style.userSelect="",t?.end?.(o)},r=o=>{t?.move?.(o)};this.on("pointerDown",e),this.on("pointerUp",n),this.on("pointerCancel",n),this.on("pointerMove",r);const s=()=>{this.off("pointerDown",e),this.off("pointerUp",n),this.off("pointerCancel",n),this.off("pointerMove",r)};return this.addDOMEventRemoveListeners(s),s}drawMouseMoveLine(t,e){if(!this.ctx)return;let n=!1;switch(t){case"brush":const r=(e&&e.brushSize)??10,s=(e&&e.brushDensity)??50,o=(e&&e.brushColor)??"#000000",a=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height),h=a.data,m=ii(o);this.captureMove({start:()=>{n=!0},end:()=>{n=!1},move:()=>{if(n){for(let g=0;g<s;g++){const x=Math.random()*Math.PI*2,y=Math.random()*r,w=this.mousePoint.x+Math.cos(x)*y|0,k=this.mousePoint.y+Math.sin(x)*y|0,P=(w+k*a.width)*4;h[P]=m>>16&255,h[P+1]=m>>8&255,h[P+2]=m&255,h[P+3]=255}this.ctx.putImageData(a)}}});break;case"line":default:this.captureMove({start:g=>{n=!0,this.ctx.beginPath(),this.setMousePoint(g),this.ctx.moveTo(this.mousePoint.x,this.mousePoint.y)},end:()=>{n=!1,this.ctx.closePath()},move:()=>{n&&(this.ctx.lineTo(this.mousePoint.x,this.mousePoint.y),this.ctx.stroke())}})}}static getMouseButton(t){if(document.implementation.hasFeature("MouseEvents","2.0"))return t.button;switch(t.button){case 0:case 1:case 3:case 5:case 7:return 0;case 2:case 6:return 2;case 4:return 1}}}class St{static onDocumentReady(t){function e(){document.readyState!=="loading"&&(t(),document.removeEventListener("DOMContentLoaded",e))}typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}static onBeforeUnload(t){function e(){t(),document.removeEventListener("beforeunload",e)}typeof document<"u"&&document.addEventListener("beforeunload",e)}static getCSSVar(t){return getComputedStyle(document.documentElement).getPropertyValue(t)}static setCSSVar(t,e){document.documentElement.style.setProperty(t,e)}static scrollTo=(t,e)=>window.scrollTo(t,e);static setScrollRestoration(t){try{window.history.scrollRestoration=t}catch{}}static safeExec(t){const e=new Proxy(window,{get(n,r,s){if(typeof r=="string"&&["open","location","document"].includes(r))throw new Error(`禁止访问 key: ${r}`);return r==="window"?e:Reflect.get(n,r,s)},set(n,r,s,o){return Reflect.set(n,r,s,o)}});new Function("window",`with(window) { ${t} }`)(e,null)}static dom=new Proxy({},{get(t,e){return function(n={},...r){const s=document.createElement(e);for(const o of Object.keys(n))s.setAttribute(o,n[o]);for(const o of r)typeof o=="string"?s.appendChild(document.createTextNode(o)):s.appendChild(o);return s}}});static compileTemplate(t){return t=t.replace(/<%=(.+?)%>/g,"`); \n echo( $1 ); \n echo(`").replace(/<%([\s\S]+?)%>/g,"`); \n $1 \n echo(`"),t="echo(`"+t+"`);",`(function parse(data){
|
|
23
23
|
let output = "";
|
|
24
24
|
function echo(html){
|
|
25
25
|
output += html;
|
|
26
26
|
}
|
|
27
27
|
${t}
|
|
28
28
|
return output;
|
|
29
|
-
})`}static safeHtml(t,e="encode"){const i={"&":"&","<":"<",">":">",""":'"',"'":"'"};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t=t.replace(new RegExp(e=="decode"?r:i[r],"g"),e=="decode"?i[r]:r));return t}static loadScript(t,e=()=>{},i=(r,s,a,o,l)=>{}){const r=document.createElement("script");r.type="text/javascript",r.src=t,r.async=!1,document.body.appendChild(r),r.onload=e,r.onerror=i}static loadStyle(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.insertBefore(e,document.head.childNodes[document.head.childNodes.length-1].nextSibling)}static waitForStyleSheetsLoaded=()=>new Promise(t=>{const e=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let i=document.styleSheets.length??0;const r=()=>i>=e.length?(t(),!0):!1;r()||e.forEach(s=>{s.onload=()=>{i+=1,r()}})});static lazyloadImages(){const t=document.getElementsByTagName("img"),e=Wi().height;let i=0;return()=>{for(let r=i;r<t.length;r++)t[r].getBoundingClientRect().top<e&&(t[r].src=t[r].getAttribute("data-src")??"",i=r+1)}}static iframePostMessage(t,e="http://test.com/localstorage.html"){const i=document.createElement("iframe");i.src=e,document.body.append(i),setTimeout(function(){i.contentWindow?.postMessage(t,e)},4e3),setTimeout(function(){i.remove()},6e3)}static getTextWidth=(t,e,i=400)=>{const r=document.createElement("span");r.style.visibility="hidden",r.style.padding="0",r.style.whiteSpace="nowrap",r.style.overflow="visible",r.style.fontSize=e>12?e+"px":"12px",r.style.fontWeight=i.toString(),r.innerText=t,document.body.appendChild(r);const s=r.offsetWidth;return document.body.removeChild(r),s};static getFixedWidthText=(t,e,i=12,r=400,s=!0)=>{let a="",o="",l="";if(!t||e<i||typeof t!="string")return a;const c=t.split(""),u=document.createElement("span");u.style.visibility="hidden",u.style.padding="0",u.style.whiteSpace="nowrap",u.style.overflow="visible",u.style.fontSize=i>12?i+"px":"12px",u.style.fontWeight=r.toString(),document.body.appendChild(u);for(let g=0,p=c.length;g<p;g++){const d=c[g];if(o=l,l+=d,a=l,u.innerText=l,u.offsetWidth>e){s?a=o+"...":a=o;break}}return document.body.removeChild(u),a};static getLocation(){return new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(i=>{t(i.coords)}):e("Geolocation is not supported by this browser")})}static vibrate(t=200){"vibrate"in navigator?window.navigator.vibrate(t):console.error("Your device is not support vibrate on this browser.")}static copyToClipboard=t=>navigator.clipboard.writeText(t);static getSelectedText=()=>window.getSelection()?.toString();static siblings=t=>Array.prototype.slice.call(t.parentNode?.children).filter(e=>e!==t);static isElementFocus=t=>t===document.activeElement;static isTabInView=()=>!document.hidden;static navigateBack=()=>history.back();static navigateBack2=()=>history.go(-1);static addDebuggerOnBeforeUnload=()=>{window.addEventListener("beforeunload",()=>{debugger})}}function cr(n,t=document){return new jt(n,t)}class jt{context;nodes;prefixs=["moz","o","ms","webkit"];constructor(t,e=document){if(this.context=e,typeof t=="string"?this.nodes=Array.from(this.context.querySelectorAll(t)):t instanceof HTMLElement?this.nodes=[t]:this.nodes=t,this.nodes.length===0)throw new Error(`can not find ${t}`);this.each((i,r)=>{i instanceof HTMLInputElement&&i.addEventListener("change",s=>{this.changeRadioChecked(s.currentTarget.value)}),i instanceof HTMLSelectElement&&i.addEventListener("change",s=>{this.changeSelectSelected(s.currentTarget.value)})})}get(t){return t<0&&(t=this.nodes.length+t),this.nodes[t]}concat(t){return new jt(this.nodes.concat(t.nodes),this.context)}then(t){return t(this)??this}each(t){return this.nodes.forEach((e,i)=>{t(e,i)}),this}_save(t,e,i){t._mQuery||(t._mQuery={}),Array.isArray(i)?(t._mQuery[e]=t._mQuery[e]??[],t._mQuery[e].push(...i)):i!=null?t._mQuery[e]=i:delete t._mQuery[e]}on(t,e,i){return this.nodes.forEach(r=>{this._save(r,"events",[{event:t,callback:e,options:i}]),r.addEventListener(t,e,i)}),this}off(t,e,i){return this.nodes.forEach(r=>{r.removeEventListener(t,e,i)}),this}dispatchEvent(t,e){let i;const r=["click","dblclick","mousedown","mouseup","mousemove"],s=["keydown","keyup","keypress"];return typeof t=="string"?r.includes(t)?i=new MouseEvent(t,e):s.includes(t)?i=new KeyboardEvent(t,e):i=new Event(t,e):i=t,this.nodes.forEach(a=>{a.dispatchEvent(i)}),this}change(){return this.dispatchEvent("change")}click(){return this.dispatchEvent("click")}static hasEvent(t,e){return"on"+e in t}static _fragment(t){const e=document.createElement("template");return e.innerHTML=t,e.content.childNodes.forEach(i=>{const r=jt._scriptConvert(i);r!=i&&e.content.replaceChild(r,i)}),e.content}static _scriptConvert(t){const e=i=>{const s=i.ownerDocument.createElement("script");s.text=i.text;const a=i.attributes;for(let o=0;o<a.length;o++)s.setAttribute(a[o].name,a[o].value);return s};return t.tagName=="SCRIPT"&&(t=e(t)),t.querySelectorAll&&t.querySelectorAll("script").forEach(i=>{i.parentNode?.replaceChild(e(i),i)}),t}static _fixProp(t){const e={cellpadding:"cellPadding",cellspacing:"cellSpacing",class:"className",colspan:"colSpan",contenteditable:"contentEditable",for:"htmlFor",frameborder:"frameBorder",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return e[t]?e[t]:t}static isSVG(t){return(t||document.documentElement).nodeName.toLowerCase()==="svg"}static createElement(t){return jt.isSVG()?document.createElementNS.call(document,"http://www.w3.org/2000/svg",t):document.createElement.call(document,t)}static createTextNode(t){return document.createTextNode.call(document,t)}static createDocumentFragment(){return document.createDocumentFragment.call(document)}_insert(t,e){const i=this.nodes.length;if(i<1)return this;const r=[];if(typeof e=="string")this.nodes.forEach(s=>{const a=jt._fragment(e);r.push(...a.children),s[t](a)});else if(e instanceof HTMLElement)this.each(s=>{const a=i===1?e:jt._fragment(e.outerHTML);r.push(...i===1?[e]:a.children),s[t](a)}),i>1&&e.remove();else if(e instanceof jt){const s=i==1;e.each(a=>{this.each(o=>{const l=s?a:a.cloneNode(!0);r.push(l),o[t](l),jt._scriptConvert(l)})}),s||e.remove()}return t=="replaceWith"&&(this.nodes=r),this}append(t){return this._insert("append",t)}prepend(t){return this._insert("prepend",t)}after(t){return this._insert("after",t)}before(t){return this._insert("before",t)}replace(t){return this._insert("replaceWith",t)}remove(){return this.nodes.forEach(t=>{t.remove()}),this}static removeChild(t){t.parentElement?.removeChild(t)}find(t){const e=[];return this.nodes.forEach(i=>{e.push(...Array.from(i.querySelectorAll(t)))}),new jt(e,this.context)}filter(t){const e=[];return this.nodes.forEach(i=>{(i===t||typeof t=="string"&&i.matches&&i.matches(t))&&e.push(i)}),new jt(e,this.context)}next(){const t=[];return this.nodes.forEach(e=>{const i=e.nextElementSibling;i&&t.push(i)}),new jt(t,this.context)}prev(){const t=[];return this.nodes.forEach(e=>{const i=e.previousElementSibling;i&&t.push(i)}),new jt(t,this.context)}closest(t){const e=[];return this.nodes.forEach(i=>{const r=i.closest(t);r&&e.push(r)}),new jt(e,this.context)}shadow(t){const e=[];this.nodes.forEach(r=>{r.shadowRoot&&e.push(r.shadowRoot)});const i=new jt(e,this.context);return t!==void 0?i.find(t):i}parent(t){return this.parents(t,!0)}parents(t,e=!1){const i=[],r=a=>{if(i.indexOf(a)==-1&&i.push(a),!e&&a.parentElement)return r(a.parentElement)};this.nodes.forEach(a=>{a.parentElement&&r(a.parentElement)});const s=new jt(i,this.context);return t!==void 0?s.filter(t):s}static getComputedStyle(t,e,i){let r;const s=t.style.getPropertyPriority(e);return"getComputedStyle"in window?(r=getComputedStyle.call(window,t,i),r=r.getPropertyValue(e)):r=t.style.getPropertyValue(e),r+(s?"!"+s:"")}css(t,e){if((t===void 0||typeof t=="string")&&e===void 0){const i=this.nodes[0].style;if(typeof t=="string"){const r=i.getPropertyPriority(t),s=i.getPropertyValue(t).trim();return s?s+(r?"!"+r:""):jt.getComputedStyle(this.nodes[0],t)}else{const r=Object.fromEntries(this.nodes[0].style.cssText.split(";").filter(s=>!!s).map(s=>s.split(":").map(a=>a.trim())));return Object.assign(r,getComputedStyle.call(window,this.nodes[0])),r}}else{let i={};return typeof t=="string"&&e!==void 0?i[t]=e:typeof t=="object"&&(i=t),this.nodes.forEach(r=>{Object.keys(i).forEach(s=>{const a=String(i[s]).toLowerCase().includes("!important")?"important":"";r.style.setProperty(s,String(i[s]).replace(/!important/i,""),a)})}),this}}addClass(t){return this.toggleClass(t,!0)}removeClass(t){return this.toggleClass(t,!1)}toggleClass(t,e){const i=t.split(/[,\s]+/);return this.nodes.forEach(r=>{i.forEach(s=>{if(s.trim()!==""){let a="toggle";e!==void 0&&(a=e?"add":"remove"),r.classList[a](s.trim())}})}),this}hasClass(t){const e=t.split(/[,\s]+/);let i=!1;return this.nodes.forEach(r=>{i=i||e.every(s=>Array.from(r.classList??[]).includes(s.trim()))}),i}attr(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0].getAttribute(t);let i={};return typeof t=="object"?i=t:e!==void 0&&(i[t]=e),this.nodes.forEach(r=>{Object.entries(i).forEach(([s,a])=>{r.setAttribute(s,a)})}),this}removeAttr(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(i=>{e.forEach(r=>{i.removeAttribute(r)})}),this}prop(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0][t];{let i={};return typeof t=="object"?i=t:typeof t=="string"&&e!==void 0&&(i[t]=e),this.nodes.forEach(r=>{Object.entries(i).forEach(([s,a])=>{const o=jt._fixProp(s);r[o]=a,o=="innerHTML"&&jt._scriptConvert(r)})}),this}}removeProp(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(i=>{e.forEach(r=>{delete i[jt._fixProp(r)]})}),this}changeSelectSelected(t){this.nodes.forEach(e=>{if(e instanceof HTMLSelectElement){const i=e.options;for(let r=0,s=i.length;r<s;r++)i[r].value==t?i[r].selected=!0:i[r].selected=!1}})}changeRadioChecked(t){this.nodes.forEach(e=>{e instanceof HTMLInputElement&&(e.value==t?e.checked=!0:e.checked=!1)})}data(t,e){if(typeof t=="string"&&t.indexOf("-")!=-1)throw new Error(`Key "${t}" contains "-" (dash). Dashes are not allowed in property names. Use camelCase instead.`);if((typeof t=="string"||t===void 0)&&e===void 0){const i=Object.assign({},this.nodes[0].dataset);return Object.keys(i).forEach(r=>{if(i[r]?.startsWith("[")||i[r]?.startsWith("{"))try{i[r]=JSON.parse(i[r]??"")}catch{}}),typeof t=="string"?i[t]:i}else{let i={};return typeof t=="object"?i=t:typeof t=="string"&&(i[t]=e),this.nodes.forEach(r=>{Object.entries(i).forEach(([s,a])=>{a!=null?r.dataset[s]=a instanceof Object?JSON.stringify(a):a:delete r.dataset[s]})}),this}}removeData(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(i=>{e.forEach(r=>{delete i.dataset[r]})}),this}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}toggle(t){return this.nodes.forEach(e=>{const i=e.style.display,r=getComputedStyle(e).display,s=i=="none"||r=="none";if(s&&(t===void 0||t===!0)){const a=e instanceof HTMLTableRowElement?"table-row":e instanceof HTMLTableCellElement?"table-cell":"block";e.style.display=e._mQuery?.prevDisplay??(i==r&&r!="none"?"":a),this._save(e,"prevDisplay",null)}!s&&(t==null||t===!1)&&(r!="none"&&this._save(e,"prevDisplay",r),e.style.setProperty("display","none"))})}empty(){return this.html("")}html(t){return t instanceof HTMLElement?this.empty().append(t.innerHTML):this.prop("innerHTML",t)}text(t){return this.prop("textContent",t)}val(t){return this.prop("value",t)}}function ps(n,t){if(typeof t<"u")window.localStorage.setItem(n,t);else return window.localStorage.getItem(n)??void 0}function Nh(n,t,e){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3);const r="expires="+i.toUTCString();document.cookie=n+"="+t+"; "+r}function Bh(n){const t=n+"=",e=document.cookie.split(";");for(let i=0,r=e.length;i<r;i++){const s=e[i].trim();if(s.indexOf(t)==0)return s.substring(t.length,s.length)}return""}const Gh=()=>document.cookie.split(";").map(n=>n.split("=")).reduce((n,[t,e])=>(n[t.trim().replace('"',"")]=e,n),{}),Hh=()=>document.cookie.split(";").forEach(n=>document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`));class jh{static theme(t){return t=t||ps("theme"),typeof t>"u"&&(t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ps("theme",t),document.documentElement.classList.toggle("dark",t==="dark"),t}static has(t){return window.matchMedia(t).matches||!1}static on(t,e){window.matchMedia(t).addEventListener("change",e)}static off(t,e){window.matchMedia(t).removeEventListener("change",e)}}class Vh{static addEventListener(t,e,i){t.addEventListener(e,i,!1)}static removeEventListener(t,e,i){t.removeEventListener(e,i,!1)}static getTarget(t){return t.target||t.srcElement}}class Xh{static setPageVerticalScrollPercent(t,e="width"){const i=cr(t);i.css("transition","all linear 30ms");const{clientHeight:r}=qi(),{scrollTop:s,scrollHeight:a}=zn(),o=a-r,l=o<=0?0:s/o*100;i.css(e,l+"%")}static pullDownRefresh(t,e,i=50){let r=0,s=0;t.addEventListener("touchstart",function(a){r=a.touches[0].pageY,t.style.position="relative",t.style.transition="transform 0s"},!1),t.addEventListener("touchmove",function(a){s=a.touches[0].pageY-r,s>0&&s<i&&(t.style.transform="translateY("+s+"px)")},!1),t.addEventListener("touchend",function(a){t.style.transition="transform 0.5s ease 1s",t.style.transform="translateY(0px)",s>=i&&e()},!1)}static pullUpLoading(t,e=50){const{clientHeight:i}=qi(),{scrollTop:r,scrollHeight:s}=zn();r+i>=s-e&&t()}static scrollTo=(t={x:0,y:0})=>window.scrollTo(t.x,t.y)}const Yh={safeAreaTop:Pt.getCSSVar("--safe-area-inset-top"),safeAreaRight:Pt.getCSSVar("--safe-area-inset-right"),safeAreaBottom:Pt.getCSSVar("--safe-area-inset-bottom"),safeAreaLeft:Pt.getCSSVar("--safe-area-inset-left"),colorPrimary:Pt.getCSSVar("--color-primary"),colorRed:Pt.getCSSVar("--color-red"),colorOrange:Pt.getCSSVar("--color-orange"),colorYellow:Pt.getCSSVar("--color-yellow"),colorGreen:Pt.getCSSVar("--color-green"),colorBlue:Pt.getCSSVar("--color-blue"),colorPurple:Pt.getCSSVar("--color-purple"),colorBlack:Pt.getCSSVar("--color-black"),colorGray0:Pt.getCSSVar("--color-gray-0"),colorGray3:Pt.getCSSVar("--color-gray-3"),colorGray6:Pt.getCSSVar("--color-gray-6"),colorGray9:Pt.getCSSVar("--color-gray-9"),colorGrayCC:Pt.getCSSVar("--color-gray-cc"),colorGrayDD:Pt.getCSSVar("--color-gray-dd"),colorGrayE6:Pt.getCSSVar("--color-gray-e6"),colorGrayEE:Pt.getCSSVar("--color-gray-ee"),colorGrayEF:Pt.getCSSVar("--color-gray-ef"),colorGrayF5:Pt.getCSSVar("--color-gray-f5"),colorGrayFF:Pt.getCSSVar("--color-gray-ff"),fontLineHeight:Pt.getCSSVar("--font-line-height"),fontSize32:Pt.getCSSVar("--font-size-32"),fontSize24:Pt.getCSSVar("--font-size-24"),fontSize20:Pt.getCSSVar("--font-size-20"),fontSize18:Pt.getCSSVar("--font-size-18"),fontSize16:Pt.getCSSVar("--font-size-16"),fontSize14:Pt.getCSSVar("--font-size-14"),fontSize12:Pt.getCSSVar("--font-size-12"),fontSize11:Pt.getCSSVar("--font-size-11"),gap4:Pt.getCSSVar("--gap-4"),gap8:Pt.getCSSVar("--gap-8"),gap12:Pt.getCSSVar("--gap-12"),gap16:Pt.getCSSVar("--gap-16"),gap20:Pt.getCSSVar("--gap-20"),gap40:Pt.getCSSVar("--gap-40"),height44:Pt.getCSSVar("--height-44"),height32:Pt.getCSSVar("--height-32"),borderRadius:Pt.getCSSVar("--border-radius")},Zh=()=>Math.random()*16777215,$h=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,qh=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,hr=function(n){return n[0]==="#"&&(n=n.slice(1)),parseInt(n,16)},vo=function(n){let t="00000"+(n|0).toString(16);return t="#"+t.substring(t.length-6),t},_o=function(n,t=1){const e=n>>16&255,i=n>>8&255,r=n&255,s=t<0?0:t>1?1:t;return s===1?"rgb("+e+","+i+","+r+")":"rgba("+e+","+i+","+r+","+s+")"},gs=function(n,t=1){const e=hr(n);return _o(e,t)},Wh=n=>{const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(n);return e?"#"+((1<<24)+(parseInt(e[1])<<16)+(parseInt(e[2])<<8)+parseInt(e[3])).toString(16).slice(1):""};function Jh(n,t){let e=parseInt(n.substring(1,3),16),i=parseInt(n.substring(3,5),16),r=parseInt(n.substring(5,7),16);e==0&&(e=32),i==0&&(i=32),r==0&&(r=32),e=e*(100+t)/100,i=i*(100+t)/100,r=r*(100+t)/100,e=e<255?e:255,i=i<255?i:255,r=r<255?r:255,e=Math.round(e),i=Math.round(i),r=Math.round(r);const s=e.toString(16).length==1?"0"+e.toString(16):e.toString(16),a=i.toString(16).length==1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length==1?"0"+r.toString(16):r.toString(16);return"#"+s+a+o}function Kh(n,t,e,i){let r,s,a;n=n/360,t=t/100,e=e/100;const o=Math.floor(n*6),l=n*6-o,c=e*(1-t),u=e*(1-l*t),g=e*(1-(1-l)*t);switch(o%6){case 0:r=e,s=g,a=c;break;case 1:r=u,s=e,a=c;break;case 2:r=c,s=e,a=g;break;case 3:r=c,s=u,a=e;break;case 4:r=g,s=c,a=e;break;case 5:default:r=e,s=c,a=u;break}return{r:Math.round(r*255),g:Math.round(s*255),b:Math.round(a*255),a:i??1}}function Qh(n,t,e,i){const r=Math.max(n,t,e),s=Math.min(n,t,e),a=r-s,o=r===0?0:a/r,l=r/255;let c;switch(r){case s:c=0;break;case n:c=t-e+a*(t<e?6:0),c/=6*a;break;case t:c=e-n+a*2,c/=6*a;break;case e:default:c=n-t+a*4,c/=6*a;break}return{h:Math.round(c*360),s:Math.round(o*100),v:Math.round(l*100),a:i??1}}function tf(n){return btoa(encodeURIComponent(n)).replaceAll("+","*").replaceAll("/","-").replaceAll("=","")}function ef(n){let t=n.replaceAll("*","+").replaceAll("-","/");const e=t.length%4;return e&&(t=t.padEnd(t.length+(4-e),"=")),decodeURIComponent(atob(t))}function ms(n=window.location.href){return Br(URL)?new URL(n):wo(n)}function wo(n=window.location.href){const t="(?<protocol>https?:)",e="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",s="(?<hash>(?:#.*)?)",o=new RegExp(`^${t}//${e}${i}${r}${s}$`).exec(n);return{href:n,protocol:o?.groups?.protocol??"",host:o?.groups?.host??"",hostname:o?.groups?.hostname??"",port:o?.groups?.port??"",pathname:o?.groups?.pathname??"",search:o?.groups?.search??"",hash:o?.groups?.hash??""}}function nf(n){const t=ms(n);return t.protocol==="http:"||t.protocol==="https:"}function yo(n=window.location.href){const t=ms(n),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function rf(n=location.search){n=decodeURIComponent(n).replace(/^[#?&]/,"");const t={};if(!n)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let i=e.exec(n);for(;i;)t[i[1]]=i[2],i=e.exec(n);return t}function sf(n){return Array.from(new URLSearchParams(n)).reduce((t,[e,i])=>Object.assign({},t,{[e]:t[e]?(Array.isArray(t[e])?t[e]:[t[e]]).concat(i):i}),{})}function xo(n){let t="";for(const e in n)t&&(t+="&"),t+=`${e}=${n[e]}`;return t}function af(n){return new URLSearchParams(n).toString()}function vs(n){return"?"+[...n.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function fr(n,t){return n.indexOf("?")>=0?n+t.replace(/^\?/,"&"):n.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function of(n){let t="";new MutationObserver(function(i){window.location.href!==t&&(t=window.location.href,n&&n(location.href))}).observe(document,{attributes:!0,childList:!0,subtree:!0})}function lf(n){window.addEventListener("hashchange",()=>{n(location.hash)})}function cf(n){window.addEventListener("popstate",n,!1)}function hf(n){let t=null;if(Ga)try{t=new Worker(URL.createObjectURL(new Blob([n])))}catch(e){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),null}return t}var bo={exports:{}};(function(n){var t={};n.exports=t,t.parse=function(e,i){for(var r=t.bin.readUshort,s=t.bin.readUint,c=0,a={},o=new Uint8Array(e),l=o.length-4;s(o,l)!=101010256;)l--;var c=l;c+=4,c+=4;var u=r(o,c);c+=2,r(o,c),c+=2;var g=s(o,c);c+=4;var p=s(o,c);c+=4,c=p;for(var d=0;d<u;d++){s(o,c),c+=4,c+=4,c+=4,c+=4,s(o,c),c+=4;var g=s(o,c);c+=4;var y=s(o,c);c+=4;var x=r(o,c),C=r(o,c+2),A=r(o,c+4);c+=6,c+=8;var P=s(o,c);c+=4,c+=x+C+A,t._readLocal(o,P,a,g,y,i)}return a},t._readLocal=function(e,i,r,s,a,o){var l=t.bin.readUshort,c=t.bin.readUint;c(e,i),i+=4,l(e,i),i+=2,l(e,i),i+=2;var u=l(e,i);i+=2,c(e,i),i+=4,c(e,i),i+=4,i+=8;var g=l(e,i);i+=2;var p=l(e,i);i+=2;var d=t.bin.readUTF8(e,i,g);if(i+=g,i+=p,o){r[d]={size:a,csize:s};return}var y=new Uint8Array(e.buffer,i);if(u==0)r[d]=new Uint8Array(y.buffer.slice(i,i+s));else if(u==8){var x=new Uint8Array(a);t.inflateRaw(y,x),r[d]=x}else throw"unknown compression method: "+u},t.inflateRaw=function(e,i){return t.F.inflate(e,i)},t.inflate=function(e,i){return e[0],e[1],t.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),i)},t.deflate=function(e,i){i==null&&(i={level:6});var r=0,s=new Uint8Array(50+Math.floor(e.length*1.1));s[r]=120,s[r+1]=156,r+=2,r=t.F.deflateRaw(e,s,r,i.level);var a=t.adler(e,0,e.length);return s[r+0]=a>>>24&255,s[r+1]=a>>>16&255,s[r+2]=a>>>8&255,s[r+3]=a>>>0&255,new Uint8Array(s.buffer,0,r+4)},t.deflateRaw=function(e,i){i==null&&(i={level:6});var r=new Uint8Array(50+Math.floor(e.length*1.1)),s=t.F.deflateRaw(e,r,s,i.level);return new Uint8Array(r.buffer,0,s)},t.encode=function(e,i){i==null&&(i=!1);var r=0,s=t.bin.writeUint,a=t.bin.writeUshort,o={};for(var l in e){var c=!t._noNeed(l)&&!i,u=e[l],g=t.crc.crc(u,0,u.length);o[l]={cpr:c,usize:u.length,crc:g,file:c?t.deflateRaw(u):u}}for(var l in o)r+=o[l].file.length+30+46+2*t.bin.sizeUTF8(l);r+=22;var p=new Uint8Array(r),d=0,y=[];for(var l in o){var x=o[l];y.push(d),d=t._writeHeader(p,d,l,x,0)}var C=0,A=d;for(var l in o){var x=o[l];y.push(d),d=t._writeHeader(p,d,l,x,1,y[C++])}var P=d-A;return s(p,d,101010256),d+=4,d+=4,a(p,d,C),d+=2,a(p,d,C),d+=2,s(p,d,P),d+=4,s(p,d,A),d+=4,d+=2,p.buffer},t._noNeed=function(e){var i=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(i)!=-1},t._writeHeader=function(e,i,r,s,a,o){var l=t.bin.writeUint,c=t.bin.writeUshort,u=s.file;l(e,i,a==0?67324752:33639248),i+=4,a==1&&(i+=2),c(e,i,20),i+=2,c(e,i,0),i+=2,c(e,i,s.cpr?8:0),i+=2,l(e,i,0),i+=4,l(e,i,s.crc),i+=4,l(e,i,u.length),i+=4,l(e,i,s.usize),i+=4,c(e,i,t.bin.sizeUTF8(r)),i+=2,c(e,i,0),i+=2,a==1&&(i+=2,i+=2,i+=6,l(e,i,o),i+=4);var g=t.bin.writeUTF8(e,i,r);return i+=g,a==0&&(e.set(u,i),i+=u.length),i},t.crc={table:function(){for(var e=new Uint32Array(256),i=0;i<256;i++){for(var r=i,s=0;s<8;s++)r&1?r=3988292384^r>>>1:r=r>>>1;e[i]=r}return e}(),update:function(e,i,r,s){for(var a=0;a<s;a++)e=t.crc.table[(e^i[r+a])&255]^e>>>8;return e},crc:function(e,i,r){return t.crc.update(4294967295,e,i,r)^4294967295}},t.adler=function(e,i,r){for(var s=1,a=0,o=i,l=i+r;o<l;){for(var c=Math.min(o+5552,l);o<c;)s+=e[o++],a+=s;s=s%65521,a=a%65521}return a<<16|s},t.bin={readUshort:function(e,i){return e[i]|e[i+1]<<8},writeUshort:function(e,i,r){e[i]=r&255,e[i+1]=r>>8&255},readUint:function(e,i){return e[i+3]*16777216+(e[i+2]<<16|e[i+1]<<8|e[i])},writeUint:function(e,i,r){e[i]=r&255,e[i+1]=r>>8&255,e[i+2]=r>>16&255,e[i+3]=r>>24&255},readASCII:function(e,i,r){for(var s="",a=0;a<r;a++)s+=String.fromCharCode(e[i+a]);return s},writeASCII:function(e,i,r){for(var s=0;s<r.length;s++)e[i+s]=r.charCodeAt(s)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,i,r){for(var s="",a,o=0;o<r;o++)s+="%"+t.bin.pad(e[i+o].toString(16));try{a=decodeURIComponent(s)}catch{return t.bin.readASCII(e,i,r)}return a},writeUTF8:function(e,i,r){for(var s=r.length,a=0,o=0;o<s;o++){var l=r.charCodeAt(o);if(!(l&4294967168))e[i+a]=l,a++;else if(!(l&4294965248))e[i+a]=192|l>>6,e[i+a+1]=128|l>>0&63,a+=2;else if(!(l&4294901760))e[i+a]=224|l>>12,e[i+a+1]=128|l>>6&63,e[i+a+2]=128|l>>0&63,a+=3;else if(!(l&4292870144))e[i+a]=240|l>>18,e[i+a+1]=128|l>>12&63,e[i+a+2]=128|l>>6&63,e[i+a+3]=128|l>>0&63,a+=4;else throw"e"}return a},sizeUTF8:function(e){for(var i=e.length,r=0,s=0;s<i;s++){var a=e.charCodeAt(s);if(!(a&4294967168))r++;else if(!(a&4294965248))r+=2;else if(!(a&4294901760))r+=3;else if(!(a&4292870144))r+=4;else throw"e"}return r}},t.F={},t.F.deflateRaw=function(e,i,r,s){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=a[s],l=t.F.U,c=t.F._goodIndex;t.F._hash;var u=t.F._putsE,g=0,p=r<<3,d=0,y=e.length;if(s==0){for(;g<y;){var x=Math.min(65535,y-g);u(i,p,g+x==y?1:0),p=t.F._copyExact(e,g,x,i,p+8),g+=x}return p>>>3}var C=l.lits,A=l.strt,P=l.prev,M=0,D=0,z=0,N=0,F=0,G=0;for(y>2&&(G=t.F._hash(e,0),A[G]=0),g=0;g<y;g++){if(F=G,g+1<y-2){G=t.F._hash(e,g+1);var H=g+1&32767;P[H]=A[G],A[G]=H}if(d<=g){(M>14e3||D>26697)&&y-g>100&&(d<g&&(C[M]=g-d,M+=2,d=g),p=t.F._writeBlock(g==y-1||d==y?1:0,C,M,N,e,z,g-z,i,p),M=D=N=0,z=g);var Z=0;g<y-2&&(Z=t.F._bestMatch(e,g,P,F,Math.min(o[2],y-g),o[3]));var x=Z>>>16,X=Z&65535;if(Z!=0){var x=Z>>>16,X=Z&65535,J=c(x,l.of0);l.lhst[257+J]++;var dt=c(X,l.df0);l.dhst[dt]++,N+=l.exb[J]+l.dxb[dt],C[M]=x<<23|g-d,C[M+1]=X<<16|J<<8|dt,M+=2,d=g+x}else l.lhst[e[g]]++;D++}}for((z!=g||e.length==0)&&(d<g&&(C[M]=g-d,M+=2,d=g),p=t.F._writeBlock(1,C,M,N,e,z,g-z,i,p),M=0,D=0,M=D=N=0,z=g);p&7;)p++;return p>>>3},t.F._bestMatch=function(e,i,r,s,a,o){var l=i&32767,c=r[l],u=l-c+32768&32767;if(c==l||s!=t.F._hash(e,i-u))return 0;for(var g=0,p=0,d=Math.min(32767,i);u<=d&&--o!=0&&c!=l;){if(g==0||e[i+g]==e[i+g-u]){var y=t.F._howLong(e,i,u);if(y>g){if(g=y,p=u,g>=a)break;u+2<y&&(y=u+2);for(var x=0,C=0;C<y-2;C++){var A=i-u+C+32768&32767,P=r[A],M=A-P+32768&32767;M>x&&(x=M,c=A)}}}l=c,c=r[l],u+=l-c+32768&32767}return g<<16|p},t.F._howLong=function(e,i,r){if(e[i]!=e[i-r]||e[i+1]!=e[i+1-r]||e[i+2]!=e[i+2-r])return 0;var s=i,a=Math.min(e.length,i+258);for(i+=3;i<a&&e[i]==e[i-r];)i++;return i-s},t.F._hash=function(e,i){return(e[i]<<8|e[i+1])+(e[i+2]<<4)&65535},t.saved=0,t.F._writeBlock=function(e,i,r,s,a,o,l,c,u){var g=t.F.U,p=t.F._putsF,d=t.F._putsE,y,x,C,A,P,M,D,z,N;g.lhst[256]++,y=t.F.getTrees(),x=y[0],C=y[1],A=y[2],P=y[3],M=y[4],D=y[5],z=y[6],N=y[7];var F=(u+3&7?8-(u+3&7):0)+32+(l<<3),G=s+t.F.contSize(g.fltree,g.lhst)+t.F.contSize(g.fdtree,g.dhst),H=s+t.F.contSize(g.ltree,g.lhst)+t.F.contSize(g.dtree,g.dhst);H+=14+3*D+t.F.contSize(g.itree,g.ihst)+(g.ihst[16]*2+g.ihst[17]*3+g.ihst[18]*7);for(var Z=0;Z<286;Z++)g.lhst[Z]=0;for(var Z=0;Z<30;Z++)g.dhst[Z]=0;for(var Z=0;Z<19;Z++)g.ihst[Z]=0;var X=F<G&&F<H?0:G<H?1:2;if(p(c,u,e),p(c,u+1,X),u+=3,X==0){for(;u&7;)u++;u=t.F._copyExact(a,o,l,c,u)}else{var J,dt;if(X==1&&(J=g.fltree,dt=g.fdtree),X==2){t.F.makeCodes(g.ltree,x),t.F.revCodes(g.ltree,x),t.F.makeCodes(g.dtree,C),t.F.revCodes(g.dtree,C),t.F.makeCodes(g.itree,A),t.F.revCodes(g.itree,A),J=g.ltree,dt=g.dtree,d(c,u,P-257),u+=5,d(c,u,M-1),u+=5,d(c,u,D-4),u+=4;for(var ft=0;ft<D;ft++)d(c,u+ft*3,g.itree[(g.ordr[ft]<<1)+1]);u+=3*D,u=t.F._codeTiny(z,g.itree,c,u),u=t.F._codeTiny(N,g.itree,c,u)}for(var gt=o,kt=0;kt<r;kt+=2){for(var St=i[kt],tt=St>>>23,st=gt+(St&(1<<23)-1);gt<st;)u=t.F._writeLit(a[gt++],J,c,u);if(tt!=0){var ht=i[kt+1],L=ht>>16,k=ht>>8&255,E=ht&255;u=t.F._writeLit(257+k,J,c,u),d(c,u,tt-g.of0[k]),u+=g.exb[k],u=t.F._writeLit(E,dt,c,u),p(c,u,L-g.df0[E]),u+=g.dxb[E],gt+=tt}}u=t.F._writeLit(256,J,c,u)}return u},t.F._copyExact=function(e,i,r,s,a){var o=a>>>3;return s[o]=r,s[o+1]=r>>>8,s[o+2]=255-s[o],s[o+3]=255-s[o+1],o+=4,s.set(new Uint8Array(e.buffer,i,r),o),a+(r+4<<3)},t.F.getTrees=function(){for(var e=t.F.U,i=t.F._hufTree(e.lhst,e.ltree,15),r=t.F._hufTree(e.dhst,e.dtree,15),s=[],a=t.F._lenCodes(e.ltree,s),o=[],l=t.F._lenCodes(e.dtree,o),c=0;c<s.length;c+=2)e.ihst[s[c]]++;for(var c=0;c<o.length;c+=2)e.ihst[o[c]]++;for(var u=t.F._hufTree(e.ihst,e.itree,7),g=19;g>4&&e.itree[(e.ordr[g-1]<<1)+1]==0;)g--;return[i,r,u,a,l,g,s,o]},t.F.getSecond=function(e){for(var i=[],r=0;r<e.length;r+=2)i.push(e[r+1]);return i},t.F.nonZero=function(e){for(var i="",r=0;r<e.length;r+=2)e[r+1]!=0&&(i+=(r>>1)+",");return i},t.F.contSize=function(e,i){for(var r=0,s=0;s<i.length;s++)r+=i[s]*e[(s<<1)+1];return r},t.F._codeTiny=function(e,i,r,s){for(var a=0;a<e.length;a+=2){var o=e[a],l=e[a+1];s=t.F._writeLit(o,i,r,s);var c=o==16?2:o==17?3:7;o>15&&(t.F._putsE(r,s,l,c),s+=c)}return s},t.F._lenCodes=function(e,i){for(var r=e.length;r!=2&&e[r-1]==0;)r-=2;for(var s=0;s<r;s+=2){var a=e[s+1],o=s+3<r?e[s+3]:-1,l=s+5<r?e[s+5]:-1,c=s==0?-1:e[s-1];if(a==0&&o==a&&l==a){for(var u=s+5;u+2<r&&e[u+2]==a;)u+=2;var g=Math.min(u+1-s>>>1,138);g<11?i.push(17,g-3):i.push(18,g-11),s+=g*2-2}else if(a==c&&o==a&&l==a){for(var u=s+5;u+2<r&&e[u+2]==a;)u+=2;var g=Math.min(u+1-s>>>1,6);i.push(16,g-3),s+=g*2-2}else i.push(a,0)}return r>>>1},t.F._hufTree=function(e,i,r){var s=[],a=e.length,o=i.length,l=0;for(l=0;l<o;l+=2)i[l]=0,i[l+1]=0;for(l=0;l<a;l++)e[l]!=0&&s.push({lit:l,f:e[l]});var c=s.length,u=s.slice(0);if(c==0)return 0;if(c==1){var g=s[0].lit,u=g==0?1:0;return i[(g<<1)+1]=1,i[(u<<1)+1]=1,1}s.sort(function(P,M){return P.f-M.f});var p=s[0],d=s[1],y=0,x=1,C=2;for(s[0]={lit:-1,f:p.f+d.f,l:p,r:d,d:0};x!=c-1;)y!=x&&(C==c||s[y].f<s[C].f)?p=s[y++]:p=s[C++],y!=x&&(C==c||s[y].f<s[C].f)?d=s[y++]:d=s[C++],s[x++]={lit:-1,f:p.f+d.f,l:p,r:d};var A=t.F.setDepth(s[x-1],0);for(A>r&&(t.F.restrictDepth(u,r,A),A=r),l=0;l<c;l++)i[(u[l].lit<<1)+1]=u[l].d;return A},t.F.setDepth=function(e,i){return e.lit!=-1?(e.d=i,i):Math.max(t.F.setDepth(e.l,i+1),t.F.setDepth(e.r,i+1))},t.F.restrictDepth=function(e,i,r){var s=0,a=1<<r-i,o=0;for(e.sort(function(c,u){return u.d==c.d?c.f-u.f:u.d-c.d}),s=0;s<e.length&&e[s].d>i;s++){var l=e[s].d;e[s].d=i,o+=a-(1<<r-l)}for(o=o>>>r-i;o>0;){var l=e[s].d;l<i?(e[s].d++,o-=1<<i-l-1):s++}for(;s>=0;s--)e[s].d==i&&o<0&&(e[s].d--,o++);o!=0&&console.log("debt left")},t.F._goodIndex=function(e,i){var r=0;return i[r|16]<=e&&(r|=16),i[r|8]<=e&&(r|=8),i[r|4]<=e&&(r|=4),i[r|2]<=e&&(r|=2),i[r|1]<=e&&(r|=1),r},t.F._writeLit=function(e,i,r,s){return t.F._putsF(r,s,i[e<<1]),s+i[(e<<1)+1]},t.F.inflate=function(e,i){var r=Uint8Array;if(e[0]==3&&e[1]==0)return i||new r(0);var s=t.F,a=s._bitsF,o=s._bitsE,l=s._decodeTiny,c=s.makeCodes,u=s.codes2map,g=s._get17,p=s.U,d=i==null;d&&(i=new r(e.length>>>2<<3));for(var y=0,x=0,C=0,A=0,P=0,M=0,D=0,z=0,N=0,F,G;y==0;){if(y=a(e,N,1),x=a(e,N+1,2),N+=3,x==0){N&7&&(N+=8-(N&7));var H=(N>>>3)+4,Z=e[H-4]|e[H-3]<<8;d&&(i=t.F._check(i,z+Z)),i.set(new r(e.buffer,e.byteOffset+H,Z),z),N=H+Z<<3,z+=Z;continue}if(d&&(i=t.F._check(i,z+131072)),x==1&&(F=p.flmap,G=p.fdmap,M=511,D=31),x==2){C=o(e,N,5)+257,A=o(e,N+5,5)+1,P=o(e,N+10,4)+4,N+=14;for(var X=0;X<38;X+=2)p.itree[X]=0,p.itree[X+1]=0;for(var J=1,X=0;X<P;X++){var dt=o(e,N+X*3,3);p.itree[(p.ordr[X]<<1)+1]=dt,dt>J&&(J=dt)}N+=3*P,c(p.itree,J),u(p.itree,J,p.imap),F=p.lmap,G=p.dmap,N=l(p.imap,(1<<J)-1,C+A,e,N,p.ttree);var ft=s._copyOut(p.ttree,0,C,p.ltree);M=(1<<ft)-1;var gt=s._copyOut(p.ttree,C,A,p.dtree);D=(1<<gt)-1,c(p.ltree,ft),u(p.ltree,ft,F),c(p.dtree,gt),u(p.dtree,gt,G)}for(;;){var kt=F[g(e,N)&M];N+=kt&15;var St=kt>>>4;if(!(St>>>8))i[z++]=St;else{if(St==256)break;var tt=z+St-254;if(St>264){var st=p.ldef[St-257];tt=z+(st>>>3)+o(e,N,st&7),N+=st&7}var ht=G[g(e,N)&D];N+=ht&15;var L=ht>>>4,k=p.ddef[L],E=(k>>>4)+a(e,N,k&15);for(N+=k&15,d&&(i=t.F._check(i,z+131072));z<tt;)i[z]=i[z++-E],i[z]=i[z++-E],i[z]=i[z++-E],i[z]=i[z++-E];z=tt}}}return i.length==z?i:i.slice(0,z)},t.F._check=function(e,i){var r=e.length;if(i<=r)return e;var s=new Uint8Array(Math.max(r<<1,i));return s.set(e,0),s},t.F._decodeTiny=function(e,i,r,s,a,o){for(var l=t.F._bitsE,c=t.F._get17,u=0;u<r;){var g=e[c(s,a)&i];a+=g&15;var p=g>>>4;if(p<=15)o[u]=p,u++;else{var d=0,y=0;p==16?(y=3+l(s,a,2),a+=2,d=o[u-1]):p==17?(y=3+l(s,a,3),a+=3):p==18&&(y=11+l(s,a,7),a+=7);for(var x=u+y;u<x;)o[u]=d,u++}}return a},t.F._copyOut=function(e,i,r,s){for(var a=0,o=0,l=s.length>>>1;o<r;){var c=e[o+i];s[o<<1]=0,s[(o<<1)+1]=c,c>a&&(a=c),o++}for(;o<l;)s[o<<1]=0,s[(o<<1)+1]=0,o++;return a},t.F.makeCodes=function(e,i){for(var r=t.F.U,s=e.length,a,o,l,c,u,g=r.bl_count,c=0;c<=i;c++)g[c]=0;for(c=1;c<s;c+=2)g[e[c]]++;var p=r.next_code;for(a=0,g[0]=0,o=1;o<=i;o++)a=a+g[o-1]<<1,p[o]=a;for(l=0;l<s;l+=2)u=e[l+1],u!=0&&(e[l]=p[u],p[u]++)},t.F.codes2map=function(e,i,r){for(var s=e.length,a=t.F.U,o=a.rev15,l=0;l<s;l+=2)if(e[l+1]!=0)for(var c=l>>1,u=e[l+1],g=c<<4|u,p=i-u,d=e[l]<<p,y=d+(1<<p);d!=y;){var x=o[d]>>>15-i;r[x]=g,d++}},t.F.revCodes=function(e,i){for(var r=t.F.U.rev15,s=15-i,a=0;a<e.length;a+=2){var o=e[a]<<i-e[a+1];e[a]=r[o]>>>s}},t.F._putsE=function(e,i,r){r=r<<(i&7);var s=i>>>3;e[s]|=r,e[s+1]|=r>>>8},t.F._putsF=function(e,i,r){r=r<<(i&7);var s=i>>>3;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},t.F._bitsE=function(e,i,r){return(e[i>>>3]|e[(i>>>3)+1]<<8)>>>(i&7)&(1<<r)-1},t.F._bitsF=function(e,i,r){return(e[i>>>3]|e[(i>>>3)+1]<<8|e[(i>>>3)+2]<<16)>>>(i&7)&(1<<r)-1},t.F._get17=function(e,i){return(e[i>>>3]|e[(i>>>3)+1]<<8|e[(i>>>3)+2]<<16)>>>(i&7)},t.F._get25=function(e,i){return(e[i>>>3]|e[(i>>>3)+1]<<8|e[(i>>>3)+2]<<16|e[(i>>>3)+3]<<24)>>>(i&7)},t.F.U=function(){var e=Uint16Array,i=Uint32Array;return{next_code:new e(16),bl_count:new e(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new e(32),df0:[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,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i(32),flmap:new e(512),fltree:[],fdmap:new e(32),fdtree:[],lmap:new e(32768),ltree:[],ttree:[],dmap:new e(32768),dtree:[],imap:new e(512),itree:[],rev15:new e(32768),lhst:new i(286),dhst:new i(30),ihst:new i(19),lits:new i(15e3),strt:new e(65536),prev:new e(32768)}}(),function(){for(var e=t.F.U,i=32768,r=0;r<i;r++){var s=r;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,e.rev15[r]=(s>>>16|s<<16)>>>17}function a(o,l,c){for(;l--!=0;)o.push(0,c)}for(var r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];a(e.fltree,144,8),a(e.fltree,112,9),a(e.fltree,24,7),a(e.fltree,8,8),t.F.makeCodes(e.fltree,9),t.F.codes2map(e.fltree,9,e.flmap),t.F.revCodes(e.fltree,9),a(e.fdtree,32,5),t.F.makeCodes(e.fdtree,5),t.F.codes2map(e.fdtree,5,e.fdmap),t.F.revCodes(e.fdtree,5),a(e.itree,19,0),a(e.ltree,286,0),a(e.dtree,30,0),a(e.ttree,320,0)}()})(bo);var ff=bo.exports;const To=Yi(ff);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const uf=4,Co=0,Eo=1,df=2;function Gn(n){let t=n.length;for(;--t>=0;)n[t]=0}const pf=0,ko=1,gf=2,mf=3,vf=258,_s=29,vi=256,_i=vi+1+_s,Hn=30,ws=19,So=2*_i+1,xn=15,ys=16,_f=7,xs=256,Ao=16,Po=17,Io=18,bs=new Uint8Array([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]),ur=new Uint8Array([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]),wf=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Mo=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yf=512,Be=new Array((_i+2)*2);Gn(Be);const wi=new Array(Hn*2);Gn(wi);const yi=new Array(yf);Gn(yi);const xi=new Array(vf-mf+1);Gn(xi);const Ts=new Array(_s);Gn(Ts);const dr=new Array(Hn);Gn(dr);function Cs(n,t,e,i,r){this.static_tree=n,this.extra_bits=t,this.extra_base=e,this.elems=i,this.max_length=r,this.has_stree=n&&n.length}let Lo,Do,Ro;function Es(n,t){this.dyn_tree=n,this.max_code=0,this.stat_desc=t}const Oo=n=>n<256?yi[n]:yi[256+(n>>>7)],bi=(n,t)=>{n.pending_buf[n.pending++]=t&255,n.pending_buf[n.pending++]=t>>>8&255},re=(n,t,e)=>{n.bi_valid>ys-e?(n.bi_buf|=t<<n.bi_valid&65535,bi(n,n.bi_buf),n.bi_buf=t>>ys-n.bi_valid,n.bi_valid+=e-ys):(n.bi_buf|=t<<n.bi_valid&65535,n.bi_valid+=e)},Se=(n,t,e)=>{re(n,e[t*2],e[t*2+1])},Fo=(n,t)=>{let e=0;do e|=n&1,n>>>=1,e<<=1;while(--t>0);return e>>>1},xf=n=>{n.bi_valid===16?(bi(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)},bf=(n,t)=>{const e=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,s=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,u,g,p,d,y,x=0;for(p=0;p<=xn;p++)n.bl_count[p]=0;for(e[n.heap[n.heap_max]*2+1]=0,c=n.heap_max+1;c<So;c++)u=n.heap[c],p=e[e[u*2+1]*2+1]+1,p>l&&(p=l,x++),e[u*2+1]=p,!(u>i)&&(n.bl_count[p]++,d=0,u>=o&&(d=a[u-o]),y=e[u*2],n.opt_len+=y*(p+d),s&&(n.static_len+=y*(r[u*2+1]+d)));if(x!==0){do{for(p=l-1;n.bl_count[p]===0;)p--;n.bl_count[p]--,n.bl_count[p+1]+=2,n.bl_count[l]--,x-=2}while(x>0);for(p=l;p!==0;p--)for(u=n.bl_count[p];u!==0;)g=n.heap[--c],!(g>i)&&(e[g*2+1]!==p&&(n.opt_len+=(p-e[g*2+1])*e[g*2],e[g*2+1]=p),u--)}},zo=(n,t,e)=>{const i=new Array(xn+1);let r=0,s,a;for(s=1;s<=xn;s++)r=r+e[s-1]<<1,i[s]=r;for(a=0;a<=t;a++){let o=n[a*2+1];o!==0&&(n[a*2]=Fo(i[o]++,o))}},Tf=()=>{let n,t,e,i,r;const s=new Array(xn+1);for(e=0,i=0;i<_s-1;i++)for(Ts[i]=e,n=0;n<1<<bs[i];n++)xi[e++]=i;for(xi[e-1]=i,r=0,i=0;i<16;i++)for(dr[i]=r,n=0;n<1<<ur[i];n++)yi[r++]=i;for(r>>=7;i<Hn;i++)for(dr[i]=r<<7,n=0;n<1<<ur[i]-7;n++)yi[256+r++]=i;for(t=0;t<=xn;t++)s[t]=0;for(n=0;n<=143;)Be[n*2+1]=8,n++,s[8]++;for(;n<=255;)Be[n*2+1]=9,n++,s[9]++;for(;n<=279;)Be[n*2+1]=7,n++,s[7]++;for(;n<=287;)Be[n*2+1]=8,n++,s[8]++;for(zo(Be,_i+1,s),n=0;n<Hn;n++)wi[n*2+1]=5,wi[n*2]=Fo(n,5);Lo=new Cs(Be,bs,vi+1,_i,xn),Do=new Cs(wi,ur,0,Hn,xn),Ro=new Cs(new Array(0),wf,0,ws,_f)},Uo=n=>{let t;for(t=0;t<_i;t++)n.dyn_ltree[t*2]=0;for(t=0;t<Hn;t++)n.dyn_dtree[t*2]=0;for(t=0;t<ws;t++)n.bl_tree[t*2]=0;n.dyn_ltree[xs*2]=1,n.opt_len=n.static_len=0,n.sym_next=n.matches=0},No=n=>{n.bi_valid>8?bi(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0},Bo=(n,t,e,i)=>{const r=t*2,s=e*2;return n[r]<n[s]||n[r]===n[s]&&i[t]<=i[e]},ks=(n,t,e)=>{const i=n.heap[e];let r=e<<1;for(;r<=n.heap_len&&(r<n.heap_len&&Bo(t,n.heap[r+1],n.heap[r],n.depth)&&r++,!Bo(t,i,n.heap[r],n.depth));)n.heap[e]=n.heap[r],e=r,r<<=1;n.heap[e]=i},Go=(n,t,e)=>{let i,r,s=0,a,o;if(n.sym_next!==0)do i=n.pending_buf[n.sym_buf+s++]&255,i+=(n.pending_buf[n.sym_buf+s++]&255)<<8,r=n.pending_buf[n.sym_buf+s++],i===0?Se(n,r,t):(a=xi[r],Se(n,a+vi+1,t),o=bs[a],o!==0&&(r-=Ts[a],re(n,r,o)),i--,a=Oo(i),Se(n,a,e),o=ur[a],o!==0&&(i-=dr[a],re(n,i,o)));while(s<n.sym_next);Se(n,xs,t)},Ss=(n,t)=>{const e=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,s=t.stat_desc.elems;let a,o,l=-1,c;for(n.heap_len=0,n.heap_max=So,a=0;a<s;a++)e[a*2]!==0?(n.heap[++n.heap_len]=l=a,n.depth[a]=0):e[a*2+1]=0;for(;n.heap_len<2;)c=n.heap[++n.heap_len]=l<2?++l:0,e[c*2]=1,n.depth[c]=0,n.opt_len--,r&&(n.static_len-=i[c*2+1]);for(t.max_code=l,a=n.heap_len>>1;a>=1;a--)ks(n,e,a);c=s;do a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],ks(n,e,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,e[c*2]=e[a*2]+e[o*2],n.depth[c]=(n.depth[a]>=n.depth[o]?n.depth[a]:n.depth[o])+1,e[a*2+1]=e[o*2+1]=c,n.heap[1]=c++,ks(n,e,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],bf(n,t),zo(e,l,n.bl_count)},Ho=(n,t,e)=>{let i,r=-1,s,a=t[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),t[(e+1)*2+1]=65535,i=0;i<=e;i++)s=a,a=t[(i+1)*2+1],!(++o<l&&s===a)&&(o<c?n.bl_tree[s*2]+=o:s!==0?(s!==r&&n.bl_tree[s*2]++,n.bl_tree[Ao*2]++):o<=10?n.bl_tree[Po*2]++:n.bl_tree[Io*2]++,o=0,r=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4))},jo=(n,t,e)=>{let i,r=-1,s,a=t[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),i=0;i<=e;i++)if(s=a,a=t[(i+1)*2+1],!(++o<l&&s===a)){if(o<c)do Se(n,s,n.bl_tree);while(--o!==0);else s!==0?(s!==r&&(Se(n,s,n.bl_tree),o--),Se(n,Ao,n.bl_tree),re(n,o-3,2)):o<=10?(Se(n,Po,n.bl_tree),re(n,o-3,3)):(Se(n,Io,n.bl_tree),re(n,o-11,7));o=0,r=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4)}},Cf=n=>{let t;for(Ho(n,n.dyn_ltree,n.l_desc.max_code),Ho(n,n.dyn_dtree,n.d_desc.max_code),Ss(n,n.bl_desc),t=ws-1;t>=3&&n.bl_tree[Mo[t]*2+1]===0;t--);return n.opt_len+=3*(t+1)+5+5+4,t},Ef=(n,t,e,i)=>{let r;for(re(n,t-257,5),re(n,e-1,5),re(n,i-4,4),r=0;r<i;r++)re(n,n.bl_tree[Mo[r]*2+1],3);jo(n,n.dyn_ltree,t-1),jo(n,n.dyn_dtree,e-1)},kf=n=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&n.dyn_ltree[e*2]!==0)return Co;if(n.dyn_ltree[9*2]!==0||n.dyn_ltree[10*2]!==0||n.dyn_ltree[13*2]!==0)return Eo;for(e=32;e<vi;e++)if(n.dyn_ltree[e*2]!==0)return Eo;return Co};let Vo=!1;const Sf=n=>{Vo||(Tf(),Vo=!0),n.l_desc=new Es(n.dyn_ltree,Lo),n.d_desc=new Es(n.dyn_dtree,Do),n.bl_desc=new Es(n.bl_tree,Ro),n.bi_buf=0,n.bi_valid=0,Uo(n)},Xo=(n,t,e,i)=>{re(n,(pf<<1)+(i?1:0),3),No(n),bi(n,e),bi(n,~e),e&&n.pending_buf.set(n.window.subarray(t,t+e),n.pending),n.pending+=e},Af=n=>{re(n,ko<<1,3),Se(n,xs,Be),xf(n)},Pf=(n,t,e,i)=>{let r,s,a=0;n.level>0?(n.strm.data_type===df&&(n.strm.data_type=kf(n)),Ss(n,n.l_desc),Ss(n,n.d_desc),a=Cf(n),r=n.opt_len+3+7>>>3,s=n.static_len+3+7>>>3,s<=r&&(r=s)):r=s=e+5,e+4<=r&&t!==-1?Xo(n,t,e,i):n.strategy===uf||s===r?(re(n,(ko<<1)+(i?1:0),3),Go(n,Be,wi)):(re(n,(gf<<1)+(i?1:0),3),Ef(n,n.l_desc.max_code+1,n.d_desc.max_code+1,a+1),Go(n,n.dyn_ltree,n.dyn_dtree)),Uo(n),i&&No(n)},If=(n,t,e)=>(n.pending_buf[n.sym_buf+n.sym_next++]=t,n.pending_buf[n.sym_buf+n.sym_next++]=t>>8,n.pending_buf[n.sym_buf+n.sym_next++]=e,t===0?n.dyn_ltree[e*2]++:(n.matches++,t--,n.dyn_ltree[(xi[e]+vi+1)*2]++,n.dyn_dtree[Oo(t)*2]++),n.sym_next===n.sym_end);var Mf=Sf,Lf=Xo,Df=Pf,Rf=If,Of=Af,Ff={_tr_init:Mf,_tr_stored_block:Lf,_tr_flush_block:Df,_tr_tally:Rf,_tr_align:Of},Ti=(n,t,e,i)=>{let r=n&65535|0,s=n>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do r=r+t[i++]|0,s=s+r|0;while(--a);r%=65521,s%=65521}return r|s<<16|0};const zf=()=>{let n,t=[];for(var e=0;e<256;e++){n=e;for(var i=0;i<8;i++)n=n&1?3988292384^n>>>1:n>>>1;t[e]=n}return t},Uf=new Uint32Array(zf());var Yt=(n,t,e,i)=>{const r=Uf,s=i+e;n^=-1;for(let a=i;a<s;a++)n=n>>>8^r[(n^t[a])&255];return n^-1},bn={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"},Tn={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_MEM_ERROR:-4,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};const{_tr_init:Nf,_tr_stored_block:As,_tr_flush_block:Bf,_tr_tally:rn,_tr_align:Gf}=Ff,{Z_NO_FLUSH:sn,Z_PARTIAL_FLUSH:Hf,Z_FULL_FLUSH:jf,Z_FINISH:me,Z_BLOCK:Yo,Z_OK:qt,Z_STREAM_END:Zo,Z_STREAM_ERROR:Ae,Z_DATA_ERROR:Vf,Z_BUF_ERROR:Ps,Z_DEFAULT_COMPRESSION:Xf,Z_FILTERED:Yf,Z_HUFFMAN_ONLY:pr,Z_RLE:Zf,Z_FIXED:$f,Z_DEFAULT_STRATEGY:qf,Z_UNKNOWN:Wf,Z_DEFLATED:gr}=Tn,Jf=9,Kf=15,Qf=8,tu=29,Is=256+1+tu,eu=30,nu=19,iu=2*Is+1,ru=15,Lt=3,an=258,Pe=an+Lt+1,su=32,jn=42,Ms=57,Ls=69,Ds=73,Rs=91,Os=103,Cn=113,Ci=666,ne=1,Vn=2,En=3,Xn=4,au=3,kn=(n,t)=>(n.msg=bn[t],t),$o=n=>n*2-(n>4?9:0),on=n=>{let t=n.length;for(;--t>=0;)n[t]=0},ou=n=>{let t,e,i,r=n.w_size;t=n.hash_size,i=t;do e=n.head[--i],n.head[i]=e>=r?e-r:0;while(--t);t=r,i=t;do e=n.prev[--i],n.prev[i]=e>=r?e-r:0;while(--t)};let ln=(n,t,e)=>(t<<n.hash_shift^e)&n.hash_mask;const he=n=>{const t=n.state;let e=t.pending;e>n.avail_out&&(e=n.avail_out),e!==0&&(n.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),n.next_out),n.next_out+=e,t.pending_out+=e,n.total_out+=e,n.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},fe=(n,t)=>{Bf(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,t),n.block_start=n.strstart,he(n.strm)},Ft=(n,t)=>{n.pending_buf[n.pending++]=t},Ei=(n,t)=>{n.pending_buf[n.pending++]=t>>>8&255,n.pending_buf[n.pending++]=t&255},Fs=(n,t,e,i)=>{let r=n.avail_in;return r>i&&(r=i),r===0?0:(n.avail_in-=r,t.set(n.input.subarray(n.next_in,n.next_in+r),e),n.state.wrap===1?n.adler=Ti(n.adler,t,r,e):n.state.wrap===2&&(n.adler=Yt(n.adler,t,r,e)),n.next_in+=r,n.total_in+=r,r)},qo=(n,t)=>{let e=n.max_chain_length,i=n.strstart,r,s,a=n.prev_length,o=n.nice_match;const l=n.strstart>n.w_size-Pe?n.strstart-(n.w_size-Pe):0,c=n.window,u=n.w_mask,g=n.prev,p=n.strstart+an;let d=c[i+a-1],y=c[i+a];n.prev_length>=n.good_match&&(e>>=2),o>n.lookahead&&(o=n.lookahead);do if(r=t,!(c[r+a]!==y||c[r+a-1]!==d||c[r]!==c[i]||c[++r]!==c[i+1])){i+=2,r++;do;while(c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&c[++i]===c[++r]&&i<p);if(s=an-(p-i),i=p-an,s>a){if(n.match_start=t,a=s,s>=o)break;d=c[i+a-1],y=c[i+a]}}while((t=g[t&u])>l&&--e!==0);return a<=n.lookahead?a:n.lookahead},Yn=n=>{const t=n.w_size;let e,i,r;do{if(i=n.window_size-n.lookahead-n.strstart,n.strstart>=t+(t-Pe)&&(n.window.set(n.window.subarray(t,t+t-i),0),n.match_start-=t,n.strstart-=t,n.block_start-=t,n.insert>n.strstart&&(n.insert=n.strstart),ou(n),i+=t),n.strm.avail_in===0)break;if(e=Fs(n.strm,n.window,n.strstart+n.lookahead,i),n.lookahead+=e,n.lookahead+n.insert>=Lt)for(r=n.strstart-n.insert,n.ins_h=n.window[r],n.ins_h=ln(n,n.ins_h,n.window[r+1]);n.insert&&(n.ins_h=ln(n,n.ins_h,n.window[r+Lt-1]),n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,n.insert--,!(n.lookahead+n.insert<Lt)););}while(n.lookahead<Pe&&n.strm.avail_in!==0)},Wo=(n,t)=>{let e=n.pending_buf_size-5>n.w_size?n.w_size:n.pending_buf_size-5,i,r,s,a=0,o=n.strm.avail_in;do{if(i=65535,s=n.bi_valid+42>>3,n.strm.avail_out<s||(s=n.strm.avail_out-s,r=n.strstart-n.block_start,i>r+n.strm.avail_in&&(i=r+n.strm.avail_in),i>s&&(i=s),i<e&&(i===0&&t!==me||t===sn||i!==r+n.strm.avail_in)))break;a=t===me&&i===r+n.strm.avail_in?1:0,As(n,0,0,a),n.pending_buf[n.pending-4]=i,n.pending_buf[n.pending-3]=i>>8,n.pending_buf[n.pending-2]=~i,n.pending_buf[n.pending-1]=~i>>8,he(n.strm),r&&(r>i&&(r=i),n.strm.output.set(n.window.subarray(n.block_start,n.block_start+r),n.strm.next_out),n.strm.next_out+=r,n.strm.avail_out-=r,n.strm.total_out+=r,n.block_start+=r,i-=r),i&&(Fs(n.strm,n.strm.output,n.strm.next_out,i),n.strm.next_out+=i,n.strm.avail_out-=i,n.strm.total_out+=i)}while(a===0);return o-=n.strm.avail_in,o&&(o>=n.w_size?(n.matches=2,n.window.set(n.strm.input.subarray(n.strm.next_in-n.w_size,n.strm.next_in),0),n.strstart=n.w_size,n.insert=n.strstart):(n.window_size-n.strstart<=o&&(n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,n.insert>n.strstart&&(n.insert=n.strstart)),n.window.set(n.strm.input.subarray(n.strm.next_in-o,n.strm.next_in),n.strstart),n.strstart+=o,n.insert+=o>n.w_size-n.insert?n.w_size-n.insert:o),n.block_start=n.strstart),n.high_water<n.strstart&&(n.high_water=n.strstart),a?Xn:t!==sn&&t!==me&&n.strm.avail_in===0&&n.strstart===n.block_start?Vn:(s=n.window_size-n.strstart,n.strm.avail_in>s&&n.block_start>=n.w_size&&(n.block_start-=n.w_size,n.strstart-=n.w_size,n.window.set(n.window.subarray(n.w_size,n.w_size+n.strstart),0),n.matches<2&&n.matches++,s+=n.w_size,n.insert>n.strstart&&(n.insert=n.strstart)),s>n.strm.avail_in&&(s=n.strm.avail_in),s&&(Fs(n.strm,n.window,n.strstart,s),n.strstart+=s,n.insert+=s>n.w_size-n.insert?n.w_size-n.insert:s),n.high_water<n.strstart&&(n.high_water=n.strstart),s=n.bi_valid+42>>3,s=n.pending_buf_size-s>65535?65535:n.pending_buf_size-s,e=s>n.w_size?n.w_size:s,r=n.strstart-n.block_start,(r>=e||(r||t===me)&&t!==sn&&n.strm.avail_in===0&&r<=s)&&(i=r>s?s:r,a=t===me&&n.strm.avail_in===0&&i===r?1:0,As(n,n.block_start,i,a),n.block_start+=i,he(n.strm)),a?En:ne)},zs=(n,t)=>{let e,i;for(;;){if(n.lookahead<Pe){if(Yn(n),n.lookahead<Pe&&t===sn)return ne;if(n.lookahead===0)break}if(e=0,n.lookahead>=Lt&&(n.ins_h=ln(n,n.ins_h,n.window[n.strstart+Lt-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),e!==0&&n.strstart-e<=n.w_size-Pe&&(n.match_length=qo(n,e)),n.match_length>=Lt)if(i=rn(n,n.strstart-n.match_start,n.match_length-Lt),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=Lt){n.match_length--;do n.strstart++,n.ins_h=ln(n,n.ins_h,n.window[n.strstart+Lt-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart;while(--n.match_length!==0);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=ln(n,n.ins_h,n.window[n.strstart+1]);else i=rn(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(i&&(fe(n,!1),n.strm.avail_out===0))return ne}return n.insert=n.strstart<Lt-1?n.strstart:Lt-1,t===me?(fe(n,!0),n.strm.avail_out===0?En:Xn):n.sym_next&&(fe(n,!1),n.strm.avail_out===0)?ne:Vn},Zn=(n,t)=>{let e,i,r;for(;;){if(n.lookahead<Pe){if(Yn(n),n.lookahead<Pe&&t===sn)return ne;if(n.lookahead===0)break}if(e=0,n.lookahead>=Lt&&(n.ins_h=ln(n,n.ins_h,n.window[n.strstart+Lt-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=Lt-1,e!==0&&n.prev_length<n.max_lazy_match&&n.strstart-e<=n.w_size-Pe&&(n.match_length=qo(n,e),n.match_length<=5&&(n.strategy===Yf||n.match_length===Lt&&n.strstart-n.match_start>4096)&&(n.match_length=Lt-1)),n.prev_length>=Lt&&n.match_length<=n.prev_length){r=n.strstart+n.lookahead-Lt,i=rn(n,n.strstart-1-n.prev_match,n.prev_length-Lt),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=r&&(n.ins_h=ln(n,n.ins_h,n.window[n.strstart+Lt-1]),e=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(--n.prev_length!==0);if(n.match_available=0,n.match_length=Lt-1,n.strstart++,i&&(fe(n,!1),n.strm.avail_out===0))return ne}else if(n.match_available){if(i=rn(n,0,n.window[n.strstart-1]),i&&fe(n,!1),n.strstart++,n.lookahead--,n.strm.avail_out===0)return ne}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(i=rn(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<Lt-1?n.strstart:Lt-1,t===me?(fe(n,!0),n.strm.avail_out===0?En:Xn):n.sym_next&&(fe(n,!1),n.strm.avail_out===0)?ne:Vn},lu=(n,t)=>{let e,i,r,s;const a=n.window;for(;;){if(n.lookahead<=an){if(Yn(n),n.lookahead<=an&&t===sn)return ne;if(n.lookahead===0)break}if(n.match_length=0,n.lookahead>=Lt&&n.strstart>0&&(r=n.strstart-1,i=a[r],i===a[++r]&&i===a[++r]&&i===a[++r])){s=n.strstart+an;do;while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<s);n.match_length=an-(s-r),n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=Lt?(e=rn(n,1,n.match_length-Lt),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(e=rn(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),e&&(fe(n,!1),n.strm.avail_out===0))return ne}return n.insert=0,t===me?(fe(n,!0),n.strm.avail_out===0?En:Xn):n.sym_next&&(fe(n,!1),n.strm.avail_out===0)?ne:Vn},cu=(n,t)=>{let e;for(;;){if(n.lookahead===0&&(Yn(n),n.lookahead===0)){if(t===sn)return ne;break}if(n.match_length=0,e=rn(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,e&&(fe(n,!1),n.strm.avail_out===0))return ne}return n.insert=0,t===me?(fe(n,!0),n.strm.avail_out===0?En:Xn):n.sym_next&&(fe(n,!1),n.strm.avail_out===0)?ne:Vn};function Ie(n,t,e,i,r){this.good_length=n,this.max_lazy=t,this.nice_length=e,this.max_chain=i,this.func=r}const ki=[new Ie(0,0,0,0,Wo),new Ie(4,4,8,4,zs),new Ie(4,5,16,8,zs),new Ie(4,6,32,32,zs),new Ie(4,4,16,16,Zn),new Ie(8,16,32,32,Zn),new Ie(8,16,128,128,Zn),new Ie(8,32,128,256,Zn),new Ie(32,128,258,1024,Zn),new Ie(32,258,258,4096,Zn)],hu=n=>{n.window_size=2*n.w_size,on(n.head),n.max_lazy_match=ki[n.level].max_lazy,n.good_match=ki[n.level].good_length,n.nice_match=ki[n.level].nice_length,n.max_chain_length=ki[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=Lt-1,n.match_available=0,n.ins_h=0};function fu(){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=gr,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 Uint16Array(iu*2),this.dyn_dtree=new Uint16Array((2*eu+1)*2),this.bl_tree=new Uint16Array((2*nu+1)*2),on(this.dyn_ltree),on(this.dyn_dtree),on(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(ru+1),this.heap=new Uint16Array(2*Is+1),on(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Is+1),on(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Si=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.status!==jn&&t.status!==Ms&&t.status!==Ls&&t.status!==Ds&&t.status!==Rs&&t.status!==Os&&t.status!==Cn&&t.status!==Ci?1:0},Jo=n=>{if(Si(n))return kn(n,Ae);n.total_in=n.total_out=0,n.data_type=Wf;const t=n.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Ms:t.wrap?jn:Cn,n.adler=t.wrap===2?0:1,t.last_flush=-2,Nf(t),qt},Ko=n=>{const t=Jo(n);return t===qt&&hu(n.state),t},uu=(n,t)=>Si(n)||n.state.wrap!==2?Ae:(n.state.gzhead=t,qt),Qo=(n,t,e,i,r,s)=>{if(!n)return Ae;let a=1;if(t===Xf&&(t=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),r<1||r>Jf||e!==gr||i<8||i>15||t<0||t>9||s<0||s>$f||i===8&&a!==1)return kn(n,Ae);i===8&&(i=9);const o=new fu;return n.state=o,o.strm=n,o.status=jn,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=r+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+Lt-1)/Lt),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<r+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=t,o.strategy=s,o.method=e,Ko(n)},du=(n,t)=>Qo(n,t,gr,Kf,Qf,qf),pu=(n,t)=>{if(Si(n)||t>Yo||t<0)return n?kn(n,Ae):Ae;const e=n.state;if(!n.output||n.avail_in!==0&&!n.input||e.status===Ci&&t!==me)return kn(n,n.avail_out===0?Ps:Ae);const i=e.last_flush;if(e.last_flush=t,e.pending!==0){if(he(n),n.avail_out===0)return e.last_flush=-1,qt}else if(n.avail_in===0&&$o(t)<=$o(i)&&t!==me)return kn(n,Ps);if(e.status===Ci&&n.avail_in!==0)return kn(n,Ps);if(e.status===jn&&e.wrap===0&&(e.status=Cn),e.status===jn){let r=gr+(e.w_bits-8<<4)<<8,s=-1;if(e.strategy>=pr||e.level<2?s=0:e.level<6?s=1:e.level===6?s=2:s=3,r|=s<<6,e.strstart!==0&&(r|=su),r+=31-r%31,Ei(e,r),e.strstart!==0&&(Ei(e,n.adler>>>16),Ei(e,n.adler&65535)),n.adler=1,e.status=Cn,he(n),e.pending!==0)return e.last_flush=-1,qt}if(e.status===Ms){if(n.adler=0,Ft(e,31),Ft(e,139),Ft(e,8),e.gzhead)Ft(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),Ft(e,e.gzhead.time&255),Ft(e,e.gzhead.time>>8&255),Ft(e,e.gzhead.time>>16&255),Ft(e,e.gzhead.time>>24&255),Ft(e,e.level===9?2:e.strategy>=pr||e.level<2?4:0),Ft(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(Ft(e,e.gzhead.extra.length&255),Ft(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(n.adler=Yt(n.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=Ls;else if(Ft(e,0),Ft(e,0),Ft(e,0),Ft(e,0),Ft(e,0),Ft(e,e.level===9?2:e.strategy>=pr||e.level<2?4:0),Ft(e,au),e.status=Cn,he(n),e.pending!==0)return e.last_flush=-1,qt}if(e.status===Ls){if(e.gzhead.extra){let r=e.pending,s=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+s>e.pending_buf_size;){let o=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r)),e.gzindex+=o,he(n),e.pending!==0)return e.last_flush=-1,qt;r=0,s-=o}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending+=s,e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=Ds}if(e.status===Ds){if(e.gzhead.name){let r=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r)),he(n),e.pending!==0)return e.last_flush=-1,qt;r=0}e.gzindex<e.gzhead.name.length?s=e.gzhead.name.charCodeAt(e.gzindex++)&255:s=0,Ft(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=Rs}if(e.status===Rs){if(e.gzhead.comment){let r=e.pending,s;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r)),he(n),e.pending!==0)return e.last_flush=-1,qt;r=0}e.gzindex<e.gzhead.comment.length?s=e.gzhead.comment.charCodeAt(e.gzindex++)&255:s=0,Ft(e,s)}while(s!==0);e.gzhead.hcrc&&e.pending>r&&(n.adler=Yt(n.adler,e.pending_buf,e.pending-r,r))}e.status=Os}if(e.status===Os){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(he(n),e.pending!==0))return e.last_flush=-1,qt;Ft(e,n.adler&255),Ft(e,n.adler>>8&255),n.adler=0}if(e.status=Cn,he(n),e.pending!==0)return e.last_flush=-1,qt}if(n.avail_in!==0||e.lookahead!==0||t!==sn&&e.status!==Ci){let r=e.level===0?Wo(e,t):e.strategy===pr?cu(e,t):e.strategy===Zf?lu(e,t):ki[e.level].func(e,t);if((r===En||r===Xn)&&(e.status=Ci),r===ne||r===En)return n.avail_out===0&&(e.last_flush=-1),qt;if(r===Vn&&(t===Hf?Gf(e):t!==Yo&&(As(e,0,0,!1),t===jf&&(on(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),he(n),n.avail_out===0))return e.last_flush=-1,qt}return t!==me?qt:e.wrap<=0?Zo:(e.wrap===2?(Ft(e,n.adler&255),Ft(e,n.adler>>8&255),Ft(e,n.adler>>16&255),Ft(e,n.adler>>24&255),Ft(e,n.total_in&255),Ft(e,n.total_in>>8&255),Ft(e,n.total_in>>16&255),Ft(e,n.total_in>>24&255)):(Ei(e,n.adler>>>16),Ei(e,n.adler&65535)),he(n),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?qt:Zo)},gu=n=>{if(Si(n))return Ae;const t=n.state.status;return n.state=null,t===Cn?kn(n,Vf):qt},mu=(n,t)=>{let e=t.length;if(Si(n))return Ae;const i=n.state,r=i.wrap;if(r===2||r===1&&i.status!==jn||i.lookahead)return Ae;if(r===1&&(n.adler=Ti(n.adler,t,e,0)),i.wrap=0,e>=i.w_size){r===0&&(on(i.head),i.strstart=0,i.block_start=0,i.insert=0);let l=new Uint8Array(i.w_size);l.set(t.subarray(e-i.w_size,e),0),t=l,e=i.w_size}const s=n.avail_in,a=n.next_in,o=n.input;for(n.avail_in=e,n.next_in=0,n.input=t,Yn(i);i.lookahead>=Lt;){let l=i.strstart,c=i.lookahead-(Lt-1);do i.ins_h=ln(i,i.ins_h,i.window[l+Lt-1]),i.prev[l&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=l,l++;while(--c);i.strstart=l,i.lookahead=Lt-1,Yn(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Lt-1,i.match_available=0,n.next_in=a,n.input=o,n.avail_in=s,i.wrap=r,qt};var vu=du,_u=Qo,wu=Ko,yu=Jo,xu=uu,bu=pu,Tu=gu,Cu=mu,Eu="pako deflate (from Nodeca project)",Ai={deflateInit:vu,deflateInit2:_u,deflateReset:wu,deflateResetKeep:yu,deflateSetHeader:xu,deflate:bu,deflateEnd:Tu,deflateSetDictionary:Cu,deflateInfo:Eu};const ku=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);var Su=function(n){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(const i in e)ku(e,i)&&(n[i]=e[i])}}return n},Au=n=>{let t=0;for(let i=0,r=n.length;i<r;i++)t+=n[i].length;const e=new Uint8Array(t);for(let i=0,r=0,s=n.length;i<s;i++){let a=n[i];e.set(a,r),r+=a.length}return e},mr={assign:Su,flattenChunks:Au};let tl=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{tl=!1}const Pi=new Uint8Array(256);for(let n=0;n<256;n++)Pi[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;Pi[254]=Pi[254]=1;var Pu=n=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(n);let t,e,i,r,s,a=n.length,o=0;for(r=0;r<a;r++)e=n.charCodeAt(r),(e&64512)===55296&&r+1<a&&(i=n.charCodeAt(r+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),r++)),o+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(o),s=0,r=0;s<o;r++)e=n.charCodeAt(r),(e&64512)===55296&&r+1<a&&(i=n.charCodeAt(r+1),(i&64512)===56320&&(e=65536+(e-55296<<10)+(i-56320),r++)),e<128?t[s++]=e:e<2048?(t[s++]=192|e>>>6,t[s++]=128|e&63):e<65536?(t[s++]=224|e>>>12,t[s++]=128|e>>>6&63,t[s++]=128|e&63):(t[s++]=240|e>>>18,t[s++]=128|e>>>12&63,t[s++]=128|e>>>6&63,t[s++]=128|e&63);return t};const Iu=(n,t)=>{if(t<65534&&n.subarray&&tl)return String.fromCharCode.apply(null,n.length===t?n:n.subarray(0,t));let e="";for(let i=0;i<t;i++)e+=String.fromCharCode(n[i]);return e};var Mu=(n,t)=>{const e=t||n.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(n.subarray(0,t));let i,r;const s=new Array(e*2);for(r=0,i=0;i<e;){let a=n[i++];if(a<128){s[r++]=a;continue}let o=Pi[a];if(o>4){s[r++]=65533,i+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&i<e;)a=a<<6|n[i++]&63,o--;if(o>1){s[r++]=65533;continue}a<65536?s[r++]=a:(a-=65536,s[r++]=55296|a>>10&1023,s[r++]=56320|a&1023)}return Iu(s,r)},Lu=(n,t)=>{t=t||n.length,t>n.length&&(t=n.length);let e=t-1;for(;e>=0&&(n[e]&192)===128;)e--;return e<0||e===0?t:e+Pi[n[e]]>t?e:t},Ii={string2buf:Pu,buf2string:Mu,utf8border:Lu};function Du(){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}var el=Du;const nl=Object.prototype.toString,{Z_NO_FLUSH:Ru,Z_SYNC_FLUSH:Ou,Z_FULL_FLUSH:Fu,Z_FINISH:zu,Z_OK:vr,Z_STREAM_END:Uu,Z_DEFAULT_COMPRESSION:Nu,Z_DEFAULT_STRATEGY:Bu,Z_DEFLATED:Gu}=Tn;function Mi(n){this.options=mr.assign({level:Nu,method:Gu,chunkSize:16384,windowBits:15,memLevel:8,strategy:Bu},n||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new el,this.strm.avail_out=0;let e=Ai.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==vr)throw new Error(bn[e]);if(t.header&&Ai.deflateSetHeader(this.strm,t.header),t.dictionary){let i;if(typeof t.dictionary=="string"?i=Ii.string2buf(t.dictionary):nl.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,e=Ai.deflateSetDictionary(this.strm,i),e!==vr)throw new Error(bn[e]);this._dict_set=!0}}Mi.prototype.push=function(n,t){const e=this.strm,i=this.options.chunkSize;let r,s;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?zu:Ru,typeof n=="string"?e.input=Ii.string2buf(n):nl.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(s===Ou||s===Fu)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(r=Ai.deflate(e,s),r===Uu)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),r=Ai.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===vr;if(e.avail_out===0){this.onData(e.output);continue}if(s>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0},Mi.prototype.onData=function(n){this.chunks.push(n)},Mi.prototype.onEnd=function(n){n===vr&&(this.result=mr.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Us(n,t){const e=new Mi(t);if(e.push(n,!0),e.err)throw e.msg||bn[e.err];return e.result}function Hu(n,t){return t=t||{},t.raw=!0,Us(n,t)}function ju(n,t){return t=t||{},t.gzip=!0,Us(n,t)}var Vu=Mi,Xu=Us,Yu=Hu,Zu=ju,$u=Tn,qu={Deflate:Vu,deflate:Xu,deflateRaw:Yu,gzip:Zu,constants:$u};const _r=16209,Wu=16191;var Ju=function(t,e){let i,r,s,a,o,l,c,u,g,p,d,y,x,C,A,P,M,D,z,N,F,G,H,Z;const X=t.state;i=t.next_in,H=t.input,r=i+(t.avail_in-5),s=t.next_out,Z=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),l=X.dmax,c=X.wsize,u=X.whave,g=X.wnext,p=X.window,d=X.hold,y=X.bits,x=X.lencode,C=X.distcode,A=(1<<X.lenbits)-1,P=(1<<X.distbits)-1;t:do{y<15&&(d+=H[i++]<<y,y+=8,d+=H[i++]<<y,y+=8),M=x[d&A];e:for(;;){if(D=M>>>24,d>>>=D,y-=D,D=M>>>16&255,D===0)Z[s++]=M&65535;else if(D&16){z=M&65535,D&=15,D&&(y<D&&(d+=H[i++]<<y,y+=8),z+=d&(1<<D)-1,d>>>=D,y-=D),y<15&&(d+=H[i++]<<y,y+=8,d+=H[i++]<<y,y+=8),M=C[d&P];n:for(;;){if(D=M>>>24,d>>>=D,y-=D,D=M>>>16&255,D&16){if(N=M&65535,D&=15,y<D&&(d+=H[i++]<<y,y+=8,y<D&&(d+=H[i++]<<y,y+=8)),N+=d&(1<<D)-1,N>l){t.msg="invalid distance too far back",X.mode=_r;break t}if(d>>>=D,y-=D,D=s-a,N>D){if(D=N-D,D>u&&X.sane){t.msg="invalid distance too far back",X.mode=_r;break t}if(F=0,G=p,g===0){if(F+=c-D,D<z){z-=D;do Z[s++]=p[F++];while(--D);F=s-N,G=Z}}else if(g<D){if(F+=c+g-D,D-=g,D<z){z-=D;do Z[s++]=p[F++];while(--D);if(F=0,g<z){D=g,z-=D;do Z[s++]=p[F++];while(--D);F=s-N,G=Z}}}else if(F+=g-D,D<z){z-=D;do Z[s++]=p[F++];while(--D);F=s-N,G=Z}for(;z>2;)Z[s++]=G[F++],Z[s++]=G[F++],Z[s++]=G[F++],z-=3;z&&(Z[s++]=G[F++],z>1&&(Z[s++]=G[F++]))}else{F=s-N;do Z[s++]=Z[F++],Z[s++]=Z[F++],Z[s++]=Z[F++],z-=3;while(z>2);z&&(Z[s++]=Z[F++],z>1&&(Z[s++]=Z[F++]))}}else if(D&64){t.msg="invalid distance code",X.mode=_r;break t}else{M=C[(M&65535)+(d&(1<<D)-1)];continue n}break}}else if(D&64)if(D&32){X.mode=Wu;break t}else{t.msg="invalid literal/length code",X.mode=_r;break t}else{M=x[(M&65535)+(d&(1<<D)-1)];continue e}break}}while(i<r&&s<o);z=y>>3,i-=z,y-=z<<3,d&=(1<<y)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<o?257+(o-s):257-(s-o),X.hold=d,X.bits=y};const $n=15,il=852,rl=592,sl=0,Ns=1,al=2,Ku=new Uint16Array([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]),Qu=new Uint8Array([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]),td=new Uint16Array([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]),ed=new Uint8Array([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]);var Li=(n,t,e,i,r,s,a,o)=>{const l=o.bits;let c=0,u=0,g=0,p=0,d=0,y=0,x=0,C=0,A=0,P=0,M,D,z,N,F,G=null,H;const Z=new Uint16Array($n+1),X=new Uint16Array($n+1);let J=null,dt,ft,gt;for(c=0;c<=$n;c++)Z[c]=0;for(u=0;u<i;u++)Z[t[e+u]]++;for(d=l,p=$n;p>=1&&Z[p]===0;p--);if(d>p&&(d=p),p===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,o.bits=1,0;for(g=1;g<p&&Z[g]===0;g++);for(d<g&&(d=g),C=1,c=1;c<=$n;c++)if(C<<=1,C-=Z[c],C<0)return-1;if(C>0&&(n===sl||p!==1))return-1;for(X[1]=0,c=1;c<$n;c++)X[c+1]=X[c]+Z[c];for(u=0;u<i;u++)t[e+u]!==0&&(a[X[t[e+u]]++]=u);if(n===sl?(G=J=a,H=20):n===Ns?(G=Ku,J=Qu,H=257):(G=td,J=ed,H=0),P=0,u=0,c=g,F=s,y=d,x=0,z=-1,A=1<<d,N=A-1,n===Ns&&A>il||n===al&&A>rl)return 1;for(;;){dt=c-x,a[u]+1<H?(ft=0,gt=a[u]):a[u]>=H?(ft=J[a[u]-H],gt=G[a[u]-H]):(ft=32+64,gt=0),M=1<<c-x,D=1<<y,g=D;do D-=M,r[F+(P>>x)+D]=dt<<24|ft<<16|gt|0;while(D!==0);for(M=1<<c-1;P&M;)M>>=1;if(M!==0?(P&=M-1,P+=M):P=0,u++,--Z[c]===0){if(c===p)break;c=t[e+a[u]]}if(c>d&&(P&N)!==z){for(x===0&&(x=d),F+=g,y=c-x,C=1<<y;y+x<p&&(C-=Z[y+x],!(C<=0));)y++,C<<=1;if(A+=1<<y,n===Ns&&A>il||n===al&&A>rl)return 1;z=P&N,r[z]=d<<24|y<<16|F-s|0}}return P!==0&&(r[F+P]=c-x<<24|64<<16|0),o.bits=d,0};const nd=0,ol=1,ll=2,{Z_FINISH:cl,Z_BLOCK:id,Z_TREES:wr,Z_OK:Sn,Z_STREAM_END:rd,Z_NEED_DICT:sd,Z_STREAM_ERROR:ve,Z_DATA_ERROR:hl,Z_MEM_ERROR:fl,Z_BUF_ERROR:ad,Z_DEFLATED:ul}=Tn,yr=16180,dl=16181,pl=16182,gl=16183,ml=16184,vl=16185,_l=16186,wl=16187,yl=16188,xl=16189,xr=16190,Ge=16191,Bs=16192,bl=16193,Gs=16194,Tl=16195,Cl=16196,El=16197,kl=16198,br=16199,Tr=16200,Sl=16201,Al=16202,Pl=16203,Il=16204,Ml=16205,Hs=16206,Ll=16207,Dl=16208,Bt=16209,Rl=16210,Ol=16211,od=852,ld=592,cd=15,Fl=n=>(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24);function hd(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const An=n=>{if(!n)return 1;const t=n.state;return!t||t.strm!==n||t.mode<yr||t.mode>Ol?1:0},zl=n=>{if(An(n))return ve;const t=n.state;return n.total_in=n.total_out=t.total=0,n.msg="",t.wrap&&(n.adler=t.wrap&1),t.mode=yr,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(od),t.distcode=t.distdyn=new Int32Array(ld),t.sane=1,t.back=-1,Sn},Ul=n=>{if(An(n))return ve;const t=n.state;return t.wsize=0,t.whave=0,t.wnext=0,zl(n)},Nl=(n,t)=>{let e;if(An(n))return ve;const i=n.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?ve:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=e,i.wbits=t,Ul(n))},Bl=(n,t)=>{if(!n)return ve;const e=new hd;n.state=e,e.strm=n,e.window=null,e.mode=yr;const i=Nl(n,t);return i!==Sn&&(n.state=null),i},fd=n=>Bl(n,cd);let Gl=!0,js,Vs;const ud=n=>{if(Gl){js=new Int32Array(512),Vs=new Int32Array(32);let t=0;for(;t<144;)n.lens[t++]=8;for(;t<256;)n.lens[t++]=9;for(;t<280;)n.lens[t++]=7;for(;t<288;)n.lens[t++]=8;for(Li(ol,n.lens,0,288,js,0,n.work,{bits:9}),t=0;t<32;)n.lens[t++]=5;Li(ll,n.lens,0,32,Vs,0,n.work,{bits:5}),Gl=!1}n.lencode=js,n.lenbits=9,n.distcode=Vs,n.distbits=5},Hl=(n,t,e,i)=>{let r;const s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(t.subarray(e-s.wsize,e),0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),s.window.set(t.subarray(e-i,e-i+r),s.wnext),i-=r,i?(s.window.set(t.subarray(e-i,e),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0},dd=(n,t)=>{let e,i,r,s,a,o,l,c,u,g,p,d,y,x,C=0,A,P,M,D,z,N,F,G;const H=new Uint8Array(4);let Z,X;const J=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(An(n)||!n.output||!n.input&&n.avail_in!==0)return ve;e=n.state,e.mode===Ge&&(e.mode=Bs),a=n.next_out,r=n.output,l=n.avail_out,s=n.next_in,i=n.input,o=n.avail_in,c=e.hold,u=e.bits,g=o,p=l,G=Sn;t:for(;;)switch(e.mode){case yr:if(e.wrap===0){e.mode=Bs;break}for(;u<16;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(e.wrap&2&&c===35615){e.wbits===0&&(e.wbits=15),e.check=0,H[0]=c&255,H[1]=c>>>8&255,e.check=Yt(e.check,H,2,0),c=0,u=0,e.mode=dl;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((c&255)<<8)+(c>>8))%31){n.msg="incorrect header check",e.mode=Bt;break}if((c&15)!==ul){n.msg="unknown compression method",e.mode=Bt;break}if(c>>>=4,u-=4,F=(c&15)+8,e.wbits===0&&(e.wbits=F),F>15||F>e.wbits){n.msg="invalid window size",e.mode=Bt;break}e.dmax=1<<e.wbits,e.flags=0,n.adler=e.check=1,e.mode=c&512?xl:Ge,c=0,u=0;break;case dl:for(;u<16;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(e.flags=c,(e.flags&255)!==ul){n.msg="unknown compression method",e.mode=Bt;break}if(e.flags&57344){n.msg="unknown header flags set",e.mode=Bt;break}e.head&&(e.head.text=c>>8&1),e.flags&512&&e.wrap&4&&(H[0]=c&255,H[1]=c>>>8&255,e.check=Yt(e.check,H,2,0)),c=0,u=0,e.mode=pl;case pl:for(;u<32;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.head&&(e.head.time=c),e.flags&512&&e.wrap&4&&(H[0]=c&255,H[1]=c>>>8&255,H[2]=c>>>16&255,H[3]=c>>>24&255,e.check=Yt(e.check,H,4,0)),c=0,u=0,e.mode=gl;case gl:for(;u<16;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.head&&(e.head.xflags=c&255,e.head.os=c>>8),e.flags&512&&e.wrap&4&&(H[0]=c&255,H[1]=c>>>8&255,e.check=Yt(e.check,H,2,0)),c=0,u=0,e.mode=ml;case ml:if(e.flags&1024){for(;u<16;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.length=c,e.head&&(e.head.extra_len=c),e.flags&512&&e.wrap&4&&(H[0]=c&255,H[1]=c>>>8&255,e.check=Yt(e.check,H,2,0)),c=0,u=0}else e.head&&(e.head.extra=null);e.mode=vl;case vl:if(e.flags&1024&&(d=e.length,d>o&&(d=o),d&&(e.head&&(F=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(i.subarray(s,s+d),F)),e.flags&512&&e.wrap&4&&(e.check=Yt(e.check,i,d,s)),o-=d,s+=d,e.length-=d),e.length))break t;e.length=0,e.mode=_l;case _l:if(e.flags&2048){if(o===0)break t;d=0;do F=i[s+d++],e.head&&F&&e.length<65536&&(e.head.name+=String.fromCharCode(F));while(F&&d<o);if(e.flags&512&&e.wrap&4&&(e.check=Yt(e.check,i,d,s)),o-=d,s+=d,F)break t}else e.head&&(e.head.name=null);e.length=0,e.mode=wl;case wl:if(e.flags&4096){if(o===0)break t;d=0;do F=i[s+d++],e.head&&F&&e.length<65536&&(e.head.comment+=String.fromCharCode(F));while(F&&d<o);if(e.flags&512&&e.wrap&4&&(e.check=Yt(e.check,i,d,s)),o-=d,s+=d,F)break t}else e.head&&(e.head.comment=null);e.mode=yl;case yl:if(e.flags&512){for(;u<16;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(e.wrap&4&&c!==(e.check&65535)){n.msg="header crc mismatch",e.mode=Bt;break}c=0,u=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),n.adler=e.check=0,e.mode=Ge;break;case xl:for(;u<32;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}n.adler=e.check=Fl(c),c=0,u=0,e.mode=xr;case xr:if(e.havedict===0)return n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=u,sd;n.adler=e.check=1,e.mode=Ge;case Ge:if(t===id||t===wr)break t;case Bs:if(e.last){c>>>=u&7,u-=u&7,e.mode=Hs;break}for(;u<3;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}switch(e.last=c&1,c>>>=1,u-=1,c&3){case 0:e.mode=bl;break;case 1:if(ud(e),e.mode=br,t===wr){c>>>=2,u-=2;break t}break;case 2:e.mode=Cl;break;case 3:n.msg="invalid block type",e.mode=Bt}c>>>=2,u-=2;break;case bl:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){n.msg="invalid stored block lengths",e.mode=Bt;break}if(e.length=c&65535,c=0,u=0,e.mode=Gs,t===wr)break t;case Gs:e.mode=Tl;case Tl:if(d=e.length,d){if(d>o&&(d=o),d>l&&(d=l),d===0)break t;r.set(i.subarray(s,s+d),a),o-=d,s+=d,l-=d,a+=d,e.length-=d;break}e.mode=Ge;break;case Cl:for(;u<14;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(e.nlen=(c&31)+257,c>>>=5,u-=5,e.ndist=(c&31)+1,c>>>=5,u-=5,e.ncode=(c&15)+4,c>>>=4,u-=4,e.nlen>286||e.ndist>30){n.msg="too many length or distance symbols",e.mode=Bt;break}e.have=0,e.mode=El;case El:for(;e.have<e.ncode;){for(;u<3;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.lens[J[e.have++]]=c&7,c>>>=3,u-=3}for(;e.have<19;)e.lens[J[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,Z={bits:e.lenbits},G=Li(nd,e.lens,0,19,e.lencode,0,e.work,Z),e.lenbits=Z.bits,G){n.msg="invalid code lengths set",e.mode=Bt;break}e.have=0,e.mode=kl;case kl:for(;e.have<e.nlen+e.ndist;){for(;C=e.lencode[c&(1<<e.lenbits)-1],A=C>>>24,P=C>>>16&255,M=C&65535,!(A<=u);){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(M<16)c>>>=A,u-=A,e.lens[e.have++]=M;else{if(M===16){for(X=A+2;u<X;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(c>>>=A,u-=A,e.have===0){n.msg="invalid bit length repeat",e.mode=Bt;break}F=e.lens[e.have-1],d=3+(c&3),c>>>=2,u-=2}else if(M===17){for(X=A+3;u<X;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}c>>>=A,u-=A,F=0,d=3+(c&7),c>>>=3,u-=3}else{for(X=A+7;u<X;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}c>>>=A,u-=A,F=0,d=11+(c&127),c>>>=7,u-=7}if(e.have+d>e.nlen+e.ndist){n.msg="invalid bit length repeat",e.mode=Bt;break}for(;d--;)e.lens[e.have++]=F}}if(e.mode===Bt)break;if(e.lens[256]===0){n.msg="invalid code -- missing end-of-block",e.mode=Bt;break}if(e.lenbits=9,Z={bits:e.lenbits},G=Li(ol,e.lens,0,e.nlen,e.lencode,0,e.work,Z),e.lenbits=Z.bits,G){n.msg="invalid literal/lengths set",e.mode=Bt;break}if(e.distbits=6,e.distcode=e.distdyn,Z={bits:e.distbits},G=Li(ll,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,Z),e.distbits=Z.bits,G){n.msg="invalid distances set",e.mode=Bt;break}if(e.mode=br,t===wr)break t;case br:e.mode=Tr;case Tr:if(o>=6&&l>=258){n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=u,Ju(n,p),a=n.next_out,r=n.output,l=n.avail_out,s=n.next_in,i=n.input,o=n.avail_in,c=e.hold,u=e.bits,e.mode===Ge&&(e.back=-1);break}for(e.back=0;C=e.lencode[c&(1<<e.lenbits)-1],A=C>>>24,P=C>>>16&255,M=C&65535,!(A<=u);){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(P&&!(P&240)){for(D=A,z=P,N=M;C=e.lencode[N+((c&(1<<D+z)-1)>>D)],A=C>>>24,P=C>>>16&255,M=C&65535,!(D+A<=u);){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}c>>>=D,u-=D,e.back+=D}if(c>>>=A,u-=A,e.back+=A,e.length=M,P===0){e.mode=Ml;break}if(P&32){e.back=-1,e.mode=Ge;break}if(P&64){n.msg="invalid literal/length code",e.mode=Bt;break}e.extra=P&15,e.mode=Sl;case Sl:if(e.extra){for(X=e.extra;u<X;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.length+=c&(1<<e.extra)-1,c>>>=e.extra,u-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=Al;case Al:for(;C=e.distcode[c&(1<<e.distbits)-1],A=C>>>24,P=C>>>16&255,M=C&65535,!(A<=u);){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(!(P&240)){for(D=A,z=P,N=M;C=e.distcode[N+((c&(1<<D+z)-1)>>D)],A=C>>>24,P=C>>>16&255,M=C&65535,!(D+A<=u);){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}c>>>=D,u-=D,e.back+=D}if(c>>>=A,u-=A,e.back+=A,P&64){n.msg="invalid distance code",e.mode=Bt;break}e.offset=M,e.extra=P&15,e.mode=Pl;case Pl:if(e.extra){for(X=e.extra;u<X;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}e.offset+=c&(1<<e.extra)-1,c>>>=e.extra,u-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){n.msg="invalid distance too far back",e.mode=Bt;break}e.mode=Il;case Il:if(l===0)break t;if(d=p-l,e.offset>d){if(d=e.offset-d,d>e.whave&&e.sane){n.msg="invalid distance too far back",e.mode=Bt;break}d>e.wnext?(d-=e.wnext,y=e.wsize-d):y=e.wnext-d,d>e.length&&(d=e.length),x=e.window}else x=r,y=a-e.offset,d=e.length;d>l&&(d=l),l-=d,e.length-=d;do r[a++]=x[y++];while(--d);e.length===0&&(e.mode=Tr);break;case Ml:if(l===0)break t;r[a++]=e.length,l--,e.mode=Tr;break;case Hs:if(e.wrap){for(;u<32;){if(o===0)break t;o--,c|=i[s++]<<u,u+=8}if(p-=l,n.total_out+=p,e.total+=p,e.wrap&4&&p&&(n.adler=e.check=e.flags?Yt(e.check,r,p,a-p):Ti(e.check,r,p,a-p)),p=l,e.wrap&4&&(e.flags?c:Fl(c))!==e.check){n.msg="incorrect data check",e.mode=Bt;break}c=0,u=0}e.mode=Ll;case Ll:if(e.wrap&&e.flags){for(;u<32;){if(o===0)break t;o--,c+=i[s++]<<u,u+=8}if(e.wrap&4&&c!==(e.total&4294967295)){n.msg="incorrect length check",e.mode=Bt;break}c=0,u=0}e.mode=Dl;case Dl:G=rd;break t;case Bt:G=hl;break t;case Rl:return fl;case Ol:default:return ve}return n.next_out=a,n.avail_out=l,n.next_in=s,n.avail_in=o,e.hold=c,e.bits=u,(e.wsize||p!==n.avail_out&&e.mode<Bt&&(e.mode<Hs||t!==cl))&&Hl(n,n.output,n.next_out,p-n.avail_out),g-=n.avail_in,p-=n.avail_out,n.total_in+=g,n.total_out+=p,e.total+=p,e.wrap&4&&p&&(n.adler=e.check=e.flags?Yt(e.check,r,p,n.next_out-p):Ti(e.check,r,p,n.next_out-p)),n.data_type=e.bits+(e.last?64:0)+(e.mode===Ge?128:0)+(e.mode===br||e.mode===Gs?256:0),(g===0&&p===0||t===cl)&&G===Sn&&(G=ad),G},pd=n=>{if(An(n))return ve;let t=n.state;return t.window&&(t.window=null),n.state=null,Sn},gd=(n,t)=>{if(An(n))return ve;const e=n.state;return e.wrap&2?(e.head=t,t.done=!1,Sn):ve},md=(n,t)=>{const e=t.length;let i,r,s;return An(n)||(i=n.state,i.wrap!==0&&i.mode!==xr)?ve:i.mode===xr&&(r=1,r=Ti(r,t,e,0),r!==i.check)?hl:(s=Hl(n,t,e,e),s?(i.mode=Rl,fl):(i.havedict=1,Sn))};var vd=Ul,_d=Nl,wd=zl,yd=fd,xd=Bl,bd=dd,Td=pd,Cd=gd,Ed=md,kd="pako inflate (from Nodeca project)",He={inflateReset:vd,inflateReset2:_d,inflateResetKeep:wd,inflateInit:yd,inflateInit2:xd,inflate:bd,inflateEnd:Td,inflateGetHeader:Cd,inflateSetDictionary:Ed,inflateInfo:kd};function Sd(){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}var Ad=Sd;const jl=Object.prototype.toString,{Z_NO_FLUSH:Pd,Z_FINISH:Id,Z_OK:Di,Z_STREAM_END:Xs,Z_NEED_DICT:Ys,Z_STREAM_ERROR:Md,Z_DATA_ERROR:Vl,Z_MEM_ERROR:Ld}=Tn;function Ri(n){this.options=mr.assign({chunkSize:65536,windowBits:15,to:""},n||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(n&&n.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new el,this.strm.avail_out=0;let e=He.inflateInit2(this.strm,t.windowBits);if(e!==Di)throw new Error(bn[e]);if(this.header=new Ad,He.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ii.string2buf(t.dictionary):jl.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=He.inflateSetDictionary(this.strm,t.dictionary),e!==Di)))throw new Error(bn[e])}Ri.prototype.push=function(n,t){const e=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?Id:Pd,jl.call(n)==="[object ArrayBuffer]"?e.input=new Uint8Array(n):e.input=n,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),s=He.inflate(e,a),s===Ys&&r&&(s=He.inflateSetDictionary(e,r),s===Di?s=He.inflate(e,a):s===Vl&&(s=Ys));e.avail_in>0&&s===Xs&&e.state.wrap>0&&n[e.next_in]!==0;)He.inflateReset(e),s=He.inflate(e,a);switch(s){case Md:case Vl:case Ys:case Ld:return this.onEnd(s),this.ended=!0,!1}if(o=e.avail_out,e.next_out&&(e.avail_out===0||s===Xs))if(this.options.to==="string"){let l=Ii.utf8border(e.output,e.next_out),c=e.next_out-l,u=Ii.buf2string(e.output,l);e.next_out=c,e.avail_out=i-c,c&&e.output.set(e.output.subarray(l,l+c),0),this.onData(u)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(s===Di&&o===0)){if(s===Xs)return s=He.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(e.avail_in===0)break}}return!0},Ri.prototype.onData=function(n){this.chunks.push(n)},Ri.prototype.onEnd=function(n){n===Di&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=mr.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function Zs(n,t){const e=new Ri(t);if(e.push(n),e.err)throw e.msg||bn[e.err];return e.result}function Dd(n,t){return t=t||{},t.raw=!0,Zs(n,t)}var Rd=Ri,Od=Zs,Fd=Dd,zd=Zs,Ud=Tn,Nd={Inflate:Rd,inflate:Od,inflateRaw:Fd,ungzip:zd,constants:Ud};const{Deflate:Bd,deflate:Gd,deflateRaw:Hd,gzip:jd}=qu,{Inflate:Vd,inflate:Xd,inflateRaw:Yd,ungzip:Zd}=Nd;var $d=Bd,qd=Gd,Wd=Hd,Jd=jd,Kd=Vd,Qd=Xd,t0=Yd,e0=Zd,n0=Tn,i0={Deflate:$d,deflate:qd,deflateRaw:Wd,gzip:Jd,Inflate:Kd,inflate:Qd,inflateRaw:t0,ungzip:e0,constants:n0};const ct={};ct.toRGBA8=function(n){const t=n.width,e=n.height;if(n.tabs.acTL===null)return[ct.toRGBA8.decodeImage(n.data,t,e,n).buffer];const i=[];n.frames[0].data===null&&(n.frames[0].data=n.data);const r=t*e*4,s=new Uint8Array(r),a=new Uint8Array(r),o=new Uint8Array(r);for(let l=0;l<n.frames.length;l++){const c=n.frames[l],u=c.rect.x,g=c.rect.y,p=c.rect.width,d=c.rect.height,y=ct.toRGBA8.decodeImage(c.data,p,d,n);if(l!==0)for(let x=0;x<r;x++)o[x]=s[x];if(c.blend===0?ct._copyTile(y,p,d,s,t,e,u,g,0):c.blend===1&&ct._copyTile(y,p,d,s,t,e,u,g,1),i.push(s.buffer.slice(0)),c.dispose===1)ct._copyTile(a,p,d,s,t,e,u,g,0);else if(c.dispose===2)for(let x=0;x<r;x++)s[x]=o[x]}return i},ct.toRGBA8.decodeImage=function(n,t,e,i){const r=t*e,s=ct.decode._getBPP(i),a=Math.ceil(t*s/8),o=new Uint8Array(r*4),l=new Uint32Array(o.buffer),c=i.ctype,u=i.depth,g=ct._bin.readUshort;if(c===6){const p=r<<2;if(u===8)for(let d=0;d<p;d+=4)o[d]=n[d],o[d+1]=n[d+1],o[d+2]=n[d+2],o[d+3]=n[d+3];if(u===16)for(let d=0;d<p;d++)o[d]=n[d<<1]}else if(c===2){const p=i.tabs.tRNS;if(p===null){if(u===8)for(let d=0;d<r;d++){const y=d*3;l[d]=-16777216|n[y+2]<<16|n[y+1]<<8|n[y]}if(u===16)for(let d=0;d<r;d++){const y=d*6;l[d]=-16777216|n[y+4]<<16|n[y+2]<<8|n[y]}}else{const d=p[0],y=p[1],x=p[2];if(u===8)for(let C=0;C<r;C++){const A=C<<2,P=C*3;l[C]=-16777216|n[P+2]<<16|n[P+1]<<8|n[P],n[P]===d&&n[P+1]===y&&n[P+2]===x&&(o[A+3]=0)}if(u===16)for(let C=0;C<r;C++){const A=C<<2,P=C*6;l[C]=-16777216|n[P+4]<<16|n[P+2]<<8|n[P],g(n,P)===d&&g(n,P+2)===y&&g(n,P+4)===x&&(o[A+3]=0)}}}else if(c===3){const p=i.tabs.PLTE,d=i.tabs.tRNS,y=d?d.length:0;if(u===1)for(let x=0;x<e;x++){const C=x*a,A=x*t;for(let P=0;P<t;P++){const M=A+P<<2,D=n[C+(P>>3)]>>7-((P&7)<<0)&1,z=3*D;o[M]=p[z],o[M+1]=p[z+1],o[M+2]=p[z+2],o[M+3]=D<y?d[D]:255}}if(u===2)for(let x=0;x<e;x++){const C=x*a,A=x*t;for(let P=0;P<t;P++){const M=A+P<<2,D=n[C+(P>>2)]>>6-((P&3)<<1)&3,z=3*D;o[M]=p[z],o[M+1]=p[z+1],o[M+2]=p[z+2],o[M+3]=D<y?d[D]:255}}if(u===4)for(let x=0;x<e;x++){const C=x*a,A=x*t;for(let P=0;P<t;P++){const M=A+P<<2,D=n[C+(P>>1)]>>4-((P&1)<<2)&15,z=3*D;o[M]=p[z],o[M+1]=p[z+1],o[M+2]=p[z+2],o[M+3]=D<y?d[D]:255}}if(u===8)for(let x=0;x<r;x++){const C=x<<2,A=n[x],P=3*A;o[C]=p[P],o[C+1]=p[P+1],o[C+2]=p[P+2],o[C+3]=A<y?d[A]:255}}else if(c===4){if(u===8)for(let p=0;p<r;p++){const d=p<<2,y=p<<1,x=n[y];o[d]=x,o[d+1]=x,o[d+2]=x,o[d+3]=n[y+1]}if(u===16)for(let p=0;p<r;p++){const d=p<<2,y=p<<2,x=n[y];o[d]=x,o[d+1]=x,o[d+2]=x,o[d+3]=n[y+2]}}else if(c===0){const p=i.tabs.tRNS?i.tabs.tRNS:-1;for(let d=0;d<e;d++){const y=d*a,x=d*t;if(u===1)for(let C=0;C<t;C++){const A=255*(n[y+(C>>>3)]>>>7-(C&7)&1),P=A===p*255?0:255;l[x+C]=P<<24|A<<16|A<<8|A}else if(u===2)for(let C=0;C<t;C++){const A=85*(n[y+(C>>>2)]>>>6-((C&3)<<1)&3),P=A===p*85?0:255;l[x+C]=P<<24|A<<16|A<<8|A}else if(u===4)for(let C=0;C<t;C++){const A=17*(n[y+(C>>>1)]>>>4-((C&1)<<2)&15),P=A===p*17?0:255;l[x+C]=P<<24|A<<16|A<<8|A}else if(u===8)for(let C=0;C<t;C++){const A=n[y+C],P=A===p?0:255;l[x+C]=P<<24|A<<16|A<<8|A}else if(u===16)for(let C=0;C<t;C++){const A=n[y+(C<<1)],P=g(n,y+(C<<1))===p?0:255;l[x+C]=P<<24|A<<16|A<<8|A}}}return o},ct.decode=function(n){const t=new Uint8Array(n);let e=8;const i=ct._bin,r=i.readUshort,s=i.readUint,a={tabs:{},frames:[]},o=new Uint8Array(t.length);let l=0,c,u=0;const g=[137,80,78,71,13,10,26,10];for(let p=0;p<8;p++)if(t[p]!==g[p])throw"The input is not a PNG file!";for(;e<t.length;){const p=i.readUint(t,e);e+=4;const d=i.readASCII(t,e,4);if(e+=4,d==="IHDR")ct.decode._IHDR(t,e,a);else if(d==="CgBI")a.tabs[d]=t.slice(e,e+4);else if(d==="IDAT"){for(let y=0;y<p;y++)o[l+y]=t[e+y];l+=p}else if(d==="acTL")a.tabs[d]={num_frames:s(t,e),num_plays:s(t,e+4)},c=new Uint8Array(t.length);else if(d==="fcTL"){if(u!==0){const A=a.frames[a.frames.length-1];A.data=ct.decode._decompress(a,c.slice(0,u),A.rect.width,A.rect.height),u=0}const y={x:s(t,e+12),y:s(t,e+16),width:s(t,e+4),height:s(t,e+8)};let x=r(t,e+22);x=r(t,e+20)/(x===0?100:x);const C={rect:y,delay:Math.round(x*1e3),dispose:t[e+24],blend:t[e+25]};a.frames.push(C)}else if(d==="fdAT"){for(let y=0;y<p-4;y++)c[u+y]=t[e+y+4];u+=p-4}else if(d==="pHYs")a.tabs[d]=[i.readUint(t,e),i.readUint(t,e+4),t[e+8]];else if(d==="cHRM"){a.tabs[d]=[];for(let y=0;y<8;y++)a.tabs[d].push(i.readUint(t,e+y*4))}else if(d==="tEXt"||d==="zTXt"){a.tabs[d]===null&&(a.tabs[d]={});const y=i.nextZero(t,e),x=i.readASCII(t,e,y-e);let C;const A=e+p-y-1;if(d==="tEXt")C=i.readASCII(t,y+1,A);else{const P=ct.decode._inflate(t.slice(y+2,y+2+A));C=i.readUTF8(P,0,P.length)}a.tabs[d][x]=C}else if(d==="iTXt"){a.tabs[d]==null&&(a.tabs[d]={});let y=0,x=e;y=i.nextZero(t,x);const C=i.readASCII(t,x,y-x);x=y+1;const A=t[x];x+=2,y=i.nextZero(t,x),x=y+1,y=i.nextZero(t,x),x=y+1;let P;const M=p-(x-e);if(A===0)P=i.readUTF8(t,x,M);else{const D=ct.decode._inflate(t.slice(x,x+M));P=i.readUTF8(D,0,D.length)}a.tabs[d][C]=P}else if(d==="PLTE")a.tabs[d]=i.readBytes(t,e,p);else if(d==="hIST"){const y=a.tabs.PLTE.length/3;a.tabs[d]=[];for(let x=0;x<y;x++)a.tabs[d].push(r(t,e+x*2))}else if(d==="tRNS")a.ctype===3?a.tabs[d]=i.readBytes(t,e,p):a.ctype===0?a.tabs[d]=r(t,e):a.ctype===2&&(a.tabs[d]=[r(t,e),r(t,e+2),r(t,e+4)]);else if(d==="gAMA")a.tabs[d]=i.readUint(t,e)/1e5;else if(d==="sRGB")a.tabs[d]=t[e];else if(d==="bKGD")a.ctype===0||a.ctype===4?a.tabs[d]=[r(t,e)]:a.ctype===2||a.ctype===6?a.tabs[d]=[r(t,e),r(t,e+2),r(t,e+4)]:a.ctype===3&&(a.tabs[d]=t[e]);else if(d==="IEND")break;e+=p,e+=4}if(u!==0){const p=a.frames[a.frames.length-1];p.data=ct.decode._decompress(a,c.slice(0,u),p.rect.width,p.rect.height),u=0}return a.data=ct.decode._decompress(a,o,a.width,a.height),delete a.compress,delete a.interlace,delete a.filter,a},ct.decode._decompress=function(n,t,e,i){const r=ct.decode._getBPP(n),s=Math.ceil(e*r/8),a=new Uint8Array((s+1+n.interlace)*i);return n.tabs.CgBI?t=ct.inflateRaw(t,a):t=ct.decode._inflate(t,a),n.interlace===0?t=ct.decode._filterZero(t,n,0,e,i):n.interlace===1&&(t=ct.decode._readInterlace(t,n)),t},ct.decode._inflate=function(n,t){return ct.inflateRaw(new Uint8Array(n.buffer,2,n.length-6),t)},ct.inflateRaw=function(){const n={};return n.H={},n.H.N=function(t,e){const i=Uint8Array;let r=0,s=0,a=0,o=0,l=0,c=0,u=0,g=0,p=0,d,y;if(t[0]===3&&t[1]===0)return e||new i(0);const x=n.H,C=x.b,A=x.e,P=x.R,M=x.n,D=x.A,z=x.Z,N=x.m,F=e===null;for(F&&(e=new i(t.length>>>2<<3));r===0;){if(r=C(t,p,1),s=C(t,p+1,2),p+=3,s===0){p&7&&(p+=8-(p&7));const G=(p>>>3)+4,H=t[G-4]|t[G-3]<<8;F&&(e=n.H.W(e,g+H)),e.set(new i(t.buffer,t.byteOffset+G,H),g),p=G+H<<3,g+=H;continue}if(F&&(e=n.H.W(e,g+131072)),s===1&&(d=N.J,y=N.h,c=511,u=31),s===2){a=A(t,p,5)+257,o=A(t,p+5,5)+1,l=A(t,p+10,4)+4,p+=14;let G=1;for(let X=0;X<38;X+=2)N.Q[X]=0,N.Q[X+1]=0;for(let X=0;X<l;X++){const J=A(t,p+X*3,3);N.Q[(N.X[X]<<1)+1]=J,J>G&&(G=J)}p+=3*l,M(N.Q,G),D(N.Q,G,N.u),d=N.w,y=N.d,p=P(N.u,(1<<G)-1,a+o,t,p,N.v);const H=x.V(N.v,0,a,N.C);c=(1<<H)-1;const Z=x.V(N.v,a,o,N.D);u=(1<<Z)-1,M(N.C,H),D(N.C,H,d),M(N.D,Z),D(N.D,Z,y)}for(;;){const G=d[z(t,p)&c];p+=G&15;const H=G>>>4;if(!(H>>>8))e[g++]=H;else{if(H===256)break;{let Z=g+H-254;if(H>264){const gt=N.q[H-257];Z=g+(gt>>>3)+A(t,p,gt&7),p+=gt&7}const X=y[z(t,p)&u];p+=X&15;const J=X>>>4,dt=N.c[J],ft=(dt>>>4)+C(t,p,dt&15);for(p+=dt&15;g<Z;)e[g]=e[g++-ft],e[g]=e[g++-ft],e[g]=e[g++-ft],e[g]=e[g++-ft];g=Z}}}}return e.length===g?e:e.slice(0,g)},n.H.W=function(t,e){const i=t.length;if(e<=i)return t;const r=new Uint8Array(i<<1);return r.set(t,0),r},n.H.R=function(t,e,i,r,s,a){const o=n.H.e,l=n.H.Z;let c=0;for(;c<i;){const u=t[l(r,s)&e];s+=u&15;const g=u>>>4;if(g<=15)a[c]=g,c++;else{let p=0,d=0;g===16?(d=3+o(r,s,2),s+=2,p=a[c-1]):g===17?(d=3+o(r,s,3),s+=3):g===18&&(d=11+o(r,s,7),s+=7);const y=c+d;for(;c<y;)a[c]=p,c++}}return s},n.H.V=function(t,e,i,r){let s=0,a=0;const o=r.length>>>1;for(;a<i;){const l=t[a+e];r[a<<1]=0,r[(a<<1)+1]=l,l>s&&(s=l),a++}for(;a<o;)r[a<<1]=0,r[(a<<1)+1]=0,a++;return s},n.H.n=function(t,e){const i=n.H.m,r=t.length;let s,a,o,l,c;const u=i.j;for(let p=0;p<=e;p++)u[p]=0;for(l=1;l<r;l+=2)u[t[l]]++;const g=i.K;for(s=0,u[0]=0,a=1;a<=e;a++)s=s+u[a-1]<<1,g[a]=s;for(o=0;o<r;o+=2)c=t[o+1],c!==0&&(t[o]=g[c],g[c]++)},n.H.A=function(t,e,i){const r=t.length,a=n.H.m.r;for(let o=0;o<r;o+=2)if(t[o+1]!==0){const l=o>>1,c=t[o+1],u=l<<4|c,g=e-c;let p=t[o]<<g;const d=p+(1<<g);for(;p!==d;){const y=a[p]>>>15-e;i[y]=u,p++}}},n.H.l=function(t,e){const i=n.H.m.r,r=15-e;for(let s=0;s<t.length;s+=2){const a=t[s]<<e-t[s+1];t[s]=i[a]>>>r}},n.H.M=function(t,e,i){i=i<<(e&7);const r=e>>>3;t[r]|=i,t[r+1]|=i>>>8},n.H.I=function(t,e,i){i=i<<(e&7);const r=e>>>3;t[r]|=i,t[r+1]|=i>>>8,t[r+2]|=i>>>16},n.H.e=function(t,e,i){return(t[e>>>3]|t[(e>>>3)+1]<<8)>>>(e&7)&(1<<i)-1},n.H.b=function(t,e,i){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)&(1<<i)-1},n.H.Z=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16)>>>(e&7)},n.H.i=function(t,e){return(t[e>>>3]|t[(e>>>3)+1]<<8|t[(e>>>3)+2]<<16|t[(e>>>3)+3]<<24)>>>(e&7)},n.H.m=function(){const t=Uint16Array,e=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new e(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(32768),s:new e(286),Y:new e(30),a:new e(19),t:new e(15e3),k:new t(65536),g:new t(32768)}}(),function(){const t=n.H.m,e=32768;for(let r=0;r<e;r++){let s=r;s=(s&2863311530)>>>1|(s&1431655765)<<1,s=(s&3435973836)>>>2|(s&858993459)<<2,s=(s&4042322160)>>>4|(s&252645135)<<4,s=(s&4278255360)>>>8|(s&16711935)<<8,t.r[r]=(s>>>16|s<<16)>>>17}function i(r,s,a){for(;s--!==0;)r.push(0,a)}for(let r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];i(t._,144,8),i(t._,112,9),i(t._,24,7),i(t._,8,8),n.H.n(t._,9),n.H.A(t._,9,t.J),n.H.l(t._,9),i(t.$,32,5),n.H.n(t.$,5),n.H.A(t.$,5,t.h),n.H.l(t.$,5),i(t.Q,19,0),i(t.C,286,0),i(t.D,30,0),i(t.v,320,0)}(),n.H.N}(),ct.decode._readInterlace=function(n,t){const e=t.width,i=t.height,r=ct.decode._getBPP(t),s=r>>3,a=Math.ceil(e*r/8),o=new Uint8Array(i*a);let l=0;const c=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],g=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1];let d=0;for(;d<7;){const y=g[d],x=p[d];let C=0,A=0,P=c[d];for(;P<i;)P+=y,A++;let M=u[d];for(;M<e;)M+=x,C++;const D=Math.ceil(C*r/8);ct.decode._filterZero(n,t,l,C,A);let z=0,N=c[d];for(;N<i;){let F=u[d],G=l+z*D<<3;for(;F<e;){if(r===1){let H=n[G>>3];H=H>>7-(G&7)&1,o[N*a+(F>>3)]|=H<<7-((F&7)<<0)}if(r===2){let H=n[G>>3];H=H>>6-(G&7)&3,o[N*a+(F>>2)]|=H<<6-((F&3)<<1)}if(r===4){let H=n[G>>3];H=H>>4-(G&7)&15,o[N*a+(F>>1)]|=H<<4-((F&1)<<2)}if(r>=8){const H=N*a+F*s;for(let Z=0;Z<s;Z++)o[H+Z]=n[(G>>3)+Z]}G+=r,F+=x}z++,N+=y}C*A!==0&&(l+=A*(1+D)),d=d+1}return o},ct.decode._getBPP=function(n){return[1,null,3,1,2,null,4][n.ctype]*n.depth},ct.decode._filterZero=function(n,t,e,i,r){let s=ct.decode._getBPP(t);const a=Math.ceil(i*s/8),o=ct.decode._paeth;s=Math.ceil(s/8);let l=0,c=1,u=n[e],g=0;if(u>1&&(n[e]=[0,0,1][u-2]),u===3)for(g=s;g<a;g++)n[g+1]=n[g+1]+(n[g+1-s]>>>1)&255;for(let p=0;p<r;p++)if(l=e+p*a,c=l+p+1,u=n[c-1],g=0,u===0)for(;g<a;g++)n[l+g]=n[c+g];else if(u===1){for(;g<s;g++)n[l+g]=n[c+g];for(;g<a;g++)n[l+g]=n[c+g]+n[l+g-s]}else if(u===2)for(;g<a;g++)n[l+g]=n[c+g]+n[l+g-a];else if(u===3){for(;g<s;g++)n[l+g]=n[c+g]+(n[l+g-a]>>>1);for(;g<a;g++)n[l+g]=n[c+g]+(n[l+g-a]+n[l+g-s]>>>1)}else{for(;g<s;g++)n[l+g]=n[c+g]+o(0,n[l+g-a],0);for(;g<a;g++)n[l+g]=n[c+g]+o(n[l+g-s],n[l+g-a],n[l+g-s-a])}return n},ct.decode._paeth=function(n,t,e){const i=n+t-e,r=i-n,s=i-t,a=i-e;return r*r<=s*s&&r*r<=a*a?n:s*s<=a*a?t:e},ct.decode._IHDR=function(n,t,e){const i=ct._bin;e.width=i.readUint(n,t),t+=4,e.height=i.readUint(n,t),t+=4,e.depth=n[t],t++,e.ctype=n[t],t++,e.compress=n[t],t++,e.filter=n[t],t++,e.interlace=n[t],t++},ct._bin={nextZero:function(n,t){for(;n[t]!==0;)t++;return t},readUshort:function(n,t){return n[t]<<8|n[t+1]},writeUshort:function(n,t,e){n[t]=e>>8&255,n[t+1]=e&255},readUint:function(n,t){return n[t]*16777216+(n[t+1]<<16|n[t+2]<<8|n[t+3])},writeUint:function(n,t,e){n[t]=e>>24&255,n[t+1]=e>>16&255,n[t+2]=e>>8&255,n[t+3]=e&255},readASCII:function(n,t,e){let i="";for(let r=0;r<e;r++)i+=String.fromCharCode(n[t+r]);return i},writeASCII:function(n,t,e){for(let i=0;i<e.length;i++)n[t+i]=e.charCodeAt(i)},readBytes:function(n,t,e){const i=[];for(let r=0;r<e;r++)i.push(n[t+r]);return i},pad:function(n){return n.length<2?"0"+n:n},readUTF8:function(n,t,e){let i="",r;for(let s=0;s<e;s++)i+="%"+ct._bin.pad(n[t+s].toString(16));try{r=decodeURIComponent(i)}catch{return ct._bin.readASCII(n,t,e)}return r}},ct._copyTile=function(n,t,e,i,r,s,a,o,l){const c=Math.min(t,r),u=Math.min(e,s);let g=0,p=0;for(let d=0;d<u;d++)for(let y=0;y<c;y++)if(a>=0&&o>=0?(g=d*t+y<<2,p=(o+d)*r+a+y<<2):(g=(-o+d)*t-a+y<<2,p=d*r+y<<2),l===0)i[p]=n[g],i[p+1]=n[g+1],i[p+2]=n[g+2],i[p+3]=n[g+3];else if(l===1){const x=n[g+3]*.00392156862745098,C=n[g]*x,A=n[g+1]*x,P=n[g+2]*x,M=i[p+3]*(1/255),D=i[p]*M,z=i[p+1]*M,N=i[p+2]*M,F=1-x,G=x+M*F,H=G===0?0:1/G;i[p+3]=255*G,i[p+0]=(C+D*F)*H,i[p+1]=(A+z*F)*H,i[p+2]=(P+N*F)*H}else if(l===2){const x=n[g+3],C=n[g],A=n[g+1],P=n[g+2],M=i[p+3],D=i[p],z=i[p+1],N=i[p+2];x===M&&C===D&&A===z&&P===N?(i[p]=0,i[p+1]=0,i[p+2]=0,i[p+3]=0):(i[p]=C,i[p+1]=A,i[p+2]=P,i[p+3]=x)}else if(l===3){const x=n[g+3],C=n[g],A=n[g+1],P=n[g+2],M=i[p+3],D=i[p],z=i[p+1],N=i[p+2];if(x===M&&C===D&&A===z&&P===N)continue;if(x<220&&M>20)return!1}return!0},ct.encode=function(n,t,e,i,r,s,a){i===null&&(i=0),a===null&&(a=!1);const o=ct.encode.compress(n,t,e,i,[!1,!1,!1,0,a]);return ct.encode.compressPNG(o,-1),ct.encode._main(o,t,e,r,s)},ct.encodeLL=function(n,t,e,i,r,s,a,o){const l={ctype:0+(i===1?0:2)+(r===0?0:4),depth:s,frames:[]},c=(i+r)*s,u=c*t;for(let p=0;p<n.length;p++)l.frames.push({rect:{x:0,y:0,width:t,height:e},img:new Uint8Array(n[p]),blend:0,dispose:1,bpp:Math.ceil(c/8),bpl:Math.ceil(u/8)});return ct.encode.compressPNG(l,0,!0),ct.encode._main(l,t,e,a,o)},ct.encode._main=function(n,t,e,i,r){r||(r={});const s=ct.crc.crc,a=ct._bin.writeUint,o=ct._bin.writeUshort,l=ct._bin.writeASCII;let c=8;const u=n.frames.length>1;let g=!1,p=8+(16+5+4)+(u?20:0);if(r.sRGB!==null&&r.sRGB!==void 0&&(p+=13),r.pHYs!==null&&r.pHYs!==void 0&&(p+=21),n.ctype===3){const C=n.plte.length;for(let A=0;A<C;A++)n.plte[A]>>>24!==255&&(g=!0);p+=8+C*3+4+(g?8+C*1+4:0)}for(let C=0;C<n.frames.length;C++){const A=n.frames[C];u&&(p+=38),p+=A.cimg.length+12,C!==0&&(p+=4)}p+=12;const d=new Uint8Array(p),y=[137,80,78,71,13,10,26,10];for(let C=0;C<8;C++)d[C]=y[C];if(a(d,c,13),c+=4,l(d,c,"IHDR"),c+=4,a(d,c,t),c+=4,a(d,c,e),c+=4,d[c]=n.depth,c++,d[c]=n.ctype,c++,d[c]=0,c++,d[c]=0,c++,d[c]=0,c++,a(d,c,s(d,c-17,17)),c+=4,r.sRGB!==null&&r.sRGB!==void 0&&(a(d,c,1),c+=4,l(d,c,"sRGB"),c+=4,d[c]=r.sRGB,c++,a(d,c,s(d,c-5,5)),c+=4),r.pHYs!==null&&r.pHYs!==void 0&&(a(d,c,9),c+=4,l(d,c,"pHYs"),c+=4,a(d,c,r.pHYs[0]),c+=4,a(d,c,r.pHYs[1]),c+=4,d[c]=r.pHYs[2],c++,a(d,c,s(d,c-13,13)),c+=4),u&&(a(d,c,8),c+=4,l(d,c,"acTL"),c+=4,a(d,c,n.frames.length),c+=4,a(d,c,r.loop!=null?r.loop:0),c+=4,a(d,c,s(d,c-12,12)),c+=4),n.ctype===3){const C=n.plte.length;a(d,c,C*3),c+=4,l(d,c,"PLTE"),c+=4;for(let A=0;A<C;A++){const P=A*3,M=n.plte[A],D=M&255,z=M>>>8&255,N=M>>>16&255;d[c+P+0]=D,d[c+P+1]=z,d[c+P+2]=N}if(c+=C*3,a(d,c,s(d,c-C*3-4,C*3+4)),c+=4,g){a(d,c,C),c+=4,l(d,c,"tRNS"),c+=4;for(let A=0;A<C;A++)d[c+A]=n.plte[A]>>>24&255;c+=C,a(d,c,s(d,c-C-4,C+4)),c+=4}}let x=0;for(let C=0;C<n.frames.length;C++){const A=n.frames[C];u&&(a(d,c,26),c+=4,l(d,c,"fcTL"),c+=4,a(d,c,x++),c+=4,a(d,c,A.rect.width),c+=4,a(d,c,A.rect.height),c+=4,a(d,c,A.rect.x),c+=4,a(d,c,A.rect.y),c+=4,o(d,c,i[C]),c+=2,o(d,c,1e3),c+=2,d[c]=A.dispose,c++,d[c]=A.blend,c++,a(d,c,s(d,c-30,30)),c+=4);const P=A.cimg,M=P.length;a(d,c,M+(C===0?0:4)),c+=4;const D=c;l(d,c,C===0?"IDAT":"fdAT"),c+=4,C!==0&&(a(d,c,x++),c+=4),d.set(P,c),c+=M,a(d,c,s(d,D,c-D)),c+=4}return a(d,c,0),c+=4,l(d,c,"IEND"),c+=4,a(d,c,s(d,c-4,4)),c+=4,d.buffer},ct.encode.compressPNG=function(n,t,e){for(let i=0;i<n.frames.length;i++){const r=n.frames[i],s=r.rect.height,a=new Uint8Array(s*r.bpl+s);r.cimg=ct.encode._filterZero(r.img,s,r.bpp,r.bpl,a,t,e)}},ct.encode.compress=function(n,t,e,i,r){const s=r[0],a=r[1],o=r[2],l=r[3],c=r[4];let u=6,g=8,p=255;for(let M=0;M<n.length;M++){const D=new Uint8Array(n[M]),z=D.length;for(let N=0;N<z;N+=4)p&=D[N+3]}const d=p!==255,y=ct.encode.framize(n,t,e,s,a,o),x={},C=[],A=[];if(i!==0){const M=[];for(let G=0;G<y.length;G++)M.push(y[G].img.buffer);const D=ct.encode.concatRGBA(M),z=ct.quantize(D,i);let N=0;const F=new Uint8Array(z.abuf);for(let G=0;G<y.length;G++){const H=y[G].img,Z=H.length;A.push(new Uint8Array(z.inds.buffer,N>>2,Z>>2));for(let X=0;X<Z;X+=4)H[X]=F[N+X],H[X+1]=F[N+X+1],H[X+2]=F[N+X+2],H[X+3]=F[N+X+3];N+=Z}for(let G=0;G<z.plte.length;G++)C.push(z.plte[G].est.rgba)}else for(let M=0;M<y.length;M++){const D=y[M],z=new Uint32Array(D.img.buffer),N=D.rect.width,F=z.length,G=new Uint8Array(F);A.push(G);for(let H=0;H<F;H++){const Z=z[H];if(H!==0&&Z===z[H-1])G[H]=G[H-1];else if(H>N&&Z===z[H-N])G[H]=G[H-N];else{let X=x[Z];if(X===null&&(x[Z]=X=C.length,C.push(Z),C.length>=300))break;G[H]=X}}}const P=C.length;P<=256&&c===!1&&(P<=2?g=1:P<=4?g=2:P<=16?g=4:g=8,g=Math.max(g,l));for(let M=0;M<y.length;M++){const D=y[M],z=D.rect.width,N=D.rect.height;let F=D.img,G=4*z,H=4;if(P<=256&&c===!1){G=Math.ceil(g*z/8);const Z=new Uint8Array(G*N),X=A[M];for(let J=0;J<N;J++){const dt=J*G,ft=J*z;if(g===8)for(let gt=0;gt<z;gt++)Z[dt+gt]=X[ft+gt];else if(g===4)for(let gt=0;gt<z;gt++)Z[dt+(gt>>1)]|=X[ft+gt]<<4-(gt&1)*4;else if(g===2)for(let gt=0;gt<z;gt++)Z[dt+(gt>>2)]|=X[ft+gt]<<6-(gt&3)*2;else if(g===1)for(let gt=0;gt<z;gt++)Z[dt+(gt>>3)]|=X[ft+gt]<<7-(gt&7)*1}F=Z,u=3,H=1}else if(d===!1&&y.length===1){const Z=new Uint8Array(z*N*3),X=z*N;for(let J=0;J<X;J++){const dt=J*3,ft=J*4;Z[dt]=F[ft],Z[dt+1]=F[ft+1],Z[dt+2]=F[ft+2]}F=Z,u=2,H=3,G=3*z}D.img=F,D.bpl=G,D.bpp=H}return{ctype:u,depth:g,plte:C,frames:y}},ct.encode.framize=function(n,t,e,i,r,s){const a=[];for(let o=0;o<n.length;o++){const l=new Uint8Array(n[o]),c=new Uint32Array(l.buffer);let u,g=0,p=0,d=t,y=e,x=i?1:0;if(o!==0){const C=s||i||o===1||a[o-2].dispose!==0?1:2;let A=0,P=1e9;for(let D=0;D<C;D++){const z=new Uint32Array(n[o-1-D]);let N=t,F=e,G=-1,H=-1;for(let X=0;X<e;X++)for(let J=0;J<t;J++){const dt=X*t+J;c[dt]!==z[dt]&&(J<N&&(N=J),J>G&&(G=J),X<F&&(F=X),X>H&&(H=X))}G===-1&&(N=F=G=H=0),r&&((N&1)===1&&N--,(F&1)===1&&F--);const Z=(G-N+1)*(H-F+1);Z<P&&(P=Z,A=D,g=N,p=F,d=G-N+1,y=H-F+1)}const M=new Uint8Array(n[o-1-A]);A===1&&(a[o-1].dispose=2),u=new Uint8Array(d*y*4),ct._copyTile(M,t,e,u,d,y,-g,-p,0),x=ct._copyTile(l,t,e,u,d,y,-g,-p,3)?1:0,x===1?ct.encode._prepareDiff(l,t,e,u,{x:g,y:p,width:d,height:y}):ct._copyTile(l,t,e,u,d,y,-g,-p,0)}else u=l.slice(0);a.push({rect:{x:g,y:p,width:d,height:y},img:u,blend:x,dispose:0})}if(i)for(let o=0;o<a.length;o++){const l=a[o];if(l.blend===1)continue;const c=l.rect,u=a[o-1].rect,g=Math.min(c.x,u.x),p=Math.min(c.y,u.y),d=Math.max(c.x+c.width,u.x+u.width),y=Math.max(c.y+c.height,u.y+u.height),x={x:g,y:p,width:d-g,height:y-p};a[o-1].dispose=1,o-1!==0&&ct.encode._updateFrame(n,t,e,a,o-1,x,r),ct.encode._updateFrame(n,t,e,a,o,x,r)}return a},ct.encode._updateFrame=function(n,t,e,i,r,s,a){const o=Uint8Array,l=Uint32Array,c=new o(n[r-1]),u=new l(n[r-1]),g=r+1<n.length?new o(n[r+1]):null,p=new o(n[r]),d=new l(p.buffer);let y=t,x=e,C=-1,A=-1;for(let M=0;M<s.height;M++)for(let D=0;D<s.width;D++){const z=s.x+D,N=s.y+M,F=N*t+z,G=d[F];G===0||i[r-1].dispose===0&&u[F]===G&&(g===null||g[F*4+3]!==0)||(z<y&&(y=z),z>C&&(C=z),N<x&&(x=N),N>A&&(A=N))}C===-1&&(y=x=C=A=0),a&&((y&1)===1&&y--,(x&1)===1&&x--),s={x:y,y:x,width:C-y+1,height:A-x+1};const P=i[r];P.rect=s,P.blend=1,P.img=new Uint8Array(s.width*s.height*4),i[r-1].dispose===0?(ct._copyTile(c,t,e,P.img,s.width,s.height,-s.x,-s.y,0),ct.encode._prepareDiff(p,t,e,P.img,s)):ct._copyTile(p,t,e,P.img,s.width,s.height,-s.x,-s.y,0)},ct.encode._prepareDiff=function(n,t,e,i,r){ct._copyTile(n,t,e,i,r.width,r.height,-r.x,-r.y,2)},ct.encode._filterZero=function(n,t,e,i,r,s,a){const o=[];let l=[0,1,2,3,4];s!==-1?l=[s]:(t*i>5e5||e===1)&&(l=[0]);let c;a&&(c={level:0});const u=r.length>1e7&&To!=null?To:i0;for(let d=0;d<l.length;d++){for(let y=0;y<t;y++)ct.encode._filterLine(r,n,y,i,e,l[d]);o.push(u.deflate(r,c))}let g,p=1e9;for(let d=0;d<o.length;d++)o[d].length<p&&(g=d,p=o[d].length);return o[g]},ct.encode._filterLine=function(n,t,e,i,r,s){const a=e*i;let o=a+e;const l=ct.decode._paeth;if(n[o]=s,o++,s===0)if(i<500)for(let c=0;c<i;c++)n[o+c]=t[a+c];else n.set(new Uint8Array(t.buffer,a,i),o);else if(s===1){for(let c=0;c<r;c++)n[o+c]=t[a+c];for(let c=r;c<i;c++)n[o+c]=t[a+c]-t[a+c-r]+256&255}else if(e===0){for(let c=0;c<r;c++)n[o+c]=t[a+c];if(s===2)for(let c=r;c<i;c++)n[o+c]=t[a+c];if(s===3)for(let c=r;c<i;c++)n[o+c]=t[a+c]-(t[a+c-r]>>1)+256&255;if(s===4)for(let c=r;c<i;c++)n[o+c]=t[a+c]-l(t[a+c-r],0,0)+256&255}else{if(s===2)for(let c=0;c<i;c++)n[o+c]=t[a+c]+256-t[a+c-i]&255;if(s===3){for(let c=0;c<r;c++)n[o+c]=t[a+c]+256-(t[a+c-i]>>1)&255;for(let c=r;c<i;c++)n[o+c]=t[a+c]+256-(t[a+c-i]+t[a+c-r]>>1)&255}if(s===4){for(let c=0;c<r;c++)n[o+c]=t[a+c]+256-l(0,t[a+c-i],0)&255;for(let c=r;c<i;c++)n[o+c]=t[a+c]+256-l(t[a+c-r],t[a+c-i],t[a+c-r-i])&255}}},ct.crc={table:function(){const n=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let i=0;i<8;i++)e&1?e=3988292384^e>>>1:e=e>>>1;n[t]=e}return n}(),update:function(n,t,e,i){for(let r=0;r<i;r++)n=ct.crc.table[(n^t[e+r])&255]^n>>>8;return n},crc:function(n,t,e){return ct.crc.update(4294967295,n,t,e)^4294967295}},ct.quantize=function(n,t){const e=new Uint8Array(n),i=e.slice(0),r=new Uint32Array(i.buffer),s=ct.quantize.getKDtree(i,t),a=s[0],o=s[1],l=ct.quantize.planeDst,c=e,u=r,g=c.length,p=new Uint8Array(e.length>>2);let d;if(e.length<2e7)for(let y=0;y<g;y+=4){const x=c[y]*.00392156862745098,C=c[y+1]*(1/255),A=c[y+2]*(1/255),P=c[y+3]*(1/255);d=ct.quantize.getNearest(a,x,C,A,P),p[y>>2]=d.ind,u[y>>2]=d.est.rgba}else for(let y=0;y<g;y+=4){const x=c[y]*.00392156862745098,C=c[y+1]*(1/255),A=c[y+2]*(1/255),P=c[y+3]*(1/255);for(d=a;d.left;)d=l(d.est,x,C,A,P)<=0?d.left:d.right;p[y>>2]=d.ind,u[y>>2]=d.est.rgba}return{abuf:i.buffer,inds:p,plte:o}},ct.quantize.getKDtree=function(n,t,e){e===null&&(e=1e-4);const i=new Uint32Array(n.buffer),r={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=ct.quantize.stats(n,r.i0,r.i1),r.est=ct.quantize.estats(r.bst);const s=[r];for(;s.length<t;){let a=0,o=0;for(let d=0;d<s.length;d++)s[d].est.L>a&&(a=s[d].est.L,o=d);if(a<e)break;const l=s[o],c=ct.quantize.splitPixels(n,i,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=c||l.i1<=c){l.est.L=0;continue}const g={i0:l.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};g.bst=ct.quantize.stats(n,g.i0,g.i1),g.est=ct.quantize.estats(g.bst);const p={i0:c,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};p.bst={R:[],m:[],N:l.bst.N-g.bst.N};for(let d=0;d<16;d++)p.bst.R[d]=l.bst.R[d]-g.bst.R[d];for(let d=0;d<4;d++)p.bst.m[d]=l.bst.m[d]-g.bst.m[d];p.est=ct.quantize.estats(p.bst),l.left=g,l.right=p,s[o]=g,s.push(p)}s.sort(function(a,o){return o.bst.N-a.bst.N});for(let a=0;a<s.length;a++)s[a].ind=a;return[r,s]},ct.quantize.getNearest=function(n,t,e,i,r){if(n.left==null)return n.tdst=ct.quantize.dist(n.est.q,t,e,i,r),n;const s=ct.quantize.planeDst(n.est,t,e,i,r);let a=n.left,o=n.right;s>0&&(a=n.right,o=n.left);const l=ct.quantize.getNearest(a,t,e,i,r);if(l.tdst<=s*s)return l;const c=ct.quantize.getNearest(o,t,e,i,r);return c.tdst<l.tdst?c:l},ct.quantize.planeDst=function(n,t,e,i,r){const s=n.e;return s[0]*t+s[1]*e+s[2]*i+s[3]*r-n.eMq},ct.quantize.dist=function(n,t,e,i,r){const s=t-n[0],a=e-n[1],o=i-n[2],l=r-n[3];return s*s+a*a+o*o+l*l},ct.quantize.splitPixels=function(n,t,e,i,r,s){const a=ct.quantize.vecDot;for(i-=4;e<i;){for(;a(n,e,r)<=s;)e+=4;for(;a(n,i,r)>s;)i-=4;if(e>=i)break;const o=t[e>>2];t[e>>2]=t[i>>2],t[i>>2]=o,e+=4,i-=4}for(;a(n,e,r)>s;)e-=4;return e+4},ct.quantize.vecDot=function(n,t,e){return n[t]*e[0]+n[t+1]*e[1]+n[t+2]*e[2]+n[t+3]*e[3]},ct.quantize.stats=function(n,t,e){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],s=e-t>>2;for(let a=t;a<e;a+=4){const o=n[a]*.00392156862745098,l=n[a+1]*(1/255),c=n[a+2]*(1/255),u=n[a+3]*(1/255);r[0]+=o,r[1]+=l,r[2]+=c,r[3]+=u,i[0]+=o*o,i[1]+=o*l,i[2]+=o*c,i[3]+=o*u,i[5]+=l*l,i[6]+=l*c,i[7]+=l*u,i[10]+=c*c,i[11]+=c*u,i[15]+=u*u}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:r,N:s}},ct.quantize.estats=function(n){const t=n.R,e=n.m,i=n.N,r=e[0],s=e[1],a=e[2],o=e[3],l=i===0?0:1/i,c=[t[0]-r*r*l,t[1]-r*s*l,t[2]-r*a*l,t[3]-r*o*l,t[4]-s*r*l,t[5]-s*s*l,t[6]-s*a*l,t[7]-s*o*l,t[8]-a*r*l,t[9]-a*s*l,t[10]-a*a*l,t[11]-a*o*l,t[12]-o*r*l,t[13]-o*s*l,t[14]-o*a*l,t[15]-o*o*l],u=c,g=ct.M4;let p=[Math.random(),Math.random(),Math.random(),Math.random()],d=0,y=0;if(i!==0)for(let A=0;A<16&&(p=g.multVec(u,p),y=Math.sqrt(g.dot(p,p)),p=g.sml(1/y,p),!(A!==0&&Math.abs(y-d)<1e-9));A++)d=y;const x=[r*l,s*l,a*l,o*l],C=g.dot(g.sml(255,x),p);return{Cov:c,q:x,e:p,L:d,eMq255:C,eMq:g.dot(p,x),rgba:(Math.round(255*x[3])<<24|Math.round(255*x[2])<<16|Math.round(255*x[1])<<8|Math.round(255*x[0])<<0)>>>0}},ct.M4={multVec:function(n,t){return[n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3],n[4]*t[0]+n[5]*t[1]+n[6]*t[2]+n[7]*t[3],n[8]*t[0]+n[9]*t[1]+n[10]*t[2]+n[11]*t[3],n[12]*t[0]+n[13]*t[1]+n[14]*t[2]+n[15]*t[3]]},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]},sml:function(n,t){return[n*t[0],n*t[1],n*t[2],n*t[3]]}},ct.encode.concatRGBA=function(n){let t=0;for(let r=0;r<n.length;r++)t+=n[r].byteLength;const e=new Uint8Array(t);let i=0;for(let r=0;r<n.length;r++){const s=new Uint8Array(n[r]),a=s.length;for(let o=0;o<a;o+=4){let l=s[o],c=s[o+1],u=s[o+2];const g=s[o+3];g===0&&(l=c=u=0),e[i+o]=l,e[i+o+1]=c,e[i+o+2]=u,e[i+o+3]=g}i+=a}return e.buffer};const r0=ct,Cr=new Map,$s=(n,t)=>{if(Cr.has(n))return t(null,Cr.get(n));const e=new Image;e.onload=function(){Cr.set(n,{width:e.width,height:e.height,element:e}),t(null,Cr.get(n))},e.onerror=function(i){t(i,null)},e.src=n},s0=(n,t)=>{for(let e=0,i=n.length;e<i;e++){const r=n[e],{type:s}=r;if(s.split("/")[0]!=="image")return;const o=new FileReader;o.onload=function(l){if(!l.target)return t("no reader target",null);const c=l.target.result,u=la(c),g=new Blob([c]);qs(g,(p,d)=>{if(!d)return t(p,null);$s(d,(y,x)=>{if(!x)return t(y,null);Xl(d,(C,A)=>{if(!A)return t(C,null);const P={name:r.name,fileType:u,size:r.size,width:x.width,height:x.height,imgUrl:d,imageData:A,blob:g};return t(null,P)})})})},o.readAsArrayBuffer(r)}},Xl=(n,t)=>{$s(n,(e,i)=>{if(!i)return t(e,null);const r=document.createElement("canvas"),s=r.getContext("2d");r.width=i.width,r.height=i.height,s.drawImage(i.element,0,0,r.width,r.height);const a=s.getImageData(0,0,r.width,r.height);return t(null,a)})},a0=(n,t=0,e=0)=>{const i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=e,r.drawImage(n,0,0,t,e),r.getImageData(0,0,t,e)},o0=(n,t=0,e=0)=>{const i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=e,r.drawImage(n,0,0,t,e),r.getImageData(0,0,t,e)},l0=n=>{const t=n.width,e=n.height,i=t*e*3,r=i+54,s=[66,77,r&255,r>>8&255,r>>16&255,r>>24&255,0,0,0,0,54,0,0,0],a=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=(4-t*3%4)%4,l=n.data;let c="";const u=t<<2;let g=e;const p=String.fromCharCode;do{const y=u*(g-1);let x="";for(let C=0;C<t;C++){const A=C<<2;x+=p(l[y+A+2])+p(l[y+A+1])+p(l[y+A])}for(let C=0;C<o;C++)x+=String.fromCharCode(0);c+=x}while(--g);function d(y){if(!window.btoa)throw"btoa undefined";let x="";if(typeof y=="string")x=y;else for(let C=0;C<y.length;C++)x+=String.fromCharCode(y[C]);return btoa(x)}return d(s.concat(a))+d(c)},c0=n=>{const{width:t,height:e}=n,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=e,r.putImageData(n,0,0,0,0,t,e),i.toDataURL("image/png")},h0=(n,t,e)=>{const{width:i,height:r}=n,s=document.createElement("canvas"),a=s.getContext("2d");s.width=i,s.height=r,a.putImageData(n,0,0,0,0,i,r);const o=`image/${t?t.toLowerCase():"png"}`;s.toBlob(l=>{e?.(null,l)},o,1)},qs=(n,t)=>{const e=new FileReader;e.onload=function(i){i.target?t(null,i.target.result):t("can't readAsDataURL",null)},e.readAsDataURL(n)},f0=(n,t)=>{qs(n,function(e,i){if(i){const r=new Image;r.src=i}else t(e)})};function u0(n){const t=[],e=[],i=[];let r=0;for(let l=0,c=n.data.length;l<c;l+=4)t[r]=n.data[l],e[r]=n.data[l+1],i[r]=n.data[l+2],r+=1;const s=Ws(t),a=Ws(e),o=Ws(i);return"rgb("+s+","+a+","+o+")"}function Ws(n){const t={},e=[],i=[];for(let o=0;o<n.length;o++)t[n[o]]?e.push(n[o]):t[n[o]]=1;let r=0;for(let o=0;o<e.length;o++){r=0;for(let l=0;l<e.length;l++)e[o]===e[l]&&(r+=1),i[o]=r}const s=Math.max.apply(null,i);let a=0;for(;a<i.length;a++)if(i[a]===s)return;return e[a]}const d0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[(a*e+e-o-1)*4],r[l+1]=t[(a*e+e-o-1)*4+1],r[l+2]=t[(a*e+e-o-1)*4+2],r[l+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(r,e,i)},p0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[((i-a-1)*e+o)*4],r[l+1]=t[((i-a-1)*e+o)*4+1],r[l+2]=t[((i-a-1)*e+o)*4+2],r[l+3]=t[((i-a-1)*e+o)*4+3]}return new ImageData(r,e,i)},g0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<i;o++){const l=(a*i+o)*4;r[l]=t[(o*e+e-a-1)*4],r[l+1]=t[(o*e+e-a-1)*4+1],r[l+2]=t[(o*e+e-a-1)*4+2],r[l+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(r,i,e)},m0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<e;a++)for(let o=0;o<i;o++){const l=(a*i+o)*4;r[l]=t[((i-o-1)*e+a)*4],r[l+1]=t[((i-o-1)*e+a)*4+1],r[l+2]=t[((i-o-1)*e+a)*4+2],r[l+3]=t[((i-o-1)*e+a)*4+3]}return new ImageData(r,i,e)},v0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,c=(t[l]+t[l+1]+t[l+2])/3;r[l]=c,r[l+1]=c,r[l+2]=c,r[l+3]=t[l+3]}return new ImageData(r,e,i)},_0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,c=.2126*t[l]+.7152*t[l+1]+.0722*t[l+2];r[l]=c,r[l+1]=c,r[l+2]=c,r[l+3]=t[l+3]}return new ImageData(r,e,i)},w0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,u=(t[l]+t[l+1]+t[l+2])/3>127?255:0;r[l]=u,r[l+1]=u,r[l+2]=u,r[l+3]=t[l+3]}return new ImageData(r,e,i)},y0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=255-t[l],r[l+1]=255-t[l+1],r[l+2]=255-t[l+2],r[l+3]=t[l+3]}return new ImageData(r,e,i)},x0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[l],r[l+1]=0,r[l+2]=0,r[l+3]=t[l+3]}return new ImageData(r,e,i)},b0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=0,r[l+1]=t[l+1],r[l+2]=0,r[l+3]=t[l+3]}return new ImageData(r,e,i)},T0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=0,r[l+1]=0,r[l+2]=t[l+2],r[l+3]=t[l+3]}return new ImageData(r,e,i)},C0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[l],r[l+1]=t[l+1],r[l+2]=0,r[l+3]=t[l+3]}return new ImageData(r,e,i)},E0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[l],r[l+1]=0,r[l+2]=t[l+1],r[l+3]=t[l+3]}return new ImageData(r,e,i)},k0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=0,r[l+1]=t[l+1],r[l+2]=t[l+1],r[l+3]=t[l+3]}return new ImageData(r,e,i)},S0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,c=(t[l+1]+t[l+2])/2;r[l]=t[l],r[l+1]=c,r[l+2]=c,r[l+3]=t[l+3]}return new ImageData(r,e,i)},A0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,c=(t[l]+t[l+2])/2;r[l]=c,r[l+1]=t[l+1],r[l+2]=c,r[l+3]=t[l+3]}return new ImageData(r,e,i)},P0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4,c=(t[l]+t[l+1])/2;r[l]=c,r[l+1]=c,r[l+2]=t[l+2],r[l+3]=t[l+3]}return new ImageData(r,e,i)},I0=n=>Yl(n,[-1,-1,-1,-1,9,-1,-1,-1,-1]),M0=n=>Yl(n,[-1,-1,-1,-1,8,-1,-1,-1,-1]),L0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;r[l]=t[l],r[l+1]=t[l+1],r[l+2]=t[l+2],r[l+3]=255}return new ImageData(r,e,i)},D0=n=>{const{data:t,width:e,height:i}=n,r=new Uint8ClampedArray(t.length);for(let a=0;a<i;a++)for(let o=0;o<e;o++){const l=(a*e+o)*4;if(t[l+3]===0)r[l]=255,r[l+1]=255,r[l+2]=255,r[l+3]=255;else{const c=Zl([t[l],t[l+1],t[l+2],t[l+3]],[255,255,255,255]);r[l]=c[0],r[l+1]=c[1],r[l+2]=c[2],r[l+3]=c[3]}}return new ImageData(r,e,i)},R0=(n,t,e,i,r,s=!1,a)=>{const{data:o,width:l,height:c}=n;let u=r,g=i,p=t,d=e;if(u<0?u=0:u>l&&(u=l),g<0?g=0:g>c&&(g=c),p<1?p=1:p>l&&(p=l),d<1?d=1:d>c&&(d=c),u+p>l&&(p=l-u),g+d>c&&(d=c-g),s){const y=new Uint8ClampedArray(o.length);for(let C=0;C<c;C++)for(let A=0;A<l;A++){const P=(C*l+A)*4;A>=u&&A<=u+p&&C>=g&&C<=g+d?(y[P]=o[P],y[P+1]=o[P+1],y[P+2]=o[P+2],y[P+3]=o[P+3]):(y[P]=255,y[P+1]=255,y[P+2]=255,y[P+3]=a&&["JPG","JPEG"].includes(a.toUpperCase())?255:0)}return new ImageData(y,l,c)}else{const y=new Uint8ClampedArray(p*d*4);for(let C=g;C<=g+d;C++)for(let A=u;A<=u+p;A++){const P=((C-g)*p+A-u)*4,M=(C*l+A)*4;y[P]=o[M],y[P+1]=o[M+1],y[P+2]=o[M+2],y[P+3]=o[M+3]}return new ImageData(y,p,d)}},O0=(n,t,e,i)=>{const{data:r,width:s,height:a}=n;let o=t;o>Math.floor(s/2)&&(o=Math.floor(s/2)),o>Math.floor(a/2)&&(o=Math.floor(a/2)),o<0&&(o=0);const l=new Uint8ClampedArray(r.length);for(let u=0;u<a;u++)for(let g=0;g<s;g++){const p=(u*s+g)*4;let d=-1;g<o?u<o?d=Math.sqrt(Math.pow(o-g-1,2)+Math.pow(o-u-1,2)):u>a-o-1&&(d=Math.sqrt(Math.pow(o-g-1,2)+Math.pow(u-(a-o),2))):g>s-o-1&&(u<o?d=Math.sqrt(Math.pow(g-(s-o),2)+Math.pow(o-u-1,2)):u>a-o-1&&(d=Math.sqrt(Math.pow(g-(s-o),2)+Math.pow(u-(a-o),2)))),Math.round(d)>o?(l[p]=255,l[p+1]=255,l[p+2]=255,l[p+3]=i||e.toUpperCase()==="PNG"?0:255):(l[p]=r[p],l[p+1]=r[p+1],l[p+2]=r[p+2],l[p+3]=i||e.toUpperCase()==="PNG"?r[p+3]:255)}return new ImageData(l,s,a)},F0=(n,t,e,i,r,s=1e4)=>{const a=new Image;a.src=n;const o=document.createElement("canvas"),l=o.getContext("2d");return o.width=s,o.height=s,l.drawImage(a,0,0,t,e,0,0,i,r),l.getImageData(0,0,i,r)},z0=(n,t)=>{const{data:e,width:i,height:r}=n,s=new Uint8ClampedArray(e.length);for(let o=0;o<r;o++)for(let l=0;l<i;l++){const c=(o*i+l)*4;s[c]=Math.max(Math.min(e[c]+t,255),0),s[c+1]=Math.max(Math.min(e[c+1]+t,255),0),s[c+2]=Math.max(Math.min(e[c+2]+t,255),0),s[c+3]=e[c+3]}return new ImageData(s,i,r)},U0=(n,t,e=!1)=>{const{data:i,width:r,height:s}=n,a=new Uint8ClampedArray(i.length);for(let l=0;l<s;l++)for(let c=0;c<r;c++){const u=(l*r+c)*4;i[u+3]===0?(a[u]=255,a[u+1]=255,a[u+2]=255):(a[u]=i[u],a[u+1]=i[u+1],a[u+2]=i[u+2]);let g=i[u+3];e?g=Math.max(Math.min(Math.floor(255*t),255),0):g=Math.max(Math.min(Math.floor(g+255*t),255),0),a[u+3]=g}return new ImageData(a,r,s)},N0=(n,t,e,i)=>{const{data:r,width:s,height:a}=n,{data:o,width:l,height:c}=t;let u=e,g=i;e+c>a&&(u=a-c),i+l>s&&(g=s-l);const p=new Uint8ClampedArray(r.length);for(let y=0;y<a;y++)for(let x=0;x<s;x++){const C=(y*s+x)*4;if(x<g||x>g+l||y<=u||y>=u+c)p[C]=r[C],p[C+1]=r[C+1],p[C+2]=r[C+2],p[C+3]=r[C+3];else{const A=(y*s+x-((u+1)*s+(y-(u+1))*(s-l))+l-g-1)*4,P=[o[A],o[A+1],o[A+2],o[A+3]],M=[r[C],r[C+1],r[C+2],r[C+3]],D=Zl(P,M);p[C]=D[0],p[C+1]=D[1],p[C+2]=D[2],p[C+3]=D[3]}}return new ImageData(p,s,a)},B0=(n,t,e,i,r,s=10)=>{const{data:a,width:o,height:l}=n;let c=r,u=i,g=t,p=e;c<0?c=0:c>o&&(c=o),u<0?u=0:u>l&&(u=l),g<1?g=1:g>o&&(g=o),p<1?p=1:p>l&&(p=l),c+g>o&&(g=o-c),u+p>l&&(p=l-u);const d=new Uint8ClampedArray(a.length);for(let x=0;x<l;x++)for(let C=0;C<o;C++){const A=(x*o+C)*4;if(C>=c&&C<=c+g&&x>=u&&x<=u+p){const P=Math.floor((C-c)/s),M=Math.floor((x-u)/s);let D=Math.floor(s*(P+1)-s/2+c),z=Math.floor(s*(M+1)-s/2+u);D>o-1&&(D=o-1),z>l-1&&(z=l-1);const N=(z*o+D)*4;d[A]=a[N],d[A+1]=a[N+1],d[A+2]=a[N+2],d[A+3]=a[N+3]}else d[A]=a[A],d[A+1]=a[A+1],d[A+2]=a[A+2],d[A+3]=a[A+3]}return new ImageData(d,o,l)},G0=async(n,t,e,i,r,s)=>{const a=r/100;if(["JPG","JPEG"].includes(i.toUpperCase())){const o=new Image;o.src=n;const l=document.createElement("canvas"),c=l.getContext("2d");l.width=t,l.height=e,c.drawImage(o,0,0,t,e),l.toBlob(u=>{s(u)},`image/${i.toLowerCase()}`,a)}else{const o=Math.floor(a*256),l=r0.encode([n.data.buffer],t,e,o),c=new Blob([l]);s&&s(c)}},H0=(n,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}})=>{if(t&&e){const{data:i,width:r,height:s}=n,{data:a}=t,o=new Uint8ClampedArray(i.length),{backgroundColor:l,changeIntoColor:c}=e;for(let g=0;g<s;g++)for(let p=0;p<r;p++){const d=(g*r+p)*4,y=a[d],x=a[d+1],C=a[d+2],A=a[d+3];y===l.r&&x===l.g&&C===l.b&&A===l.a&&c.a!==0?(o[d]=c.r,o[d+1]=c.g,o[d+2]=c.b,o[d+3]=c.a):(o[d]=i[d],o[d+1]=i[d+1],o[d+2]=i[d+2],o[d+3]=i[d+3])}return new ImageData(o,r,s)}return n},Yl=(n,t)=>{const{data:e,width:i,height:r}=n,s=new Uint8ClampedArray(e.length);for(let o=0;o<r;o++)for(let l=0;l<i;l++){const c=(o*i+l)*4;for(let u=0;u<3;u++){const g=c+u;l===0||l===i-1||o===0||o===r-1?s[g]=e[g]:s[g]=t[0]*e[g-i*4-4]+t[1]*e[g-i*4]+t[2]*e[g-i*4+4]+t[3]*e[g-4]+t[4]*e[g]+t[5]*e[g+4]+t[6]*e[g+i*4-4]+t[7]*e[g+i*4]+t[8]*e[g+i*4+4]}s[c+3]=e[c+3]}return new ImageData(s,i,r)},Zl=(n,t)=>{if(n&&n.length===4&&t&&t.length===4){const e=n[3],i=t[3];if(e===255||i===0)return n;if(e===0)return t;{const r=e/255,s=i/255,a=Math.max(Math.min(Math.floor(n[0]*r+t[0]*s*(1-r)),255),0),o=Math.max(Math.min(Math.floor(n[1]*r+t[1]*s*(1-r)),255),0),l=Math.max(Math.min(Math.floor(n[2]*r+t[2]*s*(1-r)),255),0),c=Math.max(Math.min(Math.floor((r+s*(1-r))*255),255),0);return[a,o,l,c]}}return[255,255,255,255]},$l=function(n,t,e){const i=new Array(n*n),r=function(o){const l=o;let c=0,u=0;return{write(g,p){if(g>>>p)throw new Error("length over");for(;c+p>=8;)l.writeByte(255&(g<<c|u)),p-=8-c,g>>>=8-c,u=0,c=0;u=g<<c|u,c=c+p},flush(){c>0&&l.writeByte(u)}}},s=function(o){const l=1<<o,c=(1<<o)+1;let u=o+1;const g=a();for(let C=0;C<l;C++)g.add(String.fromCharCode(C));g.add(String.fromCharCode(l)),g.add(String.fromCharCode(c));const p=ca(),d=r(p);d.write(l,u);let y=0,x=String.fromCharCode(i[y]);for(y+=1;y<i.length;){const C=String.fromCharCode(i[y]);y+=1,g.contains(x+C)?x=x+C:(d.write(g.indexOf(x),u),g.size()<4095&&(g.size()==1<<u&&(u+=1),g.add(x+C)),x=C)}return d.write(g.indexOf(x),u),d.write(c,u),d.flush(),p.toByteArray()},a=function(){const o={};let l=0;return{add(c){if(this.contains(c))throw new Error("dup key:"+c);o[c]=l,l+=1},size(){return l},indexOf(c){return o[c]},contains(c){return typeof o[c]<"u"}}};return{setPixel(o,l,c){i[l*n+o]=c},write(o){o.writeString("GIF87a"),o.writeShort(n),o.writeShort(n),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(On("0x"+t[1]+t[2])),o.writeByte(On("0x"+t[3]+t[4])),o.writeByte(On("0x"+t[5]+t[6])),o.writeByte(On("0x"+e[1]+e[2])),o.writeByte(On("0x"+e[3]+e[4])),o.writeByte(On("0x"+e[5]+e[6])),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(n),o.writeShort(n),o.writeByte(0);const l=2,c=s(l);o.writeByte(l);let u=0;for(;c.length-u>255;)o.writeByte(255),o.writeBytes(c,u,255),u+=255;o.writeByte(c.length-u),o.writeBytes(c,u,c.length-u),o.writeByte(0),o.writeString(";")}}},ql=function(n,t,e,i){const r=$l(n,t,e);for(let c=0;c<n;c++)for(let u=0;u<n;u++)r.setPixel(u,c,i(u,c));const s=ca();r.write(s);const a=_c(),o=s.toByteArray();for(let c=0,u=o.length;c<u;c++)a.writeByte(o[c]);a.flush();let l="";return l+="data:image/gif;base64,",l+=a,l},ue={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Oi={M:0,L:1,H:2,Q:3},cn={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Zt={glog:function(n){if(n<1)throw new Error("glog("+n+")");return Zt.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return Zt.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let n=0;n<8;n++)Zt.EXP_TABLE[n]=1<<n;for(let n=8;n<256;n++)Zt.EXP_TABLE[n]=Zt.EXP_TABLE[n-4]^Zt.EXP_TABLE[n-5]^Zt.EXP_TABLE[n-6]^Zt.EXP_TABLE[n-8];for(let n=0;n<255;n++)Zt.LOG_TABLE[Zt.EXP_TABLE[n]]=n;const Gt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(n){let t=n<<10;for(;Gt.getBCHDigit(t)-Gt.getBCHDigit(Gt.G15)>=0;)t^=Gt.G15<<Gt.getBCHDigit(t)-Gt.getBCHDigit(Gt.G15);return(n<<10|t)^Gt.G15_MASK},getBCHTypeNumber:function(n){let t=n<<12;for(;Gt.getBCHDigit(t)-Gt.getBCHDigit(Gt.G18)>=0;)t^=Gt.G18<<Gt.getBCHDigit(t)-Gt.getBCHDigit(Gt.G18);return n<<12|t},getBCHDigit:function(n){let t=0;for(;n!=0;)t++,n>>>=1;return t},getPatternPosition:function(n){return Gt.PATTERN_POSITION_TABLE[n-1]},getMask:function(n,t,e){switch(n){case cn.PATTERN000:return(t+e)%2==0;case cn.PATTERN001:return t%2==0;case cn.PATTERN010:return e%3==0;case cn.PATTERN011:return(t+e)%3==0;case cn.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case cn.PATTERN101:return t*e%2+t*e%3==0;case cn.PATTERN110:return(t*e%2+t*e%3)%2==0;case cn.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}},getErrorCorrectPolynomial:function(n){let t=new qn([1],0);for(let e=0;e<n;e++)t=t.multiply(new qn([1,Zt.gexp(e)],0));return t},getLengthInBits:function(n,t){if(1<=t&&t<10)switch(n){case ue.MODE_NUMBER:return 10;case ue.MODE_ALPHA_NUM:return 9;case ue.MODE_8BIT_BYTE:return 8;case ue.MODE_KANJI:return 8;default:throw new Error("mode:"+n)}else if(t<27)switch(n){case ue.MODE_NUMBER:return 12;case ue.MODE_ALPHA_NUM:return 11;case ue.MODE_8BIT_BYTE:return 16;case ue.MODE_KANJI:return 10;default:throw new Error("mode:"+n)}else if(t<41)switch(n){case ue.MODE_NUMBER:return 14;case ue.MODE_ALPHA_NUM:return 13;case ue.MODE_8BIT_BYTE:return 16;case ue.MODE_KANJI:return 12;default:throw new Error("mode:"+n)}else throw new Error("type:"+t)},getLostPoint:function(n){const t=n.getModuleCount();let e=0;for(let s=0;s<t;s++)for(let a=0;a<t;a++){let o=0;const l=n.isDark(s,a);for(let c=-1;c<=1;c++)if(!(s+c<0||t<=s+c))for(let u=-1;u<=1;u++)a+u<0||t<=a+u||c==0&&u==0||l==n.isDark(s+c,a+u)&&o++;o>5&&(e+=3+o-5)}for(let s=0;s<t-1;s++)for(let a=0;a<t-1;a++){let o=0;n.isDark(s,a)&&o++,n.isDark(s+1,a)&&o++,n.isDark(s,a+1)&&o++,n.isDark(s+1,a+1)&&o++,(o==0||o==4)&&(e+=3)}for(let s=0;s<t;s++)for(let a=0;a<t-6;a++)n.isDark(s,a)&&!n.isDark(s,a+1)&&n.isDark(s,a+2)&&n.isDark(s,a+3)&&n.isDark(s,a+4)&&!n.isDark(s,a+5)&&n.isDark(s,a+6)&&(e+=40);for(let s=0;s<t;s++)for(let a=0;a<t-6;a++)n.isDark(a,s)&&!n.isDark(a+1,s)&&n.isDark(a+2,s)&&n.isDark(a+3,s)&&n.isDark(a+4,s)&&!n.isDark(a+5,s)&&n.isDark(a+6,s)&&(e+=40);let i=0;for(let s=0;s<t;s++)for(let a=0;a<t;a++)n.isDark(a,s)&&i++;const r=Math.abs(100*i/t/t-50)/5;return e+=r*10,e}};class qn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let i=0;for(;i<t.length&&t[i]==0;)i++;this.num=new Array(t.length-i+e);for(let r=0;r<t.length-i;r++)this.num[r]=t[r+i]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let i=0;i<this.getLength();i++)for(let r=0;r<t.getLength();r++)e[i+r]^=Zt.gexp(Zt.glog(this.get(i))+Zt.glog(t.get(r)));return new qn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=Zt.glog(this.get(0))-Zt.glog(t.get(0)),i=new Array(this.getLength());for(let r=0;r<this.getLength();r++)i[r]=this.get(r);for(let r=0;r<t.getLength();r++)i[r]^=Zt.gexp(Zt.glog(t.get(r))+e);return new qn(i,0).mod(t)}}class je{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const i=je.getRsBlockTable(t,e);if(i==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const r=i.length/3,s=[];for(let a=0;a<r;a++){const o=i[a*3+0],l=i[a*3+1],c=i[a*3+2];for(let u=0;u<o;u++)s.push(new je(l,c))}return s}static getRsBlockTable(t,e){switch(e){case Oi.L:return je.RS_BLOCK_TABLE[(t-1)*4+0];case Oi.M:return je.RS_BLOCK_TABLE[(t-1)*4+1];case Oi.Q:return je.RS_BLOCK_TABLE[(t-1)*4+2];case Oi.H:return je.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Wl{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class j0{mode;data;constructor(t){this.mode=ue.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data.charCodeAt(e),8)}}class hn{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Oi[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new j0(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=je.getRSBlocks(t,this.errorCorrectLevel),i=new Wl;let r=0;for(let s=0;s<e.length;s++)r+=e[s].dataCount;for(let s=0;s<this.dataList.length;s++){const a=this.dataList[s];i.put(a.mode,4),i.put(a.getLength(),Gt.getLengthInBits(a.mode,t)),a.write(i)}if(i.getLengthInBits()<=r*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++)this.modules[i][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=hn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(let r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(0<=i&&i<=6&&(r==0||r==6)||0<=r&&r<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=r&&r<=4?this.modules[t+i][e+r]=!0:this.modules[t+i][e+r]=!1)}getBestMaskPattern(){let t=0,e=0;for(let i=0;i<8;i++){this.makeImpl(!0,i);const r=Gt.getLostPoint(this);(i==0||t>r)&&(t=r,e=i)}return e}createMovieClip(t,e,i){const r=t.createEmptyMovieClip(e,i),s=1;this.make();for(let a=0;a<this.modules.length;a++){const o=a*s;for(let l=0;l<this.modules[a].length;l++){const c=l*s;this.modules[a][l]&&(r.beginFill(0,100),r.moveTo(c,o),r.lineTo(c+s,o),r.lineTo(c+s,o+s),r.lineTo(c,o+s),r.endFill())}}return r}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=Gt.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let i=0;i<t.length;i++){const r=t[e],s=t[i];if(this.modules[r][s]==null)for(let a=-2;a<=2;a++)for(let o=-2;o<=2;o++)a==-2||a==2||o==-2||o==2||a==0&&o==0?this.modules[r+a][s+o]=!0:this.modules[r+a][s+o]=!1}}setupTypeNumber(t){const e=Gt.getBCHTypeNumber(this.typeNumber);for(let i=0;i<18;i++){const r=!t&&(e>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=r}for(let i=0;i<18;i++){const r=!t&&(e>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=r}}setupTypeInfo(t,e){const i=this.errorCorrectLevel<<3|e,r=Gt.getBCHTypeInfo(i);for(let s=0;s<15;s++){const a=!t&&(r>>s&1)==1;s<6?this.modules[s][8]=a:s<8?this.modules[s+1][8]=a:this.modules[this.moduleCount-15+s][8]=a}for(let s=0;s<15;s++){const a=!t&&(r>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=a:s<9?this.modules[8][15-s-1+1]=a:this.modules[8][15-s-1]=a}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let i=-1,r=this.moduleCount-1,s=7,a=0;for(let o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(let l=0;l<2;l++)if(this.modules[r][o-l]==null){let c=!1;a<t.length&&(c=(t[a]>>>s&1)==1),Gt.getMask(e,r,o-l)&&(c=!c),this.modules[r][o-l]=c,s--,s==-1&&(a++,s=7)}if(r+=i,r<0||this.moduleCount<=r){r-=i,i=-i;break}}}static createData(t,e,i){const r=je.getRSBlocks(t,e),s=new Wl;for(let o=0;o<i.length;o++){const l=i[o];s.put(l.mode,4),s.put(l.getLength(),Gt.getLengthInBits(l.mode,t)),l.write(s)}let a=0;for(let o=0;o<r.length;o++)a+=r[o].dataCount;if(s.getLengthInBits()>a*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+a*8+")");for(s.getLengthInBits()+4<=a*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=a*8||(s.put(hn.PAD0,8),s.getLengthInBits()>=a*8));)s.put(hn.PAD1,8);return hn.createBytes(s,r)}static createBytes(t,e){let i=0,r=0,s=0;const a=new Array(e.length),o=new Array(e.length);for(let g=0;g<e.length;g++){const p=e[g].dataCount,d=e[g].totalCount-p;r=Math.max(r,p),s=Math.max(s,d),a[g]=new Array(p);for(let A=0;A<a[g].length;A++)a[g][A]=255&t.buffer[A+i];i+=p;const y=Gt.getErrorCorrectPolynomial(d),C=new qn(a[g],y.getLength()-1).mod(y);o[g]=new Array(y.getLength()-1);for(let A=0;A<o[g].length;A++){const P=A+C.getLength()-o[g].length;o[g][A]=P>=0?C.get(P):0}}let l=0;for(let g=0;g<e.length;g++)l+=e[g].totalCount;const c=new Array(l);let u=0;for(let g=0;g<r;g++)for(let p=0;p<e.length;p++)g<a[p].length&&(c[u++]=a[p][g]);for(let g=0;g<s;g++)for(let p=0;p<e.length;p++)g<o[p].length&&(c[u++]=o[p][g]);return c}}const Jl=Math.ceil,Fi=Math.floor,Kl=Math.round;function V0(n,t){const e=oa(n),i=t?.ecc||"H",r=t?.size||256,s=-1,a=t?.padding||0,o=t?.color||"#000000",l=t?.background||"#ffffff",c=new hn(s,i);c.addData(e),c.make();const u=c.getModuleCount(),g=(r-a*2)/u,p=a,d=r-a;return ql(r,o,l,function(y,x){if(p<=y&&y<d&&p<=x&&x<d){const C=Fi((y-p)/g),A=Fi((x-p)/g);return c.isDark(A,C)?0:1}else return 1})}function X0(n,t){const e=t.x||0,i=t.y||0,r=oa(n),s=t.ctx,a=t.ecc||"H",o=typeof t.size=="number"?Fi(t.size):256,l=t.padding||0,c=-1,u=t.color||"#000000",g=t.background||"#ffffff",p=new hn(c,a);p.addData(r),p.make();const d=p.getModuleCount(),y=(o-l*2)/d;s.fillStyle=g,s.fillRect(e,i,o,o);for(let x=0;x<d;x++)for(let C=0;C<d;C++){const A=Jl((C+1)*y)-Fi(C*y),P=Jl((x+1)*y)-Fi(x*y);s.fillStyle=p.isDark(x,C)?u:g,s.fillRect(e+Kl(C*y)+l,i+Kl(x*y)+l,A,P)}}function Js(){let n=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0;e<t.length;e++)try{n=new window.ActiveXObject(t[e]);break}catch{continue}}else n=new XMLHttpRequest;return n}function Y0(n){if(!n.action)return{url:"",data:"",boundary:""};const t=n.method.toLowerCase()==="get",e=n.method.toLowerCase()==="post";let i=n.action,r="";const s="---------------------------"+Date.now().toString(16);if(window.FormData)r=new FormData(n),t&&(i=fr(i,vs(r)));else if(t){let a="";for(let o=0;o<n.elements.length;o++){const l=n.elements[o];if(!l.hasAttribute("name"))continue;const c=l.nodeName.toUpperCase()==="INPUT"?l.getAttribute("type")?.toUpperCase():"TEXT";if(c==="FILE")for(let u=0,g=l.files?.length??0;u<g;a+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.files?.[u++].name??""));else(c!=="RADIO"&&c!=="CHECKBOX"||l.checked)&&(a+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}i=fr(i,a)}else if(e){const a=[];if(n.enctype==="application/x-www-form-urlencoded"){for(let o=0;o<n.elements.length;o++){const l=n.elements[o];l.hasAttribute("name")&&a.push(encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}r=a.join("&")}else if(n.enctype==="text/plain"){for(let o=0;o<n.elements.length;o++){const l=n.elements[o];l.hasAttribute("name")&&a.push(l.name+"="+l.value)}r=a.join(`\r
|
|
30
|
-
`)}else if(
|
|
31
|
-
Content-Type: `+
|
|
29
|
+
})`}static safeHtml(t,e="encode"){const n={"&":"&","<":"<",">":">",""":'"',"'":"'"};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t=t.replace(new RegExp(e=="decode"?r:n[r],"g"),e=="decode"?n[r]:r));return t}static loadScript(t,e=()=>{},n=(r,s,o,a,h)=>{}){const r=document.createElement("script");r.type="text/javascript",r.src=t,r.async=!1,document.body.appendChild(r),r.onload=e,r.onerror=n}static loadStyle(t){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.insertBefore(e,document.head.childNodes[document.head.childNodes.length-1].nextSibling)}static waitForStyleSheetsLoaded=()=>new Promise(t=>{const e=Array.from(document.querySelectorAll("link[rel=stylesheet]"));let n=document.styleSheets.length??0;const r=()=>n>=e.length?(t(),!0):!1;r()||e.forEach(s=>{s.onload=()=>{n+=1,r()}})});static lazyloadImages(){const t=document.getElementsByTagName("img"),e=zr().height;let n=0;return()=>{for(let r=n;r<t.length;r++)t[r].getBoundingClientRect().top<e&&(t[r].src=t[r].getAttribute("data-src")??"",n=r+1)}}static iframePostMessage(t,e="http://test.com/localstorage.html"){const n=document.createElement("iframe");n.src=e,document.body.append(n),setTimeout(function(){n.contentWindow?.postMessage(t,e)},4e3),setTimeout(function(){n.remove()},6e3)}static getTextWidth=(t,e,n=400)=>{const r=document.createElement("span");r.style.visibility="hidden",r.style.padding="0",r.style.whiteSpace="nowrap",r.style.overflow="visible",r.style.fontSize=e>12?e+"px":"12px",r.style.fontWeight=n.toString(),r.innerText=t,document.body.appendChild(r);const s=r.offsetWidth;return document.body.removeChild(r),s};static getFixedWidthText=(t,e,n=12,r=400,s=!0)=>{let o="",a="",h="";if(!t||e<n||typeof t!="string")return o;const m=t.split(""),g=document.createElement("span");g.style.visibility="hidden",g.style.padding="0",g.style.whiteSpace="nowrap",g.style.overflow="visible",g.style.fontSize=n>12?n+"px":"12px",g.style.fontWeight=r.toString(),document.body.appendChild(g);for(let x=0,y=m.length;x<y;x++){const w=m[x];if(a=h,h+=w,o=h,g.innerText=h,g.offsetWidth>e){s?o=a+"...":o=a;break}}return document.body.removeChild(g),o};static getLocation(){return new Promise((t,e)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(n=>{t(n.coords)}):e("Geolocation is not supported by this browser")})}static vibrate(t=200){"vibrate"in navigator?window.navigator.vibrate(t):console.error("Your device is not support vibrate on this browser.")}static copyToClipboard=t=>new Promise((e,n)=>{if(navigator.clipboard)navigator.clipboard.writeText(t).then(e).catch(n);else{const r=document.createElement("textarea");r.value=t,r.style.opacity="0",r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?e():n()}catch(s){n(s)}document.body.removeChild(r)}});static getInnerText=t=>{let e=t.innerText;if(!e){const n=t.querySelector("slot")?.assignedNodes()||[];let r=0;for(;!e&&r<=n.length-1;)"innerText"in n[r]&&(e=n[r].innerText),r++}return e};static getSelectedText=()=>window.getSelection()?.toString();static siblings=t=>Array.prototype.slice.call(t.parentNode?.children).filter(e=>e!==t);static isElementFocus=t=>t===document.activeElement;static isTabInView=()=>!document.hidden;static navigateBack=()=>history.back();static navigateBack2=()=>history.go(-1);static addDebuggerOnBeforeUnload=()=>{window.addEventListener("beforeunload",()=>{debugger})}}function tr(i,t=document){return new zt(i,t)}class zt{context;nodes;prefixs=["moz","o","ms","webkit"];constructor(t,e=document){if(this.context=e,typeof t=="string"?this.nodes=Array.from(this.context.querySelectorAll(t)):t instanceof HTMLElement?this.nodes=[t]:this.nodes=t,this.nodes.length===0)throw new Error(`can not find ${t}`);this.each((n,r)=>{n instanceof HTMLInputElement&&n.addEventListener("change",s=>{this.changeRadioChecked(s.currentTarget.value)}),n instanceof HTMLSelectElement&&n.addEventListener("change",s=>{this.changeSelectSelected(s.currentTarget.value)})})}get(t){return t<0&&(t=this.nodes.length+t),this.nodes[t]}concat(t){return new zt(this.nodes.concat(t.nodes),this.context)}then(t){return t(this)??this}each(t){return this.nodes.forEach((e,n)=>{t(e,n)}),this}_save(t,e,n){t._mQuery||(t._mQuery={}),Array.isArray(n)?(t._mQuery[e]=t._mQuery[e]??[],t._mQuery[e].push(...n)):n!=null?t._mQuery[e]=n:delete t._mQuery[e]}on(t,e,n){return this.nodes.forEach(r=>{this._save(r,"events",[{event:t,callback:e,options:n}]),r.addEventListener(t,e,n)}),this}off(t,e,n){return this.nodes.forEach(r=>{r.removeEventListener(t,e,n)}),this}dispatchEvent(t,e){let n;const r=["click","dblclick","mousedown","mouseup","mousemove"],s=["keydown","keyup","keypress"];return typeof t=="string"?r.includes(t)?n=new MouseEvent(t,e):s.includes(t)?n=new KeyboardEvent(t,e):n=new Event(t,e):n=t,this.nodes.forEach(o=>{o.dispatchEvent(n)}),this}change(){return this.dispatchEvent("change")}click(){return this.dispatchEvent("click")}static hasEvent(t,e){return"on"+e in t}static _fragment(t){const e=document.createElement("template");return e.innerHTML=t,e.content.childNodes.forEach(n=>{const r=zt._scriptConvert(n);r!=n&&e.content.replaceChild(r,n)}),e.content}static _scriptConvert(t){const e=n=>{const s=n.ownerDocument.createElement("script");s.text=n.text;const o=n.attributes;for(let a=0;a<o.length;a++)s.setAttribute(o[a].name,o[a].value);return s};return t.tagName=="SCRIPT"&&(t=e(t)),t.querySelectorAll&&t.querySelectorAll("script").forEach(n=>{n.parentNode?.replaceChild(e(n),n)}),t}static _fixProp(t){const e={cellpadding:"cellPadding",cellspacing:"cellSpacing",class:"className",colspan:"colSpan",contenteditable:"contentEditable",for:"htmlFor",frameborder:"frameBorder",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return e[t]?e[t]:t}static isSVG(t){return(t||document.documentElement).nodeName.toLowerCase()==="svg"}static createElement(t){return zt.isSVG()?document.createElementNS.call(document,"http://www.w3.org/2000/svg",t):document.createElement.call(document,t)}static createTextNode(t){return document.createTextNode.call(document,t)}static createDocumentFragment(){return document.createDocumentFragment.call(document)}_insert(t,e){const n=this.nodes.length;if(n<1)return this;const r=[];if(typeof e=="string")this.nodes.forEach(s=>{const o=zt._fragment(e);r.push(...o.children),s[t](o)});else if(e instanceof HTMLElement)this.each(s=>{const o=n===1?e:zt._fragment(e.outerHTML);r.push(...n===1?[e]:o.children),s[t](o)}),n>1&&e.remove();else if(e instanceof zt){const s=n==1;e.each(o=>{this.each(a=>{const h=s?o:o.cloneNode(!0);r.push(h),a[t](h),zt._scriptConvert(h)})}),s||e.remove()}return t=="replaceWith"&&(this.nodes=r),this}append(t){return this._insert("append",t)}prepend(t){return this._insert("prepend",t)}after(t){return this._insert("after",t)}before(t){return this._insert("before",t)}replace(t){return this._insert("replaceWith",t)}remove(){return this.nodes.forEach(t=>{t.remove()}),this}static removeChild(t){t.parentElement?.removeChild(t)}find(t){const e=[];return this.nodes.forEach(n=>{e.push(...Array.from(n.querySelectorAll(t)))}),new zt(e,this.context)}filter(t){const e=[];return this.nodes.forEach(n=>{(n===t||typeof t=="string"&&n.matches&&n.matches(t))&&e.push(n)}),new zt(e,this.context)}next(){const t=[];return this.nodes.forEach(e=>{const n=e.nextElementSibling;n&&t.push(n)}),new zt(t,this.context)}prev(){const t=[];return this.nodes.forEach(e=>{const n=e.previousElementSibling;n&&t.push(n)}),new zt(t,this.context)}closest(t){const e=[];return this.nodes.forEach(n=>{const r=n.closest(t);r&&e.push(r)}),new zt(e,this.context)}shadow(t){const e=[];this.nodes.forEach(r=>{r.shadowRoot&&e.push(r.shadowRoot)});const n=new zt(e,this.context);return t!==void 0?n.find(t):n}parent(t){return this.parents(t,!0)}parents(t,e=!1){const n=[],r=o=>{if(n.indexOf(o)==-1&&n.push(o),!e&&o.parentElement)return r(o.parentElement)};this.nodes.forEach(o=>{o.parentElement&&r(o.parentElement)});const s=new zt(n,this.context);return t!==void 0?s.filter(t):s}static getComputedStyle(t,e,n){let r;const s=t.style.getPropertyPriority(e);return"getComputedStyle"in window?(r=getComputedStyle.call(window,t,n),r=r.getPropertyValue(e)):r=t.style.getPropertyValue(e),r+(s?"!"+s:"")}css(t,e){if((t===void 0||typeof t=="string")&&e===void 0){const n=this.nodes[0].style;if(typeof t=="string"){const r=n.getPropertyPriority(t),s=n.getPropertyValue(t).trim();return s?s+(r?"!"+r:""):zt.getComputedStyle(this.nodes[0],t)}else{const r=Object.fromEntries(this.nodes[0].style.cssText.split(";").filter(s=>!!s).map(s=>s.split(":").map(o=>o.trim())));return Object.assign(r,getComputedStyle.call(window,this.nodes[0])),r}}else{let n={};return typeof t=="string"&&e!==void 0?n[t]=e:typeof t=="object"&&(n=t),this.nodes.forEach(r=>{Object.keys(n).forEach(s=>{const o=String(n[s]).toLowerCase().includes("!important")?"important":"";r.style.setProperty(s,String(n[s]).replace(/!important/i,""),o)})}),this}}addClass(t){return this.toggleClass(t,!0)}removeClass(t){return this.toggleClass(t,!1)}toggleClass(t,e){const n=t.split(/[,\s]+/);return this.nodes.forEach(r=>{n.forEach(s=>{if(s.trim()!==""){let o="toggle";e!==void 0&&(o=e?"add":"remove"),r.classList[o](s.trim())}})}),this}hasClass(t){const e=t.split(/[,\s]+/);let n=!1;return this.nodes.forEach(r=>{n=n||e.every(s=>Array.from(r.classList??[]).includes(s.trim()))}),n}attr(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0].getAttribute(t);let n={};return typeof t=="object"?n=t:e!==void 0&&(n[t]=e),this.nodes.forEach(r=>{Object.entries(n).forEach(([s,o])=>{r.setAttribute(s,o)})}),this}removeAttr(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(n=>{e.forEach(r=>{n.removeAttribute(r)})}),this}prop(t,e){if(e===void 0&&typeof t=="string")return this.nodes[0][t];{let n={};return typeof t=="object"?n=t:typeof t=="string"&&e!==void 0&&(n[t]=e),this.nodes.forEach(r=>{Object.entries(n).forEach(([s,o])=>{const a=zt._fixProp(s);r[a]=o,a=="innerHTML"&&zt._scriptConvert(r)})}),this}}removeProp(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(n=>{e.forEach(r=>{delete n[zt._fixProp(r)]})}),this}changeSelectSelected(t){this.nodes.forEach(e=>{if(e instanceof HTMLSelectElement){const n=e.options;for(let r=0,s=n.length;r<s;r++)n[r].value==t?n[r].selected=!0:n[r].selected=!1}})}changeRadioChecked(t){this.nodes.forEach(e=>{e instanceof HTMLInputElement&&(e.value==t?e.checked=!0:e.checked=!1)})}data(t,e){if(typeof t=="string"&&t.indexOf("-")!=-1)throw new Error(`Key "${t}" contains "-" (dash). Dashes are not allowed in property names. Use camelCase instead.`);if((typeof t=="string"||t===void 0)&&e===void 0){const n=Object.assign({},this.nodes[0].dataset);return Object.keys(n).forEach(r=>{if(n[r]?.startsWith("[")||n[r]?.startsWith("{"))try{n[r]=JSON.parse(n[r]??"")}catch{}}),typeof t=="string"?n[t]:n}else{let n={};return typeof t=="object"?n=t:typeof t=="string"&&(n[t]=e),this.nodes.forEach(r=>{Object.entries(n).forEach(([s,o])=>{o!=null?r.dataset[s]=o instanceof Object?JSON.stringify(o):o:delete r.dataset[s]})}),this}}removeData(t){const e=t.split(/[,\s]+/);return this.nodes.forEach(n=>{e.forEach(r=>{delete n.dataset[r]})}),this}show(){return this.toggle(!0)}hide(){return this.toggle(!1)}toggle(t){return this.nodes.forEach(e=>{const n=e.style.display,r=getComputedStyle(e).display,s=n=="none"||r=="none";if(s&&(t===void 0||t===!0)){const o=e instanceof HTMLTableRowElement?"table-row":e instanceof HTMLTableCellElement?"table-cell":"block";e.style.display=e._mQuery?.prevDisplay??(n==r&&r!="none"?"":o),this._save(e,"prevDisplay",null)}!s&&(t==null||t===!1)&&(r!="none"&&this._save(e,"prevDisplay",r),e.style.setProperty("display","none"))})}empty(){return this.html("")}html(t){return t instanceof HTMLElement?this.empty().append(t.innerHTML):this.prop("innerHTML",t)}text(t){return this.prop("textContent",t)}val(t){return this.prop("value",t)}}class Dn{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{e.target}),this.video.srcObject=t}captureWebCamera(){navigator.mediaDevices.getUserMedia({video:!0}).then(t=>{this.setSrcObject(t)})}static async videoMediaChangeSupport(){return new Promise(t=>{const e=document.createElement("iframe"),n=document.createElement("video"),r=document.createElement("source"),s=new MediaSource;s.addEventListener("sourceopen",()=>t(!0)),r.src=URL.createObjectURL(s),r.media="(min-width:10px)",n.append(r),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(n),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Dn.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}function er(i,t){if(typeof t<"u")window.localStorage.setItem(i,t);else return window.localStorage.getItem(i)??void 0}function So(i,t,e){const n=new Date;n.setTime(n.getTime()+e*24*60*60*1e3);const r="expires="+n.toUTCString();document.cookie=i+"="+t+"; "+r}function Eo(i){const t=i+"=",e=document.cookie.split(";");for(let n=0,r=e.length;n<r;n++){const s=e[n].trim();if(s.indexOf(t)==0)return s.substring(t.length,s.length)}return""}const Po=()=>document.cookie.split(";").map(i=>i.split("=")).reduce((i,[t,e])=>(i[t.trim().replace('"',"")]=e,i),{}),ko=()=>document.cookie.split(";").forEach(i=>document.cookie=i.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`));Gt.page.on("matchMediaChangePrefersColorSchemeDark",i=>{ni(i?"dark":"light")}),Cs();function ni(i){er("colorScheme",i),document.documentElement.classList.toggle("dark",i=="dark")}function Cs(){const i=er("colorScheme");if(i)return ni(i),i;{const t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return ni(t),t}}const Ao={safeAreaTop:St.getCSSVar("--safe-area-inset-top"),safeAreaRight:St.getCSSVar("--safe-area-inset-right"),safeAreaBottom:St.getCSSVar("--safe-area-inset-bottom"),safeAreaLeft:St.getCSSVar("--safe-area-inset-left"),colorPrimary:St.getCSSVar("--color-primary")||"#5078f0",colorRed:St.getCSSVar("--color-red")||"#ff5050",colorOrange:St.getCSSVar("--color-orange")||"#fa8c00",colorYellow:St.getCSSVar("--color-yellow")||"#fadc32",colorGreen:St.getCSSVar("--color-green")||"#00c878",colorBlue:St.getCSSVar("--color-blue")||"#00b4fa",colorPurple:St.getCSSVar("--color-purple")||"#6464fa",colorBlack:St.getCSSVar("--color-black")||"#001428",colorGray0:St.getCSSVar("--color-gray-0")||"#000000",colorGray3:St.getCSSVar("--color-gray-3")||"#333333",colorGray6:St.getCSSVar("--color-gray-6")||"#666666",colorGray9:St.getCSSVar("--color-gray-9")||"#999999",colorGrayCC:St.getCSSVar("--color-gray-cc")||"#cccccc",colorGrayDD:St.getCSSVar("--color-gray-dd")||"#dddddd",colorGrayE6:St.getCSSVar("--color-gray-e6")||"#e6e6e6",colorGrayEE:St.getCSSVar("--color-gray-ee")||"#eeeeee",colorGrayEF:St.getCSSVar("--color-gray-ef")||"#efefef",colorGrayF5:St.getCSSVar("--color-gray-f5")||"#f5f5f5",colorGrayFF:St.getCSSVar("--color-gray-ff")||"#ffffff",fontLineHeight:St.getCSSVar("--font-line-height")||"1,4",fontSize32:St.getCSSVar("--font-size-32")||"32px",fontSize24:St.getCSSVar("--font-size-24")||"24px",fontSize20:St.getCSSVar("--font-size-20")||"20px",fontSize18:St.getCSSVar("--font-size-18")||"18px",fontSize16:St.getCSSVar("--font-size-16")||"16px",fontSize14:St.getCSSVar("--font-size-14")||"14px",fontSize12:St.getCSSVar("--font-size-12")||"12px",fontSize11:St.getCSSVar("--font-size-11")||"11px",gap4:St.getCSSVar("--gap-4")||"4px",gap8:St.getCSSVar("--gap-8")||"8px",gap12:St.getCSSVar("--gap-12")||"12px",gap16:St.getCSSVar("--gap-16")||"16px",gap20:St.getCSSVar("--gap-20")||"20px",gap40:St.getCSSVar("--gap-40")||"40px",height44:St.getCSSVar("--height-44")||"44px",height32:St.getCSSVar("--height-32")||"32px",borderRadius:St.getCSSVar("--border-radius")||"4px"},Mo=()=>Math.random()*16777215,Io=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,Lo=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,ii=function(i){return i[0]==="#"&&(i=i.slice(1)),parseInt(i,16)},Ts=function(i){let t="00000"+(i|0).toString(16);return t="#"+t.substring(t.length-6),t},Ss=function(i,t=1){const e=i>>16&255,n=i>>8&255,r=i&255,s=t<0?0:t>1?1:t;return s===1?"rgb("+e+","+n+","+r+")":"rgba("+e+","+n+","+r+","+s+")"},nr=function(i,t=1){const e=ii(i);return Ss(e,t)},Do=i=>{const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(i);return e?"#"+((1<<24)+(parseInt(e[1])<<16)+(parseInt(e[2])<<8)+parseInt(e[3])).toString(16).slice(1):""};function Ro(i,t){let e=parseInt(i.substring(1,3),16),n=parseInt(i.substring(3,5),16),r=parseInt(i.substring(5,7),16);e==0&&(e=32),n==0&&(n=32),r==0&&(r=32),e=e*(100+t)/100,n=n*(100+t)/100,r=r*(100+t)/100,e=e<255?e:255,n=n<255?n:255,r=r<255?r:255,e=Math.round(e),n=Math.round(n),r=Math.round(r);const s=e.toString(16).length==1?"0"+e.toString(16):e.toString(16),o=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),a=r.toString(16).length==1?"0"+r.toString(16):r.toString(16);return"#"+s+o+a}function Oo(i,t,e,n){let r,s,o;i=i/360,t=t/100,e=e/100;const a=Math.floor(i*6),h=i*6-a,m=e*(1-t),g=e*(1-h*t),x=e*(1-(1-h)*t);switch(a%6){case 0:r=e,s=x,o=m;break;case 1:r=g,s=e,o=m;break;case 2:r=m,s=e,o=x;break;case 3:r=m,s=g,o=e;break;case 4:r=x,s=m,o=e;break;case 5:default:r=e,s=m,o=g;break}return{r:Math.round(r*255),g:Math.round(s*255),b:Math.round(o*255),a:n??1}}function No(i,t,e,n){const r=Math.max(i,t,e),s=Math.min(i,t,e),o=r-s,a=r===0?0:o/r,h=r/255;let m;switch(r){case s:m=0;break;case i:m=t-e+o*(t<e?6:0),m/=6*o;break;case t:m=e-i+o*2,m/=6*o;break;case e:default:m=i-t+o*4,m/=6*o;break}return{h:Math.round(m*360),s:Math.round(a*100),v:Math.round(h*100),a:n??1}}function Bo(i){return btoa(encodeURIComponent(i)).replaceAll("+","*").replaceAll("/","-").replaceAll("=","")}function Fo(i){let t=i.replaceAll("*","+").replaceAll("-","/");const e=t.length%4;return e&&(t=t.padEnd(t.length+(4-e),"=")),decodeURIComponent(atob(t))}function ir(i=window.location.href){return Ti(URL)?new URL(i):Es(i)}function Es(i=window.location.href){const t="(?<protocol>https?:)",e="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",n="(?<pathname>(?:\\/[^/#?]+)*\\/?)",r="(?<search>(?:\\?[^#]*)?)",s="(?<hash>(?:#.*)?)",a=new RegExp(`^${t}//${e}${n}${r}${s}$`).exec(i);return{href:i,protocol:a?.groups?.protocol??"",host:a?.groups?.host??"",hostname:a?.groups?.hostname??"",port:a?.groups?.port??"",pathname:a?.groups?.pathname??"",search:a?.groups?.search??"",hash:a?.groups?.hash??""}}function zo(i){const t=ir(i);return t.protocol==="http:"||t.protocol==="https:"}function Ps(i=window.location.href){const t=ir(i),e=t.href.indexOf(t.hash);return t.hash&&e>=0?t.href.substring(0,e):t.href}function Uo(i=location.search){i=decodeURIComponent(i).replace(/^[#?&]/,"");const t={};if(!i)return t;const e=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let n=e.exec(i);for(;n;)t[n[1]]=n[2],n=e.exec(i);return t}function Go(i){return Array.from(new URLSearchParams(i)).reduce((t,[e,n])=>Object.assign({},t,{[e]:t[e]?(Array.isArray(t[e])?t[e]:[t[e]]).concat(n):n}),{})}function ks(i){let t="";for(const e in i)t&&(t+="&"),t+=`${e}=${i[e]}`;return t}function Vo(i){return new URLSearchParams(i).toString()}function rr(i){return"?"+[...i.entries()].map(t=>encodeURIComponent(t[0])+"="+encodeURIComponent(t[1]instanceof File?t[1].name:t[1])).join("&")}function ri(i,t){return i.indexOf("?")>=0?i+t.replace(/^\?/,"&"):i.replace(/(?:\?.*)?$/,t.replace(/^[&?]/,"?"))}function jo(i){let t="";new MutationObserver(function(n){window.location.href!==t&&(t=window.location.href,i&&i(location.href))}).observe(document,{attributes:!0,childList:!0,subtree:!0})}function Xo(i){window.addEventListener("hashchange",()=>{i(location.hash)})}function Ho(i){window.addEventListener("popstate",i,!1)}function Wo(i){let t=null;if($r)try{t=new Worker(URL.createObjectURL(new Blob([i])))}catch(e){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",e),null}return t}const si=new Map;async function Yo(i){return new Promise((t,e)=>{ai(i,(n,r)=>n?e(n):t({width:r.width,height:r.height,aspectRatio:r.width/r.height}))})}const ai=(i,t)=>{if(si.has(i))return t(null,si.get(i));const e=new Image;e.onload=function(){si.set(i,{width:e.width,height:e.height,element:e}),t(null,si.get(i))},e.onerror=function(n){t(n,null)},e.src=i},qo=(i,t)=>{for(let e=0,n=i.length;e<n;e++){const r=i[e],{type:s}=r;if(s.split("/")[0]!=="image")return;const a=new FileReader;a.onload=function(h){if(!h.target)return t("no reader target",null);const m=h.target.result,g=gr(m),x=new Blob([m]);sr(x,(y,w)=>{if(!w)return t(y,null);ai(w,(k,P)=>{if(!P)return t(k,null);As(w,(D,N)=>{if(!N)return t(D,null);const R={name:r.name,fileType:g,size:r.size,width:P.width,height:P.height,imgUrl:w,imageData:N,blob:x};return t(null,R)})})})},a.readAsArrayBuffer(r)}},As=(i,t)=>{ai(i,(e,n)=>{if(!n)return t(e,null);const r=document.createElement("canvas"),s=r.getContext("2d");r.width=n.width,r.height=n.height,s.drawImage(n.element,0,0,r.width,r.height);const o=s.getImageData(0,0,r.width,r.height);return t(null,o)})},$o=(i,t=0,e=0)=>{const n=document.createElement("canvas"),r=n.getContext("2d");return n.width=t,n.height=e,r.drawImage(i,0,0,t,e),r.getImageData(0,0,t,e)},Jo=(i,t=0,e=0)=>{const n=document.createElement("canvas"),r=n.getContext("2d");return n.width=t,n.height=e,r.drawImage(i,0,0,t,e),r.getImageData(0,0,t,e)},Zo=i=>{const t=i.width,e=i.height,n=t*e*3,r=n+54,s=[66,77,r&255,r>>8&255,r>>16&255,r>>24&255,0,0,0,0,54,0,0,0],o=[40,0,0,0,t&255,t>>8&255,t>>16&255,t>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255,1,0,24,0,0,0,0,0,n&255,n>>8&255,n>>16&255,n>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=(4-t*3%4)%4,h=i.data;let m="";const g=t<<2;let x=e;const y=String.fromCharCode;do{const k=g*(x-1);let P="";for(let D=0;D<t;D++){const N=D<<2;P+=y(h[k+N+2])+y(h[k+N+1])+y(h[k+N])}for(let D=0;D<a;D++)P+=String.fromCharCode(0);m+=P}while(--x);function w(k){if(!window.btoa)throw"btoa undefined";let P="";if(typeof k=="string")P=k;else for(let D=0;D<k.length;D++)P+=String.fromCharCode(k[D]);return btoa(P)}return w(s.concat(o))+w(m)},Ko=i=>{const{width:t,height:e}=i,n=document.createElement("canvas"),r=n.getContext("2d");return n.width=t,n.height=e,r.putImageData(i,0,0,0,0,t,e),n.toDataURL("image/png")},Qo=(i,t,e)=>{const{width:n,height:r}=i,s=document.createElement("canvas"),o=s.getContext("2d");s.width=n,s.height=r,o.putImageData(i,0,0,0,0,n,r);const a=`image/${t?t.toLowerCase():"png"}`;s.toBlob(h=>{e?.(null,h)},a,1)},sr=(i,t)=>{const e=new FileReader;e.onload=function(n){n.target?t(null,n.target.result):t("can't readAsDataURL",null)},e.readAsDataURL(i)},th=(i,t)=>{sr(i,function(e,n){if(n){const r=new Image;r.src=n}else t(e)})};function eh(i){const t=[],e=[],n=[];let r=0;for(let h=0,m=i.data.length;h<m;h+=4)t[r]=i.data[h],e[r]=i.data[h+1],n[r]=i.data[h+2],r+=1;const s=ar(t),o=ar(e),a=ar(n);return"rgb("+s+","+o+","+a+")"}function ar(i){const t={},e=[],n=[];for(let a=0;a<i.length;a++)t[i[a]]?e.push(i[a]):t[i[a]]=1;let r=0;for(let a=0;a<e.length;a++){r=0;for(let h=0;h<e.length;h++)e[a]===e[h]&&(r+=1),n[a]=r}const s=Math.max.apply(null,n);let o=0;for(;o<n.length;o++)if(n[o]===s)return;return e[o]}const nh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[(o*e+e-a-1)*4],r[h+1]=t[(o*e+e-a-1)*4+1],r[h+2]=t[(o*e+e-a-1)*4+2],r[h+3]=t[(o*e+e-a-1)*4+3]}return new ImageData(r,e,n)},ih=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[((n-o-1)*e+a)*4],r[h+1]=t[((n-o-1)*e+a)*4+1],r[h+2]=t[((n-o-1)*e+a)*4+2],r[h+3]=t[((n-o-1)*e+a)*4+3]}return new ImageData(r,e,n)},rh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;r[h]=t[(a*e+e-o-1)*4],r[h+1]=t[(a*e+e-o-1)*4+1],r[h+2]=t[(a*e+e-o-1)*4+2],r[h+3]=t[(a*e+e-o-1)*4+3]}return new ImageData(r,n,e)},sh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<e;o++)for(let a=0;a<n;a++){const h=(o*n+a)*4;r[h]=t[((n-a-1)*e+o)*4],r[h+1]=t[((n-a-1)*e+o)*4+1],r[h+2]=t[((n-a-1)*e+o)*4+2],r[h+3]=t[((n-a-1)*e+o)*4+3]}return new ImageData(r,n,e)},ah=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,m=(t[h]+t[h+1]+t[h+2])/3;r[h]=m,r[h+1]=m,r[h+2]=m,r[h+3]=t[h+3]}return new ImageData(r,e,n)},oh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,m=.2126*t[h]+.7152*t[h+1]+.0722*t[h+2];r[h]=m,r[h+1]=m,r[h+2]=m,r[h+3]=t[h+3]}return new ImageData(r,e,n)},hh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,g=(t[h]+t[h+1]+t[h+2])/3>127?255:0;r[h]=g,r[h+1]=g,r[h+2]=g,r[h+3]=t[h+3]}return new ImageData(r,e,n)},ch=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=255-t[h],r[h+1]=255-t[h+1],r[h+2]=255-t[h+2],r[h+3]=t[h+3]}return new ImageData(r,e,n)},lh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[h],r[h+1]=0,r[h+2]=0,r[h+3]=t[h+3]}return new ImageData(r,e,n)},uh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=0,r[h+1]=t[h+1],r[h+2]=0,r[h+3]=t[h+3]}return new ImageData(r,e,n)},fh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=0,r[h+1]=0,r[h+2]=t[h+2],r[h+3]=t[h+3]}return new ImageData(r,e,n)},dh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[h],r[h+1]=t[h+1],r[h+2]=0,r[h+3]=t[h+3]}return new ImageData(r,e,n)},ph=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[h],r[h+1]=0,r[h+2]=t[h+1],r[h+3]=t[h+3]}return new ImageData(r,e,n)},mh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=0,r[h+1]=t[h+1],r[h+2]=t[h+1],r[h+3]=t[h+3]}return new ImageData(r,e,n)},gh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,m=(t[h+1]+t[h+2])/2;r[h]=t[h],r[h+1]=m,r[h+2]=m,r[h+3]=t[h+3]}return new ImageData(r,e,n)},vh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,m=(t[h]+t[h+2])/2;r[h]=m,r[h+1]=t[h+1],r[h+2]=m,r[h+3]=t[h+3]}return new ImageData(r,e,n)},yh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4,m=(t[h]+t[h+1])/2;r[h]=m,r[h+1]=m,r[h+2]=t[h+2],r[h+3]=t[h+3]}return new ImageData(r,e,n)},wh=i=>Ms(i,[-1,-1,-1,-1,9,-1,-1,-1,-1]),xh=i=>Ms(i,[-1,-1,-1,-1,8,-1,-1,-1,-1]),bh=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;r[h]=t[h],r[h+1]=t[h+1],r[h+2]=t[h+2],r[h+3]=255}return new ImageData(r,e,n)},_h=i=>{const{data:t,width:e,height:n}=i,r=new Uint8ClampedArray(t.length);for(let o=0;o<n;o++)for(let a=0;a<e;a++){const h=(o*e+a)*4;if(t[h+3]===0)r[h]=255,r[h+1]=255,r[h+2]=255,r[h+3]=255;else{const m=Is([t[h],t[h+1],t[h+2],t[h+3]],[255,255,255,255]);r[h]=m[0],r[h+1]=m[1],r[h+2]=m[2],r[h+3]=m[3]}}return new ImageData(r,e,n)},Ch=(i,t,e,n,r,s=!1,o)=>{const{data:a,width:h,height:m}=i;let g=r,x=n,y=t,w=e;if(g<0?g=0:g>h&&(g=h),x<0?x=0:x>m&&(x=m),y<1?y=1:y>h&&(y=h),w<1?w=1:w>m&&(w=m),g+y>h&&(y=h-g),x+w>m&&(w=m-x),s){const k=new Uint8ClampedArray(a.length);for(let D=0;D<m;D++)for(let N=0;N<h;N++){const R=(D*h+N)*4;N>=g&&N<=g+y&&D>=x&&D<=x+w?(k[R]=a[R],k[R+1]=a[R+1],k[R+2]=a[R+2],k[R+3]=a[R+3]):(k[R]=255,k[R+1]=255,k[R+2]=255,k[R+3]=o&&["JPG","JPEG"].includes(o.toUpperCase())?255:0)}return new ImageData(k,h,m)}else{const k=new Uint8ClampedArray(y*w*4);for(let D=x;D<=x+w;D++)for(let N=g;N<=g+y;N++){const R=((D-x)*y+N-g)*4,O=(D*h+N)*4;k[R]=a[O],k[R+1]=a[O+1],k[R+2]=a[O+2],k[R+3]=a[O+3]}return new ImageData(k,y,w)}},Th=(i,t,e,n)=>{const{data:r,width:s,height:o}=i;let a=t;a>Math.floor(s/2)&&(a=Math.floor(s/2)),a>Math.floor(o/2)&&(a=Math.floor(o/2)),a<0&&(a=0);const h=new Uint8ClampedArray(r.length);for(let g=0;g<o;g++)for(let x=0;x<s;x++){const y=(g*s+x)*4;let w=-1;x<a?g<a?w=Math.sqrt(Math.pow(a-x-1,2)+Math.pow(a-g-1,2)):g>o-a-1&&(w=Math.sqrt(Math.pow(a-x-1,2)+Math.pow(g-(o-a),2))):x>s-a-1&&(g<a?w=Math.sqrt(Math.pow(x-(s-a),2)+Math.pow(a-g-1,2)):g>o-a-1&&(w=Math.sqrt(Math.pow(x-(s-a),2)+Math.pow(g-(o-a),2)))),Math.round(w)>a?(h[y]=255,h[y+1]=255,h[y+2]=255,h[y+3]=n||e.toUpperCase()==="PNG"?0:255):(h[y]=r[y],h[y+1]=r[y+1],h[y+2]=r[y+2],h[y+3]=n||e.toUpperCase()==="PNG"?r[y+3]:255)}return new ImageData(h,s,o)},Sh=(i,t,e,n,r,s=1e4)=>{const o=new Image;o.src=i;const a=document.createElement("canvas"),h=a.getContext("2d");return a.width=s,a.height=s,h.drawImage(o,0,0,t,e,0,0,n,r),h.getImageData(0,0,n,r)},Eh=(i,t)=>{const{data:e,width:n,height:r}=i,s=new Uint8ClampedArray(e.length);for(let a=0;a<r;a++)for(let h=0;h<n;h++){const m=(a*n+h)*4;s[m]=Math.max(Math.min(e[m]+t,255),0),s[m+1]=Math.max(Math.min(e[m+1]+t,255),0),s[m+2]=Math.max(Math.min(e[m+2]+t,255),0),s[m+3]=e[m+3]}return new ImageData(s,n,r)},Ph=(i,t,e=!1)=>{const{data:n,width:r,height:s}=i,o=new Uint8ClampedArray(n.length);for(let h=0;h<s;h++)for(let m=0;m<r;m++){const g=(h*r+m)*4;n[g+3]===0?(o[g]=255,o[g+1]=255,o[g+2]=255):(o[g]=n[g],o[g+1]=n[g+1],o[g+2]=n[g+2]);let x=n[g+3];e?x=Math.max(Math.min(Math.floor(255*t),255),0):x=Math.max(Math.min(Math.floor(x+255*t),255),0),o[g+3]=x}return new ImageData(o,r,s)},kh=(i,t,e,n)=>{const{data:r,width:s,height:o}=i,{data:a,width:h,height:m}=t;let g=e,x=n;e+m>o&&(g=o-m),n+h>s&&(x=s-h);const y=new Uint8ClampedArray(r.length);for(let k=0;k<o;k++)for(let P=0;P<s;P++){const D=(k*s+P)*4;if(P<x||P>x+h||k<=g||k>=g+m)y[D]=r[D],y[D+1]=r[D+1],y[D+2]=r[D+2],y[D+3]=r[D+3];else{const N=(k*s+P-((g+1)*s+(k-(g+1))*(s-h))+h-x-1)*4,R=[a[N],a[N+1],a[N+2],a[N+3]],O=[r[D],r[D+1],r[D+2],r[D+3]],X=Is(R,O);y[D]=X[0],y[D+1]=X[1],y[D+2]=X[2],y[D+3]=X[3]}}return new ImageData(y,s,o)},Ah=(i,t,e,n,r,s=10)=>{const{data:o,width:a,height:h}=i;let m=r,g=n,x=t,y=e;m<0?m=0:m>a&&(m=a),g<0?g=0:g>h&&(g=h),x<1?x=1:x>a&&(x=a),y<1?y=1:y>h&&(y=h),m+x>a&&(x=a-m),g+y>h&&(y=h-g);const w=new Uint8ClampedArray(o.length);for(let P=0;P<h;P++)for(let D=0;D<a;D++){const N=(P*a+D)*4;if(D>=m&&D<=m+x&&P>=g&&P<=g+y){const R=Math.floor((D-m)/s),O=Math.floor((P-g)/s);let X=Math.floor(s*(R+1)-s/2+m),Y=Math.floor(s*(O+1)-s/2+g);X>a-1&&(X=a-1),Y>h-1&&(Y=h-1);const nt=(Y*a+X)*4;w[N]=o[nt],w[N+1]=o[nt+1],w[N+2]=o[nt+2],w[N+3]=o[nt+3]}else w[N]=o[N],w[N+1]=o[N+1],w[N+2]=o[N+2],w[N+3]=o[N+3]}return new ImageData(w,a,h)},Mh=(i,t,e={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}})=>{if(t&&e){const{data:n,width:r,height:s}=i,{data:o}=t,a=new Uint8ClampedArray(n.length),{backgroundColor:h,changeIntoColor:m}=e;for(let x=0;x<s;x++)for(let y=0;y<r;y++){const w=(x*r+y)*4,k=o[w],P=o[w+1],D=o[w+2],N=o[w+3];k===h.r&&P===h.g&&D===h.b&&N===h.a&&m.a!==0?(a[w]=m.r,a[w+1]=m.g,a[w+2]=m.b,a[w+3]=m.a):(a[w]=n[w],a[w+1]=n[w+1],a[w+2]=n[w+2],a[w+3]=n[w+3])}return new ImageData(a,r,s)}return i},Ms=(i,t)=>{const{data:e,width:n,height:r}=i,s=new Uint8ClampedArray(e.length);for(let a=0;a<r;a++)for(let h=0;h<n;h++){const m=(a*n+h)*4;for(let g=0;g<3;g++){const x=m+g;h===0||h===n-1||a===0||a===r-1?s[x]=e[x]:s[x]=t[0]*e[x-n*4-4]+t[1]*e[x-n*4]+t[2]*e[x-n*4+4]+t[3]*e[x-4]+t[4]*e[x]+t[5]*e[x+4]+t[6]*e[x+n*4-4]+t[7]*e[x+n*4]+t[8]*e[x+n*4+4]}s[m+3]=e[m+3]}return new ImageData(s,n,r)},Is=(i,t)=>{if(i&&i.length===4&&t&&t.length===4){const e=i[3],n=t[3];if(e===255||n===0)return i;if(e===0)return t;{const r=e/255,s=n/255,o=Math.max(Math.min(Math.floor(i[0]*r+t[0]*s*(1-r)),255),0),a=Math.max(Math.min(Math.floor(i[1]*r+t[1]*s*(1-r)),255),0),h=Math.max(Math.min(Math.floor(i[2]*r+t[2]*s*(1-r)),255),0),m=Math.max(Math.min(Math.floor((r+s*(1-r))*255),255),0);return[o,a,h,m]}}return[255,255,255,255]},Ls=function(i,t,e){const n=new Array(i*i),r=function(a){const h=a;let m=0,g=0;return{write(x,y){if(x>>>y)throw new Error("length over");for(;m+y>=8;)h.writeByte(255&(x<<m|g)),y-=8-m,x>>>=8-m,g=0,m=0;g=x<<m|g,m=m+y},flush(){m>0&&h.writeByte(g)}}},s=function(a){const h=1<<a,m=(1<<a)+1;let g=a+1;const x=o();for(let D=0;D<h;D++)x.add(String.fromCharCode(D));x.add(String.fromCharCode(h)),x.add(String.fromCharCode(m));const y=vr(),w=r(y);w.write(h,g);let k=0,P=String.fromCharCode(n[k]);for(k+=1;k<n.length;){const D=String.fromCharCode(n[k]);k+=1,x.contains(P+D)?P=P+D:(w.write(x.indexOf(P),g),x.size()<4095&&(x.size()==1<<g&&(g+=1),x.add(P+D)),P=D)}return w.write(x.indexOf(P),g),w.write(m,g),w.flush(),y.toByteArray()},o=function(){const a={};let h=0;return{add(m){if(this.contains(m))throw new Error("dup key:"+m);a[m]=h,h+=1},size(){return h},indexOf(m){return a[m]},contains(m){return typeof a[m]<"u"}}};return{setPixel(a,h,m){n[h*i+a]=m},write(a){a.writeString("GIF87a"),a.writeShort(i),a.writeShort(i),a.writeByte(128),a.writeByte(0),a.writeByte(0),a.writeByte(an("0x"+t[1]+t[2])),a.writeByte(an("0x"+t[3]+t[4])),a.writeByte(an("0x"+t[5]+t[6])),a.writeByte(an("0x"+e[1]+e[2])),a.writeByte(an("0x"+e[3]+e[4])),a.writeByte(an("0x"+e[5]+e[6])),a.writeString(","),a.writeShort(0),a.writeShort(0),a.writeShort(i),a.writeShort(i),a.writeByte(0);const h=2,m=s(h);a.writeByte(h);let g=0;for(;m.length-g>255;)a.writeByte(255),a.writeBytes(m,g,255),g+=255;a.writeByte(m.length-g),a.writeBytes(m,g,m.length-g),a.writeByte(0),a.writeString(";")}}},Ds=function(i,t,e,n){const r=Ls(i,t,e);for(let m=0;m<i;m++)for(let g=0;g<i;g++)r.setPixel(g,m,n(g,m));const s=vr();r.write(s);const o=ia(),a=s.toByteArray();for(let m=0,g=a.length;m<g;m++)o.writeByte(a[m]);o.flush();let h="";return h+="data:image/gif;base64,",h+=o,h},ie={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Rn={M:0,L:1,H:2,Q:3},ze={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},jt={glog:function(i){if(i<1)throw new Error("glog("+i+")");return jt.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return jt.EXP_TABLE[i]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let i=0;i<8;i++)jt.EXP_TABLE[i]=1<<i;for(let i=8;i<256;i++)jt.EXP_TABLE[i]=jt.EXP_TABLE[i-4]^jt.EXP_TABLE[i-5]^jt.EXP_TABLE[i-6]^jt.EXP_TABLE[i-8];for(let i=0;i<255;i++)jt.LOG_TABLE[jt.EXP_TABLE[i]]=i;const Bt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){let t=i<<10;for(;Bt.getBCHDigit(t)-Bt.getBCHDigit(Bt.G15)>=0;)t^=Bt.G15<<Bt.getBCHDigit(t)-Bt.getBCHDigit(Bt.G15);return(i<<10|t)^Bt.G15_MASK},getBCHTypeNumber:function(i){let t=i<<12;for(;Bt.getBCHDigit(t)-Bt.getBCHDigit(Bt.G18)>=0;)t^=Bt.G18<<Bt.getBCHDigit(t)-Bt.getBCHDigit(Bt.G18);return i<<12|t},getBCHDigit:function(i){let t=0;for(;i!=0;)t++,i>>>=1;return t},getPatternPosition:function(i){return Bt.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,t,e){switch(i){case ze.PATTERN000:return(t+e)%2==0;case ze.PATTERN001:return t%2==0;case ze.PATTERN010:return e%3==0;case ze.PATTERN011:return(t+e)%3==0;case ze.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2==0;case ze.PATTERN101:return t*e%2+t*e%3==0;case ze.PATTERN110:return(t*e%2+t*e%3)%2==0;case ze.PATTERN111:return(t*e%3+(t+e)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){let t=new fn([1],0);for(let e=0;e<i;e++)t=t.multiply(new fn([1,jt.gexp(e)],0));return t},getLengthInBits:function(i,t){if(1<=t&&t<10)switch(i){case ie.MODE_NUMBER:return 10;case ie.MODE_ALPHA_NUM:return 9;case ie.MODE_8BIT_BYTE:return 8;case ie.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(t<27)switch(i){case ie.MODE_NUMBER:return 12;case ie.MODE_ALPHA_NUM:return 11;case ie.MODE_8BIT_BYTE:return 16;case ie.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(t<41)switch(i){case ie.MODE_NUMBER:return 14;case ie.MODE_ALPHA_NUM:return 13;case ie.MODE_8BIT_BYTE:return 16;case ie.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+t)},getLostPoint:function(i){const t=i.getModuleCount();let e=0;for(let s=0;s<t;s++)for(let o=0;o<t;o++){let a=0;const h=i.isDark(s,o);for(let m=-1;m<=1;m++)if(!(s+m<0||t<=s+m))for(let g=-1;g<=1;g++)o+g<0||t<=o+g||m==0&&g==0||h==i.isDark(s+m,o+g)&&a++;a>5&&(e+=3+a-5)}for(let s=0;s<t-1;s++)for(let o=0;o<t-1;o++){let a=0;i.isDark(s,o)&&a++,i.isDark(s+1,o)&&a++,i.isDark(s,o+1)&&a++,i.isDark(s+1,o+1)&&a++,(a==0||a==4)&&(e+=3)}for(let s=0;s<t;s++)for(let o=0;o<t-6;o++)i.isDark(s,o)&&!i.isDark(s,o+1)&&i.isDark(s,o+2)&&i.isDark(s,o+3)&&i.isDark(s,o+4)&&!i.isDark(s,o+5)&&i.isDark(s,o+6)&&(e+=40);for(let s=0;s<t;s++)for(let o=0;o<t-6;o++)i.isDark(o,s)&&!i.isDark(o+1,s)&&i.isDark(o+2,s)&&i.isDark(o+3,s)&&i.isDark(o+4,s)&&!i.isDark(o+5,s)&&i.isDark(o+6,s)&&(e+=40);let n=0;for(let s=0;s<t;s++)for(let o=0;o<t;o++)i.isDark(o,s)&&n++;const r=Math.abs(100*n/t/t-50)/5;return e+=r*10,e}};class fn{num;constructor(t,e){if(t.length==null)throw new Error(t.length+"/"+e);let n=0;for(;n<t.length&&t[n]==0;)n++;this.num=new Array(t.length-n+e);for(let r=0;r<t.length-n;r++)this.num[r]=t[r+n]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let n=0;n<this.getLength();n++)for(let r=0;r<t.getLength();r++)e[n+r]^=jt.gexp(jt.glog(this.get(n))+jt.glog(t.get(r)));return new fn(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=jt.glog(this.get(0))-jt.glog(t.get(0)),n=new Array(this.getLength());for(let r=0;r<this.getLength();r++)n[r]=this.get(r);for(let r=0;r<t.getLength();r++)n[r]^=jt.gexp(jt.glog(t.get(r))+e);return new fn(n,0).mod(t)}}class Se{totalCount;dataCount;constructor(t,e){this.totalCount=t,this.dataCount=e}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(t,e){const n=Se.getRsBlockTable(t,e);if(n==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);const r=n.length/3,s=[];for(let o=0;o<r;o++){const a=n[o*3+0],h=n[o*3+1],m=n[o*3+2];for(let g=0;g<a;g++)s.push(new Se(h,m))}return s}static getRsBlockTable(t,e){switch(e){case Rn.L:return Se.RS_BLOCK_TABLE[(t-1)*4+0];case Rn.M:return Se.RS_BLOCK_TABLE[(t-1)*4+1];case Rn.Q:return Se.RS_BLOCK_TABLE[(t-1)*4+2];case Rn.H:return Se.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}class Rs{buffer;length;constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}class Ih{mode;data;constructor(t){this.mode=ie.MODE_8BIT_BYTE,this.data=t}getLength(){return this.data.length}write(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data.charCodeAt(e),8)}}class Ue{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(t,e){this.typeNumber=t,this.errorCorrectLevel=Rn[e],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(t){const e=new Ih(t);this.dataList.push(e),this.dataCache=null}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let t=1;for(t=1;t<40;t++){const e=Se.getRSBlocks(t,this.errorCorrectLevel),n=new Rs;let r=0;for(let s=0;s<e.length;s++)r+=e[s].dataCount;for(let s=0;s<this.dataList.length;s++){const o=this.dataList[s];n.put(o.mode,4),n.put(o.getLength(),Bt.getLengthInBits(o.mode,t)),o.write(n)}if(n.getLengthInBits()<=r*8)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=Ue.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(let r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(0<=n&&n<=6&&(r==0||r==6)||0<=r&&r<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=r&&r<=4?this.modules[t+n][e+r]=!0:this.modules[t+n][e+r]=!1)}getBestMaskPattern(){let t=0,e=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const r=Bt.getLostPoint(this);(n==0||t>r)&&(t=r,e=n)}return e}createMovieClip(t,e,n){const r=t.createEmptyMovieClip(e,n),s=1;this.make();for(let o=0;o<this.modules.length;o++){const a=o*s;for(let h=0;h<this.modules[o].length;h++){const m=h*s;this.modules[o][h]&&(r.beginFill(0,100),r.moveTo(m,a),r.lineTo(m+s,a),r.lineTo(m+s,a+s),r.lineTo(m,a+s),r.endFill())}}return r}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=Bt.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let n=0;n<t.length;n++){const r=t[e],s=t[n];if(this.modules[r][s]==null)for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o==-2||o==2||a==-2||a==2||o==0&&a==0?this.modules[r+o][s+a]=!0:this.modules[r+o][s+a]=!1}}setupTypeNumber(t){const e=Bt.getBCHTypeNumber(this.typeNumber);for(let n=0;n<18;n++){const r=!t&&(e>>n&1)==1;this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(let n=0;n<18;n++){const r=!t&&(e>>n&1)==1;this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}}setupTypeInfo(t,e){const n=this.errorCorrectLevel<<3|e,r=Bt.getBCHTypeInfo(n);for(let s=0;s<15;s++){const o=!t&&(r>>s&1)==1;s<6?this.modules[s][8]=o:s<8?this.modules[s+1][8]=o:this.modules[this.moduleCount-15+s][8]=o}for(let s=0;s<15;s++){const o=!t&&(r>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=o:s<9?this.modules[8][15-s-1+1]=o:this.modules[8][15-s-1]=o}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let n=-1,r=this.moduleCount-1,s=7,o=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let h=0;h<2;h++)if(this.modules[r][a-h]==null){let m=!1;o<t.length&&(m=(t[o]>>>s&1)==1),Bt.getMask(e,r,a-h)&&(m=!m),this.modules[r][a-h]=m,s--,s==-1&&(o++,s=7)}if(r+=n,r<0||this.moduleCount<=r){r-=n,n=-n;break}}}static createData(t,e,n){const r=Se.getRSBlocks(t,e),s=new Rs;for(let a=0;a<n.length;a++){const h=n[a];s.put(h.mode,4),s.put(h.getLength(),Bt.getLengthInBits(h.mode,t)),h.write(s)}let o=0;for(let a=0;a<r.length;a++)o+=r[a].dataCount;if(s.getLengthInBits()>o*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+o*8+")");for(s.getLengthInBits()+4<=o*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=o*8||(s.put(Ue.PAD0,8),s.getLengthInBits()>=o*8));)s.put(Ue.PAD1,8);return Ue.createBytes(s,r)}static createBytes(t,e){let n=0,r=0,s=0;const o=new Array(e.length),a=new Array(e.length);for(let x=0;x<e.length;x++){const y=e[x].dataCount,w=e[x].totalCount-y;r=Math.max(r,y),s=Math.max(s,w),o[x]=new Array(y);for(let N=0;N<o[x].length;N++)o[x][N]=255&t.buffer[N+n];n+=y;const k=Bt.getErrorCorrectPolynomial(w),D=new fn(o[x],k.getLength()-1).mod(k);a[x]=new Array(k.getLength()-1);for(let N=0;N<a[x].length;N++){const R=N+D.getLength()-a[x].length;a[x][N]=R>=0?D.get(R):0}}let h=0;for(let x=0;x<e.length;x++)h+=e[x].totalCount;const m=new Array(h);let g=0;for(let x=0;x<r;x++)for(let y=0;y<e.length;y++)x<o[y].length&&(m[g++]=o[y][x]);for(let x=0;x<s;x++)for(let y=0;y<e.length;y++)x<a[y].length&&(m[g++]=a[y][x]);return m}}const Os=Math.ceil,On=Math.floor,Ns=Math.round;function Lh(i,t){const e=mr(i),n=t?.ecc||"H",r=t?.size||256,s=-1,o=t?.padding||0,a=t?.color||"#000000",h=t?.background||"#ffffff",m=new Ue(s,n);m.addData(e),m.make();const g=m.getModuleCount(),x=(r-o*2)/g,y=o,w=r-o;return Ds(r,a,h,function(k,P){if(y<=k&&k<w&&y<=P&&P<w){const D=On((k-y)/x),N=On((P-y)/x);return m.isDark(N,D)?0:1}else return 1})}function Dh(i,t){const e=t.x||0,n=t.y||0,r=mr(i),s=t.ctx,o=t.ecc||"H",a=typeof t.size=="number"?On(t.size):256,h=t.padding||0,m=-1,g=t.color||"#000000",x=t.background||"#ffffff",y=new Ue(m,o);y.addData(r),y.make();const w=y.getModuleCount(),k=(a-h*2)/w;s.fillStyle=x,s.fillRect(e,n,a,a);for(let P=0;P<w;P++)for(let D=0;D<w;D++){const N=Os((D+1)*k)-On(D*k),R=Os((P+1)*k)-On(P*k);s.fillStyle=y.isDark(P,D)?g:x,s.fillRect(e+Ns(D*k)+h,n+Ns(P*k)+h,N,R)}}function or(){let i=null;if(window.ActiveXObject){const t=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let e=0;e<t.length;e++)try{i=new window.ActiveXObject(t[e]);break}catch{continue}}else i=new XMLHttpRequest;return i}function Rh(i){if(!i.action)return{url:"",data:"",boundary:""};const t=i.method.toLowerCase()==="get",e=i.method.toLowerCase()==="post";let n=i.action,r="";const s="---------------------------"+Date.now().toString(16);if(window.FormData)r=new FormData(i),t&&(n=ri(n,rr(r)));else if(t){let o="";for(let a=0;a<i.elements.length;a++){const h=i.elements[a];if(!h.hasAttribute("name"))continue;const m=h.nodeName.toUpperCase()==="INPUT"?h.getAttribute("type")?.toUpperCase():"TEXT";if(m==="FILE")for(let g=0,x=h.files?.length??0;g<x;o+="&"+encodeURIComponent(h.name)+"="+encodeURIComponent(h.files?.[g++].name??""));else(m!=="RADIO"&&m!=="CHECKBOX"||h.checked)&&(o+="&"+encodeURIComponent(h.name)+"="+encodeURIComponent(h.value))}n=ri(n,o)}else if(e){const o=[];if(i.enctype==="application/x-www-form-urlencoded"){for(let a=0;a<i.elements.length;a++){const h=i.elements[a];h.hasAttribute("name")&&o.push(encodeURIComponent(h.name)+"="+encodeURIComponent(h.value))}r=o.join("&")}else if(i.enctype==="text/plain"){for(let a=0;a<i.elements.length;a++){const h=i.elements[a];h.hasAttribute("name")&&o.push(h.name+"="+h.value)}r=o.join(`\r
|
|
30
|
+
`)}else if(i.enctype==="multipart/form-data"){for(let a=0;a<i.elements.length;a++){const h=i.elements[a];if(!h.hasAttribute("name"))continue;if((h.nodeName.toUpperCase()==="INPUT"?h.getAttribute("type")?.toUpperCase():"TEXT")==="FILE")for(let g=0,x=h.files?.length??0;g<x;g++){const y=h.files?.[g];o.push('Content-Disposition: form-data; name="'+h.name+'"; filename="'+y?.name+`"\r
|
|
31
|
+
Content-Type: `+y?.type+`\r
|
|
32
32
|
\r
|
|
33
|
-
`)}else
|
|
33
|
+
`)}else o.push('Content-Disposition: form-data; name="'+h.name+`"\r
|
|
34
34
|
\r
|
|
35
|
-
`+
|
|
36
|
-
`)}r=
|
|
37
|
-
`)}}return{url:
|
|
38
|
-
`+s+
|
|
39
|
-
`):u.send(JSON.stringify(s))):(u.open(g,r,!0),p(),u.send(JSON.stringify(s)))})}function $0(n,t){const e=Js();e.open("HEAD",n),e.filepath=n,e.callback=t,e.onload=function(){const i=parseFloat(window.localStorage.getItem("lm_"+this.filepath)??""),r=Date.parse(this.getResponseHeader("Last-Modified"));(isNaN(i)||r>i)&&(window.localStorage.setItem("lm_"+this.filepath,String(Date.now())),isFinite(i)&&this.callback(r,i))},e.send()}let Er;const Ql=new WeakMap;function Ks(n,t){let e=Ql.get(n);e||(e=new Map,Ql.set(n,e));let i=e.get(t);return i||(i=new tc,e.set(t,i)),i}class tc{subscribers;constructor(){this.subscribers=new Set}depend(){Er&&this.subscribers.add(Er)}notify(){this.subscribers.forEach(t=>t())}}function q0(n){Er=n,n(),Er=null}function W0(n){return Object.keys(n).forEach(t=>{let e=n[t];const i=Ks(n,t);Object.defineProperty(n,t,{get(){return i.depend(),e},set(r){r!=e&&(e=r,i.notify())}})}),n}function J0(n){return new Proxy(n,{get(t,e,i){return Ks(n,e).depend(),Reflect.get(t,e,i)},set(t,e,i,r){const s=Ks(n,e);return n[e]!=i&&(n[e]=i,s.notify()),Reflect.set(t,e,i,r)}})}class kr{x;y;z;constructor(t=[0,0,0],e=[0,0,0]){const[i,r,s]=t,[a,o,l]=e;this.x=i-a,this.y=r-o,this.z=s-l}get length(){const{x:t,y:e,z:i}=this;return Math.sqrt(t*t+e*e+i*i)}unit(){const t=this.length;return new kr([this.x/t,this.y/t,this.z/t])}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}cross(t){const e=this.x,i=this.y,r=this.z,s=t.x,a=t.y,o=t.z;return new kr([i*o-r*a,r*s-e*o,e*a-s*i])}}(function(){let n=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){const e=new Date().getTime(),i=Math.max(0,16-(e-n)),r=window.setTimeout(function(){t(e+i)},i);return n=e+i,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})})();const ec=n=>{let t=window.requestAnimationFrame(function e(i){t=window.requestAnimationFrame(e),n(i,t)});return()=>window.cancelAnimationFrame(t)};class K0{id=0;renders={};cancelFn;constructor(){}get length(){let t=0;for(let e in this.renders)t++;return t}register(t){const e=this.id++;this.renders[e]=t,this.run()}run(){this.cancelFn||(this.cancelFn=ec((t,e)=>{const i=[];for(let r in this.renders)this.renders[r](t)===!1&&i.push(parseInt(r));for(let r of i)delete this.renders[r];!this.length&&this.cancelFn&&(this.cancelFn(),this.cancelFn=void 0)}))}}const Qs=new K0;let zi;typeof self>"u"&&typeof process<"u"&&process.hrtime?zi=function(){const n=process.hrtime();return n[0]*1e3+n[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?zi=self.performance.now.bind(self.performance):Date.now!==void 0?zi=Date.now:zi=function(){return new Date().getTime()};const Wn=zi;class Ui{static _nextId=0;static nextId(){return Ui._nextId++}}const Sr={Linear:{None:function(n){return n}},Ease:{In:function(n){return Math.pow(n,1.7)}},Quadratic:{In:function(n){return n*n},Out:function(n){return n*(2-n)},InOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)}},Cubic:{In:function(n){return n*n*n},Out:function(n){return--n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)}},Quartic:{In:function(n){return n*n*n*n},Out:function(n){return 1- --n*n*n*n},InOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)}},Quintic:{In:function(n){return n*n*n*n*n},Out:function(n){return--n*n*n*n*n+1},InOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)}},Sinusoidal:{In:function(n){return 1-Math.sin((1-n)*Math.PI/2)},Out:function(n){return Math.sin(n*Math.PI/2)},InOut:function(n){return .5*(1-Math.sin(Math.PI*(.5-n)))}},Exponential:{In:function(n){return n===0?0:Math.pow(1024,n-1)},Out:function(n){return n===1?1:1-Math.pow(2,-10*n)},InOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)}},Circular:{In:function(n){return 1-Math.sqrt(1-n*n)},Out:function(n){return Math.sqrt(1- --n*n)},InOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)}},Elastic:{In:function(n){return n===0?0:n===1?1:-Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI)},Out:function(n){return n===0?0:n===1?1:Math.pow(2,-10*n)*Math.sin((n-.1)*5*Math.PI)+1},InOut:function(n){return n===0?0:n===1?1:(n*=2,n<1?-.5*Math.pow(2,10*(n-1))*Math.sin((n-1.1)*5*Math.PI):.5*Math.pow(2,-10*(n-1))*Math.sin((n-1.1)*5*Math.PI)+1)}},Back:{In:function(n){return n===1?1:n*n*((1.70158+1)*n-1.70158)},Out:function(n){return n===0?0:--n*n*((1.70158+1)*n+1.70158)+1},InOut:function(n){const t=2.5949095;return(n*=2)<1?.5*(n*n*((t+1)*n-t)):.5*((n-=2)*n*((t+1)*n+t)+2)}},Bounce:{In:function(n){return 1-Sr.Bounce.Out(1-n)},Out:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},InOut:function(n){return n<.5?Sr.Bounce.In(n*2)*.5:Sr.Bounce.Out(n*2-1)*.5+.5}},generatePow:function(n=4){return n=n<Number.EPSILON?Number.EPSILON:n,n=n>1e4?1e4:n,{In:function(t){return t**n},Out:function(t){return 1-(1-t)**n},InOut:function(t){return t<.5?(t*2)**n/2:(1-(2-t*2)**n)/2+.5}}},random:function(n){return Math.random()},createStep:function(n){return function(t){return Math.floor(t*n)/n}},createNoisyEasing:function(n,t=.1){const e=1-t;return function(i){return t*Math.random()+e*n(i)}}},ta=Sr,Ni={Utils:{Linear:function(n,t,e){return(t-n)*e+n},Factorial:function(){const n=[1];return function(t){let e=1;if(n[t])return n[t];for(let i=t;i>1;i--)e*=i;return n[t]=e,e}}(),Bernstein:function(n,t){const e=Ni.Utils.Factorial;return e(n)/e(t)/e(n-t)},CatmullRom:function(n,t,e,i,r){const s=(e-n)*.5,a=(i-t)*.5,o=r*r,l=r*o;return(2*t-2*e+s+a)*l+(-3*t+3*e-2*s-a)*o+s*r+t}},Linear:function(n,t){const e=n.length-1,i=e*t,r=Math.floor(i),s=Ni.Utils.Linear;return t<0?s(n[0],n[1],i):t>1?s(n[e],n[e-1],e-i):s(n[r],n[r+1>e?e:r+1],i-r)},Bezier:function(n,t){let e=0;const i=n.length-1,r=Math.pow,s=Ni.Utils.Bernstein;for(let a=0;a<=i;a++)e+=r(1-t,i-a)*r(t,a)*n[a]*s(i,a);return e},CatmullRom:function(n,t){const e=n.length-1;let i=e*t,r=Math.floor(i);const s=Ni.Utils.CatmullRom;return n[0]===n[e]?(t<0&&(r=Math.floor(i=e*(1+t))),s(n[(r-1+e)%e],n[r],n[(r+1)%e],n[(r+2)%e],i-r)):t<0?n[0]-(s(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[e]-(s(n[e],n[e],n[e-1],n[e-1],i-e)-n[e]):s(n[r?r-1:0],n[r],n[e<r+1?e:r+1],n[e<r+2?e:r+2],i-r)}},ea=Ni;class nc{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=Wn(),e=!1){let i=Object.keys(this._tweens);if(i.length===0)return!1;for(;i.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<i.length;r++){const s=this._tweens[i[r]],a=!e;s&&s.update(t,a)===!1&&!e&&delete this._tweens[i[r]]}i=Object.keys(this._tweensAddedDuringUpdate)}return!0}}const _e=new nc;class Q0{constructor(t,e=_e){this._object=t,this._group=e}_id=Ui.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=ta.Linear.None;_interpolationFunction=ea.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=Wn()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,i,r){for(const s in i){const a=t[s],o=Array.isArray(a),l=o?"array":typeof a,c=!o&&Array.isArray(i[s]);if(!(l==="undefined"||l==="function")){if(c){let u=i[s];if(u.length===0)continue;u=u.map(this._handleRelativeValue.bind(this,a)),i[s]=[a].concat(u)}if((l==="object"||o)&&a&&!c){e[s]=o?[]:{};for(const u in a)e[s][u]=a[u];r[s]=o?[]:{},this._setupProperties(a,e[s],i[s],r[s])}else typeof e[s]>"u"&&(e[s]=a),o||(e[s]*=1),c?r[s]=i[s].slice().reverse():r[s]=e[s]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=Wn()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=Wn()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=_e){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=ta.Linear.None){return this._easingFunction=t,this}interpolation(t=ea.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=Wn(),e=!0){if(this._isPaused)return!0;let i,r;const s=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),r=(t-this._startTime)/this._durationTime,r=this._durationTime===0||r>1?1:r;const a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let o=0,l=this._chainedTweens.length;o<l;o++)this._chainedTweens[o].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,i,r){for(const s in i){if(e[s]===void 0)continue;const a=e[s]||0;let o=i[s];const l=Array.isArray(t[s]),c=Array.isArray(o);!l&&c?t[s]=this._interpolationFunction(o,r):typeof o=="object"&&o?this._updateProperties(t[s],a,o,r):(o=this._handleRelativeValue(a,o),typeof o=="number"&&(t[s]=a+(o-a)*r))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=i,this._valuesEnd[t]=e}}const tp=Q0,ep=Ui.nextId,np=_e.getAll.bind(_e),ip=_e.removeAll.bind(_e),rp=_e.add.bind(_e),sp=_e.remove.bind(_e),op=_e.update.bind(_e),na={now:Wn,Sequence:Ui,Easing:ta,Interpolation:ea,Group:nc,Tween:tp,nextId:ep,getAll:np,removeAll:ip,add:rp,remove:sp,update:op};function ic(n){switch(n){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}const lp={attributeName:["display"],values:[["block","block"]]},se={easeName:"linear",begin:0,dur:300,repeatCount:1,direction:"normal",fill:"freeze",keyTimes:[0,1]};class Bi{currentAnimateName;objects=[];actions=[];constructor(){}hasObjects(){return this.objects.length>0}fromDOM(t){return Array.isArray(t)||(t=[t]),this.objects=[],t.forEach(e=>{const i=cr(e);this.objects.push({width:parseFloat(i.css("width")),height:parseFloat(i.css("height")),dom:i,el:e,originCSSObject:i.css()})}),this}toCSS(t,...e){if(!this.hasObjects())return;switch(this.currentAnimateName=t,this[t](...e),this.objects[0].dom?.parent().css({position:"relative",perspective:"1000px",overflow:"hidden"}),t){default:this.objects.forEach((s,a)=>{s.dom?.css({position:"absolute","z-index":String(1e3+a),"transform-style":"preserve-3d","backface-visibility":"hidden"})});break}let i=0;const r=()=>{this.actions.forEach((s,a)=>{const o=this.objects[s.objectIndex];let l=[],c=[];Array.isArray(s.attributeName)?(l=s.attributeName,c=s.values):s.attributeName&&(l=[s.attributeName],c=[s.values]);const u=s.keyTimes.length,g=Nn(o.dom?.css("transform")??"");let p=s.begin;s.keyTimes.forEach((d,y)=>{const x={_matrix:g};l.forEach((C,A)=>{const P=c[A][s.direction=="reverse"?u-y-1:y];Bi.setCSSObjectTransformUseMatrix(C,P,x)}),y==0?o.dom?.css(Object.assign(x,{transition:""})):(setTimeout(()=>{o.dom?.css(Object.assign(x,{transition:`all ${s.realKeyTimes[y]}ms cubic-bezier(${s.keySplines[y-1].join(",")})`}))},p),p+=s.realKeyTimes[y])}),setTimeout(()=>{s.fill==="remove"&&o.dom?.css(o.originCSSObject??{}),a==this.actions.length-1&&(typeof s.repeatCount=="number"&&++i<s.repeatCount||s.repeatCount=="infinite")&&requestAnimationFrame(()=>{this.currentAnimateName===t&&r()})},s.begin+s.dur)})};r()}static toTween(t,e,i){const r=i?.onUpdate??(()=>{}),s=i?.onStart??(()=>{}),a=i?.onComplete??(()=>{}),o=i?.duration??1e3,l=i?.delay??0,c=i?.easeFunction??na.Easing.Linear.None,u=i?.repeat??0,g=i?.yoyo??!1,p=new na.Tween(t).to(e,o).delay(l).easing(c).repeat(u).yoyo(g).onStart(s).onUpdate(function(d,y){r(d,y)}).onComplete(a);return i?.interpolationFunction&&p.interpolation(i.interpolationFunction),{tween:p,startAuto:()=>{p.start(),Qs.register(()=>p.update())}}}static toTweenCSS(t,e,i,r){const s=cr(t);s?.parent().css({overflow:"hidden","transform-style":"preserve-3d",perspective:"1000px","backface-visibility":"hidden"});const a={_matrix:Nn(s?.css("transform")??"")},o=r?.onUpdate??(()=>{});return Bi.toTween(e,i,Object.assign(r??{},{onUpdate:(l,c)=>{for(let u in l)Bi.setCSSObjectTransformUseMatrix(u,l[u],a);t.style.transform=a.transform,o(l,c)}}))}static setCSSObjectTransformUseMatrix(t,e,i={}){switch(t){case"translate":i._matrix.translate(e[0]??0,e[1]??0);break;case"translateTo":i._matrix.translateTo(e[0]??0,e[1]??0);break;case"translateX":i._matrix.translateX(e??0);break;case"translateXTo":i._matrix.translateXTo(e??0);break;case"translateY":i._matrix.translateY(e??0);break;case"translateYTo":i._matrix.translateYTo(e??0);break;case"translateZ":i._matrix.translateZ(e??0);break;case"translateZTo":i._matrix.translateZTo(e??0);break;case"translate3d":i._matrix.translate3d(e[0]??0,e[1]??0,e[2]??0);break;case"translate3dTo":i._matrix.translate3dTo(e[0]??0,e[1]??0,e[2]??0);break;case"rotate":typeof e=="number"?i._matrix.rotate(e??0):i._matrix.rotate(e[0]??0,e[1]??0,e[2]??0);break;case"rotateTo":typeof e=="number"?i._matrix.rotateTo(e??0):i._matrix.rotateTo(e[0]??0,e[1]??0,e[2]??0);break;case"rotateX":i._matrix.rotateX(e??0);break;case"rotateXTo":i._matrix.rotateXTo(e??0);break;case"rotateY":i._matrix.rotateY(e??0);break;case"rotateYTo":i._matrix.rotateYTo(e??0);break;case"rotateZ":i._matrix.rotateZ(e??0);break;case"rotateZTo":i._matrix.rotateZTo(e??0);break;case"rotate3d":i._matrix.rotate3d(e[0]??0,e[1]??0,e[2]??0);break;case"rotate3dTo":i._matrix.rotate3dTo(e[0]??0,e[1]??0,e[2]??0);break;case"scale":typeof e=="number"?i._matrix.scale(e??1):i._matrix.scale(e[0]??1,e[1]??1,e[2]??0,e[3]??0);break;case"scaleTo":typeof e=="number"?i._matrix.scaleTo(e??1):i._matrix.scaleTo(e[0]??1,e[1]??1,e[2]??0,e[3]??0);break;case"scaleX":i._matrix.scaleX(e??1);break;case"scaleXTo":i._matrix.scaleXTo(e??1);break;case"scaleY":i._matrix.scaleY(e??1);break;case"scaleYTo":i._matrix.scaleYTo(e??1);break;case"scaleZ":i._matrix.scaleZ(e??1);break;case"scaleZTo":i._matrix.scaleZTo(e??1);break;case"scale3d":i._matrix.scale3d(e??1);break;case"scale3dTo":i._matrix.scale3dTo(e??1);break;case"skew":typeof e=="number"?i._matrix.skew(e??0):i._matrix.skew(e[0]??0,e[1]??0);break;case"skewTo":typeof e=="number"?i._matrix.skewTo(e??0):i._matrix.skewTo(e[0]??0,e[1]??0);break;case"skewX":i._matrix.skewX(e??0);break;case"skewXTo":i._matrix.skewXTo(e??1);break;case"skewY":i._matrix.skewY(e??0);break;case"skewYTo":i._matrix.skewYTo(e??1);break;case"skewZ":case"skewZTo":case"skew3d":case"skew3dTo":break;default:Object.assign(i,{[t]:`${e??""}`});break}return Object.assign(i,{transform:i._matrix.toString()}),i}_addAction(t,e=!1){return this.actions=e?[]:this.actions,Array.isArray(t)||(t=[t]),t.forEach(i=>{this.actions.push(Object.assign(i,{realKeyTimes:i.keyTimes.map(r=>i.dur*r)}))}),this}_addAnimate(t=lp,e=se,i=0,r=!1){const s=e.keyTimes??[0,1],a=[];return s.forEach((o,l)=>{l>0&&a.push(ic(e.easeName??"linear"))}),this._addAction({objectIndex:i,attributeName:t.attributeName,values:t.values,begin:e.begin??0,dur:e.dur??300,keyTimes:s,keySplines:a,repeatCount:e.repeatCount??1,direction:e.direction??"normal",fill:e.fill??"freeze"},r),this}_predefinedAnimate(t,e,i,r,s=se,a=this.objects.length-1){let o=!0,l=!1,c=!1,u=!1;const g=this.objects.length;a=(a+g)%g;const p=(a-1+g)%g,d=(a+1+g)%g,y=this.objects[a],x=this.objects[p],C=this.objects[d];if(x&&p!==a){const A=t(x);A&&(this._addAnimate(A,s,p,o),o=!1,l=!0)}if(y){const A=e(y);A&&(this._addAnimate(A,s,a,o),o=!1,c=!0)}if(C&&d!==a){const A=i(C);A&&(this._addAnimate(A,s,d,o),o=!1,u=!0)}this.objects.forEach((A,P)=>{if(!(P==p&&l||P==a&&c||P==d&&u)){const M=r(A);M&&(this._addAnimate(M,s,P,o),o=!1)}})}flip(t=se,e=this.objects.length-1){const i=e-1,r=this.objects[i],s=this.objects[e],a=Nn(s.dom?.css("transform")??""),o=a.clone();r.dom?.show(),r.dom?.css("opacity","1");const l=r.el?.getBoundingClientRect();r.dom?.css("opacity","0"),s.dom?.show(),s.dom?.css("opacity","1");const c=s.el?.getBoundingClientRect(),u=r.dom?.css("background-color"),g=s.dom?.css("background-color");o.translate((l?.left??0)-(c?.left??0),(l?.top??0)-(c?.top??0)),o.scale((l?.width??1)/(c?.width??1),(l?.height??1)/(c?.height??1));const p={transform:o.toString(),transition:""};u&&Object.assign(p,{"background-color":u}),s.dom?.css(p);const d={transform:a.toString(),transition:`all ${t.dur}ms cubic-bezier(${ic(t.easeName??"linear").join(",")})`};g&&Object.assign(d,{"background-color":g}),setTimeout(()=>{s.dom?.css(d)},t.begin)}slideLeft(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["translateTo"],values:[[[0,0],[-i.width,0]]]}),i=>({attributeName:["opacity","translateTo"],values:[[1,1],[[i.width,0],[0,0]]]}),i=>{},i=>({attributeName:["translateTo"],values:[[[-i.width,0],[-i.width,0]]]}),t,e)}slideRight(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>{},i=>({attributeName:["opacity","translateTo"],values:[[1,1],[[-i.width,0],[0,0]]]}),i=>({attributeName:["translateTo"],values:[[[0,0],[i.width,0]]]}),i=>({attributeName:["translateTo"],values:[[[i.width,0],[i.width,0]]]}),t,e)}slideDown(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["translateTo"],values:[[[0,0],[0,i.height]]]}),i=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,-i.height],[0,0]]]}),i=>{},i=>({attributeName:["translateTo"],values:[[[0,i.height],[0,i.height]]]}),t,e)}slideUp(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["translateTo"],values:[[[0,0],[0,-i.height]]]}),i=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,i.height],[0,0]]]}),i=>{},i=>({attributeName:["translateTo"],values:[[[0,-i.height],[0,-i.height]]]}),t,e)}flipLeft(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,180]]}),i=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[-180,0]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipRight(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,-180]]}),i=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[180,0]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipDown(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,-180]]}),i=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[180,0]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipUp(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,180]]}),i=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[-180,0]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popIn(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>{},i=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[.8,1],[0,1]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popOut(t=se,e=this.objects.length-1){this._predefinedAnimate(i=>{},i=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[1,1.2],[1,0]]}),i=>{},i=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}rotate(t=se,e=this.objects.length-1){Object.assign(t,{keyTimes:[0,1]});const i=t.degree??360;this._predefinedAnimate(r=>{},r=>({attributeName:["opacity","rotate"],values:[[1,1],[0,i]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}}class Jn extends Te{app;rotate;scale;isMouseDownInBounds=!1;removeCaptureMove;constructor(t,e){super({x:0,y:0,...e}),this.rotate=e?.rotate??0,this.scale=e?.scale??1,this.app=t,this.removeCaptureMove=this.app.captureMove({start:i=>{this.app.ctx?this.isMouseDownInBounds=this.app.ctx.isPointInPath(this.app.mousePoint.x,this.app.mousePoint.y):this.isMouseDownInBounds=this.getBoundRect().isContainPoint(this.app.mousePoint)},end:i=>{this.isMouseDownInBounds=!1},move:i=>{}})}destroy(){this.removeCaptureMove()}draw(t){if(this.app.ctx){if(this.app.ctx.save(),t?.followMouseMove&&(!fa(this.x,this.app.mousePoint.x,5)||!fa(this.y,this.app.mousePoint.y,5))&&(this.rotate=this.angleTo(this.app.mousePoint),this.followTo(this.app.mousePoint)),t?.dragMouseMove){if(this.app.container.style.cursor="grab",this.isMouseDownInBounds){this.app.container.style.cursor="grabbing",this.x=this.app.mousePoint.x,this.y=this.app.mousePoint.y;const e=this.getBoundRect();e.width&&e.height&&!this.radius&&(this.x-=this.getBoundRect().width/2,this.y-=this.getBoundRect().height/2)}}else this.app.container.style.cursor="default";t?.dragFreeEaseTo&&(this.isMouseDownInBounds||this.nextFrameEaseTo(new Te({x:t.dragFreeEaseTo.targetX,y:t.dragFreeEaseTo.targetY}),{easing:t.dragFreeEaseTo?.easing??.05})),t?.extra?.(),this.app.ctx?.translate(this.x,this.y),this.app.ctx?.rotate(this.rotate),this.app.ctx?.scale(this.scale,this.scale),t?.shape(),this.app.ctx.lineWidth>0&&this.app.ctx.stroke(),this.app.ctx?.restore()}}}class cp extends Jn{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=2,this.app.ctx.fillStyle="#ffff00",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(-50,-25),this.app.ctx.lineTo(0,-25),this.app.ctx.lineTo(0,-50),this.app.ctx.lineTo(50,0),this.app.ctx.lineTo(0,50),this.app.ctx.lineTo(0,25),this.app.ctx.lineTo(-50,25),this.app.ctx.lineTo(-50,-25),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class hp extends Jn{radius;constructor(t,e){super(t,e),this.radius=e?.radius??40}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.fillStyle="#ff0000",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.arc(0,0,this.radius,0,Math.PI*2,!0),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class fp extends Jn{toX;toY;c1x;c1y;c2x;c2y;constructor(t,e){super(t,e),this.toX=e?.toX??0,this.toY=e?.toY??0,this.c1x=e?.c1x??0,this.c1y=e?.c1y??0,this.c2x=e?.c2x??0,this.c2y=e?.c2y??0}getBoundRect(){if(this.rotate===0){const t=Math.min(this.x,this.toX),e=Math.min(this.y,this.toY),i=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return new Un({x:t,y:e,width:i-t,height:r-e})}else{const t=Math.sin(this.rotate),e=Math.cos(this.rotate),i=e*this.x-t*this.y,r=e*this.toX-t*this.toY,s=e*this.y+t*this.x,a=e*this.toY+t*this.toX;return new Un({x:Math.min(i,r),y:Math.min(s,a),width:Math.max(i,r)-Math.min(i,r),height:Math.max(s,a)-Math.min(s,a)})}}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.lineTo(this.toX-this.x,this.toY-this.y))}})}drawQuadratic(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.quadraticCurveTo(this.c1x-this.x,this.c1y-this.y,this.toX-this.x,this.toY-this.y))}})}drawQuadraticThrough(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{if(!this.app.ctx)return;this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0);const e=this.c1x*2-(this.x+this.toX)/2,i=this.c1y*2-(this.y+this.toY)/2;this.app.ctx.quadraticCurveTo(e-this.x,i-this.y,this.toX-this.x,this.toY-this.y)}})}drawQuadraticThroughCurve(t,e){super.draw({...e,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",e?.extra?.())},shape:()=>{if(!this.app.ctx)return;const i=t.length;if(i<3)return new Error("points length must >= 3");const r=(t[0].x+t[i-1].x)/2,s=(t[0].y+t[i-1].y)/2;this.app.ctx.beginPath(),this.app.ctx.moveTo(r,s);let a=0;for(;a<i-1;a++){const o=(t[a].x+t[a+1].x)/2,l=(t[a].y+t[a+1].y)/2;this.app.ctx.quadraticCurveTo(t[a].x-this.x,t[a].y-this.y,o-this.x,l-this.y)}this.app.ctx.quadraticCurveTo(t[a].x-this.x,t[a].y-this.y,r-this.x,s-this.y)}})}drawQuadraticThroughCurveNotGood(t,e){super.draw({...e,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",e?.extra?.())},shape:()=>{if(!this.app.ctx)return;const i=t.length;if(i<3)return new Error("points length must >= 3");this.app.ctx.beginPath(),this.app.ctx.moveTo(t[0].x,t[0].y);let r=1;for(;r<i-2;r++){const s=(t[r].x+t[r+1].x)/2,a=(t[r].y+t[r+1].y)/2;this.app.ctx.quadraticCurveTo(t[r].x-this.x,t[r].y-this.y,s-this.x,a-this.y)}this.app.ctx.quadraticCurveTo(t[r].x-this.x,t[r].y-this.y,t[r+1].x-this.x,t[r+1].y-this.y)}})}}class up extends Jn{width;height;borderRadius;rect;constructor(t,e){return super(t,e),this.width=e?.width??50,this.height=e?.height??50,this.borderRadius=e?.borderRadius??0,this.rect=new Un({x:this.x,y:this.y,width:this.width,height:this.height}),new Proxy(this,{get:(r,s,a)=>Reflect.get(r,s,a),set:(r,s,a,o)=>{switch(s){case"x":case"y":case"width":case"height":this.rect[s]=a;break}return Reflect.set(r,s,a,o)}})}getBoundRect(){return this.rect}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.fillStyle="#ff0000",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.borderRadius<=0?this.app.ctx.rect(0,0,this.width,this.height):(this.app.ctx.moveTo(0,0+this.borderRadius),this.app.ctx.lineTo(0,0+this.height-this.borderRadius),this.app.ctx.quadraticCurveTo(0,0+this.height,0+this.borderRadius,0+this.height),this.app.ctx.lineTo(0+this.width-this.borderRadius,0+this.height),this.app.ctx.quadraticCurveTo(0+this.width,0+this.height,0+this.width,0+this.height-this.borderRadius),this.app.ctx.lineTo(0+this.width,0+this.borderRadius),this.app.ctx.quadraticCurveTo(0+this.width,0,0+this.width-this.borderRadius,0),this.app.ctx.lineTo(0+this.borderRadius,0),this.app.ctx.quadraticCurveTo(0,0,0,0+this.borderRadius)),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class dp extends Jn{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=0,this.app.ctx.fillStyle="rgb(200,80,80)",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(4,24),this.app.ctx.lineTo(8,16),this.app.ctx.lineTo(14,10),this.app.ctx.lineTo(15,0),this.app.ctx.lineTo(9,-10),this.app.ctx.lineTo(2,0),this.app.ctx.lineTo(-2,0),this.app.ctx.lineTo(-9,-10),this.app.ctx.lineTo(-15,0),this.app.ctx.lineTo(-14,10),this.app.ctx.lineTo(-8,16),this.app.ctx.lineTo(-4,24),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class pp extends Jn{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=0,this.app.ctx.fillStyle="rgb(150,150,150)",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.bezierCurveTo(15,0,15,-40,5,-30),this.app.ctx.lineTo(0,0),this.app.ctx.bezierCurveTo(-15,0,-15,-40,-5,-30),this.app.ctx.lineTo(0,0),this.app.ctx.fill(),this.app.ctx.beginPath(),this.app.ctx.arc(0,0,15,0,Math.PI*2,!0),this.app.ctx.fill())}})}}class rc{x;y;z;brightness;constructor(t,e,i,r){this.x=t,this.y=e,this.z=i,this.brightness=r}setBrightness(t){this.brightness=Math.min(Math.max(t,0),1)}}class gp{x;y;width;height;rotation;showFlame;constructor(){this.x=0,this.y=0,this.width=25,this.height=20,this.rotation=0,this.showFlame=!1}draw(t,e){t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.lineWidth=1,t.strokeStyle="#ffffff",e?.(t),t.beginPath(),t.moveTo(10,0),t.lineTo(-10,10),t.lineTo(-5,0),t.lineTo(-10,-10),t.lineTo(10,0),t.closePath(),t.stroke(),this.showFlame&&(t.beginPath(),t.moveTo(-7.5,-5),t.lineTo(-15,0),t.lineTo(-7.5,5),t.closePath(),t.stroke()),t.restore()}}class mp{x;y;scaleX;scaleY;color;alpha;lineWidth;branch;constructor(){this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.color="#ffffff",this.alpha=1,this.lineWidth=1,this.branch=[],this.branch[0]=-140-Math.random()*20,this.branch[1]=-30-Math.random()*30,this.branch[2]=Math.random()*80-40,this.branch[3]=-100-Math.random()*40,this.branch[4]=-60-Math.random()*40,this.branch[5]=Math.random()*60-30,this.branch[6]=-110-Math.random()*20}draw(t,e){t.save(),t.translate(this.x,this.y),t.scale(this.scaleX,this.scaleY),t.lineWidth=this.lineWidth,t.strokeStyle=gs(this.color,this.alpha),e?.(t),t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.branch[0]),t.moveTo(0,this.branch[1]),t.lineTo(this.branch[2],this.branch[3]),t.moveTo(0,this.branch[4]),t.lineTo(this.branch[5],this.branch[6]),t.stroke(),t.restore()}}class vp{x;y;z;fl;vpX;vpY;cX;cY;cZ;constructor(t,e,i){this.x=t,this.y=e,this.z=i,this.fl=250,this.vpX=0,this.vpY=0,this.cX=0,this.cY=0,this.cZ=0}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,i){this.cX=t,this.cY=e,this.cZ=i}rotateX(t){const e=Math.cos(t),i=Math.sin(t),r=this.y*e-this.z*i,s=this.z*e+this.y*i;this.y=r,this.z=s}rotateY(t){const e=Math.cos(t),i=Math.sin(t),r=this.x*e-this.z*i,s=this.z*e+this.x*i;this.x=r,this.z=s}rotateZ(t){const e=Math.cos(t),i=Math.sin(t),r=this.x*e-this.y*i,s=this.y*e+this.x*i;this.x=r,this.y=s}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}}class _p{pointA;pointB;pointC;color;lineWidth;alpha;constructor(t,e,i,r="#ff0000"){this.pointA=t,this.pointB=e,this.pointC=i,this.color=r,this.lineWidth=1,this.alpha=1}draw(t,e){this.isBackface()||(t.save(),t.lineWidth=this.lineWidth,t.fillStyle=t.strokeStyle=gs(this.color,this.alpha),e?.(t),t.beginPath(),t.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),t.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),t.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){const t=this.pointC.getScreenX()-this.pointA.getScreenX(),e=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return t*r>e*i}}class wp{pointA;pointB;pointC;color;lineWidth;alpha;light;constructor(t,e,i,r="#ff0000"){this.pointA=t,this.pointB=e,this.pointC=i,this.color=r,this.lineWidth=1,this.alpha=1,this.light=new rc(0,0,0,1)}draw(t,e){this.isBackface()||(t.save(),t.lineWidth=this.lineWidth,t.fillStyle=t.strokeStyle=this.getAdjustedColor(),e?.(t),t.beginPath(),t.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),t.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),t.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){const t=this.pointC.getScreenX()-this.pointA.getScreenX(),e=this.pointC.getScreenY()-this.pointA.getScreenY(),i=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return t*r>e*i}getAdjustedColor(){const t=hr(this.color);let e=t>>16,i=t>>8&255,r=t&255;const s=this.getLightFactor();return e*=s,i*=s,r*=s,vo(e<<16|i<<8|r)}getLightFactor(){const t={x:this.pointA.x-this.pointB.x,y:this.pointA.y-this.pointB.y,z:this.pointA.z-this.pointB.z},e={x:this.pointB.x-this.pointC.x,y:this.pointB.y-this.pointC.y,z:this.pointB.z-this.pointC.z},i={x:t.y*e.z-t.z*e.y,y:-(t.x*e.z-t.z*e.x),z:t.x*e.y-t.y*e.x},r=i.x*this.light.x+i.y*this.light.y+i.z*this.light.z,s=Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z),a=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(r/(s*a))/Math.PI*this.light.brightness}}class yp{min;max;value;x;y;width;height;backColor;backBorderColor;backWidth;handleColor;handleBorderColor;handleHeight;handleY;onchange;prevCanvas;currentContext;animatedID=0;constructor(t=0,e=100,i=0,r){this.min=t,this.max=e,this.value=i,this.onchange=r,this.x=0,this.y=0,this.width=16,this.height=100,this.backColor="#cccccc",this.backBorderColor="#999999",this.backWidth=4,this.handleColor="#eeeeee",this.handleBorderColor="#cccccc",this.handleHeight=6,this.handleY=0,this.updatePosition()}draw(t,e){this.currentContext=t,t.save(),t.translate(this.x,this.y),e?.(t),t.clearRect(this.x,this.y,this.width,this.height),t.fillStyle=this.backColor,t.beginPath(),t.fillRect(this.width/2-this.backWidth/2,0,this.backWidth,this.height),t.closePath(),t.strokeStyle=this.handleBorderColor,t.fillStyle=this.handleColor,t.beginPath(),t.rect(0,this.handleY,this.width,this.handleHeight),t.closePath(),t.fill(),t.stroke(),t.restore(),(!this.prevCanvas||this.prevCanvas!=t.canvas)&&(this.captureMouse(t.canvas),this.prevCanvas=t.canvas)}updateValue(){const t=this.value,e=this.height-this.handleHeight,i=this.max-this.min;this.value=(e-this.handleY)/e*i+this.min,this.value!==t&&(this.onchange?.(this.value),Qs.register(()=>this.currentContext?(this.draw(this.currentContext),!0):!1))}updatePosition(){const t=this.height-this.handleHeight,e=this.max-this.min;this.handleY=t-(this.value-this.min)/e*t}captureMouse(t){const e=new Un({x:0,y:0,width:0,height:0}),i=()=>{e.x=this.x,e.y=this.y+this.handleY,e.width=this.width,e.height=this.handleHeight};i();let r=!1;const s=new mo(t);s.captureMove({move:()=>{if(r){const a=s.mousePoint.y-this.y;this.handleY=Math.min(this.height-this.handleHeight,Math.max(a,0)),this.updateValue()}},start:()=>{r=e.isContainPoint(s.mousePoint)},end:()=>{i()}})}}class xp{x;y;width;height;rotation;scaleX;scaleY;color;lineWidth;constructor(t,e,i="#ffffff"){this.x=0,this.y=0,this.width=t,this.height=e,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=i,this.lineWidth=1}draw(t,e){const i=this.height,r=this.width+i,s=i/2;t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.scale(this.scaleX,this.scaleY),t.lineWidth=this.lineWidth,t.fillStyle=this.color,e?.(t),t.beginPath(),t.moveTo(0,-s),t.lineTo(r-2*s,-s),t.quadraticCurveTo(-s+r,-s,-s+r,0),t.lineTo(-s+r,i-2*s),t.quadraticCurveTo(-s+r,-s+i,r-2*s,-s+i),t.lineTo(0,-s+i),t.quadraticCurveTo(-s,-s+i,-s,i-2*s),t.lineTo(-s,0),t.quadraticCurveTo(-s,-s,0,-s),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.beginPath(),t.arc(0,0,2,0,Math.PI*2,!0),t.closePath(),t.stroke(),t.beginPath(),t.arc(this.width,0,2,0,Math.PI*2,!0),t.closePath(),t.stroke(),t.restore()}getPin(){return{x:this.x+Math.cos(this.rotation)*this.width,y:this.y+Math.sin(this.rotation)*this.width}}}class bp{R;r;O;constructor(t,e,i){this.R=t,this.r=e,this.O=i}draw(t,e){t.save(),e?.(t);let i=this.R-this.O,r=0,s=1;t.beginPath(),t.moveTo(i,r);let a,o;do{if(s>2e4)break;a=(this.R+this.r)*Math.cos(s*Math.PI/72)-(this.r+this.O)*Math.cos((this.R+this.r)/this.r*(s*Math.PI/72)),o=(this.R+this.r)*Math.sin(s*Math.PI/72)-(this.r+this.O)*Math.sin((this.R+this.r)/this.r*(s*Math.PI/72)),t.lineTo(a,o),i=a,r=o,s++}while(a!=this.R-this.O&&o!=0);t.stroke(),t.restore()}}class Tp{r;constructor(t){this.r=t}draw(t,e){t.save(),e?.(t),t.beginPath(),t.moveTo(this.r,0);for(let i=0;i<9;i++)t.rotate(Math.PI/5),i%2==0?t.lineTo(this.r/.525731*.200811,0):t.lineTo(this.r,0);t.closePath(),t.fill(),t.restore()}}class Cp{startX;startY;width;height;constructor(t,e,i,r){this.startX=t,this.startY=e,this.width=i,this.height=r}draw(t,e){t.save(),e?.(t);let i=0;const r=()=>{t.clearRect(this.startX,this.startY,this.width,this.height),t.setLineDash([4,2]),t.lineDashOffset=-i,t.strokeRect(this.startX,this.startY,this.width,this.height)};function s(){i++,i>16&&(i=0),r(),setTimeout(s,40)}s(),t.restore()}}class Ep{constructor(){}draw(t,e){t.save(),e?.(t),t.beginPath(),t.arc(75,75,50,0,Math.PI*2,!0),t.moveTo(110,75),t.arc(75,75,35,0,Math.PI,!1),t.moveTo(65,65),t.arc(60,65,5,0,Math.PI*2,!0),t.moveTo(95,65),t.arc(90,65,5,0,Math.PI*2,!0),t.stroke(),t.restore()}}class Gi{video;constructor(t){this.video=t}setSrcObject(t){this.video.addEventListener("loadedmetadata",e=>{const i=e.target;i instanceof HTMLVideoElement&&console.log(`${i.id} videoWidth: ${i.videoWidth}px, videoHeight: ${i.videoHeight}px.`)}),this.video.srcObject=t}static videoMediaChangeSupport=async()=>new Promise(t=>{const e=document.createElement("iframe"),i=document.createElement("video"),r=document.createElement("source"),s=new MediaSource;s.addEventListener("sourceopen",()=>t(!0)),r.src=URL.createObjectURL(s),r.media="(min-width:10px)",i.append(r),e.width="5",e.style.cssText="position: absolute; visibility: hidden;",document.documentElement.append(e),e.contentDocument?.body.append(i),setTimeout(()=>{e.width="15"}),setTimeout(()=>{e.remove(),t(!1)},1e3)});static captureWebCamera(t){navigator.mediaDevices.getUserMedia({video:!0}).then(e=>{t.srcObject=e})}static tryAutoPlayOrAutoPlayAfterClick(t){return new Promise(e=>{t.play().then(()=>{t.autoplay=!0,e(!0)}).catch(()=>{Gi.setAutoPlayWhenClick(t),e(!1)})})}static setAutoPlayWhenClick(t){function e(){t.autoplay=!0,t.play(),document.removeEventListener("click",e),document.removeEventListener("touchend",e)}document.addEventListener("click",e),document.addEventListener("touchend",e)}}class kp{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Gi(t),this.remoteVideoUtil=new Gi(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(i=>{this.localVideoUtil.setSrcObject(i),t(i)}).catch(i=>{this.trace(`navigator.getUserMedia error: ${i}.`),e(i)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),i=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),i.length>0&&this.trace(`Using audio device: ${i[0].label}.`);const r=void 0,s=new RTCPeerConnection(r);this.localPeerConnection=s,this.trace("Created local peer connection object localPeerConnection."),s.addEventListener("icecandidate",this.handleConnection),s.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const a=new RTCPeerConnection(r);this.remotePeerConnection=a,this.trace("Created remote peer connection object remotePeerConnection."),a.addEventListener("icecandidate",this.handleConnection),a.addEventListener("iceconnectionstatechange",this.handleConnectionChange),a.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),s.addTrack(e[0],t),s.addTrack(i[0],t),this.trace("localPeerConnection createOffer start."),s.createOffer({offerToReceiveVideo:!0}).then(o=>this.createdOffer(o)).catch(o=>this.setSessionDescriptionError(o))}handleConnection(t){const e=t.target,i=t.candidate;if(e&&i){const r=new RTCIceCandidate(i),s=this.getOtherPeer(e);s&&(s.addIceCandidate(r).then(()=>{this.handleConnectionSuccess(e)}).catch(a=>{this.handleConnectionFailure(e,a)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
35
|
+
`+h.value+`\r
|
|
36
|
+
`)}r=o.join(s+`\r
|
|
37
|
+
`)}}return{url:n,data:r,boundary:s}}function Oh(i){return new Promise((t,e)=>{const{method:n="GET",url:r="",data:s="",headers:o={},responseType:a="json",timeout:h=3e4,boundary:m=""}=i;Object.assign(o,{Accept:"*/*"});const g=or();g.onreadystatechange=function(w){g.readyState===4&&(g.status===200?t(g.response):e(g.statusText))},g.ontimeout=function(){e(`${r} is timed out for ${h}ms.`)},g.addEventListener("error",function(w){e(w)},!1),g.addEventListener("progress",function(w){if(w.lengthComputable){const k=Math.round(w.loaded*100/w.total);i.progress?.(k)}},!1),g.addEventListener("load",function(w){i.load?.(w)},!1),g.addEventListener("loadstart",function(w){i.loadstart?.(w)},!1),g.addEventListener("loadend",function(w){i.loadend?.(w)},!1),g.addEventListener("abort",function(w){i.abort?.(w)},!1),g.timeout=h,g.responseType=a;const x=n.toUpperCase();function y(){for(const w in o)g.setRequestHeader(w,o[w]);m&&g.setRequestHeader("Content-Type","multipart/form-data; boundary="+m)}if(x==="GET"){let w="";typeof s=="string"?w=s:s instanceof FormData?w=rr(s):Ti(s)&&(w=ks(s)),g.open("GET",ri(r,w),!0),y(),g.send(null)}else x==="POST"?(g.open("POST",r,!0),y(),m?g.sendAsBinary(m+`\r
|
|
38
|
+
`+s+m+`--\r
|
|
39
|
+
`):g.send(JSON.stringify(s))):(g.open(x,r,!0),y(),g.send(JSON.stringify(s)))})}function Nh(i,t){const e=or();e.open("HEAD",i),e.filepath=i,e.callback=t,e.onload=function(){const n=parseFloat(window.localStorage.getItem("lm_"+this.filepath)??""),r=Date.parse(this.getResponseHeader("Last-Modified"));(isNaN(n)||r>n)&&(window.localStorage.setItem("lm_"+this.filepath,String(Date.now())),isFinite(n)&&this.callback(r,n))},e.send()}let oi;const Bs=new WeakMap;function hr(i,t){let e=Bs.get(i);e||(e=new Map,Bs.set(i,e));let n=e.get(t);return n||(n=new Fs,e.set(t,n)),n}class Fs{subscribers;constructor(){this.subscribers=new Set}depend(){oi&&this.subscribers.add(oi)}notify(){this.subscribers.forEach(t=>t())}}function Bh(i){oi=i,i(),oi=null}function Fh(i){return Object.keys(i).forEach(t=>{let e=i[t];const n=hr(i,t);Object.defineProperty(i,t,{get(){return n.depend(),e},set(r){r!=e&&(e=r,n.notify())}})}),i}function zh(i){return new Proxy(i,{get(t,e,n){return hr(i,e).depend(),Reflect.get(t,e,n)},set(t,e,n,r){const s=hr(i,e);return i[e]!=n&&(i[e]=n,s.notify()),Reflect.set(t,e,n,r)}})}class hi{x;y;z;constructor(t=[0,0,0],e=[0,0,0]){const[n,r,s]=t,[o,a,h]=e;this.x=n-o,this.y=r-a,this.z=s-h}get length(){const{x:t,y:e,z:n}=this;return Math.sqrt(t*t+e*e+n*n)}unit(){const t=this.length;return new hi([this.x/t,this.y/t,this.z/t])}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}cross(t){const e=this.x,n=this.y,r=this.z,s=t.x,o=t.y,a=t.z;return new hi([n*a-r*o,r*s-e*a,e*o-s*n])}}(function(){let i=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(t){const e=new Date().getTime(),n=Math.max(0,16-(e-i)),r=window.setTimeout(function(){t(e+n)},n);return i=e+n,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})})();const zs=i=>{let t=window.requestAnimationFrame(function e(n){t=window.requestAnimationFrame(e),i(n,t)});return()=>window.cancelAnimationFrame(t)};class Uh{id=0;renders={};cancelFn;constructor(){}get length(){let t=0;for(let e in this.renders)t++;return t}register(t){const e=this.id++;this.renders[e]=t,this.run()}run(){this.cancelFn||(this.cancelFn=zs((t,e)=>{const n=[];for(let r in this.renders)this.renders[r](t)===!1&&n.push(parseInt(r));for(let r of n)delete this.renders[r];!this.length&&this.cancelFn&&(this.cancelFn(),this.cancelFn=void 0)}))}}const ci=new Uh;let Nn;typeof self>"u"&&typeof process<"u"&&process.hrtime?Nn=function(){const i=process.hrtime();return i[0]*1e3+i[1]/1e6}:typeof self<"u"&&self.performance!==void 0&&self.performance.now!==void 0?Nn=self.performance.now.bind(self.performance):Date.now!==void 0?Nn=Date.now:Nn=function(){return new Date().getTime()};const dn=Nn;class Bn{static _nextId=0;static nextId(){return Bn._nextId++}}const li={Linear:{None:function(i){return i}},Ease:{In:function(i){return Math.pow(i,1.7)}},Quadratic:{In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}},Cubic:{In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}},Quartic:{In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}},Quintic:{In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}},Sinusoidal:{In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}},Exponential:{In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}},Circular:{In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}},Elastic:{In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}},Back:{In:function(i){return i===1?1:i*i*((1.70158+1)*i-1.70158)},Out:function(i){return i===0?0:--i*i*((1.70158+1)*i+1.70158)+1},InOut:function(i){const t=2.5949095;return(i*=2)<1?.5*(i*i*((t+1)*i-t)):.5*((i-=2)*i*((t+1)*i+t)+2)}},Bounce:{In:function(i){return 1-li.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?li.Bounce.In(i*2)*.5:li.Bounce.Out(i*2-1)*.5+.5}},generatePow:function(i=4){return i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(t){return t**i},Out:function(t){return 1-(1-t)**i},InOut:function(t){return t<.5?(t*2)**i/2:(1-(2-t*2)**i)/2+.5}}},random:function(i){return Math.random()},createStep:function(i){return function(t){return Math.floor(t*i)/i}},createNoisyEasing:function(i,t=.1){const e=1-t;return function(n){return t*Math.random()+e*i(n)}}},cr=li,Fn={Utils:{Linear:function(i,t,e){return(t-i)*e+i},Factorial:function(){const i=[1];return function(t){let e=1;if(i[t])return i[t];for(let n=t;n>1;n--)e*=n;return i[t]=e,e}}(),Bernstein:function(i,t){const e=Fn.Utils.Factorial;return e(i)/e(t)/e(i-t)},CatmullRom:function(i,t,e,n,r){const s=(e-i)*.5,o=(n-t)*.5,a=r*r,h=r*a;return(2*t-2*e+s+o)*h+(-3*t+3*e-2*s-o)*a+s*r+t}},Linear:function(i,t){const e=i.length-1,n=e*t,r=Math.floor(n),s=Fn.Utils.Linear;return t<0?s(i[0],i[1],n):t>1?s(i[e],i[e-1],e-n):s(i[r],i[r+1>e?e:r+1],n-r)},Bezier:function(i,t){let e=0;const n=i.length-1,r=Math.pow,s=Fn.Utils.Bernstein;for(let o=0;o<=n;o++)e+=r(1-t,n-o)*r(t,o)*i[o]*s(n,o);return e},CatmullRom:function(i,t){const e=i.length-1;let n=e*t,r=Math.floor(n);const s=Fn.Utils.CatmullRom;return i[0]===i[e]?(t<0&&(r=Math.floor(n=e*(1+t))),s(i[(r-1+e)%e],i[r],i[(r+1)%e],i[(r+2)%e],n-r)):t<0?i[0]-(s(i[0],i[0],i[1],i[1],-n)-i[0]):t>1?i[e]-(s(i[e],i[e],i[e-1],i[e-1],n-e)-i[e]):s(i[r?r-1:0],i[r],i[e<r+1?e:r+1],i[e<r+2?e:r+2],n-r)}},lr=Fn;class Us{_tweens={};_tweensAddedDuringUpdate={};getAll(){return Object.keys(this._tweens).map(t=>this._tweens[t])}removeAll(){this._tweens={}}add(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t}remove(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]}update(t=dn(),e=!1){let n=Object.keys(this._tweens);if(n.length===0)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(let r=0;r<n.length;r++){const s=this._tweens[n[r]],o=!e;s&&s.update(t,o)===!1&&!e&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}}const oe=new Us;class Gs{constructor(t,e=oe){this._object=t,this._group=e}_id=Bn.nextId();_isPlaying=!1;_startTime=0;_delayTime=0;_durationTime=1e3;_isPaused=!1;_pauseStartTime=0;_initialRepeat=0;_repeat=0;_repeatDelayTime;_yoyo=!1;_reversed=!1;_valuesStart={};_valuesEnd={};_valuesStartRepeat={};_easingFunction=cr.Linear.None;_interpolationFunction=lr.Linear;_chainedTweens=[];_isChainStopped=!1;_onStartCallback;_onStartCallbackFired=!1;_onEveryStartCallback;_onEveryStartCallbackFired=!1;_onUpdateCallback;_onRepeatCallback;_onCompleteCallback;_onStopCallback;_goToEnd=!1;getId(){return this._id}isPlaying(){return this._isPlaying}isPaused(){return this._isPaused}to(t,e){return this._valuesEnd=Object.create(t),e!==void 0&&(this._durationTime=e),this}duration(t=1e3){return this._durationTime=t,this}start(t=dn()){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(const e in this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e]}return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this}_setupProperties(t,e,n,r){for(const s in n){const o=t[s],a=Array.isArray(o),h=a?"array":typeof o,m=!a&&Array.isArray(n[s]);if(!(h==="undefined"||h==="function")){if(m){let g=n[s];if(g.length===0)continue;g=g.map(this._handleRelativeValue.bind(this,o)),n[s]=[o].concat(g)}if((h==="object"||a)&&o&&!m){e[s]=a?[]:{};for(const g in o)e[s][g]=o[g];r[s]=a?[]:{},this._setupProperties(o,e[s],n[s],r[s])}else typeof e[s]>"u"&&(e[s]=o),a||(e[s]*=1),m?r[s]=n[s].slice().reverse():r[s]=e[s]||0}}}stop(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this}end(){return this._goToEnd=!0,this.update(1/0),this}pause(t=dn()){return this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStartTime=t,this._group&&this._group.remove(this),this)}resume(t=dn()){return!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStartTime,this._pauseStartTime=0,this._group&&this._group.add(this),this)}stopChainedTweens(){for(let t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this}group(t=oe){return this._group=t,this}delay(t=0){return this._delayTime=t,this}repeat(t=0){return this._initialRepeat=t,this._repeat=t,this}repeatDelay(t){return this._repeatDelayTime=t,this}yoyo(t=!1){return this._yoyo=t,this}easing(t=cr.Linear.None){return this._easingFunction=t,this}interpolation(t=lr.Linear){return this._interpolationFunction=t,this}chain(...t){return this._chainedTweens=t,this}onStart(t){return this._onStartCallback=t,this}onEveryStart(t){return this._onEveryStartCallback=t,this}onUpdate(t){return this._onUpdateCallback=t,this}onRepeat(t){return this._onRepeatCallback=t,this}onComplete(t){return this._onCompleteCallback=t,this}onStop(t){return this._onStopCallback=t,this}update(t=dn(),e=!0){if(this._isPaused)return!0;let n,r;const s=this._startTime+this._durationTime;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),r=(t-this._startTime)/this._durationTime,r=this._durationTime===0||r>1?1:r;const o=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,o),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),r===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(let a=0,h=this._chainedTweens.length;a<h;a++)this._chainedTweens[a].start(this._startTime+this._durationTime);return this._isPlaying=!1,!1}return!0}_updateProperties(t,e,n,r){for(const s in n){if(e[s]===void 0)continue;const o=e[s]||0;let a=n[s];const h=Array.isArray(t[s]),m=Array.isArray(a);!h&&m?t[s]=this._interpolationFunction(a,r):typeof a=="object"&&a?this._updateProperties(t[s],o,a,r):(a=this._handleRelativeValue(o,a),typeof a=="number"&&(t[s]=o+(a-o)*r))}}_handleRelativeValue(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)}_swapEndStartRepeatValues(t){const e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=n,this._valuesEnd[t]=e}}const Gh=Bn.nextId,Vh=oe.getAll.bind(oe),jh=oe.removeAll.bind(oe),Xh=oe.add.bind(oe),Hh=oe.remove.bind(oe),Wh=oe.update.bind(oe),ui={now:dn,Sequence:Bn,Easing:cr,Interpolation:lr,Group:Us,Tween:Gs,nextId:Gh,getAll:Vh,removeAll:jh,add:Xh,remove:Hh,update:Wh};function Vs(i){switch(i){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-in-out":return[.42,0,.58,1];case"ease-out":return[0,0,.58,1]}}const Yh={attributeName:["display"],values:[["block","block"]]},Kt={easeName:"linear",begin:0,dur:300,repeatCount:1,direction:"normal",fill:"freeze",keyTimes:[0,1]};class Ge{currentAnimateName;objects=[];actions=[];constructor(){}hasObjects(){return this.objects.length>0}fromDOM(t){return Array.isArray(t)||(t=[t]),this.objects=[],t.forEach(e=>{const n=tr(e);this.objects.push({width:parseFloat(n.css("width")),height:parseFloat(n.css("height")),dom:n,el:e,originCSSObject:n.css()})}),this}toCSS(t,...e){if(!this.hasObjects())return;switch(this.currentAnimateName=t,this[t](...e),this.objects[0].dom?.parent().css({position:"relative",perspective:"1000px",overflow:"hidden"}),t){default:this.objects.forEach((s,o)=>{s.dom?.css({position:"absolute","z-index":String(1e3+o),"transform-style":"preserve-3d","backface-visibility":"hidden"})});break}let n=0;const r=()=>{this.actions.forEach((s,o)=>{const a=this.objects[s.objectIndex];let h=[],m=[];Array.isArray(s.attributeName)?(h=s.attributeName,m=s.values):s.attributeName&&(h=[s.attributeName],m=[s.values]);const g=s.keyTimes.length,x=ln(a.dom?.css("transform")??"");let y=s.begin;s.keyTimes.forEach((w,k)=>{const P={_matrix:x};h.forEach((D,N)=>{const R=m[N][s.direction=="reverse"?g-k-1:k];Ge.setCSSObjectTransformUseMatrix(D,R,P)}),k==0?a.dom?.css(Object.assign(P,{transition:""})):(setTimeout(()=>{a.dom?.css(Object.assign(P,{transition:`all ${s.realKeyTimes[k]}ms cubic-bezier(${s.keySplines[k-1].join(",")})`}))},y),y+=s.realKeyTimes[k])}),setTimeout(()=>{s.fill==="remove"&&a.dom?.css(a.originCSSObject??{}),o==this.actions.length-1&&(typeof s.repeatCount=="number"&&++n<s.repeatCount||s.repeatCount=="infinite")&&requestAnimationFrame(()=>{this.currentAnimateName===t&&r()})},s.begin+s.dur)})};r()}static isRunningGlobalTween=!1;static runGlobalTween(t){Ge.isRunningGlobalTween||ci.register(()=>(Ge.isRunningGlobalTween=ui.update(t?.()),Ge.isRunningGlobalTween))}static toTween(t,e,n){const r=n?.onUpdate??(()=>{}),s=n?.onStart??(()=>{}),o=n?.onComplete??(()=>{}),a=n?.duration??1e3,h=n?.delay??0,m=n?.easeFunction??ui.Easing.Linear.None,g=n?.repeat??0,x=n?.yoyo??!1,y=new ui.Tween(t).to(e,a).delay(h).easing(m).repeat(g).yoyo(x).onStart(s).onUpdate(function(w,k){r(w,k)}).onComplete(o);return n?.interpolationFunction&&y.interpolation(n.interpolationFunction),{tween:y,startAuto:w=>{y.start(w?.()),ci.register(()=>{const k=y.update(w?.());if(n?.precision){let P=!0;for(let D in t)Si(t[D],e[D],n.precision)||(P=!1);return P?!1:k}return k})}}}static toTweenCSS(t,e,n,r){const s=tr(t);s?.parent().css({overflow:"hidden","transform-style":"preserve-3d",perspective:"1000px","backface-visibility":"hidden"});const o={_matrix:ln(s?.css("transform")??"")},a=r?.onUpdate??(()=>{});return Ge.toTween(e,n,Object.assign(r??{},{onUpdate:(h,m)=>{for(let g in h)Ge.setCSSObjectTransformUseMatrix(g,h[g],o);t.style.transform=o.transform,a(h,m)}}))}static setCSSObjectTransformUseMatrix(t,e,n={}){switch(t){case"translate":n._matrix.translate(e[0]??0,e[1]??0);break;case"translateTo":n._matrix.translateTo(e[0]??0,e[1]??0);break;case"translateX":n._matrix.translateX(e??0);break;case"translateXTo":n._matrix.translateXTo(e??0);break;case"translateY":n._matrix.translateY(e??0);break;case"translateYTo":n._matrix.translateYTo(e??0);break;case"translateZ":n._matrix.translateZ(e??0);break;case"translateZTo":n._matrix.translateZTo(e??0);break;case"translate3d":n._matrix.translate3d(e[0]??0,e[1]??0,e[2]??0);break;case"translate3dTo":n._matrix.translate3dTo(e[0]??0,e[1]??0,e[2]??0);break;case"rotate":typeof e=="number"?n._matrix.rotate(e??0):n._matrix.rotate(e[0]??0,e[1]??0,e[2]??0);break;case"rotateTo":typeof e=="number"?n._matrix.rotateTo(e??0):n._matrix.rotateTo(e[0]??0,e[1]??0,e[2]??0);break;case"rotateX":n._matrix.rotateX(e??0);break;case"rotateXTo":n._matrix.rotateXTo(e??0);break;case"rotateY":n._matrix.rotateY(e??0);break;case"rotateYTo":n._matrix.rotateYTo(e??0);break;case"rotateZ":n._matrix.rotateZ(e??0);break;case"rotateZTo":n._matrix.rotateZTo(e??0);break;case"rotate3d":n._matrix.rotate3d(e[0]??0,e[1]??0,e[2]??0);break;case"rotate3dTo":n._matrix.rotate3dTo(e[0]??0,e[1]??0,e[2]??0);break;case"scale":typeof e=="number"?n._matrix.scale(e??1):n._matrix.scale(e[0]??1,e[1]??1,e[2]??0,e[3]??0);break;case"scaleTo":typeof e=="number"?n._matrix.scaleTo(e??1):n._matrix.scaleTo(e[0]??1,e[1]??1,e[2]??0,e[3]??0);break;case"scaleX":n._matrix.scaleX(e??1);break;case"scaleXTo":n._matrix.scaleXTo(e??1);break;case"scaleY":n._matrix.scaleY(e??1);break;case"scaleYTo":n._matrix.scaleYTo(e??1);break;case"scaleZ":n._matrix.scaleZ(e??1);break;case"scaleZTo":n._matrix.scaleZTo(e??1);break;case"scale3d":n._matrix.scale3d(e??1);break;case"scale3dTo":n._matrix.scale3dTo(e??1);break;case"skew":typeof e=="number"?n._matrix.skew(e??0):n._matrix.skew(e[0]??0,e[1]??0);break;case"skewTo":typeof e=="number"?n._matrix.skewTo(e??0):n._matrix.skewTo(e[0]??0,e[1]??0);break;case"skewX":n._matrix.skewX(e??0);break;case"skewXTo":n._matrix.skewXTo(e??1);break;case"skewY":n._matrix.skewY(e??0);break;case"skewYTo":n._matrix.skewYTo(e??1);break;case"skewZ":case"skewZTo":case"skew3d":case"skew3dTo":break;default:Object.assign(n,{[t]:`${e??""}`});break}return Object.assign(n,{transform:n._matrix.toString()}),n}_addAction(t,e=!1){return this.actions=e?[]:this.actions,Array.isArray(t)||(t=[t]),t.forEach(n=>{this.actions.push(Object.assign(n,{realKeyTimes:n.keyTimes.map(r=>n.dur*r)}))}),this}_addAnimate(t=Yh,e=Kt,n=0,r=!1){const s=e.keyTimes??[0,1],o=[];return s.forEach((a,h)=>{h>0&&o.push(Vs(e.easeName??"linear"))}),this._addAction({objectIndex:n,attributeName:t.attributeName,values:t.values,begin:e.begin??0,dur:e.dur??300,keyTimes:s,keySplines:o,repeatCount:e.repeatCount??1,direction:e.direction??"normal",fill:e.fill??"freeze"},r),this}_predefinedAnimate(t,e,n,r,s=Kt,o=this.objects.length-1){let a=!0,h=!1,m=!1,g=!1;const x=this.objects.length;o=(o+x)%x;const y=(o-1+x)%x,w=(o+1+x)%x,k=this.objects[o],P=this.objects[y],D=this.objects[w];if(P&&y!==o){const N=t(P);N&&(this._addAnimate(N,s,y,a),a=!1,h=!0)}if(k){const N=e(k);N&&(this._addAnimate(N,s,o,a),a=!1,m=!0)}if(D&&w!==o){const N=n(D);N&&(this._addAnimate(N,s,w,a),a=!1,g=!0)}this.objects.forEach((N,R)=>{if(!(R==y&&h||R==o&&m||R==w&&g)){const O=r(N);O&&(this._addAnimate(O,s,R,a),a=!1)}})}flip(t=Kt,e=this.objects.length-1){const n=e-1,r=this.objects[n],s=this.objects[e],o=ln(s.dom?.css("transform")??""),a=o.clone();r.dom?.show(),r.dom?.css("opacity","1");const h=r.el?.getBoundingClientRect();r.dom?.css("opacity","0"),s.dom?.show(),s.dom?.css("opacity","1");const m=s.el?.getBoundingClientRect(),g=r.dom?.css("background-color"),x=s.dom?.css("background-color");a.translate((h?.left??0)-(m?.left??0),(h?.top??0)-(m?.top??0)),a.scale((h?.width??1)/(m?.width??1),(h?.height??1)/(m?.height??1));const y={transform:a.toString(),transition:""};g&&Object.assign(y,{"background-color":g}),s.dom?.css(y);const w={transform:o.toString(),transition:`all ${t.dur}ms cubic-bezier(${Vs(t.easeName??"linear").join(",")})`};x&&Object.assign(w,{"background-color":x}),setTimeout(()=>{s.dom?.css(w)},t.begin)}slideLeft(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["translateTo"],values:[[[0,0],[-n.width,0]]]}),n=>({attributeName:["opacity","translateTo"],values:[[1,1],[[n.width,0],[0,0]]]}),n=>{},n=>({attributeName:["translateTo"],values:[[[-n.width,0],[-n.width,0]]]}),t,e)}slideRight(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>{},n=>({attributeName:["opacity","translateTo"],values:[[1,1],[[-n.width,0],[0,0]]]}),n=>({attributeName:["translateTo"],values:[[[0,0],[n.width,0]]]}),n=>({attributeName:["translateTo"],values:[[[n.width,0],[n.width,0]]]}),t,e)}slideDown(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["translateTo"],values:[[[0,0],[0,n.height]]]}),n=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,-n.height],[0,0]]]}),n=>{},n=>({attributeName:["translateTo"],values:[[[0,n.height],[0,n.height]]]}),t,e)}slideUp(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["translateTo"],values:[[[0,0],[0,-n.height]]]}),n=>({attributeName:["opacity","translateTo"],values:[[1,1],[[0,n.height],[0,0]]]}),n=>{},n=>({attributeName:["translateTo"],values:[[[0,-n.height],[0,-n.height]]]}),t,e)}flipLeft(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,180]]}),n=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[-180,0]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipRight(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[0,-180]]}),n=>({attributeName:["opacity","rotateYTo"],values:[[1,1],[180,0]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipDown(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,-180]]}),n=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[180,0]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}flipUp(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[0,180]]}),n=>({attributeName:["opacity","rotateXTo"],values:[[1,1],[-180,0]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popIn(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>{},n=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[.8,1],[0,1]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}popOut(t=Kt,e=this.objects.length-1){this._predefinedAnimate(n=>{},n=>({attributeName:["translateTo","scaleTo","opacity"],values:[[[0,0],[0,0]],[1,1.2],[1,0]]}),n=>{},n=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}rotate(t=Kt,e=this.objects.length-1){Object.assign(t,{keyTimes:[0,1]});const n=t.degree??360;this._predefinedAnimate(r=>{},r=>({attributeName:["opacity","rotate"],values:[[1,1],[0,n]]}),r=>{},r=>({attributeName:["opacity"],values:[[0,0]]}),t,e)}}class Ke extends fe{app;rotate;scale;isMouseDownInBounds=!1;removeCaptureMove;constructor(t,e){super({x:0,y:0,...e}),this.rotate=e?.rotate??0,this.scale=e?.scale??1,this.app=t,this.removeCaptureMove=this.app.captureMove({start:n=>{this.isMouseDownInBounds=this.app.ctx?.isPointInPath(this.app.mousePoint.x,this.app.mousePoint.y)||this.getBoundRect().isContainPoint(this.app.mousePoint)},end:n=>{this.isMouseDownInBounds=!1},move:n=>{}})}destroy(){this.removeCaptureMove()}draw(t){if(this.app.ctx){if(this.app.ctx.save(),t?.followMouseMove&&(!Si(this.x,this.app.mousePoint.x,5)||!Si(this.y,this.app.mousePoint.y,5))&&(this.rotate=this.angleTo(this.app.mousePoint),this.followTo(this.app.mousePoint)),t?.dragMouseMove){if(this.app.container.style.cursor="grab",this.isMouseDownInBounds){this.app.container.style.cursor="grabbing",this.x=this.app.mousePoint.x,this.y=this.app.mousePoint.y;const e=this.getBoundRect();e.width&&e.height&&!this.radius&&(this.x-=this.getBoundRect().width/2,this.y-=this.getBoundRect().height/2)}}else this.app.container.style.cursor="default";t?.dragFreeEaseTo&&(this.isMouseDownInBounds||this.nextFrameEaseTo(new fe({x:t.dragFreeEaseTo.targetX,y:t.dragFreeEaseTo.targetY}),{easing:t.dragFreeEaseTo?.easing??.05})),t?.extra?.(),this.app.ctx?.translate(this.x,this.y),this.app.ctx?.rotate(this.rotate),this.app.ctx?.scale(this.scale,this.scale),t?.shape(),this.app.ctx.lineWidth>0&&this.app.ctx.stroke(),this.app.ctx?.restore()}}}class qh extends Ke{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=2,this.app.ctx.fillStyle="#ffff00",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(-50,-25),this.app.ctx.lineTo(0,-25),this.app.ctx.lineTo(0,-50),this.app.ctx.lineTo(50,0),this.app.ctx.lineTo(0,50),this.app.ctx.lineTo(0,25),this.app.ctx.lineTo(-50,25),this.app.ctx.lineTo(-50,-25),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class $h extends Ke{radius;constructor(t,e){super(t,e),this.radius=e?.radius??40}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.fillStyle="#ff0000",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.arc(0,0,this.radius,0,Math.PI*2,!0),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class Jh extends Ke{toX;toY;c1x;c1y;c2x;c2y;constructor(t,e){super(t,e),this.toX=e?.toX??0,this.toY=e?.toY??0,this.c1x=e?.c1x??0,this.c1y=e?.c1y??0,this.c2x=e?.c2x??0,this.c2y=e?.c2y??0}getBoundRect(){if(this.rotate===0){const t=Math.min(this.x,this.toX),e=Math.min(this.y,this.toY),n=Math.max(this.x,this.toX),r=Math.max(this.y,this.toY);return new cn({x:t,y:e,width:n-t,height:r-e})}else{const t=Math.sin(this.rotate),e=Math.cos(this.rotate),n=e*this.x-t*this.y,r=e*this.toX-t*this.toY,s=e*this.y+t*this.x,o=e*this.toY+t*this.toX;return new cn({x:Math.min(n,r),y:Math.min(s,o),width:Math.max(n,r)-Math.min(n,r),height:Math.max(s,o)-Math.min(s,o)})}}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.lineTo(this.toX-this.x,this.toY-this.y))}})}drawQuadratic(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.quadraticCurveTo(this.c1x-this.x,this.c1y-this.y,this.toX-this.x,this.toY-this.y))}})}drawQuadraticThrough(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",t?.extra?.())},shape:()=>{if(!this.app.ctx)return;this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0);const e=this.c1x*2-(this.x+this.toX)/2,n=this.c1y*2-(this.y+this.toY)/2;this.app.ctx.quadraticCurveTo(e-this.x,n-this.y,this.toX-this.x,this.toY-this.y)}})}drawQuadraticThroughCurve(t,e){super.draw({...e,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",e?.extra?.())},shape:()=>{if(!this.app.ctx)return;const n=t.length;if(n<3)return new Error("points length must >= 3");const r=(t[0].x+t[n-1].x)/2,s=(t[0].y+t[n-1].y)/2;this.app.ctx.beginPath(),this.app.ctx.moveTo(r,s);let o=0;for(;o<n-1;o++){const a=(t[o].x+t[o+1].x)/2,h=(t[o].y+t[o+1].y)/2;this.app.ctx.quadraticCurveTo(t[o].x-this.x,t[o].y-this.y,a-this.x,h-this.y)}this.app.ctx.quadraticCurveTo(t[o].x-this.x,t[o].y-this.y,r-this.x,s-this.y)}})}drawQuadraticThroughCurveNotGood(t,e){super.draw({...e,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.strokeStyle="#eeeeee",e?.extra?.())},shape:()=>{if(!this.app.ctx)return;const n=t.length;if(n<3)return new Error("points length must >= 3");this.app.ctx.beginPath(),this.app.ctx.moveTo(t[0].x,t[0].y);let r=1;for(;r<n-2;r++){const s=(t[r].x+t[r+1].x)/2,o=(t[r].y+t[r+1].y)/2;this.app.ctx.quadraticCurveTo(t[r].x-this.x,t[r].y-this.y,s-this.x,o-this.y)}this.app.ctx.quadraticCurveTo(t[r].x-this.x,t[r].y-this.y,t[r+1].x-this.x,t[r+1].y-this.y)}})}}class Zh extends Ke{width;height;borderRadius;rect;constructor(t,e){return super(t,e),this.width=e?.width??50,this.height=e?.height??50,this.borderRadius=e?.borderRadius??0,this.rect=new cn({x:this.x,y:this.y,width:this.width,height:this.height}),new Proxy(this,{get:(r,s,o)=>Reflect.get(r,s,o),set:(r,s,o,a)=>{switch(s){case"x":case"y":case"width":case"height":this.rect[s]=o;break}return Reflect.set(r,s,o,a)}})}getBoundRect(){return this.rect}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=1,this.app.ctx.fillStyle="#ff0000",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.borderRadius<=0?this.app.ctx.rect(0,0,this.width,this.height):(this.app.ctx.moveTo(0,0+this.borderRadius),this.app.ctx.lineTo(0,0+this.height-this.borderRadius),this.app.ctx.quadraticCurveTo(0,0+this.height,0+this.borderRadius,0+this.height),this.app.ctx.lineTo(0+this.width-this.borderRadius,0+this.height),this.app.ctx.quadraticCurveTo(0+this.width,0+this.height,0+this.width,0+this.height-this.borderRadius),this.app.ctx.lineTo(0+this.width,0+this.borderRadius),this.app.ctx.quadraticCurveTo(0+this.width,0,0+this.width-this.borderRadius,0),this.app.ctx.lineTo(0+this.borderRadius,0),this.app.ctx.quadraticCurveTo(0,0,0,0+this.borderRadius)),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class Kh extends Ke{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=0,this.app.ctx.fillStyle="rgb(200,80,80)",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(4,24),this.app.ctx.lineTo(8,16),this.app.ctx.lineTo(14,10),this.app.ctx.lineTo(15,0),this.app.ctx.lineTo(9,-10),this.app.ctx.lineTo(2,0),this.app.ctx.lineTo(-2,0),this.app.ctx.lineTo(-9,-10),this.app.ctx.lineTo(-15,0),this.app.ctx.lineTo(-14,10),this.app.ctx.lineTo(-8,16),this.app.ctx.lineTo(-4,24),this.app.ctx.closePath(),this.app.ctx.fill())}})}}class Qh extends Ke{constructor(t,e){super(t,e)}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=0,this.app.ctx.fillStyle="rgb(150,150,150)",t?.extra?.())},shape:()=>{this.app.ctx&&(this.app.ctx.beginPath(),this.app.ctx.moveTo(0,0),this.app.ctx.bezierCurveTo(15,0,15,-40,5,-30),this.app.ctx.lineTo(0,0),this.app.ctx.bezierCurveTo(-15,0,-15,-40,-5,-30),this.app.ctx.lineTo(0,0),this.app.ctx.fill(),this.app.ctx.beginPath(),this.app.ctx.arc(0,0,15,0,Math.PI*2,!0),this.app.ctx.fill())}})}}class tc extends Ke{width;height;fillColor;constructor(t,e){super(t,e),this.width=e?.width??50,this.height=e?.height??50,this.fillColor=e?.fillColor??"#ff0000"}draw(t){super.draw({...t,extra:()=>{this.app.ctx&&(this.app.ctx.lineWidth=0,this.app.ctx.fillStyle=this.fillColor,t?.extra?.())},shape:()=>{if(!this.app.ctx)return;this.app.ctx.beginPath();let e=this.height*.3;this.app.ctx.moveTo(this.x,this.y+e),this.app.ctx.bezierCurveTo(this.x,this.y,this.x-this.width/2,this.y,this.x-this.width/2,this.y+e),this.app.ctx.bezierCurveTo(this.x-this.width/2,this.y+(this.height+e)/2,this.x,this.y+(this.height+e)/1.4,this.x,this.y+this.height),this.app.ctx.bezierCurveTo(this.x,this.y+(this.height+e)/1.8,this.x+this.width/2,this.y+(this.height+e)/2,this.x+this.width/2,this.y+e),this.app.ctx.bezierCurveTo(this.x+this.width/2,this.y,this.x,this.y,this.x,this.y+e),this.app.ctx.closePath(),this.app.ctx.fill()}})}}class js{x;y;z;brightness;constructor(t,e,n,r){this.x=t,this.y=e,this.z=n,this.brightness=r}setBrightness(t){this.brightness=Math.min(Math.max(t,0),1)}}class ec{x;y;width;height;rotation;showFlame;constructor(){this.x=0,this.y=0,this.width=25,this.height=20,this.rotation=0,this.showFlame=!1}draw(t,e){t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.lineWidth=1,t.strokeStyle="#ffffff",e?.(t),t.beginPath(),t.moveTo(10,0),t.lineTo(-10,10),t.lineTo(-5,0),t.lineTo(-10,-10),t.lineTo(10,0),t.closePath(),t.stroke(),this.showFlame&&(t.beginPath(),t.moveTo(-7.5,-5),t.lineTo(-15,0),t.lineTo(-7.5,5),t.closePath(),t.stroke()),t.restore()}}class nc{x;y;scaleX;scaleY;color;alpha;lineWidth;branch;constructor(){this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.color="#ffffff",this.alpha=1,this.lineWidth=1,this.branch=[],this.branch[0]=-140-Math.random()*20,this.branch[1]=-30-Math.random()*30,this.branch[2]=Math.random()*80-40,this.branch[3]=-100-Math.random()*40,this.branch[4]=-60-Math.random()*40,this.branch[5]=Math.random()*60-30,this.branch[6]=-110-Math.random()*20}draw(t,e){t.save(),t.translate(this.x,this.y),t.scale(this.scaleX,this.scaleY),t.lineWidth=this.lineWidth,t.strokeStyle=nr(this.color,this.alpha),e?.(t),t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.branch[0]),t.moveTo(0,this.branch[1]),t.lineTo(this.branch[2],this.branch[3]),t.moveTo(0,this.branch[4]),t.lineTo(this.branch[5],this.branch[6]),t.stroke(),t.restore()}}class ic{x;y;z;fl;vpX;vpY;cX;cY;cZ;constructor(t,e,n){this.x=t,this.y=e,this.z=n,this.fl=250,this.vpX=0,this.vpY=0,this.cX=0,this.cY=0,this.cZ=0}setVanishingPoint(t,e){this.vpX=t,this.vpY=e}setCenter(t,e,n){this.cX=t,this.cY=e,this.cZ=n}rotateX(t){const e=Math.cos(t),n=Math.sin(t),r=this.y*e-this.z*n,s=this.z*e+this.y*n;this.y=r,this.z=s}rotateY(t){const e=Math.cos(t),n=Math.sin(t),r=this.x*e-this.z*n,s=this.z*e+this.x*n;this.x=r,this.z=s}rotateZ(t){const e=Math.cos(t),n=Math.sin(t),r=this.x*e-this.y*n,s=this.y*e+this.x*n;this.x=r,this.y=s}getScreenX(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpX+(this.cX+this.x)*t}getScreenY(){const t=this.fl/(this.fl+this.z+this.cZ);return this.vpY+(this.cY+this.y)*t}}class rc{pointA;pointB;pointC;color;lineWidth;alpha;constructor(t,e,n,r="#ff0000"){this.pointA=t,this.pointB=e,this.pointC=n,this.color=r,this.lineWidth=1,this.alpha=1}draw(t,e){this.isBackface()||(t.save(),t.lineWidth=this.lineWidth,t.fillStyle=t.strokeStyle=nr(this.color,this.alpha),e?.(t),t.beginPath(),t.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),t.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),t.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){const t=this.pointC.getScreenX()-this.pointA.getScreenX(),e=this.pointC.getScreenY()-this.pointA.getScreenY(),n=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return t*r>e*n}}class sc{pointA;pointB;pointC;color;lineWidth;alpha;light;constructor(t,e,n,r="#ff0000"){this.pointA=t,this.pointB=e,this.pointC=n,this.color=r,this.lineWidth=1,this.alpha=1,this.light=new js(0,0,0,1)}draw(t,e){this.isBackface()||(t.save(),t.lineWidth=this.lineWidth,t.fillStyle=t.strokeStyle=this.getAdjustedColor(),e?.(t),t.beginPath(),t.moveTo(this.pointA.getScreenX(),this.pointA.getScreenY()),t.lineTo(this.pointB.getScreenX(),this.pointB.getScreenY()),t.lineTo(this.pointC.getScreenX(),this.pointC.getScreenY()),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.restore())}getDepth(){return Math.min(this.pointA.z,this.pointB.z,this.pointC.z)}isBackface(){const t=this.pointC.getScreenX()-this.pointA.getScreenX(),e=this.pointC.getScreenY()-this.pointA.getScreenY(),n=this.pointB.getScreenX()-this.pointC.getScreenX(),r=this.pointB.getScreenY()-this.pointC.getScreenY();return t*r>e*n}getAdjustedColor(){const t=ii(this.color);let e=t>>16,n=t>>8&255,r=t&255;const s=this.getLightFactor();return e*=s,n*=s,r*=s,Ts(e<<16|n<<8|r)}getLightFactor(){const t={x:this.pointA.x-this.pointB.x,y:this.pointA.y-this.pointB.y,z:this.pointA.z-this.pointB.z},e={x:this.pointB.x-this.pointC.x,y:this.pointB.y-this.pointC.y,z:this.pointB.z-this.pointC.z},n={x:t.y*e.z-t.z*e.y,y:-(t.x*e.z-t.z*e.x),z:t.x*e.y-t.y*e.x},r=n.x*this.light.x+n.y*this.light.y+n.z*this.light.z,s=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z),o=Math.sqrt(this.light.x*this.light.x+this.light.y*this.light.y+this.light.z*this.light.z);return Math.acos(r/(s*o))/Math.PI*this.light.brightness}}class ac{min;max;value;x;y;width;height;backColor;backBorderColor;backWidth;handleColor;handleBorderColor;handleHeight;handleY;onchange;prevCanvas;currentContext;animatedID=0;constructor(t=0,e=100,n=0,r){this.min=t,this.max=e,this.value=n,this.onchange=r,this.x=0,this.y=0,this.width=16,this.height=100,this.backColor="#cccccc",this.backBorderColor="#999999",this.backWidth=4,this.handleColor="#eeeeee",this.handleBorderColor="#cccccc",this.handleHeight=6,this.handleY=0,this.updatePosition()}draw(t,e){this.currentContext=t,t.save(),t.translate(this.x,this.y),e?.(t),t.clearRect(this.x,this.y,this.width,this.height),t.fillStyle=this.backColor,t.beginPath(),t.fillRect(this.width/2-this.backWidth/2,0,this.backWidth,this.height),t.closePath(),t.strokeStyle=this.handleBorderColor,t.fillStyle=this.handleColor,t.beginPath(),t.rect(0,this.handleY,this.width,this.handleHeight),t.closePath(),t.fill(),t.stroke(),t.restore(),(!this.prevCanvas||this.prevCanvas!=t.canvas)&&(this.captureMouse(t.canvas),this.prevCanvas=t.canvas)}updateValue(){const t=this.value,e=this.height-this.handleHeight,n=this.max-this.min;this.value=(e-this.handleY)/e*n+this.min,this.value!==t&&(this.onchange?.(this.value),ci.register(()=>this.currentContext?(this.draw(this.currentContext),!0):!1))}updatePosition(){const t=this.height-this.handleHeight,e=this.max-this.min;this.handleY=t-(this.value-this.min)/e*t}captureMouse(t){const e=new cn({x:0,y:0,width:0,height:0}),n=()=>{e.x=this.x,e.y=this.y+this.handleY,e.width=this.width,e.height=this.handleHeight};n();let r=!1;const s=new Gt(t);s.captureMove({move:()=>{if(r){const o=s.mousePoint.y-this.y;this.handleY=Math.min(this.height-this.handleHeight,Math.max(o,0)),this.updateValue()}},start:()=>{r=e.isContainPoint(s.mousePoint)},end:()=>{n()}})}}class oc{x;y;width;height;rotation;scaleX;scaleY;color;lineWidth;constructor(t,e,n="#ffffff"){this.x=0,this.y=0,this.width=t,this.height=e,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=n,this.lineWidth=1}draw(t,e){const n=this.height,r=this.width+n,s=n/2;t.save(),t.translate(this.x,this.y),t.rotate(this.rotation),t.scale(this.scaleX,this.scaleY),t.lineWidth=this.lineWidth,t.fillStyle=this.color,e?.(t),t.beginPath(),t.moveTo(0,-s),t.lineTo(r-2*s,-s),t.quadraticCurveTo(-s+r,-s,-s+r,0),t.lineTo(-s+r,n-2*s),t.quadraticCurveTo(-s+r,-s+n,r-2*s,-s+n),t.lineTo(0,-s+n),t.quadraticCurveTo(-s,-s+n,-s,n-2*s),t.lineTo(-s,0),t.quadraticCurveTo(-s,-s,0,-s),t.closePath(),t.fill(),this.lineWidth>0&&t.stroke(),t.beginPath(),t.arc(0,0,2,0,Math.PI*2,!0),t.closePath(),t.stroke(),t.beginPath(),t.arc(this.width,0,2,0,Math.PI*2,!0),t.closePath(),t.stroke(),t.restore()}getPin(){return{x:this.x+Math.cos(this.rotation)*this.width,y:this.y+Math.sin(this.rotation)*this.width}}}class hc{R;r;O;constructor(t,e,n){this.R=t,this.r=e,this.O=n}draw(t,e){t.save(),e?.(t);let n=this.R-this.O,r=0,s=1;t.beginPath(),t.moveTo(n,r);let o,a;do{if(s>2e4)break;o=(this.R+this.r)*Math.cos(s*Math.PI/72)-(this.r+this.O)*Math.cos((this.R+this.r)/this.r*(s*Math.PI/72)),a=(this.R+this.r)*Math.sin(s*Math.PI/72)-(this.r+this.O)*Math.sin((this.R+this.r)/this.r*(s*Math.PI/72)),t.lineTo(o,a),n=o,r=a,s++}while(o!=this.R-this.O&&a!=0);t.stroke(),t.restore()}}class cc{r;constructor(t){this.r=t}draw(t,e){t.save(),e?.(t),t.beginPath(),t.moveTo(this.r,0);for(let n=0;n<9;n++)t.rotate(Math.PI/5),n%2==0?t.lineTo(this.r/.525731*.200811,0):t.lineTo(this.r,0);t.closePath(),t.fill(),t.restore()}}class lc{startX;startY;width;height;constructor(t,e,n,r){this.startX=t,this.startY=e,this.width=n,this.height=r}draw(t,e){t.save(),e?.(t);let n=0;const r=()=>{t.clearRect(this.startX,this.startY,this.width,this.height),t.setLineDash([4,2]),t.lineDashOffset=-n,t.strokeRect(this.startX,this.startY,this.width,this.height)};function s(){n++,n>16&&(n=0),r(),setTimeout(s,40)}s(),t.restore()}}class uc{constructor(){}draw(t,e){t.save(),e?.(t),t.beginPath(),t.arc(75,75,50,0,Math.PI*2,!0),t.moveTo(110,75),t.arc(75,75,35,0,Math.PI,!1),t.moveTo(65,65),t.arc(60,65,5,0,Math.PI*2,!0),t.moveTo(95,65),t.arc(90,65,5,0,Math.PI*2,!0),t.stroke(),t.restore()}}class fc{localVideoUtil;remoteVideoUtil;localPeerConnection=null;remotePeerConnection=null;constructor(t,e){this.localVideoUtil=new Dn(t),this.remoteVideoUtil=new Dn(e)}start(){this.getLocalMediaStream().then(t=>{this.call(t)})}end(){this.localPeerConnection?.close(),this.remotePeerConnection?.close(),this.localPeerConnection=null,this.remotePeerConnection=null,this.trace("Ending call.")}getLocalMediaStream(){return new Promise((t,e)=>{navigator.mediaDevices.getUserMedia({audio:!0,video:!0}).then(n=>{this.localVideoUtil.setSrcObject(n),t(n)}).catch(n=>{this.trace(`navigator.getUserMedia error: ${n}.`),e(n)})})}gotRemoteMediaStream(t){const e=t.streams[0];this.remoteVideoUtil.setSrcObject(e),this.trace("Remote peer connection received remote stream.")}call(t){const e=t.getVideoTracks(),n=t.getAudioTracks();e.length>0&&this.trace(`Using video device: ${e[0].label}.`),n.length>0&&this.trace(`Using audio device: ${n[0].label}.`);const r=void 0,s=new RTCPeerConnection(r);this.localPeerConnection=s,this.trace("Created local peer connection object localPeerConnection."),s.addEventListener("icecandidate",this.handleConnection),s.addEventListener("iceconnectionstatechange",this.handleConnectionChange);const o=new RTCPeerConnection(r);this.remotePeerConnection=o,this.trace("Created remote peer connection object remotePeerConnection."),o.addEventListener("icecandidate",this.handleConnection),o.addEventListener("iceconnectionstatechange",this.handleConnectionChange),o.addEventListener("track",this.gotRemoteMediaStream),this.trace("Add local localStream to localPeerConnection."),s.addTrack(e[0],t),s.addTrack(n[0],t),this.trace("localPeerConnection createOffer start."),s.createOffer({offerToReceiveVideo:!0}).then(a=>this.createdOffer(a)).catch(a=>this.setSessionDescriptionError(a))}handleConnection(t){const e=t.target,n=t.candidate;if(e&&n){const r=new RTCIceCandidate(n),s=this.getOtherPeer(e);s&&(s.addIceCandidate(r).then(()=>{this.handleConnectionSuccess(e)}).catch(o=>{this.handleConnectionFailure(e,o)}),this.trace(`${this.getPeerName(e)} ICE candidate:
|
|
40
40
|
${t.candidate.candidate}.`))}}handleConnectionSuccess(t){this.trace(`${this.getPeerName(t)} addIceCandidate success.`)}handleConnectionFailure(t,e){this.trace(`${this.getPeerName(t)} failed to add ICE Candidate:
|
|
41
41
|
${e.toString()}.`)}handleConnectionChange(t){const e=t.target;console.log("ICE state change event: ",t),e&&this.trace(`${this.getPeerName(e)} ICE state: ${e.iceConnectionState}.`)}createdOffer(t){this.trace(`Offer from localPeerConnection:
|
|
42
42
|
${t.sdp}`),this.localPeerConnection&&(this.trace("localPeerConnection setLocalDescription start."),this.localPeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.remotePeerConnection&&(this.trace("remotePeerConnection setRemoteDescription start."),this.remotePeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e)),this.trace("remotePeerConnection createAnswer start."),this.remotePeerConnection.createAnswer().then(e=>this.createdAnswer(e)).catch(e=>this.setSessionDescriptionError(e)))}createdAnswer(t){this.trace(`Answer from remotePeerConnection:
|
|
43
|
-
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const i=this.getPeerName(t);this.trace(`${i} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const i=document.createElement("div");i.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(i)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class Sp{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}function sc(n,t){return!n||n.parentElement===null?t:sc(n.parentElement,t.concat([n]))}const ia=function(n,t){return getComputedStyle(n,null).getPropertyValue(t)},Ap=function(n){return ia(n,"overflow")+ia(n,"overflow-y")+ia(n,"overflow-x")},Pp=function(n){return/(auto|scroll)/.test(Ap(n))};function Ip(n){if(!(n instanceof HTMLElement||n instanceof SVGElement))return;const t=sc(n.parentElement,[]);for(let e=0;e<t.length;e+=1)if(Pp(t[e]))return t[e];return document.scrollingElement||document.documentElement}const ac=[],oc={};function ra(n){ac.push(n)}function Mp(n,t=!1){const e=yo();if(oc[e])return;wx.error(s=>{console.log(s.errMsg??JSON.stringify(s))}),wx.ready(()=>{ac.forEach(s=>s())});const i=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],r=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(n,{debug:t,jsApiList:i,openTagList:r})),oc[e]=!0}function Lp(n){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[n],success:function(i){i.checkResult[n]?t(!0):e(!1)},fail:function(){e(!1)}})})}function Dp(n){ra(function(){wx.updateAppMessageShareData(n)})}function Rp(n){ra(function(){wx.updateTimelineShareData(n)})}function Op(n){wx.chooseImage(n)}function Fp(n){wx.previewImage(n)}function zp(n){wx.uploadImage(n)}function Up(n){wx.downloadImage(n)}function Np(n){wx.getLocalImgData(n)}function Bp(){wx.startRecord()}function Gp(n){wx.stopRecord(n)}function Hp(n){wx.onVoiceRecordEnd(n)}function jp(n){wx.playVoice(n)}function Vp(n){wx.pauseVoice(n)}function Xp(n){wx.stopVoice(n)}function Yp(n){wx.onVoicePlayEnd(n)}function Zp(n){wx.uploadVoice(n)}function $p(n){wx.downloadVoice(n)}function qp(n){wx.translateVoice(n)}function Wp(n){wx.getNetworkType(n)}function Jp(n){wx.openLocation(n)}function Kp(n){wx.getLocation(n)}function Qp(n){wx.scanQRCode(n)}function t1(n,t,e){function i(){WeixinJSBridge.invoke("getBrandWCPayRequest",n,function(r){r.err_msg=="get_brand_wcpay_request:ok"?t():e(r.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",i,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",i),document.attachEvent("onWeixinJSBridgeReady",i)):i()}function e1(n){window.AlipayJSBridge?n&&n():document.addEventListener("AlipayJSBridgeReady",n,!1)}function Hi(n,t){let e="未知错误";switch(n.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${n.error}(${e}): ${n.errorMessage}`}function n1(n,t,e){ap.tradePay(Object.assign(n,{}),function(i){let r="未知错误";switch(i.resultCode){case 9e3:return r="订单支付成功",t?.(r);case 8e3:r="正在处理中";break;case 4e3:r="订单支付失败";break;case 6001:r="用户中途取消";break;case 6002:r="网络连接出错";break;case 99:r="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(r)})}function i1(n,t,e){ap.scan(Object.assign(n,{fail:i=>{e?.(Hi(i))}}),function(i){t?.(i.code)})}function r1(n,t,e){ap.getLocation(Object.assign(n,{fail:i=>{e?.(Hi(i))}}),function(i){t?.(i)})}function s1(n,t,e){ap.openLocation(Object.assign(n,{fail:i=>{e?.(Hi(i))}}),function(){t?.()})}function a1(n,t,e){ap.chooseImage(Object.assign(n,{fail:i=>{e?.(Hi(i,"chooseImage"))}}),function(i){t?.(i)})}function o1(n,t,e){ap.previewImage(Object.assign(n,{fail:i=>{e?.(Hi(i))}}),function(){t?.()})}class l1{map;constructor(t,e=120.619585,i=31.299379,r=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,i),r)}}return O.AnimateOperation=Bi,O.CanvasOperation=ds,O.CustomCanvasContext=di,O.CustomCanvasGradient=ir,O.CustomCanvasPattern=Qr,O.DOMEvent=Vh,O.DOMEventBus=mo,O.DOMKey=Va,O.DOMMedia=jh,O.DOMQuery=jt,O.DOMScroll=Xh,O.DOMToBlob=ka,O.DOMToString=Ea,O.DOMUtil=Pt,O.Dep=tc,O.HSVToRGBObject=Kh,O.Matrix=Jt,O.Matrix3D=wn,O.PathGroup=yn,O.Point=Te,O.Polygon=mi,O.QRCode=hn,O.RGBStringToHexString=Wh,O.RGBToHSVObject=Qh,O.Rect=Un,O.SVGOperation=nn,O.ShapeArmyAnts=Cp,O.ShapeArrow=cp,O.ShapeBall=hp,O.ShapeFox=dp,O.ShapeLight=rc,O.ShapeLine=fp,O.ShapePoint3d=vp,O.ShapeRabbit=pp,O.ShapeRect=up,O.ShapeSegment=xp,O.ShapeShip=gp,O.ShapeSlider=yp,O.ShapeSmileFace=Ep,O.ShapeSpirograph=bp,O.ShapeStar=Tp,O.ShapeTree=mp,O.ShapeTriangle=_p,O.ShapeTriangleLight=wp,O.TWEEN=na,O.Vector=kr,O.VideoUtil=Gi,O.WebGLRenderer=Sp,O.WebRTCClient=kp,O.WebSocketClient=Fc,O.YZRaphael=us,O.absolutize=ar,O.addWatermark=N0,O.addWxJsReadyFnBeforeConfig=ra,O.ajax=Z0,O.aliJsChooseImage=a1,O.aliJsGetLocation=r1,O.aliJsOpenLocation=s1,O.aliJsPreviewImage=o1,O.aliJsReady=e1,O.aliJsScan=i1,O.aliJsTradePay=n1,O.angle=Wr,O.animateInWeb=ec,O.appendURLSearchString=fr,O.base64URLDecode=ef,O.base64URLEncode=tf,O.blobToRawImage=f0,O.canDrawBitmap=sh,O.canUsePaths=rh,O.canUseWorker=Ga,O.changeBrightness=z0,O.changeDiaphaneity=U0,O.changeSize=F0,O.checkWxJsApi=Lp,O.clearCookies=Hh,O.colorNumberToHexString=vo,O.colorNumberToRGBString=_o,O.compression=G0,O.createXMLHttpRequest=Js,O.debugObject=oh,O.debugObjectProperty=ah,O.distance=ja,O.dquery=cr,O.drawQRCodeToCanvas=X0,O.fileOrBlobToDataURL=qs,O.fileToArrayBufferPromise=Aa,O.flipSideToSide=d0,O.flipUpsideDown=p0,O.formDataToSearchString=vs,O.fromAngleAndLength=Jr,O.getBrowserClient=Yr,O.getBrowserClientVersion=Xc,O.getBrowserLanguage=Zc,O.getCookie=Bh,O.getCookieObject=Gh,O.getDirection=fh,O.getDocumentElement=Vr,O.getElementLeftInPage=Da,O.getElementPositionInPage=La,O.getElementPositionInPage2=Bc,O.getElementPositionInViewport=Gc,O.getElementTopInPage=Ra,O.getFileExtensionFromFile=Pa,O.getFileTypeFromFile=Mc,O.getFilesImageInfo=s0,O.getFormSubmitData=Y0,O.getGlobal=Xr,O.getImageDataByAIData=H0,O.getImageDataFromBitmap=o0,O.getImageDataFromUrl=Xl,O.getImageDataFromVideo=a0,O.getImageMainColor=u0,O.getInternetExplorerVersion=za,O.getMousePositionInElement=Ji,O.getMousePositionInPage=Oa,O.getMousePositionInViewport=jc,O.getOperatingSystem=Ki,O.getOperatingSystemVersion=Vc,O.getPageClient=qi,O.getPageScroll=zn,O.getPageSize=zc,O.getPointAtLength=co,O.getRaphael=zh,O.getRawImageInfo=$s,O.getRelativeBoundingClientRect=Hc,O.getScrollParent=Ip,O.getTimeZone=$c,O.getTotalLength=lo,O.getURL=ms,O.getUserGeolocationPromise=Yc,O.getViewportSize=Wi,O.getWorker=hf,O.gifImage=$l,O.h=Oc,O.handleDragAndDropFiles=Dc,O.handleInputFiles=Lc,O.hasDocument=eh,O.hasHistory=nh,O.hasWindow=Ba,O.hexStringToColorNumber=hr,O.hexStringToRGBString=gs,O.ifWebFileHasChanged=$0,O.imageDataToBitmap=l0,O.imageDataToBlob=h0,O.imageDataToDataURL=c0,O.injectWxJsConfig=Mp,O.isAliBrowser=Na,O.isAliMiniProgram=Qc,O.isAndroid=Fa,O.isAppleDevice=qc,O.isBrowserSupportFileAPI=ih,O.isDarkMode=Jc,O.isElementInViewport=Nc,O.isElementInViewportSimple=Uc,O.isIE=th,O.isIOS=Zr,O.isMacOS=$r,O.isMobile=Wc,O.isPointInPath=ho,O.isPointInStroke=fo,O.isSvgPath=Ka,O.isURL=nf,O.isWxBrowser=Ua,O.isWxMiniProgram=Kc,O.jpgToPng=L0,O.leftRotate=g0,O.linkExport=jr,O.localstorage=ps,O.mapTDTJSSDK=l1,O.marginSharpen=M0,O.microTask=Rc,O.mosaic=B0,O.mount=fi,O.norm=tr,O.normalize=or,O.normalizePoint=Kr,O.onHashChange=lf,O.onHistoryChange=cf,O.onURLChange=of,O.outputGifBase64=ql,O.outputQRCodeBase64=V0,O.parse=sr,O.parseTransformToMatrix=Nn,O.parseURL=wo,O.patch=Ia,O.patchDOM=Ma,O.pngToJpg=D0,O.radiusClip=O0,O.randomColorHexString=$h,O.randomColorHexString2=qh,O.randomColorNumber=Zh,O.rappar=Ja,O.reactiveVue2=W0,O.reactiveVue3=J0,O.readFileInBrowser=Sa,O.recordToSearchString=xo,O.recordToSearchString2=af,O.rectClip=R0,O.relative=xh,O.rightRotate=m0,O.searchStringToRecord=rf,O.searchStringToRecord2=sf,O.selectFileInBrowser=Ic,O.setCookie=Nh,O.setRem=lh,O.shadeColor=Jh,O.sharpen=I0,O.singletonGlobalAnimateInWeb=Qs,O.stringToBlob=Hr,O.stringToDOM=Pc,O.theme=Yh,O.toBlackAndWhite=w0,O.toBlue=T0,O.toBlueAndGreen=k0,O.toBlueAndGrey=P0,O.toDegree=qr,O.toGreen=b0,O.toGreenAndGrey=A0,O.toGrey=v0,O.toGrey2=_0,O.toOpposite=y0,O.toRadian=Qi,O.toRed=x0,O.toRedAndBlue=E0,O.toRedAndGreen=C0,O.toRedAndGrey=S0,O.trimURLHash=yo,O.watchEffect=q0,O.wxJsChooseImage=Op,O.wxJsDownloadImage=Up,O.wxJsDownloadVoice=$p,O.wxJsGetLocalImgData=Np,O.wxJsGetLocation=Kp,O.wxJsGetNetworkType=Wp,O.wxJsOnVoicePlayEnd=Yp,O.wxJsOnVoiceRecordEnd=Hp,O.wxJsOpenLocation=Jp,O.wxJsPauseVoice=Vp,O.wxJsPay=t1,O.wxJsPlayVoice=jp,O.wxJsPreviewImage=Fp,O.wxJsScanQRCode=Qp,O.wxJsStartRecord=Bp,O.wxJsStopRecord=Gp,O.wxJsStopVoice=Xp,O.wxJsTranslateVoice=qp,O.wxJsUpdateAppMessageShareData=Dp,O.wxJsUpdateTimelineShareData=Rp,O.wxJsUploadImage=zp,O.wxJsUploadVoice=Zp,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),O}({});
|
|
43
|
+
${t.sdp}.`),this.remotePeerConnection&&(this.trace("remotePeerConnection setLocalDescription start."),this.remotePeerConnection.setLocalDescription(t).then(()=>{this.setLocalDescriptionSuccess(this.remotePeerConnection)}).catch(e=>this.setSessionDescriptionError(e))),this.localPeerConnection&&(this.trace("localPeerConnection setRemoteDescription start."),this.localPeerConnection.setRemoteDescription(t).then(()=>{this.setRemoteDescriptionSuccess(this.localPeerConnection)}).catch(e=>this.setSessionDescriptionError(e)))}setSessionDescriptionError(t){this.trace(`Failed to create session description: ${t.toString()}.`)}setDescriptionSuccess(t,e){const n=this.getPeerName(t);this.trace(`${n} ${e} complete.`)}setLocalDescriptionSuccess(t){this.setDescriptionSuccess(t,"setLocalDescription")}setRemoteDescriptionSuccess(t){this.setDescriptionSuccess(t,"setRemoteDescription")}trace(t){t=t.trim();const e=(window.performance.now()/1e3).toFixed(3);console.log(e,t);const n=document.createElement("div");n.innerHTML=`<div>${e}, ${t}</div>`,document.getElementById("trace")?.appendChild(n)}getOtherPeer(t){return t===this.localPeerConnection?this.remotePeerConnection:this.localPeerConnection}getPeerName(t){return t===this.localPeerConnection?"localPeerConnection":"remotePeerConnection"}}class dc{canvas;gl;constructor(t){this.canvas=t;const e={alpha:!0,premultipliedAlpha:!1};if(this.gl=this.canvas.getContext("webgl",e),!this.gl)throw new Error("WebGL failed to initialize.")}}function Xs(i,t){return!i||i.parentElement===null?t:Xs(i.parentElement,t.concat([i]))}const ur=function(i,t){return getComputedStyle(i,null).getPropertyValue(t)},pc=function(i){return ur(i,"overflow")+ur(i,"overflow-y")+ur(i,"overflow-x")},mc=function(i){return/(auto|scroll)/.test(pc(i))};function gc(i){if(!(i instanceof HTMLElement||i instanceof SVGElement))return;const t=Xs(i.parentElement,[]);for(let e=0;e<t.length;e+=1)if(mc(t[e]))return t[e];return document.scrollingElement||document.documentElement}const Hs=[],Ws={};function fr(i){Hs.push(i)}function vc(i,t=!1){const e=Ps();if(Ws[e])return;wx.error(s=>{console.log(s.errMsg??JSON.stringify(s))}),wx.ready(()=>{Hs.forEach(s=>s())});const n=["updateAppMessageShareData","updateTimelineShareData","onMenuShareWeibo","onMenuShareQZone","startRecord","stopRecord","onVoiceRecordEnd","playVoice","pauseVoice","stopVoice","onVoicePlayEnd","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getLocalImgData","translateVoice","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","closeWindow","scanQRCode","openProductSpecificView","addCard","chooseCard","openCard"],r=["wx-open-launch-app","wx-open-launch-app","wx-open-subscribe","wx-open-audio"];wx.config(Object.assign(i,{debug:t,jsApiList:n,openTagList:r})),Ws[e]=!0}function yc(i){return new Promise((t,e)=>{wx.checkJsApi({jsApiList:[i],success:function(n){n.checkResult[i]?t(!0):e(!1)},fail:function(){e(!1)}})})}function wc(i){fr(function(){wx.updateAppMessageShareData(i)})}function xc(i){fr(function(){wx.updateTimelineShareData(i)})}function bc(i){wx.chooseImage(i)}function _c(i){wx.previewImage(i)}function Cc(i){wx.uploadImage(i)}function Tc(i){wx.downloadImage(i)}function Sc(i){wx.getLocalImgData(i)}function Ec(){wx.startRecord()}function Pc(i){wx.stopRecord(i)}function kc(i){wx.onVoiceRecordEnd(i)}function Ac(i){wx.playVoice(i)}function Mc(i){wx.pauseVoice(i)}function Ic(i){wx.stopVoice(i)}function Lc(i){wx.onVoicePlayEnd(i)}function Dc(i){wx.uploadVoice(i)}function Rc(i){wx.downloadVoice(i)}function Oc(i){wx.translateVoice(i)}function Nc(i){wx.getNetworkType(i)}function Bc(i){wx.openLocation(i)}function Fc(i){wx.getLocation(i)}function zc(i){wx.scanQRCode(i)}function Uc(i,t,e){function n(){WeixinJSBridge.invoke("getBrandWCPayRequest",i,function(r){r.err_msg=="get_brand_wcpay_request:ok"?t():e(r.err_msg)})}typeof WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",n,!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",n),document.attachEvent("onWeixinJSBridgeReady",n)):n()}function Gc(i){window.AlipayJSBridge?i&&i():document.addEventListener("AlipayJSBridgeReady",i,!1)}function zn(i,t){let e="未知错误";switch(i.error){case 1:e="接口不存在";break;case 2:e="参数无效";break;case 3:e="发生未知错误";break;case 4:e="接口无权限";break;case 10:e="用户取消";break;case 11:e="操作失败",t==="chooseImage"&&(e="操作失败(权限不够)");break;case 12:e="GPS打开,但定位失败";break;case 13:e="获取地理位置信息失败";break;case 14:e="定位超时";break;case 15:e="网络错误";break;case 16:e="GPS未打开或用户未授权";break}return`${i.error}(${e}): ${i.errorMessage}`}function Vc(i,t,e){ap.tradePay(Object.assign(i,{}),function(n){let r="未知错误";switch(n.resultCode){case 9e3:return r="订单支付成功",t?.(r);case 8e3:r="正在处理中";break;case 4e3:r="订单支付失败";break;case 6001:r="用户中途取消";break;case 6002:r="网络连接出错";break;case 99:r="用户点击忘记密码导致快捷界面退出(only iOS)";break}e?.(r)})}function jc(i,t,e){ap.scan(Object.assign(i,{fail:n=>{e?.(zn(n))}}),function(n){t?.(n.code)})}function Xc(i,t,e){ap.getLocation(Object.assign(i,{fail:n=>{e?.(zn(n))}}),function(n){t?.(n)})}function Hc(i,t,e){ap.openLocation(Object.assign(i,{fail:n=>{e?.(zn(n))}}),function(){t?.()})}function Wc(i,t,e){ap.chooseImage(Object.assign(i,{fail:n=>{e?.(zn(n,"chooseImage"))}}),function(n){t?.(n)})}function Yc(i,t,e){ap.previewImage(Object.assign(i,{fail:n=>{e?.(zn(n))}}),function(){t?.()})}class qc{map;constructor(t,e=120.619585,n=31.299379,r=18){this.map=new T.Map(t),this.map.centerAndZoom(new T.LngLat(e,n),r)}}return M.AnimateOperation=Ge,M.CanvasOperation=Qi,M.CustomCanvasContext=An,M.CustomCanvasGradient=Jn,M.CustomCanvasPattern=zi,M.DOMEventBus=Gt,M.DOMKey=Kr,M.DOMQuery=zt,M.DOMToBlob=Dr,M.DOMToString=Lr,M.DOMUtil=St,M.DOMVideo=Dn,M.Dep=Fs,M.HSVToRGBObject=Oo,M.Matrix=Ht,M.Matrix3D=Je,M.PathGroup=Ze,M.Point=fe,M.Polygon=Ln,M.QRCode=Ue,M.RGBStringToHexString=Do,M.RGBToHSVObject=No,M.Rect=cn,M.SVGOperation=Fe,M.ShapeArmyAnts=lc,M.ShapeArrow=qh,M.ShapeBall=$h,M.ShapeFox=Kh,M.ShapeHeart=tc,M.ShapeLight=js,M.ShapeLine=Jh,M.ShapePoint3d=ic,M.ShapeRabbit=Qh,M.ShapeRect=Zh,M.ShapeSegment=oc,M.ShapeShip=ec,M.ShapeSlider=ac,M.ShapeSmileFace=uc,M.ShapeSpirograph=hc,M.ShapeStar=cc,M.ShapeTree=nc,M.ShapeTriangle=rc,M.ShapeTriangleLight=sc,M.TWEEN=ui,M.Tween=Gs,M.Vector=hi,M.WebGLRenderer=dc,M.WebRTCClient=fc,M.WebSocketClient=xa,M.YZRaphael=Ki,M.absolutize=Qn,M.addWatermark=kh,M.addWxJsReadyFnBeforeConfig=fr,M.ajax=Oh,M.aliJsChooseImage=Wc,M.aliJsGetLocation=Xc,M.aliJsOpenLocation=Hc,M.aliJsPreviewImage=Yc,M.aliJsReady=Gc,M.aliJsScan=jc,M.aliJsTradePay=Vc,M.angle=Ni,M.animateInWeb=zs,M.appendURLSearchString=ri,M.base64URLDecode=Fo,M.base64URLEncode=Bo,M.blobToRawImage=th,M.canDrawBitmap=Xa,M.canUsePaths=ja,M.canUseWorker=$r,M.changeBrightness=Eh,M.changeDiaphaneity=Ph,M.changeSize=Sh,M.checkWxJsApi=yc,M.clearCookies=ko,M.colorNumberToHexString=Ts,M.colorNumberToRGBString=Ss,M.createXMLHttpRequest=or,M.debugObject=Wa,M.debugObjectProperty=Ha,M.distance=Zr,M.dquery=tr,M.drawQRCodeToCanvas=Dh,M.fileOrBlobToDataURL=sr,M.fileToArrayBufferPromise=Or,M.flipSideToSide=nh,M.flipUpsideDown=ih,M.formDataToSearchString=rr,M.fromAngleAndLength=Bi,M.getBrowserClient=Li,M.getBrowserClientVersion=Ma,M.getBrowserLanguage=La,M.getColorScheme=Cs,M.getCookie=Eo,M.getCookieObject=Po,M.getDirection=Ja,M.getElementLeftPositionInPage2=Gr,M.getElementPositionInPage=Ur,M.getElementPositionInPage2=Ta,M.getElementPositionInViewport=Sa,M.getElementTopPositionInPage2=Vr,M.getFileExtensionFromFile=Nr,M.getFileTypeFromFile=ma,M.getFilesImageInfo=qo,M.getFormSubmitData=Rh,M.getGlobal=Ii,M.getImageAspectRatio=Yo,M.getImageDataByAIData=Mh,M.getImageDataFromBitmap=Jo,M.getImageDataFromUrl=As,M.getImageDataFromVideo=$o,M.getImageMainColor=eh,M.getInternetExplorerVersion=Hr,M.getMousePositionInElement=Hn,M.getMousePositionInPage=jr,M.getMousePositionInViewport=ka,M.getOperatingSystem=Wn,M.getOperatingSystemVersion=Aa,M.getPageBodyElement=_a,M.getPageDocumentElement=hn,M.getPageSize=Ca,M.getPointAtLength=vs,M.getRaphael=Co,M.getRawImageInfo=ai,M.getRelativeBoundingClientRect=Ea,M.getScreenElement=ba,M.getScrollParent=gc,M.getTimeZone=Da,M.getTotalLength=gs,M.getURL=ir,M.getUserGeolocationPromise=Ia,M.getVerticalScrollPercentInPage=Pa,M.getViewportSize=zr,M.getWorker=Wo,M.gifImage=Ls,M.h=wa,M.handleDragAndDropFiles=va,M.handleInputFiles=ga,M.hasDocument=Ua,M.hasHistory=Ga,M.hasWindow=qr,M.hexStringToColorNumber=ii,M.hexStringToRGBString=nr,M.ifWebFileHasChanged=Nh,M.imageDataToBitmap=Zo,M.imageDataToBlob=Qo,M.imageDataToDataURL=Ko,M.injectWxJsConfig=vc,M.isAliBrowser=Yr,M.isAliMiniProgram=Fa,M.isAndroid=Xr,M.isAppleDevice=Ra,M.isBrowserSupportFileAPI=Va,M.isDarkMode=Na,M.isIE=za,M.isIOS=Di,M.isMacOS=Ri,M.isMobile=Oa,M.isPointInPath=ys,M.isPointInStroke=ws,M.isSvgPath=as,M.isURL=zo,M.isWxBrowser=Wr,M.isWxMiniProgram=Ba,M.jpgToPng=bh,M.leftRotate=rh,M.linkExport=Ai,M.localstorage=er,M.mapTDTJSSDK=qc,M.marginSharpen=xh,M.microTask=ya,M.mosaic=Ah,M.mount=Pn,M.normalize=ti,M.normalizePoint=Fi,M.onHashChange=Xo,M.onHistoryChange=Ho,M.onURLChange=jo,M.outputGifBase64=Ds,M.outputQRCodeBase64=Lh,M.parse=Kn,M.parseTransformToMatrix=ln,M.parseURL=Es,M.patch=Br,M.patchDOM=Fr,M.pngToJpg=_h,M.radiusClip=Th,M.randomColorHexString=Io,M.randomColorHexString2=Lo,M.randomColorNumber=Mo,M.rappar=ss,M.reactiveVue2=Fh,M.reactiveVue3=zh,M.readFileInBrowser=Mi,M.recordToSearchString=ks,M.recordToSearchString2=Vo,M.rectClip=Ch,M.relative=ao,M.rightRotate=sh,M.searchStringToRecord=Uo,M.searchStringToRecord2=Go,M.selectFileInBrowser=Rr,M.setColorScheme=ni,M.setCookie=So,M.setRem=Ya,M.shadeColor=Ro,M.sharpen=wh,M.singletonGlobalAnimateInWeb=ci,M.stringToBlob=ki,M.stringToDOM=pa,M.theme=Ao,M.toBlackAndWhite=hh,M.toBlue=fh,M.toBlueAndGreen=mh,M.toBlueAndGrey=yh,M.toDegree=Oi,M.toGreen=uh,M.toGreenAndGrey=vh,M.toGrey=ah,M.toGrey2=oh,M.toOpposite=ch,M.toRadian=Yn,M.toRed=lh,M.toRedAndBlue=ph,M.toRedAndGreen=dh,M.toRedAndGrey=gh,M.trimURLHash=Ps,M.watchEffect=Bh,M.wxJsChooseImage=bc,M.wxJsDownloadImage=Tc,M.wxJsDownloadVoice=Rc,M.wxJsGetLocalImgData=Sc,M.wxJsGetLocation=Fc,M.wxJsGetNetworkType=Nc,M.wxJsOnVoicePlayEnd=Lc,M.wxJsOnVoiceRecordEnd=kc,M.wxJsOpenLocation=Bc,M.wxJsPauseVoice=Mc,M.wxJsPay=Uc,M.wxJsPlayVoice=Ac,M.wxJsPreviewImage=_c,M.wxJsScanQRCode=zc,M.wxJsStartRecord=Ec,M.wxJsStopRecord=Pc,M.wxJsStopVoice=Ic,M.wxJsTranslateVoice=Oc,M.wxJsUpdateAppMessageShareData=wc,M.wxJsUpdateTimelineShareData=xc,M.wxJsUploadImage=Cc,M.wxJsUploadVoice=Dc,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({});
|
|
44
44
|
//# sourceMappingURL=zyzgroup_core_web.iife.js.map
|