PageSourceSearch

https://icity-store.ru/_nuxt/DHRidxBE.js

js icity-store.ru collected 2026-10-08 12:20:46 UTC 75,944 bytes, 1 lines download raw bytes

1import{a as Qn,J as Kn,w as es,b as Xe,p as ie,c as Mt,n as D,u as c,N as y,Y as X,Z as B,P as d,ah as xt,Q as me,O as w,R as Y,_ as N,ai as ts,j as G,l as be,am as ns,ab as xe,ak as ss,an as Nt,M as ne,U as fe,aj as os,ao as rs,V as ae,A as Qt,o as ls,a4 as de,a0 as Q,T as Le,S as Kt,ac as en,ad as tn,$ as as,a5 as is,r as Rt}from"./BXNZEfej.js";import{n as Bt}from"./CigJtJRr.js";import{i as cs,f as nn,a as sn,J as us,m as Ae,c as fs,b as we,A as ds,M as pe}from"./DVU9Z8Aa.js";import{u as ps}from"./zuEK2tmn.js";import{u as on,a as ms,c as bs}from"./BBHJ7Oqq.js";import{b as Ie,_ as Se,F as wt,c as hs,u as gs,i as Et,p as ys,G as _s,a as xs,l as Ft}from"./Do7IoDJP.js";import{_ as rn}from"./C-MC8Czq.js";import{_ as ws}from"./BOgpgGmF.js";import{v as yt}from"./QmJLAmuk.js";import{u as vs,a as ks}from"./DLGwV9MF.js";import{u as $s,a as Cs,o as As,b as Ps}from"./BStV8G6L.js";import{T as Ss}from"./76ryM4og.js";import{_ as Ms,a as Ns}from"./C2w5B3vo.js";import{a as Rs,_ as Bs}from"./Bjhj-BqV.js";import{a as Es,_ as Fs}from"./DsbiitaN.js";import{g as Lt}from"./Bc0iluX2.js";import{i as Ls}from"./Dz51s_an.js";import{u as Ts}from"./DS7dDq1x.js";import{u as Is}from"./BbOtyy58.js";import{u as ln}from"./CVAp9P6_.js";import{u as Vs}from"./QFHktZpv.js";import{a as an}from"./CcQttMBm.js";import{u as Tt}from"./w39yRhbk.js";import"./CbirEwzC.js";import"./BvZ140T0.js";import"./CD76rCXo.js";import"./BP9tNeQD.js";import"./NQd-mZac.js";import"./CYJc2ep0.js";import"./CA1zMNmb.js";function Ke(...e){const t=!Array.isArray(e[0]),n=t?0:-1,s=e[0+n],o=e[1+n],r=e[2+n],l=e[3+n],a=cs(o,r,l);return t?a(s):a}function js(e,t,n={}){const s=e.get();let o=null,r=s,l;const a=typeof s=="string"?s.replace(/[\d.-]/g,""):void 0,i=()=>{o&&(o.stop(),o=null),e.animation=void 0},u=()=>{const b=It(e.get()),m=It(r);if(b===m){i();return}const _=o?o.getGeneratorVelocity():e.getVelocity();i(),o=new us({keyframes:[b,m],velocity:_,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l})},p=()=>{u(),e.animation=o??void 0,e.events.animationStart?.notify(),o?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((b,m)=>{r=b,l=_=>m(et(_,a)),nn.postRender(p)},i),sn(t)){let b=n.skipInitialAnimation===!0;const m=t.on("change",$=>{b?(b=!1,e.jump(et($,a),!1)):e.set(et($,a))}),_=e.on("destroy",m);return()=>{m(),_()}}return i}function et(e,t){return t?e+t:e}function It(e){return typeof e=="number"?e:parseFloat(e)}function cn(e){const t=Ae(e()),n=()=>t.set(e()),s=()=>nn.preRender(n,!1,!0);let o;const r=a=>{o=a.map(i=>i.on("change",s))},l=()=>{o.forEach(a=>a()),fs(n)};return Qn()&&Kn(()=>{l()}),{subscribe:r,unsubscribe:l,value:t,updateValue:n}}function Us(e){we.current=[];const{value:t,subscribe:n,unsubscribe:s,updateValue:o}=cn(e);return n(we.current),we.current=void 0,es(()=>{s(),we.current=[],o(),n(we.current),we.current=void 0}),t}function Vt(e,t,n,s){if(typeof e=="function")return Us(e);let o,r;if(Xe(t)){const a=Ae(0);let i=Ke(t.value,n,s);ie(t,u=>{i=Ke(u,n,s),a.set(a.get()+1)},{flush:"sync"}),r=u=>Array.isArray(u)?i(u[0]):i(u),o=Array.isArray(e)?[...e,a]:[e,a]}else r=Ke(t,n,s),o=Array.isArray(e)?e:[e];const l=Array.isArray(e)?jt(o,r):jt(o,a=>r(a[0]));if(!Array.isArray(e)){const a=e.accelerate;if(a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&s?.clamp!==!1){const i=Xe(t)?t.value:t;l.accelerate={...a,times:i,keyframes:n,isTransformed:!0}}}return l}function jt(e,t){const n=[],s=()=>{n.length=0;const l=e.length;for(let a=0;a<l;a++)n[a]=e[a].get();return t(n)},{value:o,subscribe:r}=cn(s);return r(e),o}function Ut(e,t={}){const n=Ae(sn(e)?e.get():e);return ie(()=>Mt(t),(s,o,r)=>{const l=js(n,e,{type:"spring",...Mt(t)});r(()=>{l?.()})},{immediate:!0}),n}function zs(e={}){const t=on("(prefers-reduced-motion: reduce)",e);return D(()=>t.value)}const Os={key:0,class:"text-sm font-medium text-[#149100]"},qs={class:"flex flex-wrap items-baseline gap-2"},Gs={key:1,class:"text-lg font-bold text-blue-5"},Ds={key:2,class:"text-base font-medium text-dark-grey-dark-grey-3"},Ys={key:3,class:"text-[1.1rem] font-medium text-dark-grey-dark-grey-3 line-through tabular-nums"}
1,Hs={key:1,class:"inline-flex self-start px-2 py-1.5 pr-4 -ml-1 rounded-xl items-center gap-1.5 text-xs bg-[rgba(255,255,255,0.50)] text-[#149100]"},Xs={key:0,class:"icity-icons-buy text-2xl mx-3.5 my-1","aria-hidden":"true"},Ws={key:1,class:"whitespace-nowrap text-lg"},tt=450,zt=550,Js=1e3,Zs={__name:"NavPrice",props:{cashPrice:{type:Number,default:0},cardPrice:{type:Number,default:0},status:{type:String,default:"out_of_stock"}},emits:["add-to-cart"],setup(e,{emit:t}){const n=ms(),s=e,o=t,r=on("(max-width: 768px)"),{startAddToCartAnimation:l,showAddToCartReceiver:a,endAddToCartAnimation:i}=ps(),u=G("idle");function p(){s.status!=="out_of_stock"&&(o("add-to-cart"),u.value="expanding",l(),setTimeout(()=>{u.value="flying",a()},tt),setTimeout(()=>{i()},tt+zt-200),setTimeout(()=>{u.value="idle"},tt+zt+Js))}return(b,m)=>c(n)?(y(),X(ts,{key:0,to:"#nav-content-inner",disabled:!c(r)},[c(r)?(y(),X(c(ds),{key:0},{default:B(()=>[c(r)&&c(u)!=="flying"?(y(),X(c(pe),{key:"product-nav-price",as:"div",class:"",initial:{height:0,opacity:0,marginBottom:0},animate:{height:"auto",opacity:1,marginBottom:"1rem"},exit:{height:0,opacity:0,marginBottom:0},transition:{type:"spring",stiffness:400,damping:30}},{default:B(()=>[d("div",{class:"relative flex items-center gap-3 rounded-xl px-4 py-3 min-h-0",onClick:m[1]||(m[1]=xt(()=>{},["stop"]))},[d("div",{class:me(["flex min-w-0 flex-1 flex-col gap transition-opacity duration-150",c(u)!=="idle"?"opacity-0 pointer-events-none":"opacity-100"])},[e.status==="available"?(y(),w("div",Os," Цена по акции ")):Y("",!0),d("div",qs,[e.status==="available"?(y(),X(c(Bt),{key:0,value:e.cashPrice,locales:"ru-RU",format:{style:"currency",currency:"RUB",minimumFractionDigits:0,maximumFractionDigits:0},class:"text-[1.6rem] font-bold text-[#149100] tabular-nums"},null,8,["value"])):e.status==="preorder"?(y(),w("span",Gs,"Ожидаем")):(y(),w("span",Ds,"Нет в продаже")),e.status==="available"&&e.cardPrice>0&&e.cardPrice>e.cashPrice?(y(),w("span",Ys,[N(c(Bt),{value:e.cardPrice,locales:"ru-RU",format:{style:"currency",currency:"RUB",minimumFractionDigits:0,maximumFractionDigits:0},class:"inline-block"},null,8,["value"])])):Y("",!0)]),e.status==="available"?(y(),w("div",Hs,[...m[2]||(m[2]=[d("i",{class:"icity-icons-ticksquare text-lg text-[#149100]","aria-hidden":"true"},null,-1),d("span",null,"Товар есть в наличии",-1)])])):Y("",!0)],2),e.status==="available"?(y(),X(c(pe),{key:0,"layout-id":"nav-add-to-cart-feedback",as:"button",type:"button",disabled:e.status==="out_of_stock"||c(u)!=="idle",class:me(["flex items-center justify-center rounded-[1.275rem] gradient-bg text-white border-0 cursor-pointer disabled:cursor-default",c(u)==="idle"?"relative flex-shrink-0 !p-3":"absolute inset-0 mx-4 mt-4 mb-8 font-medium text-sm z-[999999999999999]"]),transition:{type:"spring",stiffness:400,damping:35},onClick:m[0]||(m[0]=_=>c(u)==="idle"&&p())},{default:B(()=>[c(u)==="idle"?(y(),w("i",Xs)):(y(),w("span",Ws,"Товар добавлен в корзину"))]),_:1},8,["disabled","class"])):Y("",!0)])]),_:1})):Y("",!0)]),_:1})):Y("",!0)],8,["disabled"])):Y("",!0)}},Qs=be({__name:"Checkbox",props:{product:{},variant:{default:"card"}},setup(e){const t=e,n=ns("trigger"),{applyToggle:s,isChecked:o,onTriggerHover:r,canHover:l}=vs(()=>t.product,n),a=D(()=>{const p=o.value?"text-blue-5":"text-dark-grey-dark-grey-4";return t.variant==="inline"?["inline-flex items-center gap-2 text-xs sm:!text-lg xs:!text-base",o.value?"text-blue-5":"text-mid-grey-mid-grey-5"]:["flex w-full items-center gap-2 pt-1 text-sm",p]});function i(p){p!==o.value&&s()}function u(){s()}return(p,b)=>{const m=ws;return xe((y(),w("div",{ref:"trigger",class:me(["compare-checkbox relative",c(a)]),onClick:b[0]||(b[0]=xt(()=>{},["stop"]))},[N(m,{"model-value":c(o),"onUpdate:modelValue":i},null,8,["model-value"]),d("button",{type:"button",class:"cursor-pointer select-none text-left",onClick:u}," Сравнить ")],2)),[[c(yt),c(l)?[c(r),{delayEnter:0,delayLeave:0}]:()=>{}]])}}}),Ks=""+new URL("no-image.Bl1Kd5ER.svg",import.meta.url).href,eo={class:"flex items-center gap-2 lg:h-[440px] sm:flex-col-reverse sm:items-center sm:justify-center min-w-0 min-h-0 xs:h-auto"},to={class:"h-12 w-12 items-center justify-center rounded-md bg-white p-1 shadow lg:h-14 lg:w-14"},no=["src"],so={class:"flex flex-col gap-1.5 p-1 max-h-[328px] h-full justify-center lg:max-h-[380px] sm:flex-row sm:items-start sm:max-w-full sm:w-full sm:!overflow-visible"},oo=["src"],ro={class:"relative flex min-h-0 w-full min-w-0 flex-1 xs:flex-none"},lo=["onClick"],ao=["src"],io={key:0,class:"absolute bottom-0 left-0 m-4 flex scale-95 flex-col items-start gap-1 text-xs text-white sm:hidden"},co={key:0,class:"rounded-full bg-[#48A0FF] px-1.5 py-0.5 text-xs"},uo={key:1,class:"rounded-full bg-[#FF9935] px-1.5 py-0.5 text-xs"},fo={__name:"Preview",props:{product:{type:Object,default:()=>({})},images:{type:Array,default:()=>[{img:"/img/products/phone/iphone/15pro/iphone-15pro-1.png"},{img:"/img/products/phone/iphone/15pro/iphone-15pro-2.png"},{img:"/img/products/phone/iphone/15pro/iphone-15pro-3.png"},{img:"/img/products/phone/iphone/15pro/iphone-15pro-4.png"},{img:"/img/products/phone/iphone/15pro/iphone-15pro-5.png"},{img:"/img/products/phone/iphone/15pro/iphone-15pro-4.png"}]},vkEmbedHtml:{type:String,default:""},isReviewOpen:{type:Boolean,default:!1},isFullscreenOpen:{type:Boolean,default:!1}},emits:["open-fullscreen","open-review"],setup(e,{expose:t,emit:n}){const s={type:"spring",stiffness:380,damping:34},o={type:"spring",stiffness:380,damping:34},r=e,l=n,a=G(null),i=G(null),u={767.99:{direction:"vertical",slidesPerView:6,spaceBetween:2}},p=v=>a.value=v,b=v=>i.value=v,m=()=>i.value.slideNext(),_=()=>i.value.slidePrev(),$=G(r.images),g=v=>{l("open-fullscreen",v)},C=()=>
1{l("open-review")};return t({swiperInstanceMain:i,swiperInstanceMini:a}),(v,z)=>{const j=os,q=ss,S=rn;return y(),w("div",eo,[c($).length>1?(y(),w("div",{key:0,class:me(["justify-between sm:flex sm:w-full sm:justify-center",{"self-stretch":c($).length<6}])},[d("button",{class:"flex w-full justify-center p-1 sm:hidden",onClick:_},[...z[0]||(z[0]=[d("i",{class:"icity-icons-arrow-up2-2"},null,-1)])]),N(S,null,{fallback:B(()=>[d("div",so,[(y(!0),w(ne,null,fe(c($).slice(0,6),k=>(y(),w("div",{key:k.id,class:"flex h-12 w-12 items-center justify-center p-1 overflow-hidden rounded-md bg-white shadow lg:h-14 lg:w-14"},[d("img",{class:"h-full w-full object-contain",src:k.img},null,8,oo)]))),128))])]),default:B(()=>[N(q,{ref:"swiperVertical",direction:"horizontal",class:"swiperMini max-h-[328px] lg:max-h-[380px] h-full sm:max-w-full sm:w-full sm:!overflow-visible","slides-per-view":"auto","wrapper-class":"justify-center sm:justify-start","space-between":6,modules:["SwiperThumbs"in v?v.SwiperThumbs:c(Nt)],"watch-slides-progress":!0,breakpoints:u,init:!1,onSwiper:p},{default:B(()=>[(y(!0),w(ne,null,fe(c($),k=>(y(),X(j,{key:k,class:"sm:max-w-14"},{default:B(()=>[d("div",to,[d("img",{class:"h-full w-full object-contain",src:k.img||"~/asset/img/status/no-image.svg"},null,8,no)])]),_:2},1024))),128))]),_:1},8,["modules"])]),_:1}),d("button",{class:"flex w-full justify-center p-1 sm:hidden",onClick:m},[...z[1]||(z[1]=[d("i",{class:"icity-icons-arrow-down-2-2"},null,-1)])])],2)):Y("",!0),d("div",ro,[N(c(pe),{"layout-id":"product-gallery-frame",as:"div",class:me(["relative flex min-h-0 w-full min-w-0 flex-1 justify-center rounded-lg bg-white shadow-light transition-opacity duration-200 xs:flex-none",e.isFullscreenOpen?"pointer-events-none opacity-0":"pointer-events-auto opacity-100"]),transition:s},{default:B(()=>[N(q,{ref:"swiperProduct",class:"md:ww-[350px] flex-1 rounded-lg xs:w-full",modules:["SwiperThumbs"in v?v.SwiperThumbs:c(Nt),"SwiperEffectFade"in v?v.SwiperEffectFade:c(rs)],effect:"fade",thumbs:{swiper:c(a)},loop:!0,onSwiper:b},{default:B(()=>[c($).length?(y(!0),w(ne,{key:0},fe(c($),(k,f)=>(y(),X(j,{key:k},{default:B(()=>[d("div",{class:"relative flex aspect-[452/380] w-full cursor-pointer items-center justify-center bg-white p-2 lg:max-h-[428px] lg:w-full lg:p-4 xs:w-full",onClick:A=>g(f)},[d("img",{class:"h-full w-full object-contain md:max-h-[300px]",src:k.img},null,8,ao),e.product?.modelFlags?.tradeIn||e.product?.modelFlags?.installmentPlan?(y(),w("div",io,[e.product?.modelFlags?.tradeIn?(y(),w("div",co," Можно в Trade-in ")):Y("",!0),e.product?.modelFlags?.installmentPlan?(y(),w("div",uo," Рассрочка 0% ")):Y("",!0)])):Y("",!0)],8,lo)]),_:2},1024))),128)):(y(),X(j,{key:1,class:"!w-12"},{default:B(()=>[...z[2]||(z[2]=[d("div",{class:"flex aspect-[452/380] w-[452px] items-center justify-center bg-white p-2 lg:w-full lg:p-4 md:w-[350px] xs:w-full"},[d("img",{class:"h-full w-full max-w-[332px] object-contain",src:Ks})],-1)])]),_:1}))]),_:1},8,["modules","thumbs"]),e.vkEmbedHtml&&!e.isReviewOpen?(y(),X(c(pe),{key:0,"layout-id":"vk-review-frame",as:"button",type:"button",class:"absolute bottom-4 right-4 z-10 flex items-center gap-1.5 rounded-full bg-blue-5 px-3 py-2 text-sm font-medium text-white sm:bottom-3 sm:right-3 sm:gap-1 sm:px-2.5 sm:py-1.5 sm:text-xs",transition:o,onClick:xt(C,["stop"])},{default:B(()=>[...z[3]||(z[3]=[d("span",null,"Смотреть обзор",-1),d("i",{class:"icity-icons-arrow-right2 text-xl leading-none","aria-hidden":"true"},null,-1)])]),_:1})):Y("",!0)]),_:1},8,["class"])])])}}},Ce=(e,t=0,n=1)=>kt($t(t,e),n),vt=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=Ce(e[t],0,255)):t===3&&(e[t]=Ce(e[t],0,1));return e},un={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])un[`[object ${e}]`]=e.toLowerCase();function I(e){return un[Object.prototype.toString.call(e)]||"object"}const V=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):I(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0],Je=e=>{if(e.length<2)return null;const t=e.length-1;return I(e[t])=="string"?e[t].toLowerCase():null},{PI:Ze,min:kt,max:$t}=Math,le=Ze*2,nt=Ze/3,po=Ze/180,mo=180/Ze,E={format:{},autodetect:[]};class h{constructor(...t){const n=this;if(I(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let s=Je(t),o=!1;if(!s){o=!0,E.sorted||(E.autodetect=E.autodetect.sort((r,l)=>l.p-r.p),E.sorted=!0);for(let r of E.autodetect)if(s=r.test(...t),s)break}if(E.format[s]){const r=E.format[s].apply(null,o?t:t.slice(0,-1));n._rgb=vt(r)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return I(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const bo="2.6.0",L=(...e)=>new L.Color(...e);L.Color=h;L.version=bo;const ho=(...e)=>{e=V(e,"cmyk");const[t,n,s,o]=e,r=e.length>4?e[4]:1;return o===1?[0,0,0,r]:[t>=1?0:255*(1-t)*(1-o),n>=1?0:255*(1-n)*(1-o),s>=1?0:255*(1-s)*(1-o),r]},{max:Ot}=Math,go=(...e)=>{let[t,n,s]=V(e,"rgb");t=t/255,n=n/255,s=s/255;const o=1-Ot(t,Ot(n,s)),r=o<1?1/(1-o):0,l=(1-t-o)*r,a=(1-n-o)*r,i=(1-s-o)*r;return[l,a,i,o]};h.prototype.cmyk=function(){return go(this._rgb)};L.cmyk=(...e)=>new h(...e,"cmyk");E.format.cmyk=ho;E.autodetect.push({p:2,test:(...e)=>{if(e=V(e,"cmyk"),I(e)==="array"&&e.length===4)return"cmyk"}});const st=e=>Math.round(e*100)/100,yo=(...e)=>{const t=V(e,"hsla");let n=Je(e)||"lsa";return t[0]=st(t[0]||0),t[1]=st(t[1]*100)+"%",t[2]=st(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,n="hsla"):t.length=3,`${n}(${t.join(",")})`},fn=(...e)=>{e=V(e,"rgba");let[t,n,s]=e;t/=255,n/=255,s/=255;const o=kt(t,n,s),r=$t(t,n,s),l=(r+o)/2;let a,i;return r===o?(a=0,i=Number.NaN):a=l<.5?(r-o)/(r+o):(r-o)/(2-r-o),t==r?i=(n-s)/(r-o):n==r?i=2+(s-t)/(r-o):s==r&&(i=4+(t-n)/(r-o)),i*=60,i<0&&(i+=360),e.length>3&&e[3]!==void 0?[i,a,l,e[3]]:[i,a,l]},{round:ot}=Math,_o=(...e)=>{const t=V(e,"rgba");let n=Je(e)||"rgb";return n.substr(0,3)=="hsl"?yo(fn(t),n):(t[0]=ot(t[0]),t[1]=ot(t[1]),t[2]=ot
1(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,n="rgba"),`${n}(${t.slice(0,n==="rgb"?3:4).join(",")})`)},{round:rt}=Math,_t=(...e)=>{e=V(e,"hsl");const[t,n,s]=e;let o,r,l;if(n===0)o=r=l=s*255;else{const a=[0,0,0],i=[0,0,0],u=s<.5?s*(1+n):s+n-s*n,p=2*s-u,b=t/360;a[0]=b+1/3,a[1]=b,a[2]=b-1/3;for(let m=0;m<3;m++)a[m]<0&&(a[m]+=1),a[m]>1&&(a[m]-=1),6*a[m]<1?i[m]=p+(u-p)*6*a[m]:2*a[m]<1?i[m]=u:3*a[m]<2?i[m]=p+(u-p)*(2/3-a[m])*6:i[m]=p;[o,r,l]=[rt(i[0]*255),rt(i[1]*255),rt(i[2]*255)]}return e.length>3?[o,r,l,e[3]]:[o,r,l,1]},dn=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,pn=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,mn=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,bn=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,hn=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,gn=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:qt}=Math,Ct=e=>{e=e.toLowerCase().trim();let t;if(E.format.named)try{return E.format.named(e)}catch{}if(t=e.match(dn)){const n=t.slice(1,4);for(let s=0;s<3;s++)n[s]=+n[s];return n[3]=1,n}if(t=e.match(pn)){const n=t.slice(1,5);for(let s=0;s<4;s++)n[s]=+n[s];return n}if(t=e.match(mn)){const n=t.slice(1,4);for(let s=0;s<3;s++)n[s]=qt(n[s]*2.55);return n[3]=1,n}if(t=e.match(bn)){const n=t.slice(1,5);for(let s=0;s<3;s++)n[s]=qt(n[s]*2.55);return n[3]=+n[3],n}if(t=e.match(hn)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const s=_t(n);return s[3]=1,s}if(t=e.match(gn)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const s=_t(n);return s[3]=+t[4],s}};Ct.test=e=>dn.test(e)||pn.test(e)||mn.test(e)||bn.test(e)||hn.test(e)||gn.test(e);h.prototype.css=function(e){return _o(this._rgb,e)};L.css=(...e)=>new h(...e,"css");E.format.css=Ct;E.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&I(e)==="string"&&Ct.test(e))return"css"}});E.format.gl=(...e)=>{const t=V(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};L.gl=(...e)=>new h(...e,"gl");h.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};const{floor:xo}=Math,wo=(...e)=>{e=V(e,"hcg");let[t,n,s]=e,o,r,l;s=s*255;const a=n*255;if(n===0)o=r=l=s;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const i=xo(t),u=t-i,p=s*(1-n),b=p+a*(1-u),m=p+a*u,_=p+a;switch(i){case 0:[o,r,l]=[_,m,p];break;case 1:[o,r,l]=[b,_,p];break;case 2:[o,r,l]=[p,_,m];break;case 3:[o,r,l]=[p,b,_];break;case 4:[o,r,l]=[m,p,_];break;case 5:[o,r,l]=[_,p,b];break}}return[o,r,l,e.length>3?e[3]:1]},vo=(...e)=>{const[t,n,s]=V(e,"rgb"),o=kt(t,n,s),r=$t(t,n,s),l=r-o,a=l*100/255,i=o/(255-l)*100;let u;return l===0?u=Number.NaN:(t===r&&(u=(n-s)/l),n===r&&(u=2+(s-t)/l),s===r&&(u=4+(t-n)/l),u*=60,u<0&&(u+=360)),[u,a,i]};h.prototype.hcg=function(){return vo(this._rgb)};L.hcg=(...e)=>new h(...e,"hcg");E.format.hcg=wo;E.autodetect.push({p:1,test:(...e)=>{if(e=V(e,"hcg"),I(e)==="array"&&e.length===3)return"hcg"}});const ko=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,$o=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,yn=e=>
1{if(e.match(ko)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,s=t>>8&255,o=t&255;return[n,s,o,1]}if(e.match($o)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,s=t>>16&255,o=t>>8&255,r=Math.round((t&255)/255*100)/100;return[n,s,o,r]}throw new Error(`unknown hex color: ${e}`)},{round:Oe}=Math,_n=(...e)=>{let[t,n,s,o]=V(e,"rgba"),r=Je(e)||"auto";o===void 0&&(o=1),r==="auto"&&(r=o<1?"rgba":"rgb"),t=Oe(t),n=Oe(n),s=Oe(s);let a="000000"+(t<<16|n<<8|s).toString(16);a=a.substr(a.length-6);let i="0"+Oe(o*255).toString(16);switch(i=i.substr(i.length-2),r.toLowerCase()){case"rgba":return`#${a}${i}`;case"argb":return`#${i}${a}`;default:return`#${a}`}};h.prototype.hex=function(e){return _n(this._rgb,e)};L.hex=(...e)=>new h(...e,"hex");E.format.hex=yn;E.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&I(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{cos:ve}=Math,Co=(...e)=>{e=V(e,"hsi");let[t,n,s]=e,o,r,l;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(l=(1-n)/3,o=(1+n*ve(le*t)/ve(nt-le*t))/3,r=1-(l+o)):t<2/3?(t-=1/3,o=(1-n)/3,r=(1+n*ve(le*t)/ve(nt-le*t))/3,l=1-(o+r)):(t-=2/3,r=(1-n)/3,l=(1+n*ve(le*t)/ve(nt-le*t))/3,o=1-(r+l)),o=Ce(s*o*3),r=Ce(s*r*3),l=Ce(s*l*3),[o*255,r*255,l*255,e.length>3?e[3]:1]},{min:Ao,sqrt:Po,acos:So}=Math,Mo=(...e)=>{let[t,n,s]=V(e,"rgb");t/=255,n/=255,s/=255;let o;const r=Ao(t,n,s),l=(t+n+s)/3,a=l>0?1-r/l:0;return a===0?o=NaN:(o=(t-n+(t-s))/2,o/=Po((t-n)*(t-n)+(t-s)*(n-s)),o=So(o),s>n&&(o=le-o),o/=le),[o*360,a,l]};h.prototype.hsi=function(){return Mo(this._rgb)};L.hsi=(...e)=>new h(...e,"hsi");E.format.hsi=Co;E.autodetect.push({p:2,test:(...e)=>{if(e=V(e,"hsi"),I(e)==="array"&&e.length===3)return"hsi"}});h.prototype.hsl=function(){return fn(this._rgb)};L.hsl=(...e)=>new h(...e,"hsl");E.format.hsl=_t;E.autodetect.push({p:2,test:(...e)=>{if(e=V(e,"hsl"),I(e)==="array"&&e.length===3)return"hsl"}});const{floor:No}=Math,Ro=(...e)=>{e=V(e,"hsv");let[t,n,s]=e,o,r,l;if(s*=255,n===0)o=r=l=s;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=No(t),i=t-a,u=s*(1-n),p=s*(1-n*i),b=s*(1-n*(1-i));switch(a){case 0:[o,r,l]=[s,b,u];break;case 1:[o,r,l]=[p,s,u];break;case 2:[o,r,l]=[u,s,b];break;case 3:[o,r,l]=[u,p,s];break;case 4:[o,r,l]=[b,u,s];break;case 5:[o,r,l]=[s,u,p];break}}return[o,r,l,e.length>3?e[3]:1]},{min:Bo,max:Eo}=Math,Fo=(...e)=>{e=V(e,"rgb");let[t,n,s]=e;const o=Bo(t,n,s),r=Eo(t,n,s),l=r-o;let a,i,u;
1return u=r/255,r===0?(a=Number.NaN,i=0):(i=l/r,t===r&&(a=(n-s)/l),n===r&&(a=2+(s-t)/l),s===r&&(a=4+(t-n)/l),a*=60,a<0&&(a+=360)),[a,i,u]};h.prototype.hsv=function(){return Fo(this._rgb)};L.hsv=(...e)=>new h(...e,"hsv");E.format.hsv=Ro;E.autodetect.push({p:2,test:(...e)=>{if(e=V(e,"hsv"),I(e)==="array"&&e.length===3)return"hsv"}});const K={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:Lo}=Math,xn=(...e)=>{e=V(e,"lab");const[t,n,s]=e;let o,r,l,a,i,u;return r=(t+16)/116,o=isNaN(n)?r:r+n/500,l=isNaN(s)?r:r-s/200,r=K.Yn*at(r),o=K.Xn*at(o),l=K.Zn*at(l),a=lt(3.2404542*o-1.5371385*r-.4985314*l),i=lt(-.969266*o+1.8760108*r+.041556*l),u=lt(.0556434*o-.2040259*r+1.0572252*l),[a,i,u,e.length>3?e[3]:1]},lt=e=>255*(e<=.00304?12.92*e:1.055*Lo(e,1/2.4)-.055),at=e=>e>K.t1?e*e*e:K.t2*(e-K.t0),{pow:wn}=Math,vn=(...e)=>{const[t,n,s]=V(e,"rgb"),[o,r,l]=To(t,n,s),a=116*r-16;return[a<0?0:a,500*(o-r),200*(r-l)]},it=e=>(e/=255)<=.04045?e/12.92:wn((e+.055)/1.055,2.4),ct=e=>e>K.t3?wn(e,1/3):e/K.t2+K.t0,To=(e,t,n)=>{e=it(e),t=it(t),n=it(n);const s=ct((.4124564*e+.3575761*t+.1804375*n)/K.Xn),o=ct((.2126729*e+.7151522*t+.072175*n)/K.Yn),r=ct((.0193339*e+.119192*t+.9503041*n)/K.Zn);return[s,o,r]};h.prototype.lab=function(){return vn(this._rgb)};L.lab=(...e)=>new h(...e,"lab");E.format.lab=xn;E.autodetect.push({p:2,test:(...e)=>{if(e=V(e,"lab"),I(e)==="array"&&e.length===3)return"lab"}});const{sin:Io,cos:Vo}=Math,kn=(...e)=>{let[t,n,s]=V(e,"lch");return isNaN(s)&&(s=0),s=s*po,[t,Vo(s)*n,Io(s)*n]},$n=(...e)=>{e=V(e,"lch");const[t,n,s]=e,[o,r,l]=kn(t,n,s),[a,i,u]=xn(o,r,l);return[a,i,u,e.length>3?e[3]:1]},jo=(...e)=>{const t=V(e,"hcl").reverse();return $n(...t)},{sqrt:Uo,atan2:zo,round:Oo}=Math,Cn=(...e)=>{const[t,n,s]=V(e,"lab"),o=Uo(n*n+s*s);let r=(zo(s,n)*mo+360)%360;return Oo(o*1e4)===0&&(r=Number.NaN),[t,o,r]},An=(...e)=>{const[t,n,s]=V(e,"rgb"),[o,r,l]=vn(t,n,s);return Cn(o,r,l)};h.prototype.lch=function(){return An(this._rgb)};h.prototype.hcl=function(){return An(this._rgb).reverse()};L.lch=(...e)=>new h(...e,"lch");L.hcl=(...e)=>new h(...e,"hcl");E.format.lch=$n;E.format.hcl=jo;["lch","hcl"].forEach(e=>E.autodetect.push({p:2,test:(...t)=>{if(t=V(t,e),I(t)==="array"&&t.length===3)return e}}));const Pe={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};h.prototype.name=function(){const e=_n(this._rgb,"rgb");for(let t of Object.keys(Pe))if(Pe[t]===e)return t.toLowerCase();return e};E.format.named=e=>{if(e=e.toLowerCase(),Pe[e])return yn(Pe[e]);throw new Error("unknown color name: "+e)};E.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&I(e)==="string"&&Pe[e.toLowerCase()])return"named"}});const qo=e=>{if(I(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,s=e&255;return[t,n,s,1]}throw new Error("unknown num color: "+e)},Go=(...e)=>{const[t,n,s]=V(e,"rgb");return(t<<16)+(n<<8)+s};h.prototype.num=function(){return Go(this._rgb)};L.num=(...e)=>new h(...e,"num");E.format.num=qo;E.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&I(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const{round:Pn}=Math;h.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Pn)};h.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:Pn(t):t)};L.rgb=(...e)=>new h(...e,"rgb");E.format.rgb=(...e)=>{const t=V(e,"rgba");return t[3]===void 0&&(t[3]=1),t};E.autodetect.push({p:3,test:(...e)=>{if(e=V(e,"rgba"),I(e)==="array"&&(e.length===3||e.length===4&&I(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const{log:qe}=Math,Sn=e=>{const t=e/100;let n,s,o;return t<66?(n=255,s=t<6?0:-155.25485562709179-.44596950469579133*(s=t-2)+104.49216199393888*qe(s),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*qe(o)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*qe(n),s=325.4494125711974+.07943456536662342*(s=t-50)-28.0852963507957*qe(s),o=255),[n,s,o,1]},{round:Do}=Math,Yo=(...e)=>{const t=V(e,"rgb"),n=t[0],s=t[2];let o=1e3,r=4e4;const l=.4;let a;for(;r-o>l;){a=(r+o)*.5;const i=Sn(a);i[2]/i[0]>=s/n?r=a:o=a}return Do(a)};h.prototype.temp=h.prototype.kelvin=h.prototype.temperature=function(){return Yo(this._rgb)};L.temp=L.kelvin=L.temperature=(...e)=>new h(...e,"temp");E.format.temp=E.format.kelvin=E.format.temperature=Sn;const{pow:Ye,sign:Ho}=Math,Mn=(...e)=>{e=V(e,"lab");const[t,n,s]=e,o=Ye(t+.3963377774*n+.2158037573*s,3),r=Ye(t-.1055613458*n-.0638541728*s,3),l=Ye(t-.0894841775*n-1.291485548*s,3);return[255*ut(4.0767416621*o-3.3077115913*r+.2309699292*l),255*ut(-1.2684380046*o+2.6097574011*r-.3413193965*l),255*ut(-.0041960863*o-.7034186147*r+1.707614701*l),e.length>3?e[3]:1]};function ut(e){const t=Math.abs(e);return t>.0031308?(Ho(e)||1)*(1.055*Ye(t,1/2.4)-.055):e*12.92}const{cbrt:ft,pow:Xo,sign:Wo}=Math,Nn=(...e)=>{const[t,n,s]=V(e,"rgb"),[o,r,l]=[dt(t/255),dt(n/255),dt(s/255)],a=ft(.4122214708*o+.5363325363*r+.0514459929*l),i=ft(.2119034982*o+.6806995451*r+.1073969566*l),u=ft(.0883024619*o+.2817188376*r+.6299787005*l);return[.2104542553*a+.793617785*i-.0040720468*u,1.9779984951*a-2.428592205*i+.4505937099*u,.0259040371*a+.7827717662*i-.808675766*u]};function dt(e){const t=Math.abs(e);return t<.04045?e/12.92:(Wo(e)||1)*Xo((t+.055)/1.055,2.4)}h.prototype.oklab=function(){return Nn(this._rgb)};L.oklab=(...e)=>new h(...e,"oklab");E.format.oklab=Mn;E.autodetect.push({p:3,test:(...e)=>{if(e=V(e,"oklab"),I(e)==="array"&&e.length===3)return"oklab"}});const Jo=(...e)=>{e=V(e,"lch");const[t,n,s]=e,[o,r,l]=kn(t,n,s),[a,i,u]=Mn(o,r,l);return[a,i,u,e.length>3?e[3]:1]},Zo=(...e)=>{const[t,n,s]=V(e,"rgb"),[o,r,l]=Nn(t,n,s);return Cn(o,r,l)};h.prototype.oklch=function(){return Zo(this._rgb)};L.oklch=(...e)=>new h(...e,"oklch");E.format.oklch=Jo;E.autodetect.push({p:3,test:(...e)=>{if(e=V(e,"oklch"),I(e)==="array"&&e.length===3)return"oklch"}});h.prototype.alpha=function(e,t=!1){return e!==void 0&&I(e)==="number"?t?(this._rgb[3]=e,this):new h([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};h.prototype.clipped=function(){return this._rgb._clipped||!1};h.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=K.Kn*e,new h(n,"lab").alpha(t.alpha(),!0)};h.prototype.brighten=function(e=1){return this.darken(-e)};h.prototype.darker=h.prototype.darken;h.prototype.brighter=h.prototype.brighten;h.prototype.get=function(e){const[t,n]=e.split("."),s=this[t]();if(n){const o=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(o>-1)return s[o];throw new Error(`unknown channel ${n} in mode ${t}`)}else return s};const{pow:Qo}=Math,Ko=1e-7,er=20;h.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&I(e)==="number"){if(e===0)return new h([0,0,0,this._rgb[3]],"rgb");if(e===1)return new h([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),s=er;const o=(l,a)=>{const i=l.interpolate(a,.5,t),u=i.luminance();return Math.abs(e-u)<Ko||!s--?i:u>e?o(l,i):o(i,a)},r=(n>e?o(new h([0,0,0]),this):o(this,new h([255,255,255]))).rgb();return new h([...r,this._rgb[3]])}return tr(...this._rgb.slice(0,3))};const tr=(e,t,n)=>
1(e=pt(e),t=pt(t),n=pt(n),.2126*e+.7152*t+.0722*n),pt=e=>(e/=255,e<=.03928?e/12.92:Qo((e+.055)/1.055,2.4)),J={},Te=(e,t,n=.5,...s)=>{let o=s[0]||"lrgb";if(!J[o]&&!s.length&&(o=Object.keys(J)[0]),!J[o])throw new Error(`interpolation mode ${o} is not defined`);return I(e)!=="object"&&(e=new h(e)),I(t)!=="object"&&(t=new h(t)),J[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};h.prototype.mix=h.prototype.interpolate=function(e,t=.5,...n){return Te(this,e,t,...n)};h.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new h([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};h.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=K.Kn*e,n[1]<0&&(n[1]=0),new h(n,"lch").alpha(t.alpha(),!0)};h.prototype.desaturate=function(e=1){return this.saturate(-e)};h.prototype.set=function(e,t,n=!1){const[s,o]=e.split("."),r=this[s]();if(o){const l=s.indexOf(o)-(s.substr(0,2)==="ok"?2:0);if(l>-1){if(I(t)=="string")switch(t.charAt(0)){case"+":r[l]+=+t;break;case"-":r[l]+=+t;break;case"*":r[l]*=+t.substr(1);break;case"/":r[l]/=+t.substr(1);break;default:r[l]=+t}else if(I(t)==="number")r[l]=t;else throw new Error("unsupported value for Color.set");const a=new h(r,s);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${o} in mode ${s}`)}else return r};h.prototype.tint=function(e=.5,...t){return Te(this,"white",e,...t)};h.prototype.shade=function(e=.5,...t){return Te(this,"black",e,...t)};const nr=(e,t,n)=>{const s=e._rgb,o=t._rgb;return new h(s[0]+n*(o[0]-s[0]),s[1]+n*(o[1]-s[1]),s[2]+n*(o[2]-s[2]),"rgb")};J.rgb=nr;const{sqrt:mt,pow:ke}=Math,sr=(e,t,n)=>{const[s,o,r]=e._rgb,[l,a,i]=t._rgb;return new h(mt(ke(s,2)*(1-n)+ke(l,2)*n),mt(ke(o,2)*(1-n)+ke(a,2)*n),mt(ke(r,2)*(1-n)+ke(i,2)*n),"rgb")};J.lrgb=sr;const or=(e,t,n)=>{const s=e.lab(),o=t.lab();return new h(s[0]+n*(o[0]-s[0]),s[1]+n*(o[1]-s[1]),s[2]+n*(o[2]-s[2]),"lab")};J.lab=or;const Me=(e,t,n,s)=>{let o,r;s==="hsl"?(o=e.hsl(),r=t.hsl()):s==="hsv"?(o=e.hsv(),r=t.hsv()):s==="hcg"?(o=e.hcg(),r=t.hcg()):s==="hsi"?(o=e.hsi(),r=t.hsi()):s==="lch"||s==="hcl"?(s="hcl",o=e.hcl(),r=t.hcl()):s==="oklch"&&(o=e.oklch().reverse(),r=t.oklch().reverse());let l,a,i,u,p,b;(s.substr(0,1)==="h"||s==="oklch")&&([l,i,p]=o,[a,u,b]=r);let m,_,$,g;return!isNaN(l)&&!isNaN(a)?(a>l&&a-l>180?g=a-(l+360):a<l&&l-a>180?g=a+360-l:g=a-l,_=l+n*g):isNaN(l)?isNaN(a)?_=Number.NaN:(_=a,(p==1||p==0)&&s!="hsv"&&(m=u)):(_=l,(b==1||b==0)&&s!="hsv"&&(m=i)),m===void 0&&(m=i+n*(u-i)),$=p+n*(b-p),s==="oklch"?new h([$,m,_],s):new h([_,m,$],s)},Rn=(e,t,n)=>Me(e,t,n,"lch");J.lch=Rn;J.hcl=Rn;const rr=(e,t,n)=>{const s=e.num(),o=t.num();return new h(s+n*(o-s),"num")};J.num=rr;const lr=(e,t,n)=>Me(e,t,n,"hcg");J.hcg=lr;const ar=(e,t,n)=>Me(e,t,n,"hsi");J.hsi=ar;const ir=(e,t,n)=>Me(e,t,n,"hsl");J.hsl=ir;const cr=(e,t,n)=>Me(e,t,n,"hsv");J.hsv=cr;const ur=(e,t,n)=>{const s=e.oklab(),o=t.oklab();return new h(s[0]+n*(o[0]-s[0]),s[1]+n*(o[1]-s[1]),s[2]+n*(o[2]-s[2]),"oklab")};J.oklab=ur;const fr=(e,t,n)=>Me(e,t,n,"oklch");J.oklch=fr;const{pow:bt,sqrt:ht,PI:gt,cos:Gt,sin:Dt,atan2:dr}=Math,pr=(e,t="lrgb",n=null)=>{const s=e.length;n||(n=Array.from(new Array(s)).map(()=>1));const o=s/n.reduce(function(b,m){return b+m});if(n.forEach((b,m)=>{n[m]*=o}),e=e.map(b=>new h(b)),t==="lrgb")return mr(e,n);const r=e.shift(),l=r.get(t),a=[];let i=0,u=0;for(let b=0;b<l.length;b++)if(l[b]=(l[b]||0)*n[0],a.push(isNaN(l[b])?0:n[0]),t.charAt(b)==="h"&&!isNaN(l[b])){const m=l[b]/180*gt;
1i+=Gt(m)*n[0],u+=Dt(m)*n[0]}let p=r.alpha()*n[0];e.forEach((b,m)=>{const _=b.get(t);p+=b.alpha()*n[m+1];for(let $=0;$<l.length;$++)if(!isNaN(_[$]))if(a[$]+=n[m+1],t.charAt($)==="h"){const g=_[$]/180*gt;i+=Gt(g)*n[m+1],u+=Dt(g)*n[m+1]}else l[$]+=_[$]*n[m+1]});for(let b=0;b<l.length;b++)if(t.charAt(b)==="h"){let m=dr(u/a[b],i/a[b])/gt*180;for(;m<0;)m+=360;for(;m>=360;)m-=360;l[b]=m}else l[b]=l[b]/a[b];return p/=s,new h(l,t).alpha(p>.99999?1:p,!0)},mr=(e,t)=>{const n=e.length,s=[0,0,0,0];for(let o=0;o<e.length;o++){const r=e[o],l=t[o]/n,a=r._rgb;s[0]+=bt(a[0],2)*l,s[1]+=bt(a[1],2)*l,s[2]+=bt(a[2],2)*l,s[3]+=a[3]*l}return s[0]=ht(s[0]),s[1]=ht(s[1]),s[2]=ht(s[2]),s[3]>.9999999&&(s[3]=1),new h(vt(s))},{pow:br}=Math;function We(e){let t="rgb",n=L("#ccc"),s=0,o=[0,1],r=[],l=[0,0],a=!1,i=[],u=!1,p=0,b=1,m=!1,_={},$=!0,g=1;const C=function(f){if(f=f||["#fff","#000"],f&&I(f)==="string"&&L.brewer&&L.brewer[f.toLowerCase()]&&(f=L.brewer[f.toLowerCase()]),I(f)==="array"){f.length===1&&(f=[f[0],f[0]]),f=f.slice(0);for(let A=0;A<f.length;A++)f[A]=L(f[A]);r.length=0;for(let A=0;A<f.length;A++)r.push(A/(f.length-1))}return S(),i=f},v=function(f){if(a!=null){const A=a.length-1;let M=0;for(;M<A&&f>=a[M];)M++;return M-1}return 0};let z=f=>f,j=f=>f;const q=function(f,A){let M,P;if(A==null&&(A=!1),isNaN(f)||f===null)return n;A?P=f:a&&a.length>2?P=v(f)/(a.length-2):b!==p?P=(f-p)/(b-p):P=1,P=j(P),A||(P=z(P)),g!==1&&(P=br(P,g)),P=l[0]+P*(1-l[0]-l[1]),P=Ce(P,0,1);const F=Math.floor(P*1e4);if($&&_[F])M=_[F];else{if(I(i)==="array")for(let T=0;T<r.length;T++){const O=r[T];if(P<=O){M=i[T];break}if(P>=O&&T===r.length-1){M=i[T];break}if(P>O&&P<r[T+1]){P=(P-O)/(r[T+1]-O),M=L.interpolate(i[T],i[T+1],P,t);break}}else I(i)==="function"&&(M=i(P));$&&(_[F]=M)}return M};var S=()=>_={};C(e);const k=function(f){const A=L(q(f));return u&&A[u]?A[u]():A};return k.classes=function(f){if(f!=null){if(I(f)==="array")a=f,o=[f[0],f[f.length-1]];else{const A=L.analyze(o);f===0?a=[A.min,A.max]:a=L.limits(A,"e",f)}return k}return a},k.domain=function(f){if(!arguments.length)return o;p=f[0],b=f[f.length-1],r=[];const A=i.length;if(f.length===A&&p!==b)for(let M of Array.from(f))r.push((M-p)/(b-p));else{for(let M=0;M<A;M++)r.push(M/(A-1));if(f.length>2){const M=f.map((F,T)=>T/(f.length-1)),P=f.map(F=>(F-p)/(b-p));P.every((F,T)=>M[T]===F)||(j=F=>{if(F<=0||F>=1)return F;let T=0;for(;F>=P[T+1];)T++;const O=(F-P[T])/(P[T+1]-P[T]);return M[T]+O*(M[T+1]-M[T])})}}return o=[p,b],k},k.mode=function(f){return arguments.length?(t=f,S(),k):t},k.range=function(f,A){return C(f),k},k.out=function(f){return u=f,k},k.spread=function(f){return arguments.length?(s=f,k):s},k.correctLightness=function(f){return f==null&&(f=!0),m=f,S(),m?z=function(A){const M=q(0,!0).lab()[0],P=q(1,!0).lab()[0],F=M>P;let T=q(A,!0).lab()[0];const O=M+(P-M)*A;let ee=T-O,te=0,ce=1,ye=20;for(;Math.abs(ee)>.01&&ye-- >0;)(function(){return F&&(ee*=-1),ee<0?(te=A,A+=(ce-A)*.5):(ce=A,A+=(te-A)*.5),T=q(A,!0).lab()[0],ee=T-O})();return A}:z=A=>A,k},k.padding=function(f){return f!=null?(I(f)==="number"&&(f=[f,f]),l=f,k):l},k.colors=function(f,A){arguments.length<2&&(A="hex");let M=[];if(arguments.length===0)M=i.slice(0);else if(f===1)M=[k(.5)];else if(f>1){const P=o[0],F=o[1]-P;M=hr(0,f).map(T=>k(P+T/(f-1)*F))}else{e=[];let P=[];if(a&&a.length>2)for(let F=1,T=a.length,O=1<=T;O?F<T:F>T;O?F++:F--)P.push((a[F-1]+a[F])*.5);else P=o;M=P.map(F=>k(F))}return L[A]&&(M=M.map(P=>P[A]())),M},k.cache=function(f){return f!=null?($=f,k):$},k.gamma=function(f){return f!=null?(g=f,k):g},k.nodata=function(f){return f!=null?(n=L(f),k):n},k}function hr(e,t,n){let s=[],o=e<t,r=t;for(let l=e;o?l<r:l>r;o?l++:l--)s.push(l);return s}const gr=function(e){let t=[1,1];for(let n=1;n<e;n++){let s=[1];for(let o=1;o<=t.length;o++)s[o]=(t[o]||0)+t[o-1];t=s}return t},yr=function(e){let t,n,s,o;if(e=e.map(r=>new h(r)),e.length===2)[n,s]=e.map(r=>r.lab()),t=function(r){const l=[0,1,2].map(a=>n[a]+r*(s[a]-n[a]));return new h(l,"lab")};else if(e.length===3)[n,s,o]=e.map(r=>r.lab()),t=function(r){const l=[0,1,2].map(a=>(1-r)*(1-r)*n[a]+2*(1-r)*r*s[a]+r*r*o[a]);return new h(l,"lab")};else if(e.length===4){let r;[n,s,o,r]=e.map(l=>l.lab()),t=function(l){const a=[0,1,2].map(i=>(1-l)*(1-l)*(1-l)*n[i]+3*(1-l)*(1-l)*l*s[i]+3*(1-l)*l*l*o[i]+l*l*l*r[i]);return new h(a,"lab")}}else if(e.length>=5){let r,l,a;r=e.map(i=>i.lab()),a=e.length-1,l=gr(a),t=function(i){const u=1-i,p=[0,1,2].map(b=>r.reduce((m,_,$)=>m+l[$]*u**(a-$)*i**$*_[b],0));return new h(p,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},_r=e=>{const t=yr(e);return t.scale=()=>We(t),t},se=(e,t,n)=>{if(!se[n])throw new Error("unknown blend mode "+n);return se[n](e,t)},he=e=>(t,n)=>{const s=L(n).rgb(),o=L(t).rgb();return L.rgb(e(s,o))},ge=e=>(t,n)=>{const s=[];return s[0]=e(t[0],n[0]),s[1]=e(t[1],n[1]),s[2]=e(t[2],n[2]),s},xr=e=>e,wr=(e,t)=>
1e*t/255,vr=(e,t)=>e>t?t:e,kr=(e,t)=>e>t?e:t,$r=(e,t)=>255*(1-(1-e/255)*(1-t/255)),Cr=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),Ar=(e,t)=>255*(1-(1-t/255)/(e/255)),Pr=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);se.normal=he(ge(xr));se.multiply=he(ge(wr));se.screen=he(ge($r));se.overlay=he(ge(Cr));se.darken=he(ge(vr));se.lighten=he(ge(kr));se.dodge=he(ge(Pr));se.burn=he(ge(Ar));const{pow:Sr,sin:Mr,cos:Nr}=Math;function Rr(e=300,t=-1.5,n=1,s=1,o=[0,1]){let r=0,l;I(o)==="array"?l=o[1]-o[0]:(l=0,o=[o,o]);const a=function(i){const u=le*((e+120)/360+t*i),p=Sr(o[0]+l*i,s),m=(r!==0?n[0]+i*r:n)*p*(1-p)/2,_=Nr(u),$=Mr(u),g=p+m*(-.14861*_+1.78277*$),C=p+m*(-.29227*_-.90649*$),v=p+m*(1.97294*_);return L(vt([g*255,C*255,v*255,1]))};return a.start=function(i){return i==null?e:(e=i,a)},a.rotations=function(i){return i==null?t:(t=i,a)},a.gamma=function(i){return i==null?s:(s=i,a)},a.hue=function(i){return i==null?n:(n=i,I(n)==="array"?(r=n[1]-n[0],r===0&&(n=n[1])):r=0,a)},a.lightness=function(i){return i==null?o:(I(i)==="array"?(o=i,l=i[1]-i[0]):(o=[i,i],l=0),a)},a.scale=()=>L.scale(a),a.hue(n),a}const Br="0123456789abcdef",{floor:Er,random:Fr}=Math,Lr=()=>{let e="#";for(let t=0;t<6;t++)e+=Br.charAt(Er(Fr()*16));return new h(e,"hex")},{log:Yt,pow:Tr,floor:Ir,abs:Vr}=Math;function Bn(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return I(e)==="object"&&(e=Object.values(e)),e.forEach(s=>{t&&I(s)==="object"&&(s=s[t]),s!=null&&!isNaN(s)&&(n.values.push(s),n.sum+=s,s<n.min&&(n.min=s),s>n.max&&(n.max=s),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(s,o)=>En(n,s,o),n}function En(e,t="equal",n=7){I(e)=="array"&&(e=Bn(e));const{min:s,max:o}=e,r=e.values.sort((a,i)=>a-i);if(n===1)return[s,o];const l=[];if(t.substr(0,1)==="c"&&(l.push(s),l.push(o)),t.substr(0,1)==="e"){l.push(s);for(let a=1;a<n;a++)l.push(s+a/n*(o-s));l.push(o)}else if(t.substr(0,1)==="l"){if(s<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*Yt(s),i=Math.LOG10E*Yt(o);l.push(s);for(let u=1;u<n;u++)l.push(Tr(10,a+u/n*(i-a)));l.push(o)}else if(t.substr(0,1)==="q"){l.push(s);for(let a=1;a<n;a++){const i=(r.length-1)*a/n,u=Ir(i);if(u===i)l.push(r[u]);else{const p=i-u;l.push(r[u]*(1-p)+r[u+1]*p)}}l.push(o)}else if(t.substr(0,1)==="k"){let a;const i=r.length,u=new Array(i),p=new Array(n);let b=!0,m=0,_=null;_=[],_.push(s);for(let C=1;C<n;C++)_.push(s+C/n*(o-s));for(_.push(o);b;){for(let v=0;v<n;v++)p[v]=0;for(let v=0;v<i;v++){const z=r[v];let j=Number.MAX_VALUE,q;for(let S=0;S<n;S++){const k=Vr(_[S]-z);k<j&&(j=k,q=S),p[q]++,u[v]=q}}const C=new Array(n);for(let v=0;v<n;v++)C[v]=null;for(let v=0;v<i;v++)a=u[v],C[a]===null?C[a]=r[v]:C[a]+=r[v];for(let v=0;v<n;v++)C[v]*=1/p[v];b=!1;for(let v=0;v<n;v++)if(C[v]!==_[v]){b=!0;break}_=C,m++,m>200&&(b=!1)}const $={};for(let C=0;C<n;C++)$[C]=[];for(let C=0;C<i;C++)a=u[C],$[a].push(r[C]);let g=[];for(let C=0;C<n;C++)g.push($[C][0]),g.push($[C][$[C].length-1]);g=g.sort((C,v)=>C-v),l.push(g[0]);for(let C=1;C<g.length;C+=2){const v=g[C];!isNaN(v)&&l.indexOf(v)===-1&&l.push(v)}}return l}const jr=(e,t)=>{e=new h(e),t=new h(t);const n=e.luminance(),s=t.luminance();return n>s?(n+.05)/(s+.05):(s+.05)/(n+.05)},{sqrt:re,pow:H,min:Ur,max:zr,atan2:Ht,abs:Xt,cos:Ge,sin:Wt,exp:Or,PI:Jt}=Math;function qr(e,t,n=1,s=1,o=1){var r=function(Be){return 360*Be/(2*Jt)},l=function(Be){return 2*Jt*Be/360};e=new h(e),t=new h(t);const[a,i,u]=Array.from(e.lab()),[p,b,m]=Array.from(t.lab()),_=(a+p)/2,$=re(H(i,2)+H(u,2)),g=re(H(b,2)+H(m,2)),C=($+g)/2,v=.5*(1-re(H(C,7)/(H(C,7)+H(25,7)))),z=i*(1+v),j=b*(1+v),q=re(H(z,2)+H(u,2)),S=re(H(j,2)+H(m,2)),k=(q+S)/2,f=r(Ht(u,z)),A=r(Ht(m,j)),M=f>=0?f:f+360,P=A>=0?A:A+360,F=Xt(M-P)>180?(M+P+360)/2:(M+P)/2,T=1-.17*Ge(l(F-30))+.24*Ge(l(2*F))+.32*Ge(l(3*F+6))-.2*Ge(l(4*F-63));let O=P-M;O=Xt(O)<=180?O:P<=M?O+360:O-360,O=2*re(q*S)*Wt(l(O)/2);const ee=p-a,te=S-q,ce=1+.015*H(_-50,2)/re(20+H(_-50,2)),ye=1+.045*k,Ve=1+.015*k*T,Ne=30*Or(-H((F-275)/25,2)),Re=-(2*re(H(k,7)/(H(k,7)+H(25,7))))*Wt(2*l(Ne)),Ue=re(H(ee/(n*ce),2)+H(te/(s*ye),2)+H(O/(o*Ve),2)+Re*(te/(s*ye))*(O/(o*Ve)));return zr(0,Ur(100,Ue))}function Gr(e,t,n="lab"){e=new h(e),t=new h(t);const s=e.get(n),o=t.get(n);let r=0;for(let l in s){const a=(s[l]||0)-(o[l]||0);r+=a*a}return Math.sqrt(r)}const Dr=(...e)=>{try{return new h(...e),!0}catch{return!1}},Yr={cool(){return We([L.hsl(180,1,.9),L.hsl(250,.7,.4)])},hot(){return We(["#000","#f00","#ff0","#fff"]).mode("rgb")}},He={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let e of Object.keys(He))He[e.toLowerCase()]=He[e];Object.assign(L,{average:pr,bezier:_r,blend:se,cubehelix:Rr,mix:Te,interpolate:Te,random:Lr,scale:We,analyze:Bn,contrast:jr,deltaE:qr,distance:Gr,limits:En,valid:Dr,scales:Yr,input:E,colors:Pe,brewer:He});const $e=36,Hr=be({__name:"ColorWave",props:{x:{},y:{},color:{},scale:{}},setup(e){const t=[.16,1,.3,1],n=e,s=D(()=>n.scale*.85),o=D(()=>n.scale*.92),r=D(()=>{try{return L(n.color)}catch{return L("#8a9095")}}),l=D(()=>{const p=r.value;return`radial-gradient(circle, ${p.alpha(1)} 0%, ${p.alpha(.75)} 32%, ${p.alpha(.35)} 58%, transparent 74%)`}),a=D(()=>r.value.alpha(1).css()),i=D(()=>r.value.alpha(.9).css()),u=D(()=>{const p=r.value;return`0 0 28px 4px ${p.alpha(.75).css()}, inset 0 0 16px ${p.alpha(.4).css()}`});return(p,b)=>(y(),w("div",{class:"pointer-events-none absolute z-0",style:ae({left:`${e.x}px`,top:`${e.y}px`})},[N(c(pe),{class:"absolute rounded-full will-change-transform",style:ae({width:`${$e}px`,height:`${$e}px`,x:"-50%",y:"-50%",background:c(l),filter:"blur(10px)"}),initial:{scale:.3,opacity:1},animate:{scale:c(s),opacity:0}
1,transition:{duration:.7,ease:t}},null,8,["style","animate","transition"]),N(c(pe),{class:"absolute rounded-full will-change-transform",style:ae({width:`${$e}px`,height:`${$e}px`,x:"-50%",y:"-50%",border:`3px solid ${c(a)}`,boxShadow:c(u)}),initial:{scale:.5,opacity:1},animate:{scale:e.scale,opacity:0},transition:{duration:.75,ease:t,delay:.02}},null,8,["style","animate","transition"]),N(c(pe),{class:"absolute rounded-full will-change-transform",style:ae({width:`${$e}px`,height:`${$e}px`,x:"-50%",y:"-50%",border:`2.5px solid ${c(i)}`}),initial:{scale:.4,opacity:.9},animate:{scale:c(o),opacity:0},transition:{duration:.85,ease:t,delay:.06}},null,8,["style","animate","transition"])],4))}}),De=48,Zt=4,Xr=be({__name:"Swatch",props:{color:{},active:{type:Boolean},magnetActive:{type:Boolean},pointerX:{},pointerY:{},reducedMotion:{type:Boolean}},emits:["select","register","unregister"],setup(e,{emit:t}){const n=e,s=t,o=G(null),r=G(null),l=D(()=>n.color.hex||n.color.name),a=Ae(n.magnetActive?1:0);ie(()=>n.magnetActive,_=>{a.set(_?1:0)}),Qt(()=>{s("register",{name:n.color.name,getRect:()=>o.value?.getBoundingClientRect()??null})}),ls(()=>{s("unregister",n.color.name)});const i=Vt(()=>{if(n.reducedMotion||a.get()<1)return 0;const _=o.value;if(!_)return 0;const $=Number(n.pointerX.get()),g=Number(n.pointerY.get());if($<-1e3||g<-1e3)return 0;const C=_.getBoundingClientRect(),v=C.left+C.width/2,z=C.top+C.height/2,j=$-v,q=g-z,S=Math.hypot(j,q);if(S===0||S>=De)return 0;const k=(1-S/De)*Zt;return j/S*k}),u=Vt(()=>{if(n.reducedMotion||a.get()<1)return 0;const _=o.value;if(!_)return 0;const $=Number(n.pointerX.get()),g=Number(n.pointerY.get());if($<-1e3||g<-1e3)return 0;const C=_.getBoundingClientRect(),v=C.left+C.width/2,z=C.top+C.height/2,j=$-v,q=g-z,S=Math.hypot(j,q);if(S===0||S>=De)return 0;const k=(1-S/De)*Zt;return q/S*k}),p=Ut(i,{damping:24,stiffness:220}),b=Ut(u,{damping:24,stiffness:220});function m(){const _=r.value?.getBoundingClientRect();_&&s("select",{name:n.color.name,fill:l.value,clientX:_.left+_.width/2,clientY:_.top+_.height/2})}return(_,$)=>{const g=Ie;return y(),w("li",{ref_key:"itemRef",ref:o,class:"relative shrink-0"},[N(c(pe),{class:"will-change-transform",style:ae({x:c(p),y:c(b)}),"while-hover":e.reducedMotion?void 0:{scale:1.06},"while-press":e.reducedMotion?void 0:{scale:.96},transition:{type:"spring",damping:28,stiffness:320}},{default:B(()=>[N(g,{square:"",secondary:"",class:me(["!rounded-full !bg-transparent !p-0 !shadow-none hover:!bg-transparent",e.active?"!ring-2 !ring-blue-5":""]),onClick:m},{default:B(()=>[d("span",{ref_key:"swatchRef",ref:r,class:"block size-9 rounded-full",style:ae({backgroundColor:c(l),boxShadow:"0px 1.2px 1.2px 0.4px #00000059 inset"})},null,4)]),_:1},8,["class"])]),_:1},8,["style","while-hover","while-press"])],512)}}}),Wr={class:"mb-2 text-sm text-dark-grey-dark-grey-2"},Jr={class:"font-medium text-dark-grey-dark-grey-5"},Zr=3.4,Qr=900,Kr=48,el=be({__name:"index",props:{modelValue:{},colors:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,s=e,o=G(null),r=G(s.modelValue),l=G([]);let a=0;const i=G(null),u=new Map,p=zs(),b=D(()=>!!p.value),m=Ae(-9999),_=Ae(-9999);ie(()=>s.modelValue,S=>{r.value=S});function $(S){u.set(S.name,S.getRect)}function g(S){u.delete(S),i.value===S&&(i.value=null)}function C(S,k){let f=null,A=Kr;for(const[M,P]of u){const F=P();if(!F)continue;const T=F.left+F.width/2,O=F.top+F.height/2,ee=Math.hypot(T-S,O-k);ee<A&&(A=ee,f=M)}i.value=f}function v(S){b.value||(m.set(S.clientX),_.set(S.clientY),C(S.clientX,S.clientY))}function z(){m.set(-9999),_.set(-9999),i.value=null}function j(S){l.value=l.value.filter(k=>k.id!==S)}function q(S){if(r.value=S.name,n("update:modelValue",S.name),b.value)return;const k=o.value?.getBoundingClientRect();if(!k)return;const f=++a;l.value.push({id:f,x:S.clientX-k.left,y:S.clientY-k.top,color:S.fill,scale:Zr}),window.setTimeout(()=>j(f),Qr)}return(S,k)=>(y(),w("div",null,[d("div",Wr,[k[0]||(k[0]=d("span",null,"Цвет: ",-1)),d("span",Jr,de(c(r)),1)]),d("ul",{ref_key:"listRef",ref:o,class:"relative flex flex-wrap gap-2 overflow-visible",onPointermove:v,onPointerleave:z},[(y(!0),w(ne,null,fe(c(l),f=>(y(),X(Hr,{key:f.id,x:f.x,y:f.y,color:f.color,scale:f.scale},null,8,["x","y","color","scale"]))),128)),(y(!0),w(ne,null,fe(e.colors,f=>(y(),X(Xr,{key:f.name,class:"relative z-10",color:f,active:f.name===c(r),"magnet-active":c(i)===f.name,"pointer-x":c(m),"pointer-y":c(_),"reduced-motion":c(b),onSelect:q,onReg
1ister:$,onUnregister:g},null,8,["color","active","magnet-active","pointer-x","pointer-y","reduced-motion"]))),128))],544)]))}}),tl={class:"mb-2 text-sm text-dark-grey-dark-grey-2"},nl={class:"flex flex-wrap gap-2 text-sm"},sl={__name:"index",props:{modelValue:{type:[String,Number,Object],required:!0},pinFilter:{type:Object,default:()=>{}}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,s=e,o=G(s.modelValue),r=D(()=>Object.keys(s.pinFilter)[0]);ie(()=>s.modelValue,a=>{o.value=a});function l(a){o.value=a,n("update:modelValue",a)}return(a,i)=>{const u=Ie;return y(),w("div",null,[d("div",tl,de(c(r))+":",1),d("ul",nl,[(y(!0),w(ne,null,fe(e.pinFilter[c(r)],(p,b)=>(y(),w("li",{key:b},[N(u,{square:"",outline:"",secondary:"",active:p===c(o),class:"!rounded-lg xs:py-2.5",onClick:m=>l(p)},{default:B(()=>[Q(de(p),1)]),_:2},1032,["active","onClick"])]))),128))])])}}},ol={key:0,class:"text-sm text-dark-grey-dark-grey-2 flex flex-col gap-3"},rl={class:"-order-1"},ll={class:"text-dark-grey-dark-grey-5"},al=be({__name:"Chars",props:{chars:{}},setup(e){return(t,n)=>e.chars.length?(y(),w("ul",ol,[(y(!0),w(ne,null,fe(e.chars,(s,o)=>(y(),w("li",{key:`${s.key}-${o}`,class:"flex row-with-dots"},[d("span",rl,de(s.key),1),d("span",ll,de(s.value),1)]))),128))])):Y("",!0)}}),il={key:0,class:"flex items-center gap-1.5 rounded-lg bg-mid-grey-mid-grey-1 p-2"},cl={key:1,class:"flex items-center gap-1.5 rounded-lg bg-mid-grey-mid-grey-1 p-2"},ul=be({__name:"Sale",props:{isSale:{type:Boolean,default:!1}},setup(e){return(t,n)=>(y(),X(Le,{name:"fade",mode:"out-in"},{default:B(()=>[e.isSale?(y(),w("div",il,[...n[0]||(n[0]=[d("span",{class:"w-4 h-4 flex items-center justify-center icon-shadow rounded-full"},[d("i",{class:"icity-icons-ticksquare text-[#149100]"})],-1),d("span",{class:"text-xs text-medium text-dark-grey-dark-grey-2"}," Товар есть в наличии ",-1)])])):(y(),w("div",cl,[...n[1]||(n[1]=[d("i",{class:"icity-icons-infocircle text-red"},null,-1),d("span",{class:"text-xs text-medium text-dark-grey-dark-grey-2"}," Товара нет в наличии ",-1)])]))]),_:1}))}}),fl=Se(ul,[["__scopeId","data-v-8b6efdf1"]]),dl={},pl={class:"w-full rounded-xl banner-delivery py-[1.125rem] px-5 bg-delivery-bg bg-no-repeat shadow"};function ml(e,t){return y(),w("div",pl,[...t[0]||(t[0]=[d("div",{class:"relative"},[d("h3",{class:"font-medium text-[1.125rem] text-white mb-2"},[Q("Бесплатная доставка "),d("br"),Q(" по городу от")]),d("span",{class:"font-extrabold text-[2rem] text-[#FFCD4E]"},"10 000 ₽")],-1)])])}const bl=Se(dl,[["render",ml],["__scopeId","data-v-829d3765"]]),hl=["width","height"],gl=["href"],yl={__name:"Icon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:14}},setup(e){return(t,n)=>(y(),w("svg",{width:e.size,height:e.size},[d("use",{href:`#${e.name}`},null,8,gl)],8,hl))}},_l={class:"group inline-block cursor-pointer"},xl={__name:"index",setup(e){const t=G(null),n=G(null),s=G(null),o=G(!1),{floatingStyles:r,middlewareData:l}=$s(t,n,{whileElementsMounted:Cs,placement:"top-end",middleware:[As({mainAxis:12}),Ps({element:s,padding:8})]});function a(i){o.value=i}return(i,u)=>{const p=yl;return xe((y(),w("div",_l,[N(p,{ref_key:"tooltipIcon",ref:t,name:"tooltip-icon",size:"16",class:"text-mid-grey-mid-grey-2 transition group-hover:text-blue-5"},null,512),N(Ss,null,{default:B(()=>[xe((y(),w("div",{ref_key:"tooltipBody",ref:n,class:"tooltip-body rounded-lg bg-white py-2 px-3 w-[250px]",style:ae(c(r))},[Kt(i.$slots,"default",{},void 0,!0),d("div",{ref_key:"floatingArrow",ref:s,class:"tooltip-arrow",style:ae({position:"absolute",left:c(l).arrow?.x!=null?`${c(l).arrow.x}px`:"",top:c(l).arrow?.y!=null?`${c(l).arrow.y}px`:""})},null,4)],4)),[[en,c(o)],[c(yt),[a,{delayEnter:0,delayLeave:200}]]])]),_:3})])),[[c(yt),[a,{delayEnter:0,delayLeave:200}]]])}}},wl=Se(xl,[["__scopeId","data-v-6da93bb5"]]),vl=wt("/img/icons/computer-phone-sync.svg"),kl=wt("/img/icons/medal-03.svg"),$l=wt("/img/icons/headset.svg"),Cl={},Al={class:"rounded-xl bg-white px-3 shadow"},Pl={class:"text-[12px]"},Sl={class:"line-item flex items-center gap-2"},Ml={class:"line flex flex-1 items-center justify-between py-2"},Nl={class:"line-item flex items-center gap-2"},Rl={class:"line flex flex-1 items-center justify-between py-2"},Bl={class:"line-item flex items-center gap-2"},El={class:"line flex flex-1 items-center justify-between py-2"};function Fl(e,t){const n=wl;return y(),w("div",Al,[d("ul",Pl,[d("li",Sl,[t[2]||(t[2]=d("img",{src:vl,width:"14",height:"14"},null,-1)),d("div",Ml,[t[1]||(t[1]=Q(" Оригинальный товар ",-1)),N(n,{class:"text-dark-grey-dark-grey-5"},{default:B(()=>[...t[0]||(t[0]=[d("h4",{class:"font-bold text-[12px] leading-4 mb-1"}," Только оригинальная техника. ",-1),d("p",{class:"text-[12px] leading-4"}," Каждое устройство проходит проверку на подлинность и качество. ",-1)])]),_:1})])]),d("li",Nl,[t[5]||(t[5]=d("img",{src:kl,width:"14",height:"14"},null,-1)),d("div",Rl,[t[4]||(t[4]=Q(" Гарантия честной цены ",-1)),N(n,{class:"text-dark-grey-dark-grey-5"},{default:B(()=>[...t[3]||(t[3]=[d("h4",{class:"font-bold text-[12px] leading-4 mb-1"}," Нашли дешевле в региональной рознице? ",-1),d("p",{class:"text-[12px] leading-4"}," Сообщите нам — постараемся предложить более выгодные условия. ",-1)])]),_:1})])]),d("li",Bl,[t[8]||(t[8]=d("img",{src:$l,width:"14",height:"14"},null,-1)),d("div",El,[t[7]||(t[7]=Q(" Поддержка после покупки ",-1)),N(n,{class:"text-dark-grey-dark-grey-5"},{default:B(()=>[...t[6]||(t[6]=[d("h4",{class:"font-bold text-[12px] leading-4 mb-1"}," Остаёмся на связи и после оплаты. ",-1),d("p",{class:"text-[12px] leading-4"}," Поможем с настройкой, переносом данных и любыми вопросами, которые могут возникнуть. ",-1)])]),_:1})])])])])}const Ll=Se(Cl,[["render",Fl],["__scopeId","data-v-c103338a"]]),Tl={class:"relative flex items-center justify-center"},Il={class:"min-h-0"},Vl={__name:"Fixed",props:{tag:{type:String,default:"div"},collapsedAlways:{type:Boolean,default:!1},classHeader:{type:String,default:""},listLength:{type:Number,default:1},height:{type:Number,default:100}},setup(e){const t=e,n=G(t.collapsedAlways);function s(){t.collapsedAlways||t.listLength&&(n.value=!n.value)}return ie(()=>t.collapsedAlways,o=>{n.value=o}),(o,r)=>{const l=Ie,a=tn("auto-animate");return y(),w("div",Tl,[(y(),X(as(e.tag),{style:ae({minHeight:e.height+"px"}),class:me(["ui-collapse collapse-transition",{"ui-collapse-open  pb-20":c(n),"bottom-opacity-mask":!c(n)}])},{default:B(()=>[d("div",Il,[Kt(o.$slots,"default",{},void 0,!0)])]),_:3},8,["style","class"])),xe((y(),X(l,{class:"absolute bottom-0 w-[300px]",secondary:"",onClick:s},{default:B(()=>[c(n)?(y(),w(ne,{key:1}
1,[r[2]||(r[2]=d("span",null," Свернуть ",-1)),r[3]||(r[3]=d("i",{class:"icity-icons-arrow-up2-2"},null,-1))],64)):(y(),w(ne,{key:0},[r[0]||(r[0]=d("span",null," Читать полностью ",-1)),r[1]||(r[1]=d("i",{class:"icity-icons-arrow-down-2-2"},null,-1))],64))]),_:1})),[[a]])])}}},jl=Se(Vl,[["__scopeId","data-v-1ecd40da"]]),Ul={},zl={class:"p-9 w-full tg-pattern rounded-xl flex flex-col items-center text-center xs:p-4"};function Ol(e,t){const n=Ie;return y(),w("div",zl,[t[1]||(t[1]=d("h3",{class:"text-2xl font-bold mb-2"},"Свежий прайс — в Telegram",-1)),t[2]||(t[2]=d("p",{class:"text-sm font-normal opacity-70 mb-5"},[Q("Узнавайте цены и новинки без лишнего — прямо из канала. "),d("br"),Q(" Присоединяйтесь к нам в Telegram!")],-1)),N(n,{class:"xs:w-full",to:"https://t.me/+F0fQYDmWlrFjYWUy",target:"_blank",color:"!bg-telegram hover:!brightness-125"},{default:B(()=>[...t[0]||(t[0]=[d("img",{src:hs,width:"24",class:"w-6",alt:"Telegram"}
1,null,-1),d("span",null,"Перейти в Telegram",-1)])]),_:1})])}const ql=Se(Ul,[["render",Ol]]),Gl={available:"https://schema.org/InStock",preorder:"https://schema.org/PreOrder",out_of_stock:"https://schema.org/OutOfStock"},Dl="https://api.icity-store.ru";function Yl(e){return/iPhone|iPad|Mac|Apple Watch|Watch|AirPods/i.test(e),"Apple"}function Hl(e){return e?.modelImages?.length?e.modelImages.map(t=>Dl+t.path):[]}function Xl(e){const{product:t,canonicalUrl:n,productStatus:s}=e;if(!t?.modelChpu)return null;const o=Hl(t);if(!o.length)return null;const r=t.meta?.title||t.title,l=t.meta?.description||"",a=Number(t.modelPrice)||0;return{"@context":"https://schema.org","@type":"Product",name:r,description:l,image:o,sku:t.modelChpu,brand:{"@type":"Brand",name:Yl(t.title)},offers:{"@type":"Offer",url:n,price:a,priceCurrency:"RUB",availability:Gl[s],itemCondition:"https://schema.org/NewCondition",seller:{"@type":"Organization",name:"iCity Store"}}}}function Wl(e,t,n){return D(()=>Xl({product:e.value,canonicalUrl:t.value,productStatus:n.value}))}const Jl={class:"grid grid-cols-[512px_1fr_280px] lg:grid-cols-[1fr_1fr_280px] lg:grid-rows-[auto_1fr] gap-x-6 sm:gap-y-6 mb-6"},Zl={class:"col-span-3 mb-4 sm:row-start-2 sm:mb-0"},Ql={class:"text-[1.75rem] font-semibold leading-8"},Kl={class:"flex items-center gap-5 pt-2 text-xs text-mid-grey-mid-grey-5"},ea={key:0,class:"icity-icons-outline-heart"},ta={key:1,class:"icity-icons-heart text-blue-5"},na={key:0},sa={key:1},oa={key:0},ra={class:"w-full"},la={key:0,class:"absolute hidden top-full -left-1 mt-5 sm:flex gap-1 text-xs text-white items-start scale-95"},aa={key:0,class:"bg-[#48A0FF] rounded-full px-1.5 py-0.5 text-xs"},ia={key:1,class:"bg-[#FF9935] rounded-full px-1.5 py-0.5 text-xs"},ca={class:"flex w-full flex-col gap-6 pr-4 lg:row-start-3 lg:col-span-2 lg:gap-4 sm:col-span-3 xs:gap-2"},ua={class:"ml-auto lg:sticky lg:top-52 lg:ml-0 md:static lg:row-span-3 md:row-span-2 sm:col-span-3"},fa={class:"flex min-w-[280px] flex-col gap-3 lg:h-min"},da={class:"flex justify-between"},pa={key:0,class:"text-xs font-semibold text-white bg-[#75499A] flex items-center justify-center rounded-full px-3 leading-4"},ma={class:"ml-auto flex gap-x-1"},ba={class:"flex flex-col gap-2 rounded-xl bg-white p-4 shadow"},ha={class:"text-2xl text-black"},ga={key:0,class:"flex flex-col"},ya={class:"flex items-center gap-2"},_a={class:"text-[#149100] font-bold"},xa={class:"font-medium text-dark-grey-dark-grey-3 text-base"},wa={key:1,class:"flex flex-col"},va={key:2},ka={key:0},$a={key:1},Ca={key:2},Aa={key:0,class:"text-center"},Pa={class:"block text-[9px] leading-4 text-dark-grey-dark-grey-2"},Sa={key:1,class:"text-center"},Ma={key:1,class:"mb-8"},Na=["innerHTML"],Ra=be({__name:"index",async setup(e){let t,n;const s=gs(),o=G({title:"iCity",text:"Apple iPhone, iPad, аксессуары и техника Apple по лучшим ценам",url:Ls?location.href:""}),{share:r,isSupported:l}=bs(o);function a(){return r().catch(R=>R)}const i=Ts(),u=G("name1"),p=G(!1),b=G(0),m=G(!1),_=G(null),$=Et(),{data:g}=([t,n]=is(()=>Is(()=>`product-${$.params.name}-${$.query.model??""}`,()=>ys($.params.name,$.query.model),{watch:[()=>$.params.name,()=>$.query.model]})),t=await t,n(),t),{isFavorite:C,toggleFavorite:v}=ks(g);
1if($.query.model&&g.value?.models&&!g.value.models.some(x=>x.chpu===$.query.model))throw _s({statusCode:404,statusMessage:"Модель не найдена"});const z=D(()=>({...g.value.meta,modelId:g.value.modelId})),j=D(()=>{if(!g.value)return"out_of_stock";const R=g.value.modelPrice,x=g.value.modelIsSale;return R===0&&x||R===0&&!x?"preorder":"available"}),q=ln(["model"]),S=Wl(g,q,j),{changeCustomBreadcrumbName:k}=Vs();an({title:()=>z.value.title||"icity",meta:[{name:"description",content:()=>z.value.description||""},{name:"keywords",content:()=>z.value.keywords||""},{name:"og:title",content:()=>z.value.title||"icity"},{name:"og:description",content:()=>z.value.description||""}],script:()=>{const R=S.value;return R?[{type:"application/ld+json",key:"product-jsonld",innerHTML:JSON.stringify(R).replace(/</g,"\\u003c")}]:[]}});const f=Rt({number:g.value?.modelPrice}),A=Rt({number:g.value?.modelCardPrice}),M=D(()=>Tt(f.number?.toFixed(0))),P=D(()=>Tt(A.number?.toFixed(0)));ie(()=>g.value?.modelPrice,R=>{Lt.to(f,{duration:.5,number:Number(g.value?.modelPrice)||0}),Lt.to(A,{duration:.5,number:Number(g.value?.modelCardPrice)||0})});const F=D(()=>g.value?.modelImages?.length?g.value.modelImages.map(R=>({img:"https://api.icity-store.ru"+R.path})):[]),T=D(()=>F.value.map(R=>({type:"image",img:R.img}))),O=D(()=>g.value?.iframeVkVideo||""),ee=D(()=>{const R=[],{models:x,...Z}=g.value;return x.forEach(U=>{const W={...Z,modelChars:U.chars,modelId:U.id,modelPrice:U.price};R.push(W)}),R.push(g.value),R}),te=G({}),ce=new Set(["hex","Поколение"]);function ye(){g.value?.modelChars?.forEach(R=>{ce.has(R.key)||(te.value[R.key]=R.value)})}ye(),ie(()=>g.value?.modelId,()=>{ye()});function Ve(R){const x={};return R.forEach(Z=>{Z.modelChars.forEach(U=>{ce.has(U.key)||(x[U.key]?x[U.key].includes(U.value)||x[U.key].push(U.value):x[U.key]=[U.value])})}),x}const Ne=Ve(ee.value),je=G([]),Re=G(!1);function Ue(R){if(!R?.length)return;const x=new Map;for(const Z of R){const U=Z.chars||[],W=U.find(Ee=>Ee.key==="Цвет")?.value;if(!W||x.has(W))continue;const ue=U.find(Ee=>Ee.key==="hex")?.value;x.set(W,{name:W,...ue?{hex:ue}:{}})}je.value=[...x.values()],Re.value=je.value.some(Z=>!!Z.hex)}Ue(g.value?.models),ie(()=>g.value?.models,R=>{Ue(R)});const Be=D(()=>(Ne.Память&&Ne.Память.sort((R,x)=>At(R)-At(x)),Ne));function At(R){const x=R.match(/(\d+)(TB|GB)/i);if(!x)return 0;let[Z,U,W]=x;return U=Number(U),W.toUpperCase()==="TB"?U*1024:U}async function Pt(R){const x={...te.value,...R};let Z=null;for(const U of g.value?.models||[]){let W=!0;for(const ue of U.chars)if(!ce.has(ue.key)&&x[ue.key]!==ue.value){W=!1;break}if(W){Z=U;break}}Z||(Z=g.value?.models.find(U=>U.chars.some(W=>W.value===R[W.key]))),await Ft().push({name:"product-name",params:{name:g.value?.chpu},query:{...Et().query,model:Z?.chpu}})}function Qe(R=!0){if(j.value==="preorder"){window.location.href="https://t.me/icitystore_bot";return}window.ym&&R&&window.ym(88681521,"reachGoal","add_to_cart"),j.value==="available"&&i.addItemToCart(g.value)}function Fn(){window.ym&&window.ym(88681521,"reachGoal","one_click_buy"),Qe(!1),Ft().push({name:"cart"})}function Ln(R=0){b.value=R,p.value=!0}function Tn(){p.value=!1,_.value?.swiperInstanceMain?.slideTo(b.value)}function In(){m.value=!0}function Vn(R){b.value=R,_.value?.swiperInstanceMain?.slideTo(R)}Qt(()=>{k(g.value.title)});const jn=D(()=>g?.value?.title.includes("iPhone"));return(R,x)=>{const Z=Zs,U=Ie,W=rn,ue=Qs,Ee=fo,Un=el,zn=sl,On=al,ze=xs,qn=fl,Gn=bl,Dn=Ll,Yn=jl,Hn=Ns,Xn=Ms,Wn=ql,Jn=Rs,Zn=Bs,St=tn("auto-animate");return y(),w("section",null,[c(g)?(y(),X(Z,{key:0,"cash-price":Number(c(g).modelPrice)||0,"card-price":Number(c(g).modelCardPrice)||0,status:c(j),onAddToCart:Qe},null,8,["cash-price","card-price","status"])):Y("",!0),d("div",Jl,[d("div",Zl,[d("h1",Ql,de(c(g).title),1),d("div",Kl,[d("div",null,[N(U,{transparent:"",square:"",size:"xs",target:"__blank",class:"sm:!text-lg xs:!text-base",to:c(s).currentCity.feedback},{default:B(()=>[...x[2]||(x[2]=[Q("Наши отзывы ",-1)])]),_:1},8,["to"])]),d("div",null,[N(W,{"fallback-tag":"button",fallback:"В избранное"},{default:B(()=>[N(U,{transparent:"",square:"",size:"xs",onClick:c(v),class:"sm:!text-lg xs:!text-base"},{default:B(()=>[N(Le,{name:"fade",mode:"out-in"},{default:B(()=>[c(C)?(y(),w("i",ta)):(y(),w("i",ea))]),_:1}),N(Le,{name:"fade",mode:"out-in"},{default:B(()=>[c(C)?(y(),w("span",sa,"В избранном")):(y(),w("span",na,"В избранное"))]),_:1})]),_:1},8,["onClick"])]),_:1})]),c(g)?(y(),w("div",oa,[N(W,null,{fallback:B(()=>[...x[3]||(x[3]=[d("span",{class:"inline-flex items-center gap-2 text-xs text-mid-grey-mid-grey-5 sm:!text-lg xs:!text-base"}," Сравнить ",-1)])]),default:B(()=>[N(ue,{variant:"inline",product:c(g)},null,8,["product"])]),_:1})])):Y("",!0)])]),d("div",{class:me(["flex gap-6 lg:col-span-2 lg:gap-4 sm:col-span-3 relative min-w-0 min-h-0",{"sm:mb-6":c(g)?.modelFlags?.tradeIn||c(g)?.modelFlags?.installmentPlan}])},[d("div",ra,[N(Le,{name:"fade",mode:"out-in"},{default:B(()=>
1[(y(),X(Ee,{ref_key:"productPreviewRef",ref:_,key:c(g).title,images:c(F),"vk-embed-html":c(O),"is-review-open":c(m),"is-fullscreen-open":c(p),product:c(g),onOpenFullscreen:Ln,onOpenReview:In},null,8,["images","vk-embed-html","is-review-open","is-fullscreen-open","product"]))]),_:1})]),c(g)?.modelFlags?.tradeIn||c(g)?.modelFlags?.installmentPlan?(y(),w("div",la,[c(g)?.modelFlags?.tradeIn?(y(),w("div",aa," Можно в Trade-in ")):Y("",!0),c(g)?.modelFlags?.installmentPlan?(y(),w("div",ia," Рассрочка 0% ")):Y("",!0)])):Y("",!0)],2),d("div",ca,[(y(!0),w(ne,null,fe(c(Be),(Fe,oe,Ea)=>(y(),w(ne,{key:oe},[oe==="Цвет"&&c(Re)?(y(),X(Un,{key:0,modelValue:c(te)[oe],"onUpdate:modelValue":[_e=>c(te)[oe]=_e,_e=>Pt({[oe]:_e})],colors:c(je)},null,8,["modelValue","onUpdate:modelValue","colors"])):oe!=="Цвет"||!c(Re)?(y(),X(zn,{key:1,modelValue:c(te)[oe],"onUpdate:modelValue":[_e=>c(te)[oe]=_e,_e=>Pt({[oe]:_e})],"pin-filter":{[oe]:Fe}},null,8,["modelValue","onUpdate:modelValue","pin-filter"])):Y("",!0)],64))),128)),N(On,{chars:c(g)?.chars??[]},null,8,["chars"])]),d("div",ua,[xe((y(),w("div",fa,[d("div",da,[c(jn)?(y(),w("div",pa," Без RuStore ")):Y("",!0),d("div",ma,[N(W,null,{fallback:B(()=>[...x[4]||(x[4]=[d("div",{class:"flex gap-x-1"},[d("div",{class:"w-7 h-7 rounded-full bg-slate-200 animate-pulse"}),d("div",{class:"w-7 h-7 rounded-full bg-slate-200 animate-pulse"})],-1)])]),default:B(()=>[N(ze,{to:c(s).currentCity.popup.tg,target:"_blank"},{default:B(()=>[...x[5]||(x[5]=[d("img",{src:Es,width:"24",class:"w-7",alt:"Telegram"},null,-1)])]),_:1},8,["to"]),N(ze,{to:c(s).currentCity.popup.max,target:"_blank"},{default:B(()=>[...x[6]||(x[6]=[d("img",{src:Fs,width:"24",class:"w-7",alt:"Max"},null,-1)])]),_:1},8,["to"])]),_:1}),xe(N(U,{secondary:"",size:"icon",style:{padding:"0px 5px !important"},onClick:a},{default:B(()=>[...x[7]||(x[7]=[d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M6 6.75H5.25C4.85218 6.75 4.47064 6.90804 4.18934 7.18934C3.90804 7.47064 3.75 7.85218 3.75 8.25V14.25C3.75 14.6478 3.90804 15.0294 4.18934 15.3107C4.47064 15.592 4.85218 15.75 5.25 15.75H12.75C13.1478 15.75 13.5294 15.592 13.8107 15.3107C14.092 15.0294 14.25 14.6478 14.25 14.25V8.25C14.25 7.85218 14.092 7.47064 13.8107 7.18934C13.5294 6.90804 13.1478 6.75 12.75 6.75H12M9 10.5V2.25M9 2.25L6.75 4.5M9 2.25L11.25 4.5",stroke:"#52565A","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),_:1},512),[[en,c(l)]])])]),d("div",ba,[xe((y(),w("div",null,[d("div",ha,[N(Le,{name:"fade",mode:"out-in",duration:100},{default:B(()=>[c(j)==="available"?(y(),w("div",ga,[x[8]||(x[8]=d("div",{class:"text-xs font-medium text-[#149100]"}," Цена по акции ",-1)),d("span",ya,[d("span",_a,de(c(M)),1),d("span",xa,de(c(P)),1)])])):c(j)==="preorder"?(y(),w("div",wa,[...x[9]||(x[9]=[d("span",{class:"text-blue-5 font-bold"},"Ожидаем",-1)])])):(y(),w("span",va,"Нет в продаже"))]),_:1})])])),[[St]]),N(qn,{"is-sale":c(j)==="available",class:"mb-2"},null,8,["is-sale"]),N(U,{disabled:c(j)==="out_of_stock",class:"w-full text-lg !py-2.5",onClick:Qe},{default:B(()=>[x[10]||(x[10]=d("i",{class:"icity-icons-buy text-2xl"},null,-1)),c(j)==="preorder"?(y(),w("span",ka,"Список ожидания")):c(j)==="available"?(y(),w("span",$a,"В корзину")):(y(),w("span",Ca,"Нет в продаже"))]),_:1},8,["disabled"]),c(j)==="available"?(y(),X(U,{key:0,secondary:"",class:"w-full !py-2",onClick:Fn},{default:B(()=>[...x[11]||(x[11]=[Q(" Купить в один клик ",-1)])]),_:1})):Y("",!0)]),c(j)==="available"?(y(),w("div",Aa,[d("span",Pa,[x[14]||(x[14]=Q("Доступно ",-1)),N(ze,{to:"/articles/vygodnaya-rassrochka",class:"text-blue-5"},{default:B(()=>[...x[12]||(x[12]=[Q("в рассрочку",-1)])]),_:1}),x[15]||(x[15]=Q(" от 4 999 ₽/мес. Доступно в ",-1)),N(ze,{to:"/trade-in",class:"text-blue-5"},{default:B(()=>[...x[13]||(x[13]=[Q("Trade-in",-1)])]),_:1})]),x[16]||(x[16]=d("span",{class:"text-[9px] leading-3 text-dark-grey-dark-grey-2"}," *Цена на товар указана по акции ",-1))])):c(j)==="preorder"?(y(),w("div",Sa,[...x[17]||(x[17]=[d("span",{class:"block text-[9px] leading-4 text-dark-grey-dark-grey-2"}," Товар доступен для предзаказа. Цена и условия рассрочки будут уточнены при поступлении товара. ",-1)])])):Y("",!0),N(Gn),N(Dn)])),[[St]])])]),c(g)?.description?(y(),w("div",Ma,[x[18]||(x[18]=d("h2",{class:"mb-4 text-[1.75rem] font-semibold"},"Описание",-1)),N(Xn,{modelValue:c(u),"onUpdate:modelValue":x[0]||(x[0]=Fe=>Xe(u)?u.value=Fe:null)},{default:B(()=>[N(Hn,{name:"name1"},{default:B(()=>[N(Yn,{height:300},{default:B(()=>[d("div",{class:"description",innerHTML:c(g)?.description},null,8,Na)]),_:1})]),_:1})]),_:1},8,["modelValue"])])):Y("",!0),N(Wn,{class:"mb-8"}),N(Jn,{items:c(T),"is-open":c(p),"initial-slide":c(b),onClose:Tn,onSlideChange:Vn},null,8,["items","is-open","initial-slide"]),N(Zn,{modelValue:c(m),"onUpdate:modelValue":x[1]||(x[1]=Fe=>Xe(m)?m.value=Fe:null),"embed-html":c(O)}
1,null,8,["modelValue","embed-html"])])}}}),Ba={class:"layout-root"},ui=be({__name:"[name]",setup(e){const t=ln(["model"]);return an(()=>({link:[{rel:"canonical",href:()=>t.value}]})),(n,s)=>{const o=Ra;return y(),w("div",Ba,[N(o)])}}});export{ui as default};

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.