PageSourceSearch

https://cdn.ridewithgps.com/rwgps-javascripts/prod/assets/DroppablePage-JRSbOvAb.js

js ridewithgps.com collected 2026-09-24 08:43:22 UTC 2,478 bytes, 1 lines download raw bytes

1import{o as e}from"./rolldown-runtime-CoV_I8sK.js";import{t}from"./react-CpBNgyEA.js";import{t as n}from"./jsx-runtime-CFmj9-ij.js";import{t as r}from"./localization-DeOw48V4.js";import{i}from"./lib-D4hjuydu.js";import{t as a}from"./classnames-_T60xWH9.js";import{t as o}from"./useRefWrappedCallback-B3BZVhpp.js";import{t as s}from"./LegacyIcon-CFinytkn.js";import{t as c}from"./es-BFRyc_kx.js";var l={overlay:`_overlay_1od16_1`,inner:`_inner_1od16_13`},u=n(),d=({active:e,icon:t,message:n})=>e?(0,u.jsx)(`div`,{className:l.overlay,children:(0,u.jsxs)(`div`,{className:l.inner,children:[t,n]})}):null,f=e(t()),p=e(a()),m={droppablePage:`_droppablePage_1fgkw_1`,hint:`_hint_1fgkw_1`,active:`_active_1fgkw_14`,reject:`_reject_1fgkw_18`,hintInner:`_hintInner_1fgkw_22`,"drop-hint-grow":`_drop-hint-grow_1fgkw_1`,photoIcon:`_photoIcon_1fgkw_37`},h=i({dragToUpload:{id:`DroppablePage.dragToUpload`,defaultMessage:`Drag to upload photos`}}),g=e=>Object.assign(e,{preview:URL.createObjectURL(e)}),_=({className:e,onDrop:t,hint:n=(0,u.jsx)(r,{m:h.dragToUpload}),children:i,multiple:a=!1,zoneRef:o,accept:l,validator:d,icon:_=(0,u.jsx)(s,{className:m.photoIcon,i:`ios-images-outline`})})=>{let[v,y]=(0,f.useState)(!1);return(0,u.jsx)(c,{ref:o,onDrop:(0,f.useCallback)(e=>{y(!1),t(e.map(g))},[t]),multiple:a,validator:d,accept:l,noClick:!0,noKeyboard:!0,onDragOver:()=>y(!0),onDragLeave:()=>
1y(!1),children:({getRootProps:t,getInputProps:r})=>(0,u.jsxs)(`div`,{...t(),className:(0,p.default)(m.droppablePage,e),children:[(0,u.jsx)(`input`,{...r()}),i,(0,u.jsx)(`div`,{className:(0,p.default)(m.hint,v&&m.active),children:(0,u.jsxs)(`div`,{className:m.hintInner,children:[(0,u.jsx)(`div`,{children:_}),n]})})]})})},v=({validate:e,onFiles:t})=>{let[n,r]=(0,f.useState)(!1),i=o(e??(()=>!0)),a=o(t);return(0,f.useEffect)(()=>{let e=0,t=e=>!!e.dataTransfer?.types.includes(`Files`),n=n=>{t(n)&&(e++,r(!0))},o=()=>{e=Math.max(0,e-1),e===0&&r(!1)},s=e=>{t(e)&&e.preventDefault()},c=n=>{if(!t(n))return;n.preventDefault(),e=0,r(!1);let o=Array.from(n.dataTransfer?.files??[]).filter(i);o.length&&a(o.map(g))};return document.addEventListener(`dragenter`,n),document.addEventListener(`dragleave`,o),document.addEventListener(`dragover`,s),document.addEventListener(`drop`,c),()=>{document.removeEventListener(`dragenter`,n),document.removeEventListener(`dragleave`,o),document.removeEventListener(`dragover`,s),document.removeEventListener(`drop`,c)}},[i,a]),n};export{d as i,_ as n,g as r,v 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.