UNPKG

tdesign-site-components

Version:
65 lines (64 loc) 924 kB
(function(He,Et){typeof exports=="object"&&typeof module!="undefined"?Et(exports):typeof define=="function"&&define.amd?define(["exports"],Et):(He=typeof globalThis!="undefined"?globalThis:He||self,Et(He["td-site"]={}))})(this,function(He){"use strict";var Et="";const $n=new Map;function lt(e){let t=$n.get(e);return t===void 0&&(t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),$n.set(e,t)),t}function Ce(e,t,n={}){return e.dispatchEvent(new globalThis.CustomEvent(t,{bubbles:!1,...n}))}function Ht(e){return`<${String(e.tagName).toLowerCase()}>`}function zt(e,t){e.nodeType===globalThis.Node.ELEMENT_NODE&&(t(e),e.shadowRoot&&zt(e.shadowRoot,t));const n=globalThis.document.createTreeWalker(e,globalThis.NodeFilter.SHOW_ELEMENT,null,!1);for(;n.nextNode();){const o=n.currentNode;t(o),o.shadowRoot&&zt(o.shadowRoot,t)}}const an=Promise.resolve(),Rr=new WeakMap,sn=zt.name==="walkInShadow",ct=new Set;function eo(e){ct.size||an.then(Fr),ct.add(e)}function Xr(e){ct.delete(e)}function Fr(){for(const e of ct)try{e()}catch(t){console.error(t)}ct.clear()}const jt=new WeakMap,dt=new Set;function to(e){const t=new Set,n=t.values();for(;e;){if(e.resolved=!1,e.deps){for(const o of e.deps)o.contexts.delete(e);e.deps.clear()}if(e.contexts)for(const o of e.contexts)dt.has(o)||(t.add(o),e.contexts.delete(o));e.observe&&eo(e.observe),e=n.next().value}}function It(e,t){let n=jt.get(e);n||(n=new Map,jt.set(e,n));let o=n.get(t);return o||(o={key:t,target:e,value:void 0,lastValue:void 0,resolved:!1,contexts:void 0,deps:void 0,observe:void 0},n.set(t,o)),o}let Ae=null;function no(e,t,n){const o=It(e,t);if(Ae&&(o.contexts||(o.contexts=new Set),Ae.deps||(Ae.deps=new Set),o.contexts.add(Ae),Ae.deps.add(o)),o.resolved)return o.value;const r=Ae;try{if(dt.has(o))throw Error(`Circular get invocation is forbidden: '${t}'`);Ae=o,dt.add(o),o.value=n(e,o.value),o.resolved=!0,Ae=r,dt.delete(o)}catch(i){throw Ae=r,dt.delete(o),Ae&&(Ae.deps.delete(o),o.contexts.delete(Ae)),i}return o.value}function Ur(e,t,n,o){const r=It(e,t),i=n(e,o,r.value);i!==r.value&&(r.value=i,to(r))}function Gr(e,t,n,o){const r=It(e,t);r.observe=()=>{const i=no(e,t,n);i!==r.lastValue&&(o(e,i,r.lastValue),r.lastValue=i)};try{r.observe()}catch(i){console.error(i)}return()=>{Xr(r.observe),r.observe=void 0,r.lastValue=void 0}}const Nt=new Set;function qr(e){Nt.size||setTimeout(()=>{for(const t of Nt)if(!t.contexts||t.contexts.size===0){if(t.deps)for(const o of t.deps)o.contexts.delete(t);jt.get(t.target).delete(t.key)}Nt.clear()}),Nt.add(e)}function oo(e,t){to(e),t.clearValue&&(e.value=void 0,e.lastValue=void 0),t.deleteEntry&&qr(e)}function ro(e,t,n={}){const o=It(e,t);oo(o,n)}function Kr(e,t={}){const n=jt.get(e);if(n)for(const o of n.values())oo(o,t)}function io(e,t){return{get:t?n=>{const o=e(n),r=n.shadowRoot||n.attachShadow({mode:"open",delegatesFocus:e.delegatesFocus||!1});return()=>(o(n,r),r)}:n=>{const o=e(n);return()=>(o(n,n),n)},observe(n,o){o()}}}const ao={string:(e,t,n)=>{const o=t?String(t):"";return o?e.setAttribute(n,o):e.removeAttribute(n),o},number:(e,t,n)=>{const o=Number(t);return e.setAttribute(n,o),o},boolean:(e,t,n)=>{const o=Boolean(t);return o?e.setAttribute(n,""):e.removeAttribute(n),o},undefined:(e,t,n)=>{const o=typeof t,r=o!=="undefined"&&ao[o];return r?r(e,t,n):(e.hasAttribute(n)&&e.removeAttribute(n),t)}},Yr={string:(e,t)=>e.getAttribute(t),number:(e,t)=>Number(e.getAttribute(t))||0,boolean:(e,t)=>e.hasAttribute(t),undefined:(e,t)=>e.getAttribute(t)};function Vr(e,t){const n=typeof t.value,o=ao[n],r=Yr[n];if(!o)throw TypeError(`Invalid default value for '${e}' property - it must be a string, number, boolean or undefined: ${n}`);const i=lt(e);return{get:(a,s)=>s===void 0?r(a,i)||t.value:s,set:(a,s)=>o(a,s,i),connect:n!=="undefined"?(a,s,c)=>(!a.hasAttribute(i)&&a[s]===t.value&&(a[s]=o(a,t.value,i)),t.connect&&t.connect(a,s,c)):t.connect,observe:t.observe}}const ut=new WeakMap,Pt=new WeakMap;function ln(e,t){if(t){const i=ut.get(t);if(e===i)return t;for(const a of Object.keys(i))a!=="tag"&&delete t.prototype[a]}else t=class extends globalThis.HTMLElement{connectedCallback(){for(const a of t.settable){if(!hasOwnProperty.call(this,a))continue;const s=this[a];delete this[a],this[a]=s}const i=new Set;Pt.set(this,i),eo(()=>{if(i===Pt.get(this)){for(const a of t.connects)i.add(a(this));for(const a of t.observers)i.add(a(this))}})}disconnectedCallback(){const i=Pt.get(this);for(const a of i)a&&a();Pt.delete(this),Kr(this)}};ut.set(t,Object.freeze(e));const n=new Set,o=new Set,r=new Set;for(const i of Object.keys(e)){if(i==="tag")continue;let a=e[i];const s=typeof a;if(s==="function")i==="render"?a=io(a,!0):i==="content"?a=io(a):a={get:a};else if(s!=="object"||a===null)a={value:a};else if(a.set){if(hasOwnProperty.call(a,"value"))throw TypeError(`Invalid property descriptor for '${i}' property - it must not have 'value' and 'set' properties at the same time.`);const c=lt(i),h=a.get||((g,f)=>f);a.get=(g,f)=>(f===void 0&&(f=a.set(g,g.getAttribute(c)||f)),h(g,f))}if(hasOwnProperty.call(a,"value"))a=Vr(i,a);else if(!a.get)throw TypeError(`Invalid descriptor for '${i}' property - it must contain 'value' or 'get' option`);a.set&&r.add(i),Object.defineProperty(t.prototype,i,{get:function(){return no(this,i,a.get)},set:a.set&&function(h){Ur(this,i,a.set,h)},enumerable:!0,configurable:!0}),a.connect&&n.add(c=>a.connect(c,i,()=>{ro(c,i)})),a.observe&&o.add(c=>Gr(c,i,a.get,a.observe))}return t.connects=n,t.observers=o,t.settable=r,t}const gt=new Map;function Zr(e){gt.size||an.then(()=>{zt(globalThis.document.body,t=>{if(gt.has(t.constructor)){const n=gt.get(t.constructor),o=ut.get(t.constructor);t.disconnectedCallback();for(const r of Object.keys(o)){const i=typeof o[r],a=i!=="object"&&i!=="function"&&o[r]!==n[r];a&&t.removeAttribute(lt(r)),ro(t,r,{clearValue:a})}t.connectedCallback()}}),gt.clear()}),gt.set(e,ut.get(e))}function so(e){if(!e.tag)throw TypeError("Error while defining hybrids: 'tag' property with dashed tag name is required");const t=globalThis.customElements.get(e.tag);if(t){if(ut.get(t))return Zr(t),ln(e,t),e;throw TypeError(`Custom element with '${e.tag}' tag name already defined outside of the hybrids context`)}return globalThis.customElements.define(e.tag,ln(e)),e}function Jr(e,{root:t="",prefix:n}={}){for(const o of Object.keys(e)){const r=e[o];if(!r.tag){const i=lt([].concat(t).reduce((a,s)=>a.replace(s,""),o).replace(/^[./]+/,"").replace(/\//g,"-").replace(/\.[a-zA-Z]+$/,""));r.tag=n?`${n}-${i}`:i}so(r)}return e}var ie=Object.freeze(Object.assign(so,{compile:e=>ln(e),from:Jr}));const ft=new WeakMap;function Se(e){let t=ft.get(e);return t||(ft.set(e,t={}),t)}function Bt(e){let t;for(;e&&(t=Se(e))&&t.endNode;)e=t.endNode;return e}function ht(e){if(e.nodeType===globalThis.Node.TEXT_NODE){const t=ft.get(e);if(t&&t.startNode){const n=Bt(t.endNode);let o=t.startNode;const r=n.nextSibling;for(;o;){const i=o.nextSibling;o.parentNode.removeChild(o),o=i!==r&&i}ft.set(e,{})}}else{let t=e.childNodes[0];for(;t;)e.removeChild(t),t=e.childNodes[0];ft.set(e,{})}}const Wr=Date.now(),Pe=(e=0)=>`H-${Wr}-${e}`,cn=!!(globalThis.document&&globalThis.document.adoptedStyleSheets),dn=/^\d+$/,_r={block:(e,t)=>({display:"block","text-align":t}),inline:({display:e})=>({display:`inline${e?`-${e}`:""}`}),contents:{display:"contents"},hidden:{display:"none"},...["row","row-reverse","column","column-reverse"].reduce((e,t)=>(e[t]=(n,o="nowrap")=>({display:"flex","flex-flow":`${t} ${o}`}),e),{}),grow:(e,t=1)=>({"flex-grow":t}),shrink:(e,t=1)=>({"flex-shrink":t}),basis:(e,t)=>({"flex-basis":ae(t)}),order:(e,t=0)=>({order:t}),grid:(e,t="1",n="",o="",r="")=>({display:"grid",...["columns","rows"].reduce((i,a)=>{const s=a==="columns"?t:n;return i[`grid-template-${a}`]=s&&s.split("|").map(c=>c.match(dn)?`repeat(${c}, minmax(0, 1fr))`:ae(c)).join(" "),i},{}),"grid-auto-flow":`${o} ${r&&"dense"}`}),area:(e,t="",n="")=>({"grid-column":t.match(dn)?`span ${t}`:t,"grid-row":n.match(dn)?`span ${n}`:n}),gap:(e,t=1,n="")=>({"column-gap":ae(t),"row-gap":ae(n||t)}),items:(e,t="start",n="")=>({"place-items":`${t} ${n}`}),content:(e,t="start",n="")=>({"place-content":`${t} ${n}`}),self:(e,t="start",n="")=>({"place-self":`${t} ${n}`}),center:{"place-items":"center","place-content":"center"},size:(e,t,n=t)=>({width:ae(t),height:ae(n),"box-sizing":"border-box"}),width:(e,t,n,o)=>({width:ae(t),"min-width":ae(n),"max-width":ae(o),"box-sizing":"border-box"}),height:(e,t,n,o)=>({height:ae(t),"min-height":ae(n),"max-height":ae(o),"box-sizing":"border-box"}),ratio:(e,t)=>({"aspect-ratio":t}),overflow:(e,t="hidden",n="")=>{const o=n?`-${t}`:"",r=n||t;return{[`overflow${o}`]:r,...r==="scroll"?{"flex-grow":e["flex-grow"]||1,"flex-basis":0,"overscroll-behavior":"contain","--webkit-overflow-scrolling":"touch"}:{}}},margin:(e,t="1",n,o,r)=>t.match(/top|bottom|left|right/)?{[`margin-${t}`]:ae(n||"1")}:{margin:`${ae(t)} ${ae(n)} ${ae(o)} ${ae(r)}`},padding:(e,t="1",n,o,r)=>t.match(/top|bottom|left|right/)?{[`padding-${t}`]:ae(n||"1")}:{padding:`${ae(t)} ${ae(n)} ${ae(o)} ${ae(r)}`},absolute:{position:"absolute"},relative:{position:"relative"},fixed:{position:"fixed"},sticky:{position:"sticky"},static:{position:"static"},inset:(e,t=0)=>{const n=ae(t);return{top:n,right:n,bottom:n,left:n}},top:(e,t=0)=>({top:ae(t)}),bottom:(e,t=0)=>({bottom:ae(t)}),left:(e,t=0)=>({left:ae(t)}),right:(e,t=0)=>({right:ae(t)}),layer:(e,t=1)=>({"z-index":t}),"":(e,t,...n)=>{if(n.length<2)throw new Error("Generic rule '::' requires at least two arguments, eg.: ::[property]:[name]");return{[n[n.length-2]]:`var(--${n.join("-")})`}},view:(e,t)=>({"view-transition-name":t})},$r={min:"min-content",max:"max-content",fit:"fit-content",full:"100%"},ei={portrait:"orientation: portrait",landscape:"orientation: landscape"};function ae(e){return e=$r[e]||e,/^-?\d+(\.\d+)*$/.test(String(e))?`${e*8}px`:e||""}let Ye;function lo(){if(Ye)return Ye;if(cn)Ye=new globalThis.CSSStyleSheet;else{const e=globalThis.document.createElement("style");e.appendChild(globalThis.document.createTextNode("")),globalThis.document.head.appendChild(e),Ye=e.sheet}return Ye.insertRule(":host([hidden]) { display: none; }"),Ye}const co=new WeakMap;let un=new WeakSet;function ti(e){const t=e.getRootNode();if(un.has(t))return;const n=lo();if(cn)t.adoptedStyleSheets=[...t.adoptedStyleSheets,n];else{if(t===globalThis.document)return;let o=co.get(t);o||(o=globalThis.document.createElement("style"),t.appendChild(o),co.set(t,o));let r="";for(let i=0;i<n.cssRules.length;i++)r+=n.cssRules[i].cssText;o.textContent=r}un.add(t)}const uo=new Map;function go(e,t,n,o){let r=uo.get(e);r||(r=`l-${Math.random().toString(36).substr(2,5)}`,uo.set(e,r)),cn||(un=new WeakSet);const i=lo(),[a,s=""]=t.split("@"),c=Object.entries(n.replace(/\s+/g," ").trim().split(" ").reduce((g,f)=>{const[b,...w]=f.split(":"),u=_r[b];if(!u)throw TypeError(`Unsupported layout rule: '${b}'`);return Object.assign(g,typeof u=="function"?u(g,...w.map(l=>l.match(/--.*/)?`var(${l})`:l)):u)},{})).reduce((g,[f,b])=>b!==void 0&&b!==""?g+`${f}: ${b};`:g,""),h=s.split(":").reduce((g,f)=>f===""?g:g+` and (${ei[f]||`min-width: ${f}`})`,"@media screen");if(o){const g=`:host(.${r}-s${a})`,f=`:where(.${r}-c${a})`;[g,f].forEach(b=>{i.insertRule(s?`${h} { ${b} { ${c} } }`:`${b} { ${c} }`,i.cssRules.length-1)})}else{const g=`.${r}${a}`;i.insertRule(s?`${h} { ${g} { ${c} } }`:`${g} { ${c} }`,i.cssRules.length-1)}return r}const gn=new WeakMap;function ni(e,t){const n=Se(e),o=n.startNode,r=Bt(n.endNode);t.parentNode.insertBefore(e,t.nextSibling);let i=e,a=o;for(;a;){const s=a.nextSibling;i.parentNode.insertBefore(a,i.nextSibling),i=a,a=s!==r.nextSibling&&s}}function oi(e,t,n,o,r){let i=gn.get(t);const a=n.map((g,f)=>({id:hasOwnProperty.call(g,"id")?g.id:f,value:g,placeholder:null,available:!0}));if(gn.set(t,a),i){const g=new Set;for(const f of a)g.add(f.id);i=i.filter(f=>g.has(f.id)?!0:(ht(f.placeholder),f.placeholder.parentNode.removeChild(f.placeholder),!1))}let s=t;const c=n.length-1,h=Se(t);for(let g=0;g<a.length;g+=1){const f=a[g];let b;if(i){for(let w=0;w<i.length;w+=1)if(i[w].available&&i[w].id===f.id){b=i[w];break}}b?(b.available=!1,f.placeholder=b.placeholder,f.placeholder.previousSibling!==s&&ni(f.placeholder,s),b.value!==f.value&&o(e,f.placeholder,f.value,b.value,r)):(f.placeholder=globalThis.document.createTextNode(""),s.parentNode.insertBefore(f.placeholder,s.nextSibling),o(e,f.placeholder,f.value,void 0,r)),s=Bt(Se(f.placeholder).endNode||f.placeholder),g===0&&(h.startNode=f.placeholder),g===c&&(h.endNode=s)}if(i)for(const g of i)g.available&&(ht(g.placeholder),g.placeholder.parentNode.removeChild(g.placeholder))}function ri(e,t,n){ht(t);const o=Se(t);o.startNode=o.endNode=n,t.parentNode.insertBefore(n,t.nextSibling)}function fo(e){const t=typeof e;if(t==="object"){if(Array.isArray(e))return"array";if(e instanceof globalThis.Node)return"node"}return t}function pt(e,t,n,o,r){const i=fo(n),a=fo(o);switch(a!=="undefined"&&i!==a&&(i!=="function"&&ht(t),a==="array"?gn.delete(t):a!=="node"&&a!=="function"&&(t.textContent="")),i){case"array":oi(e,t,n,pt,r);break;case"node":ri(e,t,n);break;case"function":r&&(n.useLayout=!0),n(e,t);break;default:t.textContent=i==="number"||n?n:""}}const fn=new WeakMap;function ii(e){return(t,n,o,r)=>{if(r){const i=fn.get(n);n.removeEventListener(e,i.get(r),r.options!==void 0?r.options:!1)}if(o){if(typeof o!="function")throw Error(`Event listener must be a function: ${typeof o}`);let i=fn.get(n);i||(i=new WeakMap,fn.set(n,i));const a=o.bind(null,t);i.set(o,a),n.addEventListener(e,a,o.options!==void 0?o.options:!1)}}}function ai(e,t=new Set){if(Array.isArray(e))for(const n of e)n&&t.add(n);else if(e!==null&&typeof e=="object")for(const[n,o]of Object.entries(e))n&&o&&t.add(n);else e&&t.add(e);return t}const ho=new WeakMap;function si(e,t,n){const o=ho.get(t)||new Set,r=ai(n);ho.set(t,r);for(const i of r)t.classList.add(i),o.delete(i);for(const i of o)t.classList.remove(i)}const po=new WeakMap;function li(e,t,n){if(n===null||typeof n!="object")throw TypeError(`Style value must be an object in ${Ht(t)}:`,n);const o=po.get(t)||new Map,r=new Map;for(const i of Object.keys(n)){const a=lt(i),s=n[i];!s&&s!==0?t.style.removeProperty(a):t.style.setProperty(a,s),r.set(a,s),o.delete(a)}for(const i of o.keys())t.style[i]="";po.set(t,r)}function ci(e,t,n){if(t.substr(0,2)==="on"){const o=t.substr(2);return ii(o)}switch(e){case"class":return si;case"style":return li;default:{let o=!1;return(r,i,a)=>{if(o=o||!n&&!(i instanceof globalThis.SVGElement)&&t in i,o)i[t]=a;else if(a===!1||a===void 0||a===null)i.removeAttribute(e);else{const s=a===!0?"":String(a);i.setAttribute(e,s)}}}}}const vo=Pe("(\\d+)"),vt=new RegExp(`^${vo}$`),Ve=new RegExp(vo,"g"),di=/^[^A-Za-z]+$/;function ui(e){let t=e[0],n=!1;for(let o=1;o<e.length;o+=1)n=n||e[o-1].match(/<\s*(table|tr|thead|tbody|tfoot|colgroup)([^<>]|"[^"]*"|'[^']*')*>\s*$/),t+=(n?`<!--${Pe(o-1)}-->`:Pe(o-1))+e[o],n=n&&!e[o].match(/<\/\s*(table|tr|thead|tbody|tfoot|colgroup)\s*>/);return t}function gi(e){return e.replace(/\s*=\s*['"]*$/g,"").split(/\s+/).pop()}function mo(e){return globalThis.document.createTreeWalker(e,globalThis.NodeFilter.SHOW_ELEMENT|globalThis.NodeFilter.SHOW_TEXT|globalThis.NodeFilter.SHOW_COMMENT,null,!1)}function fi(e,t=0){e=e.replace(/(^[\n\s\t ]+)|([\n\s\t ]+$)+/g,"");let n=e.indexOf(` `);if(n>-1){let o=0-t-2;for(n+=1;e[n]===" "&&n<e.length;n+=1)o+=1;return e.replace(/\n +/g,r=>r.substr(0,Math.max(r.length-o,1)))}return e}function yo(e,t){const n=Pe(t);return`${fi(e).split(` `).filter(r=>r).map(r=>{const i=r.indexOf(n);return i>-1?`| ${r} --${"-".repeat(i)}${"^".repeat(6)}`:`| ${r}`}).join(` `).replace(Ve,"${...}")}`}const bo=new Map,Do=new WeakMap;function hi(e,t){const n=Do.get(e);if(!n&&!t)return;const o=t&&t.map(i=>{let a=i;return a instanceof globalThis.CSSStyleSheet||(a=bo.get(i),a||(a=new globalThis.CSSStyleSheet,a.replaceSync(i),bo.set(i,a))),a});let r;if(n){if(o&&o.length===n.length&&o.every((i,a)=>i===n[a]))return;r=e.adoptedStyleSheets.filter(i=>!n.includes(i))}o&&(r=(r||e.adoptedStyleSheets).concat(o)),e.adoptedStyleSheets=r,Do.set(e,o)}const hn=new WeakMap;function wo(e,t){let n=hn.get(e);if(t){(!n||n.parentNode!==e)&&(n=globalThis.document.createElement("style"),hn.set(e,n),e=Bt(e),e.nodeType===globalThis.Node.TEXT_NODE?e.parentNode.insertBefore(n,e.nextSibling):e.appendChild(n));const o=[...t].join(` /*------*/ `);n.textContent!==o&&(n.textContent=o)}else n&&(n.parentNode.removeChild(n),hn.set(e,null))}const Co=new WeakMap;function pi(e,t){let n=Co.get(e);n||(n=e.adoptedStyleSheets?hi:wo,Co.set(e,n)),n(e,t)}function vi(e,t,n,o){let r=globalThis.document.createElement("template");const i={},a=n?e:ui(e);if(r.innerHTML=t?`<svg>${a}</svg>`:a,t){const u=r.content.firstChild;r.content.removeChild(u);for(const l of Array.from(u.childNodes))r.content.appendChild(l)}let s;const c=r.content.children[0];if(c instanceof globalThis.HTMLTemplateElement){for(const u of Array.from(c.attributes)){const l=u.value.trim();if(l&&u.name.startsWith("layout")){if(l.match(Ve))throw Error("Layout attribute cannot contain expressions");s=go(c,u.name.substr(6),l,!0)}}if(s!==void 0&&r.content.children.length>1)throw Error("Template, which uses layout system must have only the '<template>' root element");o=s||c.hasAttribute("layout"),r=c}const h=mo(r.content),g=[];let f=0,b=null;for(;h.nextNode();){let u=h.currentNode;if(b&&!b.contains(u)&&(b=null),u.nodeType===globalThis.Node.COMMENT_NODE&&vt.test(u.textContent)&&(u.parentNode.insertBefore(globalThis.document.createTextNode(u.textContent),u.nextSibling),h.nextNode(),u.parentNode.removeChild(u),u=h.currentNode),u.nodeType===globalThis.Node.TEXT_NODE){let l=u.textContent;const d=l.match(vt);if(d)u.textContent="",i[d[1]]=[f,pt];else{if(Ni()&&!n&&!b&&!l.match(/^\s*$/)){let p;const y=l.trim(),D=y.replace(/\s+/g," ").replace(Ve,(C,x)=>(x=Number(x),p===void 0&&(p=x),`\${${x-p}}`));if(!D.match(di)){let C=u.previousSibling&&u.previousSibling.nodeType===globalThis.Node.COMMENT_NODE?u.previousSibling:"";C&&(C.parentNode.removeChild(C),f-=1,C=(C.textContent.split("|")[1]||"").trim().replace(/\s+/g," "));const x=Pi(D,C).replace(/\${(\d+)}/g,(T,H)=>Pe(Number(H)+p));l=l.replace(y,x),u.textContent=l}}const v=l.match(Ve);if(v){let p=u;v.reduce((y,D)=>{const[C,x]=y.pop().split(D);return C&&y.push(C),y.push(D),x&&y.push(x),y},[l]).forEach((y,D)=>{D===0?p.textContent=y:(p=p.parentNode.insertBefore(globalThis.document.createTextNode(y),p.nextSibling),h.currentNode=p,f+=1);const C=p.textContent.match(vt);C&&(p.textContent="",i[C[1]]=[f,pt])})}}}else if(u.nodeType===globalThis.Node.ELEMENT_NODE){if(!b&&(u.getAttribute("translate")==="no"||u.tagName.toLowerCase()==="script"||u.tagName.toLowerCase()==="style")&&(b=u),sn){const l=u.tagName.toLowerCase();l.match(/.+-.+/)&&!globalThis.customElements.get(l)&&!g.includes(l)&&g.push(l)}for(const l of Array.from(u.attributes)){const d=l.value.trim(),v=l.name;if(o&&v.startsWith("layout")&&d){if(d.match(Ve))throw Error("Layout attribute cannot contain expressions");const y=go(u,v.substr(6),d);u.removeAttribute(v),u.classList.add(y);continue}const p=d.match(vt);if(p){const y=gi(e[p[1]]);i[p[1]]=[f,ci(v,y,t)],u.removeAttribute(l.name)}else{const y=d.match(Ve);if(y){const D=`attr__${v}`;for(const[C,x]of y.entries()){const[,T]=x.match(vt);let H=!1;i[T]=[f,(E,A,z)=>{const N=Se(A);N[D]=(N[D]||d).replace(x,z==null?"":z),(y.length===1||C+1===y.length)&&(H=H||!t&&!(A instanceof globalThis.SVGElement)&&v in A,H?A[v]=N[D]:A.setAttribute(v,N[D]),N[D]=void 0)}]}l.value=""}}}}f+=1}sn&&g.length&&console.warn(`Not defined ${g.map(u=>`<${u}>`).join(", ")} element${g.length>1?"s":""} found in the template: ${yo(a,-1)}`);const w=Object.keys(i);return function(l,d,v,{styleSheets:p}){let y=Se(d);if(r!==y.template){const D=globalThis.document.importNode(r.content,!0),C=mo(D),x=[];let T=0,H=0,E=i[w[H]];for(;C.nextNode();){const A=C.currentNode;for(;E&&E[0]===T;)x.push({index:w[H],node:A,fn:E[1]}),H+=1,E=i[w[H]];T+=1}if(y.hostLayout&&l.classList.remove(y.hostLayout),ht(d),y=Se(d),y.template=r,y.markers=x,d.nodeType===globalThis.Node.TEXT_NODE){wo(d),y.startNode=D.childNodes[0],y.endNode=D.childNodes[D.childNodes.length-1];let A=d,z=D.childNodes[0];for(;z;)d.parentNode.insertBefore(z,A.nextSibling),A=z,z=D.childNodes[0]}else{if(o){const A=`${s}-${l===d?"c":"s"}`;l.classList.add(A),y.hostLayout=A}d.appendChild(D)}o&&ti(d)}pi(d,p);for(const D of y.markers){const C=v[D.index],x=y.prevArgs&&y.prevArgs[D.index];if(!(y.prevArgs&&C===x))try{D.fn(l,D.node,C,x,o)}catch(T){throw console.error(`Error while updating template expression in ${Ht(l)}: ${yo(a,D.index)}`),T}}y.prevArgs=v}}const pn=new WeakMap;function mi(e,t,n=200){return function o(r,i){const a=o.useLayout;let s;t&&(s=setTimeout(()=>{s=void 0,pt(r,i,t,void 0,a)},n)),pn.set(i,e),e.then(c=>{s&&clearTimeout(s),pn.get(i)===e&&(pt(r,i,c,t&&!s?t:void 0,a),pn.set(i,null))})}}function Ao({target:e,detail:t},n){let o;switch(e.type){case"radio":case"checkbox":o=e.checked&&e.value;break;case"file":o=e.files;break;default:o=t&&hasOwnProperty.call(t,"value")?t.value:e.value}n(o)}function yi(e,t){return e.split(".").reverse().reduce((n,o)=>n?{[o]:n}:{[o]:t},null)}const xo=new Map;function bi(e,t){if(!e)throw Error(`The first argument must be a property name or an object instance: ${e}`);if(typeof e=="object"){if(t===void 0)throw Error("For model instance property the second argument must be defined");const o=Rr.get(e);if(!o)throw Error("Provided object must be a model instance of the store");return t===null?()=>{o.set(e,null)}:(r,i)=>{Ao(i,a=>{o.set(e,yi(t,a))})}}if(arguments.length===2)return o=>{o[e]=t};let n=xo.get(e);return n||(n=(o,r)=>{Ao(r,i=>{o[e]=i})},xo.set(e,n)),n}let Qt;var Di=globalThis.document&&globalThis.document.startViewTransition!==void 0&&function(t){return function n(o,r){if(Qt){console.warn(`${Ht(o)}: view transition already started in ${Ht(Qt)}`),t(o,r);return}t.useLayout=n.useLayout,Qt=o,globalThis.document.startViewTransition(()=>(t(o,r),an.then(()=>{Qt=void 0})))}}||(e=>e),wi=Object.freeze(Object.defineProperty({__proto__:null,resolve:mi,set:bi,transition:Di},Symbol.toStringTag,{value:"Module"}));function Ci(e){return this.id=e,this}function Ai(...e){return this.styleSheets=this.styleSheets||[],this.styleSheets.push(...e),this}function xi(e,...t){this.styleSheets=this.styleSheets||[];let n=e[0];for(let o=1;o<e.length;o++)n+=(t[o-1]!==void 0?t[o-1]:"")+e[o];return this.styleSheets.push(n),this}function Mi(e){return this.plugins=this.plugins||[],this.plugins.push(e),this}var Ti=Object.freeze(Object.defineProperty({__proto__:null,key:Ci,style:Ai,css:xi,use:Mi},Symbol.toStringTag,{value:"Module"}));const Oi=Pe(),Ei=Pe("svg"),Hi=Pe("msg"),zi=Pe("layout"),Mo=new Map;function ji(e,t,n,o){function r(i,a=i){let s=o?e+Hi:e.join(Oi);n&&(s+=Ei);const c=r.useLayout;c&&(s+=zi);let h=Mo.get(s);h||(h=vi(e,n,o,c),Mo.set(s,h)),r.plugins?r.plugins.reduce((g,f)=>f(g),()=>h(i,a,t,r))(i,a):h(i,a,t,r)}return Object.assign(r,Ti)}function Q(e,...t){return ji(e,t,!1,!1)}Object.freeze(Object.assign(Q,wi));const kt=new Map,To=new Map;let Oo=null;const Ii=(()=>{let e;try{e=globalThis.navigator.languages||[globalThis.navigator.language]}catch{e=[]}return e.reduce((t,n)=>{const o=n.split("-")[0];return t.add(n),n!==o&&t.add(o),t},new Set)})();function Ni(){return Oo!==null||kt.size}const Eo=new Map;function Pi(e,t,n=[]){e=e.trim().replace(/\s+/g," "),t=t.trim();const o=`${e} | ${t}`;let r=To.get(o);if(!r){if(kt.size)for(const i of Ii){const a=kt.get(i);if(a&&(r=a[o]||a[e],r)){if(r=r.message,typeof r=="object"){let s=Eo.get(i);s||(s=new Intl.PluralRules(i),Eo.set(i,s));const c=r;r=h=>h===0&&c.zero||c[s.select(h)]||c.other||""}break}}r||r||(r=e,(kt.size||Oo)&&sn&&console.warn(`Missing translation: "${e}"${t?` [${t}]`:""}`)),To.set(o,r)}return typeof r=="function"?r(n[0]):r}var vn=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16 17.8385L22.1518 23.9903L23.9903 22.1518L17.8385 16L23.9903 9.84817L22.1518 8.0097L16 14.1615L9.84812 8.00964L8.00964 9.84812L14.1615 16L8.00964 22.1518L9.84812 23.9903L16 17.8385Z" fill="currentColor" /> </svg>`,Ho=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="currentColor" /> </svg> `,Bi=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.23999C6.475 2.23999 2 6.71499 2 12.24C2 16.665 4.8625 20.4025 8.8375 21.7275C9.3375 21.815 9.525 21.515 9.525 21.2525C9.525 21.015 9.5125 20.2275 9.5125 19.39C7 19.8525 6.35 18.7775 6.15 18.215C6.0375 17.9275 5.55 17.04 5.125 16.8025C4.775 16.615 4.275 16.1525 5.1125 16.14C5.9 16.1275 6.4625 16.865 6.65 17.165C7.55 18.6775 8.9875 18.2525 9.5625 17.99C9.65 17.34 9.9125 16.9025 10.2 16.6525C7.975 16.4025 5.65 15.54 5.65 11.715C5.65 10.6275 6.0375 9.72749 6.675 9.02749C6.575 8.77749 6.225 7.75249 6.775 6.37749C6.775 6.37749 7.6125 6.11499 9.525 7.40249C10.325 7.17749 11.175 7.06499 12.025 7.06499C12.875 7.06499 13.725 7.17749 14.525 7.40249C16.4375 6.10249 17.275 6.37749 17.275 6.37749C17.825 7.75249 17.475 8.77749 17.375 9.02749C18.0125 9.72749 18.4 10.615 18.4 11.715C18.4 15.5525 16.0625 16.4025 13.8375 16.6525C14.2 16.965 14.5125 17.565 14.5125 18.5025C14.5125 19.84 14.5 20.915 14.5 21.2525C14.5 21.515 14.6875 21.8275 15.1875 21.7275C17.1727 21.0573 18.8977 19.7815 20.1198 18.0795C21.3419 16.3776 21.9995 14.3352 22 12.24C22 6.71499 17.525 2.23999 12 2.23999Z" fill="currentColor" /> </svg>`,Ze="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI0LjAxMzMgNS4wNjY0MUwxOS45ODMzIDEyLjA0NjVMMTUuOTUzNSA1LjA2NjQxSDIuNTMzMkwxOS45ODM1IDM1LjI5MTVMMzcuNDMzNyA1LjA2NjQxSDI0LjAxMzNaIiBmaWxsPSIjNDJCOTgzIi8+CjxwYXRoIGQ9Ik0yNC4wMTM3IDUuMDY2NDFMMTkuOTgzNyAxMi4wNDY1TDE1Ljk1MzggNS4wNjY0MUg5LjUxMzY3TDE5Ljk4MzggMjMuMjAxMUwzMC40NTM5IDUuMDY2NDFIMjQuMDEzN1oiIGZpbGw9IiMzNTQ5NUUiLz4KPC9zdmc+Cg==",Lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yOC4xMTc1IDUuOTE4OTVDMjguNTIxIDYuMTUxOTIgMjguOTAxOCA2LjY1MjE3IDI5LjEwOTIgNy42MjE2QzI5LjMxNjUgOC41OTA4NyAyOS4zMTYgOS44OTcwNiAyOS4wNjIxIDExLjQ4MThDMjguOTgzMS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1LjEzODZMMzMuNDIyMiAzLjM0OTY3SDIzLjIwNDJMMjMuMTg2MSAzLjMzMzAxWk0yMy4yMDU2IDE4LjcxMDhMMTQuMjE4MSAyNy42Nzg4TDIzLjIwNDIgMzYuNjY1SDMzLjQ0NDRMMjQuNDcyMiAyNy42ODE2TDMzLjQ0NDQgMTguNzA5NEwyMy4yMDU2IDE4LjcxMDhaIiBmaWxsPSIjNDREMUZEIi8+Cjwvc3ZnPgo=";function jo(e){if(!e)return;function t(){requestAnimationFrame(()=>{if(!e||!e.shadowRoot||e.patchDom)return;const n=document.createElement("div");n.setAttribute("slot","__render_content__"),n.innerHTML=e.shadowRoot.innerHTML,e.appendChild(n)})}return window.addEventListener("load",t),()=>window.removeEventListener("load",t)}function mn(){return/\/components\//.test(location.pathname)}function Io(){return/\/global-configuration/.test(location.pathname)}const yn={get:(e,t)=>t||{},set:(e,t)=>t,connect:e=>{const t=()=>{const n={};e.platform==="mobile"&&(window.innerWidth<960?n.paddingRight="0px":n.paddingRight=mn()?"400px":""),e.mobileBodyStyle=n};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}};function Ue(){return location.host.includes("oa.com")}function No(e=()=>{}){const t=document.documentElement,n={attributes:!0},o=i=>{for(const a of i)if(a.attributeName==="theme-mode"){const s=a.target.getAttribute("theme-mode")||"light";s&&e(s)}},r=new MutationObserver(o);return r.observe(t,n),r}function ze(){return/-en$/.test(location.pathname)?"en":"zh"}function Rt(e,t=!0){return e===void 0?t:typeof e=="string"?e==="true":Boolean(e)}const Qi=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(""),Po=[];function ki(){if(ze()==="en"){const t=location.pathname.slice(0,-3);location.pathname=t}else location.pathname==="/"?location.pathname="index-en":location.pathname=`${location.pathname}-en`}function Li(e=ki){Po.includes(e)||(Po.push(e),document.addEventListener("tdesign_site_lang",e))}function se(e){return ze()==="en"?`${e}-en`:e}se("/design"),se("/source"),se("/about"),se("/vue/overview"),se("/vue-next/overview"),se("/react/overview"),se("/mobile-vue/overview"),se("/mobile-react/overview"),se("/flutter/overview"),se("/miniprogram/overview"),se("/qq-miniprogram/overview");const Si=()=>{const e=Ue(),n=ze()==="en",o=[{name:n?"Design":"\u8BBE\u8BA1",path:se("/design"),type:"main",target:"_self"},{name:n?"Components":"\u57FA\u7840\u7EC4\u4EF6",path:se("/vue/overview"),type:"base",target:"_self"},e?{name:n?"Industry component":"\u884C\u4E1A\u7EC4\u4EF6",path:"/trade",type:"main",target:"_self"}:null,{name:n?"Templates":"\u9875\u9762\u6A21\u677F",path:"https://tdesign.tencent.com/starter/",type:"main",target:"_self"},{name:n?"Resources":"\u8D44\u6E90",path:se("/source"),type:"main",target:"_self"},{name:n?"About":"\u5173\u4E8E",path:se("/about/introduce"),type:"main",target:"_self"}].filter(a=>a),r={web:{name:n?"Web PC":"Web \u684C\u9762\u7AEF",links:[{name:"Vue",icon:Ze,path:se("/vue/overview"),npm:"tdesign-vue",status:1},{name:"Vue Next",icon:Ze,path:se("/vue-next/overview"),npm:"tdesign-vue-next",status:1},{name:"React",icon:Lt,path:se("/react/overview"),npm:"tdesign-react",status:1}]},mobile:{name:n?"Mobile":"Mobile \u79FB\u52A8\u7AEF",links:[{name:"Vue Next",icon:Ze,path:se("/mobile-vue/overview"),npm:"tdesign-mobile-vue",status:1},{name:"React",icon:Lt,path:se("/mobile-react/overview"),npm:"tdesign-mobile-react",status:2},{name:"Flutter",icon:zo,path:se("/flutter/overview"),npm:"tdesign-flutter",status:2},{name:n?"WeChat-Miniprogram":"\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F",icon:St,path:se("/miniprogram/overview"),npm:"tdesign-miniprogram",status:1},{name:n?"QQ-Miniprogram":"QQ \u5C0F\u7A0B\u5E8F",icon:St,path:se("/qq-miniprogram/overview"),npm:"tdesign-qq-miniprogram",status:2}]}};return{headerList:o,baseComponentsLinks:r,baseComponentPrefix:["vue","react","mobile-vue","mobile-react","vue-next","flutter","miniprogram"]}};var Ri=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M2 5C2 3.34315 3.34315 2 5 2H7C8.65685 2 10 3.34315 10 5V11H8V8.5H4V11H2V5ZM4 6.5H8V5C8 4.44772 7.55228 4 7 4H5C4.44772 4 4 4.44772 4 5V6.5ZM12 3.5H18C19.6569 3.5 21 4.84315 21 6.5V9H19V6.5C19 5.94772 18.5523 5.5 18 5.5H12V3.5ZM18 11.5V13H22V15H20.9381C20.7182 16.7638 19.9241 18.3492 18.7488 19.5634C19.4441 19.845 20.2041 20 21 20H22V22H21C19.5425 22 18.1765 21.6102 17.0001 20.9297C15.8234 21.6104 14.4572 22 13 22H12V20H13C13.7962 20 14.5562 19.8449 15.2514 19.5633C14.6487 18.9407 14.1463 18.2205 13.7704 17.4291L13.3413 16.5258L15.1478 15.6676L15.5769 16.5709C15.9219 17.2971 16.4081 17.9427 16.9999 18.4723C17.9921 17.5843 18.687 16.371 18.917 15H12V13H16V11.5H18ZM6 13V19C6 19.5523 6.44772 20 7 20H9.5V22H7C5.34315 22 4 20.6569 4 19V13H6Z" fill="currentColor"/> </svg> `,Xi=`.TDesign-base-components-links{display:flex;flex-direction:column;padding:16px;width:832px;box-sizing:border-box;row-gap:16px}.TDesign-base-components-links__web,.TDesign-base-components-links__mobile{display:flex;flex-direction:column;row-gap:8px}.TDesign-base-components-links__list{display:flex;flex-wrap:wrap;gap:4px}.TDesign-base-components-links .title{color:var(--text-placeholder);margin:0 8px;font-size:14px;line-height:22px}.TDesign-base-components-links .link{border-radius:6px;transition:all .2s linear;color:var(--text-secondary);text-decoration:none;padding:8px;display:inline-flex;align-items:center;width:264px;box-sizing:border-box}.TDesign-base-components-links .link:not(.disabled):hover{color:var(--text-primary);background:var(--bg-color-container-hover)}.TDesign-base-components-links .link .details{display:flex;flex-direction:column}.TDesign-base-components-links .link .name{font-size:14px;line-height:24px;height:24px}.TDesign-base-components-links .link .version{font-size:14px;line-height:22px;color:var(--text-placeholder)}.TDesign-base-components-links .link .icon{max-width:40px;max-height:40px;margin-right:8px}.TDesign-base-components-links .link.active{color:var(--text-primary);background:var(--bg-color-container-select)}.TDesign-base-components-links .link.disabled{cursor:no-drop}.TDesign-base-components-links .link .disable-tag,.TDesign-base-components-links .link .alpha-tag,.TDesign-base-components-links .link .beta-tag,.TDesign-base-components-links .link .rc-tag,.TDesign-base-components-links .link .stable-tag{font-size:12px;border-radius:var(--border-radius);padding:2px 4px;margin-left:4px;vertical-align:bottom}.TDesign-base-components-links .link .disable-tag{color:var(--text-secondary);background:var(--bg-color-tag)}.TDesign-base-components-links .link .alpha-tag{color:var(--brand-main);background:var(--brand-main-light);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.TDesign-base-components-links .link .beta-tag,.TDesign-base-components-links .link .rc-tag{color:var(--success-main);background:var(--success-main-light);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.TDesign-base-components-links .link .stable-tag{color:#029cd4;background:rgba(2,156,212,.1);font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}@media screen and (max-width: 960px){.TDesign-base-components-links{display:none}} `,Fi=`:host{position:relative;--header-inner-max-width: 100%;--header-inner-padding: 0 24px;--search-display: block}@media screen and (max-width: 1200px){:host{--search-display: none}}.TDesign-header-notice{width:100%;line-height:24px;padding:8px 16px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;position:relative}.TDesign-header-notice.primary{background-color:var(--brand-main)}.TDesign-header-notice__content{cursor:pointer;color:#ffffffe6;transition:all .2s}.TDesign-header-notice__content:hover{color:#fff}.TDesign-header-notice__close{display:inline-flex;align-items:center;position:absolute;right:8px;cursor:pointer;transition:all .2s;color:#ffffffe6}.TDesign-header-notice__close:hover{color:#fff}.TDesign-header-notice__close svg{width:16px;height:16px}.TDesign-header{height:var(--header-height);background-color:var(--bg-color-container);color:var(--text-secondary);position:relative;z-index:1400;box-shadow:var(--header-box-shadow)}.TDesign-header-inner{padding:var(--header-inner-padding);height:100%;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;max-width:var(--header-inner-max-width);margin:auto;transition:all .25s var(--anim-time-fn-easing)}.TDesign-header-left{display:flex;align-items:center}.TDesign-header .slot-search{display:var(--search-display)}.TDesign-header-nav{display:flex;align-items:center;justify-content:flex-start;column-gap:8px}.TDesign-header-nav__link{cursor:pointer;padding:4px 16px;box-sizing:border-box;height:32px;line-height:24px;color:var(--text-primary);text-decoration:none;border-radius:var(--border-radius);transition:all .1s;display:inline-block;vertical-align:middle;word-break:keep-all;flex-shrink:0}.TDesign-header-nav__link:hover{background:var(--bg-color-container-hover)}.TDesign-header-nav__link:hover .icon svg path{d:path("M3.75 10.2002L7.99274 5.7998L12.2361 10.0425")}.TDesign-header-nav__link.active{color:var(--text-primary);background:var(--bg-color-container-select)}.TDesign-header-nav__link .icon{width:16px;height:16px;display:inline-block;vertical-align:middle;margin-top:-4px;margin-left:4px}.TDesign-header-nav__link .icon svg path{transition:d .2s;stroke:currentColor}.TDesign-header-nav__git,.TDesign-header-nav__translate{display:inline-flex;color:var(--text-primary);border-radius:var(--border-radius);transition:all .2s linear;width:32px;height:32px;align-items:center;justify-content:center;cursor:pointer}.TDesign-header-nav__git:hover,.TDesign-header-nav__translate:hover{background:var(--bg-color-container-hover)}.TDesign-header-nav__git-icon,.TDesign-header-nav__translate-icon{width:24px;height:24px;display:inline-block}.TDesign-header-nav td-theme-tabs{margin-left:8px} `;const Ui=Si(),{headerList:Bo,baseComponentsLinks:mt,baseComponentPrefix:Gi}=Ui;function Xt(e,t,n){t.preventDefault(),n.status&&(location.href=n.path)}function Ft(e){if(e===0)return Q`<span class="disable-tag">待上线</span>`;if(e===1)return Q`<span class="stable-tag">Stable</span>`;if(e===2)return Q`<span class="alpha-tag">Alpha</span>`;if(e===3)return Q`<span class="beta-tag">Beta</span>`;if(e===4)return Q`<span class="rc-tag">Rc</span>`}function bn(e){return/^https?:/.test(e)?location.href.includes(e):location.pathname.includes(e)}function qi(e){if(location.host!=="tdesign.tencent.com"&&!localStorage.getItem("TDesign_notice"))return Q``;const{notice:t}=e;let n=location.pathname.split("/")[1]||"site";["design","source","about"].includes(n)&&(n="site");let o=t[n];if(o!=null&&o.title||(o=t.all),!(o!=null&&o.title))return Q``;if(localStorage.getItem("TDesign_notice_closed")===(o==null?void 0:o.title))return Q``;const r=(s="96px")=>{const c=document.querySelector("td-doc-aside");c&&(c.style.setProperty("--aside-top",s),c.shadowRoot.querySelector(".TDesign-doc-aside").style.top=s)},i=()=>{!e.shadowRoot||(e.shadowRoot.querySelector(".TDesign-header-notice").style.display="none",r("64px"),localStorage.setItem("TDesign_notice_closed",o==null?void 0:o.title))},a=()=>{!(o!=null&&o.actionUrl)||(location.href=o.actionUrl)};return r(),Q` <div class="TDesign-header-notice ${o.type}"> <div class="TDesign-header-notice__content" onclick="${a}">${o.title}</div> ${o.closeable&&Q`<i class="TDesign-header-notice__close" innerHTML="${vn}" onclick="${i}"></i>`} </div> `}function Ki(e,t){return Q` <td-doc-popup placement="bottom" portalStyle="${Xi}"> ${t} <div slot="content" class="TDesign-base-components-links"> <div class="TDesign-base-components-links__web"> <p class="title">${mt.web.name}</p> <div class="TDesign-base-components-links__list"> ${mt.web.links.map(n=>Q` <a href="${n.path}" class="link ${bn(n.path)?"active":""} ${n.status?"":"disabled"}" onclick=${(o,r)=>Xt(o,r,n)} > <img class="icon" src="${n.icon}" /> <div class="details"> <span class="name"> ${n.name} ${Ft(n.status)} </span> <span class="version"> ${n.status?`Version\uFF1A${e.npmVersions[n.npm]}`:"\u656C\u8BF7\u671F\u5F85"} </span> </div> </a> `)} </div> </div> <div class="TDesign-base-components-links__mobile"> <p class="title">${mt.mobile.name}</p> <div class="TDesign-base-components-links__list"> ${mt.mobile.links.map(n=>Q` <a href="${n.path}" class="link ${bn(n.path)?"active":""} ${n.status?"":"disabled"}" onclick=${(o,r)=>Xt(o,r,n)} > <img class="icon" src="${n.icon}" /> <div class="details">