-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtkml.server.js
2 lines (2 loc) · 85.1 KB
/
tkml.server.js
1
2
/*! For license information please see tkml.server.js.LICENSE.txt */
(()=>{var t={43:(t,e,n)=>{!function(t){t.parser=function(t,e){return new o(t,e)},t.SAXParser=o,t.SAXStream=a,t.createStream=function(t,e){return new a(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function o(e,n){if(!(this instanceof o))return new o(e,n);var i=this;!function(t){for(var e=0,n=r.length;e<n;e++)t[r[e]]=""}(i),i.q=i.c="",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.opt=n||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=C.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(d)),void 0===i.opt.unquotedAttributeValues&&(i.opt.unquotedAttributeValues=!e),i.trackPosition=!1!==i.opt.position,i.trackPosition&&(i.position=i.line=i.column=0),A(i,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),o.prototype={end:function(){S(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return P(n,"Cannot write after close. Assign an onready handler.");if(null===e)return S(n);"object"==typeof e&&(e=e.toString());for(var o=0,i="";i=j(e,o++),n.c=i,i;)switch(n.trackPosition&&(n.position++,"\n"===i?(n.line++,n.column=0):n.column++),n.state){case C.BEGIN:if(n.state=C.BEGIN_WHITESPACE,"\ufeff"===i)continue;M(n,i);continue;case C.BEGIN_WHITESPACE:M(n,i);continue;case C.TEXT:if(n.sawRoot&&!n.closedRoot){for(var a=o-1;i&&"<"!==i&&"&"!==i;)(i=j(e,o++))&&n.trackPosition&&(n.position++,"\n"===i?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(a,o-1)}"<"!==i||n.sawRoot&&n.closedRoot&&!n.strict?(g(i)||n.sawRoot&&!n.closedRoot||L(n,"Text data outside of root node."),"&"===i?n.state=C.TEXT_ENTITY:n.textNode+=i):(n.state=C.OPEN_WAKA,n.startTagPosition=n.position);continue;case C.SCRIPT:"<"===i?n.state=C.SCRIPT_ENDING:n.script+=i;continue;case C.SCRIPT_ENDING:"/"===i?n.state=C.CLOSE_TAG:(n.script+="<"+i,n.state=C.SCRIPT);continue;case C.OPEN_WAKA:if("!"===i)n.state=C.SGML_DECL,n.sgmlDecl="";else if(g(i));else if(y(h,i))n.state=C.OPEN_TAG,n.tagName=i;else if("/"===i)n.state=C.CLOSE_TAG,n.tagName="";else if("?"===i)n.state=C.PROC_INST,n.procInstName=n.procInstBody="";else{if(L(n,"Unencoded <"),n.startTagPosition+1<n.position){var u=n.position-n.startTagPosition;i=new Array(u).join(" ")+i}n.textNode+="<"+i,n.state=C.TEXT}continue;case C.SGML_DECL:if(n.sgmlDecl+i==="--"){n.state=C.COMMENT,n.comment="",n.sgmlDecl="";continue}n.doctype&&!0!==n.doctype&&n.sgmlDecl?(n.state=C.DOCTYPE_DTD,n.doctype+="<!"+n.sgmlDecl+i,n.sgmlDecl=""):(n.sgmlDecl+i).toUpperCase()===s?(x(n,"onopencdata"),n.state=C.CDATA,n.sgmlDecl="",n.cdata=""):(n.sgmlDecl+i).toUpperCase()===c?(n.state=C.DOCTYPE,(n.doctype||n.sawRoot)&&L(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===i?(x(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=C.TEXT):m(i)?(n.state=C.SGML_DECL_QUOTED,n.sgmlDecl+=i):n.sgmlDecl+=i;continue;case C.SGML_DECL_QUOTED:i===n.q&&(n.state=C.SGML_DECL,n.q=""),n.sgmlDecl+=i;continue;case C.DOCTYPE:">"===i?(n.state=C.TEXT,x(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=i,"["===i?n.state=C.DOCTYPE_DTD:m(i)&&(n.state=C.DOCTYPE_QUOTED,n.q=i));continue;case C.DOCTYPE_QUOTED:n.doctype+=i,i===n.q&&(n.q="",n.state=C.DOCTYPE);continue;case C.DOCTYPE_DTD:"]"===i?(n.doctype+=i,n.state=C.DOCTYPE):"<"===i?(n.state=C.OPEN_WAKA,n.startTagPosition=n.position):m(i)?(n.doctype+=i,n.state=C.DOCTYPE_DTD_QUOTED,n.q=i):n.doctype+=i;continue;case C.DOCTYPE_DTD_QUOTED:n.doctype+=i,i===n.q&&(n.state=C.DOCTYPE_DTD,n.q="");continue;case C.COMMENT:"-"===i?n.state=C.COMMENT_ENDING:n.comment+=i;continue;case C.COMMENT_ENDING:"-"===i?(n.state=C.COMMENT_ENDED,n.comment=O(n.opt,n.comment),n.comment&&x(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+i,n.state=C.COMMENT);continue;case C.COMMENT_ENDED:">"!==i?(L(n,"Malformed comment"),n.comment+="--"+i,n.state=C.COMMENT):n.doctype&&!0!==n.doctype?n.state=C.DOCTYPE_DTD:n.state=C.TEXT;continue;case C.CDATA:"]"===i?n.state=C.CDATA_ENDING:n.cdata+=i;continue;case C.CDATA_ENDING:"]"===i?n.state=C.CDATA_ENDING_2:(n.cdata+="]"+i,n.state=C.CDATA);continue;case C.CDATA_ENDING_2:">"===i?(n.cdata&&x(n,"oncdata",n.cdata),x(n,"onclosecdata"),n.cdata="",n.state=C.TEXT):"]"===i?n.cdata+="]":(n.cdata+="]]"+i,n.state=C.CDATA);continue;case C.PROC_INST:"?"===i?n.state=C.PROC_INST_ENDING:g(i)?n.state=C.PROC_INST_BODY:n.procInstName+=i;continue;case C.PROC_INST_BODY:if(!n.procInstBody&&g(i))continue;"?"===i?n.state=C.PROC_INST_ENDING:n.procInstBody+=i;continue;case C.PROC_INST_ENDING:">"===i?(x(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=C.TEXT):(n.procInstBody+="?"+i,n.state=C.PROC_INST_BODY);continue;case C.OPEN_TAG:y(p,i)?n.tagName+=i:(k(n),">"===i?F(n):"/"===i?n.state=C.OPEN_TAG_SLASH:(g(i)||L(n,"Invalid character in tag name"),n.state=C.ATTRIB));continue;case C.OPEN_TAG_SLASH:">"===i?(F(n,!0),U(n)):(L(n,"Forward-slash in opening tag not followed by >"),n.state=C.ATTRIB);continue;case C.ATTRIB:if(g(i))continue;">"===i?F(n):"/"===i?n.state=C.OPEN_TAG_SLASH:y(h,i)?(n.attribName=i,n.attribValue="",n.state=C.ATTRIB_NAME):L(n,"Invalid attribute name");continue;case C.ATTRIB_NAME:"="===i?n.state=C.ATTRIB_VALUE:">"===i?(L(n,"Attribute without value"),n.attribValue=n.attribName,D(n),F(n)):g(i)?n.state=C.ATTRIB_NAME_SAW_WHITE:y(p,i)?n.attribName+=i:L(n,"Invalid attribute name");continue;case C.ATTRIB_NAME_SAW_WHITE:if("="===i)n.state=C.ATTRIB_VALUE;else{if(g(i))continue;L(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",x(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===i?F(n):y(h,i)?(n.attribName=i,n.state=C.ATTRIB_NAME):(L(n,"Invalid attribute name"),n.state=C.ATTRIB)}continue;case C.ATTRIB_VALUE:if(g(i))continue;m(i)?(n.q=i,n.state=C.ATTRIB_VALUE_QUOTED):(n.opt.unquotedAttributeValues||P(n,"Unquoted attribute value"),n.state=C.ATTRIB_VALUE_UNQUOTED,n.attribValue=i);continue;case C.ATTRIB_VALUE_QUOTED:if(i!==n.q){"&"===i?n.state=C.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=i;continue}D(n),n.q="",n.state=C.ATTRIB_VALUE_CLOSED;continue;case C.ATTRIB_VALUE_CLOSED:g(i)?n.state=C.ATTRIB:">"===i?F(n):"/"===i?n.state=C.OPEN_TAG_SLASH:y(h,i)?(L(n,"No whitespace between attributes"),n.attribName=i,n.attribValue="",n.state=C.ATTRIB_NAME):L(n,"Invalid attribute name");continue;case C.ATTRIB_VALUE_UNQUOTED:if(!b(i)){"&"===i?n.state=C.ATTRIB_VALUE_ENTITY_U:n.attribValue+=i;continue}D(n),">"===i?F(n):n.state=C.ATTRIB;continue;case C.CLOSE_TAG:if(n.tagName)">"===i?U(n):y(p,i)?n.tagName+=i:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=C.SCRIPT):(g(i)||L(n,"Invalid tagname in closing tag"),n.state=C.CLOSE_TAG_SAW_WHITE);else{if(g(i))continue;T(h,i)?n.script?(n.script+="</"+i,n.state=C.SCRIPT):L(n,"Invalid tagname in closing tag."):n.tagName=i}continue;case C.CLOSE_TAG_SAW_WHITE:if(g(i))continue;">"===i?U(n):L(n,"Invalid characters in closing tag");continue;case C.TEXT_ENTITY:case C.ATTRIB_VALUE_ENTITY_Q:case C.ATTRIB_VALUE_ENTITY_U:var l,d;switch(n.state){case C.TEXT_ENTITY:l=C.TEXT,d="textNode";break;case C.ATTRIB_VALUE_ENTITY_Q:l=C.ATTRIB_VALUE_QUOTED,d="attribValue";break;case C.ATTRIB_VALUE_ENTITY_U:l=C.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===i){var w=R(n);n.opt.unparsedEntities&&!Object.values(t.XML_ENTITIES).includes(w)?(n.entity="",n.state=l,n.write(w)):(n[d]+=w,n.entity="",n.state=l)}else y(n.entity.length?v:f,i)?n.entity+=i:(L(n,"Invalid character in entity name"),n[d]+="&"+n.entity+i,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),o=0,i=0,a=r.length;i<a;i++){var s=e[r[i]].length;if(s>n)switch(r[i]){case"textNode":N(e);break;case"cdata":x(e,"oncdata",e.cdata),e.cdata="";break;case"script":x(e,"onscript",e.script),e.script="";break;default:P(e,"Max buffer length exceeded: "+r[i])}o=Math.max(o,s)}var c=t.MAX_BUFFER_LENGTH-o;e.bufferCheckPosition=c+e.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;N(t=this),""!==t.cdata&&(x(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(x(t,"onscript",t.script),t.script="")}};try{e=n(203).Stream}catch(t){e=function(){}}e||(e=function(){});var i=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function a(t,n){if(!(this instanceof a))return new a(t,n);e.apply(this),this._parser=new o(t,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,i.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(e.prototype,{constructor:{value:a}}),a.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=n(193).StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},a.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},a.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===i.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="[CDATA[",c="DOCTYPE",u="http://www.w3.org/XML/1998/namespace",l="http://www.w3.org/2000/xmlns/",d={xml:u,xmlns:l},h=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,f=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function g(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function m(t){return'"'===t||"'"===t}function b(t){return">"===t||g(t)}function y(t,e){return t.test(e)}function T(t,e){return!y(t,e)}var w,E,_,C=0;for(var I in t.STATE={BEGIN:C++,BEGIN_WHITESPACE:C++,TEXT:C++,TEXT_ENTITY:C++,OPEN_WAKA:C++,SGML_DECL:C++,SGML_DECL_QUOTED:C++,DOCTYPE:C++,DOCTYPE_QUOTED:C++,DOCTYPE_DTD:C++,DOCTYPE_DTD_QUOTED:C++,COMMENT_STARTING:C++,COMMENT:C++,COMMENT_ENDING:C++,COMMENT_ENDED:C++,CDATA:C++,CDATA_ENDING:C++,CDATA_ENDING_2:C++,PROC_INST:C++,PROC_INST_BODY:C++,PROC_INST_ENDING:C++,OPEN_TAG:C++,OPEN_TAG_SLASH:C++,ATTRIB:C++,ATTRIB_NAME:C++,ATTRIB_NAME_SAW_WHITE:C++,ATTRIB_VALUE:C++,ATTRIB_VALUE_QUOTED:C++,ATTRIB_VALUE_CLOSED:C++,ATTRIB_VALUE_UNQUOTED:C++,ATTRIB_VALUE_ENTITY_Q:C++,ATTRIB_VALUE_ENTITY_U:C++,CLOSE_TAG:C++,CLOSE_TAG_SAW_WHITE:C++,SCRIPT:C++,SCRIPT_ENDING:C++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[I]]=I;function A(t,e,n){t[e]&&t[e](n)}function x(t,e,n){t.textNode&&N(t),A(t,e,n)}function N(t){t.textNode=O(t.opt,t.textNode),t.textNode&&A(t,"ontext",t.textNode),t.textNode=""}function O(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function P(t,e){return N(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,A(t,"onerror",e),t}function S(t){return t.sawRoot&&!t.closedRoot&&L(t,"Unclosed root tag"),t.state!==C.BEGIN&&t.state!==C.BEGIN_WHITESPACE&&t.state!==C.TEXT&&P(t,"Unexpected end"),N(t),t.c="",t.closed=!0,A(t,"onend"),o.call(t,t.strict,t.opt),t}function L(t,e){if("object"!=typeof t||!(t instanceof o))throw new Error("bad call to strictFail");t.strict&&P(t,e)}function k(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,x(t,"onopentagstart",n)}function B(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],o=n[1];return e&&"xmlns"===t&&(r="xmlns",o=""),{prefix:r,local:o}}function D(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=B(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==u)L(t,"xml: prefix must be bound to "+u+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==l)L(t,"xmlns: prefix must be bound to "+l+"\nActual: "+t.attribValue);else{var o=t.tag,i=t.tags[t.tags.length-1]||t;o.ns===i.ns&&(o.ns=Object.create(i.ns)),o.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,x(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function F(t,e){if(t.opt.xmlns){var n=t.tag,r=B(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(L(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var o=t.tags[t.tags.length-1]||t;n.ns&&o.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){x(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var i=0,a=t.attribList.length;i<a;i++){var s=t.attribList[i],c=s[0],u=s[1],l=B(c,!0),d=l.prefix,h=l.local,p=""===d?"":n.ns[d]||"",f={name:c,value:u,prefix:d,local:h,uri:p};d&&"xmlns"!==d&&!p&&(L(t,"Unbound namespace prefix: "+JSON.stringify(d)),f.uri=d),t.tag.attributes[c]=f,x(t,"onattribute",f)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),x(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=C.TEXT:t.state=C.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function U(t){if(!t.tagName)return L(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=C.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=C.SCRIPT);x(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)L(t,"Unexpected close tag");if(e<0)return L(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=C.TEXT);t.tagName=n;for(var o=t.tags.length;o-- >e;){var i=t.tag=t.tags.pop();t.tagName=t.tag.name,x(t,"onclosetag",t.tagName);var a={};for(var s in i.ns)a[s]=i.ns[s];var c=t.tags[t.tags.length-1]||t;t.opt.xmlns&&i.ns!==c.ns&&Object.keys(i.ns).forEach((function(e){var n=i.ns[e];x(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=C.TEXT}function R(t){var e,n=t.entity,r=n.toLowerCase(),o="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||o.toLowerCase()!==n?(L(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function M(t,e){"<"===e?(t.state=C.OPEN_WAKA,t.startTagPosition=t.position):g(e)||(L(t,"Non-whitespace before first tag."),t.textNode=e,t.state=C.TEXT)}function j(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}C=t.STATE,String.fromCodePoint||(w=String.fromCharCode,E=Math.floor,_=function(){var t,e,n=[],r=-1,o=arguments.length;if(!o)return"";for(var i="";++r<o;){var a=Number(arguments[r]);if(!isFinite(a)||a<0||a>1114111||E(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,n.push(t,e)),(r+1===o||n.length>16384)&&(i+=w.apply(null,n),n.length=0)}return i},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_,configurable:!0,writable:!0}):String.fromCodePoint=_)}(e)},358:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.A=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="a",e}return o(e,t),e.prototype.renderChildren=function(t){return this.renderText(t)},e.prototype.render=function(){var t,e,n=this,r=this.getAttributes();if(void 0!==this.attributes.external&&this.attributes.href){var o=this.attributes.href,i=this.attributes.target?' target="'.concat((0,a.safeAttr)(this.attributes.target),'"'):"";r+=' href="'.concat((0,a.safeAttr)(o),'"').concat(i)}else if(this.attributes.post){var s=(0,a.safeAttr)(this.attributes.post);o=this.attributes.href?(0,a.encodeUrl)(this.attributes.href):"",i=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"",r+=' onclick="event.preventDefault(); tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).loadPost('").concat(o,"', '").concat(s,"'").concat(i,')"'),this.attributes.href&&(r+=' href="javascript:void(0);"')}else this.attributes.href&&(o=(0,a.encodeUrl)(this.attributes.href),i=this.attributes.target?", true, '".concat((0,a.safeIds)(this.attributes.target),"'"):"",r+=' onclick="event.preventDefault(); tkmlr('.concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),").loader(this).go('").concat(o,"'").concat(i,')"'),r+=' href="javascript:void(0);"',void 0!==this.attributes.preload&&"false"!==this.attributes.preload&&setTimeout((function(){var t;return null===(t=n.runtime)||void 0===t?void 0:t.preload(n.attributes.href)}),0));return"<a".concat(r,">").concat(this.childs(),"</a>")},e}(i.BaseComponent);e.A=s,i.ComponentFactory.register(s)},792:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Bar=e.Tab=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="tab",e.canParent=["bar"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this,n=this.getAttributes(),r=this.getId(),o=void 0!==this.attributes.active||void 0!==this.attributes.selected,i=void 0!==this.attributes.disabled,s=this.attributes.icon||"",c="tab-".concat(r),u=o?" active":"",l=i?" disabled":"",d="";if(s){var h=(0,a.resolveUrl)(s,this.runtime);d='<img class="tab-icon" src="'.concat(h,'" alt="icon">')}if(this.attributes.href&&!i){var p=(0,a.encodeUrl)(this.attributes.href),f=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"";n+=' onclick="tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(p,"'").concat(f,'); return false;"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=e.runtime)||void 0===t?void 0:t.preload(e.attributes.href)}),0)}return'\n <div id="'.concat(c,'" class="tab').concat(u).concat(l,'"').concat(n,">\n ").concat(d,'\n <span class="tab-text">').concat(this.childs(),"</span>\n </div>\n ")},e}(i.BaseComponent);e.Tab=s;var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="bar",e.canParent=["tkml"],e}return o(e,t),e.prototype.render=function(){var t=this,e=this.getAttributes(),n=this.getId(),r="bar-".concat(n);return this.runtime&&(this.runtime.isBrowser&&setTimeout((function(){var e;null===(e=t.runtime)||void 0===e||e.initializeTabBar(r)}),0),this.runtime.isServer&&this.runtime.onload.push("\n (function() {\n const barId = '".concat(r,"';\n tkmlr(").concat(this.runtime.getId(),").initializeTabBar(barId);\n })();\n "))),'\n <div id="'.concat(r,'" class="tab-bar"').concat(e,'>\n <div class="tab-bar-content">\n ').concat(this.childs(),"\n </div>\n </div>\n ")},e}(i.BaseComponent);e.Bar=c,i.ComponentFactory.register(s),i.ComponentFactory.register(c)},393:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="button",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e,n=this,r=this.getAttributes(),o="",i="secondary"===this.attributes.type?" secondary":"";if(this.attributes.width){var s=this.attributes.width;o=' style="width: '.concat(s.match(/^\d+$/)?s+"px":s,'"')}if(void 0!==this.attributes.external&&this.attributes.href){var c=this.attributes.href,u=this.attributes.target?' target="'.concat((0,a.safeAttr)(this.attributes.target),'"'):"";return'<a href="'.concat((0,a.safeAttr)(c),'"').concat(u,' class="button').concat(i,'"').concat(r).concat(o,">").concat(this.childs(),"</a>")}if(this.attributes.post){var l=(0,a.safeAttr)(this.attributes.post);c=void 0,c="href"in this.attributes?"'"+(0,a.encodeUrl)(this.attributes.href)+"'":"null",u=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"";var d=this.attributes.required?".validateFields('".concat((0,a.safeIds)(this.attributes.required),"')"):"";r+=' onclick="tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),")").concat(d,".loader(this).loadPost(").concat(c,", '").concat(l,"'").concat(u,')"')}else this.attributes.href&&(c=(0,a.encodeUrl)(this.attributes.href),u=this.attributes.target?", true, '".concat((0,a.safeIds)(this.attributes.target),"'"):"",d=this.attributes.required?".validateFields('".concat((0,a.safeIds)(this.attributes.required),"')"):"",r+=' onclick="tkmlr('.concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),")").concat(d,".loader(this).go('").concat(c,"'").concat(u,')"'),void 0!==this.attributes.preload&&"false"!==this.attributes.preload&&setTimeout((function(){var t;return null===(t=n.runtime)||void 0===t?void 0:t.preload(n.attributes.href)}),0));return'<button class="button'.concat(i,'"').concat(r).concat(o,">").concat(this.childs(),"</button>")},e}(i.BaseComponent);e.Button=s,i.ComponentFactory.register(s)},512:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Dropdown=e.Option=e.Search=void 0;var i=n(785),a=n(746),s=n(785),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="search",e.canParent=["dropdown"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){return""},e}(i.BaseComponent);e.Search=c,i.ComponentFactory.register(c);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="option",e.canParent=["dropdown"],e}return o(e,t),e.prototype.addHrefAttributes=function(t){var e,n=this;if(void 0!==this.attributes.disabled)return t;if(this.attributes.href){var r=(0,a.encodeUrl)(this.attributes.href),o=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"";t+=' onclick="event.stopPropagation(); tkmlr('.concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),").loader(this).go('").concat(r,"'").concat(o,'); return false;"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=n.runtime)||void 0===t?void 0:t.preload(n.attributes.href)}),0)}return t},e.prototype.checkForImage=function(){this.hasImage=this.children.some((function(t){return"img"===t.tag}))},e.prototype.render=function(){this.checkForImage();var t=this.getAttributes(),e=this.attributes.value||"",n=this.childs(),r=void 0!==this.attributes.selected;e&&(t+=' value="'.concat((0,a.safeAttr)(e),'"')),r&&(t+=" selected");var o=this.getCommonClasses(),i=o.clickableClass,s=o.disabledClass,c=o.imageClass,u=r?" selected":"";t=this.addHrefAttributes(t);var l="";if(this.attributes.icon){var d=(0,a.resolveUrl)(this.attributes.icon,this.runtime);l='<img class="option-icon" src="'.concat(d,'" alt="icon"/>')}var h="",p="";if(this.hasImage){var f=this.children.find((function(t){return"img"===t.tag}));f&&(h=f.render(),p=this.children.filter((function(t){return"img"!==t.tag})).map((function(t){return t.render()})).join(""))}else p=n;return'\n <div class="option'.concat(i).concat(s).concat(c).concat(u,'"').concat(t,">\n ").concat(this.hasImage?'<div class="option-img">'.concat(h,"</div>"):l||"",'\n <div class="option-content">').concat(p,"</div>\n ").concat(this.hasImage&&l?'<div class="option-right-icon">'.concat(l,"</div>"):"","\n </div>\n ")},e}(s.Section);e.Option=u;var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="dropdown",e.canParent=["tkml"],e}return o(e,t),e.prototype.render=function(){var t=this,e=this.getAttributes(),n=this.getId(),r=this.attributes.name||"",o=this.attributes.placeholder||"Select an option",i=void 0!==this.attributes.disabled,s=this.children.find((function(t){return"search"===t.tag})),c=!!s,u="Search...";if(s){var l=s;u=l.children.length>0?l.children.map((function(t){return t.render()})).join(""):"Search..."}var d=this.children.filter((function(t){return"search"!==t.tag}));this.children=d;for(var h=this.attributes.value||"",p=o,f="",v="",g=!1,m=0,b=this.children;m<b.length;m++){var y=b[m];if("option"===y.tag&&y.attributes){var T=y.attributes;if(void 0!==T.selected){if(h=T.value||T.text||y.childs(),p=y.childs(),y.hasImage){var w=y.children.find((function(t){return"img"===t.tag}));if(w&&(f='<div class="dropdown-selected-img">'.concat(w.render(),"</div>")),T.icon){var E=(0,a.resolveUrl)(T.icon,this.runtime);v='<img class="dropdown-selected-right-icon" src="'.concat(E,'" alt="icon"/>'),g=!0}}else T.icon&&(E=(0,a.resolveUrl)(T.icon,this.runtime),v='<img class="dropdown-selected-icon" src="'.concat(E,'" alt="icon"/>'));break}}}var _="dropdown-".concat(n),C="dropdown-search-".concat(n),I="";if(this.attributes.href&&!i){var A=(0,a.encodeUrl)(this.attributes.href);I=' data-href="'.concat((0,a.safeAttr)(A),'"')}var x=i?" disabled":"";i&&(e+=" disabled");var N=c?" searchable":"";c&&(e+=' data-search="true" data-search-placeholder="'.concat((0,a.safeAttr)(u),'"')),this.runtime&&!i&&(this.runtime.isBrowser&&setTimeout((function(){var e;null===(e=t.runtime)||void 0===e||e.initializeDropdown(_)}),0),this.runtime.isServer&&this.runtime.onload.push("\n (function() {\n const dropdownId = '".concat(_,"';\n tkmlr(").concat(this.runtime.getId(),").initializeDropdown(dropdownId);\n })();\n ")));var O=this.childs(),P=c?'\n <div class="dropdown-search">\n <svg class="dropdown-search-icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M21 21L16.65 16.65" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n <input id="'.concat(C,'" type="text" class="dropdown-search-input" placeholder="').concat((0,a.safeAttr)(u),'">\n <button class="dropdown-search-clear" type="button">\n <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M18 6L6 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n </div>\n '):"";return'\n <div id="'.concat(_,'" class="dropdown').concat(x).concat(N,'"').concat(I," ").concat(e,'>\n <input type="hidden" name="').concat((0,a.safeAttr)(r),'" value="').concat((0,a.safeAttr)(h),'"').concat(i?" disabled":"",'>\n <div class="dropdown-toggle">\n ').concat(f,"\n ").concat(!g&&v?v:"",'\n <span class="dropdown-display">').concat(p,"</span>\n ").concat(g?v:"",'\n <svg class="dropdown-arrow" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M2 4L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <div class="dropdown-menu">\n ').concat(P,'\n <div class="dropdown-options">\n ').concat(O,'\n </div>\n <div class="dropdown-no-results" style="display: none;">No results found</div>\n </div>\n </div>\n ')},e}(i.BaseComponent);e.Dropdown=l,i.ComponentFactory.register(u),i.ComponentFactory.register(l)},758:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Footer=void 0;var i=n(785),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="footer",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this,e=this.getAttributes(),n=void 0!==this.attributes.autohide?" autohide":"",r=this.getId();return this.runtime&&setTimeout((function(){var e;null===(e=t.runtime)||void 0===e||e.observeFooter(r,void 0!==t.attributes.autohide)}),0),'<div id="'.concat(r,'" class="footer').concat(n,'"').concat(e,">").concat(this.childs(),"</div>")},e}(i.BaseComponent);e.Footer=a,i.ComponentFactory.register(a)},432:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Back=e.Header=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="header",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this,e=this.getAttributes(),n=void 0!==this.attributes.center?" center":"",r=this.getId();return setTimeout((function(){t.runtime&&!t.runtime.isServer&&t.runtime.observeHeader(r)}),0),'<div id="'.concat(r,'" class="header').concat(n,'"').concat(e,">").concat(this.childs(),"</div>")},e}(i.BaseComponent);e.Header=s,i.ComponentFactory.register(s);var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="back",e.canParent=["header"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e,n,r=this.getAttributes(),o=this.parent instanceof s,i=this.getId();this.attributes.href||(null===(t=this.runtime)||void 0===t?void 0:t.isServer)||setTimeout((function(){var t=document.getElementById(i);t&&!window.history.state&&window.history.length<=1&&(t.style.display="none")}),0);var c="";if(this.attributes.href){var u=(0,a.encodeUrl)(this.attributes.href),l=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"";c="tkmlr(".concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),").loader(this).go('").concat(u,"'").concat(l,")")}else c="tkmlr(".concat(null===(n=this.runtime)||void 0===n?void 0:n.getId(),").loader(this); history.back()");return o?'<div id="'.concat(i,'" class="header-back" onclick="').concat(c,'"></div>'):'<button id="'.concat(i,'" class="button back-button"').concat(r,' onclick="').concat(c,'">Back</button>')},e}(i.BaseComponent);e.Back=c,i.ComponentFactory.register(c)},466:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Img=void 0;var i=n(785),a=n(746),s=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="img",n.selfClosing=!0,n}return o(e,t),e.prototype.render=function(){var t=this.getAttributes(),e="",n=void 0!==this.attributes.circle?" circle":"";if(this.attributes.src){var r=(0,a.resolveUrl)(this.attributes.src,this.runtime);t+=' src="'.concat((0,a.safeAttr)(r),'"')}return this.attributes.alt&&(t+=' alt="'.concat((0,a.safeAttr)(this.attributes.alt),'"')),this.attributes.height&&(e=' style="--img-height: '.concat(parseInt(this.attributes.height),'px"')),this.parent&&"section"===this.parent.tag&&(this.parent.hasImage=!0),'<img class="img'.concat(n,'"').concat(t).concat(e,"/>")},e}(i.BaseComponent);e.Img=s,i.ComponentFactory.register(s)},785:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Msg=e.Textarea=e.Label=e.Bubble=e.Loader=e.Section=e.Checkbox=e.Info=e.Code=e.Input=e.List=e.Desc=e.Text=e.Alert=e.Title=e.Error=e.Undefined=e.Proxy=e.Root=e.ComponentFactory=e.BaseComponent=void 0;var i=n(746),a=function(){function t(t){this.children=[],this.parent=null,this.canParent=null,this.attributes=t||{},this.attributes.id&&(this.id=(0,i.safeIds)(this.attributes.id))}return t.prototype.addChild=function(t){this.children.push(t),t.runtime=this.runtime,t.parent=this},t.prototype.renderChildren=function(t){return t.map((function(t){return t.render()})).join("")},t.prototype.getId=function(){var e;return this.id||(this.id="".concat(this.tag,"-").concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),"-").concat(++t.counter)),this.id},t.prototype.renderText=function(e){return e.map((function(e){return e instanceof f?e.text:e instanceof t?e.renderText(e.children):""})).join("")},t.prototype.addRootPrefix=function(t){this.parent?this.parent.addRootPrefix(t):this.rootPrefix+=t},t.prototype.getWrappingElement=function(t){return t},t.prototype.getAttributes=function(){var t="";return this.id&&(t+=' id="'.concat(this.id,'"')),t},t.prototype.childs=function(){return this.renderChildren(this.children)},t.prototype.wrapChildrenInDivs=function(t,e,n){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];if(n&&"pill"===a.tag)o.push(a.render());else{if(a instanceof f){var s=a.render();if(""===s||""===s.replace(/[\s ]/g,""))continue}o.length>0&&(r.push('<div class="'.concat(e,"-item ").concat(e,'-group">').concat(o.join(""),"</div>")),o=[]),r.push('<div class="'.concat(e,"-item ").concat(e,"-").concat(a.tag,'">').concat(a.render(),"</div>"))}}return o.length>0&&r.push('<div class="'.concat(e,"-item ").concat(e,'-group">').concat(o.join(""),"</div>")),r.join("")},t.counter=0,t}();e.BaseComponent=a;var s=function(){function t(){}return t.register=function(t){var e=new t({});this.components.set(e.tag.toLowerCase(),t)},t.create=function(t,e,n,r){var o,i=this.components.get(t.toLowerCase());return i?(o=new i(e),i===u&&(o.tag=t),o.canParent&&r&&!o.canParent.includes(r.tag)&&(o=new d("Component <".concat(t,"> cannot be a child of <").concat(r.tag,">")))):o=new l(t,e),o.runtime=n,o},t.registerProxyComponent=function(t){var e=new u(t);e.tag=t,this.components.set(e.tag.toLowerCase(),u)},t.components=new Map,t}();e.ComponentFactory=s;var c=function(t){function e(){var e=t.call(this)||this;return e.tag="tkml",e.hasText=!0,e.rootPrefix="",e}return o(e,t),e.prototype.render=function(){var t=this.childs();return"".concat(this.rootPrefix,"\n ").concat(t)},e}(a);e.Root=c,s.register(c);var u=function(t){function e(e,n){var r=t.call(this,n)||this;return r.tag="undefined",r.hasText=!0,r.attributes=n||{},r}return o(e,t),e.prototype.render=function(){return"<".concat(this.tag,">").concat(this.childs(),"</").concat(this.tag,">")},e}(a);e.Proxy=u;var l=function(t){function e(e,n){var r=t.call(this,n)||this;return r.tag="undefined",r.name=(0,i.safeIds)(e),r}return o(e,t),e.prototype.render=function(){return'<div class="undefined"><div class="error">Undefined component: '.concat(this.name,"</div></div>")},e}(a);e.Undefined=l;var d=function(t){function e(e,n){var r=t.call(this,n)||this;return r.tag="error",r.error=(0,i.safeAttr)(e),r}return o(e,t),e.prototype.render=function(){return'<div class="panic"><div class="error">Error: '.concat(this.error,"</div></div>")},e}(a);e.Error=d;var h=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="title",n.canParent=["tkml","section","bubble","info"],n.hasText=!0,n}return o(e,t),e.prototype.render=function(){var t=this.getAttributes(),e=void 0!==this.attributes.center?" center":"";return'<div class="title'.concat(e,'"').concat(t,">").concat(this.childs(),"</div>")},e}(a);e.Title=h,s.register(h);var p=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="alert",n.hasText=!0,n}return o(e,t),e.prototype.renderChildren=function(t){return this.renderText(t)},e.prototype.render=function(){return'<div class="alert"'.concat(this.getAttributes(),">").concat(this.childs(),"</div>")},e}(a);e.Alert=p,s.register(p);var f=function(t){function e(e){var n=t.call(this)||this;return n.tag="text",n.text=e,n}return o(e,t),e.prototype.render=function(){return"".concat(this.text)},e}(a);e.Text=f;var v=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="desc",n.hasText=!0,n}return o(e,t),e.prototype.render=function(){var t=this.getAttributes(),e=void 0!==this.attributes.center?" center":"";return'<p class="desc'.concat(e,'"').concat(t,">").concat(this.childs(),"</p>")},e}(a);e.Desc=v,s.register(v);var g=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="list",n.canParent=["tkml"],n}return o(e,t),e.prototype.getWrappingElement=function(t){return t.parentNode},e.prototype.renderChildren=function(t){return this.wrapChildrenInDivs(t,"list")},e.prototype.render=function(){return'<div class="list"'.concat(this.getAttributes(),">").concat(this.childs(),"</div>")},e}(a);e.List=g,s.register(g);var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="input",e}return o(e,t),e.prototype.render=function(){var t,e=this.getAttributes();if(this.attributes.placeholder&&(e+=' placeholder="'.concat(this.attributes.placeholder,'"')),this.attributes.value&&(e+=' value="'.concat((0,i.safeAttr)(this.attributes.value),'"')),this.attributes.type&&(e+=' type="'.concat((0,i.safeAttr)(this.attributes.type),'"')),this.attributes.name&&(e+=' name="'.concat((0,i.safeAttr)(this.attributes.name),'"')),this.attributes.href){var n=(0,i.encodeUrl)(this.attributes.href),r=this.attributes.name||"input";e+=" onkeydown=\"if(event.key==='Enter'){tkmlr(".concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this.parentElement).post('").concat(n,"', {").concat((0,i.safeAttr)(r),': this.value})}"')}return'<div class="input-wrapper"><input class="input"'.concat(e,'/><div class="input-spinner"></div></div>')},e}(a);e.Input=m,s.register(m);var b=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="code",n.content="",n}return o(e,t),e.prototype.setContent=function(t){this.content=t},e.prototype.renderChildren=function(t){return this.renderText(t)},e.prototype.render=function(){var t=this.attributes.lang,e=this.content.trim(),n=this.getId();this.runtime&&(this.runtime.isBrowser?this.runtime.loadHighlightJs().then((function(){var r=document.getElementById(n);if(r){var o=t?window.hljs.highlight(e,{language:t}).value:window.hljs.highlightAuto(e).value;r.innerHTML=o}})):this.runtime.addOnload(this,"tkmlr(".concat(this.runtime.getId(),").loadHighlightJs().then(() => {\n window.hljs.highlightElement(document.getElementById('").concat(n,"'))\n })")));var r=t?" language-".concat((0,i.safeAttr)(t)):"";return'<pre class="code"><code class="hljs '.concat(r,'" id="').concat(n,'">').concat((0,i.safeAttr)(e),"</code></pre>")},e}(a);e.Code=b,s.register(b);var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="info",e.canParent=["tkml"],e}return o(e,t),e.prototype.renderChildren=function(t){return this.wrapChildrenInDivs(t,this.tag,!0)},e.prototype.render=function(){return'<div class="info"'.concat(this.getAttributes(),">").concat(this.childs(),"</div>")},e}(a);e.Info=y,s.register(y);var T=function(t){function e(e){var n=t.call(this,e)||this;return n.tag="checkbox",n.hasText=!0,n}return o(e,t),e.prototype.render=function(){var t,e=this,n=this.getAttributes();if(void 0!==this.attributes.external&&this.attributes.href){var r=this.attributes.href,o=this.attributes.target?' target="'.concat((0,i.safeAttr)(this.attributes.target),'"'):"",a=void 0!==this.attributes.checked,s=a?" checked":"",c=a?' checked="checked"':"";return n+=" onclick=\"this.classList.toggle('checked'); this.style.opacity='0.5';\"",'\n <a href="'.concat((0,i.safeAttr)(r),'"').concat(o,' class="checkbox').concat(s,'"').concat(c).concat(n,'>\n <div class="checkbox-label">').concat(this.childs(),'</div>\n <div class="checkbox-toggle">\n <div class="checkbox-slider"></div>\n </div>\n </a>\n ')}this.attributes.href?(r=(0,i.encodeUrl)(this.attributes.href),o=this.attributes.target?", '".concat((0,i.safeIds)(this.attributes.target),"'"):"",n+=" onclick=\"this.classList.toggle('checked'); this.style.opacity='0.5'; tkmlr(".concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(r,"', true").concat(o,')"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=e.runtime)||void 0===t?void 0:t.preload(e.attributes.href)}),0)):n+=" onclick=\"this.classList.toggle('checked')\"";var u=void 0!==this.attributes.checked,l=u?' checked="checked"':"";return'\n <div class="checkbox'.concat(u?" checked":"",'"').concat(l).concat(n,'>\n <div class="checkbox-label">').concat(this.childs(),'</div>\n <div class="checkbox-toggle">\n <div class="checkbox-slider"></div>\n </div>\n </div>\n ')},e}(a);e.Checkbox=T,s.register(T);var w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="section",e.canParent=["list","info","tkml"],e.hasImage=!1,e.hasText=!0,e}return o(e,t),e.prototype.getWrappingElement=function(t){return t.parentNode},e.prototype.getCommonClasses=function(){var t=void 0!==this.attributes.disabled;return{clickableClass:t?"":" clickable",disabledClass:t?" disabled":"",imageClass:this.hasImage?" with-image":""}},e.prototype.addHrefAttributes=function(t){var e,n,r=this;if(void 0!==this.attributes.disabled)return t;if(void 0!==this.attributes.external&&this.attributes.href)return t;if(this.attributes.href){var o=(0,i.encodeUrl)(this.attributes.href),a=this.attributes.target?", '".concat((0,i.safeIds)(this.attributes.target),"'"):"";t+=' onclick="tkmlr('.concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),").loader(this).go('").concat(o,"'").concat(a,')"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=r.runtime)||void 0===t?void 0:t.preload(r.attributes.href)}),0)}else null===(n=this.parent)||void 0===n||n.tag;return t},e.prototype.render=function(){var t=this.childs(),e=this.getAttributes(),n="",r=this.getCommonClasses(),o=r.clickableClass,a=r.disabledClass,s=r.imageClass;if(void 0!==this.attributes.external&&this.attributes.href){var c=this.attributes.href,u=this.attributes.target?' target="'.concat((0,i.safeAttr)(this.attributes.target),'"'):"";return'\n <a href="'.concat((0,i.safeAttr)(c),'"').concat(u,' class="section').concat(o).concat(a).concat(s,'"').concat(e,'>\n <div class="section-content">').concat(t,'</div>\n <div class="section-arrow"></div>\n </a>\n ')}if(e=this.addHrefAttributes(e),this.attributes.icon){var l=(0,i.resolveUrl)(this.attributes.icon,this.runtime);n='<img class="section-icon" src="'.concat(l,'" alt="icon"/>')}else this.attributes.href&&(n='<div class="section-arrow"></div>');return'\n <div class="section'.concat(o).concat(a).concat(s,'"').concat(e,'>\n <div class="section-content">').concat(t,"</div>\n ").concat(n,"\n </div>\n ")},e}(a);e.Section=w,s.register(w);var E=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="loader",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this,e=this.getId();return this.attributes.href&&setTimeout((function(){t.runtime&&t.runtime.observeLoader(t,t.attributes.href)}),0),'\n <div id="'.concat(e,'" class="loader">\n <div class="loader-spinner"></div>\n </div>\n ')},e}(a);e.Loader=E,s.register(E);var _=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="bubble",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this.attributes.type||"in",e="bubble-".concat(t),n=this.getAttributes();return'\n <div class="bubble '.concat(e,'"').concat(n,'>\n <div class="bubble-header">\n <div class="bubble-avatar">\n ').concat(this.renderAvatar(),'\n </div>\n <div class="bubble-title">\n ').concat(this.renderTitle(),'\n </div>\n </div>\n <div class="bubble-content">\n ').concat(this.renderContent(),"\n </div>\n </div>\n ")},e.prototype.renderAvatar=function(){var t=this.children.find((function(t){return"img"===t.tag}));return t?t.render():""},e.prototype.renderTitle=function(){var t=this.children.find((function(t){return"title"===t.tag}));return t?t.render():""},e.prototype.renderContent=function(){return this.children.filter((function(t){return!["img","title"].includes(t.tag)})).map((function(t){return t.render()})).join("")},e}(a);e.Bubble=_,s.register(_);var C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="label",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this.getAttributes();return'<div class="label"'.concat(t,">").concat(this.childs(),"</div>")},e}(a);e.Label=C,s.register(C);var I=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="textarea",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this.getAttributes();if(this.attributes.placeholder&&(e+=' placeholder="'.concat(this.attributes.placeholder,'"')),this.attributes.value&&(e+=' value="'.concat((0,i.safeAttr)(this.attributes.value),'"')),this.attributes.rows&&(e+=' rows="'.concat(parseInt(this.attributes.rows),'"')),this.attributes.name&&(e+=' name="'.concat((0,i.safeAttr)(this.attributes.name),'"')),this.attributes.href){var n=(0,i.encodeUrl)(this.attributes.href),r=this.attributes.name||"textarea";e+=" onkeydown=\"if(event.key==='Enter' && event.ctrlKey){tkmlr(".concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this.parentElement).post('").concat(n,"', {").concat((0,i.safeAttr)(r),": this.value}, 'application/json')}\"")}return'<div class="input-wrapper"><textarea class="textarea"'.concat(e,'></textarea><div class="input-spinner"></div></div>')},e}(a);e.Textarea=I,s.register(I);var A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="msg",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this.getAttributes(),e=this.attributes.type||"info",n="msg-".concat(e);return'<div class="msg '.concat(n,'"').concat(t,'>\n <div class="msg-icon"></div>\n <div class="msg-content">').concat(this.childs(),"</div>\n </div>")},e}(a);e.Msg=A,s.register(A),n(151),n(656),n(466),n(432),n(758),n(298),n(393),n(358),n(278),n(512),n(792)},298:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Menu=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="menu",e.canParent=["header"],e.selfClosing=!0,e}return o(e,t),e.prototype.render=function(){var t,e,n=this.getAttributes(),r=this.getId(),o="";return this.attributes.href&&(o=this.attributes.href),this.addRootPrefix('<div class="menu-panel" id="menu-panel-'.concat(r,'">\n <div class="menu-panel-content" id="menu-panel-').concat(r,'-content"></div>\n </div>\n <div class="menu-overlay" id="menu-overlay-').concat(r,'" onclick="tkmlr(').concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").closeMenu('").concat(r,"')\"></div>")),'\n <div class="header-menu" onclick="tkmlr('.concat(null===(e=this.runtime)||void 0===e?void 0:e.getId(),").toggleMenu('").concat(r,"', '").concat((0,a.encodeUrl)(o),"')\"").concat(n,">").concat('\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M3 6H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>\n <path d="M3 12H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>\n <path d="M3 18H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>\n </svg>\n ',"</div>\n ")},e}(i.BaseComponent);e.Menu=s,i.ComponentFactory.register(s)},151:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Page=e.Prev=e.Next=e.Navigation=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="navigation",e.canParent=["tkml","footer"],e}return o(e,t),e.prototype.render=function(){var t=this.getAttributes();return'<div class="pagination"'.concat(t,">").concat(this.childs(),"</div>")},e}(i.BaseComponent);e.Navigation=s,i.ComponentFactory.register(s);var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="next",e.canParent=["navigation"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this,n=this.getAttributes(),r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';if(void 0!==this.attributes.external&&this.attributes.href){var o=this.attributes.href,i=this.attributes.target?' target="'.concat((0,a.safeAttr)(this.attributes.target),'"'):"";return'<a href="'.concat((0,a.safeAttr)(o),'"').concat(i,' class="pagination-item pagination-next"').concat(n,">").concat(this.childs()," ").concat(r,"</a>")}return this.attributes.href&&(o=(0,a.encodeUrl)(this.attributes.href),n+=' href="javascript:void(0)" onclick="tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(o,"')\""),void 0!==this.attributes.preload&&"false"!==this.attributes.preload&&setTimeout((function(){var t;return null===(t=e.runtime)||void 0===t?void 0:t.preload(e.attributes.href)}),0)),'<button class="pagination-item pagination-next"'.concat(n,">").concat(this.childs()," ").concat(r,"</button>")},e}(i.BaseComponent);e.Next=c,i.ComponentFactory.register(c);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="prev",e.canParent=["navigation"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this,n=this.getAttributes(),r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';if(void 0!==this.attributes.external&&this.attributes.href){var o=this.attributes.href,i=this.attributes.target?' target="'.concat((0,a.safeAttr)(this.attributes.target),'"'):"";return'<a href="'.concat((0,a.safeAttr)(o),'"').concat(i,' class="pagination-item pagination-prev"').concat(n,">").concat(r," ").concat(this.childs(),"</a>")}return this.attributes.href&&(o=(0,a.encodeUrl)(this.attributes.href),i=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"",n+=' onclick="tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(o,"'").concat(i,')"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=e.runtime)||void 0===t?void 0:t.preload(e.attributes.href)}),0)),'<button class="pagination-item pagination-prev"'.concat(n,">").concat(r," ").concat(this.childs(),"</button>")},e}(i.BaseComponent);e.Prev=u,i.ComponentFactory.register(u);var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="page",e.canParent=["navigation"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this,n=this.getAttributes(),r=this.getId(),o="pagination-item pagination-page";if("true"===this.attributes.center&&(o+=" center"),void 0!==this.attributes.external&&this.attributes.href){var i=this.attributes.href,s=this.attributes.target?' target="'.concat((0,a.safeAttr)(this.attributes.target),'"'):"";return'<a href="'.concat((0,a.safeAttr)(i),'"').concat(s,' class="').concat(o,'"').concat(n,' id="').concat(r,'">').concat(this.childs(),"</a>")}return this.attributes.href&&(i=(0,a.encodeUrl)(this.attributes.href),s=this.attributes.target?", '".concat((0,a.safeIds)(this.attributes.target),"'"):"",n+=' onclick="tkmlr('.concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(i,"'").concat(s,')"'),"true"===this.attributes.preload&&setTimeout((function(){var t;return null===(t=e.runtime)||void 0===t?void 0:t.preload(e.attributes.href)}),0)),'<div class="'.concat(o,'"').concat(n,' id="').concat(r,'">').concat(this.childs(),"</div>")},e}(i.BaseComponent);e.Page=l,i.ComponentFactory.register(l)},278:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Radio=void 0;var i=n(785),a=n(746),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="radio",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t,e=this.getAttributes(),n=this.attributes.group||"",r=void 0!==this.attributes.disabled;if(!r)if(this.attributes.href){var o=(0,a.encodeUrl)(this.attributes.href),i=this.attributes.target?", '".concat(this.attributes.target,"'"):"";e+=" onclick=\"\n document.querySelectorAll('.radio[data-group=\\'".concat(n,"\\']').forEach(r => r.classList.remove('checked'));\n this.classList.add('checked');\n this.style.opacity='0.5';\n tkmlr(").concat(null===(t=this.runtime)||void 0===t?void 0:t.getId(),").loader(this).go('").concat(o,"', true").concat(i,')\n "')}else e+=" onclick=\"\n document.querySelectorAll('.radio[data-group=\\'".concat(n,"\\']').forEach(r => r.classList.remove('checked'));\n this.classList.add('checked')\n \"");var s=void 0!==this.attributes.checked,c=r?" disabled":"",u=s?' checked="checked"':"",l=r?' disabled="disabled"':"";return'\n <div class="radio'.concat(s?" checked":"").concat(c,'"').concat(u).concat(l).concat(e,' data-group="').concat(n,'">\n <div class="radio-label">').concat(this.childs(),'</div>\n <div class="radio-toggle">\n <div class="radio-dot"></div>\n </div>\n </div>\n ')},e}(i.BaseComponent);e.Radio=s,i.ComponentFactory.register(s)},656:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.Pill=e.Bullet=e.Small=e.P=e.Br=e.W=void 0;var i=n(785),a=n(746);i.ComponentFactory.registerProxyComponent("b"),i.ComponentFactory.registerProxyComponent("i"),i.ComponentFactory.registerProxyComponent("u"),i.ComponentFactory.registerProxyComponent("s");var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="w",e.canParent=["desc","title","section","tkml"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){return'<span class="w">'.concat(this.childs(),"</span>")},e}(i.BaseComponent);e.W=s,i.ComponentFactory.register(s);var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="br",e.canParent=["p","info","desc","title","section","tkml"],e.selfClosing=!0,e}return o(e,t),e.prototype.render=function(){return"<br/>"},e}(i.BaseComponent);e.Br=c,i.ComponentFactory.register(c);var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="p",e.hasText=!0,e.canParent=["info","desc","section","tkml"],e}return o(e,t),e.prototype.render=function(){var t=this.getAttributes();return"<p".concat(t,">").concat(this.childs(),"</p>")},e}(i.BaseComponent);e.P=u,i.ComponentFactory.register(u);var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="small",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){return"<small>".concat(this.childs(),"</small>")},e}(i.BaseComponent);e.Small=l,i.ComponentFactory.register(l);var d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="bullet",e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this.getAttributes();return'<div class="bullet-item"'.concat(t,'><div class="bullet-marker"></div><div class="bullet-content">').concat(this.childs(),"</div></div>")},e}(i.BaseComponent);e.Bullet=d,i.ComponentFactory.register(d);var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tag="pill",e.canParent=["info","tkml","desc","title","section"],e.hasText=!0,e}return o(e,t),e.prototype.render=function(){var t=this.getId(),e="",n=this.getAttributes(),r="";if(this.attributes.icon){var o=(0,a.resolveUrl)(this.attributes.icon,this.runtime);e='<img class="pill-icon" src="'.concat(o,'" alt="icon"/>')}if(this.attributes.width){var i=parseInt(this.attributes.width);isNaN(i)||(r+="width: ".concat(i,"px; "))}return r&&(n+=' style="'.concat(r,'"')),'<span id="'.concat(t,'" class="pill"').concat(n,">").concat(this.childs()).concat(e,"</span>")},e}(i.BaseComponent);e.Pill=h,i.ComponentFactory.register(h)},337:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var r=n(43),o=n(785),i=function(){function t(t,e,n,i){var a=this;this.body="",this.currentElement=null,this.isFirstChunk=!0,this.addClosingRoot=!1,this.rootComponent=null,this.renderElement=null,this.inCodeBlock=0,this.codeContent="",this.root=t,this.runtime=e,this.targets=null==n?void 0:n.split(",").map((function(t){return t.trim()})),i&&(this.renderElement=i),this.parser=new r.SAXParser(!1,{lowercase:!0,trim:!1});var s=null;this.parser.onopentag=function(t){for(var n={},r=0,i=Object.entries(t.attributes);r<i.length;r++){var c=i[r],u=c[0],l=c[1];n[u]="src"===u?decodeURIComponent(String(l)):String(l)}if(a.inCodeBlock>0){for(var d="",h=0,p=Object.entries(t.attributes);h<p.length;h++){var f=p[h];u=f[0],l=f[1],d+=" ".concat(u,'="').concat(l,'"')}return a.codeContent+="<".concat(t.name).concat(d,">"),void("code"===t.name&&a.inCodeBlock++)}"code"===t.name&&a.inCodeBlock++,(null==s?void 0:s.selfClosing)&&(s=s.parent);var v=o.ComponentFactory.create(t.name,n,e,s);s?(v.parent=s,s.addChild(v)):a.rootComponent=v,s=v},this.parser.onclosetag=function(t){if(a.inCodeBlock>0){if("code"!==t)return void(a.codeContent+="</".concat(t,">"));if(a.inCodeBlock--,0!==a.inCodeBlock)return void(a.codeContent+="</".concat(t,">"));s.setContent(a.codeContent),a.codeContent=""}if(s){if(a.targets&&s.id&&a.targets.includes(s.id)){var e=document.getElementById(s.id);e&&(e.outerHTML=s.render())}s=s.parent}},this.parser.ontext=function(t){if(a.inCodeBlock>0)a.codeContent+=t;else if(s&&t.length>0&&s.hasText){var e=new o.Text(t);e.parent=s,s.addChild(e)}},this.parser.onerror=function(t){console.error("Parsing error:",t),a.failed(t)}}return t.prototype.add=function(t){this.isFirstChunk&&(this.isFirstChunk=!1,t.match(/^\s*(<!--[\s\S]*?-->\s*)*<tkml/)||(t="<tkml>"+t,this.addClosingRoot=!0)),this.body+=t,this.parser.write(t)},t.prototype.finish=function(){if(this.addClosingRoot&&this.add("</tkml>"),this.parser.close(),!this.targets&&this.rootComponent){var t=void 0;if(this.renderElement){var e=this.renderElement.parent,n=document.getElementById(this.renderElement.id);e?(this.rootComponent.children.forEach((function(t){t.parent=e})),t=e.renderChildren(this.rootComponent.children),n=n?e.getWrappingElement(n):null):t=this.rootComponent.render(),n&&(n.outerHTML=t)}else t=this.rootComponent.render(),this.root&&(this.root.innerHTML=t);return t}return""},t.prototype.failed=function(t){console.error(t)},t}();e.Parser=i},632:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Runtime=void 0;var r=n(337),o=n(746),i=function(){function t(e,n){void 0===n&&(n={});var r=this;this.cache=new Map,this.currentUrl="",this.initialUrl=null,this.observers=new Map,this.footerState=new Map,this.aborted=!1,this.URLControl=!1,this.onload=[],this.beforeRender=[],this.pluginUrls=[],this.instanceId=n.instanceId||++t.counter,this.tkmlInstance=e,this.options=n,this.isServer=n.isServer||o.isServer,this.isBrowser=o.isBrowser,this.isBrowser&&o.safeDOM.addEventListener(window,"popstate",(function(t){var e;e=r.options.URLControl?o.safeWindow.location.pathname:o.safeWindow.location.hash.slice(1);var n=r.getFullUrl(e);r.hasCache(n)?r.popCache(n):r.load(e,!1)})),this.isBrowser&&(window.addEventListener("resize",(function(){return r.onPageUpdate()})),window.addEventListener("scroll",(function(){r.updateFooterScrollState()})))}return t.prototype.hasCache=function(t){return this.cache.has(t)},t.prototype.getCache=function(t){return this.cache.get(t)},t.prototype.setCache=function(t,e){this.cache.set(t,e)},t.prototype.resetState=function(){this.aborted=!1},t.prototype.abort=function(){return this.aborted=!0,this},t.prototype.setCacheForCurrentUrl=function(t){var e=this.getLocation(),n=this.getFullUrl(e);this.setCache(n,t)},t.prototype.go=function(t,e,n,r){void 0===e&&(e=!1),this.aborted?this.resetState():(t=decodeURIComponent(t),n&&(e=!0),t=this.fixUrl(t),this.load(t,!0,void 0,e,n,r))},t.prototype.post=function(t,e,n){t&&(t=decodeURIComponent(t),t=this.fixUrl(t)),this.load(t,!0,e,void 0,n)},t.prototype.formatUrl=function(t){return t.replace(/^https?:\/\//,"//")},t.prototype.popCache=function(t,e,n){var o,i=this.getCache(t);if(this.onload=[],n&&"string"==typeof n){var a=document.getElementById(n);o=new r.Parser(a,this,e)}else o=new r.Parser(e&&this.isBrowser?document.getElementById(e):this.tkmlInstance.root,this,e,n||void 0);o.add(i),this.beforeRender.forEach((function(t){return t()})),o.finish(),this.onPageUpdate()},t.prototype.fixUrl=function(t){if(t.match(/^https?:\/\//))return t.replace(/^https?:\/\//,"//");if(t.startsWith("//"))return t;var e="",n=this.currentUrl;if(n.startsWith("//")){var r=n.match(/^\/\/[^\/?]+/);r&&(e=r[0])}if(t.startsWith("/"))return e+t;if(n){var o=(n=n.split("?")[0]).lastIndexOf("/");if(-1!==o)return n.substring(0,o+1)+t}return"/"+t},t.prototype.getFullUrl=function(t){return t.startsWith("//")?t.startsWith("//localhost")?"http:"+t:"https:"+t:(t.startsWith("/")||(t="/"+t),(this.isBrowser?window.location.origin:"")+t)},t.prototype.load=function(t,e,n,o,i,a,s){var c=this;if(void 0===e&&(e=!1),!this.isServer){var u;if(this.initialUrl||(this.initialUrl=t),null===t?(t=this.currentUrl,u=t):u=this.getFullUrl(t),e&&!a){var l=t;l.match(/^https?:\/\//)&&(l=l.replace(/^https?:\/\//,"//")),this.options.URLControl?window.history.pushState({url:u},"",l):(this.formatUrl(t),window.history.pushState({url:u},"","#"+l)),this.currentUrl=t}if(!n&&!o&&this.hasCache(u))return this.popCache(u,i,a),void(s&&s());var d=new XMLHttpRequest;d.open(n?"POST":"GET",u,!0),d.setRequestHeader("Accept","application/tkml");var h,p=0;if(n&&d.setRequestHeader("Content-Type","application/json"),this.onload=[],"string"==typeof a){var f=document.getElementById(a);h=new r.Parser(f,this,i)}else h=new r.Parser(this.tkmlInstance.root,this,i,a);d.onprogress=function(){h.add(d.responseText.substring(p)),p=d.responseText.length},d.onload=function(){200===d.status?(c.beforeRender.forEach((function(t){return t()})),h.finish(),n||c.setCache(u,d.responseText),s&&s(),!i&&c.isBrowser&&e&&window.scrollTo({top:0}),setTimeout((function(){return c.onPageUpdate()}),0)):h.failed(new Error("Failed to load URL: ".concat(u)))},d.onerror=function(){h.failed(new Error("Network error while loading URL: ".concat(u)))},n?d.send(JSON.stringify(n)):d.send()}},t.prototype.getLocation=function(){return this.isBrowser?this.options.URLControl?window.location.pathname:window.location.hash.slice(1):""},t.prototype.fromText=function(t){this.onload=[];var e=new r.Parser(this.tkmlInstance.root,this);return e.add(t),e.finish()||""},t.prototype.loader=function(t){return this.aborted||(t.classList.add("loading"),this.beforeRender.push((function(){t.classList.remove("loading")}))),this},t.prototype.getId=function(){return this.instanceId},t.prototype.preload=function(t){var e=this;if(this.isServer)return this;t=decodeURIComponent(t),t=this.fixUrl(t);var n=this.getFullUrl(t);if(this.hasCache(n))return this;var r=new XMLHttpRequest;return r.open("GET",n,!0),r.setRequestHeader("Accept","application/tkml"),r.onload=function(){200===r.status&&e.setCache(n,r.responseText)},r.send(),this},t.prototype.loadHighlightJs=function(){return this.isServer?Promise.resolve():(t.loadingPromise||(t.loadingPromise=new Promise((function(e){if(t.highlightJsLoaded)e();else{var n=document.createElement("link");n.rel="stylesheet",n.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css",document.head.appendChild(n);var r=document.createElement("script");r.src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js",r.onload=function(){t.highlightJsLoaded=!0,e()},document.head.appendChild(r)}}))),t.loadingPromise)},t.prototype.observeLoader=function(t,e){var n=this;if(!this.isServer&&t.id){var r=document.getElementById(t.id);if(r){var o=new IntersectionObserver((function(i){i.forEach((function(i){i.isIntersecting&&(o.disconnect(),n.observers.delete(r.id),r.classList.add("loading"),e=decodeURIComponent(e),e=n.fixUrl(e),n.load(e,!1,void 0,!0,void 0,t))}))}),{rootMargin:"100px"});this.observers.set(r.id,o),o.observe(r)}}},t.prototype.cleanup=function(){this.observers.forEach((function(t){return t.disconnect()})),this.observers.clear()},t.prototype.observeFooter=function(t,e){var n=this;if(void 0===e&&(e=!1),!this.isServer){var r=document.getElementById(t);if(r){var o=window.scrollY,i=!1,a="up",s=function(){var t=window.scrollY,e=t>o?"down":"up";window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-100?(r.classList.remove("hidden"),r.classList.add("down")):(r.classList.remove("down"),e!==a&&("down"===(a=e)?r.classList.add("hidden"):r.classList.remove("hidden"))),o=t,i=!1};window.addEventListener("scroll",(function(){e&&(i||(window.requestAnimationFrame(s),i=!0)),n.updateFooterScrollState()})),e&&(s(),this.footerState.set(t,{lastScrollY:o,direction:"down"}))}}},t.prototype.observeHeader=function(t){if(!this.isServer){var e=document.getElementById(t);if(e){var n=!1,r=function(){window.scrollY>0?e.classList.add("scrolled"):e.classList.remove("scrolled"),n=!1};window.addEventListener("scroll",(function(){n||(window.requestAnimationFrame(r),n=!0)})),r()}}},t.prototype.validateFields=function(t){if(this.aborted||this.isServer)return this;var e=t.split(",").map((function(t){return t.trim()})),n=null;return e.forEach((function(t){var e=document.querySelector("[name='".concat(t,"']"));if(e&&!e.value.trim()){e.classList.add("error"),n||(n=e);var r=function(){e.classList.remove("error"),e.removeEventListener("input",r),e.removeEventListener("focus",r)};e.addEventListener("input",r),e.addEventListener("focus",r)}})),n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),this.abort()),this},t.prototype.addOnload=function(t,e){t.onloadAdded||(this.onload.push(e),t.onloadAdded=!0)},t.prototype.compile=function(t){this.onload=["tkmlr(".concat(this.instanceId,").onPageUpdate();")];var e=new r.Parser(null,this);return e.add(t),e.finish()||""},t.prototype.onPageUpdate=function(){this.isServer||this.updateFooterPosition()},t.prototype.updateFooterPosition=function(){var t=document.querySelectorAll(".footer");if(t.length){var e=window.innerHeight;t.forEach((function(t){var n=t,r=n.getBoundingClientRect(),o=window.scrollY+r.top,i=r.height,a=o;if(a<e-i){var s=Math.max(0,e-a-i);n.style.marginTop="".concat(s,"px")}else n.style.marginTop="0"})),this.updateFooterScrollState()}},t.prototype.updateFooterScrollState=function(){var t=document.querySelectorAll(".footer");if(t.length){var e=window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-10;t.forEach((function(t){e?t.classList.add("scrolled-to-bottom"):t.classList.remove("scrolled-to-bottom")}))}},t.prototype.toggleMenu=function(t,e){if(!this.isServer){var n="menu-panel-".concat(t),r="menu-overlay-".concat(t),o=document.getElementById(n),i=document.getElementById(r);o&&i&&(o.classList.contains("open")?(o.classList.remove("open"),i.classList.remove("open")):(o.classList.add("open"),i.classList.add("open"),e&&!o.dataset.loaded&&(o.classList.add("loading"),e=decodeURIComponent(e),e=this.fixUrl(e),this.load(e,!1,void 0,!1,void 0,"".concat(n,"-content"),(function(){o.classList.remove("loading")})),o.dataset.loaded="true")))}},t.prototype.closeMenu=function(t){if(!this.isServer){var e="menu-panel-".concat(t),n="menu-overlay-".concat(t),r=document.getElementById(e),o=document.getElementById(n);r&&o&&(r.classList.remove("open"),o.classList.remove("open"))}},t.prototype.parseQueryString=function(t){var e={};return t&&""!==t.trim()?(t.split("&").forEach((function(t){if(t.trim()){var n=t.split("="),r=decodeURIComponent(n[0]),o=n.length>1?decodeURIComponent(n[1]):"";e[r]=o}})),e):e},t.prototype.loadPost=function(t,e,n){if(this.aborted)return this.resetState(),this;var r=this.parseQueryString(e);return this.post(t,r,n),this},t.prototype.initializeDropdown=function(t){var e,n=this;if(!this.isServer){var r=document.getElementById(t);if(r&&!r.classList.contains("disabled")){var o=r.querySelector(".dropdown-toggle"),i=(r.querySelector(".dropdown-menu"),r.querySelector('input[type="hidden"]')),a=r.querySelector(".dropdown-display"),s=r.classList.contains("searchable"),c=r.querySelector(".dropdown-search-input"),u=r.querySelector(".dropdown-search-clear"),l=(r.querySelector(".dropdown-options"),r.querySelector(".dropdown-no-results")),d=function(t){if(s){var e=r.querySelectorAll(".option"),n=!1;e.forEach((function(e){var r;((null===(r=e.textContent)||void 0===r?void 0:r.toLowerCase())||"").includes(t.toLowerCase())?(e.style.display="",n=!0):e.style.display="none"})),l&&(l.style.display=n?"none":"block")}};null==o||o.addEventListener("click",(function(t){t.preventDefault(),r.classList.toggle("open"),s&&r.classList.contains("open")&&setTimeout((function(){null==c||c.focus()}),100)})),document.addEventListener("click",(function(t){r.contains(t.target)||(r.classList.remove("open"),setTimeout((function(){!r.classList.contains("open")&&s&&c&&(c.value="",d(""))}),300))})),s&&c&&(c.addEventListener("input",(function(){d(this.value)})),null==u||u.addEventListener("click",(function(){c&&(c.value="",c.focus(),d(""))})),c.addEventListener("click",(function(t){t.stopPropagation()})));var h=r.querySelector(".option.selected");if(h&&a&&(a.textContent=(null===(e=h.textContent)||void 0===e?void 0:e.trim())||"",i)){var p=h.getAttribute("value")||"";i.value=p}var f=r.querySelectorAll(".option:not(.disabled)");f.forEach((function(t){t.hasAttribute("href")||t.addEventListener("click",(function(e){var u,l;e.preventDefault(),f.forEach((function(t){return t.classList.remove("selected")})),t.classList.add("selected");var h=(null===(u=t.textContent)||void 0===u?void 0:u.trim())||"";l=t.hasAttribute("value")?t.getAttribute("value")||"":h,i&&(i.value=l),a&&(a.textContent=h);var p=null==o?void 0:o.querySelector(".dropdown-selected-img"),v=null==o?void 0:o.querySelector(".dropdown-selected-icon"),g=null==o?void 0:o.querySelector(".dropdown-selected-right-icon");p&&p.remove(),v&&v.remove(),g&&g.remove();var m=t.querySelector(".option-img"),b=t.querySelector(".option-right-icon");if(m&&o){var y=m.cloneNode(!0);if(y.classList.remove("option-img"),y.classList.add("dropdown-selected-img"),o.insertBefore(y,o.firstChild),b&&o){var T=b.cloneNode(!0);T.classList.remove("option-right-icon"),T.classList.add("dropdown-selected-right-icon"),null==a||a.after(T)}}else{var w=t.querySelector(".option-icon");if(w&&o){var E=w.cloneNode(!0);E.classList.remove("option-icon"),E.classList.add("dropdown-selected-icon"),o.insertBefore(E,o.firstChild)}}r.classList.remove("open"),c&&c.value;var _=r.getAttribute("data-href");if(_){var C={};C[i.name]=l,n.loader(r).post(_,C)}var I=new Event("change",{bubbles:!0});r.dispatchEvent(I),setTimeout((function(){!r.classList.contains("open")&&s&&c&&(c.value="",d(""))}),300)}))}))}}},t.prototype.initializeTabBar=function(t){if(!this.isServer){var e=document.getElementById(t);if(e){var n=e.querySelectorAll(".tab:not(.disabled)"),r=e.querySelector(".tab.active");!r&&n.length>0&&(r=n[0]).classList.add("active"),n.forEach((function(t){t.addEventListener("click",(function(){if(!t.classList.contains("active")){n.forEach((function(t){return t.classList.remove("active")})),t.classList.add("active");var r=new CustomEvent("tabchange",{bubbles:!0,detail:{tabId:t.id}});e.dispatchEvent(r)}}))}))}}},t.counter=0,t.highlightJsLoaded=!1,t.loadingPromise=null,t}();e.Runtime=i,o.isBrowser&&(window.TKML_RUNTIMES=new Map,window.tkmlr=function(t){var e=window.TKML_RUNTIMES.get(t);if(!e)throw new Error("Runtime instance with id ".concat(t," not found"));return e})},746:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.safeWindow=e.safeDOM=e.isBrowser=e.isServer=void 0,e.encodeUrl=function(t){return encodeURIComponent(t).replace(/["']/g,(function(t){return'"'===t?""":"'"}))},e.safeIds=function(t){return t.replace(/[^a-zA-Z0-9-_ ,]/g,"")},e.safeAttr=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},e.resolveUrl=function(t,e){return t.match(/^https?:\/\//)?t:e?(t=e.fixUrl(t),e.getFullUrl(t)):t},e.isServer=!0,e.isBrowser=!e.isServer,e.safeDOM={querySelector:function(t){return e.isBrowser?document.querySelector(t):null},getElementById:function(t){return e.isBrowser?document.getElementById(t):null},addEventListener:function(t,n,r){e.isBrowser&&t&&t.addEventListener&&t.addEventListener(n,r)}},e.safeWindow={location:{get href(){return e.isBrowser?window.location.href:""},get pathname(){return e.isBrowser?window.location.pathname:""},get hash(){return e.isBrowser?window.location.hash:""},get origin(){return e.isBrowser?window.location.origin:""}},history:{pushState:function(t,n,r){e.isBrowser&&window.history&&window.history.pushState(t,n,r)}}}},203:t=>{"use strict";t.exports=require("stream")},193:t=>{"use strict";t.exports=require("string_decoder")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}var r={};(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.TKML=void 0;var e=n(337),o=n(632),i=n(746);n(785);var a=function(){function t(t,e){if(void 0===e&&(e={}),this.rootUrl="",this.root=t,this.runtime=new o.Runtime(this,e),i.isBrowser){window.TKML_RUNTIMES.set(this.runtime.getId(),this.runtime);var n=window.matchMedia("(prefers-color-scheme: dark)");e.dark||void 0===e.dark&&n.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.add("light"),this.root&&this.root.classList.add("tkml-cont"),e.plugins&&e.plugins.length>0&&this.loadPlugins(e.plugins),window.TKMLInstance=this}}return t.prototype.loadPlugins=function(t){var e=this;i.isBrowser?t.forEach((function(t){var e=document.createElement("script");e.src=t,e.async=!0,e.onload=function(){console.log("TKML plugin loaded: ".concat(t))},e.onerror=function(e){console.error("Failed to load TKML plugin: ".concat(t),e)},document.head.appendChild(e)})):i.isServer&&t.forEach((function(t){e.runtime.onload.push("\n (function() {\n var script = document.createElement('script');\n script.src = \"".concat(t,'";\n script.async = true;\n script.onload = function() {\n console.log("TKML plugin loaded: ').concat(t,'");\n };\n script.onerror = function(err) {\n console.error("Failed to load TKML plugin: ').concat(t,'", err);\n };\n document.head.appendChild(script);\n })();\n '))})),this.runtime.pluginUrls=t},t.prototype.preload=function(t){this.runtime.preload(t)},t.prototype.load=function(t,e,n){void 0===e&&(e=!1),t=this.runtime.fixUrl(t),this.runtime.load(t,e,n)},t.prototype.fromText=function(t){var n=this,r=new e.Parser(this.root,this.runtime);return r.add(t),r.finish(),this.runtime.setCacheForCurrentUrl(t),this.runtime&&setTimeout((function(){return n.runtime.onPageUpdate()}),0),!0},t.prototype.setCurrentUrl=function(){if(i.isBrowser)if(this.runtime.options.URLControl){var t=window.location.pathname;if(t.startsWith("/")&&t.length>1)return this.runtime.currentUrl=t,!0}else{var e=window.location.hash.slice(1);if(e)return this.runtime.currentUrl=e,!0}},t.prototype.fromUrl=function(){return!!i.isBrowser&&(this.setCurrentUrl(),this.runtime.load(this.runtime.currentUrl,!1),!0)},t.prototype.addPage=function(t,e){var n=this.runtime.getFullUrl(t);this.runtime.setCache(n,e)},t.prototype.route=function(){this.fromUrl()||(this.setCurrentUrl(),this.load("/"))},t.prototype.compile=function(t){return this.setCurrentUrl(),this.runtime.compile(t)},t.prototype.getRuntimeJS=function(){return this.runtime.onload.join("\n")},t.prototype.registerComponent=function(t){n(785).ComponentFactory.register(t)},t}();t.TKML=a,i.isBrowser&&(window.TKML=a,window.TKMLInstance=null),t.default=a})();var o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();