@yext/pages-components 1.2.4 → 2.0.1
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/dist/chunk-FFY3Y364.js +1 -0
- package/dist/debugger-3ZMPVPKH.js +1 -0
- package/dist/debugger-GQLPSISB.css +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +15 -60
- package/dist/index.js +4 -57
- package/package.json +29 -55
- package/dist/debugger-BAemb18m.js +0 -316
- package/dist/debugger-DjyiKj4B.cjs +0 -1
- package/dist/index-3y1PqoZ5.js +0 -21016
- package/dist/index-B7cF4XII.js +0 -6744
- package/dist/index-BE0QKqrR.cjs +0 -61
- package/dist/index-O3Mt_gby.cjs +0 -14
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -2009
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {isDeno,isBrowser,isNode}from'browser-or-node';var e=class{name;isServerSide;version;constructor(){isDeno?(this.name="deno",this.version="",isBrowser&&(this.version=window.Deno?.version.deno||""),this.isServerSide=true):isNode?(this.name="node",this.version=process.versions.node,this.isServerSide=true):isBrowser?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=false):(this.name="unknown",this.version="",this.isServerSide=false);}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return +this.version.split(".")[0]}},d=()=>new e;var u=(...n)=>{if(typeof window<"u"){if(window.IS_PRODUCTION)return true;let r=window.location?.hostname;return n?.some(o=>o?.includes(r))}return false};export{d as a,u as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-FFY3Y364.js';import {useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import k from'classnames';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function B(){return a().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=true,createPortal(jsx(S,{}),document.body))}var M=(e,o)=>{let n=e.dataset.yaAction,t=e.dataset.yaScopeoverride,r=e.dataset.yaEventname,i=t||o;return {action:n,originalEventName:i?`${i}_${r}`:r,scope:i}},Y=(e,o)=>{let n=[],t=e;for(;t?.parentElement;)t=t.parentElement.closest(o),t&&n.push(t);return n},f={},H="YA_NO_SCOPE",N=(e,o,n,t)=>{f.hasOwnProperty(e)?f[e].events.map(r=>r.el).includes(t)||(f[e].events=[...f[e].events,{eventData:o,el:t}]):f[e]={scopeEl:n||t,events:[{eventData:o,el:t}]};};function S(){let[e,o]=useState(),[n,t]=useState([]),[r,i]=useState(false),a=s=>{o(e===s?void 0:s);};return useEffect(()=>{let s=null,u=()=>{s&&s.abort(),s=new AbortController;let l=s.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((d,x)=>{let m=d.closest("[data-ya-scope]"),h=m?.dataset.yaScope,p=M(d,h);d.addEventListener("mouseenter",()=>{t([{elem:d,key:`${p.originalEventName}_${x}`,action:p.action,originalEventName:p.originalEventName,scope:p.scope}]);},{signal:l}),d.addEventListener("mouseleave",()=>{t([]);},{signal:l});let y=d.dataset.yaScopeoverride;y?N(y,p,m,d):[h,...Y(d,"[data-ya-scope]").map(T=>T.dataset.yaScope)].forEach(T=>{N(T||H,p,m,d);});}),i(true);};u();let g=new MutationObserver(u);return g.observe(document,{childList:true,subtree:true}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),s?.abort();}},[]),r?jsxs(Fragment,{children:[jsxs("div",{className:"analytics-debugger",children:[jsxs("div",{className:"analytics-debugger-toggles",children:[jsx("button",{className:k("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>a("Events"),children:"Events"}),jsx("button",{className:k("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>a("Scopes"),children:"Scopes"})]}),e&&jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?jsx(I,{data:f,setTooltips:t}):jsx(P,{data:f,setTooltips:t})})]}),jsx($,{tooltips:n})]}):null}var A=()=>{let e={};return Object.values(f).forEach(o=>{o.events.forEach(n=>{let{originalEventName:t}=n.eventData;e[t]||(e[t]=[]),!e[t].find(r=>r.el===n.el)&&e[t].push(n);});}),e};function I(e){let{setTooltips:o}=e,[n,t]=useState([]),[r,i]=useState(""),a=(s,u)=>{n.forEach(l=>l.classList.remove("analytics-event-highlight"));let g=s.map(l=>(l.el.scrollIntoView({behavior:"smooth",block:"nearest"}),l.el.classList.add("analytics-event-highlight"),l.el));t(g),i(u),o(s.map((l,v)=>({elem:l.el,key:`${l.eventData.originalEventName}_${v}`,action:l.eventData.action,originalEventName:l.eventData.originalEventName,scope:l.eventData.scope})));};return jsxs("div",{className:"analytics-debugger-tab",children:[jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),jsx("ul",{className:"analytics-debugger-list",children:Object.entries(A()).map(([s,u],g)=>{let l=`${s}_${g}`;return jsx("li",{className:"analytics-debugger-listItem",children:jsx("button",{className:k("analytics-debugger-button",{"is-active":l===r}),onClick:()=>a(u,l),children:s})},l)})})]})}function P(e){let{data:o,setTooltips:n}=e,[t,r]=useState(""),i=a=>{let s=o[a];s.scopeEl&&(s.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),r(a),n(s.events.map((u,g)=>{let l=u.eventData;return {elem:u.el,key:`${l.originalEventName}_${g}`,action:l.action,originalEventName:l.originalEventName,scope:l.scope}})));};return jsxs("div",{className:"analytics-debugger-tab",children:[jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),jsx("ul",{className:"analytics-debugger-list",children:Object.keys(o).map((a,s)=>{if(a!==H)return jsx("li",{className:"analytics-debugger-listItem",children:jsx("button",{className:k("analytics-debugger-button",{"is-active":a===t}),onClick:()=>i(a),children:a})},a+s)})})]})}function $(e){let o=useRef({});return useEffect(()=>{if(o.current)for(let n of Object.values(o.current)){let t=Object.values(o.current).map(r=>r.el).filter(r=>r!==n.el);z(n,t),n.el.style.visibility="visible";}},[e.tooltips]),jsx(Fragment,{children:e.tooltips.map(n=>jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?o.current[n.key]={el:t,tooltip:n}:delete o.current[n.key];},children:[jsxs("span",{children:["Action: ",n.action]}),jsx("br",{}),jsxs("span",{children:["Scope: ",n.scope]}),jsx("br",{}),jsxs("span",{children:["Original Event Name: ",n.originalEventName]})]},n.key))})}function z(e,o){for(let n=0;n<9;n++){let t=W(e.tooltip.elem.getBoundingClientRect(),e.el,n);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!j(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let i=true;for(let a=0;a<o.length;a++){let s=o[a];_(e.el,s)&&(i=false);}if(i)break}}function _(e,o){let n=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,r=n+e.clientHeight,i=t+e.clientWidth,a=o.getBoundingClientRect().top+window.scrollY,s=o.getBoundingClientRect().left,u=a+o.clientHeight,g=s+o.clientWidth,l=(v,d,x,m,h,p,y,E)=>x<=h&&h<=y&&m<=p&&p<=E||x<=v&&v<=y&&m<=d&&d<=E||x<=v&&v<=y&&m<=p&&p<=E||x<=h&&h<=y&&m<=d&&d<=E;return l(t,n,s,a,i,r,g,u)||l(s,a,t,n,g,u,i,r)}function j(e,o,n,t){return e<0||n>window.innerWidth||o<0||t>document.documentElement.scrollHeight}function W(e,o,n){let t=o.clientHeight,r=o.clientWidth,i,a;switch(n){case 0:{a=window.scrollY+e.top-t+"px",i=e.left-r+"px";break}case 1:{a=window.scrollY+e.top-t+"px",i=e.left+"px";break}case 2:{a=window.scrollY+e.top-t+"px",i=e.right+"px";break}case 3:{a=window.scrollY+e.top-t+"px",i=e.right-r+"px";break}case 4:{a=window.scrollY+e.bottom+"px",i=e.left-r+"px";break}case 5:{a=window.scrollY+e.bottom+"px",i=e.left+"px";break}case 6:{a=window.scrollY+e.bottom+"px",i=e.right-r+"px";break}case 7:{a=window.scrollY+e.bottom+"px",i=e.right+"px";break}default:a=0,i=0;}return {top:a,left:i}}export{S as AnalyticsDebuggerInternal,B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes pulse{0%{background:transparent}50%{background:#00000026}to{background:transparent}}.xYextDebug{[data-ya-track]{outline:1px dashed blue;scroll-margin:32px;&.analytics-event-highlight{animation-name:pulse;animation-duration:2s;animation-iteration-count:infinite;outline:2px dashed black;padding:8px 16px}}[data-ya-scope]{outline:1px dashed green;position:relative;&:after{content:attr(data-ya-scope);top:0;left:0;color:#000;display:block;position:absolute;padding:10px;outline:1px solid #178acd;background:#00000073;color:#fff;z-index:2147483647}}.analytics-debugger{position:fixed;height:80%;top:10%;bottom:10%;right:0;transition:right .3s ease-out;color:#fff;display:flex!important;z-index:99999}.analytics-debugger-toggles{width:100px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf;margin:auto;display:flex;flex-direction:column;border-right:1px solid white}.analytics-debugger-toggle{outline:none;text-align:center;padding:10px;cursor:pointer;&.is-active{background:#178acd}&:first-child{border-top-left-radius:4px}&:last-child{border-bottom-left-radius:4px}&:not(:last-child){border-bottom:1px solid white}&:hover{background:#178acd}}.analytics-debugger-tabs{width:250px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf}.analytics-debugger-tab{display:flex;flex-direction:column;height:100%}.analytics-debugger-tab-title{background:#178acd;color:#fff;padding:20px;border-bottom:1px solid white;border-top-left-radius:4px}.analytics-debugger-list{overflow-y:auto;flex-grow:1}.analytics-debugger-listItem{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;&:not(:last-child){border-bottom:1px solid white}}.analytics-debugger-button{padding:10px 20px;text-align:left;width:100%;&.is-active{background:#178acd}&:hover:not(.is-active){background:#ffffff4d;cursor:pointer}}.analytics-debugger-tooltip{background:#178acd;border:1px solid #178acd;color:#fff;position:absolute;padding:5px 10px;border-radius:4px;font-size:12px;z-index:99998;&:hover{z-index:99999;border:1px solid black}}}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.address-line abbr{text-decoration:none}._yext-default-richtextv2-theme__ul1_13v3w_17{padding:0;margin:0 0 0 16px;list-style-type:disc;list-style-position:inside}._yext-default-richtextv2-theme__ul2_13v3w_25{padding:0;margin:0 0 0 16px;list-style-type:circle;list-style-position:inside}._yext-default-richtextv2-theme__ul3_13v3w_33{padding:0;margin:0 0 0 16px;list-style-type:square;list-style-position:inside}._yext-default-richtextv2-theme__ltr_13v3w_55{text-align:left}._yext-default-richtextv2-theme__rtl_13v3w_58{text-align:right}._yext-default-richtextv2-theme__paragraph_13v3w_61{font-size:14.67px;font-weight:400;line-height:18.67px;color:#000;margin:0;padding:3px 2px;position:relative}._yext-default-richtextv2-theme__quote_13v3w_70{margin:0 0 10px 20px;font-size:15px;color:#65676b;border-left-color:#ced0d4;border-left-width:4px;border-left-style:solid;padding-left:16px}._yext-default-richtextv2-theme__h1_13v3w_81{font-size:26.67px;font-weight:700;line-height:30.67px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h2_13v3w_89{font-size:21.33px;font-weight:700;line-height:25.33px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h3_13v3w_97{font-size:18.67px;font-weight:400;line-height:22.67px;color:#434343;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h4_13v3w_105{font-size:16px;font-weight:400;line-height:20px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h5_13v3w_113{font-size:14.67px;font-weight:400;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h6_13v3w_121{font-size:14.67px;font-weight:400;font-style:italic;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__textBold_13v3w_130{font-weight:700}._yext-default-richtextv2-theme__textItalic_13v3w_133{font-style:italic}._yext-default-richtextv2-theme__textUnderline_13v3w_136{text-decoration:underline}._yext-default-richtextv2-theme__textStrikethrough_13v3w_139{text-decoration:line-through}._yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142{text-decoration:underline line-through}._yext-default-richtextv2-theme__textSubscript_13v3w_145{font-size:.8em;vertical-align:sub!important}._yext-default-richtextv2-theme__textSuperscript_13v3w_149{font-size:.8em;vertical-align:super}._yext-default-richtextv2-theme__textCode_13v3w_153{background-color:#f0f2f5;padding:1px .25rem;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%}._yext-default-richtextv2-theme__hashtag_13v3w_159{background-color:#5890ff26;border-bottom:1px solid rgba(88,144,255,.3)}._yext-default-richtextv2-theme__link_13v3w_163{color:#216fdb;text-decoration:none}._yext-default-richtextv2-theme__link_13v3w_163:hover{text-decoration:underline;cursor:pointer}._yext-default-richtextv2-theme__code_13v3w_171{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;display:block;padding:8px 8px 8px 52px;line-height:1.53;font-size:13px;margin:8px 0;-moz-tab-size:2;tab-size:2;overflow-x:auto;position:relative}._yext-default-richtextv2-theme__code_13v3w_171:before{content:attr(data-gutter);position:absolute;background-color:#eee;left:0;top:0;border-right:1px solid #ccc;padding:8px;color:#777;white-space:pre-wrap;text-align:right;min-width:25px}._yext-default-richtextv2-theme__table_13v3w_199{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:calc(100% - 25px);margin:30px 0}._yext-default-richtextv2-theme__tableCell_13v3w_208{border:1px solid #bbb;min-width:75px;vertical-align:top;text-align:start;padding:6px 8px;position:relative;cursor:default;outline:none}._yext-default-richtextv2-theme__tableCellHeader_13v3w_218{background-color:#f2f3f5;text-align:start}._yext-default-richtextv2-theme__characterLimit_13v3w_222{display:inline;background-color:#fbb!important}._yext-default-richtextv2-theme__ol1_13v3w_226{padding:0;margin:0 0 0 16px;list-style-type:decimal;list-style-position:inside}._yext-default-richtextv2-theme__ol2_13v3w_233{padding:0;margin:0 0 0 16px;list-style-type:upper-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol3_13v3w_240{padding:0;margin:0 0 0 16px;list-style-type:lower-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol4_13v3w_247{padding:0;margin:0 0 0 16px;list-style-type:upper-roman;list-style-position:inside}._yext-default-richtextv2-theme__ol5_13v3w_254{padding:0;margin:0 0 0 16px;list-style-type:lower-roman;list-style-position:inside}._yext-default-richtextv2-theme__ul_13v3w_17{padding:0;margin:0 0 0 16px;list-style-position:inside}._yext-default-richtextv2-theme__listItem_13v3w_267{margin:0 32px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270,._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271{position:relative;margin-left:8px;margin-right:8px;padding-left:24px;padding-right:24px;list-style-type:none;outline:none}._yext-default-richtextv2-theme__listItemChecked_13v3w_270{text-decoration:line-through}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{content:"";width:16px;height:16px;top:2px;left:0;cursor:pointer;display:block;background-size:cover;position:absolute}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271._rtl_13v3w_295:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270._rtl_13v3w_295:before{left:auto;right:0}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:focus:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:focus:before{box-shadow:0 0 0 2px #a6cdfe;border-radius:2px}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before{border:1px solid #999;border-radius:2px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{border:1px solid rgb(61,135,245);border-radius:2px;background-color:#3d87f5;background-repeat:no-repeat}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:after{content:"";cursor:pointer;border-color:#fff;border-style:solid;position:absolute;display:block;top:6px;width:3px;left:7px;right:7px;height:6px;transform:rotate(45deg);border-width:0 2px 2px 0}._yext-default-richtextv2-theme__nestedListItem_13v3w_330{list-style-type:none}._yext-default-richtextv2-theme__nestedListItem_13v3w_330:before,._yext-default-richtextv2-theme__nestedListItem_13v3w_330:after{display:none}._yext-default-richtextv2-theme__tokenComment_13v3w_337{color:#708090}._yext-default-richtextv2-theme__tokenPunctuation_13v3w_340{color:#999}._yext-default-richtextv2-theme__tokenProperty_13v3w_343{color:#905}._yext-default-richtextv2-theme__tokenSelector_13v3w_346{color:#690}._yext-default-richtextv2-theme__tokenOperator_13v3w_349{color:#9a6e3a}._yext-default-richtextv2-theme__tokenAttr_13v3w_352{color:#07a}._yext-default-richtextv2-theme__tokenVariable_13v3w_355{color:#e90}._yext-default-richtextv2-theme__tokenFunction_13v3w_358{color:#dd4a68}._yext-default-richtextv2-theme__mark_13v3w_361{background:#ffd40024;border-bottom:2px solid rgba(255,212,0,.3);padding-bottom:2px}._yext-default-richtextv2-theme__markOverlap_13v3w_366{background:#ffd4004d;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__mark_13v3w_361._selected_13v3w_370{background:#ffd40080;border-bottom:2px solid rgba(255,212,0,1)}._yext-default-richtextv2-theme__markOverlap_13v3w_366._selected_13v3w_370{background:#ffd400b3;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__embedBlock_13v3w_378{-webkit-user-select:none;user-select:none}._yext-default-richtextv2-theme__embedBlockFocus_13v3w_381{outline:2px solid rgb(60,132,244)}span._yext-default-richtextv2-theme__image_13v3w_385{cursor:default;display:inline-block;position:relative;-webkit-user-select:none;user-select:none}._editor-inner_1mmqo_6{position:relative}._no-border_1mmqo_10{border:none}html{--yxt-hoursTable-col1-width: 128px;--yxt-hoursTable-col2-width: 256px}.HoursTable-row{display:flex}.HoursTable-day{flex:0 0 var(--yxt-hoursTable-col1-width)}.HoursTable-intervals{display:flex;flex-direction:column;flex:0 0 var(--yxt-hoursTable-col2-width)}@keyframes pulse{0%{background:transparent}50%{background:#00000026}to{background:transparent}}.xYextDebug [data-ya-track]{outline:1px dashed blue;scroll-margin:32px}.xYextDebug [data-ya-track].analytics-event-highlight{animation-name:pulse;animation-duration:2s;animation-iteration-count:infinite;outline:2px dashed black;padding:8px 16px}.xYextDebug [data-ya-scope]{outline:1px dashed green;position:relative}.xYextDebug [data-ya-scope]:after{content:attr(data-ya-scope);top:0;left:0;color:#000;display:block;position:absolute;padding:10px;outline:1px solid #178acd;background:#00000073;color:#fff;z-index:2147483647}.xYextDebug .analytics-debugger{position:fixed;height:80%;top:10%;bottom:10%;right:0;transition:right .3s ease-out;color:#fff;display:flex!important;z-index:99999}.xYextDebug .analytics-debugger-toggles{width:100px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf;margin:auto;display:flex;flex-direction:column;border-right:1px solid white}.xYextDebug .analytics-debugger-toggle{outline:none;text-align:center;padding:10px;cursor:pointer}.xYextDebug .analytics-debugger-toggle.is-active{background:#178acd}.xYextDebug .analytics-debugger-toggle:first-child{border-top-left-radius:4px}.xYextDebug .analytics-debugger-toggle:last-child{border-bottom-left-radius:4px}.xYextDebug .analytics-debugger-toggle:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-toggle:hover{background:#178acd}.xYextDebug .analytics-debugger-tabs{width:250px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf}.xYextDebug .analytics-debugger-tab{display:flex;flex-direction:column;height:100%}.xYextDebug .analytics-debugger-tab-title{background:#178acd;color:#fff;padding:20px;border-bottom:1px solid white;border-top-left-radius:4px}.xYextDebug .analytics-debugger-list{overflow-y:auto;flex-grow:1}.xYextDebug .analytics-debugger-listItem{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.xYextDebug .analytics-debugger-listItem:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-button{padding:10px 20px;text-align:left;width:100%}.xYextDebug .analytics-debugger-button.is-active{background:#178acd}.xYextDebug .analytics-debugger-button:hover:not(.is-active){background:#ffffff4d;cursor:pointer}.xYextDebug .analytics-debugger-tooltip{background:#178acd;border:1px solid #178acd;color:#fff;position:absolute;padding:5px 10px;border-radius:4px;font-size:12px;z-index:99998}.xYextDebug .analytics-debugger-tooltip:hover{z-index:99999;border:1px solid black}
|
|
1
|
+
.address-line abbr{text-decoration:none}@keyframes pulse{0%{background:0 0}50%{background:rgba(0,0,0,.15)}to{background:0 0}}.xYextDebug [data-ya-track]{outline:1px dashed #00f;scroll-margin:32px}.xYextDebug [data-ya-track].analytics-event-highlight{outline:2px dashed #000;padding:8px 16px;animation-name:pulse;animation-duration:2s;animation-iteration-count:infinite}.xYextDebug [data-ya-scope]{outline:1px dashed green;position:relative}.xYextDebug [data-ya-scope]:after{content:attr(data-ya-scope);color:#fff;z-index:2147483647;background:rgba(0,0,0,.45);outline:1px solid #178acd;padding:10px;display:block;position:absolute;top:0;left:0}.xYextDebug .analytics-debugger{color:#fff;z-index:99999;height:80%;transition:right .3s ease-out;position:fixed;top:10%;bottom:10%;right:0;display:flex!important}.xYextDebug .analytics-debugger-toggles{background:rgba(0,0,0,.75);border-right:1px solid #fff;border-top-left-radius:4px;border-bottom-left-radius:4px;flex-direction:column;width:100px;margin:auto;display:flex}.xYextDebug .analytics-debugger-toggle{text-align:center;cursor:pointer;outline:none;padding:10px}.xYextDebug .analytics-debugger-toggle.is-active{background:#178acd}.xYextDebug .analytics-debugger-toggle:first-child{border-top-left-radius:4px}.xYextDebug .analytics-debugger-toggle:last-child{border-bottom-left-radius:4px}.xYextDebug .analytics-debugger-toggle:not(:last-child){border-bottom:1px solid #fff}.xYextDebug .analytics-debugger-toggle:hover{background:#178acd}.xYextDebug .analytics-debugger-tabs{background:rgba(0,0,0,.75);border-top-left-radius:4px;border-bottom-left-radius:4px;width:250px}.xYextDebug .analytics-debugger-tab{flex-direction:column;height:100%;display:flex}.xYextDebug .analytics-debugger-tab-title{color:#fff;background:#178acd;border-bottom:1px solid #fff;border-top-left-radius:4px;padding:20px}.xYextDebug .analytics-debugger-list{flex-grow:1;overflow-y:auto}.xYextDebug .analytics-debugger-listItem{flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}.xYextDebug .analytics-debugger-listItem:not(:last-child){border-bottom:1px solid #fff}.xYextDebug .analytics-debugger-button{text-align:left;width:100%;padding:10px 20px}.xYextDebug .analytics-debugger-button.is-active{background:#178acd}.xYextDebug .analytics-debugger-button:hover:not(.is-active){cursor:pointer;background:rgba(255,255,255,.3)}.xYextDebug .analytics-debugger-tooltip{color:#fff;z-index:99998;background:#178acd;border:1px solid #178acd;border-radius:4px;padding:5px 10px;font-size:12px;position:absolute}.xYextDebug .analytics-debugger-tooltip:hover{z-index:99999;border:1px solid #000}html{--yxt-hoursTable-col1-width:128px;--yxt-hoursTable-col2-width:256px}.HoursTable-row{display:flex}.HoursTable-day{flex:0 0 var(--yxt-hoursTable-col1-width)}.HoursTable-intervals{flex-direction:column;flex:0 0 var(--yxt-hoursTable-col2-width);display:flex}.Map{height:var(--yxt-map-height)}.Map button{color:inherit;font:inherit;vertical-align:baseline;-ms-appearance:none;appearance:none;cursor:pointer;background:0 0;border:0;border-radius:0;margin:0;padding:0;font-size:100%;text-decoration:none}.sr-only{display:none}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Action } from '@yext/analytics';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { PropsWithChildren
|
|
5
|
-
import { EditorThemeClasses } from 'lexical';
|
|
4
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
6
5
|
import { DateTime } from 'luxon';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -180,10 +179,17 @@ interface AnalyticsMethods {
|
|
|
180
179
|
* e.g. via a Consent Management Banner or other opt-in method.
|
|
181
180
|
*/
|
|
182
181
|
optIn(): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Allows you to opt a user out of analytics tracking, for example if they withdraw
|
|
184
|
+
* consent via a Consent Management Banner or other opt-out method.
|
|
185
|
+
*/
|
|
186
|
+
optOut(): void;
|
|
183
187
|
/**
|
|
184
188
|
* Use the getDebugEnabled method to retrieve whether debugging is on or off.
|
|
185
189
|
*/
|
|
186
190
|
getDebugEnabled(): boolean;
|
|
191
|
+
/** Returns whether analytics reporting is currently enabled */
|
|
192
|
+
isYextAnalyticsEnabled(): boolean;
|
|
187
193
|
}
|
|
188
194
|
/**
|
|
189
195
|
* The AnalyticsProviderProps interface represents the component properties
|
|
@@ -284,14 +290,18 @@ declare class Analytics implements AnalyticsMethods {
|
|
|
284
290
|
private canTrack;
|
|
285
291
|
/** {@inheritDoc AnalyticsMethods.identify} */
|
|
286
292
|
identify(visitor: Record<string, string>): void;
|
|
287
|
-
/** {@inheritDoc AnalyticsMethods.
|
|
293
|
+
/** {@inheritDoc AnalyticsMethods.optIn} */
|
|
288
294
|
optIn(): Promise<void>;
|
|
289
|
-
/** {@inheritDoc AnalyticsMethods.
|
|
295
|
+
/** {@inheritDoc AnalyticsMethods.optOut} */
|
|
296
|
+
optOut(): void;
|
|
297
|
+
/** {@inheritDoc AnalyticsMethods.pageView} */
|
|
290
298
|
pageView(): Promise<void>;
|
|
291
299
|
/** {@inheritDoc AnalyticsMethods.track} */
|
|
292
300
|
track(props: TrackProps): Promise<void>;
|
|
293
301
|
/** {@inheritDoc AnalyticsMethods.getDebugEnabled} */
|
|
294
302
|
getDebugEnabled(): boolean;
|
|
303
|
+
/** {@inheritDoc AnalyticsMethods.isYextAnalyticsEnabled} */
|
|
304
|
+
isYextAnalyticsEnabled(): boolean;
|
|
295
305
|
}
|
|
296
306
|
|
|
297
307
|
/**
|
|
@@ -301,11 +311,6 @@ declare class Analytics implements AnalyticsMethods {
|
|
|
301
311
|
*/
|
|
302
312
|
declare const AnalyticsContext: React$1.Context<AnalyticsMethods | null>;
|
|
303
313
|
|
|
304
|
-
declare global {
|
|
305
|
-
interface Window {
|
|
306
|
-
setAnalyticsOptIn: () => void;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
314
|
/**
|
|
310
315
|
* The useAnalytics hook can be used anywhere in the tree below a configured
|
|
311
316
|
* AnalyticsProvider. Calling it will return an object to give you access to
|
|
@@ -315,24 +320,6 @@ declare global {
|
|
|
315
320
|
* @public
|
|
316
321
|
*/
|
|
317
322
|
declare function useAnalytics(): AnalyticsMethods | null;
|
|
318
|
-
/**
|
|
319
|
-
* Simpler hook that just returns the analytics track() method.
|
|
320
|
-
*
|
|
321
|
-
* @public
|
|
322
|
-
*/
|
|
323
|
-
declare const useTrack: () => ((props: TrackProps) => Promise<void>) | undefined;
|
|
324
|
-
/**
|
|
325
|
-
* Simpler hook that just returns the analytics pageView method
|
|
326
|
-
*
|
|
327
|
-
* @public
|
|
328
|
-
*/
|
|
329
|
-
declare const usePageView: () => (() => Promise<void>) | undefined;
|
|
330
|
-
/**
|
|
331
|
-
* Simpler hook that just returns the analytics identify method
|
|
332
|
-
*
|
|
333
|
-
* @public
|
|
334
|
-
*/
|
|
335
|
-
declare const useIdentify: () => ((visitor: Record<string, string>) => void) | undefined;
|
|
336
323
|
|
|
337
324
|
/**
|
|
338
325
|
* The main Analytics component for you to use. Sets up the proper react context
|
|
@@ -1577,38 +1564,6 @@ interface LocationMapProps extends MapProps {
|
|
|
1577
1564
|
|
|
1578
1565
|
declare const LocationMap: ({ children, coordinate, linkSameTab, pinUrl, onClick, onHover, onFocus, ...mapProps }: LocationMapProps) => react_jsx_runtime.JSX.Element;
|
|
1579
1566
|
|
|
1580
|
-
/**
|
|
1581
|
-
* The shape of data passed to {@link LexicalRichText}.
|
|
1582
|
-
*/
|
|
1583
|
-
interface LexicalRichTextProps {
|
|
1584
|
-
/** A JSON-serialized Lexical Dev AST. */
|
|
1585
|
-
serializedAST: string;
|
|
1586
|
-
/** CSS Class names for the various Lexical Node types. */
|
|
1587
|
-
nodeClassNames?: EditorThemeClasses;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
/**
|
|
1591
|
-
* @deprecated Use the stream's .html version instead with `dangerouslySetInnerHTML`.
|
|
1592
|
-
* ```jsx
|
|
1593
|
-
* <div dangerouslySetInnerHTML={{ __html: c_lrt.html }} />
|
|
1594
|
-
* ```
|
|
1595
|
-
*
|
|
1596
|
-
* Renders a read-only view of a Lexical Rich Text field. Styling for the various
|
|
1597
|
-
* types of Rich Text element can be optionally provided. If not provided, Yext default
|
|
1598
|
-
* styling will be applied.
|
|
1599
|
-
*
|
|
1600
|
-
* Note: This component currently only supports rendering on the client side.
|
|
1601
|
-
*/
|
|
1602
|
-
declare function LexicalRichText({ serializedAST, nodeClassNames, }: LexicalRichTextProps): react_jsx_runtime.JSX.Element;
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* A Component for rendering the legacy rich text field. This field's value
|
|
1606
|
-
* is stored as "Yext" Markdown.
|
|
1607
|
-
*/
|
|
1608
|
-
declare const LegacyRichText: (props: {
|
|
1609
|
-
markdown: string;
|
|
1610
|
-
}) => ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
|
|
1611
|
-
|
|
1612
1567
|
declare class HoursInterval {
|
|
1613
1568
|
end: DateTime;
|
|
1614
1569
|
start: DateTime;
|
|
@@ -2006,4 +1961,4 @@ declare const LeafletMaps: MapProvider;
|
|
|
2006
1961
|
|
|
2007
1962
|
declare const MapQuestMaps: MapProvider;
|
|
2008
1963
|
|
|
2009
|
-
export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, type HoursStatusProps, HoursTable, type HoursTableDayData, type HoursTableIntervalTranslations, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageTransformations, type ImageType, type IntervalType, LeafletMaps,
|
|
1964
|
+
export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, type HoursStatusProps, HoursTable, type HoursTableDayData, type HoursTableIntervalTranslations, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageTransformations, type ImageType, type IntervalType, LeafletMaps, Link, type LinkProps, type LinkType, type ListingPublisher, ListingPublisherOption, type ListingType, LocalBusiness, type Location, LocationMap, type LocationMapProps, LocationSchema, Map, type MapContextType, type MapProps, type MapProvider$1 as MapProvider, MapProviderOption, MapQuestMaps, MapboxMaps, Marker, type MarkerProps, type Offer, OfferSchema, OpeningHoursSchema, OpeningHoursSpecificationSchema, type Organization, OrganizationSchema, PerformerSchema, type PhotoGallery, PhotoGallerySchema, PhotoSchema, type PinStoreType, Product, type Review, ReviewSchema, SchemaWrapper, type StatusParams, type StatusTemplateParams, type TemplateParams, type ThumbnailType, type WeekType, debuggingParamDetected, getDirections, getImageUrl, getRichTextContent, useAnalytics, useClusterContext, useMapContext, useScope };
|
package/dist/index.js
CHANGED
|
@@ -1,57 +1,4 @@
|
|
|
1
|
-
import { A as e, N as t, Y as i, e as o, f as r, l as c, o as n, _ as p, E as g, $ as u, C as h, a4 as m, D as l, F as S, J as d, a0 as M, H as P, B as y, I as x, q as A, a2 as L, z as C, y as f, r as O, L as v, G as R, x as T, O as B, s as H, M as I, a3 as b, a1 as k, v as D, T as w, Q as G, R as Q, V as z, U as E, W as F, X as U, P as V, Z as W, S as q, m as J, d as K, p as N, K as X, u as Y, w as Z, k as _, t as $, i as j, n as aa, h as sa } from "./index-3y1PqoZ5.js";
|
|
2
|
-
|
|
3
|
-
e as Address,
|
|
4
|
-
|
|
5
|
-
i as AggregateRatingSchema,
|
|
6
|
-
o as Analytics,
|
|
7
|
-
r as AnalyticsContext,
|
|
8
|
-
c as AnalyticsProvider,
|
|
9
|
-
n as AnalyticsScopeProvider,
|
|
10
|
-
p as BaiduMaps,
|
|
11
|
-
g as BaseSchema,
|
|
12
|
-
u as BingMaps,
|
|
13
|
-
h as Clusterer,
|
|
14
|
-
m as CoordinateClass,
|
|
15
|
-
l as Day,
|
|
16
|
-
S as Event,
|
|
17
|
-
d as FAQPage,
|
|
18
|
-
M as GoogleMaps,
|
|
19
|
-
P as HoursStatus,
|
|
20
|
-
y as HoursTable,
|
|
21
|
-
x as Image,
|
|
22
|
-
A as ImageLayoutOption,
|
|
23
|
-
L as LeafletMaps,
|
|
24
|
-
C as LegacyRichText,
|
|
25
|
-
f as LexicalRichText,
|
|
26
|
-
O as Link,
|
|
27
|
-
v as ListingPublisherOption,
|
|
28
|
-
R as LocalBusiness,
|
|
29
|
-
T as LocationMap,
|
|
30
|
-
B as LocationSchema,
|
|
31
|
-
H as Map,
|
|
32
|
-
I as MapProviderOption,
|
|
33
|
-
b as MapQuestMaps,
|
|
34
|
-
k as MapboxMaps,
|
|
35
|
-
D as Marker,
|
|
36
|
-
w as OfferSchema,
|
|
37
|
-
G as OpeningHoursSchema,
|
|
38
|
-
Q as OpeningHoursSpecificationSchema,
|
|
39
|
-
z as OrganizationSchema,
|
|
40
|
-
E as PerformerSchema,
|
|
41
|
-
F as PhotoGallerySchema,
|
|
42
|
-
U as PhotoSchema,
|
|
43
|
-
V as Product,
|
|
44
|
-
W as ReviewSchema,
|
|
45
|
-
q as SchemaWrapper,
|
|
46
|
-
J as debuggingParamDetected,
|
|
47
|
-
K as getDirections,
|
|
48
|
-
N as getImageUrl,
|
|
49
|
-
X as getRichTextContent,
|
|
50
|
-
Y as useAnalytics,
|
|
51
|
-
Z as useClusterContext,
|
|
52
|
-
_ as useIdentify,
|
|
53
|
-
$ as useMapContext,
|
|
54
|
-
j as usePageView,
|
|
55
|
-
aa as useScope,
|
|
56
|
-
sa as useTrack
|
|
57
|
-
};
|
|
1
|
+
import {a,b as b$1}from'./chunk-FFY3Y364.js';import*as _t from'react';import {createContext,lazy,forwardRef,useContext,createElement,useRef,useState,useEffect,Suspense,useMemo,Fragment as Fragment$1}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {analytics}from'@yext/analytics';import rn from'classnames';import {createPortal}from'react-dom';import {DateTime}from'luxon';import lt from'mapbox-gl';function ft(t){switch(t){case "AD":case "AM":case "AT":case "AX":case "AZ":case "BA":case "BY":case "CY":case "CZ":case "DK":case "DZ":case "EC":case "EH":case "ET":case "FI":case "FR":case "GE":case "GF":case "GI":case "GP":case "GW":case "HT":case "KE":case "KV":case "KW":case "LA":case "LU":case "MC":case "MD":case "ME":case "MG":case "MK":case "MQ":case "MZ":case "NC":case "NL":case "NO":case "PL":case "PT":case "PY":case "RE":case "RS":case "SA":case "SE":case "SJ":case "SM":case "SN":case "TC":case "TJ":case "TM":case "TN":case "TZ":case "UY":case "VG":case "ZM":return [["line1"],["line2"],["postalCode","city"],["countryCode"]];case "AF":case "IR":return [["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case "AG":case "AO":case "AW":case "BJ":case "BO":case "BS":case "BZ":case "CI":case "CW":case "DJ":case "FJ":case "GA":case "GH":case "GM":case "GY":case "JM":case "KI":case "LY":case "MW":case "NA":case "NR":case "PS":case "QA":case "RW":case "SC":case "SR":case "SX":case "TG":case "TT":case "UG":case "VU":return [["line1"],["line2"],["city"],["countryCode"]];case "AL":case "EE":case "IS":return [["line1"],["line2"],["postalCode","city"]];case "AR":return [["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case "AS":case "BB":case "BD":case "BM":case "BN":case "BT":case "CR":case "DO":case "FK":case "FM":case "GR":case "GU":case "JO":case "KZ":case "LB":case "LK":case "LS":case "MA":case "MH":case "MM":case "MR":case "MT":case "MV":case "NG":case "PG":case "PK":case "PR":case "RO":case "SG":case "VC":case "WS":return [["line1"],["line2"],["city","postalCode"],["countryCode"]];case "AU":case "CA":case "SZ":case "US":case "VI":return [["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case "BE":case "PE":return [["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case "BF":case "BI":case "BQ":case "BW":case "CF":case "CG":case "CM":case "DM":case "ER":case "GQ":case "KM":case "ML":case "SY":case "TD":case "ZW":return [["line1"],["line2"],["city"],["region"],["countryCode"]];case "BG":return [["line1"],["postalCode","region"],["countryCode"]];case "BH":return [["line1"],["line2"],["sublocality","city"],["countryCode"]];case "BR":return [["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case "CH":case "DE":case "GT":case "IT":case "LI":case "MY":case "NI":case "OM":case "SK":case "VA":return [["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case "CL":case "PF":return [["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case "CN":return [["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case "CO":case "ID":case "IQ":case "KH":case "MP":case "NP":case "PW":case "UA":return [["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case "EG":return [["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case "ES":case "IL":return [["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case "GB":case "MN":case "ZA":return [["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case "GG":case "IM":case "JE":return [["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case "GN":return [["line1","line2","city"],["countryCode"]];case "HK":return [["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case "HR":return [["line1"],["postalCode","city","region"],["countryCode"]];case "HU":case "SI":return [["postalCode","city"],["line1"],["line2"],["countryCode"]];case "IE":return [["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case "IN":case "VE":return [["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case "JP":return [["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case "KR":return [["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case "KY":return [["line1"],["line2"],["postalCode"],["countryCode"]];case "LT":return [["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case "LV":return [["line1"],["city",",","postalCode"],["countryCode"]];case "MO":return [["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case "MU":return [["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case "MX":return [["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case "NE":case "SD":return [["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case "NZ":return [["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case "PH":case "TW":case "VN":return [["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case "RU":return [["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case "SB":case "SL":case "ST":case "TL":case "TO":case "TV":return [["line1"],["line2"],["city",",","region"],["countryCode"]];case "TH":case "TR":return [["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case "UZ":return [["line1"],["line2"],["region","postalCode"],["countryCode"]]}return [["line1","line2"],["city","region","postalCode"],["countryCode"]]}var gt={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},ke={GOOGLE:"google",APPLE:"apple",BING:"bing"};var Ct=(t,e)=>{let r={region:"localizedRegionName",countryCode:"localizedCountryName"}[t];return r&&e[r]},mn=(t,e=[],n,r={route:false},i)=>{let o="Failed to construct query for maps service.",a=t&&bt([t.line1,t.line2,t.city,t.region,t.postalCode,t.countryCode]);switch(r.provider){case ke.APPLE:{if(i?.latitude&&i?.longitude)return yt(`${i.latitude},${i.longitude}`,r.route);if(!a){console.warn(`${o} Check that you've provided a valid Yext Address.`);break}return yt(a,r.route)}case ke.BING:{if(i?.latitude&&i?.longitude)return vt(`${i.latitude},${i.longitude}`,r.route);if(a=t&&bt([t.line1,t.city,t.region,t.postalCode]),!a){console.warn(`${o} Check that you've provided a valid Yext Address.`);break}return vt(a,r.route)}default:{if(i?.latitude&&i?.longitude)return Pt(`${i.latitude},${i.longitude}`,r.route);let s=e.find(l=>l?.publisher?.toUpperCase()===gt.GOOGLEMYBUSINESS);if(s?.listingUrl)return s.listingUrl;if(n)return hn(n,a,r.route);if(!a){console.warn(`${o} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return Pt(a,r.route)}}},yt=(t,e)=>e?`https://maps.apple.com/?daddr=${t}`:`https://maps.apple.com/?address=${t}`,vt=(t,e)=>e?`https://bing.com/maps/default.aspx?rtp=adr.${t}`:`https://bing.com/maps/default.aspx?where1=${t}`,hn=(t,e,n)=>{let r=e?`&query=${e}`:"";return n?`https://maps.google.com/maps/dir/?api=1${r}&destination_place_id=${t}&destination=direct`:r?`https://maps.google.com/maps/search/?api=1${r}&query_place_id=${t}`:`https://maps.google.com/maps/dir/?api=1&destination_place_id=${t}&destination=direct`},Pt=(t,e)=>e?`https://maps.google.com/maps/dir/?api=1&destination=${t}`:`https://maps.google.com/maps/search/?api=1&query=${t}`,bt=(t=[])=>{if(!t.length)return "";let e=t.filter(Boolean).join(", ");return encodeURIComponent(e)};var fn=({address:t,lines:e,separator:n=",",...r})=>{let i=(e||ft(t.countryCode)).map(o=>jsx(gn,{address:t,line:o,separator:n},o.toString()));return createElement("div",{...r,key:t.toString()},i)},gn=({address:t,line:e,separator:n})=>{let r=[],i=0;for(let o of e){if(o===","){r.push(jsx("span",{children:n},`separator-${i++}`));continue}let a=t[o];if(!a)continue;let s=Ct(o,t);if(s){r.push(jsxs(_t.Fragment,{children:[" ",jsx("abbr",{title:s,children:a})]},o));continue}r.push(jsx("span",{children:" "+a},o));}return jsx("div",{className:"address-line",children:r})};function ye(t){return t?t.toLowerCase().trim().replace(/\s/g,""):""}function ve(t,e){return [t,e].filter(n=>!!n).map(n=>ye(n)).join("_")}var wt=t=>{switch(Math.floor(t/1e8%10)){case 0:return "US";case 1:return "EU";default:return ""}};var z=createContext(null);var Tn=lazy(()=>import('./debugger-3ZMPVPKH.js'));function Xi(t){let{children:e,apiKey:n,currency:r,templateData:i,requireOptIn:o,disableSessionTracking:a$1,enableDebugging:s,productionDomains:l}=t;if(!n)throw new Error("API Key is required for AnalyticsProvider");let p=useRef(null),[c,d]=useState(false);useEffect(()=>{d(true);},[]),p.current===null&&(p.current=new Ce(n,r,i,o,a$1,l,s??be()));let u=p.current;return useEffect(()=>{let m=window,g=()=>{u.optIn().catch(f=>{console.error("Yext Analytics optIn failed:",f);});};return m.enableYextAnalytics=g,()=>{delete m.enableYextAnalytics;}},[u]),jsxs(Fragment,{children:[jsx(z.Provider,{value:u,children:e}),c&&(s||be())&&a().name==="browser"?jsx(Suspense,{fallback:jsx(Fragment,{}),children:jsx(Tn,{})}):null]})}function be(){return a().name!=="browser"||typeof window>"u"?false:!!new URL(window.location.href).searchParams.get("xYextDebug")}var Ce=class{constructor(e,n,r,i,o,a,s=false){this.apiKey=e;this.defaultCurrency=n;this.templateData=r;this.productionDomains=a;this.enableDebugging=s;this._optedIn=!i,this._sessionTrackingEnabled=!o,this.makeReporter(),this.pageView();}_optedIn;_sessionTrackingEnabled;_analyticsEventService;_pageViewFired=false;makeReporter(){if(a().name!=="browser"||!this._optedIn)return;if(!b$1(...this.productionDomains??[])&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}let e=wt(this.templateData.document.businessId),n={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:e||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=analytics(n).with(r);}canTrack(){return a().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(e){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:e}));}async optIn(){this._optedIn=true,this.makeReporter(),this._pageViewFired||await this.pageView();}optOut(){this._optedIn=false;}async pageView(){if(!this.canTrack())return Promise.resolve(void 0);await this._analyticsEventService?.report({action:"PAGE_VIEW"}),this._pageViewFired=true;}async track(e){if(!this.canTrack())return Promise.resolve();let{action:n,scope:r,eventName:i,currency:o,amount:a,destinationUrl:s,customTags:l,customValues:p}=e,c;a&&(c={amount:a,currency:o||this.defaultCurrency}),await this._analyticsEventService?.report({action:n,pages:{scope:ye(r)||void 0,originalEventName:ve(r||"",ye(i)||"")},value:c,destinationUrl:s||void 0,customTags:l,customValues:p});}getDebugEnabled(){return this.enableDebugging||be()}isYextAnalyticsEnabled(){return this._optedIn}};function xt(){return useContext(z)}var St=createContext({name:""}),On=()=>useContext(St).name;function Ln(t,e){return new Proxy(t,{get(n,r,i){if(r==="track")return a=>n.track({...a,scope:a.scope??e});let o=Reflect.get(n,r,i);return typeof o=="function"?o.bind(n):o}})}function Po(t){let e=On(),[n]=useState({name:ve(e,t.name)}),r=useContext(z),i=useMemo(()=>r&&Ln(r,n.name),[r,n.name]),o=i?.getDebugEnabled(),[a,s]=useState(false);useEffect(()=>{s(true);},[]);let l=jsx(z.Provider,{value:i,children:jsx(St.Provider,{value:n,children:t.children})});return o&&a?jsx("section",{"data-ya-scope":n.name,children:l}):l}var N={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"};var Et=t=>{let e=t.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${t}`);return}let n=t.hostname,r;if(n==="a.mktgcdn.com")r="us";else {if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${t}`);return}r="eu";}if(!t.pathname.startsWith("/f")){console.error(`Invalid path: ${t}`);return}let i=t.pathname.replace(/^\//,"").split("/");if(i.length<2||i.length>3){console.error(`Invalid path: ${t}`);return}let o;if(i[0]==="f")o="prod";else switch(i[0].replace("f-","")){case "sandbox":{o="sbx";break}case "qa":{o="qa";break}case "dev":{o="dev";break}default:{console.error(`Invalid path: ${t}`);return}}if(r==="eu"&&(o==="dev"||o==="sbx")){console.error(`Invalid path: ${t}`);return}let a;if(i.length===3&&(a=parseInt(i[1]),Number.isNaN(a))){console.error(`Invalid account id: ${t}`);return}let s=i[i.length-1].split("."),l=s.length===2?`.${s[1]}`:"",p=s[0];return {scheme:e,partition:r,env:o,accountId:a,contentHash:p,extension:l}},Ot=(t,e,n,r)=>{let i=`https://dyn${t.partition==="us"?"":`.${t.partition}`}.mktgcdn.com`,o="f";switch(t.env){case "prod":break;case "sbx":{o+="-sandbox";break}default:o+=`-${t.env.toString()}`;}let a=t.accountId!==void 0?`${t.accountId}/`:"",s=_e(r);return `${i}/${o}/${a}${t.contentHash}${t.extension}/width=${Math.round(e)},height=${Math.round(n)}${s}`};var Lt=t=>{let e=t.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${t}`);return}if(t.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${t}`);return}if(!t.pathname.startsWith("/p")){console.error(`Invalid path: ${t}`);return}let n=t.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${t}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case "sandbox":{r="sbx";break}case "qa":{r="qa";break}case "dev":{r="dev";break}default:{console.error(`Invalid path: ${t}`);return}}let i=n[1],o;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${t}`);return}if(o=parseFloat(n[2]),Number.isNaN(o)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${t}`);return}}let a=n[n.length-1].split("."),s=a.length===2?`.${a[1]}`:"",l=a[0];return {scheme:e,env:r,contentHash:i,aspectRatio:o,name:l,extension:s}},At=(t,e,n,r)=>{let i="https://dyn.mktgcdn.com",o="p";switch(t.env){case "prod":break;case "sbx":{o+="-sandbox";break}default:o+=`-${t.env.toString()}`;}let a=_e(r);return `${i}/${o}/${t.contentHash}/width=${Math.round(e)},height=${Math.round(n)}${a}`};var An=t=>t.endsWith(".mktgcdn.com")||t==="mktgcdn.com",oe=(t,e,n,r)=>{if(!ie(t)){console.error(`Invalid image url: ${t}.`);return}let i=new URL(t);if(!An(i.hostname))return t;if(i.pathname.startsWith("/p")){let o=Lt(i);if(o)return At(o,e,n,r)}else if(i.pathname.startsWith("/f")){let o=Et(i);if(o)return Ot(o,e,n,r)}return t},ie=t=>{let e;try{e=new URL(t);}catch{return false}return e.protocol==="http:"||e.protocol==="https:"},_e=t=>{if(!t||Object.keys(t).length===0)return "";let e=Object.entries(t).filter(([,n])=>n!==void 0&&String(n)!=="").map(([n,r])=>`${n}=${r}`).join(",");return e.length>0?`,${e}`:""};var Nn=({image:t,className:e,width:n,height:r,aspectRatio:i,layout:o=N.INTRINSIC,placeholder:a,imgOverrides:s,style:l={},imageTransformations:p,loading:c="lazy"})=>{let d=useRef(null),[u,m]=useState(false),g="image"in t?t.image:t;useEffect(()=>{d.current?.complete&&m(true);},[]),Fn(o,g.width,g.height,n,r,i);let f=Math.abs(g.width);f||console.warn("Invalid image width.");let y=Math.abs(g.height);if(y||console.warn("Invalid image height."),!ie(g.url))return console.error(`Invalid image url: ${g.url}`),jsx(Fragment,{children:a!=null&&a});let _=n&&n>0?n:void 0,E=r&&r>0?r:void 0,{src:w,imgStyle:B,widths:v,updatedImageTransformations:I}=Bn(o,f,y,l,g.url,_,E,i,p),D=v.map(C=>`${oe(g.url,C,(o===N.ASPECT&&i?1/i:y/f)*C,I)} ${C}w`).join(", "),$=[640,768,1024,1280,1536],R=v.map((C,O)=>O===v.length-1?`${C}px`:`(max-width: ${$[O]}px) ${C}px`).join(", ");return jsxs(Fragment,{children:[!u&&a!=null&&a,jsx("img",{ref:d,style:B,src:w,className:e,width:_,height:E,srcSet:D,sizes:R,loading:c,alt:g.alternateText||"",...s})]})},Fn=(t,e,n,r,i,o)=>{if(e<0&&console.warn(`Invalid image width: ${e}.`),n<0&&console.warn(`Invalid image height: ${n}.`),t===N.FIXED){if(!r&&!i){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),i&&i<0&&console.warn(`Using fixed layout but height is invalid: ${i}.`);return}(r||i)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),t===N.ASPECT&&!o&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.");},Bn=(t,e,n,r,i,o,a,s,l)=>{let p=[100,320,640,960,1280,1920],c=oe(i,500,s?500/s:500,l),d={...r},u=l?{...l}:{};switch(d.objectFit=d.objectFit||"cover",d.objectPosition=d.objectPosition||"center",t){case N.INTRINSIC:d.maxWidth=e,d.width="100%",d.aspectRatio=s?`${s}`:`${e} / ${n}`;break;case N.FIXED:{let{fixedWidth:m,fixedHeight:g,fixedWidths:f}=$n(e,n,p,o,a);d.width=m,d.height=g,p=f,c=oe(i,m,g,u);break}case N.ASPECT:d.aspectRatio=s?`${s}`:`${e} / ${n}`,u.fit=u?.fit||"cover";break;case N.FILL:d.width="100%",d.aspectRatio=s?`${s}`:`${e} / ${n}`;break;default:console.warn(`Unrecognized layout: ${t}.`);break}return {src:c,imgStyle:d,widths:p,updatedImageTransformations:u}},$n=(t,e,n,r,i)=>r&&i?{fixedWidth:r,fixedHeight:i,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*e/t,fixedWidths:[r]}:i?{fixedWidth:i/e*t,fixedHeight:i,fixedWidths:[i/e*t]}:{fixedWidth:t,fixedHeight:e,fixedWidths:n};var Wn="phonecall",Gn="drivingdirection",kt="calltoactionclick",Zn="clicktowebsite",zn="other",Nt="link",jn="cta",Ft=t=>{let e={...t.cta??{link:t.href}};if(!e.link)throw t.cta?new Error("CTA's link is undefined"):new Error("Link's href is undefined");if(typeof e.link!="string")throw t.cta?new Error("CTA's link is not a valid string"):new Error("Link's href is not a valid string");return e.linkType||(e.linkType=Vn(e.link)),e.link=Kn(e),e},Bt=(t,e)=>{switch(t.linkType){case "EMAIL":return "CTA_CLICK";case "PHONE":return "TAP_TO_CALL";case "CLICK_TO_WEBSITE":return "WEBSITE";case "DRIVING_DIRECTIONS":return "DRIVING_DIRECTIONS";case "OTHER":return "CTA_CLICK";case "URL":return "LINK";default:return e?"CTA_CLICK":"LINK"}},$t=(t,e,n)=>{if(t)return t;if(e)switch(e){case "PHONE":return Wn;case "EMAIL":return kt;case "URL":return Nt;case "DRIVING_DIRECTIONS":return Gn;case "CLICK_TO_WEBSITE":return Zn;case "OTHER":return zn;default:return n?kt:Nt}return jn},Vn=t=>Yn(t)?"EMAIL":t.startsWith("tel:")?"PHONE":"URL",Kn=t=>t.linkType==="EMAIL"?t.link.startsWith("mailto:")?t.link:`mailto:${t.link}`:t.linkType==="PHONE"?t.link.startsWith("tel:")?t.link:`tel:${t.link}`:t.link,Yn=t=>t.startsWith("mailto:")?true:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t);var Fe=forwardRef(function(e,n){let{children:r,onClick:i,className:o,eventName:a,scope:s,currency:l,amount:p,cta:c,obfuscate:d,customTags:u,customValues:m,...g}=e,f=Ft(e),y=Bt(f,!!c),_=$t(a,f.linkType,!!c),E=xt(),w=d||d!==false&&f.linkType==="EMAIL",B=async D=>{let $=D.currentTarget,R="";if(w){D.preventDefault();let C=$.href.split("/").at(-1);C&&(R=atob(C));}if(E!==null)try{await E.track({action:y,scope:s,eventName:_,currency:l,amount:p,destinationUrl:R||$.href,customTags:u,customValues:m});}catch{console.error("Failed to report click Analytics Event");}i&&i(D),R&&(window.location.href=R);},v=w?"Obfuscated, set a label or child":f.link,I={className:rn("Link",o),href:w?btoa(f.link):f.link,onClick:B,rel:e.target&&!e.rel?"noopener":e.rel,ref:n};return E?.getDebugEnabled()&&(I["data-ya-action"]=y,I["data-ya-scopeoverride"]=s,I["data-ya-eventname"]=_),jsx("a",{...g,...I,suppressHydrationWarning:true,children:r||f.label||v})});var Jn=["latitude","lat"],er=["longitude","lon","lng","long"];function Gt(t,e){for(let n of e)if(t[n]||t[n]===0)return t[n]}function Zt(t){switch(typeof t){case "string":case "number":let e=Number.parseFloat(t);if(Number.isNaN(e))throw new Error(`'${t}' must be convertible to a Number'`);return e;default:throw new Error(`typeof '${t}' must be a number or a string that can be converted to a number, is '${typeof t}'`)}}function j(t){return t*Math.PI/180}function F(t){return t/Math.PI*180}function tr(t,e){let n=j(t.latitude),r=j(e.latitude),i=r-n,o=j(e.longitude-t.longitude),a=Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function nr(t,e){let n=Math.tan(Math.PI/360*(t+90)),r=Math.tan(Math.PI/360*(e+90));return Math.log(r/n)}function rr(t,e){let r=Math.tan(Math.PI/360*(t+90))*Math.pow(Math.E,e);return Math.atan(r)*360/Math.PI-90}var h=class{_lat;_lon;constructor(e,n){let r=e,i=n;this._lat=0,this._lon=0,typeof e=="object"?(r=Gt(e,Jn)??0,i=Gt(e,er)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof i=="function"?i():i):typeof r=="number"&&typeof i=="number"&&(this.latitude=r,this.longitude=i);}get latitude(){return this._lat}set latitude(e){this._lat=Math.max(-90,Math.min(Zt(e),90));}get longitude(){return this._lon}set longitude(e){this._lon=Zt(e);}get normalLon(){return ((this._lon+180)%360+360)%360-180}add(e,n,r="deg",i="spherical"){if(i==="mercator"&&(r==="deg"||r==="r")){let o=r==="deg"?j(e):e,a=r==="deg"?n:F(n);this.latitude=rr(this.latitude,o),this.longitude+=a;}else switch(r){case "deg":this.latitude+=e,this.longitude+=n;break;case "km":this.latitude+=F(e)*6371,this.longitude+=F(n)*6371*Math.cos(j(this.latitude));break;case "mi":this.latitude+=F(e)*3959,this.longitude+=F(n)*3959*Math.cos(j(this.latitude));break;case "r":this.latitude+=F(e),this.longitude+=F(n);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(e,n="mi",r="spherical"){if(r==="mercator"&&(n==="deg"||n==="r")){let i=nr(this.latitude,e.latitude),o=Math.abs(e.normalLon-this.normalLon),a=j(Math.min(o,360-o)),s=Math.sqrt(Math.pow(i,2)+Math.pow(a,2));switch(n){case "deg":return F(s);case "r":return s;default:throw new Error(`unit unhandled: ${String(n)}`)}}else {let i=tr(this,e);switch(n){case "deg":return F(i);case "km":return i*6371;case "mi":return i*3959;case "r":return i;default:throw new Error(`unit unhandled: ${String(n)}`)}}}equals(e){return e&&e.latitude===this.latitude&&e.longitude===this.longitude}searchQueryString(){return `${this.latitude},${this.longitude}`}};function we(t,e=()=>null){let n=document.createElement("script");n.async=true,n.onload=e,n.src=t,document.head.appendChild(n);}function P(t,e){if(typeof t!==e)throw new Error(`Expected an object of type '${e}' but received '${typeof t}'`)}function ae(t){if(!(t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.tagName=="string"))throw new Error(`Value with name ${t.constructor.name} is not a valid HTMLElement.`)}function b(t,e){let n;try{n=t instanceof e;}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${e.name}' but received '${t.constructor.name}'`)}var se=class{providerMapClass;wrapper;controlEnabled;panHandler;panStartHandler;providerOptions;iframeWindow;apiKey;constructor(e,n){b(e,T),n&&ae(n),this.providerMapClass=e.getMapClass(),this.wrapper=n,this.controlEnabled=true,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={};}withControlEnabled(e){return this.controlEnabled=e,this}withPanHandler(e){return P(e,"function"),this.panHandler=e,this}withPanStartHandler(e){return P(e,"function"),this.panStartHandler=e,this}withProviderOptions(e){return this.providerOptions=e,this}withIframeWindow(e){return this.iframeWindow=e,this}withApiKey(e){return this.apiKey=e,this}build(){let e=this.providerMapClass;return new e(this)}},x=class{_panHandler;_panStartHandler;constructor(e){b(e,se),this._panHandler=e.panHandler,this._panStartHandler=e.panStartHandler;}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(e,n){throw new Error("not implemented")}setZoom(e,n){throw new Error("not implemented")}setZoomCenter(e,n,r){this.setZoom(e,r),this.setCenter(n,r);}};var le=class{providerPinClass;clickHandler;focusHandler;hoverHandler;icons;hasPinUrl;constructor(e){b(e,T),this.providerPinClass=e.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={},this.hasPinUrl=false;}withClickHandler(e){return P(e,"function"),this.clickHandler=e,this}withFocusHandler(e){return P(e,"function"),this.focusHandler=e,this}withHoverHandler(e){return P(e,"function"),this.hoverHandler=e,this}withIcons(e){return this.icons=e,this}withHasPinUrl(e){return this.hasPinUrl=e,this}build(){let e=this.providerPinClass;return new e(this)}},V=class{_clickHandler;_focusHandler;_hoverHandler;_icons;constructor(e){b(e,le),this._clickHandler=e.clickHandler,this._focusHandler=e.focusHandler,this._hoverHandler=e.hoverHandler,this._icons=e.icons;}setCoordinate(e){throw new Error("not implemented")}setMap(e,n){throw new Error("not implemented")}setProperties(e){throw new Error("not implemented")}},ir=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"}),k=class t extends V{_pinEl;_pinAlt;_wrapper;static get baseStyle(){return ir}constructor(e){super(e),this._pinEl=e.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,t.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners();}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(true)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(false)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(true)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(false)));}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(e){this.setElementProperties(e);let n=e.getClass(),r=e.getElement()||this._pinEl,i=e.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=i.toString(),this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)));}setElementProperties(e){let n=e.getAnchorX(),r=e.getAnchorY(),i=e.getHeight(),o=this._icons[e.getIcon()],a=e.getSRText(),s=e.getWidth();Object.assign(this._pinEl.style,{backgroundImage:o?`url("${o}")`:"",height:i+"px",transform:`translate(${ -100*n}%, ${ -100*r}%)`,width:s+"px"}),this._pinAlt.innerText=a;}};var M=class{loadFunction;mapClass;pinClass;providerName;constructor(){this.loadFunction=(e,n,r,i)=>e(),this.mapClass=x,this.pinClass=V,this.providerName="";}withLoadFunction(e){return P(e,"function"),this.loadFunction=e,this}withMapClass(e){return this.mapClass=e,this}withPinClass(e){return this.pinClass=e,this}withProviderName(e){return this.providerName=e,this}build(){return new T(this)}},T=class{_loadFunction;_mapClass;_pinClass;_providerName;_loadPromise;_resolveLoad;_rejectLoad;_apiKey;_loadInvoked;_loaded;_options;constructor(e){b(e,M),this._loadFunction=e.loadFunction,this._mapClass=e.mapClass,this._pinClass=e.pinClass,this._providerName=e.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r;}),this._apiKey="",this._loadInvoked=false,this._loaded=false,this._options={};}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(e=this._apiKey,n=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=true,this._loadFunction(this._resolveLoad,this._rejectLoad,e,n)),await this.ready(),this._loaded=true;}async ready(){await this._loadPromise;}setLoadOptions(e,n=null){this._loadInvoked||(this._apiKey=e,this._options=n||this._options);}};var Be=class extends x{map;_moving;constructor(e){super(e),e.wrapper&&(this.map=new google.maps.Map(e.wrapper,{disableDefaultUI:!e.controlEnabled,fullscreenControl:false,gestureHandling:e.controlEnabled?"auto":"none",mapTypeControl:false,rotateControl:false,scaleControl:false,streetViewControl:false,zoomControl:e.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...e.providerOptions}),this._moving=false,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=true,this._panStartHandler());}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=false,this._panHandler();}));}getCenter(){return new h(this.map?.getCenter()??{lat:0,lng:0})}getZoom(){return this.map?.getZoom()??0}setCenter(e,n){let r=new google.maps.LatLng(e.latitude,e.longitude);n?this.map?.panTo(r):this.map?.setCenter(r);}setZoom(e,n){this.map?.setZoom(Math.floor(e));}setZoomCenter(e,n,r){this.setCenter(n,r),this.setZoom(e,r);}},$e=class extends k{_latLng;pin;constructor(e){super(e),this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class n extends google.maps.OverlayView{pin;constructor(i){super(),this.pin=i;}draw(){let i=this.getProjection()?.fromLatLngToDivPixel(this.pin._latLng??null);i&&this.pin._wrapper&&(this.pin._wrapper.style.left=i.x+"px",this.pin._wrapper.style.top=i.y+"px");}onAdd(){this.pin._wrapper&&this.getPanes()?.floatPane.appendChild(this.pin._wrapper);}onRemove(){this.pin._wrapper?.parentNode?.removeChild(this.pin._wrapper);}}this.pin=new n(this);}setCoordinate(e){this._latLng=new google.maps.LatLng(e.latitude,e.longitude),this.pin.draw();}setMap(e,n){let r=e?.getProviderMap()?.map;this.pin.setMap(r??null);}},zt="GoogleMapsCallback_b7d77ff2",or="https://maps.googleapis.com/maps/api/js";function ar(t,e,n,{autocomplete:r=false,channel:i=window.location.hostname,client:o,language:a,region:s,libraries:l=[],loading:p="async",params:c={}}={}){window[zt]=t,r&&l.push("geocoder","places");let d={callback:zt,channel:i,libraries:l.join(","),...c};n&&(d.key=n),o&&(d.client=o),a&&(d.language=a),s&&(d.region=s),p&&(d.loading=p),we(or+"?"+Object.entries(d).map(([u,m])=>u+"="+m).join("&"));}var Ue=new M().withLoadFunction(ar).withMapClass(Be).withPinClass($e).withProviderName("Google").build();var A=class{_ne;_sw;static fit(e){let n=e.map(p=>p.latitude),r=Math.max(...n),i=Math.min(...n),o=e.map(p=>p.normalLon).sort((p,c)=>p-c),a=o.map((p,c)=>({distance:(c<o.length-1?o[c+1]:o[0]+360)-p,index:c})).reduce((p,c)=>c.distance>p.distance?c:p).index,s=o[a],l=o[(a+1)%o.length];return new this(new h(i,l),new h(r,s))}constructor(e,n){this._ne=new h(n),this._sw=new h(e);}get ne(){return this._ne}set ne(e){this._ne=new h(e);}get sw(){return this._sw}set sw(e){this._sw=new h(e);}contains(e){let n=this._sw.latitude<=e.latitude&&e.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,i=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=e.normalLon&&e.normalLon<=this._ne.normalLon:this._sw.normalLon<=e.normalLon||e.normalLon<=this._ne.normalLon;return n&&(r||i)}extend(e){if(this._ne.latitude=Math.max(this._ne.latitude,e.latitude),this._sw.latitude=Math.min(this._sw.latitude,e.latitude),!this.contains(e)){let n=((e.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-e.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r;}}getCenter(e="spherical"){let n=new h(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,"deg",e),i=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,"deg",e),n.longitude=i,n}};var Me=class{_anchorX;_anchorY;_height;_icon;_srText;_width;_zIndex;_class;_element;constructor(){this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null;}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(e){return this._anchorX=e,this}setAnchorY(e){return this._anchorY=e,this}setClass(e){return this._class=e,this}setElement(e){return this._element=e,this}setHeight(e){return this._height=e,this}setIcon(e){return this._icon=e,this}setSRText(e){return this._srText=e,this}setWidth(e){return this._width=e,this}setZIndex(e){return this._zIndex=e,this}};var K=class{coordinate;hideOffscreen;icons;propertiesForStatus;provider;type;hasPinUrl;constructor(){this.coordinate=new h(0,0),this.hideOffscreen=false,this.icons={},this.propertiesForStatus=e=>new Me,this.provider=null,this.type="",this.hasPinUrl=false;}withCoordinate(e){return this.coordinate=new h(e),this}withHideOffscreen(e){return this.hideOffscreen=e,this}withIcon(e,n){return this.icons[e]=n,this}withPropertiesForStatus(e){return P(e,"function"),this.propertiesForStatus=e,this}withProvider(e){return e&&(b(e,T),this.provider=e),this}withHasPinUrl(e){return this.hasPinUrl=e,this}withType(e){return this.type=e,this}build(){return new We(this)}},We=class{_coordinate;_hideOffscreen;_icons;_propertiesForStatus;_type;_clickHandler;_focusHandler;_hoverHandler;_hidden;_cancelHiddenUpdater;_map;_pin;_status;constructor(e){if(b(e,K),e.provider&&b(e.provider,T),!e.provider?.loaded)throw new Error(`MapProvider '${e.provider?.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=e.coordinate,this._hideOffscreen=e.hideOffscreen,this._icons={...e.icons},this._propertiesForStatus=e.propertiesForStatus,this._type=e.type,this._clickHandler=()=>null,this._focusHandler=n=>this._hoverHandler(n),this._hoverHandler=n=>null,this._hidden=false,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new le(e.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(n=>this._focusHandler(n)).withHoverHandler(n=>this._hoverHandler(n)).withHasPinUrl(e.hasPinUrl).build(),this._pin.setCoordinate(e.coordinate),this._status={},this.setStatus(this._status);}getCoordinate(){return this._coordinate}getIcon(e){return this._icons[e]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null);}setClickHandler(e){P(e,"function"),this._clickHandler=e;}setCoordinate(e){this._coordinate=new h(e),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen();}setFocusHandler(e){P(e,"function"),this._focusHandler=e;}setHoverHandler(e){P(e,"function"),this._hoverHandler=e;}setMap(e){if(e!==this._map&&(e!==null&&b(e,pe),this._pin.setMap(e,this._hidden?null:this._map),this._map=e,this._hidden=false,this._cancelHiddenUpdater(),e&&this._hideOffscreen)){let n=false,r=new Promise(i=>{this._cancelHiddenUpdater=()=>{n=true,i();};});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,e.moving()]),await Promise.race([r,e.idle()]);})();}}setStatus(e){Object.assign(this._status,e),this._pin.setProperties(this._propertiesForStatus(this._status));}_hideIfOffscreen(){if(this._map){let e=this._map.getBounds().contains(this._coordinate);this._hidden&&e?this._pin.setMap(this._map,null):!this._hidden&&!e&&this._pin.setMap(null,this._map),this._hidden=!e;}}};var U=.98;function xe(t,e){return Math.max(t instanceof Function?t():t||0,0)/e}var ce=class{controlEnabled;defaultCenter;defaultZoom;legendPins;padding;panHandler;panStartHandler;provider;providerOptions;singlePinZoom;wrapper;iframeWindow;apiKey;constructor(){this.controlEnabled=true,this.defaultCenter=new h(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(e,n)=>null,this.panStartHandler=e=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null;}withControlEnabled(e){return this.controlEnabled=e,this}withDefaultCenter(e){return this.defaultCenter=new h(e),this}withDefaultZoom(e){return this.defaultZoom=e,this}withLegendPins(e){return this.legendPins=Array.from(e),this}withPadding(e){return this.padding=e,this}withPanHandler(e){return P(e,"function"),this.panHandler=e,this}withPanStartHandler(e){return P(e,"function"),this.panStartHandler=e,this}withProvider(e){return b(e,T),this.provider=e,this}withProviderOptions(e){return this.providerOptions=e,this}withSinglePinZoom(e){return this.singlePinZoom=e,this}withWrapper(e){return e?(ae(e),this.wrapper=e,this):this}withIframeWindow(e){return this.iframeWindow=e,this}withApiKey(e){return this.apiKey=e,this}build(){return new pe(this)}},pe=class{_defaultCenter;_defaultZoom;_legendPins;_padding;_provider;_singlePinZoom;_wrapper;_cachedBounds;_resolveIdle;_resolveMoving;_idlePromise;_panHandlerRunning;_panStartHandlerRunning;_currentBounds;_movingPromise;_panHandler;_panStartHandler;_map;constructor(e){if(b(e,ce),e.provider&&b(e.provider,T),e.wrapper&&ae(e.wrapper),!e.provider?.loaded)throw new Error(`MapProvider '${e.provider?.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=e.defaultCenter,this._defaultZoom=e.defaultZoom,this._legendPins=e.legendPins,this._provider=e.provider,this._singlePinZoom=e.singlePinZoom,this._wrapper=e.wrapper,this._padding={},this.setPadding(e.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(e.panHandler),this.setPanStartHandler(e.panStartHandler);this._wrapper?.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=false,this._panStartHandlerRunning=false,this._map=new se(e.provider,this._wrapper).withControlEnabled(e.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(e.providerOptions).withIframeWindow(e.iframeWindow).withApiKey(e.apiKey).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds();}fitCoordinates(e,n=false,r=this._singlePinZoom){e.length?this.setBounds(A.fit(e),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n);}getBounds(){if(!this._cachedBounds){let e=this._wrapper?.offsetHeight??0,n=this._wrapper?.offsetWidth??0,r=this.getZoom(),i=this.getCenter(),o=360/Math.pow(2,r+8),a=n*o,s=e*o;this._cachedBounds=new A(i,i),this._cachedBounds.ne.add(s/2,a/2,"deg","mercator"),this._cachedBounds.sw.add(-s/2,-a/2,"deg","mercator"),this.moving().then(()=>this._cachedBounds=null);}return new A(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise;}async moving(){await this._movingPromise;}newPinOptions(){return new K().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=true,requestAnimationFrame(()=>{let e=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(e,new A(new h(this._currentBounds.sw),new h(this._currentBounds.ne))),this._panHandlerRunning=false;}),this._setIdle());}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=true,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new A(new h(this._currentBounds.sw),new h(this._currentBounds.ne))),this._panStartHandlerRunning=false;}),this._setMoving());}setBounds({ne:e,sw:n},r=false,i={},o=1/0){let a=this._wrapper?.offsetHeight,s=this._wrapper?.offsetWidth;if(!a||!s)return;let l=xe(i.bottom,a),p=xe(i.left,s),c=xe(i.right,s),d=xe(i.top,a),u=p+c,m=l+d;u>U&&(p*=U/u,c*=U/u,u=U),m>U&&(l*=U/m,d*=U/m,m=U);let g=a*(1-m),f=s*(1-u),y=new A(n,e),_=new h(y.ne.latitude,y.sw.longitude),E=y.sw.distanceTo(_,"deg","mercator"),w=(y.ne.longitude-_.longitude+360)%360,B=Math.max(E,w*g/f)/(1-m),v=Math.max(w,E*f/g)/(1-u),I=Math.log2(s*360/v)-8;I>o&&(I=o,v=s*360/2**(I+8),B=v*a/s);let D=y.getCenter("mercator"),$=(d-l)/2*B,R=(c-p)/2*v;D.add($,R,"deg","mercator"),this.setZoomCenter(I,D,r);}setCenter(e,n=false){this._map.setCenter(new h(e),n);}setPadding({bottom:e=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:i=this._padding.top}){return this._padding={bottom:e,left:n,right:r,top:i},this}setPanHandler(e){P(e,"function"),this._panHandler=e;}setPanStartHandler(e){P(e,"function"),this._panStartHandler=e;}setZoom(e,n=false){this._map.setZoom(e,n);}setZoomCenter(e,n,r=false){this._map.setZoomCenter(e,n,r);}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(e=>this._resolveMoving=e),this._resolveIdle();}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(e=>this._resolveIdle=e),this._resolveMoving();}};var X=createContext(null);function dr(){let t=useContext(X);if(!t||t.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return t.map}var Ge=({apiKey:t,bounds:e,children:n,className:r,clientKey:i,controls:o=true,defaultCenter:a={latitude:39.83,longitude:-98.58},defaultZoom:s=4,mapRef:l,padding:p={bottom:50,left:50,right:50,top:50},panHandler:c=()=>null,panStartHandler:d=()=>null,provider:u=Ue,providerOptions:m={},singleZoom:g=14,iframeId:f})=>{let y=useRef(null),[_,E]=useState(new h(a)),[w,B]=useState(false),[v,I]=useState(),[D,$]=useState(s),R=(C,O)=>{c(C,O),O&&E(O.getCenter());};return useEffect(()=>{!w||!v||$(v.getZoom());},[_]),useEffect(()=>{if(!e||!w||!v)return;let C=e.map(O=>new h(O));v.fitCoordinates(C);},[JSON.stringify(e),v]),useEffect(()=>{if(!w||v)return;let C=f&&typeof document<"u"?document.getElementById(f)?.contentWindow??void 0:void 0,O=new ce().withControlEnabled(o).withDefaultCenter(_).withDefaultZoom(D).withPadding(p).withPanHandler(R).withPanStartHandler(d).withProvider(u).withProviderOptions(m).withSinglePinZoom(g).withWrapper(y.current).withIframeWindow(C).withApiKey(t).build();I(O),l&&(l.current=O);},[w]),useEffect(()=>{w||v||!y.current||u instanceof T&&u.load(t,{...m,...i&&{client:i}}).then(()=>B(true));},[]),jsx("div",{className:rn({"is-loaded":w},r),id:"map",ref:y,"data-testid":"map",children:v&&jsx(X.Provider,{value:{map:v,provider:u},children:n})})};var hr=({count:t})=>jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:jsxs("g",{fill:"none",fillRule:"evenodd",children:[jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:t})})]})}),Ee=createContext(null);function fr(){let t=useContext(Ee);if(!t)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return t}var gr=({clusterRadius:t=50,children:e,ClusterTemplate:n=hr})=>{let{map:r}=useContext(X),[i,o]=useState([]),[a,s]=useState(),[l,p]=useState([]),[c,d]=useState([]);return useEffect(()=>{s(yr(i,r.getZoom(),t));},[i,r.getZoom()]),useEffect(()=>{d(()=>[]),p(()=>[]),a?.length!==0&&a?.forEach(u=>{if(u.length===1){u[0].pin.setMap(r);return}if(u.length>1){let m=A.fit(u.map(f=>f.pin.getCoordinate())).getCenter("mercator"),g=`cluster-{${m._lat},${m._lon}}`;u.forEach(f=>f.pin.setMap(null)),p(f=>[...f,g]),d(f=>[...f,jsx(de,{coordinate:m,id:g,onClick:()=>r.fitCoordinates(u.map(y=>y.pin.getCoordinate()),true,1/0),children:jsx(n,{count:u.length})},g)]);}});},[a]),jsx(Ee.Provider,{value:{clusters:a??[],clusterIds:l,setPinStore:o},children:jsxs(Fragment,{children:[c.map((u,m)=>jsx(Fragment$1,{children:u},m)),e]})})},yr=(t,e,n)=>{let r=n*Math.PI/2**(e+7),i=t.map((s,l)=>[l]),o=[];t.forEach((s,l)=>{for(let p=l;p<t.length;p++)p!==l&&new h(s.pin.getCoordinate()).distanceTo(new h(t[p].pin.getCoordinate()),"r","mercator")<=r&&(i[l].push(p),i[p].push(l));});let a=1;for(;a;){a=0;let s;if(i.forEach((c,d)=>{c.length>a&&(a=c.length,s=d);}),!a)break;let l=i[s??0],p=[];i[s??0]=[];for(let c of l){let d=i[c];p.push(t[c]),i[c]=[],d.forEach(u=>i[u].splice(i[u].indexOf(c),1));}o.push(p);}return o};var Cr=jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),de=({children:t,coordinate:e,hideOffscreen:n=false,id:r,icon:i=Cr,onClick:o=()=>null,onFocus:a=()=>null,onHover:s=()=>null,zIndex:l,hasPinUrl:p=false})=>{let{map:c,provider:d}=useContext(X),u=useContext(Ee),m=useMemo(()=>new K().withCoordinate(e).withHideOffscreen(n).withProvider(d).withHasPinUrl(p).build(),[]);useEffect(()=>{if(l!==0&&!l)return;let f=m.getProviderPin().getWrapperElement();f&&(f.style.zIndex=l.toString());},[l]),useEffect(()=>{m.setMap(c),m.setClickHandler(()=>o(r)),m.setFocusHandler(y=>a(y,r)),m.setHoverHandler(y=>s(y,r));let f=u?.clusterIds.includes(r);return u&&!f&&u.setPinStore(y=>[...y,{pin:m,id:r}]),()=>{m.setMap(null),u&&u.setPinStore(y=>y.filter(_=>_.id!==r));}},[]);let g=t||i;if(g){let f=m.getProviderPin().getPinElement();return Object.assign(f.style,{height:"auto",width:"auto"}),createPortal(g,f)}return null};var _r=({children:t,coordinate:e,linkSameTab:n,pinUrl:r,onClick:i=()=>null,onHover:o=()=>null,onFocus:a=()=>null,...s})=>jsx(Ge,{bounds:[e],...s,children:jsx(de,{coordinate:e,id:"location-map-marker",onClick:i,onHover:o,onFocus:a,hasPinUrl:(r||"")?.length>0,children:r?jsx(Fe,{href:r,target:n?"_self":"_blank","aria-label":"map-marker",children:t}):t||void 0})});var wr=(s=>(s.Monday="MONDAY",s.Tuesday="TUESDAY",s.Wednesday="WEDNESDAY",s.Thursday="THURSDAY",s.Friday="FRIDAY",s.Saturday="SATURDAY",s.Sunday="SUNDAY",s))(wr||{});function ue(t){let e={1:"MONDAY",2:"TUESDAY",3:"WEDNESDAY",4:"THURSDAY",5:"FRIDAY",6:"SATURDAY",7:"SUNDAY"};if(t.weekday in e)return e[t.weekday];throw new Error(`Invalid DateTime.weekday property: ${t}, ${t.weekday}`)}function G(t){return {MONDAY:"Monday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday",THURSDAY:"Thursday",FRIDAY:"Friday",SATURDAY:"Saturday",SUNDAY:"Sunday"}[t]}var Le=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],ee={MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday",SUNDAY:"sunday"},Y=class{end;start;constructor(e,n,r){this.end=e.setZone(r),this.start=e.setZone(r),[n.start,n.end].forEach(p=>{if(p.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});let[i,o]=n.start.split(":").map(Number),[a,s]=n.end.split(":").map(Number),l=0;a<i&&(l=1),this.end=this.end.set({hour:a,minute:s,day:this.end.day+l}),this.start=this.start.set({hour:i,minute:o}),this.end.minute===59&&(this.end=this.end.set({minute:60}));}contains(e){return this.start<=e&&e<this.end}getStartTime(e,n){let r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(e||"en-US").toLocaleString(r).replace("\u202F"," ")}getEndTime(e,n){let r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(e||"en-US").toLocaleString(r).replace("\u202F"," ")}timeIsEqualTo(e){let n=this.getStartTime()===e.getStartTime(),r=this.getEndTime()===e.getEndTime();return n&&r}is24h(){let e=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return e&&n&&r}},J=class{holidayHoursByDate;hours;timezone;constructor(e,n){this.holidayHoursByDate=Object.fromEntries((e.holidayHours||[]).map(r=>[r.date,r])),this.hours=e,this.timezone=n;}getInterval(e){if(this.isTemporarilyClosedAt(e))return null;let n=e.minus({days:1});for(let r of [n,e]){let i=this.getHours(r);if(i&&!i.isClosed)for(let o of i.openIntervals||[]){let a=new Y(r,o,this.timezone);if(a.contains(e))return a}}return null}getCurrentInterval(){return this.getInterval(DateTime.now())}getIntervalAfter(e){let n=this.getIntervalsForNDays(8,e),r=(o,a)=>o.start===a.start?0:o.start>a.start?1:-1,i=n.sort(r);for(let[o,a]of i.entries())if(a.contains(e)&&i.length>o+1)return i[o+1];for(let o of i)if(o.start>e)return o;return null}getIntervalsForNDays(e,n){let r=[];for(let i=0;i<e;i++){let o=n;o=o.plus({days:i});let a=this.getHours(o);a?.openIntervals&&!a.isClosed&&r.push(...a.openIntervals.map(s=>new Y(o,s,this.timezone)));}return r}getHolidayHours(e){return this.isTemporarilyClosedAt(e)?null:this.holidayHoursByDate[(e.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(e){if(this.isTemporarilyClosedAt(e))return null;let n=G(ue(e)).toLowerCase();return this.hours[n]}getHours(e){let n=this.getHolidayHours(e);return !n||n.isRegularHours?this.getNormalHours(e):n}getNextInterval(){return this.getIntervalAfter(DateTime.now())}isHoliday(e){return !!this.getHolidayHours(e)}isTemporarilyClosedAt(e){if(!this.hours.reopenDate)return false;let n=this.hours.reopenDate.split("-");if(n.length===3){let[r,i,o]=n,a=DateTime.fromObject({year:Number(r),month:Number(i),day:Number(o)},{zone:this.timezone});if(e<a)return true}return false}isOpenAt(e){return this.isTemporarilyClosedAt(e)?false:!!this.getInterval(e)}isOpenNow(){return this.isOpenAt(DateTime.now())}};function Jt(t,e){let n=[...t];return e=e%n.length,n.concat(n.splice(0,n.length-e))}function en(t,e){if(t.length!==e.length)return false;for(let[n,r]of t.entries())if(!r.timeIsEqualTo(e[n]))return false;return true}function me(t){return t?.currentInterval?.is24h?.()||false}function he(t){return !t.futureInterval}function xr(t){return me(t)?jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):he(t)?jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):jsx("span",{className:"HoursStatus-current",children:t.isOpen?"Open Now":"Closed"})}function Hr(t){return me(t)||he(t)?null:jsx("span",{className:"HoursStatus-separator",children:" \u2022 "})}function Ir(t){return me(t)||he(t)?null:jsx("span",{className:"HoursStatus-future",children:t.isOpen?"Closes at":"Opens at"})}function Sr(t){if(me(t)||he(t))return null;let e="";if(t.isOpen){let n=t.currentInterval;e+=n?n.getEndTime("en-US",t.timeOptions):"";}else {let n=t.futureInterval;e+=n?n.getStartTime("en-US",t.timeOptions):"";}return jsxs("span",{className:"HoursStatus-time",children:[" ",e]})}function Er(t){if(me(t)||he(t))return null;let e={weekday:"long",...t.dayOptions},n="";if(t.isOpen){let r=t.currentInterval;n+=r?.end?.setLocale("en-US").toLocaleString(e)||"";}else {let r=t.futureInterval;n+=r?.start?.setLocale("en-US").toLocaleString(e)||"";}return jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function Or(t,e){let n=t.currentTemplate||xr,r=t.separatorTemplate||Hr,i=t.futureTemplate||Ir,o=t.timeTemplate||Sr,a=t.dayOfWeekTemplate||Er;return jsxs("div",{className:rn("HoursStatus",e?.className||""),children:[n(t),r(t),i(t),o(t),a(t)]})}var Lr={minHeight:`${1.5}em`},Ar=t=>{let[e,n]=useState(false),[r,i]=useState(false);if(useEffect(()=>{i(true);},[]),!t.hours)return jsx(Fragment,{});let o=t.statusTemplate||Or,a=new J(t.hours,t.timezone),s=a.isOpenNow(),l=a.getCurrentInterval(),p=a.getNextInterval(),c=l?.end||p?.start;if(c&&!e){n(true);let u=c.toMillis()-DateTime.now().toMillis();setTimeout(()=>n(false),u);}let d={isOpen:s,currentInterval:l,futureInterval:p,...t};return jsx(Fragment,{children:r?o(d,t):jsx("div",{style:Lr,className:rn("HoursStatus",t?.className||"")})})};function kr(t,e){let n=[];return t.forEach(r=>{let i=n[n.length-1];i?en(i.intervals,r.intervals)?(i.endDay=r.endDay,i.isToday=i.isToday||r.isToday):n.push({...r}):n.push({...r});}),n.map(r=>{let i=e&&ee[r.startDay]in e?e[ee[r.startDay]]||"":G(r.startDay),o=e&&ee[r.endDay]in e?e[ee[r.endDay]]||"":G(r.endDay);return {...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${i}`:`${i} - ${o}`}})}function Nr(t,e,n){let r=[],i=t.intervals.length>0&&t.intervals[0].is24h();return t.intervals.length===0?r.push(n?.isClosed||"Closed"):i?r.push(n?.open24Hours||"Open 24 hours"):t.intervals.forEach(o=>{let a=o.getStartTime(n?.timeFormatLocale||"en-US",e),s=o.getEndTime(n?.timeFormatLocale||"en-US",e);r.push(`${a} - ${s}`);}),r}function Fr(t,e,n){let r=[];for(let i=1;i<=7;i++){let o=DateTime.fromObject({weekday:i}),a=ue(o);r.push({startDay:a,endDay:a,dayName:n&&G(a).toLowerCase()in n?n[G(a).toLowerCase()]||"":G(a),intervals:t.filter(s=>s.start.weekday===i),isToday:e?.weekday===i});}return r}var Br=t=>{let[e,n]=useState(false);return useEffect(()=>{n(true);},[]),t.hours?jsx(Fragment,{children:e?jsx($r,{...t}):jsx(Ur,{...t})}):jsx(Fragment,{})},$r=t=>{let e=new J(t.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),n=DateTime.now(),r=e.getIntervalsForNDays(7,n),i=Fr(r,n,t.dayOfWeekNames);return jsx(je,{...t,hoursData:i,isClient:true})},Ur=t=>{let{hours:e,dayOfWeekNames:n,intervalTranslations:r}=t,i=Le.map(a=>{let s=ee[a];return {dayName:n?.[s]||G(a),startDay:a,endDay:a,isToday:false,intervals:e[s]?.openIntervals?.map(l=>new Y(DateTime.now(),l,"UTC"))??[]}}),o=e.holidayHours?.map(a=>{let s=DateTime.fromFormat(a.date,"yyyy-MM-dd"),l=ue(s);return {dayName:s.setLocale(r?.timeFormatLocale||"en-US").toLocaleString(),isToday:false,startDay:l,endDay:l,intervals:(a.isRegularHours?a.openIntervals?.map(p=>new Y(s,p,"UTC")):i.find(p=>p.startDay===l)?.intervals)??[]}});return jsxs(Fragment,{children:[jsx(je,{...t,hoursData:i,isClient:false}),o&&o.length>0&&jsx(je,{...t,hoursData:o,isClient:false,isHolidayHours:true}),e.reopenDate&&jsxs("div",{className:"HoursTable-row",children:[jsx("span",{className:"HoursTable-day",children:r?.reopenDate||"Reopen Date"}),jsx("span",{className:"HoursTable-intervals",children:DateTime.fromFormat(e.reopenDate,"yyyy-MM-dd").setLocale(r?.timeFormatLocale||"en-US").toLocaleString()})]})]})},je=t=>{let{intervalStringsBuilderFn:e,className:n,timeOptions:r,intervalTranslations:i,dayOfWeekNames:o,startOfWeek:a,isClient:s,isHolidayHours:l}=t,p=t.hoursData;function c(m){return m?{today:ue(DateTime.now()),monday:"MONDAY",tuesday:"TUESDAY",wednesday:"WEDNESDAY",thursday:"THURSDAY",friday:"FRIDAY",saturday:"SATURDAY",sunday:"SUNDAY"}[m]:"SUNDAY"}let d=Le.indexOf(c(s||a!=="today"?a:"sunday")),u=Jt(Le,7-d);return l||(p.sort((m,g)=>u.indexOf(m.startDay)-u.indexOf(g.startDay)),t.collapseDays&&(p=kr(p,o))),jsx("div",{className:rn("HoursTable",n),children:p.map(m=>{let f=(e||Nr)(m,r,i);return jsxs("div",{className:rn("HoursTable-row",{"is-today":m.isToday}),children:[jsx("span",{className:"HoursTable-day",children:m.dayName}),jsx("span",{className:"HoursTable-intervals",children:f.map((y,_)=>jsx("span",{className:"HoursTable-interval",children:y},_))})]},m.dayName)})})};var Js=t=>`<script type="application/ld+json">
|
|
2
|
+
${JSON.stringify(t)}
|
|
3
|
+
</script>`;var ne=(t,e)=>{if(!(!t.name||typeof t.name!="string"))return {"@context":"https://schema.org","@type":e,name:t.name}};var Wr=t=>typeof t!="object"?false:!!t.name||!!t.address,Gr=t=>typeof t!="object"?false:!!t.line1||!!t.city||!!t.region||!!t.postalCode||!!t.countryCode,Ae=t=>Gr(t)&&{address:{"@type":"PostalAddress",streetAddress:t.line1,addressLocality:t.city,addressRegion:t.region,postalCode:t.postalCode,addressCountry:t.countryCode}},Ye=t=>Wr(t)&&{"@type":"Place",name:t.name,...Ae(t.address)};var an=t=>typeof t!="object"||!("image"in t)?false:"url"in t.image&&typeof t.image.url=="string",q=t=>{if(!t)return {};let e=new Array;for(let n of t)an(n)&&e.push(n.image.url);return {image:e}},Zr=t=>an(t)&&{image:t.image.url};var zr=t=>typeof t!="object"?false:!!t.name,jr=t=>Array.isArray(t)&&t.length>0,qe=t=>jr(t)&&{performer:{"@type":"PerformingGroup",name:t.join(" and ")}},Qe=t=>zr(t)&&{organizer:{"@type":"Organization",name:t.name,...t.url&&{url:t.url}}};var Vr=["BackOrder","Discontinued","InStock","InStoreOnly","LimitedAvailability","MadeToOrder","OnlineOnly","OutOfStock","PreOrder","PreSale","Reserved","SoldOut"],Kr=t=>typeof t!="object"?false:"priceCurrency"in t&&"price"in t&&"availability"in t&&Vr.includes(t.availability),fe=t=>Kr(t)&&{offers:{"@type":"Offer",url:t.url,priceCurrency:t.priceCurrency,price:t.price,priceValidUntil:t.priceValidUntil,itemCondition:t.itemCondition,availability:t.availability}};var dl=(t,e)=>{let n=Ye({name:t.geomodifier,address:t.address});return {...ne(t,e??"Event"),...q(t.photoGallery),...n&&{location:n},...qe(t.performers),...Qe({name:t.organizerName}),...fe({url:"",priceCurrency:t.c_currency,price:t.price,priceValidUntil:t.expirationDate,itemCondition:t.condition,availability:t.stockStatus}),...t.c_startDate&&{startDate:t.c_startDate},...t.c_endDate&&{endDate:t.c_endDate},...t.description&&{description:t.description},...t.attendance&&{eventAttendanceMode:t.attendance},...t.eventStatus&&{eventStatus:t.eventStatus}}};var sn=t=>typeof t!="object"?false:"monday"in t||"tuesday"in t||"wednesday"in t||"thursday"in t||"friday"in t||"saturday"in t||"sunday"in t,Yr=t=>typeof t!="object"?false:t.isClosed?true:"openIntervals"in t&&Array.isArray(t.openIntervals)&&t.openIntervals.length?t.openIntervals.every(e=>typeof e=="object"&&"start"in e&&"end"in e):false,Xe=t=>{if(!sn(t))return {};let e=new Map;e=H(t.monday,e,"Mo"),e=H(t.tuesday,e,"Tu"),e=H(t.wednesday,e,"We"),e=H(t.thursday,e,"Th"),e=H(t.friday,e,"Fr"),e=H(t.saturday,e,"Sa"),e=H(t.sunday,e,"Su");let n=new Array;for(let[r,i]of e){let o=i.join(",");n.push(o+" "+r);}return {openingHours:n}},qr=t=>{if(!sn(t))return {};let e=new Map;e=H(t.monday,e,"Monday"),e=H(t.tuesday,e,"Tuesday"),e=H(t.wednesday,e,"Wednesday"),e=H(t.thursday,e,"Thursday"),e=H(t.friday,e,"Friday"),e=H(t.saturday,e,"Saturday"),e=H(t.sunday,e,"Sunday");let n=[];e.forEach((o,a)=>{a.split("-").length===2&&n.push({"@type":"OpeningHoursSpecification",dayOfWeek:o.length===1?`https://schema.org/${o[0]}`:o.map(s=>`https://schema.org/${s}`),opens:a.split("-")[0],closes:a.split("-")[1]});});let r={openingHoursSpecification:n},i=Qr(t.holidayHours);return i?.length&&(r.specialOpeningHoursSpecification=i),r},Qr=t=>{if(!t||!Array.isArray(t))return [];let e=[];for(let n of t)n.isRegularHours||!n.date||(n.isClosed?e.push({"@type":"OpeningHoursSpecification",validFrom:n.date,validThrough:n.date,opens:"00:00",closes:"00:00"}):n.openIntervals?.forEach(r=>{!r.start||!r.end||e.push({"@type":"OpeningHoursSpecification",validFrom:n.date,validThrough:n.date,opens:r.start,closes:r.end});}));return e},H=(t,e,n)=>{if(!Yr(t))return e;if(t.isClosed||!t.openIntervals){let r="00:00-00:00",i=e.get(r)??[];return i.push(n),e.set(r,i),e}for(let r=0;r<t.openIntervals.length;r++){let i=t.openIntervals[r].start+"-"+t.openIntervals[r].end,o=e.get(i)??[];o.push(n),e.set(i,o);}return e};var vl=(t,e)=>({...ne(t,e??"LocalBusiness"),...Ae(t.address),...Xe(t.hours),...q(t.photoGallery),description:t.description,telephone:t.mainPhone,email:t.email});var Xr=t=>typeof t!="object"?false:"ratingValue"in t,Jr=t=>typeof t!="object"?false:"ratingValue"in t&&"reviewCount"in t,Je=t=>Xr(t)&&{review:{"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:t.ratingValue,bestRating:t.bestRating},...t.author&&{author:{"@type":"Person",name:t.author}}}},et=t=>Jr(t)?{aggregateRating:{"@type":"AggregateRating",ratingValue:t.ratingValue,reviewCount:t.reviewCount}}:void 0;var Ml=(t,e)=>({...ne(t,e??"Product"),...q(t.photoGallery),...Je(t.c_reviews),...et(t.c_aggregateRating),...fe({url:"",priceCurrency:t.c_currency,price:t.price,priceValidUntil:t.expirationDate,itemCondition:t.condition,availability:t.stockStatus}),description:t.description,sku:t.sku,mpn:t.mpn,...t.brand&&{brand:{"@type":"Brand",name:t.brand}}});var ei=t=>!t||typeof t!="object"?false:"question"in t&&"answer"in t,ti=t=>!t||typeof t!="object"?false:"question"in t&&"answerV2"in t?"json"in t.answerV2&&typeof t.answerV2.json=="object":false;function tt(t,e){for(let n in t)if(typeof t[n]=="object")if(Array.isArray(t[n]))for(let r=0;r<t[n].length;r++)tt(t[n][r],e);else tt(t[n],e);else n==="text"&&e.push(t[n]);}function ni(t){if(t.json){let e=[];return tt(t.json,e),e.join("")}return ""}var Hl=t=>{let e=t.map(n=>{if(ei(n)||ti(n))return {"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:"answer"in n?n.answer:ni(n.answerV2)}}}).filter(Boolean);if(e.length)return {"@context":"http://www.schema.org","@type":"FAQPage",mainEntity:e}};var nt=Math.log2(1.6745627884839434),ri=4,ii=19,rt="js-baidu-neg-lng-fix",pn,oi=new Promise(t=>pn=t),ai="https://api.map.baidu.com/geoconv/v1/",ge=[],si="gcj02ToBD09Callback_b872c21c",li=0,ln;async function cn(t){return await new Promise((e,n)=>{ge.push({coordinates:t,resolve:e,reject:n}),ge.length===1&&(ln=setTimeout(r,100)),ge.length>40&&(clearTimeout(ln),r());function r(){let i=ge;ge=[];let o=[].concat(...i.map(l=>l.coordinates)),a=si+"_"+li++,s=document.createElement("script");window[a]=l=>{if(l.status){let d=new Error(`Unable to convert coordinates to BD-09: Received status code ${l.status}${l.message?": "+l.message:""}`);i.forEach(u=>u.reject(d));}let p=l.result.map(d=>new h(d.y,d.x)),c=0;i.forEach(d=>{d.resolve(p.slice(c,c+=d.coordinates.length));}),delete window[a],s.parentNode?.removeChild(s);},oi.then(l=>{let p={ak:l,callback:a,coords:o.map(c=>`${c.longitude},${c.latitude}`).join(";"),from:3,to:5};s.src=ai+"?"+Object.entries(p).map(([c,d])=>c+"="+d).join("&"),document.head.appendChild(s);});}})}var it=class extends x{_wrapper;map;_panStartHandler;_panHandler;_centerReady;constructor(e){super(e);let n=!!(window.MSInputMethodContext&&document.DOCUMENT_NODE);this._wrapper=e.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:e.controlEnabled,maxZoom:n?14:18,...e.providerOptions}),e.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this._panStartHandler=()=>null,this._panHandler=()=>null,this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper&&(this._wrapper.dataset.baiduZoom=this.map.getZoom()),this._panHandler();}),this._centerReady=Promise.resolve();}getCenter(){return new h(this.map.getCenter())}getZoom(){return this.map.getZoom()-nt}setCenter(e,n){this._centerReady=cn([e]).then(([r])=>{let i=new BMap.Point(r.longitude,r.latitude);this.map.panTo(i,{noAnimation:!n});});}setZoom(e,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(e+nt)},{enableAnimation:n});});}},ot=class extends k{_wrapper;_zIndex;_wrapperClass;_originalWrapperClass;_element;_coordinateReady;_negativeLngFix;pin;constructor(e){super(e),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=false;class n extends BMap.Marker{pin;constructor(o,a){super(o),this.pin=a;}initialize(o){return this.pin._wrapper=super.initialize(o),this.pin._wrapper&&(this.pin._wrapper.style.zIndex=this.pin._zIndex.toString(),this.pin._originalWrapperClass=this.pin._wrapper.getAttribute("class")??"",this.pin._wrapper.setAttribute("class",this.pin._getClass()),this.pin._wrapper.appendChild(this.pin._element),this.pin.addListeners()),this.pin._wrapper}draw(){if(this.pin._wrapper){let o=this.pin._wrapper.style.zIndex;super.draw(),this.pin._wrapper.style.height="",this.pin._wrapper.style.width="",this.pin._wrapper.style.pointerEvents="none",this.pin._wrapper.style.zIndex=o;}else super.draw();}}this.pin=new n(new BMap.Point(0,0),this);let r=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(r),this.pin.setShadow(r);}addListeners(){super.addListeners(),this._wrapper&&this._wrapper.addEventListener("touchend",()=>this._clickHandler());}setCoordinate(e){this._coordinateReady=cn([e]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](rt);});}setMap(e,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),e&&e.getProviderMap().map.addOverlay(this.pin);});}setProperties(e){super.setProperties(e),this._wrapperClass=e.getClass(),this._element=e.getElement()||this._pinEl,this._zIndex=e.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass());}_getClass(){return `${this._originalWrapperClass} ${this._negativeLngFix?rt:""} ${this._wrapperClass}`}},pi="https://api.map.baidu.com/getscript";function ci(t,e,n,{params:r={},version:i="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();let o=n,a={ak:o,v:i,...r};pn(o);let s=document.createElement("script");s.src=pi+"?"+Object.entries(a).map(([c,d])=>c+"="+d).join("&"),s.onload=()=>t(),document.head.appendChild(s);let l="";for(let c=ri;c<=ii;c++){let d=2**(c-nt+7);l+=`[data-baidu-zoom="${c}"] .${rt}{transform:translateX(-${d}px);}`;}let p=document.createElement("style");p.appendChild(document.createTextNode(l)),document.head.appendChild(p);}var di=new M().withLoadFunction(ci).withMapClass(it).withPinClass(ot).withProviderName("Baidu").build();var un;function ui(){class t extends Microsoft.Maps.CustomOverlay{_container;_pins;_viewChangeEventHandler;_map;constructor(){super({beneathLabels:false}),this._container=document.createElement("div"),this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0";}addPin(n){this._pins.add(n),n._wrapper&&(n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper)),this._map&&this.updatePinPosition(n);}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container);}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions();}onRemove(){this._viewChangeEventHandler&&Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null;}removePin(n){this._pins.delete(n),n._wrapper&&this._container.removeChild(n._wrapper);}updatePinPosition(n){if(!this._map)return;let r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper&&r instanceof Microsoft.Maps.Point&&(n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px");}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n));}}un=t;}var at=class extends x{wrapper;map;pinOverlay;constructor(e){super(e),this.wrapper=e.wrapper,this.wrapper&&(this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!e.controlEnabled,disableZooming:!e.controlEnabled,showLocateMeButton:false,showMapTypeSelector:false,showScalebar:false,showTrafficButton:false,...e.providerOptions}),this.pinOverlay=new un(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler()));}getCenter(){return new h(this.map?.getCenter()??{lat:0,lng:0})}getZoom(){return this.map?.getZoom()??0}setCenter(e,n){let r=new Microsoft.Maps.Location(e.latitude,e.longitude);this.map?.setView({center:r}),this.pinOverlay.updatePinPositions();}setZoom(e,n){this.map?.setView({zoom:Math.floor(e)}),this.pinOverlay.updatePinPositions();}},st=class extends k{_location;_map;static _pinId;static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(e){super(e),this._map=null,this._location=new Microsoft.Maps.Location(0,0);}setCoordinate(e){this._location=new Microsoft.Maps.Location(e.latitude,e.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this);}setMap(e,n){n&&n.getProviderMap().pinOverlay.removePin(this),e&&e.getProviderMap().pinOverlay.addPin(this),this._map=e;}},dn="BingMapsCallback_593d7d33",mi="https://www.bing.com/api/maps/mapcontrol";function hi(t,e,n,{params:r={}}={}){window[dn]=()=>{ui(),t();};let i={callback:dn,key:n,...r};we(mi+"?"+Object.entries(i).map(([o,a])=>o+"="+a).join("&"));}var fi=new M().withLoadFunction(hi).withMapClass(at).withPinClass(st).withProviderName("Bing").build();var pt=class extends x{instance;map;constructor(e){super(e);let n=e?.iframeWindow?.mapboxgl??lt;if(n.accessToken=e?.apiKey??"",this.instance=n,e.wrapper&&(this.map=new this.instance.Map({container:e.wrapper,interactive:e.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...e.providerOptions})),e.controlEnabled){let r=new this.instance.NavigationControl({showCompass:false});this.map?.addControl(r);}this.map?.on("movestart",()=>this._panStartHandler()),this.map?.on("moveend",()=>this._panHandler());}getCenter(){return new h(this.map?.getCenter()??{lat:0,lng:0})}getZoom(){return (this.map?.getZoom()??0)+1}setCenter(e,n){let r=new this.instance.LngLat(e.longitude,e.latitude);this.map&&this.map[n?"panTo":"setCenter"](r);}setZoom(e,n){this.map&&this.map[n?"zoomTo":"setZoom"](e-1);}setZoomCenter(e,n,r){let i=new this.instance.LngLat(n.longitude,n.latitude);this.map&&this.map[r?"easeTo":"jumpTo"]({center:i,zoom:e-1});}},ct=class extends k{pin;constructor(e){super(e),this._wrapper&&(this._wrapper.style.position="relative",this.pin=new lt.Marker({anchor:"top-left",element:this._wrapper}));}setCoordinate(e){this.pin?.setLngLat(new lt.LngLat(e.longitude,e.latitude));}setMap(e,n){if(e){let r=e.getProviderMap().map;r&&this.pin?.addTo(r);}else this.pin?.remove();}};function gi(t,e,n,{version:r="v1.13.0"}={}){let i=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";let a=document.createElement("script");a.src=i+".js",a.onload=()=>{t();},document.head.appendChild(o),document.head.appendChild(a);}var yi=new M().withLoadFunction(gi).withMapClass(pt).withPinClass(ct).withProviderName("Mapbox").build();var De=class t extends x{map;static apiKey;constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map?.zoomControl.setPosition("topright"),this.map?.on("movestart",()=>this._panStartHandler()),this.map?.on("moveend",()=>this._panHandler());}getCenter(){return new h(this.map?.getCenter()??{lat:0,lng:0})}getZoom(){return this.map?.getZoom()??0}setCenter(e,n){let r=new L.LatLng(e.latitude,e.longitude);this.map?.panTo(r,{animate:n});}setZoom(e,n){this.map?.setZoom(e,{animate:n});}setZoomCenter(e,n,r){let i=new L.LatLng(n.latitude,n.longitude);this.map?.setView(i,e,{animate:r});}_initMap(e){e.wrapper&&(this.map=new L.Map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions}));let n=e.providerOptions,r=n.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",i=n.tileLayerOptions||{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery \xA9 <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};i.accessToken=t.apiKey,this.map&&L.tileLayer(r,i).addTo(this.map);}},dt=class extends V{pin;constructor(e){super(e),this.pin=new L.Marker(new L.LatLng(0,0)),this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(true)),this.pin.on("mouseout",()=>this._hoverHandler(false));}setCoordinate(e){let n=new L.LatLng(e.latitude,e.longitude);this.pin.setLatLng(n);}setMap(e,n){if(e){let r=e.getProviderMap().map;r&&this.pin.addTo(r);}else this.pin.remove();}setProperties(e){let n=e.getWidth(),r=e.getHeight(),i=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.Icon({iconUrl:this._icons[e.getIcon()],iconSize:[n,r],iconAnchor:[i*n,o*r],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex());}};function vi(t,e,n,{version:r="1.7.1"}={}){let i=`https://unpkg.com/leaflet@${r}/dist/leaflet`;De.apiKey=n;let o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";let a=document.createElement("script");a.src=i+".js",a.onload=()=>t(),document.head.appendChild(o),document.head.appendChild(a);}var Re=new M().withLoadFunction(vi).withMapClass(De).withPinClass(dt).withProviderName("Leaflet").build();var Pi=Re.getMapClass(),bi=Re.getPinClass(),ut=class extends Pi{map;_initMap(e){this.map=L.mapquest.map(e.wrapper,{boxZoom:e.controlEnabled,center:new L.LatLng(0,0),doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});}},mt=class extends bi{};function Ci(t,e,n,{version:r="v1.3.2"}={}){let i=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";let a=document.createElement("script");a.src=i+".js",a.onload=()=>{L.mapquest.key=n,t();},document.head.appendChild(o),document.head.appendChild(a);}var _i=new M().withLoadFunction(Ci).withMapClass(ut).withPinClass(mt).withProviderName("MapQuest").build();
|
|
4
|
+
export{fn as Address,Ae as AddressSchema,et as AggregateRatingSchema,Ce as Analytics,z as AnalyticsContext,Xi as AnalyticsProvider,Po as AnalyticsScopeProvider,di as BaiduMaps,ne as BaseSchema,fi as BingMaps,gr as Clusterer,h as CoordinateClass,wr as Day,dl as Event,Hl as FAQPage,Ue as GoogleMaps,Ar as HoursStatus,Br as HoursTable,Nn as Image,N as ImageLayoutOption,Re as LeafletMaps,Fe as Link,gt as ListingPublisherOption,vl as LocalBusiness,_r as LocationMap,Ye as LocationSchema,Ge as Map,ke as MapProviderOption,_i as MapQuestMaps,yi as MapboxMaps,de as Marker,fe as OfferSchema,Xe as OpeningHoursSchema,qr as OpeningHoursSpecificationSchema,Qe as OrganizationSchema,qe as PerformerSchema,q as PhotoGallerySchema,Zr as PhotoSchema,Ml as Product,Je as ReviewSchema,Js as SchemaWrapper,be as debuggingParamDetected,mn as getDirections,oe as getImageUrl,ni as getRichTextContent,xt as useAnalytics,fr as useClusterContext,dr as useMapContext,On as useScope};
|
package/package.json
CHANGED
|
@@ -1,49 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yext/pages-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A React component library that supports Yext Pages development",
|
|
5
|
-
"author": "sumo@yext.com",
|
|
6
|
-
"license": "BSD-3-Clause",
|
|
7
5
|
"keywords": [
|
|
8
|
-
"
|
|
9
|
-
"
|
|
6
|
+
"React",
|
|
7
|
+
"Yext"
|
|
10
8
|
],
|
|
9
|
+
"license": "BSD-3-Clause",
|
|
10
|
+
"author": "sumo@yext.com",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/yext/js.git"
|
|
14
14
|
},
|
|
15
|
-
"sideEffects": [
|
|
16
|
-
"**/*.css"
|
|
17
|
-
],
|
|
18
|
-
"type": "module",
|
|
19
15
|
"files": [
|
|
20
16
|
"dist",
|
|
21
17
|
"THIRD-PARTY-NOTICES"
|
|
22
18
|
],
|
|
23
|
-
"
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": [
|
|
21
|
+
"**/*.css"
|
|
22
|
+
],
|
|
24
23
|
"module": "./dist/index.js",
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
"require": {
|
|
32
|
-
"types": "./dist/index.d.cts",
|
|
33
|
-
"default": "./dist/index.cjs"
|
|
34
|
-
}
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
35
30
|
},
|
|
36
31
|
"./style.css": "./dist/index.css"
|
|
37
32
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"node": "^
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"lexical": "~0.38.2",
|
|
44
|
-
"mapbox-gl": "^2.9.2",
|
|
45
|
-
"react": "^17.0.2 || ^18.2.0",
|
|
46
|
-
"react-dom": "^17.0.2 || ^18.2.0"
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@yext/analytics": "^1.0.0",
|
|
35
|
+
"browser-or-node": "^3.0.0",
|
|
36
|
+
"classnames": "^2.5.1",
|
|
37
|
+
"luxon": "^3.7.2"
|
|
47
38
|
},
|
|
48
39
|
"devDependencies": {
|
|
49
40
|
"@playwright/test": "^1.55.1",
|
|
@@ -64,7 +55,6 @@
|
|
|
64
55
|
"@types/leaflet": "^1.9.12",
|
|
65
56
|
"@types/luxon": "^3.7.1",
|
|
66
57
|
"@types/mapbox-gl": "^3.4.0",
|
|
67
|
-
"@types/mdast": "3.0.10",
|
|
68
58
|
"@types/node": "^20.10.4",
|
|
69
59
|
"@types/react": "^18.2.45",
|
|
70
60
|
"@types/react-dom": "^18.2.17",
|
|
@@ -82,42 +72,26 @@
|
|
|
82
72
|
"prop-types": "^15.8.1",
|
|
83
73
|
"react": "^18.2.0",
|
|
84
74
|
"react-dom": "^18.2.0",
|
|
85
|
-
"storybook": "^8.6.
|
|
75
|
+
"storybook": "^8.6.15",
|
|
86
76
|
"tsup": "^8.0.1",
|
|
87
77
|
"typescript": "^5.3.3",
|
|
88
|
-
"unified": "11.0.4",
|
|
89
78
|
"vite": "^5.4.11",
|
|
90
79
|
"vite-tsconfig-paths": "^4.2.2",
|
|
91
80
|
"vitest": "^3.0.5"
|
|
92
81
|
},
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"@lexical/table": "~0.38.2",
|
|
102
|
-
"@yext/analytics": "^1.0.0",
|
|
103
|
-
"browser-or-node": "^3.0.0",
|
|
104
|
-
"classnames": "^2.5.1",
|
|
105
|
-
"luxon": "^3.7.2",
|
|
106
|
-
"mdast-util-from-markdown": "1.2.0",
|
|
107
|
-
"mdast-util-to-hast": "12.3.0",
|
|
108
|
-
"micromark-util-chunked": "1.0.0",
|
|
109
|
-
"micromark-util-classify-character": "1.0.0",
|
|
110
|
-
"micromark-util-combine-extensions": "1.0.0",
|
|
111
|
-
"micromark-util-resolve-all": "1.0.0",
|
|
112
|
-
"micromark-util-symbol": "1.0.1",
|
|
113
|
-
"micromark-util-types": "1.0.2",
|
|
114
|
-
"react-markdown": "^9.0.2",
|
|
115
|
-
"remark-rehype": "10.1.0"
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"lexical": "~0.38.2",
|
|
84
|
+
"mapbox-gl": "^2.9.2",
|
|
85
|
+
"react": "^18.2.0 || ^19.2.3",
|
|
86
|
+
"react-dom": "^18.2.0 || ^19.2.3"
|
|
87
|
+
},
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": "^20 || ^22 || ^24"
|
|
116
90
|
},
|
|
117
91
|
"scripts": {
|
|
118
92
|
"dev": "pnpm run storybook",
|
|
119
|
-
"build": "tsc && vite build",
|
|
120
|
-
"build
|
|
93
|
+
"build:vite": "tsc && vite build",
|
|
94
|
+
"build": "tsup && pnpm build:css",
|
|
121
95
|
"build:css": "lightningcss --minify --bundle --targets \">= 0.25%\" src/index.css -o dist/index.css",
|
|
122
96
|
"storybook": "storybook dev -p 6006",
|
|
123
97
|
"build-storybook": "storybook build",
|