@mappedin/react-ui 6.9.1-beta.0 → 6.10.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/{chunk-VSEMIYX2.js → chunk-4BQQ5BSR.js} +1 -1
- package/lib/esm/{chunk-E3KRW6U5.js → chunk-DIDO2XMZ.js} +1 -1
- package/lib/esm/{chunk-HSR66YU6.js → chunk-EXNC2MTG.js} +1 -1
- package/lib/esm/{chunk-HHLRVMBX.js → chunk-ISQGOUUJ.js} +1 -1
- package/lib/esm/{chunk-VB2SNF5E.js → chunk-KFGJTGSM.js} +1 -1
- package/lib/esm/{chunk-RX62PM76.js → chunk-O7VAO6M6.js} +1 -1
- package/lib/esm/{chunk-TPBVLR4S.js → chunk-P37LN4ZB.js} +1 -1
- package/lib/esm/{chunk-S3SNLAZ2.js → chunk-TGLANWSS.js} +1 -1
- package/lib/esm/{chunk-LUNEX6XS.js → chunk-UMWEDGK5.js} +1 -1
- package/lib/esm/{chunk-TY6GBURX.js → chunk-X4H4NHCG.js} +1 -1
- package/lib/esm/components/floor-selector/index.js +1 -1
- package/lib/esm/components/location-list/index.js +1 -1
- package/lib/esm/components/search/index.js +1 -1
- package/lib/esm/components/search-bar/index.js +1 -1
- package/lib/esm/components/zoom-controls/index.js +1 -1
- package/lib/esm/index.d.ts +5 -5
- package/lib/esm/index.js +1 -1
- package/lib/esm/themes/basic.js +1 -1
- package/lib/esm/themes/mappedin-dark.js +1 -1
- package/lib/esm/themes/mappedin-light.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as R,c}from"./chunk-
|
|
1
|
+
import{a as i,b as R,c}from"./chunk-TGLANWSS.js";var f="mappedin__",l="".concat(f,"keyboard-focus"),u="mappedin";var r=c((...s)=>s.filter(t=>t!=null).filter(t=>t!=="").map(t=>t.trim()).map(t=>t.startsWith(f)?t:"".concat(f).concat(t)).join(" "),"classNames");var T=c((...s)=>t=>{s.filter(e=>e!=null).forEach(e=>{typeof e=="function"?e(t):e&&(e.current=t)})},"combineRefs");var N=c((s,t)=>{if(!t&&!s)return{};let e=R(i({},s),{className:r(s.className)});return t&&Object.entries(t).forEach(([n,o])=>{e[n]==null?e[n]=o:n==="className"?e[n]=e[n]+" "+o:n==="ref"?e[n]=T(e[n],o):typeof e[n]=="object"&&typeof o=="object"?e[n]=i(i({},e[n]),o):typeof e[n]=="function"&&typeof o=="function"?e[n]=(...m)=>{s[n](...m),o(...m)}:e[n]=o}),e},"componentProps");export{l as a,u as b,r as c,T as d,N as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,e as r}from"./chunk-
|
|
1
|
+
import{c as m,e as r}from"./chunk-4BQQ5BSR.js";import{a as t,b as n,c as e}from"./chunk-TGLANWSS.js";import{jsx as c,jsxs as z}from"react/jsx-runtime";var u=e(()=>z("svg",n(t({},r({className:"icon--minus",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),{children:[c("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),c("path",{d:"M5 12l14 0"})]})),"Minus");import{jsx as l,jsxs as b}from"react/jsx-runtime";var a=e(()=>b("svg",n(t({},r({className:"icon--plus",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),{children:[l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M12 5l0 14"}),l("path",{d:"M5 12l14 0"})]})),"Plus");import{jsx as s,jsxs as f}from"react/jsx-runtime";var O=e(({onZoomIn:d,onZoomOut:v,props:o})=>f("div",n(t({},r({className:"zoom-controls-wrapper"},o==null?void 0:o.wrapper)),{children:[s("button",n(t({},r({className:m("zoom-controls-button","zoom-controls-zoom-in"),onClick:d,tabIndex:0},o==null?void 0:o.zoomIn)),{children:s(a,{})})),s("button",n(t({},r({className:m("zoom-controls-button","zoom-controls-zoom-out"),onClick:v,tabIndex:0},o==null?void 0:o.zoomOut)),{children:s(u,{})}))]})),"ZoomControls");export{O as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o}from"./chunk-
|
|
1
|
+
import{b as o}from"./chunk-4BQQ5BSR.js";import{c as s}from"./chunk-TGLANWSS.js";import{useEffect as u,useState as f}from"react";var n=s(e=>{let r=e.charAt(0).toUpperCase(),t=e.slice(1);return"".concat(o).concat(r).concat(t)},"dataAttribute");var T=s((e,r)=>{let[t,i]=f(null);return u(()=>(t!=null&&(t.dataset[n(e)]=r.toString()),()=>{t!=null&&delete t.dataset[n(e)]}),[t,r]),{ref:i}},"useDataAttribute");export{T as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as C}from"./chunk-
|
|
1
|
+
import{a as b,b as C}from"./chunk-O7VAO6M6.js";import{a as k}from"./chunk-EXNC2MTG.js";import{c as s,d as p,e as r}from"./chunk-4BQQ5BSR.js";import{a as t,b as o,c as a}from"./chunk-TGLANWSS.js";import{jsx as u,jsxs as H}from"react/jsx-runtime";var I=a(()=>H("svg",o(t({},r({className:"icon--magnifying-glass",viewBox:"0 0 24 24",height:"100%",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),{children:[u("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),u("path",{d:"M21 21l-6 -6"})]})),"MagnifyingGlass");import{useRef as R}from"react";import{jsx as h,jsxs as y}from"react/jsx-runtime";var M=a(()=>y("svg",o(t({},r({className:"icon--close",viewBox:"0 0 24 24",height:"100%",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M18 6l-12 12"}),h("path",{d:"M6 6l12 12"})]})),"Close");import{jsx as c,jsxs as E}from"react/jsx-runtime";var $=a(({props:e,value:N,onChange:P,placeholder:L,searchIcon:f,closeIcon:d})=>{let i=R(null),g=R(null),x=f===void 0?c(I,{}):f,B=d===void 0?c(M,{}):d,{value:l,onChange:v}=b({value:N,onChange:P,defaultValue:""});C(g,()=>{var n;(n=i.current)==null||n.blur()});let{ref:w}=k("searchBarValue",l);return E("div",o(t({},r({className:"search-bar-wrapper",ref:p(g,w)},e==null?void 0:e.wrapper)),{children:[c("input",o(t({},r({name:"mappedin-search-bar",className:"search-bar-input",ref:i,onChange:a(n=>v(n.target.value),"onChange"),type:"search",role:"searchbox",placeholder:L},e==null?void 0:e.input)),{value:l})),c("button",o(t({},r({className:s("search-bar-icon","search-icon"),onClick:a(()=>{var n;(n=i.current)==null||n.focus()},"onClick"),tabIndex:-1},e==null?void 0:e.searchIcon)),{children:x})),c("button",o(t({},r({className:s("search-bar-icon","clear-icon"),onClick:a(()=>{var n;v(""),(n=i.current)==null||n.focus()},"onClick"),tabIndex:l.length>0?0:-1},e==null?void 0:e.clearIcon)),{children:B}))]}))},"SearchBar");export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as J,d as Q,e as ee}from"./chunk-TY6GBURX.js";import{a as Z}from"./chunk-HSR66YU6.js";import{c as L,d as K,e as E}from"./chunk-VSEMIYX2.js";import{a as h,b as v,c as l,d as j,f as b}from"./chunk-S3SNLAZ2.js";import{useEffect as We,useMemo as Xe,useRef as Ye}from"react";import Ie,{cloneElement as De,isValidElement as Re,useCallback as I,useEffect as D,useReducer as Ne,useRef as q,useState as Ce}from"react";import*as re from"react";var ve=l(t=>typeof t!="string"?{}:t.split(/ ?; ?/).reduce((e,r)=>{let[n,i]=r.split(/ ?: ?/).map((c,a)=>a===0?c.replace(/\s+/g,""):c.trim());if(n&&i){let c=n.replace(/(\w)-(\w)/g,(u,s,o)=>"".concat(s).concat(o.toUpperCase())),a=i.trim();Number.isNaN(Number(i))||(a=Number(i)),e[n.startsWith("-")?n:c]=a}return e},{}),"styleToObject");function ke(t=6){let e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="";for(let n=t;n>0;--n)r+=e[Math.round(Math.random()*(e.length-1))];return r}l(ke,"randomString");var we=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],te={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function xe(t,e){var a,u;let c=e,{key:r,level:n}=c,i=j(c,["key","level"]);switch(t.nodeType){case 1:return re.createElement(Le(t.nodeName),be(t,r),ne(t.childNodes,n,i));case 3:{let s=(u=(a=t.nodeValue)==null?void 0:a.toString())!=null?u:"";if(!i.allowWhiteSpaces&&/^\s+$/.test(s)&&!/[\u00A0\u202F]/.test(s))return null;if(!t.parentNode)return s;let o=t.parentNode.nodeName.toLowerCase();return we.includes(o)?(/\S/.test(s)&&console.warn("A textNode is not allowed inside '".concat(o,"'. Your text \"").concat(s,'" will be ignored')),null):s}case 8:return null;case 11:return ne(t.childNodes,n,e);default:return null}}l(xe,"getReactNode");function be(t,e){let r={key:e};if(t instanceof Element){let n=t.getAttribute("class");n&&(r.className=n),[...t.attributes].forEach(i=>{switch(i.name){case"class":break;case"style":r[i.name]=ve(i.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":r[te[i.name]||i.name]=!0;break;default:r[te[i.name]||i.name]=i.value}})}return r}l(be,"parseAttributes");function ne(t,e,r){let n=[...t].map((i,c)=>M(i,v(h({},r),{index:c,level:e+1}))).filter(Boolean);return n.length?n:null}l(ne,"parseChildren");function Le(t){return/[a-z]+[A-Z]+[a-z]+/.test(t)?t:t.toLowerCase()}l(Le,"parseName");function H(t,e={}){return typeof t=="string"?Ee(t,e):t instanceof Node?M(t,e):null}l(H,"convert");function M(t,e={}){if(!t||!(t instanceof Node))return null;let{actions:r=[],index:n=0,level:i=0,randomKey:c}=e,a=t,u="".concat(i,"-").concat(n),s=[];return c&&i===0&&(u="".concat(ke(),"-").concat(u)),Array.isArray(r)&&r.forEach(o=>{o.condition(a,u,i)&&(typeof o.pre=="function"&&(a=o.pre(a,u,i),a instanceof Node||(a=t,b.env.NODE_ENV!=="production"&&console.warn("The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)"))),typeof o.post=="function"&&s.push(o.post(a,u,i)))}),s.length?s:xe(a,h({key:u,level:i},e))}l(M,"convertFromNode");function Ee(t,e={}){if(!t||typeof t!="string")return null;let{includeAllNodes:r=!1,nodeOnly:n=!1,selector:i="body > *",type:c="text/html"}=e;try{let u=new DOMParser().parseFromString(t,c);if(r){let{childNodes:o}=u.body;return n?o:[...o].map(g=>M(g,e))}let s=u.querySelector(i)||u.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return n?s:M(s,e)}catch(a){b.env.NODE_ENV!=="production"&&console.error(a)}return null}l(Ee,"convertFromString");import{useEffect as Ve,useRef as qe}from"react";var Se=Object.defineProperty,Ae=l((t,e,r)=>e in t?Se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),z=l((t,e,r)=>Ae(t,typeof e!="symbol"?e+"":e,r),"__publicField"),ie="react-inlinesvg",Pe=10,d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function Te(t){return t[Math.floor(Math.random()*t.length)]}l(Te,"randomCharacter");function O(){var t;return!!(typeof window<"u"&&((t=window.document)!=null&&t.createElement))}l(O,"canUseDOM");function Oe(){return Ue()&&typeof window<"u"&&window!==null}l(Oe,"isSupportedEnvironment");function Me(t,...e){let r={};for(let n in t)({}).hasOwnProperty.call(t,n)&&(e.includes(n)||(r[n]=t[n]));return r}l(Me,"omit");function He(t){let e="abcdefghijklmnopqrstuvwxyz",n="".concat(e).concat(e.toUpperCase()).concat("1234567890"),i="";for(let c=0;c<t;c++)i+=Te(n);return i}l(He,"randomString");async function ae(t,e){let r=await fetch(t,e),n=r.headers.get("content-type"),[i]=(n!=null?n:"").split(/ ?; ?/);if(r.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(c=>i.includes(c)))throw new Error("Content type isn't valid: ".concat(i));return r.text()}l(ae,"request");function ze(t=1){return new Promise(e=>{setTimeout(e,t*1e3)})}l(ze,"sleep");function Ue(){if(!document)return!1;let t=document.createElement("div");t.innerHTML="<svg />";let e=t.firstChild;return!!e&&e.namespaceURI==="http://www.w3.org/2000/svg"}l(Ue,"supportsInlineSVG");var N,Fe=(N=class{constructor(){var n;z(this,"cacheApi"),z(this,"cacheStore"),z(this,"subscribers",[]),z(this,"isReady",!1),this.cacheStore=new Map;let e=ie,r=!1;O()&&(e=(n=window.REACT_INLINESVG_CACHE_NAME)!=null?n:ie,r=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),r?caches.open(e).then(i=>{this.cacheApi=i}).catch(i=>{console.error("Failed to open cache: ".concat(i.message)),this.cacheApi=void 0}).finally(()=>{this.isReady=!0;let i=[...this.subscribers];this.subscribers.length=0,i.forEach(c=>{try{c()}catch(a){console.error("Error in CacheStore subscriber callback: ".concat(a.message))}})}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,r){var n,i;return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,r):this.fetchAndAddToInternalCache(e,r)),(i=(n=this.cacheStore.get(e))==null?void 0:n.content)!=null?i:""}set(e,r){this.cacheStore.set(e,r)}isCached(e){var r;return((r=this.cacheStore.get(e))==null?void 0:r.status)===d.LOADED}async fetchAndAddToInternalCache(e,r){let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToInternalCache(e,r)});return}if(!(n!=null&&n.content)){this.cacheStore.set(e,{content:"",status:d.LOADING});try{let i=await ae(e,r);this.cacheStore.set(e,{content:i,status:d.LOADED})}catch(i){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),i}}}async fetchAndAddToPersistentCache(e,r){var c,a,u,s;let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADED)return;if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToPersistentCache(e,r)});return}this.cacheStore.set(e,{content:"",status:d.LOADING});let i=await((c=this.cacheApi)==null?void 0:c.match(e));if(i){let o=await i.text();this.cacheStore.set(e,{content:o,status:d.LOADED});return}try{await((a=this.cacheApi)==null?void 0:a.add(new Request(e,r)));let o=await((u=this.cacheApi)==null?void 0:u.match(e)),g=(s=await(o==null?void 0:o.text()))!=null?s:"";this.cacheStore.set(e,{content:g,status:d.LOADED})}catch(o){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),o}}async handleLoading(e,r){var n;for(let i=0;i<Pe;i++){if(((n=this.cacheStore.get(e))==null?void 0:n.status)!==d.LOADING)return;await ze(.1)}await r()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,r])=>({[e]:r}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){let e=await this.cacheApi.keys();await Promise.allSettled(e.map(r=>this.cacheApi.delete(r)))}this.cacheStore.clear()}},l(N,"CacheStore"),N);function oe(t){let e=qe(void 0);return Ve(()=>{e.current=t}),e.current}l(oe,"usePrevious");function Ge(t){let{baseURL:e,content:r,description:n,handleError:i,hash:c,preProcessor:a,title:u,uniquifyIDs:s=!1}=t;try{let o=$e(r,a),g=H(o,{nodeOnly:!0});if(!g||!(g instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");let f=se(g,{baseURL:e,hash:c,uniquifyIDs:s});if(n){let m=f.querySelector("desc");m!=null&&m.parentNode&&m.parentNode.removeChild(m);let y=document.createElementNS("http://www.w3.org/2000/svg","desc");y.innerHTML=n,f.prepend(y)}if(typeof u<"u"){let m=f.querySelector("title");if(m!=null&&m.parentNode&&m.parentNode.removeChild(m),u){let y=document.createElementNS("http://www.w3.org/2000/svg","title");y.innerHTML=u,f.prepend(y)}}return f}catch(o){return i(o)}}l(Ge,"getNode");function $e(t,e){return e?e(t):t}l($e,"processSVG");function se(t,e){let{baseURL:r="",hash:n,uniquifyIDs:i}=e,c=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"],u=l((s,o)=>a.includes(s)&&(o?!o.includes("#"):!1),"isDataValue");return i&&[...t.children].forEach(s=>{var o;if((o=s.attributes)!=null&&o.length){let g=Object.values(s.attributes).map(f=>{let m=f,y=/url\((.*?)\)/.exec(f.value);return y!=null&&y[1]&&(m.value=f.value.replace(y[0],"url(".concat(r).concat(y[1],"__").concat(n,")"))),m});c.forEach(f=>{let m=g.find(y=>y.name===f);m&&!u(f,m.value)&&(m.value="".concat(m.value,"__").concat(n))})}return s.children.length?se(s,e):s}),t}l(se,"updateSVGAttributes");var R;function _e(t){let{cacheRequests:e=!0,children:r=null,description:n,fetchOptions:i,innerRef:c,loader:a=null,onError:u,onLoad:s,src:o,title:g,uniqueHash:f}=t,[m,y]=Ne((p,k)=>h(h({},p),k),{content:"",element:null,isCached:e&&R.isCached(t.src),status:d.IDLE}),{content:$,element:_,isCached:B,status:S}=m,w=oe(t),C=oe(m),ge=q(f!=null?f:He(8)),P=q(!1),W=q(!1),x=I(p=>{P.current&&(y({status:p.message==="Browser does not support SVG"?d.UNSUPPORTED:d.FAILED}),u==null||u(p))},[u]),T=I((p,k=!1)=>{P.current&&y({content:p,isCached:k,status:d.LOADED})},[]),X=I(async()=>{let p=await ae(o,i);T(p)},[i,T,o]),A=I(()=>{try{let p=Ge(v(h({},t),{handleError:x,hash:ge.current,content:$})),k=H(p);if(!k||!Re(k))throw new Error("Could not convert the src to a React element");y({element:k,status:d.READY})}catch(p){x(p)}},[$,x,t]),Y=I(async()=>{let p=new RegExp("^data:image\\/svg[^,]*?(;base64)?,(.*)","u").exec(o),k;if(p?k=p[1]?window.atob(p[2]):decodeURIComponent(p[2]):o.includes("<svg")&&(k=o),k){T(k);return}try{if(e){let V=await R.get(o,i);T(V,!0)}else await X()}catch(V){x(V)}},[e,X,i,x,T,o]),F=I(async()=>{P.current&&y({content:"",element:null,isCached:!1,status:d.LOADING})},[]);D(()=>{if(P.current=!0,!(!O()||W.current)){try{if(S===d.IDLE){if(!Oe())throw new Error("Browser does not support SVG");if(!o)throw new Error("Missing src");F()}}catch(p){x(p)}return W.current=!0,()=>{P.current=!1}}},[]),D(()=>{if(!(!O()||!w)&&w.src!==o){if(!o){x(new Error("Missing src"));return}F()}},[x,F,w,o]),D(()=>{S===d.LOADED&&A()},[S,A]),D(()=>{!O()||!w||w.src!==o||(w.title!==g||w.description!==n)&&A()},[n,A,w,o,g]),D(()=>{if(C)switch(S){case d.LOADING:{C.status!==d.LOADING&&Y();break}case d.LOADED:{C.status!==d.LOADED&&A();break}case d.READY:{C.status!==d.READY&&(s==null||s(o,B));break}}},[Y,A,B,s,C,o,S]);let ye=Me(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return O()?_?De(_,h({ref:c},ye)):[d.UNSUPPORTED,d.FAILED].includes(S)?r:a:a}l(_e,"ReactInlineSVG");function ce(t){R||(R=new Fe);let{loader:e}=t,[r,n]=Ce(R.isReady);return D(()=>{r||R.onReady(()=>{n(!0)})},[r]),r?Ie.createElement(_e,h({},t)):e}l(ce,"InlineSVG");import{createElement as Be}from"react";import{jsx as U,jsxs as le}from"react/jsx-runtime";var ue=l(({listId:t,index:e,locations:r,props:n,onClick:i,item:c})=>{var g;let{ref:a}=Q(t,e,()=>i==null?void 0:i(r[e])),{ref:u}=Z("locationId",r[e].id),s=r[e].logo,o=(g=r[e].categories[0])==null?void 0:g.icon;return U("li",v(h({},E({className:"location-list-item-wrapper",role:"button",onClick:l(()=>i==null?void 0:i(r[e]),"onClick"),ref:K(a,u)},n==null?void 0:n.listItemWrapper)),{id:"".concat(t!=null?t:"location-list","-").concat(r[e].id),children:c?Be(c,{location:r[e]}):le("div",v(h({},E({className:"location-list-item-content"},n==null?void 0:n.listItemContent)),{children:[(s||o)&&le("div",v(h({},E({className:"location-list-item-image"},n==null?void 0:n.listItemImage)),{children:[s&&U("img",{className:L("location-list-item-image-img"),src:s,alt:r[e].name}),o&&!s&&U(ce,{className:L("location-list-item-image-svg"),src:o})]})),U("span",v(h({},E({className:"location-list-item-name"},n==null?void 0:n.listItemName)),{children:r[e].name}))]}))}))},"LocationListItem");import{forwardRef as de}from"react";import{jsx as G}from"react/jsx-runtime";var he=l(({index:t,style:e,data:r})=>{var n,i,c;return G(ue,v(h({index:t},r),{props:v(h({},r.props),{listItemWrapper:h({style:h(h({},e),(i=(n=r.props)==null?void 0:n.listItemWrapper)==null?void 0:i.style)},(c=r.props)==null?void 0:c.listItemWrapper)})}))},"LocationListItemRenderer"),me=de((t,e)=>G("div",h({ref:e,tabIndex:-1},t))),fe=de((t,e)=>G("ul",v(h({ref:e,className:L("location-list-inner")},t),{style:h({display:"block"},t.style)})));import{jsx as pe}from"react/jsx-runtime";var Rt=l(({id:t,locations:e=[],onLocationSelected:r,maxHeight:n,item:i,itemSize:c=40,props:a})=>{var g,f;let{ref:u}=ee(t),s=Xe(()=>{let m=e.length*c;return n==null?Math.min(m,window.innerHeight*.8):Math.min(m,n)},[n,e,c]),o=Ye(e);return We(()=>{o.current=e},[e]),pe("div",v(h({},E({className:"location-list-wrapper",style:{height:"100vh",maxHeight:"".concat(s,"px")}},a==null?void 0:a.wrapper)),{role:"listbox",id:t,children:pe(J,v(h({ref:u,className:L("location-list",(g=a==null?void 0:a.list)==null?void 0:g.className),height:s,width:"100%",layout:"vertical",itemSize:c,itemCount:e.length,outerElementType:me,itemData:{locations:e,props:a,onClick:r,listId:t,item:i},innerElementType:fe},(f=a==null?void 0:a.list)!=null?f:{}),{children:he}))}))},"LocationList");export{Rt as a};
|
|
1
|
+
import{a as J,d as Q,e as ee}from"./chunk-X4H4NHCG.js";import{a as Z}from"./chunk-EXNC2MTG.js";import{c as L,d as K,e as E}from"./chunk-4BQQ5BSR.js";import{a as h,b as v,c as l,d as j,f as b}from"./chunk-TGLANWSS.js";import{useEffect as We,useMemo as Xe,useRef as Ye}from"react";import Ie,{cloneElement as De,isValidElement as Re,useCallback as I,useEffect as D,useReducer as Ne,useRef as q,useState as Ce}from"react";import*as re from"react";var ve=l(t=>typeof t!="string"?{}:t.split(/ ?; ?/).reduce((e,r)=>{let[n,i]=r.split(/ ?: ?/).map((c,a)=>a===0?c.replace(/\s+/g,""):c.trim());if(n&&i){let c=n.replace(/(\w)-(\w)/g,(u,s,o)=>"".concat(s).concat(o.toUpperCase())),a=i.trim();Number.isNaN(Number(i))||(a=Number(i)),e[n.startsWith("-")?n:c]=a}return e},{}),"styleToObject");function ke(t=6){let e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="";for(let n=t;n>0;--n)r+=e[Math.round(Math.random()*(e.length-1))];return r}l(ke,"randomString");var we=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],te={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function xe(t,e){var a,u;let c=e,{key:r,level:n}=c,i=j(c,["key","level"]);switch(t.nodeType){case 1:return re.createElement(Le(t.nodeName),be(t,r),ne(t.childNodes,n,i));case 3:{let s=(u=(a=t.nodeValue)==null?void 0:a.toString())!=null?u:"";if(!i.allowWhiteSpaces&&/^\s+$/.test(s)&&!/[\u00A0\u202F]/.test(s))return null;if(!t.parentNode)return s;let o=t.parentNode.nodeName.toLowerCase();return we.includes(o)?(/\S/.test(s)&&console.warn("A textNode is not allowed inside '".concat(o,"'. Your text \"").concat(s,'" will be ignored')),null):s}case 8:return null;case 11:return ne(t.childNodes,n,e);default:return null}}l(xe,"getReactNode");function be(t,e){let r={key:e};if(t instanceof Element){let n=t.getAttribute("class");n&&(r.className=n),[...t.attributes].forEach(i=>{switch(i.name){case"class":break;case"style":r[i.name]=ve(i.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":r[te[i.name]||i.name]=!0;break;default:r[te[i.name]||i.name]=i.value}})}return r}l(be,"parseAttributes");function ne(t,e,r){let n=[...t].map((i,c)=>M(i,v(h({},r),{index:c,level:e+1}))).filter(Boolean);return n.length?n:null}l(ne,"parseChildren");function Le(t){return/[a-z]+[A-Z]+[a-z]+/.test(t)?t:t.toLowerCase()}l(Le,"parseName");function H(t,e={}){return typeof t=="string"?Ee(t,e):t instanceof Node?M(t,e):null}l(H,"convert");function M(t,e={}){if(!t||!(t instanceof Node))return null;let{actions:r=[],index:n=0,level:i=0,randomKey:c}=e,a=t,u="".concat(i,"-").concat(n),s=[];return c&&i===0&&(u="".concat(ke(),"-").concat(u)),Array.isArray(r)&&r.forEach(o=>{o.condition(a,u,i)&&(typeof o.pre=="function"&&(a=o.pre(a,u,i),a instanceof Node||(a=t,b.env.NODE_ENV!=="production"&&console.warn("The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)"))),typeof o.post=="function"&&s.push(o.post(a,u,i)))}),s.length?s:xe(a,h({key:u,level:i},e))}l(M,"convertFromNode");function Ee(t,e={}){if(!t||typeof t!="string")return null;let{includeAllNodes:r=!1,nodeOnly:n=!1,selector:i="body > *",type:c="text/html"}=e;try{let u=new DOMParser().parseFromString(t,c);if(r){let{childNodes:o}=u.body;return n?o:[...o].map(g=>M(g,e))}let s=u.querySelector(i)||u.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return n?s:M(s,e)}catch(a){b.env.NODE_ENV!=="production"&&console.error(a)}return null}l(Ee,"convertFromString");import{useEffect as Ve,useRef as qe}from"react";var Se=Object.defineProperty,Ae=l((t,e,r)=>e in t?Se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),z=l((t,e,r)=>Ae(t,typeof e!="symbol"?e+"":e,r),"__publicField"),ie="react-inlinesvg",Pe=10,d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function Te(t){return t[Math.floor(Math.random()*t.length)]}l(Te,"randomCharacter");function O(){var t;return!!(typeof window<"u"&&((t=window.document)!=null&&t.createElement))}l(O,"canUseDOM");function Oe(){return Ue()&&typeof window<"u"&&window!==null}l(Oe,"isSupportedEnvironment");function Me(t,...e){let r={};for(let n in t)({}).hasOwnProperty.call(t,n)&&(e.includes(n)||(r[n]=t[n]));return r}l(Me,"omit");function He(t){let e="abcdefghijklmnopqrstuvwxyz",n="".concat(e).concat(e.toUpperCase()).concat("1234567890"),i="";for(let c=0;c<t;c++)i+=Te(n);return i}l(He,"randomString");async function ae(t,e){let r=await fetch(t,e),n=r.headers.get("content-type"),[i]=(n!=null?n:"").split(/ ?; ?/);if(r.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some(c=>i.includes(c)))throw new Error("Content type isn't valid: ".concat(i));return r.text()}l(ae,"request");function ze(t=1){return new Promise(e=>{setTimeout(e,t*1e3)})}l(ze,"sleep");function Ue(){if(!document)return!1;let t=document.createElement("div");t.innerHTML="<svg />";let e=t.firstChild;return!!e&&e.namespaceURI==="http://www.w3.org/2000/svg"}l(Ue,"supportsInlineSVG");var N,Fe=(N=class{constructor(){var n;z(this,"cacheApi"),z(this,"cacheStore"),z(this,"subscribers",[]),z(this,"isReady",!1),this.cacheStore=new Map;let e=ie,r=!1;O()&&(e=(n=window.REACT_INLINESVG_CACHE_NAME)!=null?n:ie,r=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),r?caches.open(e).then(i=>{this.cacheApi=i}).catch(i=>{console.error("Failed to open cache: ".concat(i.message)),this.cacheApi=void 0}).finally(()=>{this.isReady=!0;let i=[...this.subscribers];this.subscribers.length=0,i.forEach(c=>{try{c()}catch(a){console.error("Error in CacheStore subscriber callback: ".concat(a.message))}})}):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,r){var n,i;return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,r):this.fetchAndAddToInternalCache(e,r)),(i=(n=this.cacheStore.get(e))==null?void 0:n.content)!=null?i:""}set(e,r){this.cacheStore.set(e,r)}isCached(e){var r;return((r=this.cacheStore.get(e))==null?void 0:r.status)===d.LOADED}async fetchAndAddToInternalCache(e,r){let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToInternalCache(e,r)});return}if(!(n!=null&&n.content)){this.cacheStore.set(e,{content:"",status:d.LOADING});try{let i=await ae(e,r);this.cacheStore.set(e,{content:i,status:d.LOADED})}catch(i){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),i}}}async fetchAndAddToPersistentCache(e,r){var c,a,u,s;let n=this.cacheStore.get(e);if((n==null?void 0:n.status)===d.LOADED)return;if((n==null?void 0:n.status)===d.LOADING){await this.handleLoading(e,async()=>{this.cacheStore.set(e,{content:"",status:d.IDLE}),await this.fetchAndAddToPersistentCache(e,r)});return}this.cacheStore.set(e,{content:"",status:d.LOADING});let i=await((c=this.cacheApi)==null?void 0:c.match(e));if(i){let o=await i.text();this.cacheStore.set(e,{content:o,status:d.LOADED});return}try{await((a=this.cacheApi)==null?void 0:a.add(new Request(e,r)));let o=await((u=this.cacheApi)==null?void 0:u.match(e)),g=(s=await(o==null?void 0:o.text()))!=null?s:"";this.cacheStore.set(e,{content:g,status:d.LOADED})}catch(o){throw this.cacheStore.set(e,{content:"",status:d.FAILED}),o}}async handleLoading(e,r){var n;for(let i=0;i<Pe;i++){if(((n=this.cacheStore.get(e))==null?void 0:n.status)!==d.LOADING)return;await ze(.1)}await r()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map(([e,r])=>({[e]:r}))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){let e=await this.cacheApi.keys();await Promise.allSettled(e.map(r=>this.cacheApi.delete(r)))}this.cacheStore.clear()}},l(N,"CacheStore"),N);function oe(t){let e=qe(void 0);return Ve(()=>{e.current=t}),e.current}l(oe,"usePrevious");function Ge(t){let{baseURL:e,content:r,description:n,handleError:i,hash:c,preProcessor:a,title:u,uniquifyIDs:s=!1}=t;try{let o=$e(r,a),g=H(o,{nodeOnly:!0});if(!g||!(g instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");let f=se(g,{baseURL:e,hash:c,uniquifyIDs:s});if(n){let m=f.querySelector("desc");m!=null&&m.parentNode&&m.parentNode.removeChild(m);let y=document.createElementNS("http://www.w3.org/2000/svg","desc");y.innerHTML=n,f.prepend(y)}if(typeof u<"u"){let m=f.querySelector("title");if(m!=null&&m.parentNode&&m.parentNode.removeChild(m),u){let y=document.createElementNS("http://www.w3.org/2000/svg","title");y.innerHTML=u,f.prepend(y)}}return f}catch(o){return i(o)}}l(Ge,"getNode");function $e(t,e){return e?e(t):t}l($e,"processSVG");function se(t,e){let{baseURL:r="",hash:n,uniquifyIDs:i}=e,c=["id","href","xlink:href","xlink:role","xlink:arcrole"],a=["href","xlink:href"],u=l((s,o)=>a.includes(s)&&(o?!o.includes("#"):!1),"isDataValue");return i&&[...t.children].forEach(s=>{var o;if((o=s.attributes)!=null&&o.length){let g=Object.values(s.attributes).map(f=>{let m=f,y=/url\((.*?)\)/.exec(f.value);return y!=null&&y[1]&&(m.value=f.value.replace(y[0],"url(".concat(r).concat(y[1],"__").concat(n,")"))),m});c.forEach(f=>{let m=g.find(y=>y.name===f);m&&!u(f,m.value)&&(m.value="".concat(m.value,"__").concat(n))})}return s.children.length?se(s,e):s}),t}l(se,"updateSVGAttributes");var R;function _e(t){let{cacheRequests:e=!0,children:r=null,description:n,fetchOptions:i,innerRef:c,loader:a=null,onError:u,onLoad:s,src:o,title:g,uniqueHash:f}=t,[m,y]=Ne((p,k)=>h(h({},p),k),{content:"",element:null,isCached:e&&R.isCached(t.src),status:d.IDLE}),{content:$,element:_,isCached:B,status:S}=m,w=oe(t),C=oe(m),ge=q(f!=null?f:He(8)),P=q(!1),W=q(!1),x=I(p=>{P.current&&(y({status:p.message==="Browser does not support SVG"?d.UNSUPPORTED:d.FAILED}),u==null||u(p))},[u]),T=I((p,k=!1)=>{P.current&&y({content:p,isCached:k,status:d.LOADED})},[]),X=I(async()=>{let p=await ae(o,i);T(p)},[i,T,o]),A=I(()=>{try{let p=Ge(v(h({},t),{handleError:x,hash:ge.current,content:$})),k=H(p);if(!k||!Re(k))throw new Error("Could not convert the src to a React element");y({element:k,status:d.READY})}catch(p){x(p)}},[$,x,t]),Y=I(async()=>{let p=new RegExp("^data:image\\/svg[^,]*?(;base64)?,(.*)","u").exec(o),k;if(p?k=p[1]?window.atob(p[2]):decodeURIComponent(p[2]):o.includes("<svg")&&(k=o),k){T(k);return}try{if(e){let V=await R.get(o,i);T(V,!0)}else await X()}catch(V){x(V)}},[e,X,i,x,T,o]),F=I(async()=>{P.current&&y({content:"",element:null,isCached:!1,status:d.LOADING})},[]);D(()=>{if(P.current=!0,!(!O()||W.current)){try{if(S===d.IDLE){if(!Oe())throw new Error("Browser does not support SVG");if(!o)throw new Error("Missing src");F()}}catch(p){x(p)}return W.current=!0,()=>{P.current=!1}}},[]),D(()=>{if(!(!O()||!w)&&w.src!==o){if(!o){x(new Error("Missing src"));return}F()}},[x,F,w,o]),D(()=>{S===d.LOADED&&A()},[S,A]),D(()=>{!O()||!w||w.src!==o||(w.title!==g||w.description!==n)&&A()},[n,A,w,o,g]),D(()=>{if(C)switch(S){case d.LOADING:{C.status!==d.LOADING&&Y();break}case d.LOADED:{C.status!==d.LOADED&&A();break}case d.READY:{C.status!==d.READY&&(s==null||s(o,B));break}}},[Y,A,B,s,C,o,S]);let ye=Me(t,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return O()?_?De(_,h({ref:c},ye)):[d.UNSUPPORTED,d.FAILED].includes(S)?r:a:a}l(_e,"ReactInlineSVG");function ce(t){R||(R=new Fe);let{loader:e}=t,[r,n]=Ce(R.isReady);return D(()=>{r||R.onReady(()=>{n(!0)})},[r]),r?Ie.createElement(_e,h({},t)):e}l(ce,"InlineSVG");import{createElement as Be}from"react";import{jsx as U,jsxs as le}from"react/jsx-runtime";var ue=l(({listId:t,index:e,locations:r,props:n,onClick:i,item:c})=>{var g;let{ref:a}=Q(t,e,()=>i==null?void 0:i(r[e])),{ref:u}=Z("locationId",r[e].id),s=r[e].logo,o=(g=r[e].categories[0])==null?void 0:g.icon;return U("li",v(h({},E({className:"location-list-item-wrapper",role:"button",onClick:l(()=>i==null?void 0:i(r[e]),"onClick"),ref:K(a,u)},n==null?void 0:n.listItemWrapper)),{id:"".concat(t!=null?t:"location-list","-").concat(r[e].id),children:c?Be(c,{location:r[e]}):le("div",v(h({},E({className:"location-list-item-content"},n==null?void 0:n.listItemContent)),{children:[(s||o)&&le("div",v(h({},E({className:"location-list-item-image"},n==null?void 0:n.listItemImage)),{children:[s&&U("img",{className:L("location-list-item-image-img"),src:s,alt:r[e].name}),o&&!s&&U(ce,{className:L("location-list-item-image-svg"),src:o})]})),U("span",v(h({},E({className:"location-list-item-name"},n==null?void 0:n.listItemName)),{children:r[e].name}))]}))}))},"LocationListItem");import{forwardRef as de}from"react";import{jsx as G}from"react/jsx-runtime";var he=l(({index:t,style:e,data:r})=>{var n,i,c;return G(ue,v(h({index:t},r),{props:v(h({},r.props),{listItemWrapper:h({style:h(h({},e),(i=(n=r.props)==null?void 0:n.listItemWrapper)==null?void 0:i.style)},(c=r.props)==null?void 0:c.listItemWrapper)})}))},"LocationListItemRenderer"),me=de((t,e)=>G("div",h({ref:e,tabIndex:-1},t))),fe=de((t,e)=>G("ul",v(h({ref:e,className:L("location-list-inner")},t),{style:h({display:"block"},t.style)})));import{jsx as pe}from"react/jsx-runtime";var Rt=l(({id:t,locations:e=[],onLocationSelected:r,maxHeight:n,item:i,itemSize:c=40,props:a})=>{var g,f;let{ref:u}=ee(t),s=Xe(()=>{let m=e.length*c;return n==null?Math.min(m,window.innerHeight*.8):Math.min(m,n)},[n,e,c]),o=Ye(e);return We(()=>{o.current=e},[e]),pe("div",v(h({},E({className:"location-list-wrapper",style:{height:"100vh",maxHeight:"".concat(s,"px")}},a==null?void 0:a.wrapper)),{role:"listbox",id:t,children:pe(J,v(h({ref:u,className:L("location-list",(g=a==null?void 0:a.list)==null?void 0:g.className),height:s,width:"100%",layout:"vertical",itemSize:c,itemCount:e.length,outerElementType:me,itemData:{locations:e,props:a,onClick:r,listId:t,item:i},innerElementType:fe},(f=a==null?void 0:a.list)!=null?f:{}),{children:he}))}))},"LocationList");export{Rt as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./chunk-
|
|
1
|
+
import{c as o}from"./chunk-TGLANWSS.js";import{useCallback as i,useState as a}from"react";var m=o(({value:e,defaultValue:l,onChange:t})=>{let[c,s]=a(l),n=e!==void 0,u=i(r=>{s(r),t==null||t(r)},[n,t]);return{value:n?e:c,onChange:u,isControlled:n}},"useUncontrolled");import{useEffect as T}from"react";var k=o((e,l)=>{T(()=>{let t=o(c=>{let s=e==null?void 0:e.current,n=c.target;!s||s.contains(n)||l(c)},"listener");return document.addEventListener("click",t),()=>{document.removeEventListener("click",t)}},[e,l])},"useOutsideClick");export{m as a,k as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-KFGJTGSM.js";import{b as A,c as M}from"./chunk-X4H4NHCG.js";import{a as z}from"./chunk-ISQGOUUJ.js";import{a as N}from"./chunk-O7VAO6M6.js";import{a as B}from"./chunk-EXNC2MTG.js";import{c as C,d as w,e as y}from"./chunk-4BQQ5BSR.js";import{a as h,b as m,c as o}from"./chunk-TGLANWSS.js";import{useRef as ne,useState as oe}from"react";import{useState as F,useRef as V,useCallback as O,useMemo as ee,useEffect as te}from"react";var W=o((r,l,t={})=>{var g,R;let[a,n]=F(!1),[i,c]=F([]),d=V((g=t.defaultResults)!=null?g:[]),u=O(e=>{d.current=e,c(e)},[c]),L=ee(()=>{var e;return r.length===0?(e=t.defaultResults)!=null?e:[]:a?d.current:i},[i,t.defaultResults,r,a]),s=O(M(e=>l(e).then(u).catch(()=>u([])).finally(()=>n(!1)),(R=t.searchDebounce)!=null?R:0),[l,t.searchDebounce,u,n]);return te(()=>(r.length>0&&(n(!0),s(r)),()=>{s.cancel()}),[r,s]),{results:L,isSearching:a}},"useSearch");import{useEffect as re,useState as j}from"react";var K=o(()=>{let[r,l]=j(null),[t,a]=j(null);return re(()=>{if(r===null)return;let n=new ResizeObserver(i=>{i.forEach(c=>{a({width:c.contentRect.width,height:c.contentRect.height})})});return n.observe(r),()=>{n.unobserve(r),n.disconnect()}},[r]),{ref:l,width:t==null?void 0:t.width,height:t==null?void 0:t.height}},"useSize");import{jsx as T,jsxs as G}from"react/jsx-runtime";var U="mappedin__search-location-list",ye=o(({value:r,onChange:l,onLocationSelected:t,placeholder:a="Search...",maxHeight:n,defaultContent:i,defaultResults:c=[],noResultsContent:d,searchFn:u,searchDebounce:L=50,resultsVisible:s,item:g,itemSize:R,props:e})=>{var D,H,I;let{value:p,onChange:J}=N({value:r,defaultValue:r!=null?r:"",onChange:l}),S=ne(null),[Q,v]=oe(!1),P=s!=null?s:Q,{ref:X,height:x}=K(),{results:f,isSearching:Y}=W(p,u,{defaultResults:i!=null?[]:c,searchDebounce:L}),{ref:Z,activeItemId:b}=A(U,{itemCount:f.length,resetActiveItemOnBlur:!0}),{ref:$}=B("open",P),{ref:_}=B("highlightedLocationId",b!=null?b:"none");return G("div",m(h({},y({className:C("search-wrapper",P&&f.length>0?"results-visible":"results-hidden",f.length===0?"no-results":""),ref:w($,_),onFocus:o(()=>{S.current&&clearTimeout(S.current),v(!0)},"onFocus"),onBlur:o(()=>{S.current=setTimeout(()=>v(!1),250)},"onBlur")},e==null?void 0:e.wrapper)),{children:[T(z,{value:p,placeholder:a,onChange:J,props:m(h({},e==null?void 0:e.searchBar),{input:m(h({},(D=e==null?void 0:e.searchBar)==null?void 0:D.input),{ref:w(Z,(I=(H=e==null?void 0:e.searchBar)==null?void 0:H.input)==null?void 0:I.ref)})})}),T("div",m(h({},y({className:"search-content-wrapper",style:{height:x!=null?"100vh":"auto",maxHeight:x}},e==null?void 0:e.contentWrapper)),{children:G("div",{className:C("content-sizer"),ref:X,children:[T(k,{id:U,locations:P?f:[],onLocationSelected:q=>{t==null||t(q),v(!1)},maxHeight:n,props:e==null?void 0:e.locationList,item:g,itemSize:R}),p.length===0&&P&&i,p.length>0&&f.length===0&&!Y&&d]})}))]}))},"Search");export{ye as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty,t=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;var _=(e,n,a)=>n in e?c(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,N=(e,n)=>{for(var a in n||(n={}))i.call(n,a)&&_(e,a,n[a]);if(p)for(var a of p(n))r.call(n,a)&&_(e,a,n[a]);return e},b=(e,n)=>t(e,v(n)),d=(e,n)=>c(e,"name",{value:n,configurable:!0});var g=(e,n)=>{var a={};for(var o in e)i.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&p)for(var o of p(e))n.indexOf(o)<0&&r.call(e,o)&&(a[o]=e[o]);return a};var k=(e,n,a)=>_(e,typeof n!="symbol"?n+"":n,a);var u={env:{NODE_ENV:"production",npm_package_version:"6.
|
|
1
|
+
var c=Object.defineProperty,t=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;var _=(e,n,a)=>n in e?c(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,N=(e,n)=>{for(var a in n||(n={}))i.call(n,a)&&_(e,a,n[a]);if(p)for(var a of p(n))r.call(n,a)&&_(e,a,n[a]);return e},b=(e,n)=>t(e,v(n)),d=(e,n)=>c(e,"name",{value:n,configurable:!0});var g=(e,n)=>{var a={};for(var o in e)i.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&p)for(var o of p(e))n.indexOf(o)<0&&r.call(e,o)&&(a[o]=e[o]);return a};var k=(e,n,a)=>_(e,typeof n!="symbol"?n+"":n,a);var u={env:{NODE_ENV:"production",npm_package_version:"6.10.0-beta.0"}};export{N as a,b,d as c,g as d,k as e,u as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as x,d as H}from"./chunk-
|
|
1
|
+
import{b as x,d as H}from"./chunk-X4H4NHCG.js";import{a as y,b as w}from"./chunk-O7VAO6M6.js";import{a as v}from"./chunk-EXNC2MTG.js";import{c as C,d as N,e as l}from"./chunk-4BQQ5BSR.js";import{a as r,b as n,c as f}from"./chunk-TGLANWSS.js";import{jsx as M,jsxs as G}from"react/jsx-runtime";var S=f(()=>G("svg",n(r({},l({className:"icon--chevron-down",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),{children:[M("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M("path",{d:"M6 9l6 6l6 -6"})]})),"ChevronDown");import{useMemo as E,useRef as D,useState as Q}from"react";import{forwardRef as J}from"react";import{jsx as A}from"react/jsx-runtime";var O=f(({floor:t,index:m,current:e,props:o,onClick:s})=>{let{ref:a}=H("mappedin__floor-selector",m,()=>s==null?void 0:s());return A("li",n(r({},l({role:"button",className:C("floor-selector-floor-item",e?"floor-selector-current-floor-in-list":""),ref:a},o==null?void 0:o.listItem)),{onClick:s,id:"mappedin__floor-selector-".concat(t.id),children:A("span",n(r({},l({className:"floor-selector-floor-item-name"},o==null?void 0:o.listItemName)),{children:t.name}))}))},"FloorSelectorListItem");import{jsx as T}from"react/jsx-runtime";var k=J(({floors:t,currentFloor:m,props:e,onFloorSelected:o},s)=>T("ul",n(r({},l({className:"floor-selector-floors-list"},e==null?void 0:e.list)),{ref:s,children:t==null?void 0:t.map((a,c)=>T(O,{index:c,floor:a,current:a===m,onClick:()=>o==null?void 0:o(a),props:e},a.id))})));import{jsx as d,jsxs as B}from"react/jsx-runtime";var Ce=f(({currentFloor:t,floors:m=[],props:e,onFloorSelected:o,isOpen:s,onOpen:a})=>{var b,R,g,F;let{value:c,onChange:p}=y({value:s,defaultValue:s!=null?s:!1,onChange:a}),{ref:U}=v("isOpen",c),u=D(null);w(u,()=>{var i;c&&(p(!1),(i=u.current)==null||i.blur())});let I=D(null),{ref:W,activeItemId:P}=x("mappedin__floor-selector",{itemCount:m.length,resetActiveItemOnBlur:!0}),{ref:K}=v("currentFloorId",(b=t==null?void 0:t.id)!=null?b:"none"),{ref:z}=v("highlightedFloorId",P!=null?P:"none"),V=E(()=>[...m].sort((i,q)=>q.elevation-i.elevation),[m]),[h,_]=Q(null),$=E(()=>h==null?0:c?h.clientHeight:0,[h,c]);return B("div",n(r({},l({className:"floor-selector-wrapper",ref:N(u,W,U,K,z),tabIndex:0,onFocus:f(i=>{i.target===u.current&&i.relatedTarget!==I.current&&p(!0)},"onFocus")},e==null?void 0:e.wrapper)),{children:[B("button",n(r({},l({className:"floor-selector-button",ref:I,onClick:f(()=>{var i;p(!c),(i=u.current)==null||i.focus()},"onClick"),tabIndex:-1},e==null?void 0:e.button)),{children:[d("span",n(r({},l({className:"floor-selector-current-floor"},e==null?void 0:e.currentName)),{children:(F=(g=t==null?void 0:t.name)!=null?g:(R=m[0])==null?void 0:R.name)!=null?F:""})),d("div",n(r({},l({className:"floor-selector-chevron"},e==null?void 0:e.chevron)),{children:d(S,{})}))]})),d("div",n(r({},l({className:"floor-selector-list-wrapper",style:{height:"100vh",maxHeight:$}},e==null?void 0:e.listWrapper)),{children:c&&d(k,{ref:_,floors:V,currentFloor:t,props:e,onFloorSelected:i=>{p(!1),o==null||o(i)}})}))]}))},"FloorSelector");export{Ce as a};
|