PageSourceSearch

https://www.flagandanthem.com/cdn/shop/t/1248/assets/swatches.bundle.js?v=11604614042560500501789743672

js flagandanthem.com collected 2026-09-29 05:53:13 UTC 23,422 bytes, 1 lines download raw bytes

vendor: 4,883 bytes, line 1
1(function(){"use strict";var q,h,me,H,ye,ve,ge,X,U,N,we,Y,Z,ee,z={},W=[],Ye=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;function x(t,e){for(var n in e)t[n]=e[n];return t}function te(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function j(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?q.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return B(t,s,r,i,null)}function B(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++me,__i:-1,__u:0};return i==null&&h.vnode!=null&&h.vnode(o),o}function M(t){return t.children}function R(t,e){this.props=t,this.context=e}function T(t,e){if(e==null)return t.__?T(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?T(t):null}function Ze(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],i=[],o=x({},e);o.__v=e.__v+1,h.vnode&&h.vnode(o),ne(t.__P,o,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??T(e),!!(32&e.__u),i),o.__v=e.__v,o.__.__k[o.__i]=o,He(r,o,i),e.__e=e.__=null,o.__e!=n&&be(o)}}function be(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),be(t)}function Se(t){(!t.__d&&(t.__d=!0)&&H.push(t)&&!V.__r++||ye!=h.debounceRendering)&&((ye=h.debounceRendering)||ve)(V)}function V(){try{for(var t,e=1;H.length;)H.length>e&&H.sort(ge),t=H.shift(),e=H.length,Ze(t)}finally{H.length=V.__r=0}}function ke(t,e,n,r,i,o,s,c,a,l,d){var p,_,u,m,k,w,g,f=r&&r.__k||W,b=e.length;for(a=et(n,e,f,a,b),p=0;p<b;p++)(u=n.__k[p])!=null&&(_=u.__i!=-1&&f[u.__i]||z,u.__i=p,w=ne(t,u,_,i,o,s,c,a,l,d),m=u.__e,u.ref&&_.ref!=u.ref&&(_.ref&&oe(_.ref,null,u),d.push(u.ref,u.__c||m,u)),k==null&&m!=null&&(k=m),(g=!!(4&u.__u))||_.__k===u.__k?(a=Ce(u,a,t,g),g&&_.__e&&(_.__e=null)):typeof u.type=="function"&&w!==void 0?a=w:m&&(a=m.nextSibling),u.__u&=-7);return n.__e=k,a}function et(t,e,n,r,i){var o,s,c,a,l,d=n.length,p=d,_=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[o]=B(null,s,null,null,null):G(s)?s=t.__k[o]=B(M,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[o]=B(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[o]=s,a=o+_,s.__=t,s.__b=t.__b+1,c=null,(l=s.__i=tt(s,n,a,p))!=-1&&(p--,(c=n[l])&&(c.__u|=2)),c==null||c.__v==null?(l==-1&&(i>d?_--:i<d&&_++),typeof s.type!="function"&&(s.__u|=4)):l!=a&&(l==a-1?_--:l==a+1?_++:(l>a?_--:_++,s.__u|=4))):t.__k[o]=null;if(p)for(o=0;o<d;o++)(c=n[o])!=null&&!(2&c.__u)&&(c.__e==r&&(r=T(c)),Pe(c,c));return r}function Ce(t,e,n,r){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=Ce(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=T(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function tt(t,e,n,r){var i,o,s,c=t.key,a=t.type,l=e[n],d=l!=null&&(2&l.__u)==0;if(l===null&&c==null||d&&c==l.key&&a==l.type)return n;if(r>(d?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((l=e[s=i>=0?i--:o++])!=null&&!(2&l.__u)&&c==l.key&&a==l.type)return s}return-1}function xe(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Ye.test(e)?n:n+"px"}function K(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||xe(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||xe(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(we,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n[N]=r[N]:(n[N]=Y,t.addEventListener(e,o?ee:Z,o)):t.removeEventListener(e,o?ee:Z,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ae(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[U]==null)e[U]=Y++;else if(e[U]<n[N])return;return n(h.event?h.event(e):e)}}}function ne(t,e,n,r,i,o,s,c,a,l){var d,p,_,u,m,k,w,g,f,b,O,P,D,Xe,Q,pe,C=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),o=[c=e.__e=n.__e]),(d=h.__b)&&d(e);e:if(typeof C=="function"){p=s.length;try{if(f=e.props,b=C.prototype&&C.prototype.render,O=(d=C.contextType)&&r[d.__c],P=d?O?O.props.value:d.__:r,n.__c?g=(_
vendor: 5,394 bytes, line 1
1=e.__c=n.__c).__=_.__E:(b?e.__c=_=new C(f,P):(e.__c=_=new R(f,P),_.constructor=C,_.render=rt),O&&O.sub(_),_.state||(_.state={}),_.__n=r,u=_.__d=!0,_.__h=[],_._sb=[]),b&&_.__s==null&&(_.__s=_.state),b&&C.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=x({},_.__s)),x(_.__s,C.getDerivedStateFromProps(f,_.__s))),m=_.props,k=_.state,_.__v=e,u)b&&C.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),b&&_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(b&&C.getDerivedStateFromProps==null&&f!==m&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(f,P),e.__v==n.__v||!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(f,_.__s,P)===!1){e.__v!=n.__v&&(_.props=f,_.state=_.__s,_.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function($){$&&($.__=e)}),W.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&s.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(f,_.__s,P),b&&_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(m,k,w)})}if(_.context=P,_.props=f,_.__P=t,_.__e=!1,D=h.__r,Xe=0,b)_.state=_.__s,_.__d=!1,D&&D(e),d=_.render(_.props,_.state,_.context),W.push.apply(_.__h,_._sb),_._sb=[];else do _.__d=!1,D&&D(e),d=_.render(_.props,_.state,_.context),_.state=_.__s;while(_.__d&&++Xe<25);_.state=_.__s,_.getChildContext!=null&&(r=x(x({},r),_.getChildContext())),b&&!u&&_.getSnapshotBeforeUpdate!=null&&(w=_.getSnapshotBeforeUpdate(m,k)),Q=d!=null&&d.type===M&&d.key==null?Ee(d.props.children):d,c=ke(t,G(Q)?Q:[Q],e,n,r,i,o,s,c,a,l),_.base=e.__e,e.__u&=-161,_.__h.length&&s.push(_),g&&(_.__E=_.__=null)}catch($){if(s.length=p,e.__v=null,a||o!=null)if($.then){for(e.__u|=a?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),e.__e=c}else{if(o!=null)for(pe=o.length;pe--;)te(o[pe]);re(e)}else e.__e=n.__e,!e.__k&&n.__k&&(e.__k=n.__k),$.then||re(e);h.__e($,e,n)}}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):c=e.__e=nt(n.__e,e,n,r,i,o,s,a,l);return(d=h.diffed)&&d(e),128&e.__u?void 0:c}function re(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(re))}function He(t,e,n){for(var r=0;r<n.length;r++)oe(n[r],n[++r],n[++r]);h.__c&&h.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){h.__e(o,i.__v)}})}function Ee(t){return typeof t!="object"||t==null||t.__b>0?t:G(t)?t.map(Ee):t.constructor!==void 0?null:x({},t)}function nt(t,e,n,r,i,o,s,c,a){var l,d,p,_,u,m,k,w=n.props||z,g=e.props,f=e.type;if(f=="svg"?i="http://www.w3.org/2000/svg":f=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((u=o[l])&&"setAttribute"in u==!!f&&(f?u.localName==f:u.nodeType==3)){t=u,o[l]=null;break}}if(t==null){if(f==null)return document.createTextNode(g);t=document.createElementNS(i,f,g.is&&g),c&&(h.__m&&h.__m(e,o),c=!1),o=null}if(f==null)w===g||c&&t.data==g||(t.data=g);else{if(o=f=="textarea"&&g.defaultValue!=null?null:o&&q.call(t.childNodes),!c&&o!=null)for(w={},l=0;l<t.attributes.length;l++)w[(u=t.attributes[l]).name]=u.value;for(l in w)u=w[l],l=="dangerouslySetInnerHTML"?p=u:l=="children"||l in g||l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g||K(t,l,null,u,i);for(l in g)u=g[l],l=="children"?_=u:l=="dangerouslySetInnerHTML"?d=u:l=="value"?m=u:l=="checked"?k=u:c&&typeof u!="function"||w[l]===u||K(t,l,u,w[l],i);if(d)c||p&&(d.__html==p.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(p&&(t.innerHTML=""),ke(e.type=="template"?t.content:t,G(_)?_:[_],e,n,r,f=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&T(n,0),c,a),o!=null)for(l=o.length;l--;)te(o[l]);c&&f!="textarea"||(l="value",f=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||f=="progress"&&!m||f=="option"&&m!=w[l])&&K(t,l,m,w[l],i),l="checked",k!=null&&k!=t[l]&&K(t,l,k,w[l],i))}return t}function oe(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){h.__e(i,n)}}function Pe(t,e,n){var r,i;if(h.unmount&&h.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||oe(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){h.__e(o,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Pe(r[i],e,n||typeof t.type!="function");n||te(t.__e),t.__c=t.__=t.__e=void 0}function rt(t,e,n){return this.constructor(t,n)}function L(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),h.__&&h.__(t,e),i=(r=!1)?null:e.__k,o=[],s=[],ne(e,t=e.__k=j(M,null,[t]),i||z,z,e.namespaceURI,i?null:e.firstChild?q.call(e.childNodes):null,o,i?i.__e:e.firstChild,r,s),He(o,t,s),t.props.children=null}q=W.slice,h={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},me=0,R.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=x({},this.state),typeof t=="function"&&(t=t(x({},n),this.props)),t&&x(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Se(this))},R.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Se(this))},R.prototype.render=M,H=[],ve=typeof Promise=="function"?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,ge=function(t,e){return t.__v.__b-e.__v.__b},V.__r=0,X=Math.random().toString(8),U="__d"+X,N="__a"+X,we=/(PointerCapture)$|Capture$/i,Y=0,Z=Ae(!1),ee=Ae(!0);var ot=0;function E(t,e,n,r,i,o){e||(e={});var s,c,a=e;if("ref"in a)for(c in a={},e)c=="ref"?s=e[c]:a[c]=e[c];var l={type:t,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ot,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(c in s)a[c]===void 0&&(a[c]=s[c]);return h.vnode&&h.vnode(l),l}var ie,y,_e,Te,se=0,Le=[],v=h,$e=v.__b,Ne=v.__r,Me=v.diffed,Fe=v.__c,Ie=v.unmount,Oe=v.__;function it(t,e){v.__h&&v.__h(y,t,se||e),se=0;var n=y.__H||(y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function _t(t){return se=1,st(ze,t)}function st(t,e,n){var r=it(ie++,2);if(r.t=t,!r.__c&&(r.__=[ze(void 0,e),function(c){var a=r.__N?r.__N[0]:r.__[0],l=r.t(a,c);a!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=y,!y.__f)){var i=function(c,a,l){if(!r.__c.__H)return!0;var d=!1,p=r.__c.props!==c;if(r.__c.__H.__.some(function(u){if(u.__N){d=!0;var m=u.__[0];u.__=u.__N,u.__N=void 0,m!==u.__[0]&&(p=!0)}}),o){var _=o.call(this,c,a,l);return d?_||p:_}return!d||p};y.__f=!0;var o=y.shouldComponentUpdate,s=y.componentWillUpdate;y.componentWillUpdate=function(c,a,l){if(this.__e){var d=o;o=void 0,i(c,a,l),o=d}s&&s.call(this,c,a,l)},y.shouldComponentUpdate=i}return r.__N||r.__}function De(){for(var t;t=Le.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(ce),e.__h.some(Ue),e.__h=[]}catch(n){e.__h=[],v.__e(n,t.__v)}}}v.__b=function(t){y=null,$e&&$e(t)},v.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Oe&&Oe(t,e)},v.__r=function(t){Ne&&Ne(t),ie=0;var e=(y=t.__c).__H;e&&(_e===y?(e.__h=[],y.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.length&&De(),ie=0)),_e=y},v.diffed=function(t){Me&&Me(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Le.push(e)!==1&&Te===v.requestAnimationFrame||((Te=v.requestAnimationFrame)||ct)(De)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),_e=y=null},v.__c=function(t,e){e.some(function(n){try{n.__h.some(ce),n.__h=n.__h.filter(function(r){return!r.__||Ue(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],v.__e(r,n.__v)}}),Fe&&Fe(t,e)},v.unmount=function(t){Ie&&Ie(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{ce(r)}catch(i){e=i}}),n.__H=void 0,e&&v.__e(e,n.__v))};var qe=typeof requestAnimationFrame=="function";function ct(t){var e,n=function(){clearTimeout(r),qe&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);qe&&(e=requestAnimationFrame(n))}function ce(t){var e=y,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),y=e}function Ue(t){var e=y;t.__c=t.__(),y=e}function ze(t,e){return typeof e=="function"?e(t):e}function le(t){const e=(t||"").toLowerCase(),n=e.split(" - ")[0].trim();return e.indexOf("big")!==-1||e.indexOf("tall")!==-1?n+"||bigtall":n}function We(t){return(t||"").toLowerCase().replace(/ /g,"-").replace(/\//g,"-")}function Ge(){const t=window.location.pathname.match(/\/products\/([^/?#]+)/);return t?t[1]:null}function lt(t){const e=new Map,n=new Map;for(const r of t){if(!r||!r.handle)continue;n.set(r.handle,r);const i=le(r.title),o=e.get(i);o?o.push(r):e.set(i,[r])}return{byGroup:e,byHandle:n}}function je(t){const e=new Set,n=[];for(const r of t)e.has(r.handle)||(e.add(r.handle),n.push(r));return n}function at(t,e){const n=t.byHandle.get(e);return n?je(t.byGroup.get(le(n.title))||[]):[]}function ut(t,e){return je(t.byGroup.get(le(e))||[])}function dt(t){const{e,active:n,unavailable:r,href:i,hidden:o}=t,s=We(e.color),c=(e.color||"").trim().split(/\s+/),a=We(c[c.length-1]||e.color),l=e.swatch?`background-image: url('${e.swatch}'); `:"",d="variantcolor collectionswatch color-swatch color-swatch-collection color-swatch--small color-swatch--"+s+" color-swatch--with-image",p="swatch-link"+(n?" swatch-active":"")+(r?" swatch-unavailable":""),_={reference:String(e.id)};return E("a",{..._,href:i,"data-handle":e.handle,class:p,"aria-disabled":r?"true":void 0,style:o?"display:none;":void 0,onClick:u=>t.onSelect&&t.onSelect(e,u),onMouseEnter:()=>t.onHover&&t.onHover(e),onMouseLeave:()=>t.onLeave&&t.onLeave(e),children:E("span",{"data-variant-color":e.color,"data-url":i,class:d,"data-tooltip":e.color,"data-variant-image":e.image||"",style:`${l}background-color: ${a};`,children:E("span",{class:"visually-hidden",children:e.color})})})}function ae(t){const{entries:e,activeHandle:n,maxVisible:r}=t,[i,o]=_t(!1);if(!e||e.length<2)return null;const s=r&&r>0?r:0,c=s>0&&!i&&e.length>s,a=c?e.length-s:0;return E(M,{children:[e.map((l,d)=>E(dt,{e:l,active:l.handle===n,unavailable:t.unavailable?t.unavailable(l):!1,href:t.hrefFor(l),onSelect:t.onSelect,onHover:t.onHover,onLeave:t.onLeave,hidden:c&&d>=s},l.handle)),a>0&&E("span",{class:"morecolorsct",style:"cursor:pointer;",onClick:()=>o(!0),children:E("span",{class:"colornumber",children:["+",a]})})]})}const ft=typeof window<"u"&&/[?&](swatch_)?debug=true/.test(window.location.search);
1function A(...t){ft&&console.log("[SWATCH]",...t)}const ht=()=>window.__SWATCH_FEED_URL__||"/collections/all?view=swatch-feed",pt="v3",mt=()=>`${pt}-${window.__SWATCH_FEED_VERSION__||"x"}`,Be="flag-swatch-feed",yt=60;class vt{constructor(){this.entries=new Map,this.index={byGroup:new Map,byHandle:new Map},this.listeners=new Set,this.loadPromise=null,this.loaded=!1}merge(e){let n=!1;for(const r of e)r&&r.handle&&!this.entries.has(r.handle)&&(this.entries.set(r.handle,r),n=!0);n&&this.rebuild()}rebuild(){this.index=lt([...this.entries.values()]),this.listeners.forEach(e=>e())}seedFromInline(){const e=window.__SWATCH_SEED__;Array.isArray(e)&&e.length&&this.merge(e);const n=window.__SWATCH_INDEX__;Array.isArray(n)&&n.length&&this.merge(n)}seed(e){Array.isArray(e)&&e.length&&this.merge(e)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}getGroup(e){return at(this.index,e)}getGroupByTitle(e){return ut(this.index,e)}hasHandle(e){return this.index.byHandle.has(e)}get isLoaded(){return this.loaded}get size(){return this.entries.size}get groupCount(){return this.index.byGroup.size}ensureLoaded(){return this.loadPromise?this.loadPromise:(this.loadPromise=this.load().then(()=>{this.loaded=!0}),this.loadPromise)}async load(){const e=await this.readCache();if(e&&e.length){A("feed desde cache:",e.length,"productos"),this.merge
1(e);return}const n=await this.fetchPage(1);if(!n)return;const r=Array.isArray(n.products)?n.products.slice():[];this.merge(r);const i=Math.min(n.pages||1,yt);if(i>1){const o=await Promise.all(Array.from({length:i-1},(s,c)=>this.fetchPage(c+2)));for(const s of o)s&&Array.isArray(s.products)&&r.push(...s.products);this.merge(r)}A("feed total",r.length,"productos (",i,"páginas)"),r.length&&await this.writeCache(r)}async fetchPage(e){const n=ht(),r=n.indexOf("?")===-1?"?":"&",i=`${n}${r}page=${e}`;try{const o=await fetch(i,{credentials:"same-origin"});if(!o.ok)return A("feed HTTP",o.status,i),null;const s=await o.text();try{const c=JSON.parse(s.trim());return A("feed page",e,"→",Array.isArray(c.products)?c.products.length:0,"hasNext=",c.hasNext),c}catch{return A("feed NO es JSON (primeros 120 chars):",s.trim().slice(0,120),i),null}}catch(o){return A("feed fetch error",o,i),null}}cacheKey(){return`/__swatch_feed__/${mt()}`}async readCache(){try{if("caches"in window){const e=await caches.open(Be);await this.evictOldVersions(e);const n=await e.match(this.cacheKey());if(n)return await n.json()}}catch{}try{const e=sessionStorage.getItem(this.cacheKey());if(e)return JSON.parse(e)}catch{}return null}async writeCache(e){const n=JSON.stringify(e);try{if("caches"in window){await(await caches.open(Be)).put(this.cacheKey(),new Response(n,{headers:{"Content-Type":"application/json"}}));return}}catch{}try{sessionStorage.setItem(this.cacheKey(),n)}catch{}}async evictOldVersions(e){try{const n=await e.keys(),r=this.cacheKey();await Promise.all(n.filter(i=>i.url.indexOf("/__swatch_feed__/")!==-1&&i.url.indexOf(r)===-1).map(i=>e.delete(i)))}catch{}}}const S=new vt;function ue(){const t=document.querySelector('[data-section-type="product"]');return t?t.closest('[id^="shopify-section-"]'):null}function Re(){const t=ue();return t?t.id.replace("shopify-section-",""):null}const F={};function gt(t){if(!t||F[t])return;const e=Re();e&&(F[t]="loading",fetch("/products/"+t+"?section_id="+encodeURIComponent(e)).then(n=>n.ok?n.text():Promise.reject(n.status)).then(n=>{F[t]=n}).catch(()=>{delete F[t]}))}function wt(t,e){const n=F[t];return n&&n!=="loading"?Promise.resolve(n):fetch("/products/"+t+"?section_id="+encodeURIComponent(e)).then(r=>r.ok?r.text():Promise.reject(r.status))}function bt(t,e,n,r){const i=ue(),o=Re();return!i||!o?(window.location.href="/products/"+t,!1):(i.classList.add("swatch-swapping"),wt(t,o).then(s=>{const c=new DOMParser().parseFromString(s,"text/html"),a=c.getElementById(i.id)||c.querySelector('[id^="shopify-section-"]'),l=a?a.innerHTML:s;document.dispatchEvent(new CustomEvent("shopify:section:unload",{detail:{sectionId:o}})),i.innerHTML=l,history.pushState({swatchSwap:!0,handle:t},"",e?e.url:"/products/"+t),document.title&&e&&e.title&&(document.title=e.title);try{i.dispatchEvent(new CustomEvent("shopify:section:load",{bubbles:!0,detail:{sectionId:o}}))}catch{}r(t),i.classList.remove("swatch-swapping")}).catch(()=>{window.location.href="/products/"+t}),!0)}const J=()=>document.body.classList.contains("template-product")||window.location.pathname.indexOf("/products/")!==-1;function St(){const t=document.querySelector('input[data-variant-input][name*="Size" i]:checked');if(t)return t.value;const e=document.querySelector('select[name*="Size" i]');return e&&e.value?e.value:null}function kt(t){return!t||!t.sizes?null:t.sizes.split(",").map(e=>e.trim()).filter(Boolean)}
1function I(){const t=Ge();if(!t)return;const e=ue()||document,n=e.querySelector(".ajax-swatches-container"),r=e.querySelector(".ajax-swatches-wrapper");if(!n)return;const i=S.getGroup(t);if(A("renderPdp",{handle:t,container:!!n,grupo:i.length,seed:S.size,grupos:S.groupCount}),i.length<2){L(null,n),r&&(r.style.display="none");return}const o=St();L(j(ae,{entries:i,activeHandle:t,hrefFor:s=>"/products/"+s.handle,unavailable:s=>{const c=kt(s);return!o||!c?!1:c.indexOf(o)===-1},onHover:s=>gt(s.handle),onSelect:(s,c)=>{c.preventDefault(),s.handle!==t&&bt(s.handle,s,!0,()=>I())}}),n),n.style.display="flex",r&&(r.style.display="")}let Ve=!1;function Ct(){Ve||(Ve=!0,document.addEventListener("change",t=>{const e=t.target;if(!e||!e.matches)return;const n=e.getAttribute("name")||"";(/size/i.test(n)||e.matches("input[data-variant-input]"))&&setTimeout(I,50)}))}function xt(){return window.collectionhandle||"all"}function At(t){const e=t.getAttribute("data-product-id"),n=t.getAttribute("data-product-title")||"";if(!e||!n)return;const r=document.querySelector(".colorgrid"+e);if(!r)return;const i=S.getGroupByTitle(n);if(i.length<2){L(null,r);return}const o=xt();L(j(ae,{entries:i,hrefFor:s=>"/collections/"+o+"/products/"+s.handle,maxVisible:4}),r),r.classList.add("swatches-rendered")}function de(){const t=document.querySelectorAll(".productgriditem");A("renderCollection",{cards:t.length,seed:S.size,grupos:S.groupCount}),t.forEach(At)}let fe=null;function Ht(){if(fe)return;const t=document.querySelector("#AjaxinateContainer")||document.querySelector(".grid--collection")||document.querySelector("main");t&&(fe=new MutationObserver(e=>{e.some(n=>n.addedNodes.length)&&setTimeout(de,100)}),fe.observe(t,{childList:!0,subtree:!0}))}function he(){document.querySelectorAll('[id^="QuickShopHolder-"]').forEach(t=>{const e=t.querySelector(".product-section[data-product-handle]");if(!e)return;const n=e.getAttribute("data-product-handle"),r=e.querySelector(".ajax-swatches-container");if(!n||!r)return;const i=e.querySelector(".ajax-swatches-wrapper"),o=S.getGroup(n);if(o.length<2){L(null,r),i&&(i.style.display="none");return}L(j(ae,{entries:o,activeHandle:n,hrefFor:s=>"/products/"+s.handle}),r),r.style.display="flex",i&&(i.style.display="")})}let Ke=!1;function Et(){if(Ke)return;Ke=!0;const t=()=>{setTimeout(he,400),setTimeout(he,1e3)},e=n=>{const r=n.target;r&&r.closest&&r.closest(".grid-product")&&t()};document.addEventListener("mouseover",e,{passive:!0}),document.addEventListener("focusin",e)}function Pt(){J()&&I(),document.querySelector(".productgriditem")&&de(),he()}function Tt(){S.seedFromInline(),A("init",{isProduct:J(),handle:Ge(),seedInline:Array.isArray(window.__SWATCH_INDEX__)?window.__SWATCH_INDEX__.length:"undefined",seedStore:S.size,grupos:S.groupCount,cards:document.querySelectorAll(".productgriditem").length}),J()&&(Ct(),I()),document.querySelector(".productgriditem")&&(de(),Ht()),Et(),S.subscribe(Pt),S.ensureLoaded(),window.addEventListener("popstate",()=>{J()&&I()})}function Je(){try{Tt()}catch(t){console.error("[SWATCH] error en init:",t)}}const Qe=window;Qe.__FLAG_SWATCHES_BOOTED__||(Qe.__FLAG_SWATCHES_BOOTED__=!0,console.log("[SWATCH] bundle cargado v1 — readyState=",document.readyState),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Je):Je())})();

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.