!function(t){if(!t.minMaxify&&-1==location.href.indexOf("checkout.shopify")){var e=t.minMaxifyContext||{},i=t.minMaxify={shop:"singularu.myshopify.com",cart:null,cartLoadTryCount:0,customer:e.customer,feedback:function(t){},guarded:function(t,e){return function(){try{var i=e&&e.apply(this,arguments),a=t.apply(this,arguments);return e?a||i:a}catch(t){console.error(t)}}}},a=t.location.pathname;i.guarded((function(){var e,n,r,o,s=t.jQuery,u=t.document,c="[name=checkout],[aria-label='Apple Pay'],[name=goto_pp],.amazon-payments-pay-button > img,[href='/checkout'],[type=submit][value=Checkout],[onclick='window.location\\=\\'\\/checkout\\''],form[action=\\/checkout] [type=submit],.carthook_checkout,.checkout_button,.slidecarthq .footer form,form[action=\\/cart] [type=submit].button-cart-custom,.tdf_btn_ck,.btn-checkout,.checkout-btn,.button-checkout",m="[name=checkout],.carthook_checkout",l=".cart-item-decrease,.cart-item-increase,.js--qty-adjuster,.js-qty__adjust,.minmaxify-quantity-button,.numberUpDown > *,.cart-item button.adjust,.cart-wrapper .quantity-selector__button,.cart .product-qty > .items,.cart__row [type=button],.cart-item-quantity button.adjust,.cart_items .js-change-quantity,.ajaxcart__qty-adjust,.cart-table-quantity button",d=".additional-checkout-buttons,.dynamic-checkout__content,.cart__additional_checkout,.additional_checkout_buttons,.paypal-button-context-iframe,.additional-checkout-button--apple-pay,.additional-checkout-button--google-pay",p="div.shopify-payment-button,.shopify-payment-button > div",h="input[name=quantity]",y="input[name^='updates['],.cart__qty-input,[data-cart-item-quantity]",_="a[href='/cart'],.js-drawer-open-right",g="[type=submit][name=update],.cart .btn-update",x=0,M={name:""},v=2e4,b={PREVENT_CART_UPD_MSG:"\n\n",NOT_VALID_MSG:"Order not valid",CART_UPDATE_MSG:"Cart needs to be updated",CART_UPDATE_MSG2:'Cart contents have changed, you must click "Update cart" before proceeding.',CART_AUTO_UPDATE:"Quantities have been changed, press OK to validate the cart.",VERIFYING_MSG:"Verifying",VERIFYING_EXPANDED:"Please wait while we verify your cart.",MIN_WEIGHT_MSG:"Current weight: {{CartWeight}} grams is less than the minimum order weight: {{CartMinWeight}} grams.",MAX_WEIGHT_MSG:"Current weight: {{CartWeight}} grams is more than the maximum order weight: {{CartMaxWeight}} grams.",MIN_SUBTOTAL_MSG:"El Pedido Mínimo es de {{CartMinAmount}}. Por favor añade alguna otra joya o la tote bag a tu cesta ;)",MAX_SUBTOTAL_MSG:"Must have at most {{CartMaxAmount}} in total.",TOTAL_ITEMS_MIN_MSG:"Must have at least {{CartMinQuantity}} items total.",TOTAL_ITEMS_MAX_MSG:"Máximo {{CartMaxQuantity}} Closca Mask for Singularu por pedido.",TOTAL_ITEMS_MULT_MSG:"Must have a multiple of {{CartQuantityMultiple}} items total.",PROD_MIN_SUBTOTAL_MSG:"{{ProductName}}: Must have this item for at least {{ProductMinAmount}}.",PROD_MAX_SUBTOTAL_MSG:"{{ProductName}}: Must have this item for at most {{ProductMaxAmount}}.",GROUP_MIN_MSG:"Must have at least {{GroupMinQuantity}} of {{GroupTitle}}.",GROUP_MAX_MSG:"Must have at most {{GroupMaxQuantity}} of {{GroupTitle}}.",GROUP_MIN_SUBTOTAL_MSG:"Must have {{GroupTitle}} for at least {{GroupMinAmount}}.",GROUP_MAX_SUBTOTAL_MSG:"Must have {{GroupTitle}} for at most {{GroupMaxAmount}}.",GROUP_MULT_MSG:"{{GroupTitle}} quantity must be a multiple of {{GroupQuantityMultiple}}."};function k(){return(new Date).getTime()}Object.assign;function T(t,e){try{setTimeout(t,e||0)}catch(i){e||t()}}function S(t){return t?"string"==typeof t?u.querySelectorAll(t):t.nodeType?[t]:t:[]}function G(t,e){var i,a=S(t);if(a&&e)for(i=0;i1&&!r.combine&&(e.min=r.min),r.max&&(e.max=r.max),r.multiple&&!r.combine&&(e.step=r.multiple);break}}}))}(),G(p,(function(t){t.style.display="none"}));var e=function(e){var i,n;if(!i){if(!n)try{n=decodeURIComponent(a||location.href||"")}catch(t){n=""}if(!((n=n.split("/")).length>2&&"products"==n[n.length-2]))return;i=n[n.length-1]}var r=(t.ShopifyAnalytics||{}).meta||{},o={handle:i,sku:""},s=r.product,u=r.selectedVariantId;if(!s){var c=A("#ProductJson-product-template");if(c)try{s=c._product||JSON.parse(c.dataset.product||c.textContent)}catch(t){}}if(s){o.product_description=s.description,o.product_type=s.type,o.vendor=s.vendor,o.price=s.price,o.product_title=s.title,o.product_id=s.id;var m=s.variants||[],l=m.length;if(u||1==l)for(var d=0;dd)&&((c?val==c||val==d:!val||val1?a("min",o):c&&a("min",null),a("mm-min",o)),isNaN(stockMax)&&!s&&(stockMax=parseInt(a("data-max-quantity")||a("max")),a("mm-stock-max",stockMax)),!isNaN(stockMax)&&n&&n>stockMax&&(n=stockMax),(n!=s||isNaN(m)||m>n)&&(n?a("max",n):s&&a("max",null),a("mm-max",n)),(r!=u||r>1&&l!=r)&&(e.combine?u&&a("step",null):a("step",r),a("mm-step",r))}}(U(e),r)}}}catch(t){console.error(t)}if(function(){D(),X(c,"mousedown",i.showMessage,!0);try{X(c,"touchstart",i.showMessage,{capture:!0,passive:!1})}catch(t){}return X(c,"click",i.showMessage,!0).length||t.minmaxifyDisplayCartLimits}())return X(y,"keydown",i.onChange),X(y,"change",i.onChange),X(l,"click",i.onChange),B(),!0}function D(t,e,i){A(m,(function(a){var n=null===t?a.minMaxifySavedLabel:t;a.minMaxifySavedLabel||(a.minMaxifySavedLabel=a.value||(a.innerText||a.textContent||"").trim()),void 0!==n&&(a.value=n);var r=a.classList;r&&e&&r.add(e),r&&i&&r.remove(i)}))}function j(t){"start"==t?(D(L("VERIFYING_MSG"),"btn--loading"),o||(o=k(),T((function(){o&&k()-o>=v&&(N={isOk:"force"},j("stop"))}),v))):"stop"==t?(D(N.isOk?null:L("NOT_VALID_MSG"),0,"btn--loading"),o=0,(i.popupShown||w)()&&i.showMessage()):"changed"==t&&D(L("CART_UPDATE_MSG")),B()}function B(){G(d,(function(t){var e=t.style;R()?t.mm_hidden&&(e.display=t.mm_hidden,t.mm_hidden=!1):"none"!=e.display&&(t.mm_hidden=e.display||"block",e.display="none")})),(t.minmaxifyDisplayCartLimits||w)(!n&&N,r)}function X(t,e,a,n){return G(t,(function(t){if(!t["mmBound_"+e]){t["mmBound_"+e]=!0;var r=t["on"+e];r&&n?t["on"+e]=i.guarded((function(t){!1!==a()?r.apply(this,arguments):t.preventDefault()})):C(t,e,i.guarded(a))}}))}function H(a){null==i.cart&&(i.cart=(t.Shopify||{}).cart||null);var n=i.cart&&i.cart.item_count&&(a||!x&&V());(Q()||n||a)&&(q()&&i.cart?(N=e.validateCart(i),j("stop"),n&&(P&&!N.isOk&&!N.equalTo(P)&&u.body?i.showMessage():!x&&V()&&T(i.showMessage,100)),P=N):(N=E,j("start"),i.cart||K()))}function V(){return 0==a.indexOf("/cart")}function W(t,e,a,n){if(e&&"function"==typeof e.search&&4==t.readyState&&200==t.status&&e){var r,o;try{var s=(r=t.responseText||"").indexOf("{");-1!=e.search(/\/cart(\/update|\/change|\/clear|\.js)/)||"/cart"==e&&0==s?(-1!=e.indexOf("callback=")&&(r=r.substring(s,r.length-1)),o=i.handleCartUpdate(r,-1!=e.indexOf("cart.js")?"get":"update",n)):-1!=e.indexOf("/cart/add")?o=i.handleCartUpdate(r,"add",n):"GET"!=a||V()&&"/cart"!=e||(H(),o=1)}catch(t){if(!r||0==t.toString().indexOf("SyntaxError"))return;console.error(t)}o&&F()}}function F(){for(var t=0;t<=2e3;t+=200)T(Q,t)}function K(){var t=new XMLHttpRequest,e="/cart.js?_="+k();t.open("GET",e),t.mmUrl=null,t.onreadystatechange=function(){W(t,e)},t.send(),T((function(){null==i.cart&&i.cartLoadTryCount++<60&&K()}),5e3)}i.getLimitsFor=U,i.checkLimits=R,i.onChange=i.guarded((function(){j("changed"),r=!0,N=V()&&A(g)?{messages:[L("CART_AUTO_UPDATE")]}:{messages:[L("CART_UPDATE_MSG2")]},B()})),t.getLimits=H,t.mmIsEnabled=R,i.handleCartUpdate=function(t,e,a){if("string"==typeof t&&(t=JSON.parse(t)),"get"!=e||JSON.stringify(i.cart)!=JSON.stringify(t)){if("add"!=e){if(a&&!t.item_count&&i.cart)return;i.cart=t}else{var n=t.items||[t];t=i.cart;for(var o=0;o.minmaxify-p-bg { top: 0; left: 0; width: 100%; height: 100%; z-index: 1999999998; overflow: hidden; position: fixed; background: rgb(11, 11, 11, 0.8); opacity: 0.2; } .minmaxify-p-bg.minmaxify-a { transition: opacity 0.15s ease-out; opacity: 1; display: block; } \n.minmaxify-p-wrap { top: 0; left: 0; width: 100%; height: 100%; display: table; z-index: 1999999999; position: fixed; outline: none !important; -webkit-backface-visibility: hidden; pointer-events: none; }\n.minmaxify-p-wrap > div { display: table-cell; vertical-align: middle; }\n.minmaxify-p { opacity: .5; color: black; background-color: white; padding: 18px; max-width: 500px; margin: 18px auto; width: calc(100% - 36px); pointer-events: auto; border: solid white 1px; } .minmaxify-p.minmaxify-a { opacity: 1; transition: all 0.25s ease-in; border-width: 0px; }\n.minmaxify-ok { display: inline-block; padding: 8px 20px; margin: 0; line-height: 1.42; text-decoration: none; text-align: center; vertical-align: middle; white-space: nowrap; border: 1px solid transparent; border-radius: 2px; font-family: "Montserrat","HelveticaNeue","Helvetica Neue",sans-serif; font-weight: 400;font-size: 14px;text-transform: uppercase;transition:background-color 0.2s ease-out;background-color: #ff637d; color: white; min-width: unset; }\n.minmaxify-ok:after { content: "OK"; }\n.minmaxify-close { font-style: normal; font-size: 28px; font-family: Arial, Baskerville, monospace; overflow: visible; background: transparent; border: 0; -webkit-appearance: none; display: block; outline: none; padding: 0 0 0 10px; box-shadow: none; margin-top: -10px; opacity: .65; }\n.minmaxify-p button { user-select: none; -webkit-user-select: none; cursor: pointer; float:right; width: unset; }\n.minmaxify-close:hover, .minmaxify-close:focus { opacity: 1; }\n.minmaxify-p ul { padding-left: 2rem; margin-bottom: 2rem; }',u.head)&&(i.showPopup=function(t,e){for(var a=''+t.replace(new RegExp("\n","g"),"
")+"
    ",n=0;n"+r+"")}a+='
';var o=A("div.minmaxify-p");if(o)o.innerHtml=a;else{u.body.insertBefore(O("
")[0],document.body.firstChild);var s=O("
"+a+"
")[0];s.setAttribute("tabindex",-1),u.body.insertBefore(s,document.body.firstChild),C(".minmaxify-ok","click",(function(){i.closePopup(1)})),C(".minmaxify-close, .minmaxify-p-bg","click",(function(){i.closePopup()})),setTimeout((function(){G(".minmaxify-p-bg, .minmaxify-p",(function(t){t.classList.add("minmaxify-a")}))}),0)}return 1},i.closePopup=function(t){G(".minmaxify-p-wrap, .minmaxify-p-bg",(function(t){t.parentNode.removeChild(t)})),r&&t&&I(g,"click")},i.popupShown=function(){return S("div.minmaxify-p").length},u.addEventListener("keyup",(function(t){27===t.keyCode&&i.closePopup()}))),tt();var o=document.getElementsByTagName("script");for(let t=0;t0&&e>i)){for(var a=0,n=this.cart.items||[],r=0;r0&&t>i&&(this.addMsg("MAX_SUBTOTAL_MSG"),this.isOk=!1)},_doWeight:function(){var t=Number(this.cart.total_weight||0),e=this.opt.weightmin,i=this.opt.weightmax;t0&&t>i&&(this.addMsg("MAX_WEIGHT_MSG"),this.isOk=!1)},checkGenericLimit:function(t,e,i){if(!(t.quantitye.max&&(this.addGenericError("MAX",t,e,i),i)||e.multiple>1&&t.quantity%e.multiple>0&&(this.addGenericError("MULT",t,e,i),i))){var a=Number(t.line_price)/100;void 0!==e.minAmt&&ae.maxAmt&&this.addGenericError("MAX_SUBTOTAL",t,e,i)}},addGenericError:function(t,e,i,a){var n={item:e};a?(t="PROD_"+t+"_MSG",n.itemLimit=i,n.refItem=a):(t="GROUP_"+t+"_MSG",n.groupLimit=i),this.addMsg(t,n),this.isOk=!1},_buildLimitMaps:function(){var t=this.opt,e=t.items||[];t.byHandle={},t.bySKU={},t.byId={};for(var i=0;i0&&(e.sku=e.handle.substring(i+1),e.handle=e.handle.substring(0,i)),e},getItemLimit:function(t,e){var i=this.opt;if(!i)return{};void 0===i.byHandle&&this._buildLimitMaps();var a=this.getCartItemIds(t),n=this.getSkuLimit(a.sku);return n||(n=i.byId[t.product_id]||i.byHandle[a.handle]),n||(n={min:i.itemmin,max:i.itemmax,multiple:i.itemmult}),n},calcItemLimit:function(t){var e=this.getItemLimit(t);(e={max:e.max||0,multiple:e.multiple||1,min:e.min,combine:e.combine}).min||(e.min=e.multiple);var i=this.opt.maxtotalitems||0;return(!e.max||i&&it&&(this.addMsg("TOTAL_ITEMS_MAX_MSG"),this.isOk=!1),a1&&a%i>0&&(this.addMsg("TOTAL_ITEMS_MULT_MSG"),this.isOk=!1)}};var limits={messages:{INTRO_MSG:"Lo sentimos, tu pedido está fuera de los límites :(\n",PROD_MIN_MSG:"{{ProductName}}: Must have at least {{ProductMinQuantity}} of this item.",PROD_MAX_MSG:"{{ProductName}}: Must have at most {{ProductMaxQuantity}} of this item.",PROD_MULT_MSG:"{{ProductName}}: Quantity must be a multiple of {{ProductQuantityMultiple}}."},items:[{h:"closca-mask-for-singularu",max:4,name:"Closca%20Mask%20for%20Singularu"}],groups:[],rules:[],moneyFormat:"{{amount}}€"},validator={apiVer:[1,0],validateCart:function(t){var e=this.instantiate(t);return e.recalculate(),e},getItemLimits:function(t,e){return this.instantiate(t).calcItemLimit(e)},instantiate:function(t){return new CheckState(limits,t.cart,t.customer,t.locale)}};minMaxify.initCartValidator(validator)}();