UNPKG

@quick-game/cli

Version:

Command line interface for rapid qg development

1 lines 57.4 kB
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t){class n{constructor(e,t){this._type=e,this._target=null,this._eventPhase=2,this._currentTarget=null,this._canceled=!1,this._stopped=!1,this._passiveListener=null,this._timeStamp=Date.now()}get type(){return this._type}get target(){return this._target}get currentTarget(){return this._currentTarget}get isTrusted(){return!1}get timeStamp(){return this._timeStamp}composedPath(){const e=this._currentTarget;return null===e?[]:[e]}get eventPhase(){return this._eventPhase}stopPropagation(){}stopImmediatePropagation(){this._stopped=!0}get bubbles(){return!1}get cancelable(){return!0}preventDefault(){null===this._passiveListener?this.cancelable&&(this._canceled=!0):console.warn("Event#preventDefault() was called from a passive listener:",this._passiveListener)}get defaultPrevented(){return this._canceled}get composed(){return!1}get timeStamp(){return this._timeStamp}}n.NONE=0,n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,e.exports=n},function(e,t,n){const r=n(6);e.exports=class extends r{constructor(e=""){super(),this.tagName=e.toUpperCase(),this.className="",this.children=[],this.style={width:`${window.innerWidth}px`,height:`${window.innerHeight}px`},this.innerHTML="",this.parentElement=mainCanvas}setAttribute(e,t){this[e]=t}getAttribute(e){return this[e]}focus(){}}},function(e,t){var n=0,r={touch:{},mouse:{},keyboard:{},devicemotion:{}},i={touch:0,mouse:0,keyboard:0,devicemotion:0},o={touch:null,mouse:null,keyboard:null,devicemotion:null},a={touch:null,mouse:null,keyboard:null,devicemotion:null};const s={touch:["touchstart","touchmove","touchend","touchcancel"],mouse:["mousedown","mousemove","mouseup","mousewheel"],keyboard:["keydown","keyup","keypress"],devicemotion:["devicemotion"]};function c(e){return e&&"object"==typeof e}e.exports=class{constructor(){this._targetID=++n,this._listenerCount={touch:0,mouse:0,keyboard:0,devicemotion:0},this._listeners=new Map}_associateSystemEventListener(e){for(var t in s)if(s[t].indexOf(e)>-1){o[t]&&0===i[t]&&o[t](),0===this._listenerCount[t]&&(r[t][this._targetID]=this),++this._listenerCount[t],++i[t];break}}_dissociateSystemEventListener(e){for(var t in s)if(s[t].indexOf(e)>-1){this._listenerCount[t]<=0&&delete r[t][this._targetID],--i[t],a[t]&&0===i[t]&&a[t]();break}}addEventListener(e,t,n){if(!t)return!1;if("function"!=typeof t&&!c(t))throw new TypeError("'listener' should be a function or an object.");const r=this._listeners,i=c(n),o=(i?Boolean(n.capture):Boolean(n))?1:2,a={listener:t,listenerType:o,passive:i&&Boolean(n.passive),once:i&&Boolean(n.once),next:null};let s=r.get(e);if(void 0===s)return r.set(e,a),this._associateSystemEventListener(e),!0;let u=null;for(;s;){if(s.listener===t&&s.listenerType===o)return!1;u=s,s=s.next}return u.next=a,this._associateSystemEventListener(e),!0}removeEventListener(e,t,n){if(!t)return!1;const r=this._listeners,i=(c(n)?Boolean(n.capture):Boolean(n))?1:2;let o=null,a=r.get(e);for(;a;){if(a.listener===t&&a.listenerType===i)return o?o.next=a.next:a.next?r.set(e,a.next):r.delete(e),this._dissociateSystemEventListener(e),!0;o=a,a=a.next}return!1}dispatchEvent(e){if(!e||"string"!=typeof e.type)throw new TypeError('"event.type" should be a string.');const t=e.type;var n=this["on"+t];if(n&&"function"==typeof n&&(e._target=e._currentTarget=this,n.call(this,e),e._target=e._currentTarget=null,e._eventPhase=0,e._passiveListener=null,e.defaultPrevented))return!1;const r=this._listeners;let i=r.get(t);if(!i)return!0;e._target=e._currentTarget=this;let o=null;for(;i&&(i.once?o?o.next=i.next:i.next?r.set(t,i.next):r.delete(t):o=i,e._passiveListener=i.passive?i.listener:null,"function"==typeof i.listener&&i.listener.call(this,e),!e._stopped);)i=i.next;return e._target=e._currentTarget=null,e._eventPhase=0,e._passiveListener=null,!e.defaultPrevented}}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(!(r instanceof t)){function i(){}i.prototype=t.prototype,n(r,i=new i),e.prototype=r=i}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,c=i.CDATA_SECTION_NODE=4,u=i.ENTITY_REFERENCE_NODE=5,l=i.ENTITY_NODE=6,h=i.PROCESSING_INSTRUCTION_NODE=7,d=i.COMMENT_NODE=8,p=i.DOCUMENT_NODE=9,f=i.DOCUMENT_TYPE_NODE=10,m=i.DOCUMENT_FRAGMENT_NODE=11,g=i.NOTATION_NODE=12,w={},v={},_=(w.INDEX_SIZE_ERR=(v[1]="Index size error",1),w.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),w.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),y=(w.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),w.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),w.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),w.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),w.NOT_FOUND_ERR=(v[8]="Not found",8)),b=(w.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),w.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));function N(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,N);return n.code=e,t&&(this.message=this.message+": "+t),n}function E(){}function x(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function T(){}function S(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function A(e,t,n,r){if(r?t[S(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&M(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function D(e,t,n){var r=S(t,n);if(!(r>=0))throw N(y,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(M(o,e,n),n.ownerElement=null)}}function I(e){if(this._features={},e)for(var t in e)this._features=e[t]}function R(){}function k(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function O(){}function M(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function B(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function U(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,B(e.ownerDocument,e),t}function P(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===m){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return B(e.ownerDocument||e,e),t.nodeType==m&&(t.firstChild=t.lastChild=null),t}function F(){this._nsMap={}}function j(){}function q(){}function H(){}function K(){}function z(){}function W(){}function G(){}function $(){}function X(){}function Y(){}function V(){}function Q(){}function Z(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function J(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]),i.length;var l=e.attributes,g=l.length,w=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var _=0;_<g;_++)"xmlns"==(y=l.item(_)).prefix?i.push({prefix:y.localName,namespace:y.value}):"xmlns"==y.nodeName&&i.push({prefix:"",namespace:y.value});for(_=0;_<g;_++){var y;if(J(y=l.item(_),0,i)){var b=y.prefix||"",N=y.namespaceURI,E=b?" xmlns:"+b:" xmlns";t.push(E,'="',N,'"'),i.push({prefix:b,namespace:N})}ee(y,t,n,r,i)}if(J(e,0,i)&&(b=e.prefix||"",N=e.namespaceURI,E=b?" xmlns:"+b:" xmlns",t.push(E,'="',N,'"'),i.push({prefix:b,namespace:N})),w||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;w;)w.data?t.push(w.data):ee(w,t,n,r,i),w=w.nextSibling;else for(;w;)ee(w,t,n,r,i),w=w.nextSibling;t.push("</",v,">")}else t.push("/>");return;case p:case m:for(w=e.firstChild;w;)ee(w,t,n,r,i),w=w.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,k),'"');case s:return t.push(e.data.replace(/[<&]/g,k));case c:return t.push("<![CDATA[",e.data,"]]>");case d:return t.push("\x3c!--",e.data,"--\x3e");case f:var x=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),x)t.push(' PUBLIC "',x),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var T=e.internalSubset;T&&t.push(" [",T,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case u:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}w.INVALID_STATE_ERR=(v[11]="Invalid state",11),w.SYNTAX_ERR=(v[12]="Syntax error",12),w.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),w.NAMESPACE_ERR=(v[14]="Invalid namespace",14),w.INVALID_ACCESS_ERR=(v[15]="Invalid access",15),N.prototype=Error.prototype,n(w,N),E.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},x.prototype.item=function(e){return C(this),this[e]},r(x,E),T.prototype={length:0,item:E.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new N(b);var n=this.getNamedItem(e.nodeName);return A(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new N(b);return t=this.getNamedItemNS(e.namespaceURI,e.localName),A(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return D(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return D(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},I.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new O;if(r.implementation=this,r.childNodes=new E,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},R.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return P(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return U(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var c=n[s];"object"!=typeof c&&c!=i[s]&&(i[s]=c)}switch(n.childNodes&&(i.childNodes=new E),i.ownerDocument=t,i.nodeType){case o:var u=n.attributes,l=i.attributes=new T,h=u.length;l._ownerElement=i;for(var d=0;d<h;d++)i.setAttributeNode(e(t,u.item(d),!0));break;case a:r=!0}if(r)for(var p=n.firstChild;p;)i.appendChild(e(t,p,r)),p=p.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,R),n(i,R.prototype),O.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==m){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),P(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),U(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case m:break;case a:r=!0}if(i||(i=n.cloneNode(!1)),i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new F;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new E,(t.attributes=new T)._ownerElement=t,t},createDocumentFragment:function(){var e=new Y;return e.ownerDocument=this,e.childNodes=new E,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new K;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new V;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new j;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new X;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new F,r=t.split(":"),i=n.attributes=new T;return n.childNodes=new E,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new j,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(O,R),F.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===m?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t),r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,B(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new x(this,(function(t){var n=[];return L(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new x(this,(function(n){var r=[];return L(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},O.prototype.getElementsByTagName=F.prototype.getElementsByTagName,O.prototype.getElementsByTagNameNS=F.prototype.getElementsByTagNameNS,r(F,R),j.prototype.nodeType=a,r(j,R),q.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[_])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(q,R),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,q),K.prototype={nodeName:"#comment",nodeType:d},r(K,q),z.prototype={nodeName:"#cdata-section",nodeType:c},r(z,q),W.prototype.nodeType=f,r(W,R),G.prototype.nodeType=g,r(G,R),$.prototype.nodeType=l,r($,R),X.prototype.nodeType=u,r(X,R),Y.prototype.nodeName="#document-fragment",Y.prototype.nodeType=m,r(Y,R),V.prototype.nodeType=h,r(V,R),Q.prototype.serializeToString=function(e,t,n){return Z.call(e,t,n)},R.prototype.toString=Z;try{Object.defineProperty&&(Object.defineProperty(x.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(R.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case m:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case m:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n})}catch(e){}t.DOMImplementation=I,t.XMLSerializer=Q},function(e,t){if(window.HTMLCanvasElement)e.exports=window.HTMLCanvasElement;else{const t=window.mainCanvas||qg.createCanvas();e.exports=t.constructor}},function(e,t){const n={href:"game.js",pathname:"game.js",search:"",hash:"",reload(){}};e.exports=n},function(e,t,n){const r=n(7),i=n(25);e.exports=class extends r{constructor(){super(),this.className="",this.children=[],this.clientLeft=0,this.clientTop=0,this.scrollLeft=0,this.scrollTop=0}get clientWidth(){return 0}get clientHeight(){return 0}getBoundingClientRect(){return new i(0,0,window.innerWidth,window.innerHeight)}removeAttribute(e){}}},function(e,t,n){const r=n(2);e.exports=class extends r{constructor(){super(),this.childNodes=[],this.parentNode=mainCanvas}appendChild(e){this.childNodes.push(e)}insertBefore(e,t){return e}replaceChild(e,t){return t}cloneNode(){const e=Object.create(this);return Object.assign(e,this),e}removeChild(e){const t=this.childNodes.findIndex((t=>t===e));return t>-1?this.childNodes.splice(t,1):null}contains(e){return this.childNodes.indexOf(e)>-1}}},function(e,t){if(window.HTMLImageElement)e.exports=window.HTMLImageElement;else{const t=qg.createImage();e.exports=t.constructor}},function(e,t,n){const r=n(10);e.exports=r},function(e,t){const n=qg.createInnerAudioContext();e.exports=n.constructor},function(e,t,n){const r=n(12);e.exports=class extends r{constructor(){super("video")}canPlayType(e){return!1}}},function(e,t,n){const r=n(1),i=n(26);e.exports=class extends r{constructor(e){super(e),this._volume=1,this._duration=0,this._isEnded=!1,this._isMute=!1,this._readyState=0,this._error=new i}addTextTrack(){}captureStream(){}fastSeek(){}load(){}pause(){}play(){}canPlayType(e){return""}set volume(e){this._volume=e}get volume(){return this._volume}get duration(){return this._duration}get ended(){return this._isEnded}get muted(){return this._isMute}get readyState(){return this._readyState}get error(){return this._error}get currentTime(){return 0}}},function(e,t,n){const r=n(1);n(0),e.exports=class extends r{constructor(e,t){super("script")}set src(e){}}},function(e,t,n){const r=n(2),i=n(0);e.exports=class extends r{constructor(){super(),this._status="loading"}get status(){return this._status}set onloading(e){this.addEventListener("loading",e)}set onloadingdone(e){this.addEventListener("loadingdone",e)}set onloadingerror(e){this.addEventListener("loadingerror",e)}add(e){this._status=e._status="loading",this.dispatchEvent(new i("loading"));let t=qg.loadFont(e.source);setTimeout((()=>{t?(e._status=this._status="loaded",e._resolveCB(),this.dispatchEvent(new i("loadingdone"))):(e._status=this._status="error",e._rejectCB(),this.dispatchEvent(new i("loadingerror")))}),0)}clear(){}delete(){}load(){}ready(){}}},function(e,t){},function(e,t,n){window._isAdapted||(n(17),n(35),window._isAdapted=!0)},function(e,t,n){const r=(e,t,n)=>{try{Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:()=>n,set(e){e!==n&&console.warn(`can not rewrite wx property: ${t}`)}})}catch(e){console.error(e)}},{btoa:i,atob:o}=n(18);if(r(window,"btoa",i),r(window,"atob",o),!window.Blob){const{Blob:e,URL:t}=n(19);r(window,"Blob",e),window.URL||r(window,"URL",t)}r(window,"DOMParser",n(21).DOMParser),window.CanvasRenderingContext2D||r(window,"CanvasRenderingContext2D",qg.getCanvasRenderingContext2D()),window.top=window.parent=window,window.ontouchstart=null,window.ontouchmove=null,window.ontouchend=null,window.ontouchcancel=null,window.pageXOffset=window.pageYOffset=window.clientTop=window.clientLeft=0,window.outerWidth=window.innerWidth,window.outerHeight=window.innerHeight,r(window,"mainCanvas",window.canvas||window.mainCanvas||qg.createCanvas()),r(window,"HTMLCanvasElement",n(4)),window.location||r(window,"location",n(5)),r(window,"document",n(24)),r(window,"Element",n(6)),r(window,"HTMLElement",n(1)),r(window,"HTMLImageElement",n(27)),r(window,"HTMLMediaElement",n(12)),r(window,"HTMLAudioElement",n(10)),r(window,"HTMLVideoElement",n(11)),r(window,"HTMLScriptElement",n(13));const a=qg.getSystemInfoSync(),s={platform:a.osType||"android",language:a.language||"zh",appVersion:a.osVersionName||"11",userAgent:"Mozilla/5.0 (Android;) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN",geolocation:{getCurrentPosition:()=>{},watchPosition:()=>{},clearWatch:()=>{}}};window.navigator=s,window.navigator.default={platform:window.navigator.platform,language:window.navigator.language,appVersion:window.navigator.appVersion,userAgent:"Mozilla/5.0 (Android;) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN",geolocation:window.navigator.geolocation},window.Image=n(8),r(window,"Audio",n(9)),r(window,"FileReader",n(28)),r(window,"FontFace",n(29)),r(window,"FontFaceSet",n(14)),r(window,"EventTarget",n(2)),r(window,"Event",n(0)),r(window,"TouchEvent",n(30)),r(window,"MouseEvent",n(31)),r(window,"KeyboardEvent",n(32)),r(window,"DeviceMotionEvent",n(33)),window.canvas||r(window,"canvas",window.mainCanvas||qg.createCanvas());var c="portrait"===a.deviceOrientation?0:90;if(qg.getDeviceRotation)switch(qg.getDeviceRotation()){case 1:c=90;break;case 2:c=180;break;case 3:c=-90}r(window,"orientation",c),window.devicePixelRatio=1,window.screen={availTop:0,availLeft:0,availHeight:window.innerWidth,availWidth:window.innerHeight,colorDepth:8,pixelDepth:8,left:0,top:0,width:window.innerWidth,height:window.innerHeight},window.addEventListener=function(e,t,n){window.mainCanvas.addEventListener(e,t,n)},window.removeEventListener=function(e,t,n){window.mainCanvas.removeEventListener(e,t,n)},window.dispatchEvent=function(e){window.mainCanvas.dispatchEvent(e)},r(window,"getComputedStyle",(function(e){return{position:"absolute",left:"0px",top:"0px",height:"0px"}})),window.focus=function(){},window.scroll=function(){},window.resize=function(e,t){window.innerWidth=e,window.innerHeight=t,window.outerWidth=window.innerWidth,window.outerHeight=window.innerHeight,window.mainCanvas._width=window.innerWidth,window.mainCanvas._height=window.innerHeight,window.screen.availWidth=window.innerWidth,window.screen.availHeight=window.innerHeight,window.screen.width=window.innerWidth,window.screen.height=window.innerHeight,qg.onWindowResize&&qg.onWindowResize({windowWidth:e,windowHeight:t})},window.localStorage||(window.localStorage=n(34)),window.alert=console.error.bind(console),window.close=qg.getClose?qg.getClose:function(){},r(global,"window",window),r(global.window,"top",window),r(global.window,"parent",window),r(global,"WebSocket",window.WebSocket);try{r(global.canvas.__proto__,"__proto__",global.canvas.__proto__.__proto__),r(global.canvas.__proto__.__proto__,"__proto__",global.canvas.__proto__.__proto__.__proto__),r(global.canvas.__proto__.__proto__.__proto__,"__proto__",global.canvas.__proto__.__proto__.__proto__.__proto__),GameGlobal.__isAdapterInjected=!0}catch(e){}},function(e,t,n){!function(){function e(e){this.message=e}var n=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",n.btoa||(n.btoa=function(t){for(var n,i,o=String(t),a=0,s=r,c="";o.charAt(0|a)||(s="=",a%1);c+=s.charAt(63&n>>8-a%1*8)){if((i=o.charCodeAt(a+=.75))>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return c}),n.atob||(n.atob=function(t){var n=String(t).replace(/[=]+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,o,a=0,s=0,c="";o=n.charAt(s++);~o&&(i=a%4?64*i+o:o,a++%4)?c+=String.fromCharCode(255&i>>(-2*a&6)):0)o=r.indexOf(o);return c})}()},function(e,t,n){(function(n){var r,i,o;!function(n){i=[t],void 0===(o="function"==typeof(r=function(e){"use strict";if(e.URL=n.URL||n.webkitURL,n.Blob&&n.URL)try{return void new Blob}catch(e){}var t=n.BlobBuilder||n.WebKitBlobBuilder||n.MozBlobBuilder||function(){var t=function(e){return Object.prototype.toString.call(e).match(/^\[object\s(.*)\]$/)[1]},r=function(){this.data=[]},i=function(e,t,n){this.data=e,this.size=e.length,this.type=t,this.encoding=n},o=r.prototype,a=i.prototype,s=n.FileReaderSync,c=function(e){this.code=this[this.name=e]},u="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),l=u.length,h=n.URL||n.webkitURL||e,d=h.createObjectURL,p=h.revokeObjectURL,f=h,m=n.btoa,g=n.atob,w=n.ArrayBuffer,v=n.Uint8Array,_=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(i.fake=a.fake=!0;l--;)c.prototype[u[l]]=l+1;return h.createObjectURL||(f=e.URL=function(e){var t,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=e,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(t=e.match(_),n.origin=t&&t[1])),n}),f.createObjectURL=function(e){var t,n=e.type;return null===n&&(n="application/octet-stream"),e instanceof i?(t="data:"+n,"base64"===e.encoding?t+";base64,"+e.data:"URI"===e.encoding?t+","+decodeURIComponent(e.data):m?t+";base64,"+m(e.data):t+","+encodeURIComponent(e.data)):d?d.call(h,e):void 0},f.revokeObjectURL=function(e){"data:"!==e.substring(0,5)&&p&&p.call(h,e)},o.append=function(e){var n=this.data;if(v&&(e instanceof w||e instanceof v)){for(var r="",o=new v(e),a=0,u=o.length;a<u;a++)r+=String.fromCharCode(o[a]);n.push(r)}else if("Blob"===t(e)||"File"===t(e)){if(!s)throw new c("NOT_READABLE_ERR");var l=new s;n.push(l.readAsBinaryString(e))}else e instanceof i?"base64"===e.encoding&&g?n.push(g(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},o.getBlob=function(e){return arguments.length||(e=null),new i(this.data.join(""),e,"raw")},o.toString=function(){return"[object BlobBuilder]"},a.slice=function(e,t,n){var r=arguments.length;return r<3&&(n=null),new i(this.data.slice(e,r>1?t:this.data.length),n,this.encoding)},a.toString=function(){return"[object Blob]"},a.close=function(){this.size=0,delete this.data},r}();e.Blob=function(e,n){var r=n&&n.type||"",i=new t;if(e)for(var o=0,a=e.length;o<a;o++)Uint8Array&&e[o]instanceof Uint8Array?i.append(e[o].buffer):i.append(e[o]);var s=i.getBlob(r);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var r=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=r(new e.Blob)})?r.apply(t,i):r)||(e.exports=o)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0!==n&&n||this.content||this)}).call(this,n(20))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function c(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,c=n.locator,h=n.xmlns||{},d=/\/x?html?$/.test(t),p=d?u.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&o.setDocumentLocator(c),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,c),r.domBuilder=n.domBuilder||o,d&&(h[""]="http://www.w3.org/1999/xhtml"),h.xml=h.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,h,p):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new h).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;c(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u<s;u++){e=r.getURI(u);var l=r.getValue(u),h=(n=r.getQName(u),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(u),h),h.value=h.nodeValue=l,a.setAttributeNode(h)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),c(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var u=n(22),l=n(23).XMLReader,h=t.DOMImplementation=n(3).DOMImplementation;t.XMLSerializer=n(3).XMLSerializer,t.DOMParser=r},function(e,t){t.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,c=0;;){var u=e.charAt(s);switch(u){case"=":if(1===c)a=e.slice(t,s),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');l=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,l,t),o.warning('attribute "'+a+'" missed start quot('+u+")!!"),t=s+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,s)),s;case">":switch(c){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=e.slice(t,s)).slice(-1)&&(n.closed=!0,l=l.slice(0,-1));case 2:2===c&&(l=a),4==c?(o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),n.add(l,l,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":u=" ";default:if(u<=" ")switch(c){case 0:n.setTagName(e.slice(t,s)),c=6;break;case 1:a=e.slice(t,s),c=2;break;case 4:var l=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),n.add(a,l,t);case 5:c=6}else switch(c){case 2:n.tagName,"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,c=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:c=1,t=s;break;case 3:c=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function c(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,c=a.value;if((p=s.indexOf(":"))>0)var u=a.prefix=s.slice(0,p),l=s.slice(p+1),d="xmlns"===u&&l;else l=s,u=null,d="xmlns"===s&&"";a.localName=l,!1!==d&&(null==i&&(i={},h(n,n={})),n[d]=i[d]=c,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,c))}for(o=e.length;o--;)(u=(a=e[o]).prefix)&&("xml"===u&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==u&&(a.uri=n[u||""]));var p;(p=r.indexOf(":"))>0?(u=e.prefix=r.slice(0,p),l=e.localName=r.slice(p+1)):(u=null,l=e.localName=r);var f=e.uri=n[u||""];if(t.startElement(f,l,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(f,l,r),i)for(u in i)t.endPrefixMapping(u)}function u(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function l(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function h(e,t){for(var n in e)t[n]=e[n]}function d(e,t,n,r){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=a>3&&/^public$/i.test(o[2][0])&&o[3][0],u=a>4&&o[4][0],l=o[a-1];return n.startDTD(s,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),u&&u.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}return-1}function p(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function f(e){}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),h(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function h(t){if(t>N){var n=e.substring(N,t).replace(/&#?\w+;/g,o);_&&m(N),r.characters(n,0,t-N),N=t}}function m(t,n){for(;t>=w&&(n=v.exec(e));)g=n.index,w=g+n[0].length,_.lineNumber++;_.columnNumber=t-g+1}for(var g=0,w=0,v=/.*(?:\r\n?|\n)|.*$/g,_=r.locator,y=[{currentNSMap:t}],b={},N=0;;){try{var E=e.indexOf("<",N);if(E<0){if(!e.substr(N).match(/^\s*$/)){var x=r.doc,C=x.createTextNode(e.substr(N));x.appendChild(C),r.currentElement=C}return}switch(E>N&&h(E),e.charAt(E+1)){case"/":var T=e.indexOf(">",E+3),S=e.substring(E+2,T),A=y.pop();T<0?(S=e.substring(E+2).replace(/[\s<].*/,""),i.error("end tag name: "+S+" is not complete:"+A.tagName),T=E+1+S.length):S.match(/\s</)&&(S=S.replace(/[\s<].*/,""),i.error("end tag name: "+S+" maybe not complete"),T=E+1+S.length);var D=A.localNSMap,I=A.tagName==S;if(I||A.tagName&&A.tagName.toLowerCase()==S.toLowerCase()){if(r.endElement(A.uri,A.localName,S),D)for(var R in D)r.endPrefixMapping(R);I||i.fatalError("end tag name: "+S+" is not match the current start tagName:"+A.tagName)}else y.push(A);T++;break;case"?":_&&m(E),T=p(e,E,r);break;case"!":_&&m(E),T=d(e,E,r,i);break;default:_&&m(E);var k=new f,L=y[y.length-1].currentNSMap,O=(T=s(e,E,k,L,o,i),k.length);if(!k.closed&&l(e,T,k.tagName,b)&&(k.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),_&&O){for(var M=a(_,{}),B=0;B<O;B++){var U=k[B];m(U.offset),U.locator=a(_,{})}r.locator=M,c(k,r,L)&&y.push(k),r.locator=_}else c(k,r,L)&&y.push(k);"http://www.w3.org/1999/xhtml"!==k.uri||k.closed?T++:T=u(e,T,k.tagName,o,r)}}catch(e){i.error("element parse error: "+e),T=-1}T>N?N=T:h(Math.max(E,N)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},f.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=o},function(e,t,n){const r=n(1),i=n(8),o=n(9),a=n(4),s=n(11),c=n(13),u=n(7),l=n(14);let h=new class extends u{constructor(){super(),this.readyState="complete",this.visibilityState="visible",this.documentElement=window,this.hidden=!1,this.style={},this.location=n(5),this.head=new r("head"),this.body=new r("body"),this.fonts=new l,this.scripts=[]}createElementNS(e,t,n){return this.createElement(t)}createElement(e){return"canvas"===e?new a:"audio"===e?new o:"img"===e?new i:"video"===e?new s:"script"===e?new c:new r(e)}getElementById(e){return e===mainCanvas.id||"canvas"===e?mainCanvas:new r(e)}getElementsByTagName(e){return"head"===e?[h.head]:"body"===e?[h.body]:"canvas"===e?[mainCanvas]:[new r(e)]}getElementsByName(e){return"head"===e?[h.head]:"body"===e?[h.body]:"canvas"===e?[mainCanvas]:[new r(e)]}querySelector(e){return"head"===e?h.head:"body"===e?h.body:"canvas"===e||e===`#${mainCanvas.id}`?mainCanvas:new r(e)}querySelectorAll(e){return"head"===e?[h.head]:"body"===e?[h.body]:"canvas"===e?[mainCanvas]:[new r(e)]}createTextNode(){return new r("text")}elementFromPoint(){return window.canvas}createEvent(e){return window[e]?new window[e]:null}};e.exports=h},function(e,t){e.exports=class{constructor(e,t,n,r){this.x=e||0,this.y=t||0,this.width=n||0,this.height=r||0,this.left=this.x,this.top=this.y,this.right=this.x+this.width,this.bottom=this.y+this.height}}},function(e,t){e.exports=class{constructor(){}get code(){return 1}get message(){return""}}},function(e,t){if(window.HTMLImageElement)e.exports=window.HTMLImageElement;else{const t=qg.createImage();e.exports=t.constructor}},function(e,t,n){const r=n(2);e.exports=class extends r{construct(){this.result=null}abort(){}readAsArrayBuffer(){}readAsDataURL(e){this.result="data:image/png;base64,"+window.btoa(e);var t=new Event("load");this.dispatchEvent(t)}readAsText(){}}},function(e,t){e.exports=class{constructor(e,t,n){this.family=e,this.source=t,this.descriptors=n,this._status="unloaded",this._loaded=new Promise(((e,t)=>{this._resolveCB=e,this._rejectCB=t}))}load(){}get status(){return this._status}get loaded(){return this._loaded}}},function(e,t,n){const r=n(0);e.exports=class extends r{constructor(e,t){super(e),this.touches=[],this.targetTouches=[],this.changedTouches=[]}}},function(e,t,n){const r=n(0);e.exports=class extends r{constructor(e,t){super(e),this._button=t.button,this._which=t.which,this._wheelDelta=t.wheelDelta,this._clientX=t.clientX,this._clientY=t.clientY,this._screenX=t.screenX,this._screenY=t.screenY,this._pageX=t.pageX,this._pageY=t.pageY}get button(){return this._button}get which(){return this._which}get wheelDelta(){return this._wheelDelta}get clientX(){return this._clientX}get clientY(){return this._clientY}get screenX(){return this._screenX}get screenY(){return this._screenY}get pageX(){return this._pageX}get pageY(){return this._pageY}}},function(e,t,n){const r=n(0),i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"("};var o=!1;e.exports=class extends r{constructor(e,t){super(e),"object"==typeof t?(this._altKeyActive=!!t.altKey&&t.altKey,this._ctrlKeyActive=!!t.ctrlKey&&t.ctrlKey,this._metaKeyActive=!!t.metaKey&&t.metaKey,this._shiftKeyActive=!!t.shiftKey&&t.shiftKey,this._keyCode=t.keyCode?t.keyCode:-1,this._repeat=!!t.repeat&&t.repeat):(this._altKeyActive=!1,this._ctrlKeyActive=!1,this._metaKeyActive=!1,this._shiftKeyActive=!1,this._keyCode=-1,this._repeat=!1);var n=this._keyCode;if(n>=48&&n<=57){var r=n-48;this._code="Digit"+r,this._key=this._shiftKeyActive?i[n]:""+r}else if(n>=10048&&n<=10057)r=(n=this._keyCode=n-1e4)-48,this._code="Numpad"+r,this._key=""+r;else if(n>=65&&n<=90){var a=String.fromCharCode(n);this._code="Key"+a,this._key=this._shiftKeyActive||o?a:a.toLowerCase()}else n>=112&&n<=123?this._code=this._key="F"+(n-111):27===n?this._code=this._key="Escape":189===n?(this._code="Minus",this._key=this._shiftKeyActive?"_":"-"):187===n?(this._code="Equal",this._key=this._shiftKeyActive?"+":"="):220===n?(this._code="Backslash",this._key=this._shiftKeyActive?"|":"\\"):192===n?(this._code="Backquote",this._key=this._shiftKeyActive?"~":"`"):8===n?this._code=this._key="Backspace":13===n?this._code=this._key="Enter":219===n?(this._code="BracketLeft",this._key=this._shiftKeyActive?"{":"["):221===n?(this._code="BracketRight",this._key=this._shiftKeyActive?"}":"]"):186===n?(this._code="Semicolon",this._key=this._shiftKeyActive?":":";"):222===n?(this._code="Quote",this._key=this._shiftKeyActive?'"':"'"):9===n?this._code=this._key="Tab":17===n?(this._code="ControlLeft",this._key="Control"):20017===n?(this._keyCode=17,this._code="ControlRight",this._key="Control"):16===n?(this._code="ShiftLeft",this._key="Shift"):20016===n?(this._keyCode=16,this._code="ShiftRight",this._key="Shift"):18===n?(this._code="AltLeft",this._key="Alt"):20018===n?(this._keyCode=18,this._code="AltRight",this._key="Alt"):91===n?(this._code="MetaLeft",this._key="Meta"):93===n?(this._code="MetaRight",this._key="Meta"):37===n?this._code=this._key="ArrowLeft":38===n?this._code=this._key="ArrowUp":39===n?this._code=this._key="ArrowRight":40===n?this._code=this._key="ArrowDown":20093===n?(this._keyCode=93,this._code=this._key="ContextMenu"):20013===n?(this._keyCode=13,this._code="NumpadEnter",this._key="Enter"):107===n?(this._code="NumpadAdd",this._key="+"):109===n?(this._code="NumpadSubtract",this._key="-"):106===n?(this._code="NumpadMultiply",this._key="*"):111===n?(this._code="NumpadDivide",this._key="/"):12===n?(this._code="NumLock",this._key="Clear"):124===n?this._code=this._key="F13":36===n?this._code=this._key="Home":33===n?this._code=this._key="PageUp":34===n?this._code=this._key="PageDown":35===n?this._code=this._key="End":188===n?(this._code="Comma",this._key=this._shiftKeyActive?"<":","):190===n?(this._code="Period",this._key=this._shiftKeyActive?">":"."):191===n?(this._code="Slash",this._key=this._shiftKeyActive?"?":"/"):32===n?(this._code="Space",this._key=" "):46===n?this._code=this._key="Delete":110===n?(this._code="NumpadDecimal",this._key="."):20===n?(this._code=this._key="CapsLock","keyup"===e&&(o=!o)):console.log("Unknown keyCode: "+this._keyCode)}getModifierState(){return!1}get altKey(){return this._altKeyActive}get code(){return this._code}get ctrlKey(){return this._ctrlKeyActive}get isComposing(){return!1}get key(){return this._key}get keyCode(){return this._keyCode}get location(){return 0}get metaKey(){return this._metaKeyActive}get repeat(){return this._repeat}get shiftKey(){return this._shiftKeyActive}}},function(e,t,n){const r=n(0);e.exports=class extends r{constructor(e){super("devicemotion"),e?(this._acceleration=e.acceleration?e.acceleration:{x:0,y:0,z:0},this._accelerationIncludingGravity=e.accelerationIncludingGravity?e.accelerationIncludingGravity:{x:0,y:0,z:0},this._rotationRate=e.rotationRate?e.rotationRate:{alpha:0,beta:0,gamma:0},this._interval=e.interval):(this._acceleration={x:0,y:0,z:0},this._accelerationIncludingGravity={x:0,y:0,z:0},this._rotationRate={alpha:0,beta:0,gamma:0},this._interval=0)}get acceleration(){return this._acceleration}get accelerationIncludingGravity(){return