vendor: 4,145 bytes, line 1
1import{a as F,r as de,c as J,b as fe}from"./dom-Xe6xwxlI.min.js";var Q=11;function ce(e,r){var t=r.attributes,n,a,d,f,S;if(!(r.nodeType===Q||e.nodeType===Q)){for(var A=t.length-1;A>=0;A--)n=t[A],a=n.name,d=n.namespaceURI,f=n.value,d?(a=n.localName||a,S=e.getAttributeNS(d,a),S!==f&&(n.prefix==="xmlns"&&(a=n.name),e.setAttributeNS(d,a,f))):(S=e.getAttribute(a),S!==f&&e.setAttribute(a,f));for(var v=e.attributes,o=v.length-1;o>=0;o--)n=v[o],a=n.name,d=n.namespaceURI,d?(a=n.localName||a,r.hasAttributeNS(d,a)||e.removeAttributeNS(d,a)):r.hasAttribute(a)||e.removeAttribute(a)}}var R,ve="http://www.w3.org/1999/xhtml",h=typeof document>"u"?void 0:document,oe=!!h&&"content"in h.createElement("template"),pe=!!h&&h.createRange&&"createContextualFragment"in h.createRange();function ge(e){var r=h.createElement("template");return r.innerHTML=e,r.content.childNodes[0]}function he(e){R||(R=h.createRange(),R.selectNode(h.body));var r=R.createContextualFragment(e);return r.childNodes[0]}function Ae(e){var r=h.createElement("body");return r.innerHTML=e,r.childNodes[0]}function Te(e){return e=e.trim(),oe?ge(e):pe?he(e):Ae(e)}function B(e,r){var t=e.nodeName,n=r.nodeName,a,d;return t===n?!0:(a=t.charCodeAt(0),d=n.charCodeAt(0),a<=90&&d>=97?t===n.toUpperCase():d<=90&&a>=97?n===t.toUpperCase():!1)}function ye(e,r){return!r||r===ve?h.createElement(e):h.createElementNS(r,e)}function Se(e,r){for(var t=e.firstChild;t;){var n=t.nextSibling;r.appendChild(t),t=n}return r}function X(e,r,t){e[t]!==r[t]&&(e[t]=r[t],e[t]?e.setAttribute(t,""):e.removeAttribute(t))}var Z={OPTION:function(e,r){var t=e.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!r.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),t.selectedIndex=-1)}X(e,r,"selected")},INPUT:function(e,r){X(e,r,"checked"),X(e,r,"disabled"),e.value!==r.value&&(e.value=r.value),r.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,r){var t=r.value;e.value!==t&&(e.value=t);var n=e.firstChild;if(n){var a=n.nodeValue;if(a==t||!t&&a==e.placeholder)return;n.nodeValue=t}},SELECT:function(e,r){if(!r.hasAttribute("multiple")){for(var t=-1,n=0,a=e.firstChild,d,f;a;)if(f=a.nodeName&&a.nodeName.toUpperCase(),f==="OPTGROUP")d=a,a=d.firstChild;else{if(f==="OPTION"){if(a.hasAttribute("selected")){t=n;break}n++}a=a.nextSibling,!a&&d&&(a=d.nextSibling,d=null)}e.selectedIndex=t}}},w=1,ee=11,te=3,ne=8;function L(){}function me(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function be(e){return function(t,n,a){if(a||(a={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var d=n;n=h.createElement("html"),n.innerHTML=d}else n=Te(n);else n.nodeType===ee&&(n=n.firstElementChild);var f=a.getNodeKey||me,S=a.onBeforeNodeAdded||L,A=a.onNodeAdded||L,v=a.onBeforeElUpdated||L,o=a.onElUpdated||L,g=a.onBeforeNodeDiscarded||L,U=a.onNodeDiscarded||L,ae=a.onBeforeElChildrenUpdated||L,ie=a.skipFromChildren||L,z=a.addChild||function(i,s){return i.appendChild(s)},G=a.childrenOnly===!0,x=Object.create(null),C=[];function D(i){C.push(i)}function j(i,s){if(i.nodeType===w)for(var c=i.firstChild;c;){var l=void 0;s&&(l=f(c))?D(l):(U(c),c.firstChild&&j(c,s)),c=c.nextSibling}}function _(i,s,c){g(i)!==!1&&(s&&s.removeChild(i),U(i),j(i,c))}function H(i){if(i.nodeType===w||i.nodeType===ee)for(var s=i.firstChild;s;){var c=f(s);c&&(x[c]=s),H(s),s=s.nextSibling}}H(t);function $(i){A(i);for(var s=i.firstChild;s;){var c=s.nextSibling,l=f(s);if(l){var u=x[l];u&&B(s,u)?(s.parentNode.replaceChild(u,s),V(u,s)):$(s)}else $(s);s=c}}function se(i,s,c){for(;s;){var l=s.nextSibling;(c=f(s))?D(c):_(s,i,!0),s=l}}function V(i,s,c){var l=f(s);if(l&&delete x[l],!c){var u=v(i,s);if(u===!1||(u instanceof HTMLElement&&(i=u,H(i)),e(i,s),o(i),ae(i,s)===!1))return}i.nodeName!=="TEXTAREA"?le(i,s):Z.TEXTAREA(i,s)}function le(i,s){var c=ie(i,s),l=s.firstChild,u=i.firstChild,N,T,O,P,m;e:for(;l;){for(P=l.nextSibling,N=f(l);!c&&u;){if(O=u.nextSibling,l.isSameNode&&l.isSameNode(u)){l=P,u=O;continue e}
1T=f(u);var I=u.nodeType,b=void 0;if(I===l.nodeType&&(I===w?(N?N!==T&&((m=x[N])?O===m?b=!1:(i.insertBefore(m,u),T?D(T):_(u,i,!0),u=m,T=f(u)):b=!1):T&&(b=!1),b=b!==!1&&B(u,l),b&&V(u,l)):(I===te||I==ne)&&(b=!0,u.nodeValue!==l.nodeValue&&(u.nodeValue=l.nodeValue))),b){l=P,u=O;continue e}T?D(T):_(u,i,!0),u=O}if(N&&(m=x[N])&&B(m,l))c||z(i,m),V(m,l);else{var K=S(l);K!==!1&&(K&&(l=K),l.actualize&&(l=l.actualize(i.ownerDocument||h)),z(i,l),$(l))}l=P,u=O}se(i,u,T);var W=Z[i.nodeName];W&&W(i,s)}var p=t,M=p.nodeType,Y=n.nodeType;if(!G){if(M===w)Y===w?B(t,n)||(U(t),p=Se(t,ye(n.nodeName,n.namespaceURI))):p=n;else if(M===te||M===ne){if(Y===M)return p.nodeValue!==n.nodeValue&&(p.nodeValue=n.nodeValue),p;p=n}}if(p===n)U(t);else{if(n.isSameNode&&n.isSameNode(p))return;if(V(p,n,G),C)for(var E=0,ue=C.length;E<ue;E++){var k=x[C[E]];k&&_(k,k.parentNode,!1)}}return!G&&p!==t&&t.parentNode&&(p.actualize&&(p=p.actualize(t.ownerDocument||h)),t.parentNode.replaceChild(p,t)),p}}var Le=be(ce);function Ue(e,r,t){const n=typeof e=="string"?F(e):e;if(n==null)return;const a=typeof e=="string"?F(e,r):r;if(a==null){de(n);return}return Le(n,a,{onBeforeElUpdated(d,f){return d.dataset.morph==="persist"?!1:(J(d)&&J(f)&&d.open&&(f.open=!0),!d.isEqualNode(f))},...t})}function Ce(e,r){const t=window.Translations[e];return typeof t>"u"?e:typeof r<"u"?xe(t,r):t}function xe(e,r){return e.replace(/\{\{\s*(\w+)\s*\}\}/g,(t,n)=>String(r[n]??`{{${n}}}`))}let y;if(Oe()){y=["collage","simple"];const e=F("svg.plain");e&&(e.style.display="none",e.style.width="0px")}else y=["collage","simple","plain"];const q="simple";function De(e){return e==q}function re(){const e=window.userPrefs.get("gridLayout");return y.includes(e)?e:q}function Ne(e){const r=y.indexOf(e);if(r===-1)return y[0];const t=(r+1)%y.length;return y[t]}function _e(e=".grid-toggle"){const r=F(e),t=r?r.dataset.target:void 0,n=t?fe(t):null;if(!r||!n){console.error(`Could not find "${e}" or target element "${String(t)}"`);return}const a=r.querySelectorAll("svg"),d=v=>{const o=y.indexOf(v);if(o===-1){console.warn(`Invalid layout: ${v}, using default`);return}requestAnimationFrame(()=>{try{a.forEach(g=>{g&&g.classList&&g.classList.remove("active__layout")});for(let g=0;g<=o;g++)a[g]&&a[g].classList&&a[g].classList.add("active__layout")}catch(g){console.error("Error updating SVG states:",g)}})},f=v=>{y.includes(v)||(console.warn(`Invalid layout: ${v}, using default`),v=q);try{requestAnimationFrame(()=>{const o={layout:v};window.userPrefs.set("gridLayout",v),n.classList.remove("simple-grid","collage-grid","plain-grid"),n.classList.add(`${v}-grid`),r.setAttribute("data-current-layout",v),d(v),setTimeout(()=>{n.dispatchEvent(new CustomEvent("layout",{detail:o}))},0)})}catch(o){console.error("Error applying grid layout:",o)}},S=re();f(S);let A=!1;r.addEventListener("click",v=>{if(v.preventDefault(),!A){A=!0;try{const o=re(),g=Ne(o);f(g)}catch(o){console.error("Error handling grid toggle click:",o)}finally{setTimeout(()=>{A=!1},100)}}})}function Oe(){const e=navigator.userAgent;if(!(/Safari/.test(e)&&!/Chrome/.test(e)&&!/Chromium/.test(e)))return!1;const t=e.match(/Version\/(\d+)\.(\d+)/);return t?parseInt(t[1])<18:!1}export{De as a,re as g,_e as i,Ue as m,Ce as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.