import{i as qe}from"./chunk-fc34c9a6.js";import{aa as ge,v as we,j as Qe,b as eo,S as oo,n as U,o as y,a3 as ae,M as to,ac as D,u as me,x as no,a6 as io,aP as ro,aQ as ao,ad as V,W as so,aj as lo}from"../entries/src_pages_Home.page.16dc467b.js";import{c as pe}from"./chunk-a740628f.js";import{h as i,d as J,C as xe,r as M,A as be,a1 as Ce,i as Se,c as uo,I as se,f as Y,F as le,J as co,aa as fo,b as ue,w as ce,p as ho,S as vo,a9 as H}from"./chunk-449c23a2.js";import{f as go}from"./chunk-051b56e8.js";import{u as wo}from"./chunk-66ac4853.js";import{N as I}from"./chunk-9519e52e.js";import{r as j}from"./chunk-f94e2689.js";import{b as mo}from"./chunk-e933942f.js";function po(e,s,n,u){var r=-1,d=e==null?0:e.length;for(u&&d&&(n=e[++r]);++r{var s;const{root:n=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(s=e.threshold)!==null&&s!==void 0?s:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof n=="string"?document.querySelector(n):n)||document.documentElement})}},X=new WeakMap,F=new WeakMap,G=new WeakMap,mt=(e,s,n)=>{if(!e)return()=>{};const u=wt(s),{root:r}=u.options;let d;const w=X.get(r);w?d=w:(d=new Map,X.set(r,d));let m,v;d.has(u.hash)?(v=d.get(u.hash),v[1].has(e)||(m=v[0],v[1].add(e),m.observe(e))):(m=new IntersectionObserver(g=>{g.forEach(P=>{if(P.isIntersecting){const R=F.get(P.target),L=G.get(P.target);R&&R(),L&&(L.value=!0)}})},u.options),m.observe(e),v=[m,new Set([e])],d.set(u.hash,v));let l=!1;const c=()=>{l||(F.delete(e),G.delete(e),l=!0,v[1].has(e)&&(v[0].unobserve(e),v[1].delete(e)),v[1].size<=0&&d.delete(u.hash),d.size||X.delete(r))};return F.set(e,c),G.set(e,n),c},De=Object.assign(Object.assign({},we.props),{onPreviewPrev:Function,onPreviewNext:Function,showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean}),_e=pe("n-image");globalThis&&globalThis.__awaiter;const pt=(e,s)=>{if(!e)return;const n=document.createElement("a");n.href=e,s!==void 0&&(n.download=s),document.body.appendChild(n),n.click(),document.body.removeChild(n)};function xt(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const bt=Qe({name:"Image",common:eo,peers:{Tooltip:oo},self:xt}),Ct=i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"})),St=i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"})),Ot=i("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"})),Mt=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},i("path",{fill:"currentColor",d:"M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"})),Rt=U([U("body >",[y("image-container","position: fixed;")]),y("image-preview-container",` position: fixed; left: 0; right: 0; top: 0; bottom: 0; display: flex; `),y("image-preview-overlay",` z-index: -1; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .3); `,[ae()]),y("image-preview-toolbar",` z-index: 1; position: absolute; left: 50%; transform: translateX(-50%); border-radius: var(--n-toolbar-border-radius); height: 48px; bottom: 40px; padding: 0 12px; background: var(--n-toolbar-color); box-shadow: var(--n-toolbar-box-shadow); color: var(--n-toolbar-icon-color); transition: color .3s var(--n-bezier); display: flex; align-items: center; `,[y("base-icon",` padding: 0 8px; font-size: 28px; cursor: pointer; `),ae()]),y("image-preview-wrapper",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; pointer-events: none; `,[go()]),y("image-preview",` user-select: none; -webkit-user-select: none; pointer-events: all; margin: auto; max-height: calc(100vh - 32px); max-width: calc(100vw - 32px); transition: transform .3s var(--n-bezier); `),y("image",` display: inline-flex; max-height: 100%; max-width: 100%; `,[to("preview-disabled",` cursor: pointer; `),U("img",` border-radius: inherit; `)])]),_=32,Lt=J({name:"ImagePreview",props:Object.assign(Object.assign({},De),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const s=we("Image","-image",Rt,bt,e,xe(e,"clsPrefix"));let n=null;const u=M(null),r=M(null),d=M(void 0),w=M(!1),m=M(!1),{localeRef:v}=wo("Image");function l(){const{value:o}=r;if(!n||!o)return;const{style:a}=o,t=n.getBoundingClientRect(),f=t.left+t.width/2,h=t.top+t.height/2;a.transformOrigin=`${f}px ${h}px`}function c(o){var a,t;switch(o.key){case" ":o.preventDefault();break;case"ArrowLeft":(a=e.onPrev)===null||a===void 0||a.call(e);break;case"ArrowRight":(t=e.onNext)===null||t===void 0||t.call(e);break;case"Escape":ne();break}}be(w,o=>{o?V("keydown",document,c):D("keydown",document,c)}),Ce(()=>{D("keydown",document,c)});let g=0,P=0,R=0,L=0,$=0,Z=0,K=0,q=0,B=!1;function Q(o){const{clientX:a,clientY:t}=o;R=a-g,L=t-P,lo(S)}function je(o){const{mouseUpClientX:a,mouseUpClientY:t,mouseDownClientX:f,mouseDownClientY:h}=o,b=f-a,C=h-t,O=`vertical${C>0?"Top":"Bottom"}`,k=`horizontal${b>0?"Left":"Right"}`;return{moveVerticalDirection:O,moveHorizontalDirection:k,deltaHorizontal:b,deltaVertical:C}}function ee(o){const{value:a}=u;if(!a)return{offsetX:0,offsetY:0};const t=a.getBoundingClientRect(),{moveVerticalDirection:f,moveHorizontalDirection:h,deltaHorizontal:b,deltaVertical:C}=o||{};let O=0,k=0;return t.width<=window.innerWidth?O=0:t.left>0?O=(t.width-window.innerWidth)/2:t.right0?k=(t.height-window.innerHeight)/2:t.bottom.5){const o=x;z-=1,x=Math.max(.5,Math.pow(W,z));const a=o-x;S(!1);const t=ee();x+=a,S(!1),x-=a,R=t.offsetX,L=t.offsetY,S()}}function Fe(){const o=d.value;o&&pt(o,void 0)}function S(o=!0){var a;const{value:t}=u;if(!t)return;const{style:f}=t,h=fo((a=p?.previewedImgPropsRef.value)===null||a===void 0?void 0:a.style);let b="";if(typeof h=="string")b=h+";";else for(const O in h)b+=`${ut(O)}: ${h[O]};`;const C=`transform-origin: center; transform: translateX(${R}px) translateY(${L}px) rotate(${A}deg) scale(${x});`;B?f.cssText=b+"cursor: grabbing; transition: none;"+C:f.cssText=b+"cursor: grab;"+C+(o?"":"transition: none;"),o||t.offsetHeight}function ne(){w.value=!w.value,m.value=!0}function Ge(){x=te(),z=Math.ceil(Math.log(x)/Math.log(W)),R=0,L=0,S()}const Je={setPreviewSrc:o=>{d.value=o},setThumbnailEl:o=>{n=o},toggleShow:ne};function Ke(o,a){if(e.showToolbarTooltip){const{value:t}=s;return i(so,{to:!1,theme:t.peers.Tooltip,themeOverrides:t.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>v.value[a],trigger:()=>o})}else return o}const ie=uo(()=>{const{common:{cubicBezierEaseInOut:o},self:{toolbarIconColor:a,toolbarBorderRadius:t,toolbarBoxShadow:f,toolbarColor:h}}=s.value;return{"--n-bezier":o,"--n-toolbar-icon-color":a,"--n-toolbar-color":h,"--n-toolbar-border-radius":t,"--n-toolbar-box-shadow":f}}),{inlineThemeDisabled:re}=me(),T=re?no("image-preview",void 0,ie,e):void 0;return Object.assign({previewRef:u,previewWrapperRef:r,previewSrc:d,show:w,appear:io(),displayed:m,previewedImgProps:p?.previewedImgPropsRef,handleWheel(o){o.preventDefault()},handlePreviewMousedown:$e,handlePreviewDblclick:Ze,syncTransformOrigin:l,handleAfterLeave:()=>{N(),A=0,m.value=!1},handleDragStart:o=>{var a,t;(t=(a=p?.previewedImgPropsRef.value)===null||a===void 0?void 0:a.onDragstart)===null||t===void 0||t.call(a,o),o.preventDefault()},zoomIn:Ye,zoomOut:Xe,handleDownloadClick:Fe,rotateCounterclockwise:Ne,rotateClockwise:Ue,handleSwitchPrev:Be,handleSwitchNext:We,withTooltip:Ke,resizeToOrignalImageSize:Ge,cssVars:re?void 0:ie,themeClass:T?.themeClass,onRender:T?.onRender},Je)},render(){var e,s;const{clsPrefix:n}=this;return i(le,null,(s=(e=this.$slots).default)===null||s===void 0?void 0:s.call(e),i(ro,{show:this.show},{default:()=>{var u;return this.show||this.displayed?((u=this.onRender)===null||u===void 0||u.call(this),se(i("div",{class:[`${n}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},i(Y,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?i("div",{class:`${n}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?i(Y,{name:"fade-in-transition",appear:this.appear},{default:()=>{if(!this.show)return null;const{withTooltip:r}=this;return i("div",{class:`${n}-image-preview-toolbar`},this.onPrev?i(le,null,r(i(I,{clsPrefix:n,onClick:this.handleSwitchPrev},{default:()=>Ct}),"tipPrevious"),r(i(I,{clsPrefix:n,onClick:this.handleSwitchNext},{default:()=>St}),"tipNext")):null,r(i(I,{clsPrefix:n,onClick:this.rotateCounterclockwise},{default:()=>i(dt,null)}),"tipCounterclockwise"),r(i(I,{clsPrefix:n,onClick:this.rotateClockwise},{default:()=>i(ct,null)}),"tipClockwise"),r(i(I,{clsPrefix:n,onClick:this.resizeToOrignalImageSize},{default:()=>i(vt,null)}),"tipOriginalSize"),r(i(I,{clsPrefix:n,onClick:this.zoomOut},{default:()=>i(ht,null)}),"tipZoomOut"),r(i(I,{clsPrefix:n,onClick:this.zoomIn},{default:()=>i(ft,null)}),"tipZoomIn"),r(i(I,{clsPrefix:n,onClick:this.handleDownloadClick},{default:()=>Mt}),"tipDownload"),r(i(I,{clsPrefix:n,onClick:this.toggleShow},{default:()=>Ot}),"tipClose"))}}):null,i(Y,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:r={}}=this;return se(i("div",{class:`${n}-image-preview-wrapper`,ref:"previewWrapperRef"},i("img",Object.assign({},r,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${n}-image-preview`,r.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[co,this.show]])}})),[[ao,{enabled:this.show}]])):null}}))}}),It=pe("n-image-group"),kt=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},De),jt=J({name:"Image",props:kt,inheritAttrs:!1,setup(e){const s=M(null),n=M(!1),u=M(null),r=Se(It,null),{mergedClsPrefixRef:d}=r||me(e),w={click:()=>{if(e.previewDisabled||n.value)return;const l=e.previewSrc||e.src;if(r){r.setPreviewSrc(l),r.setThumbnailEl(s.value),r.toggleShow();return}const{value:c}=u;c&&(c.setPreviewSrc(l),c.setThumbnailEl(s.value),c.toggleShow())}},m=M(!e.lazy);ue(()=>{var l;(l=s.value)===null||l===void 0||l.setAttribute("data-group-id",r?.groupId||"")}),ue(()=>{if(e.lazy&&e.intersectionObserverOptions){let l;const c=ce(()=>{l?.(),l=void 0,l=mt(s.value,e.intersectionObserverOptions,m)});Ce(()=>{c(),l?.()})}}),ce(()=>{var l;e.src,(l=e.imgProps)===null||l===void 0||l.src,n.value=!1});const v=M(!1);return ho(_e,{previewedImgPropsRef:xe(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:d,groupId:r?.groupId,previewInstRef:u,imageRef:s,showError:n,shouldStartLoading:m,loaded:v,mergedOnClick:l=>{var c,g;w.click(),(g=(c=e.imgProps)===null||c===void 0?void 0:c.onClick)===null||g===void 0||g.call(c,l)},mergedOnError:l=>{if(!m.value)return;n.value=!0;const{onError:c,imgProps:{onError:g}={}}=e;c?.(l),g?.(l)},mergedOnLoad:l=>{const{onLoad:c,imgProps:{onLoad:g}={}}=e;c?.(l),g?.(l),v.value=!0}},w)},render(){var e,s;const{mergedClsPrefix:n,imgProps:u={},loaded:r,$attrs:d,lazy:w}=this,m=(s=(e=this.$slots).placeholder)===null||s===void 0?void 0:s.call(e),v=this.src||u.src,l=i("img",Object.assign(Object.assign({},u),{ref:"imageRef",width:this.width||u.width,height:this.height||u.height,src:this.showError?this.fallbackSrc:w&&this.intersectionObserverOptions?this.shouldStartLoading?v:void 0:v,alt:this.alt||u.alt,"aria-label":this.alt||u.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:gt&&w&&!this.intersectionObserverOptions?"lazy":"eager",style:[u.style||"",m&&!r?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return i("div",Object.assign({},d,{role:"none",class:[d.class,`${n}-image`,(this.previewDisabled||this.showError)&&`${n}-image--preview-disabled`]}),this.groupId?l:i(Lt,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:n,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},{default:()=>l}),!r&&m)}});function $t({text:e,color:{background:s,foreground:n},errorCorrectionLevel:u,options:r}){const d=M("");return be([e,s,n,u].filter(vo),async()=>{H(e)&&(d.value=await mo.toDataURL(H(e).trim(),{color:{dark:H(n),light:H(s),...r?.color},errorCorrectionLevel:H(u)??"M",...r}))},{immediate:!0}),{qrcode:d}}export{jt as _,$t as u};