PageSourceSearch

https://dabangapp.com/static/js/photo-viewer-chunk.DvRvBWqf.js

js dabangapp.com collected 2026-10-01 12:36:25 UTC 5,393 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-chunk.QTnfLwEv.js";import{n as t,t as n}from"./vendor-react-chunk.CT-LnCiw.js";import{r}from"./toast-chunk.DTIT2f1i.js";import{i,r as a}from"./styled-components.browser.esm-chunk.B4oDe2fF.js";import{n as o}from"./index.browser-chunk.Du-ZzVpY.js";import{n as s,t as c}from"./useEscToClose-chunk.DjD79U7h.js";import{t as l}from"./embla-carousel-react.esm-chunk.BNRG6gsm.js";import{t as u}from"./panorama-chunk.Csg5AN3S.js";var d=e(r(),1),f=e(t(),1);function p({activeIdx:e,closeViewer:t}){let n=(0,f.useRef)(o()),r=(0,f.useRef)(-1),[i,a]=(0,f.useState)(0),[u,d]=(0,f.useState)(0),p=s(e=>e.modals),m=s(e=>e.pushModal),h=s(e=>e.popModal),[g,_]=l({startIndex:e,watchDrag:!1}),v=(0,f.useMemo)(()=>p[p.length-1]===n.current,[p]),y=(0,f.useCallback)(e=>{let t=e.scrollSnapList().length,n=0;t>0&&(n=e.selectedScrollSnap()+1),a(n),d(t)},[]);c({isActive:v,closePopup:b,escToClose:!0,isLoading:!1}),(0,f.useEffect)(()=>{if(v)return document.addEventListener(`keydown`,C,{passive:!0}),()=>{document.removeEventListener(`keydown`,C)}},[v,_]),(0,f.useEffect)(()=>(r.current=p.findIndex(e=>e===n.current),r.current<0&&m(n.current),()=>{document.getElementById(n.current)||h(n.current)}),[p]),(0,f.useEffect)(()=>{if(_)return y(_),_.on(`select`,y),_.on(`reInit`,y),()=>{_.off(`select`,y),_.off(`reInit`,y),_?.destroy()}},[_]);function b(){t()}function x(){_?.scrollPrev()}function S(){_?.scrollNext()}function C(e){e.key===`ArrowRight`?S():e.key===`ArrowLeft`&&x()}return{emblaRef:g,_idx:r,_id:n,isActive:v,currentIdx:i,total:u,closePopup:b,clickPrev:x,clickNext:S}}var m=n(),h=e=>(0,m.jsx)(`svg`,{width:48,height:48,viewBox:`0 0 48 48`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,m.jsx)(`path`,{d:`M35.137 12.8631c-.2928-.2929-.7677-.2929-1.0606 0L24.0001 22.9393l-9.982-9.9819-.1038-.0868c-.2924-.2025-.6965-.1736-.9568.0868-.2929.2928-.2929.7677 0 1.0606L22.9395 24l-9.982 9.982-.0868.1039c-.2025.2923-.1736.6964.0868.9568.2929.2928.7677.2928 1.0606 0l9.982-9.982L34.0764 35.1369l.1039.0868c.2923.2025.6964.1736.9567-.0868.2929-.2929.2929-.7677 0-1.0606L25.0608 24 35.137 13.9237l.0868-.1038c.2025-.2923.1736-.6965-.0868-.9568Z`,fill:`#fff`})}),g=e=>(0,m.jsx)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,m.jsx)(`path`,{d:`M20.1317 7.6464c.1952-.1953.5118-.1953.7071 0 .1736.1736.1928.443.0578.6379l-.0578.0692L12.706 16.485l8.1328 8.132c.1736.1736.1928.443.0578.6379l-.0578.0692c-.1736.1736-.443.1929-.6379.0579l-.0692-.0579-8.8389-8.8388 8.8389-8.8388Z`,fill:`#fff`})}),_=e=>(0,m.jsx)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,m.jsx)(`path`,{d:`M11.6464 7.6464l-.0578.0692c-.135.1949-.1157.4643.0578.6379L19.778 16.485l-8.1316 8.132-.0578.0693c-.135.1948-.1157.4642.0578.6378.1953.1953.5119.1953.7072 0l8.8388-8.8388-8.8388-8.8388-.0693-.0579c-.1949-.135-.4643-.1157-.6379.0579Z`,fill:`#fff`})}),v=i.div`display:flex;align-items:flex-start;justify-content:flex-start;position:fixed;top:0;left:0;right:0;bottom:0;overflow:auto;z-index:${({$zIndex:e})=>e};`,y=i.div`flex:none;max-width:1200px;width:100%;margin:auto;padding:64px 0;border:1px solid ${({$isActive:e,theme:t})=>e?`transparent`:t.color.gray[200]};box-sizing:content-box;position:relative;z-index:1002;`,b=i.button`width:48px;height:48px;padding:0;border:0;border-radius:2px;background-color:transparent;position:absolute;top:0;right:0;&:focus-visible{outline:2px solid ${({theme:e})=>e.color.blue[500]};}`,x=a`display:flex;align-items:center;justify-content:center;width:64px;height:64px;padding:0;border:0;border-radius:2px;background-color:rgba(34,34,34,0.7);position:absolute;top:50%;transform:translateY(-50%);&:not(:disabled){&:hover{background-color:rgba(34,34,34,1);}&:focus-visible{outline:2px solid ${({theme:e})=>e.color.blue[500]};}}&:disabled{cursor:default;> svg{opacity:0.3;}}`,S=i.button`${x};left:40px;`,C=i.button`${x};right:40px;`,w=i.div`width:100%;padding-top:62.5%;position:relative;overflow:hidden;`,T=i.div`display:flex;position:absolute;top:0;left:0;right:0;bottom:0;`,E=i.div`flex:0 0 100%;min-width:0;background-color:${({theme:e})=>e.color.gray[900]};> div{width:100%;height:100%;}`,D=i.div`flex:0 0 100%;min-width:0;background:#222 url(${({$imgUrl:e})=>e}) center center / contain no-repeat;`,O=i.p`margin-top:16px;color:rgba(255,255,255,0.4);${({theme:e})=>e.font.body3.regular};text-align:center;position:absolute;bottom:24px;left:50%;transform:translateX(-50%);> b{color:#fff;}`;function k({activeIdx:e=0,imageList:t=[],closeViewer:n}){let{emblaRef:r,_idx:i,_id:a,isActive:o,currentIdx:s,total:c,closePopup:l,clickPrev:f,clickNext:x}=p({activeIdx:e,closeViewer:n});return(0,d.createPortal)((0,m.jsx)(v,{$zIndex:o?i.current+2001:i.current+1001,children:(0,m.jsxs)(y,{id:a.current,onClick:e=>e.stopPropagation(),$isActive:o,children:[(0,m.jsx)(b,{onClick:l,children:(0,m.jsx)(h,{})}),(0,m.jsx)(w,{ref:r,children:(0,m.jsx)(T,{children:t.map(e=>e.panoUrl?(0,m.jsx)(E,{children:(0,m.jsx)(u,{imgUrl:e.panoUrl})},e.id):(0,m.jsx)(D,{$imgUrl:e.url},e.id))})}),(0,m.jsx)(S,{onClick:f,disabled:s===1,children:(0,m.jsx)(g,{})}),(0,m.jsx)(C,{onClick:x,disabled:s===c,children:(0,m.jsx)(_,{})}),(0,m.jsxs)(O,{children:[(0,m.jsx)(`b`,{children:s}),` / `,c]})]})}),document.getElementById(`modal-container`))}export{_ as n,h as r,k 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.