TvBox/jav/lib/vendors-node_modules_lit-html_lit-html_js-b93a87060d31.js
2025-07-03 20:15:22 +08:00

2 lines
10 KiB
JavaScript

"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_lit-html_lit-html_js"],{66917:(t,e,i)=>{i.d(e,{q:()=>l,u:()=>n});let s=new WeakMap,n=t=>(...e)=>{let i=t(...e);return s.set(i,!0),i},l=t=>"function"==typeof t&&s.has(t)},79112:(t,e,i)=>{i.d(e,{Pf:()=>n,if:()=>l,o6:()=>s});let s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,n=(t,e,i=null,s=null)=>{for(;e!==i;){let i=e.nextSibling;t.insertBefore(e,s),e=i}},l=(t,e,i=null)=>{for(;e!==i;){let i=e.nextSibling;t.removeChild(e),e=i}}},80859:(t,e,i)=>{i.d(e,{c:()=>s,s:()=>n});let s={},n={}},5326:(t,e,i)=>{i.d(e,{GP:()=>EventPart,Qh:()=>NodePart,Yp:()=>BooleanAttributePart,ab:()=>AttributePart,g$:()=>PropertyCommitter,pU:()=>AttributeCommitter,sO:()=>h});var s=i(66917),n=i(79112),l=i(80859),r=i(38214),o=i(60760),a=i(35672);let h=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]);let AttributeCommitter=class AttributeCommitter{constructor(t,e,i){this.dirty=!0,this.element=t,this.name=e,this.strings=i,this.parts=[];for(let t=0;t<i.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new AttributePart(this)}_getValue(){let t=this.strings,e=t.length-1,i="";for(let s=0;s<e;s++){i+=t[s];let e=this.parts[s];if(void 0!==e){let t=e.value;if(h(t)||!u(t))i+="string"==typeof t?t:String(t);else for(let e of t)i+="string"==typeof e?e:String(e)}}return i+t[e]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}};let AttributePart=class AttributePart{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==l.c&&(!h(t)||t!==this.value)&&(this.value=t,(0,s.q)(t)||(this.committer.dirty=!0))}commit(){for(;(0,s.q)(this.value);){let t=this.value;this.value=l.c,t(this)}this.value!==l.c&&this.committer.commit()}};let NodePart=class NodePart{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild((0,a.h5)()),this.endNode=t.appendChild((0,a.h5)())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=(0,a.h5)()),t.__insert(this.endNode=(0,a.h5)())}insertAfterPart(t){t.__insert(this.startNode=(0,a.h5)()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){for(;(0,s.q)(this.__pendingValue);){let t=this.__pendingValue;this.__pendingValue=l.c,t(this)}let t=this.__pendingValue;t!==l.c&&(h(t)?t!==this.value&&this.__commitText(t):t instanceof o.Q?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):u(t)?this.__commitIterable(t):t===l.s?(this.value=l.s,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){let e=this.startNode.nextSibling,i="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=i:this.__commitNode(document.createTextNode(i)),this.value=t}__commitTemplateResult(t){let e=this.options.templateFactory(t);if(this.value instanceof r.i&&this.value.template===e)this.value.update(t.values);else{let i=new r.i(e,t.processor,this.options),s=i._clone();i.update(t.values),this.__commitNode(s),this.value=i}}__commitIterable(t){let e;Array.isArray(this.value)||(this.value=[],this.clear());let i=this.value,s=0;for(let n of t)void 0===(e=i[s])&&(e=new NodePart(this.options),i.push(e),0===s?e.appendIntoPart(this):e.insertAfterPart(i[s-1])),e.setValue(n),e.commit(),s++;s<i.length&&(i.length=s,this.clear(e&&e.endNode))}clear(t=this.startNode){(0,n.if)(this.startNode.parentNode,t.nextSibling,this.endNode)}};let BooleanAttributePart=class BooleanAttributePart{constructor(t,e,i){if(this.value=void 0,this.__pendingValue=void 0,2!==i.length||""!==i[0]||""!==i[1])throw Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=i}setValue(t){this.__pendingValue=t}commit(){for(;(0,s.q)(this.__pendingValue);){let t=this.__pendingValue;this.__pendingValue=l.c,t(this)}if(this.__pendingValue===l.c)return;let t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=l.c}};let PropertyCommitter=class PropertyCommitter extends AttributeCommitter{constructor(t,e,i){super(t,e,i),this.single=2===i.length&&""===i[0]&&""===i[1]}_createPart(){return new PropertyPart(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}};let PropertyPart=class PropertyPart extends AttributePart{};let d=!1;try{let t={get capture(){return d=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}let EventPart=class EventPart{constructor(t,e,i){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=i,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;(0,s.q)(this.__pendingValue);){let t=this.__pendingValue;this.__pendingValue=l.c,t(this)}if(this.__pendingValue===l.c)return;let t=this.__pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),n&&(this.__options=p(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=l.c}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}};let p=t=>t&&(d?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)},38214:(t,e,i)=>{i.d(e,{i:()=>TemplateInstance});var s=i(79112),n=i(35672);let TemplateInstance=class TemplateInstance{constructor(t,e,i){this.__parts=[],this.template=t,this.processor=e,this.options=i}update(t){let e=0;for(let i of this.__parts)void 0!==i&&i.setValue(t[e]),e++;for(let t of this.__parts)void 0!==t&&t.commit()}_clone(){let t,e=s.o6?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),i=[],l=this.template.parts,r=document.createTreeWalker(e,133,null,!1),o=0,a=0,h=r.nextNode();for(;o<l.length;){if(t=l[o],!(0,n.s9)(t)){this.__parts.push(void 0),o++;continue}for(;a<t.index;)a++,"TEMPLATE"===h.nodeName&&(i.push(h),r.currentNode=h.content),null===(h=r.nextNode())&&(r.currentNode=i.pop(),h=r.nextNode());if("node"===t.type){let t=this.processor.handleTextExpression(this.options);t.insertAfterNode(h.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(h,t.name,t.strings,this.options));o++}return s.o6&&(document.adoptNode(e),customElements.upgrade(e)),e}}},60760:(t,e,i)=>{i.d(e,{Q:()=>TemplateResult}),i(79112);var s=i(35672);let n=` ${s.xL} `;let TemplateResult=class TemplateResult{constructor(t,e,i,s){this.strings=t,this.values=e,this.type=i,this.processor=s}getHTML(){let t=this.strings.length-1,e="",i=!1;for(let l=0;l<t;l++){let t=this.strings[l],r=t.lastIndexOf("\x3c!--");i=(r>-1||i)&&-1===t.indexOf("--\x3e",r+1);let o=s.zY.exec(t);null===o?e+=t+(i?n:s.XY):e+=t.substr(0,o.index)+o[1]+o[2]+s.c1+o[3]+s.xL}return e+this.strings[t]}getTemplateElement(){let t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}},35672:(t,e,i)=>{i.d(e,{Bj:()=>Template,XY:()=>n,c1:()=>r,h5:()=>h,s9:()=>a,xL:()=>s,zY:()=>u});let s=`{{lit-${String(Math.random()).slice(2)}}}`,n=`<!--${s}-->`,l=RegExp(`${s}|${n}`),r="$lit$";let Template=class Template{constructor(t,e){this.parts=[],this.element=e;let i=[],n=[],a=document.createTreeWalker(e.content,133,null,!1),d=0,p=-1,c=0,{strings:m,values:{length:_}}=t;for(;c<_;){let t=a.nextNode();if(null===t){a.currentNode=n.pop();continue}if(p++,1===t.nodeType){if(t.hasAttributes()){let e=t.attributes,{length:i}=e,s=0;for(let t=0;t<i;t++)o(e[t].name,r)&&s++;for(;s-- >0;){let e=u.exec(m[c])[2],i=e.toLowerCase()+r,s=t.getAttribute(i);t.removeAttribute(i);let n=s.split(l);this.parts.push({type:"attribute",index:p,name:e,strings:n}),c+=n.length-1}}"TEMPLATE"===t.tagName&&(n.push(t),a.currentNode=t.content)}else if(3===t.nodeType){let e=t.data;if(e.indexOf(s)>=0){let s=t.parentNode,n=e.split(l),a=n.length-1;for(let e=0;e<a;e++){let i,l=n[e];if(""===l)i=h();else{let t=u.exec(l);null!==t&&o(t[2],r)&&(l=l.slice(0,t.index)+t[1]+t[2].slice(0,-r.length)+t[3]),i=document.createTextNode(l)}s.insertBefore(i,t),this.parts.push({type:"node",index:++p})}""===n[a]?(s.insertBefore(h(),t),i.push(t)):t.data=n[a],c+=a}}else if(8===t.nodeType)if(t.data===s){let e=t.parentNode;(null===t.previousSibling||p===d)&&(p++,e.insertBefore(h(),t)),d=p,this.parts.push({type:"node",index:p}),null===t.nextSibling?t.data="":(i.push(t),p--),c++}else{let e=-1;for(;-1!==(e=t.data.indexOf(s,e+1));)this.parts.push({type:"node",index:-1}),c++}}for(let t of i)t.parentNode.removeChild(t)}};let o=(t,e)=>{let i=t.length-e.length;return i>=0&&t.slice(i)===e},a=t=>-1!==t.index,h=()=>document.createComment(""),u=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/},17688:(t,e,i)=>{i.d(e,{ab:()=>s.ab,Qh:()=>s.Qh,h5:()=>a.h5,u$:()=>r.u,qy:()=>c,if:()=>o.if,XX:()=>p,Pf:()=>o.Pf});var s=i(5326);let DefaultTemplateProcessor=class DefaultTemplateProcessor{handleAttributeExpressions(t,e,i,n){let l=e[0];return"."===l?new s.g$(t,e.slice(1),i).parts:"@"===l?[new s.GP(t,e.slice(1),n.eventContext)]:"?"===l?[new s.Yp(t,e.slice(1),i)]:new s.pU(t,e,i).parts}handleTextExpression(t){return new s.Qh(t)}};let n=new DefaultTemplateProcessor;var l=i(60760),r=i(66917),o=i(79112);i(80859);var a=i(35672);function h(t){let e=u.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},u.set(t.type,e));let i=e.stringsArray.get(t.strings);if(void 0!==i)return i;let s=t.strings.join(a.xL);return void 0===(i=e.keyString.get(s))&&(i=new a.Bj(t,t.getTemplateElement()),e.keyString.set(s,i)),e.stringsArray.set(t.strings,i),i}let u=new Map,d=new WeakMap,p=(t,e,i)=>{let n=d.get(e);void 0===n&&((0,o.if)(e,e.firstChild),d.set(e,n=new s.Qh(Object.assign({templateFactory:h},i))),n.appendInto(e)),n.setValue(t),n.commit()};i(38214),(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");let c=(t,...e)=>new l.Q(t,e,"html",n)}}]);
//# sourceMappingURL=vendors-node_modules_lit-html_lit-html_js-02603dad31f1.js.map