PageSourceSearch

https://rostfriskruv.se/_nuxt/BUHne_wW2.js

js rostfriskruv.se collected 2026-10-08 23:43:24 UTC 8,567 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BZwXD2l82.js","./CrmR3aVo.js","./CzuyjIjq.js","./DUJXfLSh.js","./Xv25Ct6Q.js","./Ckpw332L.js","./BY7Pff41.js","./PLIMooRQ.js","./CelSSmJc.js","./BKbaXcVS2.js","./ChveM-5p.js","./BOGzJgO7.js","./On9isaYk.js","./D3iMWbxP.js","./gxd9SvVR2.js","./Cv0nvm4t2.js","./C3GTEemb2.js","./CwRFcXc32.js","./CyRM97iB2.js","./C63WrGz02.js","./DdrbLnha2.js","./MBl0HJry2.js","./BAjyojQP.js","./B29QS9tV2.js","./BXak2VNs.js","./C0UVnXPB.js","./D08j3WIB.js","./CFgMrODz.js","./SwtYcUhu.js","./DUgfsCjz.js","./BUKzrtVI.js","./Ck-yXni_.js","./8qmzar56.js","./9WnsdSn3.js","./eutNRX-g.js","./BJQcVT0Z.js","./DAC-Eh8H.js","./C5j6_bAE.js","./CXrWAL2o.js","./CmZA1rNQ.js","./CslUZni5.js","./Br-c1Bpm.js","./C9rLnwiX.js","./X6EjOlUX.js","./JsyBJLTX2.js","./fCL2aiBm2.js","./DVIdOTQ22.js","./C_5Pvt3R2.js","./8LpS5ln_2.js","./lrbj9ffo2.js","./YNGUdcaT2.js","./D6CtOsuW2.js","./CiWBncGz.js","./Bb0aqXtj.js","./3HKDxGSN.js","./xdiWJRbs.js","./BbYaDgrI2.js","./CQm20gg4.js","./CHXaZx31.js","./DQbCN7ii.js","./4IxQEFbD.js","./Ghtsu7yv.js","./CkJr2vlD2.js","./DQLkaB6g2.js","./58kBtehR2.js","./DIQpIhkM2.js","./useProductPurchase.rVynatV_.css","./Component.C_a2RVhw.css"])))=>i.map(i=>d[i]);
2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`0b251121329227421d5c298da1ce48e6e074ceb9`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`b76ef66a-c379-4b03-a73b-27b56dee5244`,e._sentryDebugIdIdentifier=`sentry-dbid-b76ef66a-c379-4b03-a73b-27b56dee5244`)}catch{}})();import{G as e,Tt as t,_t as n,b as r,d as i,ht as a,l as o,ot as s,rt as c,x as l,y as u}from"./CrmR3aVo.js";import{m as d,p as f}from"./BUKzrtVI.js";import{t as p}from"./DUJXfLSh.js";import{n as m,t as h}from"./BXak2VNs.js";import{t as g}from"./DAC-Eh8H.js";import{c as _,r as v}from"./CzuyjIjq.js";import{t as y}from"./BJQcVT0Z.js";import{t as b}from"./CelSSmJc.js";import{t as x}from"./C9rLnwiX.js";import{t as S}from"./Br-c1Bpm.js";import{t as C}from"./C_5Pvt3R2.js";import{n as w}from"./BTDPiw_d2.js";import{t as T}from"./Drahx_qe.js";import{n as E,r as D}from"./Ghtsu7yv.js";import{o as O,s as k,t as A}from"./CkJr2vlD2.js";import{t as j}from"./B8z1J3_t2.js";function M(){return`scheduler`in globalThis&&`yield`in globalThis.scheduler?globalThis.scheduler.yield():new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})})}function N(e){let t=Math.round(e.price*e.quantity*100)-Math.round((e.discountNetAmount||0)*100),n=Math.round(t*e.vatPercent/100);return{net:t,tax:n,gross:t+n}}var P=r(()=>g(()=>import(`./BZwXD2l82.js`).then(e=>e.default||e),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67]),import.meta.url)),F=l({__name:`Dialog`,props:{product:{},type:{},initialQuantity:{}},emits:[...T.emits],setup(n){let{dialogRef:r,onDialogHide:a,onDialogOK:o,onDialogCancel:c}=T(),l=x.is.desktop?`standard`:`top`;return(d,f)=>{let p=P,m=C;return e(),i(m,{ref_key:`dialogRef`,ref:r,class:`product-dialog`,position:t(l),onHide:t(a)},{default:s(()=>[u(p,{product:n.product,type:n.type,"initial-quantity":n.initialQuantity,"on-cancel":t(c),"on-ok":t(o)},null,8,[`product`,`type`,`initial-quantity`,`on-cancel`,`on-ok`])]),_:1},8,[`position`,`onHide`])}}}),I=Object.assign(F,{__name:`ProductDialog`}),{capitalize:L}=w,R=_(`cart`,()=>{let e=a([]),t=v(),{settings:r}=E(),i=A,{proxy:s}=m({scriptInput:{src:`/_scripts/assets/9f4e1a0f9ce2e5f7.js`}}),l=n(``),u=n(null),h=n(``),g=n(!1),_=f(),b=d(),x=0,S=n(``),C=o(()=>JSON.stringify([l.value,z.value])),w=o(()=>S.value===C.value?u.value?.items:void 0);function T(e){l.value=e.trim().toUpperCase(),D.set(`cartCoupon`,l.value)}async function M(){let t=++x,n=C.value;if(h.value=``,u.value=null,g.value=!1,!(!l.value||!e.length)){if(!j.safeParse(l.value).success){h.value=`Ogiltig rabattkod.`;return}g.value=!0;try{let e=await p(`/api/checkout/quote`,{method:`POST`,body:{cart:z.value,couponCode:l.value}});if(t!==x||n!==C.value)return;u.value=e,S.value=n,h.value=e.error||``}catch{t===x&&(h.value=`Kunde inte kontrollera rabattkoden. Försök igen.`)}finally{t===x&&(g.value=!1)}}}function P(){e.length=0,T(``)}let F=o(()=>e.reduce((e,t)=>
2{let n=O(t.product,t.quantity),r=w.value?.find(e=>e.productId===t.product.id),i=N(r??{...n,vatPercent:t.type.vatPercent});return e.price=Math.round(e.price*100+i.net)/100,e.tax=Math.round(e.tax*100+i.tax)/100,e.sum=Math.round((e.price+e.tax)*100)/100,e},{sum:0,tax:0,price:0})),I=o(()=>e.reduce((e,t)=>{let n=t.product.length;return n>e?n:e},0)),R=o(()=>e.reduce((e,t)=>{let n=t.product.weight*t.quantity;return e+=n,e},0)),z=o(()=>e.map(e=>({productId:e.product.id,quantity:e.quantity}))),B=o(()=>k(r.incVat?F.value.sum:F.value.price,r.incVat)),V=o(()=>B.value<=0?0:r.incVat?i.incVat:i.excVat);function H(n,r,i=!1,a=!0){if(r<1)return!1;let o=r,c=t.getTypeById(n.typeId);if(!c)return!1;let l=G(n.id);return l?i?(o=r-l.quantity,l.quantity=r):l.quantity+=r:(l={product:n,type:c,quantity:r},e.push(l)),n.orderItem&&n.stock<l.quantity&&n.price[2]?.quantity&&l.quantity%n.price[2].quantity!=0&&(l.quantity=Math.ceil(l.quantity/n.price[2].quantity)*n.price[2].quantity),e.sort((e,t)=>{let n;return e.type.short[0]&&t.type.short[0]&&(n=e.type.short[0].localeCompare(t.type.short[0]),n!=0)||(n=Number(e.product.size.at(-1))-Number(t.product.size.at(-1)),n!=0)||(n=Number(e.product.length)-Number(t.product.length)),n}),a&&s.gtag(`event`,`add_to_cart`,{currency:`SEK`,value:O(n,r).price*o,items:[{item_id:String(n.id),item_name:L(t.getTypeName(c)),index:0,item_category:c.group,item_variant:t.getProductDesc(n,c),quantity:o,price:O(n,r).price}]}),l}async function U(){try{await navigator.locks.request(`cart-storage`,{mode:`shared`},()=>{let n=D.getItem(`cart`);if(n&&Array.isArray(n)){let r=e.map(e=>({id:e.product.id,quantity:e.quantity}));JSON.stringify(n)!=JSON.stringify(r)&&(e.length=0),n.forEach(e=>{let n=t.getProductById(e.id);n&&H(n,e.quantity,!0,!1)})}})}catch{}}async function W(){await navigator.locks.request(`cart-storage`,()=>{D.set(`cart`,e.map(e=>({id:e.product.id,quantity:e.quantity})))})}function G(t){return e.find(e=>e.product.id===t)}function K(n,r){let i=e.findIndex(e=>e.product.id===n);if(i===-1)return 0;let a=e[i],o=r===void 0?a.quantity:Math.min(a.quantity,Math.max(0,Math.trunc(r)));if(o<1)return 0;let c=O(a.product,a.quantity).price;return o>=a.quantity?e.splice(i,1):a.quantity-=o,s.gtag(`event`,`remove_from_cart`,{currency:`SEK`,value:c*o,items:[{item_id:String(a.product.id),item_name:L(t.getTypeName(a.type)),index:0,item_category:a.type.group,item_variant:t.getProductDesc(a.product,a.type),quantity:o,price:c}]}),o}return y(()=>{l.value=D.getItem(`cartCoupon`)||``,c(()=>_.query.discount,e=>{if(typeof e!=`string`||!e.trim())return;T(e);let{discount:t,...n}=_.query;b.replace({query:n,hash:_.hash})},{immediate:!0}),c(C,M,{immediate:!0}),document.addEventListener(`visibilitychange`,()=>{document.hidden||M()}),U(),c(e,async e=>{e.forEach(e=>{Number.isInteger(e.quantity)||(e.quantity=parseInt(String(e.quantity))||1),e.quantity<1&&(e.quantity=1)});try{await W()}catch{}}),typeof addEventListener==`function`&&addEventListener(`storage`,e=>{e.key===`cartCoupon`&&(l.value=D.getItem(`cartCoupon`)||``),e.key===`cart`&&e.newValue!==e.oldValue&&t.dbLoaded&&U()})}),{cart:e,couponCode:l,couponError:h,couponLoading:g,discountedItems:w,setCouponCode:T,refreshCoupon:M,clearPurchasedCart:P,cartSum:F,asObject:z,freeFreight:B,cartAdd:H,cartRemove:K,getCartLineById:G,shippingCost:i,minimumShippingCost:V,loadCartFromStorage:U,maxLength:I,totalWeight:R}});function z(e,t){R().cartAdd(e,t),B(e,t)}function B(e,t,n=!1){let r=v(),i=R();h.create({position:`top-right`,group:`cartNotify`,color:`white`,textColor:`black`,message:n?`Kundvagnen har nu ${t} st ${r.getProductDesc(e,r.getTypeById(e.typeId))}`:`Lagt till ${t} st ${r.getProductDesc(e,r.getTypeById(e.typeId))} i kundvagnen`,caption:i.freeFreight>0?b.format(i.freeFreight)+` kvar till fri frakt!`:`Fri frakt erbjuds!`,icon:`shopping_cart`,actions:[{color:`primary`,label:`Fortsätt handla`},{icon:`shopping_cart_checkout`,to:`/kassa/`,color:`primary`,label:`Till kassan`,class:`q-btn--standard q-btn--rectangle bg-primary text-white`}]})}async function V(e,t,n=0){await M(),S.create({component:I,componentProps:{product:e,type:t,initialQuantity:n}})}export{M as a,R as i,z as n,V as r,B 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.