PageSourceSearch

https://cdn.ridewithgps.com/rwgps-javascripts/prod/assets/AdminMenu-MlXdJmvW.js

js ridewithgps.com collected 2026-09-24 08:41:25 UTC 12,984 bytes, 2 lines download raw bytes

vendor: 6,686 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModalAppDownload-AcYx2Dsd.js","./rolldown-runtime-CoV_I8sK.js","./lib-D4hjuydu.js","./react-CpBNgyEA.js","./tslib.es6-B1fgmCPk.js","./classnames-_T60xWH9.js","./localization-DeOw48V4.js","./_createCompounder-DTyELR84.js","./toString-D-yzh5p-.js","./isObjectLike-DsV7sDD6.js","./isSymbol-BA-Gm31c.js","./_baseSlice-BdRrvcPk.js","./rwgpsNamespace-CFcYWu5p.js","./dist-3bNpuHVG.js","./jsx-runtime-CFmj9-ij.js","./IconClose-D4o7Tq70.js","./icons.helpers-CrHavtjX.js","./DownloadAppButton-y8HizUP0.js","./currentUser-ZLh-7H7g.js","./camelcase-keys-DrA0nbZZ.js","./defineProperty-DFkOFzet.js","./queryUtils-KRoOkLjf.js","./preload-helper-CIqjYnkU.js","./conf-WCky0Xnd.js","./memoize-DLnnnNF9.js","./isObject-DVm-psYx.js","./pickBy-eigzzLED.js","./mutation-UGJbo9I7.js","./hasIn-CVdFK-MK.js","./_basePickBy-BHY2ui7i.js","./_baseAssignValue-faXFh5Lk.js","./_baseIteratee-H5pzsCh3.js","./useEffectOnce-CE-OatwC.js","./_baseEach-OiKCQClF.js","./_baseForOwn-BBK_4zy0.js","./esm-3pH46__L.js","./utils-BQE1H7ZV.js","./debounce-CdG2B2pi.js","./toNumber-fY65rPRY.js","./IconDownloadArrow-DdP2297X.js","./ampliHelpers-CzqCoqg6.js","./geoUtils-Dmw8J6hQ.js","./isEqual-BoctyvfG.js","./isTruthy-BLUJH3lx.js","./queryClient-0BdSowcN.js","./textUtils-BMkuqUrf.js","./eventsQueries-CriLw8hX.js","./util-Es43GprZ.js","./experiments-B2660v-v.js","./snakeCase-BGPI7BjB.js","./Trip.helpers-CBdQ7pzA.js","./metricsCalculator-m3HGA5mp.js","./getConsole-BInUuGNl.js","./surfaceTypes-BCzzpT3S.js","./units-DdPGjmTo.js","./leftPad-BlHuf_zc.js","./waiverQueries-DWWvUbiN.js","./urls-B7Ne4YiL.js","./Button-Kou6tzhs.js","./CoreLink-BDh-dlgD.js","./ClientOnly-BhZhZo40.js","./useRouterState-Dx1bsOOt.js","./useRouter-DN4fF7P5.js","./with-selector-CtQSR-HR.js","./tiny-invariant-CRIHyWHI.js","./utils-yQoHpKe4.js","./react-dom-ILBd_INF.js","./routerContext-DcRvnMeP.js","./Button-C0l2qKcP.css","./mobileDeviceChecks-PDqMGBsr.js","./detectPlatform-_XAYvf1g.js","./DownloadAppButton-D0buMdbo.css","./ModalDialogConfig-DLJX_qyc.js","./useRefWrappedCallback-B3BZVhpp.js","./appDownloadPromptCooldown-CCIBUa_5.js","./useCollapse-DaScs5OT.js","./layoutConstants-Bhygrpq6.js","./loadTypekitKit-BSowjUqN.js","./base.module-Caz6osRX.js","./base-BHxo6Gho.css","./ModalAppDownload-MQ0J0co2.css"])))=>i.map(i=>d[i]);
2import{o as e,r as t,t as n}from"./rolldown-runtime-CoV_I8sK.js";import{t as r}from"./rwgpsNamespace-CFcYWu5p.js";import{ft as i,nt as a}from"./currentUser-ZLh-7H7g.js";import{t as o}from"./react-CpBNgyEA.js";import{t as s}from"./jsx-runtime-CFmj9-ij.js";import{r as c}from"./_baseIteratee-H5pzsCh3.js";import{t as l}from"./queryUtils-KRoOkLjf.js";import{t as u}from"./preload-helper-CIqjYnkU.js";import{t as d}from"./defineProperty-DFkOFzet.js";import{t as f}from"./classnames-_T60xWH9.js";import{n as p}from"./modalUtils-CRhN-Mf6.js";import{i as m,r as h,t as g}from"./PopoverLinkMenu-Bm65GNfG.js";import{t as _}from"./IconSettings-CmzjGaN-.js";import{t as v}from"./copyToClipboard-BZVb6uR6.js";import{t as y}from"./GlobalNav.module-Bkts_k3G.js";var b=new URLSearchParams(window.location.search).get(`hot`),x=n(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
2(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}})),S=e(f()),C=x(),w=e(o()),T=e=>new Proxy({},{get:(t,n)=>{if(typeof n==`string`)return(0,w.lazy)(()=>e(n).then(e=>({default:e[n]})))}}),E=t({AdminMenu:()=>L,AdminMenuItem:()=>I,AdminMenuSeparator:()=>P,useAdminMenuItem:()=>F}),D=s(),{ModalAppDownload:O}=T(()=>(window.__dit?.push(`src/common/GlobalNav/AdminMenu/AdminMenu.tsx\0features/payments/ModalAppDownload/ModalAppDownload`),u(()=>import(`./ModalAppDownload-AcYx2Dsd.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80]),import.meta.url))),k={e:new C.EventEmitter,adminMenuItems:new Map},A=c(r,`config.admin_menu_items`,[]),j=e=>{let{menuKey:t}=e;k.adminMenuItems=new Map(k.adminMenuItems).set(t,e),k.e.emit(`update`,k.adminMenuItems)},M=e=>{let t=new Map(k.adminMenuItems);t.delete(e),k.adminMenuItems=t,k.e.emit(`update`,k.adminMenuItems)},N=0,P=()=>((0,w.useEffect)(()=>{let e=`separator_${N++}`;return j({menuKey:e,separator:!0}),()=>{M(e)}},[]),null),F=({menuKey:e,label:t,onClick:n,href:r})=>{(0,w.useEffect)(()=>(j({menuKey:e,label:t,onClick:n,href:r}),()=>{M(e)}),[e,t,n,r])},I=e=>(F(e),null),L=class extends w.PureComponent{constructor(...e){super(...e),d(this,`_ref`,(0,w.createRef)()),d(this,`state`,{expanded:!1,adminMenuItems:new Map}),d(this,`onAdminMenuItemsChanged`,e=>{this.setState({adminMenuItems:e})}),d(this,`toggleExpanded`,()=>{this.setState({expanded:!this.state.expanded})})}componentDidMount(){k.e.on(`update`,this.onAdminMenuItemsChanged),this.setState({adminMenuItems:k.adminMenuItems})}componentWillUnmount(){k.e.off(`update`,this.onAdminMenuItemsChanged)}render(){let{expanded:e,adminMenuItems:t}=this.state,{onHide:n}=this.props,r=new Set(Array.from(t.values()).map(e=>!(`separator`in e)&&e.label||void 0).filter(e=>!!e)),o=A.filter(e=>e&&!r.has(e[0]));return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`a`,{onClick:this.toggleExpanded,className:(0,S.default)(y.iconLink,y.withMargin),ref:this._ref,children:(0,D.jsx)(_,{size:24})}),e&&(0,D.jsxs)(g,{target:this._ref,placement:`bottom`,onRequestClose:this.toggleExpanded,children:[(0,D.jsx)(m.Link,{href:`/admin_portal`,children:`Admin Portal`},`portal`),t.size>0&&(0,D.jsx)(`hr`,{}),Array.from(t.entries()).sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>(0,D.jsxs)(w.Fragment,{children:[t.separator&&(0,D.jsx)(`hr`,{}),!t.separator&&(0,D.jsx)(m.Link,{href:t.href,onClick:()=>{t.onClick&&t.onClick(),this.toggleExpanded()},className:t.className,children:t.label},e)]},e)),o.length>0&&(0,D.jsx)(`hr`,{}),o.map((e,t)=>(0,D.jsx)(R,{item:e},t)),(0,D.jsx)(`hr`,{}),(0,D.jsx)(m.Link,{onClick:()=>p(O,{source:`admin`}),children:`Show App Download Prompt`}),(0,D.jsx)(`hr`,{}),(0,D.jsx)(m.Link,{onClick:n,children:`Hide Admin Tools`}),(0,D.jsx)(m.Link,{onClick:async()=>{let e=await a(`/users/otu.json`),t=new URL(window.location.href),n=new URLSearchParams(t.search);b&&n.set(`hot`,b),n.set(`otu`,e.otu),t.search=l(n),v(t.toString()),this.toggleExpanded()},children:`Copy OTU login url`}),(0,D.jsx)(m.Link,{onClick:()=>i(`/deadminify`,{account_level:0},{method:`POST`}).then(()=>{window.location.reload()}),children:`Become Starter`}),(0,D.jsx)(m.Link,{onClick:()=>i(`/deadminify`,{account_level:1},{method:`POST`}).then(()=>{window.location.reload()}),children:`Become Basic`}),(0,D.jsx)(m.Link,{onClick:()=>i(`/deadminify`,{account_level:2},{method:`POST`}).then(()=>{window.location.reload()}),children:`Become Premium`})]})]})}},R=({item:e})=>
2{if(e===null)return null;let[t,n,r]=e,{method:i,remote:a,class:o,...s}=r;return(0,D.jsx)(h,{href:n,onClick:n?void 0:()=>window.alert(`not done yet`),"data-method":i,"data-remote":a,className:o,...s,children:t})};export{T as a,F as i,P as n,b as o,E as r,I 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.