@uniformdev/mesh-sdk-react 17.5.1-alpha.6 → 17.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enumerable:!0})};import{jsx as l}from"@emotion/react";import*as b from"react";import{createContext as _a,useContext as Ia,useEffect as Va,useState as Ea}from"react";import{createContext as Pa,useContext as ka}from"react";import{Theme as Ta}from"@uniformdev/design-system";import{jsx as Lt,jsxs as La}from"@emotion/react/jsx-runtime";var Ie=Pa(void 0),Oi=({children:e})=>{let r;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(r={sdk:window.UniformMeshSDK}),La(Ie.Provider,{value:r,children:[Lt(Ta,{}),Lt(Ve,{children:e})]})},_t=()=>{let e=ka(Ie);if(!e)throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");return e};function It(){let{sdk:e}=_t();return e}import{jsx as Da}from"@emotion/react/jsx-runtime";var Vt=_a(void 0),Ve=({children:e})=>{let r=It(),[a,o]=Ea(r.getCurrentLocation()),t=n=>{o(i=>({...i,value:n.newValue}))};return Va(()=>(r.events.on("onValueChanged",t),()=>{r.events.off("onValueChanged",t)}),[r]),Da(Vt.Provider,{value:{location:a},children:e})},Ee=()=>{let e=Ia(Vt);if(!e)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return e};function ts(){let{location:e}=Ee();return e}import{initializeUniformMeshSDK as Ma}from"@uniformdev/mesh-sdk";import{useEffect as Ua,useRef as Ba,useState as Et}from"react";var Dt=({autoResizingDisabled:e}={})=>{let[r,a]=Et(),[o,t]=Et(),n=Ba(!1);return Ua(()=>{typeof window=="undefined"||o||(typeof window.UniformMeshSDK=="undefined"&&!n.current?(n.current=!0,Ma({autoResizingDisabled:e}).then(i=>{t(i)}).catch(i=>{a(i)}).finally(()=>{n.current=!1})):t(window.UniformMeshSDK))},[e]),{initializing:!o&&!r,error:r,sdk:o}};function cs(e){let{location:r}=Ee();if(e&&r.type!==e)throw new Error(`Expected location type ${e} but got ${r.type}`);return r}import $a,{useMemo as Ue,useContext as Fa}from"react";import{css as za}from"@emotion/react";import{Icon as Aa,InputSelect as Ha}from"@uniformdev/design-system";import{CgClose as Ga}from"react-icons/cg";import{Fragment as Mt,jsxs as Ut}from"@emotion/react/jsx-runtime";var Bt=({value:e,text:r,loading:a})=>Ut(Mt,{children:[!!r&&r,!r&&Ut(Mt,{children:[a&&`${e} (Loading...)`,!a&&`${e} (Unresolvable)`]})]});import{css as Ye}from"@emotion/react";var zt=Ye`
1
+ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enumerable:!0})};import{jsx as l}from"@emotion/react";import*as y from"react";var Ze={};Lo(Ze,{Caution:()=>It,Checkmark:()=>Ie,ChevronDown:()=>De,Close:()=>Et,Danger:()=>Ut,ExclamationPoint:()=>zt,Info:()=>Ve,Lightbulb:()=>Gt,MagnifyingGlass:()=>qt,MaximizeAlt:()=>$t,Minus:()=>Ee,MoreVerticalAlt:()=>Re,Plus:()=>Me});import{jsx as _t}from"@emotion/react/jsx-runtime";var _o=e=>_t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:_t("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),It=_o;import{jsx as Dt}from"@emotion/react/jsx-runtime";var Io=e=>Dt("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Dt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Ie=Io;import{jsx as Vt}from"@emotion/react/jsx-runtime";var Do=e=>Vt("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:Vt("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),De=Do;import{jsx as Ye,jsxs as Eo}from"@emotion/react/jsx-runtime";var Vo=e=>Ye("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:Eo("g",{fillRule:"evenodd",children:[Ye("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Ye("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),Et=Vo;import{jsx as Mt}from"@emotion/react/jsx-runtime";var Mo=e=>Mt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Mt("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),Ut=Mo;import{jsx as Bt}from"@emotion/react/jsx-runtime";var Uo=e=>Bt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Bt("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),zt=Uo;import{jsx as At,jsxs as zo}from"@emotion/react/jsx-runtime";var Bo=e=>zo("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[At("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),At("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ve=Bo;import{jsx as Ht}from"@emotion/react/jsx-runtime";var Ao=e=>Ht("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Ht("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),Gt=Ao;import{jsx as Ce,jsxs as Ot}from"@emotion/react/jsx-runtime";var Ho=e=>Ot("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Ot("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[Ce("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),Ce("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),Ce("defs",{children:Ce("clipPath",{id:"magnifying-glass_svg__a",children:Ce("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),qt=Ho;import{jsx as Nt}from"@emotion/react/jsx-runtime";var Go=e=>Nt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Nt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),$t=Go;import{jsx as Ft}from"@emotion/react/jsx-runtime";var Oo=e=>Ft("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Ft("path",{d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",fill:"currentColor"})}),Ee=Oo;import{jsx as Wt}from"@emotion/react/jsx-runtime";var qo=e=>Wt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Wt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Re=qo;import{jsx as Kt}from"@emotion/react/jsx-runtime";var No=e=>Kt("svg",{width:"1em",height:"1em",viewBox:"0 0 46 46",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Kt("path",{d:"M44.203 21.203H24.797V1.797a1.797 1.797 0 1 0-3.594 0v19.406H1.797a1.797 1.797 0 1 0 0 3.594h19.406v19.406a1.797 1.797 0 0 0 3.594 0V24.797h19.406a1.797 1.797 0 0 0 0-3.594Z"})}),Me=No;import{css as yr}from"@emotion/react";import{scrollbarStyles as Jo}from"@uniformdev/design-system";import{jsx as Qt}from"@emotion/react/jsx-runtime";function N({src:e,alt:r,className:n}){let a=e&&typeof e!="string"?e:null;return a?Qt(a,{className:n}):Qt("img",{src:e,alt:r,className:n})}import{css as L}from"@emotion/react";import{Input as ar,InputSelect as Ue,mq as Be}from"@uniformdev/design-system";import Qo,{useContext as Yo,useMemo as ze}from"react";import{useAsyncFn as Zo,useDebounce as Xo}from"react-use";import{css as $o}from"@emotion/react";import{Icon as Fo,InputSelect as Wo}from"@uniformdev/design-system";import{CgClose as Ko}from"react-icons/cg";import{Fragment as Yt,jsxs as Zt}from"@emotion/react/jsx-runtime";var Xt=({value:e,text:r,loading:n})=>Zt(Yt,{children:[!!r&&r,!r&&Zt(Yt,{children:[n&&`${e} (Loading...)`,!n&&`${e} (Unresolvable)`]})]});import{css as Xe}from"@emotion/react";var Jt=Xe`
2
2
  align-items: center;
3
3
  background: var(--gray-100);
4
4
  border: 1px solid var(--gray-300);
@@ -7,66 +7,66 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
7
7
  justify-content: space-between;
8
8
  margin-bottom: var(--spacing-sm);
9
9
  margin-right: var(--spacing-sm);
10
- `,At=Ye`
10
+ `,jt=Xe`
11
11
  color: var(--gray-800);
12
12
  padding: var(--spacing-3);
13
- `,Ht=Ye`
13
+ `,er=Xe`
14
14
  border: none;
15
15
  border-left: 1px solid var(--gray-300);
16
16
  background: var(--gray-100);
17
17
  padding: var(--spacing-3);
18
- `;import{jsx as Re,jsxs as Gt}from"@emotion/react/jsx-runtime";var Ot=({id:e,label:r,loading:a,selectedValues:o,values:t,onAdd:n,onRemove:i})=>{var f;let g=(f=t==null?void 0:t.filter(s=>!(o!=null&&o.includes(s.id.toString()))))!=null?f:[],d=(s,m)=>{s.preventDefault(),i(m)};return Gt("div",{children:[Re(Ha,{id:e,name:e,label:r,onChange:s=>n(s.target.value),disabled:a,options:[{value:"",label:"Add..."},...g.map(s=>({value:s.id,label:s.name||s.id}))],value:"",css:Array.isArray(o)&&o.length>0?za`
18
+ `;import{jsx as Pe,jsxs as tr}from"@emotion/react/jsx-runtime";var rr=({id:e,label:r,loading:n,selectedValues:a,values:t,onAdd:o,onRemove:i})=>{var m;let c=(m=t==null?void 0:t.filter(s=>!(a!=null&&a.includes(s.id.toString()))))!=null?m:[],d=(s,p)=>{s.preventDefault(),i(p)};return tr("div",{children:[Pe(Wo,{id:e,name:e,label:r,onChange:s=>o(s.target.value),disabled:n,options:[{value:"",label:"Add..."},...c.map(s=>({value:s.id,label:s.name||s.id}))],value:"",css:Array.isArray(a)&&a.length>0?$o`
19
19
  margin-bottom: var(--spacing-base);
20
- `:""}),o==null?void 0:o.map(s=>{var m;return Gt("div",{css:zt,children:[Re("span",{css:At,children:Re(Bt,{value:s,loading:a,text:(m=t.find(c=>c.id===s))==null?void 0:m.name})}),Re("button",{css:Ht,title:"remove",onClick:c=>d(c,s),children:Re(Aa,{icon:Ga,iconColor:"currentColor",size:20})})]},s)})]})};import{jsx as qt}from"@emotion/react/jsx-runtime";var Oa=e=>qt("svg",{width:"1em",height:"1em",viewBox:"0 0 46 46",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:qt("path",{d:"M44.203 21.203H24.797V1.797a1.797 1.797 0 1 0-3.594 0v19.406H1.797a1.797 1.797 0 1 0 0 3.594h19.406v19.406a1.797 1.797 0 0 0 3.594 0V24.797h19.406a1.797 1.797 0 0 0 0-3.594Z"})}),De=Oa;import{jsx as $t}from"@emotion/react/jsx-runtime";var qa=e=>$t("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:$t("path",{d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",fill:"currentColor"})}),Me=qa;import{useAsyncFn as Na,useDebounce as Wa}from"react-use";import{Input as Ft,InputSelect as Be,mq as ze}from"@uniformdev/design-system";import{css as T}from"@emotion/react";import{jsx as C,jsxs as ge}from"@emotion/react/jsx-runtime";var Nt={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},$s=({value:e,setValue:r,brands:a,categories:o,loading:t,categoriesLoading:n,brandsLoading:i,logoIcon:g,onGetProducts:d,sortOptions:f,sortOrderOptions:s,categoryLabel:m="Product Category",brandLabel:c="Brand",disableBrands:y,restrictToSingleCategory:P=!1})=>{var D,v,z;let w=async p=>{r({...Nt,...e||{},...p})},S=Ue(()=>({...Nt,...e||{}}),[e]),[ue,Se]=Na(async p=>await d(p),[d]);Wa(async()=>{await Se({brand:S.brand,categories:S.categories,keyword:S.keyword,sort:S.sort,sortOrder:S.sortOrder,count:S.count})},250,[S]);let q=Ue(()=>{let p=[];return o==null||o.forEach(A=>{let R=Kt(A,void 0);p.push(...R)}),p},[o]),ee=Ue(()=>[{value:"",label:"All categories"},...q.map(p=>({label:p.name,value:p.id}))],[q]),Z=Ue(()=>(a==null?void 0:a.map(p=>({id:p.id.toString(),name:p.name})))||[],[a]),Ce=p=>{if(!p)return;let A=(e==null?void 0:e.categories)||[];w({categories:[...A,p]})},_e=p=>{var A;w({categories:(A=e==null?void 0:e.categories)==null?void 0:A.filter(R=>R!==p)})},ie=p=>{w({brand:p.target.value})},E=p=>{w({count:p||1})};return t?C("div",{children:"Loading..."}):C(Qt.Provider,{value:{categories:o,logoIcon:g},children:ge("div",{css:T`
20
+ `:""}),a==null?void 0:a.map(s=>{var p;return tr("div",{css:Jt,children:[Pe("span",{css:jt,children:Pe(Xt,{value:s,loading:n,text:(p=t.find(h=>h.id===s))==null?void 0:p.name})}),Pe("button",{css:er,title:"remove",onClick:h=>d(h,s),children:Pe(Fo,{icon:Ko,iconColor:"currentColor",size:20})})]},s)})]})};import{jsx as R,jsxs as ue}from"@emotion/react/jsx-runtime";var or={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},yl=({value:e,setValue:r,brands:n,categories:a,loading:t,categoriesLoading:o,brandsLoading:i,logoIcon:c,onGetProducts:d,sortOptions:m,sortOrderOptions:s,categoryLabel:p="Product Category",brandLabel:h="Brand",disableBrands:f,restrictToSingleCategory:C=!1})=>{var U,v,z;let b=async u=>{r({...or,...e||{},...u})},w=ze(()=>({...or,...e||{}}),[e]),[pe,we]=Zo(async u=>await d(u),[d]);Xo(async()=>{await we({brand:w.brand,categories:w.categories,keyword:w.keyword,sort:w.sort,sortOrder:w.sortOrder,count:w.count})},250,[w]);let q=ze(()=>{let u=[];return a==null||a.forEach(A=>{let P=ir(A,void 0);u.push(...P)}),u},[a]),j=ze(()=>[{value:"",label:"All categories"},...q.map(u=>({label:u.name,value:u.id}))],[q]),Z=ze(()=>(n==null?void 0:n.map(u=>({id:u.id.toString(),name:u.name})))||[],[n]),Se=u=>{if(!u)return;let A=(e==null?void 0:e.categories)||[];b({categories:[...A,u]})},_e=u=>{var A;b({categories:(A=e==null?void 0:e.categories)==null?void 0:A.filter(P=>P!==u)})},ne=u=>{b({brand:u.target.value})},M=u=>{b({count:u||1})};return t?R("div",{children:"Loading..."}):R(sr.Provider,{value:{categories:a,logoIcon:c},children:ue("div",{css:L`
21
21
  > :not(:last-child) {
22
22
  margin-bottom: var(--spacing-md);
23
23
  }
24
- `,children:[P?C(Be,{id:"selection-field-product-category",label:m,disabled:t,value:(v=(D=S.categories)==null?void 0:D[0])!=null?v:"",options:ee,onChange:p=>{w({categories:p.target.value===""?[]:[p.target.value]})}}):C(Ot,{loading:n||!1,id:"selection-field-product-category",label:m,onAdd:Ce,onRemove:_e,selectedValues:S.categories,values:q}),ge("div",{css:T`
24
+ `,children:[C?R(Ue,{id:"selection-field-product-category",label:p,disabled:t,value:(v=(U=w.categories)==null?void 0:U[0])!=null?v:"",options:j,onChange:u=>{b({categories:u.target.value===""?[]:[u.target.value]})}}):R(rr,{loading:o||!1,id:"selection-field-product-category",label:p,onAdd:Se,onRemove:_e,selectedValues:w.categories,values:q}),ue("div",{css:L`
25
25
  display: flex;
26
26
  flex-wrap: wrap;
27
27
  column-gap: var(--spacing-lg);
28
28
  row-gap: var(--spacing-md);
29
- ${ze("md")} {
29
+ ${Be("md")} {
30
30
  flex-wrap: nowrap;
31
31
  }
32
- `,children:[y?null:C("div",{css:T`
32
+ `,children:[f?null:R("div",{css:L`
33
33
  width: 50%;
34
- `,children:C(Be,{id:"brand",name:"brand",label:c,disabled:i,value:S.brand,onChange:ie,options:[{value:"",label:"Choose..."},...Z.map(p=>({value:p.id,label:p.name}))]})}),C("div",{css:T`
34
+ `,children:R(Ue,{id:"brand",name:"brand",label:h,disabled:i,value:w.brand,onChange:ne,options:[{value:"",label:"Choose..."},...Z.map(u=>({value:u.id,label:u.name}))]})}),R("div",{css:L`
35
35
  flex-grow: 1;
36
36
  position: relative;
37
- `,children:C(Ft,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:S.keyword,placeholder:"Enter keyword",onChange:p=>w({keyword:p.target.value})})})]}),ge("div",{css:T`
37
+ `,children:R(ar,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:w.keyword,placeholder:"Enter keyword",onChange:u=>b({keyword:u.target.value})})})]}),ue("div",{css:L`
38
38
  display: flex;
39
39
  flex-wrap: wrap;
40
40
  column-gap: var(--spacing-lg);
41
41
  row-gap: var(--spacing-md);
42
- ${ze("md")} {
42
+ ${Be("md")} {
43
43
  flex-wrap: nowrap;
44
44
  }
45
- `,children:[ge("div",{css:T`
45
+ `,children:[ue("div",{css:L`
46
46
  width: 100%;
47
- ${ze("md")} {
47
+ ${Be("md")} {
48
48
  width: 33.333333%;
49
49
  }
50
50
  position: relative;
51
- `,children:[C(Ft,{id:"count",name:"count",type:"number",min:1,step:1,value:S.count,onChange:p=>E(p.target.valueAsNumber),label:"Count"}),ge("div",{css:T`
51
+ `,children:[R(ar,{id:"count",name:"count",type:"number",min:1,step:1,value:w.count,onChange:u=>M(u.target.valueAsNumber),label:"Count"}),ue("div",{css:L`
52
52
  position: absolute;
53
53
  bottom: var(--spacing-sm);
54
54
  right: var(--spacing-sm);
55
55
  display: flex;
56
56
  gap: var(--spacing-sm);
57
- `,children:[C(Wt,{onCountChange:()=>E(S.count-1),countIcon:"decrement",disabled:S.count===1}),C(Wt,{onCountChange:()=>E(S.count+1),countIcon:"increment"})]})]}),Array.isArray(f)&&f.length>0?C("div",{css:T`
57
+ `,children:[R(nr,{onCountChange:()=>M(w.count-1),countIcon:"decrement",disabled:w.count===1}),R(nr,{onCountChange:()=>M(w.count+1),countIcon:"increment"})]})]}),Array.isArray(m)&&m.length>0?R("div",{css:L`
58
58
  flex-grow: 1;
59
- ${ze("md")} {
59
+ ${Be("md")} {
60
60
  width: 33.333333%;
61
61
  }
62
- `,children:C(Be,{id:"sort",name:"sort",label:"Sort",value:S.sort,onChange:p=>w({sort:p.target.value}),options:[{value:"",label:"Select a sort"},...f.map(p=>({value:p.sortKey,label:p.name}))]})}):null,Array.isArray(s)&&s.length>0?C("div",{css:T`
62
+ `,children:R(Ue,{id:"sort",name:"sort",label:"Sort",value:w.sort,onChange:u=>b({sort:u.target.value}),options:[{value:"",label:"Select a sort"},...m.map(u=>({value:u.sortKey,label:u.name}))]})}):null,Array.isArray(s)&&s.length>0?R("div",{css:L`
63
63
  flex-grow: 1;
64
- `,children:C(Be,{id:"sort-order",name:"sort-order",label:"Sort Order",value:S.sortOrder,onChange:p=>w({sortOrder:p.target.value}),options:s.map(p=>({value:p.sortOrderKey,label:p.name}))})}):null]}),ge("div",{children:[C("h3",{css:T`
64
+ `,children:R(Ue,{id:"sort-order",name:"sort-order",label:"Sort Order",value:w.sortOrder,onChange:u=>b({sortOrder:u.target.value}),options:s.map(u=>({value:u.sortOrderKey,label:u.name}))})}):null]}),ue("div",{children:[R("h3",{css:L`
65
65
  font-size: var(--fs-md);
66
66
  line-height: var(--spacing-md);
67
67
  font-weight: var(--fw-bold);
68
68
  margin-bottom: var(--spacing-xs);
69
- `,children:"Result Preview"}),C(Zt,{products:(z=ue.value)==null?void 0:z.products})]})]})})};function Kt(e,r){var n;let a=[],o=r?`${r.name} > `:"",t={id:e.id.toString(),name:`${o}${e.name}`};return a.push(t),(n=e.children)==null||n.forEach(i=>{let g=Kt(i,t);a.push(...g)}),a}function Wt({onCountChange:e,countIcon:r,disabled:a}){return C("button",{css:T`
69
+ `,children:"Result Preview"}),R(dr,{products:(z=pe.value)==null?void 0:z.products})]})]})})};function ir(e,r){var o;let n=[],a=r?`${r.name} > `:"",t={id:e.id.toString(),name:`${a}${e.name}`};return n.push(t),(o=e.children)==null||o.forEach(i=>{let c=ir(i,t);n.push(...c)}),n}function nr({onCountChange:e,countIcon:r,disabled:n}){return R("button",{css:L`
70
70
  width: 2.25rem;
71
71
  height: 2.25rem;
72
72
  border: 1px solid var(--gray-300);
@@ -78,17 +78,17 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
78
78
  &:hover {
79
79
  background-color: var(--gray-200);
80
80
  }
81
- ${a?T`
81
+ ${n?L`
82
82
  cursor: not-allowed;
83
83
  opacity: 0.3;
84
84
  `:""}
85
- `,onClick:e,disabled:a,children:r==="increment"?C(De,{css:T`
85
+ `,onClick:e,disabled:n,children:r==="increment"?R(Me,{css:L`
86
86
  width: 1rem;
87
87
  height: 1rem;
88
- `}):C(Me,{css:T`
88
+ `}):R(Ee,{css:L`
89
89
  width: 1rem;
90
90
  height: 1rem;
91
- `})})}var Qt=$a.createContext(void 0),Yt=()=>{let e=Fa(Qt);if(!e)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return e};import{jsx as Xt}from"@emotion/react/jsx-runtime";function $({src:e,alt:r,className:a}){let o=e&&typeof e!="string"?e:null;return o?Xt(o,{className:a}):Xt("img",{src:e,alt:r,className:a})}import{css as sr}from"@emotion/react";import{scrollbarStyles as Ka}from"@uniformdev/design-system";import{css as F}from"@emotion/react";var Jt=F`
91
+ `})})}var sr=Qo.createContext(void 0),lr=()=>{let e=Yo(sr);if(!e)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return e};import{css as $}from"@emotion/react";var cr=$`
92
92
  align-items: center;
93
93
  background: var(--white);
94
94
  border-radius: var(--rounded-base);
@@ -103,55 +103,90 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
103
103
  &:hover {
104
104
  background: var(--gray-50);
105
105
  }
106
- `,jt=F`
106
+ `,pr=$`
107
107
  font-size: var(--fs-sm);
108
- `,er=F`
108
+ `,ur=$`
109
109
  width: 1rem;
110
110
  height: 1rem;
111
- `,Ze=F`
111
+ `,Je=$`
112
112
  margin-right: var(--spacing-lg);
113
113
  font-size: var(--fs-sm);
114
- `,tr=F`
114
+ `,gr=$`
115
115
  border: 1px solid var(--gray-200);
116
116
  border-radius: var(--rounded-md);
117
117
  background: var(--gray-50);
118
118
  margin: var(--spacing-base) 0;
119
- `,rr=F`
119
+ `,mr=$`
120
120
  align-items: center;
121
121
  display: flex;
122
122
  flex-grow: 1;
123
123
  gap: var(--spacing-base);
124
124
  padding: var(--spacing-sm);
125
125
  margin-right: var(--spacing-sm);
126
- `,or=F`
126
+ `,fr=$`
127
127
  background: var(--gray-200);
128
128
  width: 3.5rem;
129
129
  height: 3.5rem;
130
130
  object-fit: cover;
131
- `,ar=F`
131
+ `,vr=$`
132
132
  background: var(--gray-100);
133
133
  height: 3.5rem;
134
134
  width: 3.5rem;
135
- `,nr=F`
135
+ `,hr=$`
136
136
  margin-top: 0;
137
137
  font-weight: var(--fw-bold);
138
138
  font-size: var(--fs-sm);
139
139
  width: calc(100% / 3);
140
- `,ir=F`
140
+ `,br=$`
141
141
  display: block;
142
142
  font-weight: var(--fw-regular);
143
- `;import{Fragment as lr,jsx as oe,jsxs as re}from"@emotion/react/jsx-runtime";var Zt=({products:e})=>{let{categories:r,logoIcon:a}=Yt();return re(lr,{children:[re("p",{css:sr`
143
+ `;import{Fragment as xr,jsx as re,jsxs as te}from"@emotion/react/jsx-runtime";var dr=({products:e})=>{let{categories:r,logoIcon:n}=lr();return te(xr,{children:[te("p",{css:yr`
144
144
  margin-bottom: var(--spacing-base);
145
- `,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),oe("ul",{css:[sr`
145
+ `,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),re("ul",{css:[yr`
146
146
  max-height: 24rem;
147
147
  overflow-x: auto;
148
- `,Ka],children:e==null?void 0:e.map((o,t)=>{var g,d;let[n]=(o==null?void 0:o.categories)||[],i=typeof n=="undefined"||!r||(g=r.find(f=>f.id===n.id))==null?void 0:g.name;return oe("li",{css:tr,children:re("div",{css:rr,"data-test-id":`product-item-${o.sku||o.id}`,children:[o.thumbnailUrl?oe("img",{src:o.thumbnailUrl,alt:typeof o.title=="string"?o.title:o.name||`Product ${t}`,css:or,"data-test-id":"product-image"}):oe("div",{css:ar}),re("h4",{css:nr,"data-test-id":"product-name",children:[o.title||o.name,i&&oe("span",{css:ir,children:i})]}),o&&re(lr,{children:[re("p",{css:Ze,"data-test-id":"product-sku",children:["SKU: ",o.sku||o.id,oe("br",{})]}),o.price!==void 0?re("p",{css:Ze,"data-test-id":"product-price",children:["Price: ",o.price]}):null,o.editLink||o.url?re("a",{css:Jt,href:(d=o.editLink)!=null?d:o.url,title:`Go to ${o.title||o.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[oe("span",{css:jt,children:"Edit"}),a?oe($,{src:a,alt:"Logo",css:er}):null]}):null]})]})},`product-${o.id}`)})})]})};import An,{useContext as Hn,useMemo as Gn,useRef as On}from"react";import*as K from"react";var Je={};Ra(Je,{Caution:()=>cr,Checkmark:()=>Ae,ChevronDown:()=>He,Close:()=>gr,Danger:()=>fr,ExclamationPoint:()=>hr,Info:()=>Ge,Lightbulb:()=>xr,MagnifyingGlass:()=>Sr,MaximizeAlt:()=>Rr,Minus:()=>Me,MoreVerticalAlt:()=>ke,Plus:()=>De});import{jsx as dr}from"@emotion/react/jsx-runtime";var Qa=e=>dr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:dr("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),cr=Qa;import{jsx as pr}from"@emotion/react/jsx-runtime";var Ya=e=>pr("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:pr("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Ae=Ya;import{jsx as ur}from"@emotion/react/jsx-runtime";var Za=e=>ur("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:ur("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),He=Za;import{jsx as Xe,jsxs as Ja}from"@emotion/react/jsx-runtime";var Xa=e=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:Ja("g",{fillRule:"evenodd",children:[Xe("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Xe("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),gr=Xa;import{jsx as mr}from"@emotion/react/jsx-runtime";var ja=e=>mr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:mr("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),fr=ja;import{jsx as vr}from"@emotion/react/jsx-runtime";var en=e=>vr("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:vr("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),hr=en;import{jsx as yr,jsxs as rn}from"@emotion/react/jsx-runtime";var tn=e=>rn("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[yr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),yr("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ge=tn;import{jsx as br}from"@emotion/react/jsx-runtime";var on=e=>br("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:br("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),xr=on;import{jsx as Pe,jsxs as wr}from"@emotion/react/jsx-runtime";var an=e=>wr("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[wr("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[Pe("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),Pe("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),Pe("defs",{children:Pe("clipPath",{id:"magnifying-glass_svg__a",children:Pe("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Sr=an;import{jsx as Cr}from"@emotion/react/jsx-runtime";var nn=e=>Cr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Cr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),Rr=nn;import{jsx as Pr}from"@emotion/react/jsx-runtime";var sn=e=>Pr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Pr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),ke=sn;import{useDebounce as xn}from"react-use";import{v4 as wn}from"uuid";import{useState as dn,useRef as Mr,useEffect as cn}from"react";function Oe(e,r){let a=window.open(e,"_blank"),o=setInterval(()=>{a!=null&&a.closed&&(clearInterval(o),r())},500)}import{format as pn}from"timeago.js";import{css as H}from"@emotion/react";import{mq as ln}from"@uniformdev/design-system";var kr=H`
148
+ `,Jo],children:e==null?void 0:e.map((a,t)=>{var c,d;let[o]=(a==null?void 0:a.categories)||[],i=typeof o=="undefined"||!r||(c=r.find(m=>m.id===o.id))==null?void 0:c.name;return re("li",{css:gr,children:te("div",{css:mr,"data-test-id":`product-item-${a.sku||a.id}`,children:[a.thumbnailUrl?re("img",{src:a.thumbnailUrl,alt:typeof a.title=="string"?a.title:a.name||`Product ${t}`,css:fr,"data-test-id":"product-image"}):re("div",{css:vr}),te("h4",{css:hr,"data-test-id":"product-name",children:[a.title||a.name,i&&re("span",{css:br,children:i})]}),a&&te(xr,{children:[te("p",{css:Je,"data-test-id":"product-sku",children:["SKU: ",a.sku||a.id,re("br",{})]}),a.price!==void 0?te("p",{css:Je,"data-test-id":"product-price",children:["Price: ",a.price]}):null,a.editLink||a.url?te("a",{css:cr,href:(d=a.editLink)!=null?d:a.url,title:`Go to ${a.title||a.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[re("span",{css:pr,children:"Edit"}),n?re(N,{src:n,alt:"Logo",css:ur}):null]}):null]})]})},`product-${a.id}`)})})]})};import{Callout as In}from"@uniformdev/design-system";import Dn,{useContext as Vn,useMemo as En,useRef as Mn}from"react";import{useAsync as Un,useAsyncFn as Bn}from"react-use";import{css as Tr}from"@emotion/react";import{useEffect as jo,useRef as kr,useState as en}from"react";import{css as se}from"@emotion/react";var wr=se`
149
+ cursor: pointer;
150
+ padding: var(--spacing-sm);
151
+ position: relative;
152
+ transition: background-color var(--duration-fast) var(--timing-ease-out),
153
+ color var(--duration-fast) var(--timing-ease-out);
154
+ `,Sr=se`
155
+ padding-right: var(--spacing-lg);
156
+ `,Cr=se`
157
+ background: var(--brand-secondary-3);
158
+ color: var(--white);
159
+ `,je=se`
160
+ font-size: var(--fs-xs);
161
+ `,et=se`
162
+ font-weight: var(--fw-bold);
163
+ margin-right: var(--spacing-sm);
164
+ `,Rr=se`
165
+ background: var(--white);
166
+ border-left: 4px solid var(--brand-secondary-3);
167
+ border-radius: var(--rounded-base);
168
+ box-shadow: var(--shadow-base);
169
+ color: var(--brand-secondary-1);
170
+ padding: var(--spacing-base);
171
+ position: absolute;
172
+ top: var(--spacing-base);
173
+ right: var(--spacing-xl);
174
+ z-index: var(--z-10);
175
+ width: max-content;
176
+ `,Pr=se`
177
+ position: absolute;
178
+ inset: 0 var(--spacing-sm) 0 auto;
179
+ `;import{Fragment as tn,jsx as Lr,jsxs as le}from"@emotion/react/jsx-runtime";var _r=({result:e,isSelected:r,triggerSelection:n})=>{let a=kr(null),t=kr(null),[o,i]=en(!1);jo(()=>{function d(m){a.current&&!a.current.contains(m.target)&&t.current&&!t.current.contains(m.target)&&i(!1)}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[t]);let c=d=>{d.stopPropagation(),i(!o)};return le("div",{css:[wr,r?Cr:void 0,e.popoverData?Sr:void 0],"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>n(),children:[e.title,e.popoverData&&r?le(tn,{children:[Lr("button",{type:"button",ref:a,css:Pr,"aria-controls":"path-details",onClick:d=>c(d),"aria-expanded":o,children:Lr(Ve,{width:24,height:24})}),le("div",{id:"path-details","aria-hidden":!o,ref:t,css:[Rr,o?Tr`
180
+ visibility: visible;
181
+ `:Tr`
182
+ visibility: hidden;
183
+ `],children:[e.metadata&&Object.entries(e.metadata).map(([d,m],s)=>le("div",{css:je,children:[le("span",{css:et,children:[d,":"]}),m]},s)),Object.entries(e.popoverData).map(([d,m],s)=>le("div",{css:je,children:[le("span",{css:et,children:[d,":"]}),m]},s))]})]}):null]},e.id)};import{css as ae}from"@emotion/react";import{Icon as Ar}from"@uniformdev/design-system";import{useEffect as an,useRef as Hr,useState as on}from"react";import{CgClose as nn,CgInfo as sn}from"react-icons/cg";import{format as ln}from"timeago.js";function Ae(e,r){let n=window.open(e,"_blank"),a=setInterval(()=>{n!=null&&n.closed&&(clearInterval(a),r())},500)}import{css as H}from"@emotion/react";import{mq as rn}from"@uniformdev/design-system";var Ir=H`
149
184
  border: 1px solid var(--gray-200);
150
185
  background: var(--gray-50);
151
186
  border-radius: var(--rounded-base);
152
187
  display: flex;
153
188
  width: 100%;
154
- `,Tr=H`
189
+ `,Dr=H`
155
190
  align-items: center;
156
191
  display: flex;
157
192
  flex-grow: 1;
@@ -159,22 +194,22 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
159
194
  margin-inline: 0 var(--spacing-sm);
160
195
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
161
196
  position: relative;
162
- `,Lr=H`
197
+ `,Vr=H`
163
198
  flex-grow: 1;
164
- `,_r=H`
199
+ `,Er=H`
165
200
  align-items: start;
166
201
  display: inline-flex;
167
202
  position: relative;
168
- `,Ir=H`
203
+ `,Mr=H`
169
204
  color: var(--brand-secondary-1);
170
205
  font-size: var(--fs-base);
171
206
  font-weight: var(--fw-bold);
172
207
  line-height: 1;
173
208
  margin: 0;
174
- `,Vr=H`
209
+ `,Ur=H`
175
210
  width: 1.5rem;
176
211
  height: 1.5rem;
177
- `,Er=H`
212
+ `,Br=H`
178
213
  background: var(--white);
179
214
  border-radius: var(--rounded-base);
180
215
  border-left: 4px solid var(--brand-secondary-3);
@@ -183,22 +218,22 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
183
218
  padding: var(--spacing-base);
184
219
  z-index: var(--z-10);
185
220
  width: max-content;
186
- `,le=H`
221
+ `,de=H`
187
222
  font-size: var(--fs-sm);
188
223
  `,Te=H`
189
224
  font-weight: var(--fw-bold);
190
225
  margin-right: var(--spacing-sm);
191
- `,Dr=H`
226
+ `,zr=H`
192
227
  display: flex;
193
228
  flex-direction: column;
194
229
  gap: var(--spacing-sm);
195
230
 
196
- ${ln("md")} {
231
+ ${rn("md")} {
197
232
  flex-direction: row;
198
233
  min-width: 200px;
199
234
  justify-content: end;
200
235
  }
201
- `,je=H`
236
+ `,tt=H`
202
237
  align-items: center;
203
238
  background: var(--white);
204
239
  border-radius: var(--rounded-base);
@@ -213,64 +248,29 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
213
248
  &:hover {
214
249
  background: var(--gray-50);
215
250
  }
216
- `;import{css as ae}from"@emotion/react";import{Icon as Ur}from"@uniformdev/design-system";import{CgClose as un,CgInfo as gn}from"react-icons/cg";import{Fragment as mn,jsx as N,jsxs as L}from"@emotion/react/jsx-runtime";var Br=({selectedItem:e,logoIcon:r,onDeselect:a,onEditClosed:o})=>{var f;let t=Mr(null),n=Mr(null),[i,g]=dn(!1);cn(()=>{let s=c=>{t.current&&!t.current.contains(c.target)&&n.current&&!n.current.contains(c.target)&&g(!1)},m=()=>{g(!1)};return window.addEventListener("resize",m,!0),document.addEventListener("scroll",s,!0),document.addEventListener("mousedown",s),()=>{window.removeEventListener("resize",m,!0),document.removeEventListener("scroll",s,!0),document.removeEventListener("mousedown",s)}},[n]);let d=()=>{var s;if(g(!i),n.current&&t.current){let m=(s=t==null?void 0:t.current)==null?void 0:s.getBoundingClientRect(),c=n.current.offsetWidth;n.current.style.top=`${m.top+30}px`,n.current.style.left=`${m.left-c+30}px`}};return N("div",{css:kr,children:L("div",{css:Tr,children:[L("div",{css:Lr,children:[L("div",{css:_r,children:[N("h4",{css:[Ir,e.popoverData?ae`
251
+ `;import{Fragment as dn,jsx as F,jsxs as _}from"@emotion/react/jsx-runtime";var Gr=({selectedItem:e,logoIcon:r,onDeselect:n,onEditClosed:a})=>{var m;let t=Hr(null),o=Hr(null),[i,c]=on(!1);an(()=>{let s=h=>{t.current&&!t.current.contains(h.target)&&o.current&&!o.current.contains(h.target)&&c(!1)},p=()=>{c(!1)};return window.addEventListener("resize",p,!0),document.addEventListener("scroll",s,!0),document.addEventListener("mousedown",s),()=>{window.removeEventListener("resize",p,!0),document.removeEventListener("scroll",s,!0),document.removeEventListener("mousedown",s)}},[o]);let d=()=>{var s;if(c(!i),o.current&&t.current){let p=(s=t==null?void 0:t.current)==null?void 0:s.getBoundingClientRect(),h=o.current.offsetWidth;o.current.style.top=`${p.top+30}px`,o.current.style.left=`${p.left-h+30}px`}};return F("div",{css:Ir,children:_("div",{css:Dr,children:[_("div",{css:Vr,children:[_("div",{css:Er,children:[F("h4",{css:[Mr,e.popoverData?ae`
217
252
  margin-bottom: var(--spacing-sm);
218
- `:""],title:`ID: ${e.id}`,"data-test-id":"entry-id",children:e.title||e.id||""}),e.popoverData?L(mn,{children:[N("button",{type:"button",ref:t,css:ae`
253
+ `:""],title:`ID: ${e.id}`,"data-test-id":"entry-id",children:e.title||e.id||""}),e.popoverData?_(dn,{children:[F("button",{type:"button",ref:t,css:ae`
219
254
  margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
220
- `,"aria-controls":"path-details","aria-expanded":i,onClick:d,children:N(Ur,{icon:gn,iconColor:"gray",size:24,css:ae`
255
+ `,"aria-controls":"path-details","aria-expanded":i,onClick:d,children:F(Ar,{icon:sn,iconColor:"gray",size:24,css:ae`
221
256
  opacity: var(--opacity-75);
222
- `})}),N("div",{id:"path-details","aria-hidden":!i,ref:n,css:[Er,i?ae`
257
+ `})}),F("div",{id:"path-details","aria-hidden":!i,ref:o,css:[Br,i?ae`
223
258
  visibility: visible;
224
259
  `:ae`
225
260
  visibility: hidden;
226
- `],children:Object.entries(e.popoverData).map(([s,m],c)=>L("div",{css:le,children:[L("span",{css:Te,children:[s,":"]}),m]},c))})]}):null]}),e.createdDate&&L("div",{css:le,children:[N("span",{css:Te,children:"Created:"}),pn((f=e.createdDate)!=null?f:0)]}),e.metadata?Object.entries(e.metadata).filter(([s])=>["type","status"].includes(s.toLocaleLowerCase())).map(([s,m])=>L("div",{css:[le,ae`
261
+ `],children:Object.entries(e.popoverData).map(([s,p],h)=>_("div",{css:de,children:[_("span",{css:Te,children:[s,":"]}),p]},h))})]}):null]}),e.createdDate&&_("div",{css:de,children:[F("span",{css:Te,children:"Created:"}),ln((m=e.createdDate)!=null?m:0)]}),e.metadata?Object.entries(e.metadata).filter(([s])=>["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>_("div",{css:[de,ae`
227
262
  order: 1;
228
- `],children:[L("span",{css:Te,children:[s,":"]}),m]},s)):null,e.metadata?Object.entries(e.metadata).filter(([s])=>!["type","status"].includes(s.toLocaleLowerCase())).map(([s,m])=>L("div",{css:[le,ae`
263
+ `],children:[_("span",{css:Te,children:[s,":"]}),p]},s)):null,e.metadata?Object.entries(e.metadata).filter(([s])=>!["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>_("div",{css:[de,ae`
229
264
  order: 1;
230
- `],children:[L("span",{css:[Te,ae`
265
+ `],children:[_("span",{css:[Te,ae`
231
266
  order: 1;
232
- `],children:[s,":"]}),m]},s)):null]}),L("div",{css:Dr,children:[e.editLink?L("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:s=>{o&&(Oe(s.currentTarget.href,()=>o(e)),s.preventDefault())},css:je,children:[N("span",{css:le,children:"Edit"}),N($,{src:r,css:Vr,alt:"Logo"})]}):null,L("button",{type:"button",onClick:()=>{a(e)},css:je,children:[N("span",{css:le,children:"Unlink"}),N(Ur,{icon:un,iconColor:"red",size:16})]})]})]})},e.id)};import{useState as fn,useRef as qr,useEffect as vn}from"react";import{css as de}from"@emotion/react";var zr=de`
233
- cursor: pointer;
234
- padding: var(--spacing-sm);
235
- position: relative;
236
- transition: background-color var(--duration-fast) var(--timing-ease-out),
237
- color var(--duration-fast) var(--timing-ease-out);
238
- `,Ar=de`
239
- padding-right: var(--spacing-lg);
240
- `,Hr=de`
241
- background: var(--brand-secondary-3);
242
- color: var(--white);
243
- `,et=de`
244
- font-size: var(--fs-xs);
245
- `,tt=de`
246
- font-weight: var(--fw-bold);
247
- margin-right: var(--spacing-sm);
248
- `,Gr=de`
249
- background: var(--white);
250
- border-left: 4px solid var(--brand-secondary-3);
251
- border-radius: var(--rounded-base);
252
- box-shadow: var(--shadow-base);
253
- color: var(--brand-secondary-1);
254
- padding: var(--spacing-base);
255
- position: absolute;
256
- top: var(--spacing-base);
257
- right: var(--spacing-xl);
258
- z-index: var(--z-10);
259
- width: max-content;
260
- `,Or=de`
261
- position: absolute;
262
- inset: 0 var(--spacing-sm) 0 auto;
263
- `;import{css as $r}from"@emotion/react";import{Fragment as hn,jsx as Fr,jsxs as ce}from"@emotion/react/jsx-runtime";var Nr=({result:e,isSelected:r,triggerSelection:a})=>{let o=qr(null),t=qr(null),[n,i]=fn(!1);vn(()=>{function d(f){o.current&&!o.current.contains(f.target)&&t.current&&!t.current.contains(f.target)&&i(!1)}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[t]);let g=d=>{d.stopPropagation(),i(!n)};return ce("div",{css:[zr,r?Hr:void 0,e.popoverData?Ar:void 0],"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>a(),children:[e.title,e.popoverData&&r?ce(hn,{children:[Fr("button",{type:"button",ref:o,css:Or,"aria-controls":"path-details",onClick:d=>g(d),"aria-expanded":n,children:Fr(Ge,{width:24,height:24})}),ce("div",{id:"path-details","aria-hidden":!n,ref:t,css:[Gr,n?$r`
264
- visibility: visible;
265
- `:$r`
266
- visibility: hidden;
267
- `],children:[e.metadata&&Object.entries(e.metadata).map(([d,f],s)=>ce("div",{css:et,children:[ce("span",{css:tt,children:[d,":"]}),f]},s)),Object.entries(e.popoverData).map(([d,f],s)=>ce("div",{css:et,children:[ce("span",{css:tt,children:[d,":"]}),f]},s))]})]}):null]},e.id)};import{Droppable as Sn,DragDropContext as Cn,Draggable as Rn}from"react-beautiful-dnd";import{css as k}from"@emotion/react";var Wr=k`
267
+ `],children:[s,":"]}),p]},s)):null]}),_("div",{css:zr,children:[e.editLink?_("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:s=>{a&&(Ae(s.currentTarget.href,()=>a(e)),s.preventDefault())},css:tt,children:[F("span",{css:de,children:"Edit"}),F(N,{src:r,css:Ur,alt:"Logo"})]}):null,_("button",{type:"button",onClick:()=>{n(e)},css:tt,children:[F("span",{css:de,children:"Unlink"}),F(Ar,{icon:nn,iconColor:"red",size:16})]})]})]})},e.id)};import{css as W}from"@emotion/react";import{Button as ot,Callout as un,InputKeywordSearch as gn,InputSelect as mn,LoadingIndicator as fn,LoadingOverlay as vn,Menu as hn,MenuItem as bn,scrollbarStyles as yn}from"@uniformdev/design-system";import*as K from"react";import{DragDropContext as xn,Draggable as wn,Droppable as Sn}from"react-beautiful-dnd";import{useDebounce as Cn}from"react-use";import{v4 as Rn}from"uuid";import{useEffect as Or,useRef as cn,useState as pn}from"react";function qr(e,{delay:r=500,minDuration:n=200}={delay:500,minDuration:200}){let[a,t]=pn("IDLE"),o=cn(void 0);return Or(()=>{e&&a==="IDLE"&&(clearTimeout(o.current),o.current=setTimeout(()=>{if(!e)return t("IDLE");o.current=setTimeout(()=>{t("EXPIRE")},n),t("DISPLAY")},r),t("DELAY")),!e&&a!=="DISPLAY"&&(clearTimeout(o.current),t("IDLE"))},[e,a,r,n]),Or(()=>()=>clearTimeout(o.current),[]),a==="DISPLAY"||a==="EXPIRE"}import{css as T}from"@emotion/react";var Nr=T`
268
268
  background: var(--white);
269
269
  border: 1px solid var(--gray-300);
270
270
  border-radius: var(--rounded-base);
271
271
  padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-sm);
272
272
  margin-bottom: var(--spacing-base);
273
- `,Kr=k`
273
+ `,$r=T`
274
274
  align-items: center;
275
275
  display: flex;
276
276
  position: relative;
@@ -278,7 +278,7 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
278
278
  width: 100%;
279
279
  background-color: transparent;
280
280
  border: 0;
281
- `,Qr=k`
281
+ `,Fr=T`
282
282
  color: var(--brand-secondary-1);
283
283
  display: block;
284
284
  font-weight: var(--fw-bold);
@@ -294,15 +294,15 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
294
294
  background: var(--gray-100);
295
295
  outline: none;
296
296
  }
297
- `,Yr=k`
297
+ `,Wr=T`
298
298
  background: var(--white);
299
299
  border: 1px solid var(--gray-300);
300
300
  border-radius: var(--rounded-base);
301
301
  padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-base);
302
302
  display: block;
303
- `,Zr=k`
303
+ `,Kr=T`
304
304
  display: none;
305
- `,Xr=k`
305
+ `,Qr=T`
306
306
  overflow-y: auto;
307
307
  height: 16rem;
308
308
  margin-bottom: var(--spacing-base);
@@ -311,26 +311,26 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
311
311
  & > :not(:last-child) {
312
312
  border-bottom: 1px solid var(--gray-200);
313
313
  }
314
- `,Id=k`
314
+ `,gd=T`
315
315
  background-color: var(--gray-50);
316
316
  max-width: 33.33%;
317
- `,Jr=k`
317
+ `,Yr=T`
318
318
  align-items: center;
319
319
  display: flex;
320
320
  position: absolute;
321
321
  inset: 0 0 0 auto;
322
322
  pointer-events: none;
323
323
  padding-right: var(--spacing-sm);
324
- `,jr=k`
324
+ `,Zr=T`
325
325
  color: var(--brand-secondary-1);
326
326
  width: 1.25rem;
327
327
  height: 1.25rem;
328
328
  transition: transform var(--duration-fast) var(--timing-ease-out);
329
329
  transform: rotate(0);
330
- `,Vd=k`
330
+ `,md=T`
331
331
  background: var(--white);
332
332
  color: var(--brand-secondary-1);
333
- `,eo=k`
333
+ `,Xr=T`
334
334
  position: relative;
335
335
  margin-block: var(--spacing-sm) 0;
336
336
 
@@ -342,96 +342,96 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
342
342
  left: auto !important;
343
343
  top: auto !important;
344
344
  }
345
- `,to=k`
345
+ `,Jr=T`
346
346
  align-items: center;
347
347
  display: flex;
348
348
  position: absolute;
349
349
  inset: 0 auto 0 0;
350
350
  margin-block: auto;
351
351
  opacity: 0;
352
- `,rt=k`
352
+ `,rt=T`
353
353
  color: var(--brand-secondary-1);
354
- `,ro=k`
354
+ `,jr=T`
355
355
  position: absolute;
356
356
  left: 0.375rem;
357
- `,ot=k`
357
+ `,at=T`
358
358
  width: calc(var(--spacing-lg) + var(--spacing-xs));
359
359
  height: calc(var(--spacing-lg) + var(--spacing-xs));
360
- `;import{css as W}from"@emotion/react";import{InputSelect as Pn,scrollbarStyles as kn,Button as at,Callout as Tn,InputKeywordSearch as Ln,LoadingIndicator as _n,Menu as In,MenuItem as Vn,LoadingOverlay as En}from"@uniformdev/design-system";import{useState as yn,useEffect as oo,useRef as bn}from"react";function ao(e,{delay:r=500,minDuration:a=200}={delay:500,minDuration:200}){let[o,t]=yn("IDLE"),n=bn(void 0);return oo(()=>{e&&o==="IDLE"&&(clearTimeout(n.current),n.current=setTimeout(()=>{if(!e)return t("IDLE");n.current=setTimeout(()=>{t("EXPIRE")},a),t("DISPLAY")},r),t("DELAY")),!e&&o!=="DISPLAY"&&(clearTimeout(n.current),t("IDLE"))},[e,o,r,a]),oo(()=>()=>clearTimeout(n.current),[]),o==="DISPLAY"||o==="EXPIRE"}import{Fragment as Mn,jsx as h,jsxs as G}from"@emotion/react/jsx-runtime";var Dn=({searchText:e,selectedContentType:r})=>{let a="No content found";return r&&r!=="any"&&(a=`No ${r} content was found`),e&&(a=`${a} for keyword '${e}'.`),h(Tn,{type:"info",children:a})},no=({search:e,results:r,contentTypes:a,selectedItems:o,logoIcon:t,select:n,multiSelect:i,multiSelectId:g,rowComponent:d,selectedItemComponent:f,totalResults:s,cursor:m,resultsLoading:c,requireContentType:y,onAddNew:P,onEditClosed:w,onCancel:S,noResultsComponent:ue,helpComponent:Se,onSort:q,typeSelectorLabel:ee="Content Type Select",typeSelectorAllTypesOptionText:Z="All content types",loadingIndicatorDelay:Ce=1e3})=>{var Pt,kt,Tt;let ie=()=>y?Array.isArray(a)&&a.length>0?a[0].id:"":"any",[E,D]=K.useState(""),[v,z]=K.useState(ie),[p,A]=K.useState(!1),[R,se]=K.useState([]),[da,wt]=K.useState(!1),We=K.useRef(`x${wn()}`);xn(()=>{e(E,{count:5,offset:0,contentType:v==="any"?void 0:v})},300,[E,v]);let ca=ao(c,{delay:Ce}),pa=u=>{R.some(x=>x.id===u.id)?se(x=>x.filter(te=>te.id!==u.id)):se(i?x=>[...x,u]:[u])},ua=o==null?void 0:o.map(u=>u.id+u.title).join(",");K.useEffect(()=>{Array.isArray(o)&&se(o)},[ua]);let ga=()=>{z(ie()),D(""),se(o!=null&&o.length?o:[])},ma=()=>{A(u=>!u),p||ga()},St=u=>{let x=(R==null?void 0:R.filter(te=>te.id!==u.id))||[];se(x),n(x,"")},fa=u=>{u.preventDefault(),n(R,v),A(!1)},va=u=>{u.preventDefault(),A(!1),S&&S()},ha=()=>{e(E,{count:5,offset:(r==null?void 0:r.length)||0,contentType:v==="any"?void 0:v,cursor:m}),wt(!0);let u=setTimeout(()=>{wt(!1)},750);return()=>clearTimeout(u)},ya=!(o==null?void 0:o.length)||i,ba=d||Nr,Ct=f||Br,xa=ue||Dn,Rt=t&&typeof t!="string"?t:null,wa=Rt?h(Rt,{css:ot}):h("img",{src:t,alt:"Logo",css:ot}),Sa=u=>{var x,te;if(u.destination&&u.source.droppableId===((x=u.destination)==null?void 0:x.droppableId)){let M=[...o||[]],[Ke]=(te=M==null?void 0:M.splice(u.source.index,1))!=null?te:[];return M==null||M.splice(u.destination.index,0,Ke),q&&(se(M),q==null||q(M)),M}};return h("div",{css:W`
360
+ `;import{Fragment as Tn,jsx as x,jsxs as G}from"@emotion/react/jsx-runtime";var Pn=({searchText:e,selectedContentType:r})=>{let n="No content found";return r&&r!=="any"&&(n=`No ${r} content was found`),e&&(n=`${n} for keyword '${e}'.`),x(un,{type:"info",children:n})},ea=({search:e,results:r,contentTypes:n,selectedItems:a,logoIcon:t,select:o,multiSelect:i,multiSelectId:c,rowComponent:d,selectedItemComponent:m,totalResults:s,cursor:p,resultsLoading:h,requireContentType:f,onAddNew:C,onEditClosed:b,onCancel:w,noResultsComponent:pe,helpComponent:we,onSort:q,typeSelectorLabel:j="Content Type Select",typeSelectorAllTypesOptionText:Z="All content types",loadingIndicatorDelay:Se=1e3})=>{var Tt,kt,Lt;let ne=()=>f?Array.isArray(n)&&n.length>0?n[0].id:"":"any",[M,U]=K.useState(""),[v,z]=K.useState(ne),[u,A]=K.useState(!1),[P,ie]=K.useState([]),[go,St]=K.useState(!1),We=K.useRef(`x${Rn()}`);Cn(()=>{e(M,{count:5,offset:0,contentType:v==="any"?void 0:v})},300,[M,v]);let mo=qr(h,{delay:Se}),fo=g=>{P.some(S=>S.id===g.id)?ie(S=>S.filter(ee=>ee.id!==g.id)):ie(i?S=>[...S,g]:[g])},vo=a==null?void 0:a.map(g=>g.id+g.title).join(",");K.useEffect(()=>{Array.isArray(a)&&ie(a)},[vo]);let ho=()=>{z(ne()),U(""),ie(a!=null&&a.length?a:[])},bo=()=>{A(g=>!g),u||ho()},Ct=g=>{let S=(P==null?void 0:P.filter(ee=>ee.id!==g.id))||[];ie(S),o(S,"")},yo=g=>{g.preventDefault(),o(P,v),A(!1)},xo=g=>{g.preventDefault(),A(!1),w&&w()},wo=()=>{e(M,{count:5,offset:(r==null?void 0:r.length)||0,contentType:v==="any"?void 0:v,cursor:p}),St(!0);let g=setTimeout(()=>{St(!1)},750);return()=>clearTimeout(g)},So=!(a==null?void 0:a.length)||i,Co=d||_r,Rt=m||Gr,Ro=pe||Pn,Pt=t&&typeof t!="string"?t:null,Po=Pt?x(Pt,{css:at}):x("img",{src:t,alt:"Logo",css:at}),To=g=>{var S,ee;if(g.destination&&g.source.droppableId===((S=g.destination)==null?void 0:S.droppableId)){let B=[...a||[]],[Ke]=(ee=B==null?void 0:B.splice(g.source.index,1))!=null?ee:[];return B==null||B.splice(g.destination.index,0,Ke),q&&(ie(B),q==null||q(B)),B}};return x("div",{css:W`
361
361
  width: 100%;
362
362
  `,children:G("div",{css:W`
363
363
  position: relative;
364
364
  margin-block: var(--spacing-base);
365
- `,children:[ya?G(Mn,{children:[h("div",{css:Wr,"data-test-id":"component-search",children:G("button",{css:Kr,onClick:ma,type:"button","aria-haspopup":!0,"aria-expanded":p,"aria-controls":`entry-search-config-${We.current}`,children:[wa,h("span",{css:W`
365
+ `,children:[So?G(Tn,{children:[x("div",{css:Nr,"data-test-id":"component-search",children:G("button",{css:$r,onClick:bo,type:"button","aria-haspopup":!0,"aria-expanded":u,"aria-controls":`entry-search-config-${We.current}`,children:[Po,x("span",{css:W`
366
366
  margin-left: var(--spacing-base);
367
- `,children:"Select"}),h("span",{css:Jr,children:h(He,{css:[jr,p?W`
367
+ `,children:"Select"}),x("span",{css:Yr,children:x(De,{css:[Zr,u?W`
368
368
  transform: rotate(180deg);
369
- `:void 0]})})]})}),G("div",{id:`entry-search-config-${We.current}`,"aria-hidden":!p,css:[Yr,p?void 0:Zr],children:[Se||null,G("div",{css:W`
369
+ `:void 0]})})]})}),G("div",{id:`entry-search-config-${We.current}`,"aria-hidden":!u,css:[Wr,u?void 0:Kr],children:[we||null,G("div",{css:W`
370
370
  display: flex;
371
371
  gap: calc(var(--spacing-base) - 0.25rem);
372
372
  margin-bottom: var(--spacing-base);
373
- `,children:[h(Pn,{onChange:u=>z(u.target.value),value:v,label:ee,showLabel:!1,options:[...y?[]:[{value:"any",label:Z}],...a?a.map(u=>({value:u.id,label:u.name})):[]]}),h("div",{css:W`
373
+ `,children:[x(mn,{onChange:g=>z(g.target.value),value:v,label:j,showLabel:!1,options:[...f?[]:[{value:"any",label:Z}],...n?n.map(g=>({value:g.id,label:g.name})):[]]}),x("div",{css:W`
374
374
  flex-grow: 1;
375
- `,children:h(Ln,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:D,disabledFieldSubmission:!0,value:E})})]}),G("div",{css:[Xr,kn],id:We.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list",children:[h(En,{isActive:ca}),Array.isArray(r)&&r.length>0?r.map(u=>h(ba,{isSelected:R.some(x=>x.id===u.id),result:u,triggerSelection:()=>pa(u)},u.id)):c?null:h(xa,{searchText:E||E,selectedContentType:(kt=(Pt=a==null?void 0:a.find(u=>u.id===v))==null?void 0:Pt.name)!=null?kt:v}),!c&&typeof s!="undefined"&&r&&(r==null?void 0:r.length)<s&&h("button",{type:"button",css:Qr,onClick:ha,children:da?h(_n,{}):"Load More"})]}),G("div",{css:W`
375
+ `,children:x(gn,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:U,disabledFieldSubmission:!0,value:M})})]}),G("div",{css:[Qr,yn],id:We.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list",children:[x(vn,{isActive:mo}),Array.isArray(r)&&r.length>0?r.map(g=>x(Co,{isSelected:P.some(S=>S.id===g.id),result:g,triggerSelection:()=>fo(g)},g.id)):h?null:x(Ro,{searchText:M||M,selectedContentType:(kt=(Tt=n==null?void 0:n.find(g=>g.id===v))==null?void 0:Tt.name)!=null?kt:v}),!h&&typeof s!="undefined"&&r&&(r==null?void 0:r.length)<s&&x("button",{type:"button",css:Fr,onClick:wo,children:go?x(fn,{}):"Load More"})]}),G("div",{css:W`
376
376
  display: flex;
377
377
  justify-content: space-between;
378
- `,children:[h("div",{children:P&&((Tt=a==null?void 0:a.length)!=null?Tt:0)>0?h(In,{menuLabel:"Add new menu",menuTrigger:h(at,{buttonType:"secondary",children:"Add New"}),children:a==null?void 0:a.map(u=>h(Vn,{css:W`
378
+ `,children:[x("div",{children:C&&((Lt=n==null?void 0:n.length)!=null?Lt:0)>0?x(hn,{menuLabel:"Add new menu",menuTrigger:x(ot,{buttonType:"secondary",children:"Add New"}),children:n==null?void 0:n.map(g=>x(bn,{css:W`
379
379
  background: var(--white);
380
380
  color: var(--brand-secondary-1);
381
- `,onClick:()=>P(u),children:u.name},u.id))}):null}),G("div",{css:W`
381
+ `,onClick:()=>C(g),children:g.name},g.id))}):null}),G("div",{css:W`
382
382
  display: flex;
383
383
  gap: var(--spacing-base);
384
- `,children:[h(at,{buttonType:"unimportant",onClick:va,children:"Cancel"}),h(at,{disabled:!R.length,onClick:fa,"data-test-id":"entry-accept-button",children:"Accept"})]})]})]})]}):null,p?null:i&&R.length>1?h(Cn,{onDragEnd:u=>Sa(u),children:h(Sn,{droppableId:g||"canvas-multi-select",children:u=>G("div",{...u.droppableProps,ref:u.innerRef,css:W`
384
+ `,children:[x(ot,{buttonType:"unimportant",onClick:xo,children:"Cancel"}),x(ot,{disabled:!P.length,onClick:yo,"data-test-id":"entry-accept-button",children:"Accept"})]})]})]})]}):null,u?null:i&&P.length>1?x(xn,{onDragEnd:g=>To(g),children:x(Sn,{droppableId:c||"canvas-multi-select",children:g=>G("div",{...g.droppableProps,ref:g.innerRef,css:W`
385
385
  margin-block: var(--spacing-sm) 0;
386
- `,children:[R==null?void 0:R.map((x,te)=>{if(x!=null&&x.id)return h(Rn,{draggableId:x.id,index:te,children:(M,Ke)=>G("div",{css:eo,ref:M.innerRef,"data-dragging":Ke.isDragging,...M.draggableProps,...M.dragHandleProps,children:[G("span",{css:to,children:[h(ke,{css:[rt,ro],width:24,height:24}),h(ke,{css:rt,width:24,height:24})]}),h(Ct,{logoIcon:t,selectedItem:x,onDeselect:Qe=>St(Qe),onEditClosed:w?Qe=>w(Qe):void 0},`selected-item-${x.id}`)]})},x.id)}),u.placeholder]})})}):R==null?void 0:R.map(u=>h(Ct,{logoIcon:t,selectedItem:u,onDeselect:x=>St(x),onEditClosed:w?x=>w(x):void 0},`selected-item-${u.id}`))]})})};import{css as pe}from"@emotion/react";var io=pe`
386
+ `,children:[P==null?void 0:P.map((S,ee)=>{if(S!=null&&S.id)return x(wn,{draggableId:S.id,index:ee,children:(B,Ke)=>G("div",{css:Xr,ref:B.innerRef,"data-dragging":Ke.isDragging,...B.draggableProps,...B.dragHandleProps,children:[G("span",{css:Jr,children:[x(Re,{css:[rt,jr],width:24,height:24}),x(Re,{css:rt,width:24,height:24})]}),x(Rt,{logoIcon:t,selectedItem:S,onDeselect:Qe=>Ct(Qe),onEditClosed:b?Qe=>b(Qe):void 0},`selected-item-${S.id}`)]})},S.id)}),g.placeholder]})})}):P==null?void 0:P.map(g=>x(Rt,{logoIcon:t,selectedItem:g,onDeselect:S=>Ct(S),onEditClosed:b?S=>b(S):void 0},`selected-item-${g.id}`))]})})};import{css as la}from"@emotion/react";import{css as ce}from"@emotion/react";var ta=ce`
387
387
  cursor: pointer;
388
388
  padding: var(--spacing-sm) 0;
389
389
  margin-right: var(--spacing-sm);
390
390
  position: relative;
391
391
  transition: background-color var(--duration-fast) var(--timing-ease-out),
392
392
  color var(--duration-fast) var(--timing-ease-out);
393
- `,so=pe`
393
+ `,ra=ce`
394
394
  border: 2px solid transparent;
395
395
  border-radius: var(--rounded-base);
396
396
  display: flex;
397
397
  align-items: center;
398
398
  gap: var(--spacing-base);
399
399
  padding: var(--spacing-sm) var(--spacing-xs);
400
- `,lo=pe`
400
+ `,aa=ce`
401
401
  background-color: var(--green-50);
402
- `,co=pe`
402
+ `,oa=ce`
403
403
  font-size: var(--fs-sm);
404
404
  font-weight: var(--fw-bold);
405
405
  width: 50%;
406
- `,po=pe`
406
+ `,na=ce`
407
407
  font-weight: var(--fw-normal);
408
408
  display: block;
409
- `,uo=pe`
409
+ `,ia=ce`
410
410
  font-size: var(--fs-sm);
411
411
  > * {
412
412
  display: block;
413
413
  }
414
- `,go=pe`
414
+ `,sa=ce`
415
415
  display: block;
416
416
  height: 1.5rem;
417
417
  width: 1.5rem;
418
418
  color: var(--brand-secondary-3);
419
419
  margin-left: auto;
420
- `;import{css as mo}from"@emotion/react";import{jsx as me,jsxs as nt}from"@emotion/react/jsx-runtime";function fo({result:e,isSelected:r,triggerSelection:a}){var g;let{categories:o,logoIcon:t}=qe(),[n]=e.categories||[{id:"",name:""}],i=typeof n=="undefined"||!o||(g=o.find(d=>d.id===n.id))==null?void 0:g.name;return me("div",{"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>a(),css:[io],children:nt("div",{css:[so,r?lo:void 0],children:[e.thumbnailUrl?me("img",{src:e.thumbnailUrl,alt:`Thumbnail for ${e.title}`,css:mo`
420
+ `;import{jsx as ge,jsxs as nt}from"@emotion/react/jsx-runtime";function da({result:e,isSelected:r,triggerSelection:n}){var c;let{categories:a,logoIcon:t}=He(),[o]=e.categories||[{id:"",name:""}],i=typeof o=="undefined"||!a||(c=a.find(d=>d.id===o.id))==null?void 0:c.name;return ge("div",{"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>n(),css:[ta],children:nt("div",{css:[ra,r?aa:void 0],children:[e.thumbnailUrl?ge("img",{src:e.thumbnailUrl,alt:`Thumbnail for ${e.title}`,css:la`
421
421
  background-color: var(--gray-200);
422
422
  width: 3rem;
423
423
  height: 3rem;
424
424
  object-fit: cover;
425
- `}):me($,{src:t,alt:"Logo",css:mo`
425
+ `}):ge(N,{src:t,alt:"Logo",css:la`
426
426
  height: 2.25rem;
427
427
  width: 2.25rem;
428
- `}),nt("h4",{css:[co],children:[e.title,i?me("span",{css:[po],children:i}):null]}),nt("p",{css:[uo],children:["SKU: ",e.sku||e.id,e.price!==void 0?me("span",{children:e.price}):null]}),r?me(Ae,{css:[go]}):null]})},e.id)}import{css as ne}from"@emotion/react";import{mq as vo}from"@uniformdev/design-system";var ho=ne`
428
+ `}),nt("h4",{css:[oa],children:[e.title,i?ge("span",{css:[na],children:i}):null]}),nt("p",{css:[ia],children:["SKU: ",e.sku||e.id,e.price!==void 0?ge("span",{children:e.price}):null]}),r?ge(Ie,{css:[sa]}):null]})},e.id)}import{css as me}from"@emotion/react";import{Icon as kn,mq as Ln}from"@uniformdev/design-system";import{CgClose as _n}from"react-icons/cg";import{css as oe}from"@emotion/react";import{mq as ca}from"@uniformdev/design-system";var pa=oe`
429
429
  border: 1px solid var(--gray-200);
430
430
  border-radius: var(--rounded-base);
431
431
  background: var(--gray-50);
432
432
  display: flex;
433
433
  width: 100%;
434
- `,yo=ne`
434
+ `,ua=oe`
435
435
  align-items: center;
436
436
  display: flex;
437
437
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
@@ -439,22 +439,22 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
439
439
  flex-grow: 1;
440
440
  gap: var(--spacing-sm);
441
441
  margin-inline: 0 var(--spacing-sm);
442
- `,bo=ne`
442
+ `,ga=oe`
443
443
  display: flex;
444
444
  align-items: center;
445
445
  gap: var(--spacing-sm);
446
446
  flex-grow: 1;
447
447
 
448
- ${vo("lg")} {
448
+ ${ca("lg")} {
449
449
  width: 50%;
450
450
  margin-bottom: 0;
451
451
  }
452
- `,it=ne`
452
+ `,it=oe`
453
453
  background-color: var(--gray-200);
454
454
  width: 3.5rem;
455
455
  height: 3.5rem;
456
456
  object-fit: cover;
457
- `,st=ne`
457
+ `,st=oe`
458
458
  align-items: center;
459
459
  background: var(--white);
460
460
  border-radius: var(--rounded-base);
@@ -469,50 +469,50 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
469
469
  &:hover {
470
470
  background: var(--gray-50);
471
471
  }
472
- `,lt=ne`
472
+ `,lt=oe`
473
473
  font-size: var(--fs-sm);
474
- `,xo=ne`
474
+ `,ma=oe`
475
475
  display: block;
476
476
  width: 1rem;
477
477
  height: 1rem;
478
- `,wo=ne`
478
+ `,fa=oe`
479
479
  display: flex;
480
480
  flex-direction: column;
481
481
  gap: var(--spacing-sm);
482
482
 
483
- ${vo("md")} {
483
+ ${ca("md")} {
484
484
  flex-direction: row;
485
485
  min-width: 200px;
486
486
  justify-content: end;
487
487
  }
488
- `;import{css as fe}from"@emotion/react";import{Icon as Un,mq as Bn}from"@uniformdev/design-system";import{CgClose as zn}from"react-icons/cg";import{jsx as O,jsxs as Q}from"@emotion/react/jsx-runtime";function So({selectedItem:e,onDeselect:r}){var i;let{categories:a,logoIcon:o}=qe(),[t]=e.categories||[{id:"",name:""}],n=typeof t=="undefined"||!a||(i=a.find(g=>g.id===t.id))==null?void 0:i.name;return O("div",{css:[ho],children:Q("article",{css:[yo],children:[Q("div",{css:[bo],children:[e.thumbnailUrl?O("img",{src:e.thumbnailUrl,alt:n,css:[it],loading:"lazy"}):O("div",{css:[it]}),Q("div",{css:fe`
488
+ `;import{jsx as O,jsxs as Q}from"@emotion/react/jsx-runtime";function va({selectedItem:e,onDeselect:r}){var i;let{categories:n,logoIcon:a}=He(),[t]=e.categories||[{id:"",name:""}],o=typeof t=="undefined"||!n||(i=n.find(c=>c.id===t.id))==null?void 0:i.name;return O("div",{css:[pa],children:Q("article",{css:[ua],children:[Q("div",{css:[ga],children:[e.thumbnailUrl?O("img",{src:e.thumbnailUrl,alt:o,css:[it],loading:"lazy"}):O("div",{css:[it]}),Q("div",{css:me`
489
489
  > :not(:last-child) {
490
490
  margin-bottom: var(--spacing-xs);
491
491
  }
492
- `,children:[Q("h4",{css:fe`
492
+ `,children:[Q("h4",{css:me`
493
493
  margin-top: 0px;
494
494
  font-weight: var(--fw-bold);
495
- `,children:[e.title||e.id||"",n&&O("span",{css:fe`
495
+ `,children:[e.title||e.id||"",o&&O("span",{css:me`
496
496
  display: block;
497
497
  font-weight: var(--fw-regular);
498
- `,children:n})]}),Q("ul",{css:fe`
498
+ `,children:o})]}),Q("ul",{css:me`
499
499
  font-size: var(--fs-sm);
500
500
 
501
- ${Bn("sm")} {
501
+ ${Ln("sm")} {
502
502
  display: flex;
503
503
  gap: var(--spacing-base);
504
504
  }
505
- `,children:[Q("li",{children:[O("span",{css:fe`
505
+ `,children:[Q("li",{children:[O("span",{css:me`
506
506
  margin-right: var(--spacing-xs);
507
- `,children:"SKU:"}),e.sku||e.id]}),e.price!==void 0?Q("li",{children:[O("span",{css:fe`
507
+ `,children:"SKU:"}),e.sku||e.id]}),e.price!==void 0?Q("li",{children:[O("span",{css:me`
508
508
  margin-right: var(--spacing-xs);
509
- `,children:"Price:"}),O("span",{children:e.price})]}):null]})]})]}),Q("div",{css:wo,children:[e.editLink?Q("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",css:st,children:[O("span",{css:lt,children:"Edit"}),O($,{src:o,alt:"Logo",css:xo})]}):null,Q("button",{type:"button",onClick:()=>{r==null||r(e)},css:st,children:[O("span",{css:lt,children:"Unlink"}),O(Un,{icon:zn,iconColor:"red",size:16})]})]})]})},e.id)}import{Callout as qn}from"@uniformdev/design-system";import{useAsync as $n,useAsyncFn as Fn}from"react-use";import{jsx as dt,jsxs as Nn}from"@emotion/react/jsx-runtime";function Ec({selectedProducts:e,setSelectedProducts:r,onGetCategories:a,onSearchProducts:o,logoIcon:t,multiSelect:n,multiSelectId:i,selectedItemComponent:g,rowComponent:d,errorComponent:f,helpComponent:s,noResultsComponent:m,onSort:c,typeSelectorAllTypesOptionText:y="All categories",typeSelectorLabel:P="Select Category"}){var ie,E;let{value:w,loading:S,error:ue}=$n(async()=>await a(),[a]),Se=w==null?void 0:w.map(D=>D.id).join(","),q=Gn(()=>w?w.map(v=>({id:v.id,name:v.name})):void 0,[Se]),ee=On(),[Z,Ce]=Fn(async(D,v)=>{let z=await o({text:D,options:{limit:v==null?void 0:v.count,offset:v==null?void 0:v.offset,categoryId:v==null?void 0:v.contentType,cursor:v==null?void 0:v.cursor}});return(v==null?void 0:v.offset)===0&&(ee.current=[]),(ee.current=ee.current||[]).push(...z.products),z},[o]),_e=async D=>{await r(D)};return ue||Z.error?dt(f||(({categoriesError:v,searchError:z})=>Nn(qn,{type:"error",children:["There was an error: ",(v==null?void 0:v.message)||(z==null?void 0:z.message)]})),{categoriesError:ue,searchError:Z.error}):dt(Co.Provider,{value:{categories:w,logoIcon:t},children:dt(no,{search:Ce,results:ee.current,logoIcon:t,selectedItems:e,select:_e,multiSelectId:i||"product-search-multi-select",multiSelect:n,contentTypes:q,selectedItemComponent:g||So,rowComponent:d||fo,totalResults:(ie=Z.value)==null?void 0:ie.total,cursor:(E=Z.value)==null?void 0:E.cursor,resultsLoading:Z.loading||S,helpComponent:s,noResultsComponent:m,onSort:c,typeSelectorAllTypesOptionText:y,typeSelectorLabel:P})})}var Co=An.createContext(void 0),qe=()=>{let e=Hn(Co);if(!e)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return e};import{css as _}from"@emotion/react";import{mq as Wn}from"@uniformdev/design-system";var Ro=_`
509
+ `,children:"Price:"}),O("span",{children:e.price})]}):null]})]})]}),Q("div",{css:fa,children:[e.editLink?Q("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",css:st,children:[O("span",{css:lt,children:"Edit"}),O(N,{src:a,alt:"Logo",css:ma})]}):null,Q("button",{type:"button",onClick:()=>{r==null||r(e)},css:st,children:[O("span",{css:lt,children:"Unlink"}),O(kn,{icon:_n,iconColor:"red",size:16})]})]})]})},e.id)}import{jsx as dt,jsxs as zn}from"@emotion/react/jsx-runtime";function uc({selectedProducts:e,setSelectedProducts:r,onGetCategories:n,onSearchProducts:a,logoIcon:t,multiSelect:o,multiSelectId:i,selectedItemComponent:c,rowComponent:d,errorComponent:m,helpComponent:s,noResultsComponent:p,onSort:h,typeSelectorAllTypesOptionText:f="All categories",typeSelectorLabel:C="Select Category"}){var ne,M;let{value:b,loading:w,error:pe}=Un(async()=>await n(),[n]),we=b==null?void 0:b.map(U=>U.id).join(","),q=En(()=>b?b.map(v=>({id:v.id,name:v.name})):void 0,[we]),j=Mn(),[Z,Se]=Bn(async(U,v)=>{let z=await a({text:U,options:{limit:v==null?void 0:v.count,offset:v==null?void 0:v.offset,categoryId:v==null?void 0:v.contentType,cursor:v==null?void 0:v.cursor}});return(v==null?void 0:v.offset)===0&&(j.current=[]),(j.current=j.current||[]).push(...z.products),z},[a]),_e=async U=>{await r(U)};return pe||Z.error?dt(m||(({categoriesError:v,searchError:z})=>zn(In,{type:"error",children:["There was an error: ",(v==null?void 0:v.message)||(z==null?void 0:z.message)]})),{categoriesError:pe,searchError:Z.error}):dt(ha.Provider,{value:{categories:b,logoIcon:t},children:dt(ea,{search:Se,results:j.current,logoIcon:t,selectedItems:e,select:_e,multiSelectId:i||"product-search-multi-select",multiSelect:o,contentTypes:q,selectedItemComponent:c||va,rowComponent:d||da,totalResults:(ne=Z.value)==null?void 0:ne.total,cursor:(M=Z.value)==null?void 0:M.cursor,resultsLoading:Z.loading||w,helpComponent:s,noResultsComponent:p,onSort:h,typeSelectorAllTypesOptionText:f,typeSelectorLabel:C})})}var ha=Dn.createContext(void 0),He=()=>{let e=Vn(ha);if(!e)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return e};import{css as ve}from"@emotion/react";import{Icon as La}from"@uniformdev/design-system";import{useEffect as Hn,useRef as _a,useState as Gn}from"react";import{CgClose as On,CgInfo as qn}from"react-icons/cg";import{format as Nn}from"timeago.js";import{css as I}from"@emotion/react";import{mq as An}from"@uniformdev/design-system";var ba=I`
510
510
  border: 1px solid var(--gray-200);
511
511
  background: var(--gray-50);
512
512
  border-radius: var(--rounded-base);
513
513
  display: flex;
514
514
  width: 100%;
515
- `,Po=_`
515
+ `,ya=I`
516
516
  align-items: center;
517
517
  display: flex;
518
518
  flex-grow: 1;
@@ -520,23 +520,23 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
520
520
  margin-inline: 0 var(--spacing-sm);
521
521
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
522
522
  position: relative;
523
- `,ko=_`
523
+ `,xa=I`
524
524
  flex-grow: 1;
525
- `,To=_`
525
+ `,wa=I`
526
526
  align-items: center;
527
527
  display: flex;
528
528
  position: relative;
529
- `,Lo=_`
529
+ `,Sa=I`
530
530
  color: var(--brand-secondary-1);
531
531
  font-size: var(--fs-base);
532
532
  font-weight: var(--fw-bold);
533
533
  line-height: 1;
534
534
  margin: 0;
535
535
  word-break: break-word;
536
- `,_o=_`
536
+ `,Ca=I`
537
537
  width: 1.5rem;
538
538
  height: 1.5rem;
539
- `,Io=_`
539
+ `,Ra=I`
540
540
  background: var(--white);
541
541
  border-radius: var(--rounded-base);
542
542
  border-left: 4px solid var(--brand-secondary-3);
@@ -545,22 +545,22 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
545
545
  padding: var(--spacing-base);
546
546
  z-index: var(--z-10);
547
547
  width: max-content;
548
- `,ve=_`
548
+ `,fe=I`
549
549
  font-size: var(--fs-sm);
550
- `,$e=_`
550
+ `,Ge=I`
551
551
  font-weight: var(--fw-bold);
552
552
  margin-right: var(--spacing-sm);
553
- `,Vo=_`
553
+ `,Pa=I`
554
554
  display: flex;
555
555
  flex-direction: column;
556
556
  gap: var(--spacing-sm);
557
557
 
558
- ${Wn("md")} {
558
+ ${An("md")} {
559
559
  flex-direction: row;
560
560
  justify-content: end;
561
561
  min-width: 200px;
562
562
  }
563
- `,ct=_`
563
+ `,ct=I`
564
564
  align-items: center;
565
565
  background: var(--white);
566
566
  border-radius: var(--rounded-base);
@@ -575,40 +575,52 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
575
575
  &:hover {
576
576
  background: var(--gray-50);
577
577
  }
578
- `,Eo=_`
578
+ `,Ta=I`
579
579
  display: flex;
580
580
  margin-top: var(--spacing-sm);
581
581
  gap: var(--spacing-sm);
582
- `,Do=_`
582
+ `,ka=I`
583
583
  background: none;
584
584
  outline: none;
585
585
  border: none;
586
586
  margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
587
- `,pt=_`
587
+ `,pt=I`
588
588
  display: block;
589
589
  max-width: 100%;
590
590
  min-width: 100px;
591
591
  height: auto;
592
- `;import{useState as Kn,useRef as Mo,useEffect as Qn}from"react";import{CgInfo as Yn,CgClose as Zn}from"react-icons/cg";import{format as Xn}from"timeago.js";import{css as he}from"@emotion/react";import{Icon as Uo}from"@uniformdev/design-system";import{Fragment as jn,jsx as I,jsxs as V}from"@emotion/react/jsx-runtime";function Yc({selectedItem:e,onDeselect:r,onEditClosed:a,logoIcon:o,itemDetailsRendererComponent:t}){let n=Mo(null),i=Mo(null),[g,d]=Kn(!1);Qn(()=>{let m=y=>{n.current&&!n.current.contains(y.target)&&i.current&&!i.current.contains(y.target)&&d(!1)},c=()=>{d(!1)};return window.addEventListener("resize",c,!0),document.addEventListener("scroll",m,!0),document.addEventListener("mousedown",m),()=>{window.removeEventListener("resize",c,!0),document.removeEventListener("scroll",m,!0),document.removeEventListener("mousedown",m)}},[i]);let f=()=>{var m;if(d(!g),i.current&&n.current){let c=(m=n==null?void 0:n.current)==null?void 0:m.getBoundingClientRect();i.current.style.top=`${c.top+30}px`}},s=t!=null?t:Jn;return I("div",{css:[Ro,he`
592
+ `;import{Fragment as Fn,jsx as D,jsxs as V}from"@emotion/react/jsx-runtime";function _c({selectedItem:e,onDeselect:r,onEditClosed:n,logoIcon:a,itemDetailsRendererComponent:t}){let o=_a(null),i=_a(null),[c,d]=Gn(!1);Hn(()=>{let p=f=>{o.current&&!o.current.contains(f.target)&&i.current&&!i.current.contains(f.target)&&d(!1)},h=()=>{d(!1)};return window.addEventListener("resize",h,!0),document.addEventListener("scroll",p,!0),document.addEventListener("mousedown",p),()=>{window.removeEventListener("resize",h,!0),document.removeEventListener("scroll",p,!0),document.removeEventListener("mousedown",p)}},[i]);let m=()=>{var p;if(d(!c),i.current&&o.current){let h=(p=o==null?void 0:o.current)==null?void 0:p.getBoundingClientRect();i.current.style.top=`${h.top+30}px`}},s=t!=null?t:$n;return D("div",{css:[ba,ve`
593
593
  margin: 0 0 1rem 0;
594
- `],children:V("div",{css:Po,children:[V("div",{css:ko,children:[V("div",{css:To,children:[I("h4",{css:[Lo],title:`ID: ${e.id}`,"data-test-id":"dam-selected-item",children:e.title||e.id||""}),e.popoverData?V(jn,{children:[I("button",{type:"button",ref:n,css:Do,"aria-controls":"path-details","aria-expanded":g,onClick:f,children:I(Uo,{icon:Yn,iconColor:"gray",size:24,css:he`
594
+ `],children:V("div",{css:ya,children:[V("div",{css:xa,children:[V("div",{css:wa,children:[D("h4",{css:[Sa],title:`ID: ${e.id}`,"data-test-id":"dam-selected-item",children:e.title||e.id||""}),e.popoverData?V(Fn,{children:[D("button",{type:"button",ref:o,css:ka,"aria-controls":"path-details","aria-expanded":c,onClick:m,children:D(La,{icon:qn,iconColor:"gray",size:24,css:ve`
595
595
  opacity: var(--opacity-75);
596
- `})}),I("div",{id:"path-details","aria-hidden":!g,ref:i,css:[Io,g?he`
596
+ `})}),D("div",{id:"path-details","aria-hidden":!c,ref:i,css:[Ra,c?ve`
597
597
  visibility: visible;
598
- `:he`
598
+ `:ve`
599
599
  visibility: hidden;
600
- `],children:Object.entries(e.popoverData).map(([m,c],y)=>V("div",{css:ve,children:[V("span",{css:$e,children:[m,":"]}),c]},y))})]}):null]}),I(s,{item:e})]}),V("div",{css:Vo,children:[e.editLink?typeof e.editLink=="string"?V("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:m=>{a&&(Oe(m.currentTarget.href,()=>a(e)),m.preventDefault())},css:ct,children:[I("span",{css:ve,children:"Edit"}),o?I($,{src:o,css:_o,alt:"Logo"}):null]}):e.editLink:null,V("button",{type:"button",onClick:()=>{r(e)},css:ct,children:[I("span",{css:ve,children:"Unlink"}),I(Uo,{icon:Zn,iconColor:"red",size:16})]})]})]})},e.id)}function Jn({item:e}){let r=null;return e.previewUrl&&typeof e.previewUrl=="string"?e.type==="image"?r=I("img",{src:e.previewUrl,alt:e.id,width:"200",css:pt}):e.type==="video"&&(r=I("video",{src:e.previewUrl,title:e.id,width:"200",controls:!0,css:pt})):e.previewUrl&&typeof e.previewUrl!="string"&&(r=e.previewUrl),r||e.metadata?V("div",{css:Eo,children:[r?I("div",{children:r}):null,V("ul",{children:[e.metadata?Object.entries(e.metadata).map(([a,o])=>V("li",{css:[ve,he`
600
+ `],children:Object.entries(e.popoverData).map(([p,h],f)=>V("div",{css:fe,children:[V("span",{css:Ge,children:[p,":"]}),h]},f))})]}):null]}),D(s,{item:e})]}),V("div",{css:Pa,children:[e.editLink?typeof e.editLink=="string"?V("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:p=>{n&&(Ae(p.currentTarget.href,()=>n(e)),p.preventDefault())},css:ct,children:[D("span",{css:fe,children:"Edit"}),a?D(N,{src:a,css:Ca,alt:"Logo"}):null]}):e.editLink:null,V("button",{type:"button",onClick:()=>{r(e)},css:ct,children:[D("span",{css:fe,children:"Unlink"}),D(La,{icon:On,iconColor:"red",size:16})]})]})]})},e.id)}function $n({item:e}){let r=null;return e.previewUrl&&typeof e.previewUrl=="string"?e.type==="image"?r=D("img",{src:e.previewUrl,alt:e.id,width:"200",css:pt}):e.type==="video"&&(r=D("video",{src:e.previewUrl,title:e.id,width:"200",controls:!0,css:pt})):e.previewUrl&&typeof e.previewUrl!="string"&&(r=e.previewUrl),r||e.metadata?V("div",{css:Ta,children:[r?D("div",{children:r}):null,V("ul",{children:[e.metadata?Object.entries(e.metadata).map(([n,a])=>V("li",{css:[fe,ve`
601
601
  order: 1;
602
- `],children:[V("span",{css:[$e,he`
602
+ `],children:[V("span",{css:[Ge,ve`
603
603
  order: 1;
604
- `],children:[a,":"]}),o]},a)):null,e.createdDate?V("li",{css:ve,children:[I("span",{css:$e,children:"Date:"}),Xn(e.createdDate)]}):null]})]}):null}import{LoadingIndicator as ei,Theme as ti}from"@uniformdev/design-system";import{jsx as Le,jsxs as ri}from"@emotion/react/jsx-runtime";var op=({children:e,loadingComponent:r,errorComponent:a})=>{let{initializing:o,error:t,sdk:n}=Dt();if(o||!n){let i=r;return i?Le(i,{}):Le(ei,{})}if(t){let i=a;if(i)return Le(i,{error:t});throw t}return ri(Ie.Provider,{value:{sdk:n},children:[Le(ti,{}),Le(Ve,{children:e})]})};function Bo(e){return Object.entries(e||{}).sort(([r,a],[o,t])=>{var n,i;return a.order&&t.order?a.order-t.order:a.order?1:t.order?-1:((n=a.displayName)!=null?n:r).localeCompare((i=t.displayName)!=null?i:o)}).map(([r,a])=>({name:r,...a}))}import*as xe from"react";import{Button as Oo,Input as gt}from"@uniformdev/design-system";import{Form as oi,Formik as ai}from"formik";import{css as ut}from"@emotion/react";var zo=ut`
604
+ `],children:[n,":"]}),a]},n)):null,e.createdDate?V("li",{css:fe,children:[D("span",{css:Ge,children:"Date:"}),Nn(e.createdDate)]}):null]})]}):null}import{LoadingIndicator as oi,Theme as ni}from"@uniformdev/design-system";import{initializeUniformMeshSDK as Wn}from"@uniformdev/mesh-sdk";import{useEffect as Kn,useRef as Qn,useState as Ia}from"react";var Da=({autoResizingDisabled:e}={})=>{let[r,n]=Ia(),[a,t]=Ia(),o=Qn(!1);return Kn(()=>{typeof window=="undefined"||a||(typeof window.UniformMeshSDK=="undefined"&&!o.current?(o.current=!0,Wn({autoResizingDisabled:e}).then(i=>{t(i)}).catch(i=>{n(i)}).finally(()=>{o.current=!1})):t(window.UniformMeshSDK))},[e]),{initializing:!a&&!r,error:r,sdk:a}};import{createContext as jn,useContext as ei,useEffect as ti,useState as ri}from"react";import{Theme as Yn}from"@uniformdev/design-system";import{createContext as Zn,useContext as Xn}from"react";import{jsx as Va,jsxs as Jn}from"@emotion/react/jsx-runtime";var Oe=Zn(void 0),qc=({children:e})=>{let r;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(r={sdk:window.UniformMeshSDK}),Jn(Oe.Provider,{value:r,children:[Va(Yn,{}),Va(qe,{children:e})]})},Ea=()=>{let e=Xn(Oe);if(!e)throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");return e};function Ma(){let{sdk:e}=Ea();return e}import{jsx as ai}from"@emotion/react/jsx-runtime";var Ua=jn(void 0),qe=({children:e})=>{let r=Ma(),[n,a]=ri(r.getCurrentLocation()),t=o=>{a(i=>({...i,value:o.newValue}))};return ti(()=>(r.events.on("onValueChanged",t),()=>{r.events.off("onValueChanged",t)}),[r]),ai(Ua.Provider,{value:{location:n},children:e})},Ne=()=>{let e=ei(Ua);if(!e)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return e};import{jsx as ke,jsxs as ii}from"@emotion/react/jsx-runtime";var np=({children:e,loadingComponent:r,errorComponent:n})=>{let{initializing:a,error:t,sdk:o}=Da();if(a||!o){let i=r;return i?ke(i,{}):ke(oi,{})}if(t){let i=n;if(i)return ke(i,{error:t});throw t}return ii(Oe.Provider,{value:{sdk:o},children:[ke(ni,{}),ke(qe,{children:e})]})};import{css as Ga}from"@emotion/react";import di from"@monaco-editor/react";import{InputSelect as ci}from"@uniformdev/design-system";import{useState as pi}from"react";import*as he from"react";import{jsx as si}from"@emotion/react/jsx-runtime";var Ba=he.createContext(null);function dp({value:e,onChange:r,children:n}){let a=he.useMemo(()=>({dispatch:t=>{if(t.type==="setRelativeUrl")r(o=>({...o,relativeUrl:t.relativeUrl}));else if(t.type==="updateParameter")r(o=>{let i=[...o.parameters];return typeof t.index=="number"?i[t.index]=t.parameter:i.push(t.parameter),{...o,parameters:i}});else if(t.type==="removeParameter")r(o=>{let i=[...o.parameters];return i.splice(t.index,1),{...o,parameters:i}});else if(t.type==="updateHeader")r(o=>{let i=[...o.headers];return typeof t.index!="undefined"?i[t.index]=t.header:i.push(t.header),{...o,headers:i}});else if(t.type==="removeHeader")r(o=>{let i=[...o.headers];return i.splice(t.index,1),{...o,headers:i}});else if(t.type==="setMethod")r(o=>({...o,method:t.method}));else if(t.type==="setBody")r(o=>{let i=[...o.headers],c=i.findIndex(({key:d})=>d.trim().toLocaleLowerCase()==="content-type");return c>-1?i[c].value=t.contentType:i.push({key:"Content-Type",value:t.contentType}),{...o,body:t.body,headers:i}});else throw new Error(`Unknown event ${JSON.stringify(t)}`)},request:e}),[r,e]);return si(Ba.Provider,{value:a,children:n})}function Y(){let e=he.useContext(Ba);if(!e)throw new Error("No RequestProvider present");return e}import{css as za}from"@emotion/react";var $e=za`
605
+ background: var(--white);
606
+ `,Aa=e=>za`
607
+ align-items: start;
608
+ background: ${e};
609
+ display: grid;
610
+ grid-template-columns: 12ch 1fr;
611
+ gap: var(--spacing-sm);
612
+ `;import{jsx as li}from"@emotion/react/jsx-runtime";var Ha=({bgColor:e="transparent",children:r,...n})=>li("div",{css:Aa(e),...n,children:r});import{jsx as gt,jsxs as gi}from"@emotion/react/jsx-runtime";var ui=[{label:"Text",value:"plaintext"},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"},{label:"JavaScript",value:"javascript"},{label:"XML",value:"xml"},{label:"HTML",value:"html"}],Oa={plaintext:"text/plain",json:"application/json",yaml:"application/x-yaml",javascript:"application/javascript",xml:"application/xml",html:"text/html"};function Rp(){let{request:e,dispatch:r}=Y(),[n,a]=pi("json");return gi("div",{css:Ga`
613
+ background: var(--white);
614
+ `,children:[gt(Ha,{bgColor:"var(--gray-100)",css:Ga`
615
+ padding: var(--spacing-sm) var(--spacing-base);
616
+ `,children:gt(ci,{label:"Language",showLabel:!1,options:ui,value:n,onChange:t=>{let o=t.currentTarget.value;a(o),e.body&&r({type:"setBody",body:e.body,contentType:Oa[o]})}})}),gt(di,{height:200,value:e.body,language:n,options:{language:n,minimap:{enabled:!1},folding:!1},onChange:t=>{t&&r({type:"setBody",body:t,contentType:Oa[n]})}})]})}import{Input as qa,Table as mi,TableBody as fi,TableCellData as Na,TableCellHead as $a,TableHead as vi,TableRow as Fa}from"@uniformdev/design-system";import{jsx as X,jsxs as mt}from"@emotion/react/jsx-runtime";function Ip({disableVariables:e}){let{dispatch:r,request:n}=Y(),a=[...n.headers,{key:"",value:""}];return X("div",{css:$e,children:mt(mi,{children:[X(vi,{children:mt(Fa,{children:[X($a,{children:"Name"}),X($a,{children:"Value"})]})}),X(fi,{children:a.map((t,o)=>mt(Fa,{children:[X(Na,{width:"50%",children:X(qa,{label:t.key,value:t.key,showLabel:!1,onChange:i=>{i.currentTarget.value?r({type:"updateHeader",header:{key:i.currentTarget.value,value:t.value},index:o}):r({type:"removeHeader",index:o})}})}),X(Na,{width:"50%",children:t.key?X(qa,{showLabel:!1,label:t.value,value:t.value,onChange:i=>r({type:"updateHeader",header:{key:t.key,value:i.currentTarget.value},index:o})}):null})]},o))})]})})}import{InputSelect as hi}from"@uniformdev/design-system";import{jsx as bi}from"@emotion/react/jsx-runtime";function zp(e){var a;let{request:r,dispatch:n}=Y();return bi(hi,{...e,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"HEAD",value:"HEAD"}],value:(a=r.method)!=null?a:"GET",onChange:t=>n({type:"setMethod",method:t.currentTarget.value})})}import{Input as Wa,Table as yi,TableBody as xi,TableCellData as Ka,TableCellHead as Qa,TableHead as wi,TableRow as Ya}from"@uniformdev/design-system";import{jsx as J,jsxs as ft}from"@emotion/react/jsx-runtime";function Np({disableVariables:e}){let{dispatch:r,request:n}=Y(),a=[...n.parameters,{key:"",value:""}];return J("div",{css:$e,children:ft(yi,{children:[J(wi,{children:ft(Ya,{children:[J(Qa,{children:"Name"}),J(Qa,{children:"Value"})]})}),J(xi,{children:a.map((t,o)=>ft(Ya,{children:[J(Ka,{width:"50%",children:J(Wa,{label:t.key,value:t.key,showLabel:!1,onChange:i=>{i.currentTarget.value?r({type:"updateParameter",parameter:{key:i.currentTarget.value,value:t.value},index:o}):r({type:"removeParameter",index:o})}})}),J(Ka,{width:"50%",children:t.key?J(Wa,{showLabel:!1,label:t.value,value:t.value,onChange:i=>r({type:"updateParameter",parameter:{key:t.key,value:i.currentTarget.value},index:o})}):null})]},o))})]})})}import{Global as Ti}from"@emotion/react";import ki from"@yaireo/tagify/dist/react.tagify";import*as E from"react";import{css as vt}from"@emotion/react";var Za=vt`
605
617
  > * {
606
618
  margin: var(--spacing-base) 0 0;
607
619
  }
608
- `,Ao=ut`
620
+ `,Xa=vt`
609
621
  display: flex;
610
622
  gap: var(--spacing-sm);
611
- `,Ho=ut`
623
+ `,Ja=vt`
612
624
  :root {
613
625
  --tagify-dd-color-primary: rgb(53, 149, 246);
614
626
  --tagify-dd-bg-color: var(--white);
@@ -1105,33 +1117,45 @@ var Ca=Object.defineProperty;var Ra=(e,r)=>{for(var a in r)Ca(e,a,{get:r[a],enum
1105
1117
  opacity: 0;
1106
1118
  transition: inherit;
1107
1119
  }
1108
- `;import{jsx as ye,jsxs as qo}from"@emotion/react/jsx-runtime";function $o({variable:e,onSubmit:r,onCancel:a}){var t,n,i,g,d,f,s,m,c;let{variables:o}=be();return ye(ai,{initialValues:{name:e,default:(n=(t=o[e])==null?void 0:t.default)!=null?n:"",displayName:(g=(i=o[e])==null?void 0:i.displayName)!=null?g:"",helpText:(f=(d=o[e])==null?void 0:d.helpText)!=null?f:"",order:(s=o[e])==null?void 0:s.order,type:(c=(m=o[e])==null?void 0:m.type)!=null?c:""},onSubmit:y=>{let P={...y,helpText:y.helpText||void 0,type:y.type||void 0,displayName:y.displayName||void 0};return r(P)},children:({getFieldProps:y})=>qo(oi,{css:zo,children:[ye(gt,{...y("name"),label:"Name"}),ye(gt,{...y("helpText"),label:"Help Text",caption:"Appears in the composition data resource when entering a value for this variable.",autoComplete:"off"}),ye(gt,{...y("default"),label:"Default Value",autoComplete:"off"}),qo("div",{css:Ao,children:[ye(Oo,{type:"submit",children:"Save"}),ye(Oo,{type:"button",buttonType:"ghost",onClick:a,children:"cancel"})]})]})})}import{jsx as ni,jsxs as ii}from"@emotion/react/jsx-runtime";var Fo=xe.createContext(null);function bp({value:e,onChange:r,editVariableComponent:a,children:o}){let[t,n]=xe.useState(),i=a!=null?a:$o,g={dispatch:d=>{if(d.type==="set"){let{name:f,...s}=d.variable;r({...g.variables,[d.variable.name]:s}),d.openEditor&&n(d.variable.name)}else if(d.type==="edit")n(d.variable);else if(d.type==="remove"){let f={...e};delete f[d.variable],r(f)}else throw new Error(`Unknown event ${JSON.stringify(d)}`)},variables:e};return ii(Fo.Provider,{value:g,children:[o,typeof t!="undefined"?ni(i,{onSubmit:d=>{n(void 0);let{name:f,...s}=d;r({...e,[f]:s})},onCancel:()=>n(void 0),variable:t}):null]})}function be(){let e=xe.useContext(Fo);if(!e)throw new Error("No VariablesProvider present");return e}import{AddListButton as si,button as li,Icon as di,Table as ci,TableBody as pi,TableCellData as mt,TableCellHead as ft,TableHead as ui,TableRow as No}from"@uniformdev/design-system";import{css as vt}from"@emotion/react";import{Fragment as gi,jsx as U,jsxs as Fe}from"@emotion/react/jsx-runtime";function Tp(){let{variables:e,dispatch:r}=be(),a=Bo(e);return Fe(gi,{children:[Fe(ci,{children:[U(ui,{children:Fe(No,{children:[U(ft,{children:"Name"}),U(ft,{children:"Default Value"}),U(ft,{})]})}),U(pi,{children:a.map(({name:o,displayName:t,default:n})=>{let i=t!=null?t:o;return Fe(No,{id:i,children:[U(mt,{children:U("button",{css:vt`
1109
- border: none;
1110
- color: var(--brand-secondary-5);
1111
- font-weight: var(--fw-medium);
1112
- padding: 0;
1113
- background: none;
1114
- overflow: hidden;
1115
- text-overflow: ellipsis;
1116
- white-space: nowrap;
1117
- max-width: 20ch;
1118
- `,type:"button",onClick:g=>{g.preventDefault(),r({type:"edit",variable:o})},title:i,children:i})}),U(mt,{children:U("span",{css:vt`
1119
- overflow: hidden;
1120
- text-overflow: ellipsis;
1121
- white-space: nowrap;
1122
- max-width: 20ch;
1123
- `,title:n,children:n})}),U(mt,{align:"right",children:U("button",{type:"button",title:`delete ${i}`,css:[li,vt`
1124
- background: transparent;
1125
- `],"aria-controls":i,onClick:()=>r({type:"remove",variable:o}),children:U(di,{icon:"trash",iconColor:"red"})})})]},o)})})]}),U(si,{onButtonClick:()=>r({type:"edit",variable:""}),"aria-label":"Add variable",buttonText:"add variable",icon:"math-plus",css:{marginLeft:"var(--spacing-md)"}})]})}import*as B from"react";import mi from"@yaireo/tagify/dist/react.tagify";import{Global as fi}from"@emotion/react";import{Fragment as vi,jsx as Ko,jsxs as hi}from"@emotion/react/jsx-runtime";function Wo(e){return e.replace(/\${{.*?"value":"([^"]+)".*?}}/g,"${$1}").replace(/[\r\n]+/g,"")}function Qo({label:e,value:r,disableVariables:a,onChange:o}){let{variables:t,dispatch:n}=be(),i=B.useRef(t),g=B.useRef(n),d=B.useRef(o),f=B.useRef();B.useEffect(()=>{i.current=t},[t]),B.useEffect(()=>{g.current=n},[n]),B.useEffect(()=>{d.current=o},[o]),B.useEffect(()=>{var y,P,w;let c=Wo((P=(y=f.current)==null?void 0:y.getInputValue())!=null?P:"");r!==c&&((w=f.current)==null||w.loadOriginalValues(r))},[r]);let s=B.useCallback(c=>{d.current(Wo(c))},[]),m=B.useCallback(c=>{i.current[c]||g.current({type:"set",variable:{name:c,default:""},openEditor:!0})},[]);return hi(vi,{children:[Ko(fi,{styles:Ho}),Ko(mi,{tagifyRef:f,"aria-label":e,defaultValue:r,autoFocus:!1,whitelist:Object.entries(t).map(([c,y])=>{var P;return{name:(P=y.displayName)!=null?P:c,value:c}}),settings:{pattern:a?null:/\$/,enforceWhitelist:a,mixTagsInterpolator:["${","}"],duplicates:!0,tagTextProp:"name",dropdown:{position:"text",enabled:0,mapValueTo:c=>c.name,includeSelectedTags:!0,searchKeys:["name","value"],highlightFirst:!0}},InputMode:"textarea",onAdd:c=>{var P;let y=(P=c.detail.data)==null?void 0:P.value;y&&m(y)},onRemove:c=>{s(c.detail.tagify.getInputValue())},onChange:c=>{s(c.detail.value)},onInput:c=>{s(c.detail.tagify.getInputValue())}})]})}import xi from"@monaco-editor/react";import{InputSelect as wi}from"@uniformdev/design-system";import{useState as Si}from"react";import*as we from"react";import{jsx as yi}from"@emotion/react/jsx-runtime";var Zo=we.createContext(null);function zp({value:e,onChange:r,children:a}){let o=we.useMemo(()=>({dispatch:t=>{if(t.type==="setRelativeUrl")r({...e,relativeUrl:t.relativeUrl,parameters:X(t.relativeUrl)});else if(t.type==="updateParameter"){let n=Yo(e.relativeUrl,i=>{let g=`${t.parameter.key}=${t.parameter.value}`;typeof t.index!="undefined"?i[t.index]=g:i.push(g)});r({...e,relativeUrl:n,parameters:X(n)})}else if(t.type==="removeParameter"){let n=Yo(e.relativeUrl,i=>{i.splice(t.index,1)});r({...e,relativeUrl:n,parameters:X(n)})}else if(t.type==="updateHeader"){let n=[...e.headers];typeof t.index!="undefined"?n[t.index]=t.header:n.push(t.header),r({...e,headers:n,parameters:X(e.relativeUrl)})}else if(t.type==="removeHeader"){let n=[...e.headers];n.splice(t.index,1),r({...e,headers:n,parameters:X(e.relativeUrl)})}else if(t.type==="setMethod")r({...e,method:t.method,parameters:X(e.relativeUrl)});else if(t.type==="setBody")r({...e,body:t.body,parameters:X(e.relativeUrl)});else throw new Error(`Unknown event ${JSON.stringify(t)}`)},request:{...e,parameters:X(e.relativeUrl)}}),[r,e]);return yi(Zo.Provider,{value:o,children:a})}function Y(){let e=we.useContext(Zo);if(!e)throw new Error("No RequestProvider present");return e}function Yo(e,r){let[a,o]=e.split("?"),t=a,n=(o!=null?o:"").split("&");return r(n),t+=`?${n.join("&")}`,t}function X(e){var r,a;return((a=(r=e.split("?")[1])==null?void 0:r.split("&").map(o=>{let[t,n]=o.split("=");return{key:t,value:n!=null?n:""}}))!=null?a:[]).filter(o=>o.key)}function Ap(e){let[r]=e.split("?");return[r,X(e)]}import{css as Xo}from"@emotion/react";var Ne=Xo`
1126
- background: var(--white);
1127
- `,Jo=e=>Xo`
1128
- align-items: start;
1129
- background: ${e};
1130
- display: grid;
1131
- grid-template-columns: 12ch 1fr;
1132
- gap: var(--spacing-sm);
1133
- `;import{jsx as bi}from"@emotion/react/jsx-runtime";var jo=({bgColor:e="transparent",children:r,...a})=>bi("div",{css:Jo(e),...a,children:r});import{css as ea}from"@emotion/react";import{jsx as yt,jsxs as Ci}from"@emotion/react/jsx-runtime";function jp(){let{request:e,dispatch:r}=Y(),[a,o]=Si("json");return Ci("div",{css:ea`
1134
- background: var(--white);
1135
- `,children:[yt(jo,{bgColor:"var(--gray-100)",css:ea`
1136
- padding: var(--spacing-sm) var(--spacing-base);
1137
- `,children:yt(wi,{label:"Language",showLabel:!1,options:[{label:"Text",value:"plaintext"},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"},{label:"JavaScript",value:"javascript"},{label:"XML",value:"xml"},{label:"HTML",value:"html"}],value:a,onChange:t=>{o(t.currentTarget.value)}})}),yt(xi,{height:200,value:e.body,language:a,options:{language:a,minimap:{enabled:!1},folding:!1},onChange:t=>{!t||r({type:"setBody",body:t})}})]})}import{Table as Ri,TableHead as Pi,TableRow as ta,TableCellHead as ra,TableBody as ki,TableCellData as oa,Input as aa}from"@uniformdev/design-system";import{jsx as J,jsxs as bt}from"@emotion/react/jsx-runtime";function nu({disableVariables:e}){let{dispatch:r,request:a}=Y(),o=[...a.headers,{key:"",value:""}];return J("div",{css:Ne,children:bt(Ri,{children:[J(Pi,{children:bt(ta,{children:[J(ra,{children:"Name"}),J(ra,{children:"Value"})]})}),J(ki,{children:o.map((t,n)=>bt(ta,{children:[J(oa,{width:"50%",children:J(aa,{label:t.key,value:t.key,showLabel:!1,onChange:i=>{i.currentTarget.value?r({type:"updateHeader",header:{key:i.currentTarget.value,value:t.value},index:n}):r({type:"removeHeader",index:n})}})}),J(oa,{width:"50%",children:t.key?J(aa,{showLabel:!1,label:t.value,value:t.value,onChange:i=>r({type:"updateHeader",header:{key:t.key,value:i.currentTarget.value},index:n})}):null})]},n))})]})})}import{InputSelect as Ti}from"@uniformdev/design-system";import{jsx as Li}from"@emotion/react/jsx-runtime";function uu(e){var o;let{request:r,dispatch:a}=Y();return Li(Ti,{...e,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"HEAD",value:"HEAD"}],value:(o=r.method)!=null?o:"GET",onChange:t=>a({type:"setMethod",method:t.currentTarget.value})})}import{Table as _i,TableHead as Ii,TableRow as na,TableCellHead as ia,TableBody as Vi,TableCellData as sa,Input as la}from"@uniformdev/design-system";import{jsx as j,jsxs as xt}from"@emotion/react/jsx-runtime";function yu({disableVariables:e}){let{dispatch:r,request:a}=Y(),o=[...a.parameters,{key:"",value:""}];return j("div",{css:Ne,children:xt(_i,{children:[j(Ii,{children:xt(na,{children:[j(ia,{children:"Name"}),j(ia,{children:"Value"})]})}),j(Vi,{children:o.map((t,n)=>xt(na,{children:[j(sa,{width:"50%",children:j(la,{label:t.key,value:t.key,showLabel:!1,onChange:i=>{i.currentTarget.value?r({type:"updateParameter",parameter:{key:i.currentTarget.value,value:t.value},index:n}):r({type:"removeParameter",index:n})}})}),j(sa,{width:"50%",children:t.key?j(la,{showLabel:!1,label:t.value,value:t.value,onChange:i=>r({type:"updateParameter",parameter:{key:t.key,value:i.currentTarget.value},index:n})}):null})]},n))})]})})}import{jsx as Ei}from"@emotion/react/jsx-runtime";function Pu(e){let{request:r,dispatch:a}=Y();return Ei(Qo,{...e,value:r.relativeUrl,onChange:o=>{let t=o;r.baseUrl&&t.startsWith(r.baseUrl)&&(t=t.substring(r.baseUrl.length)),a({type:"setRelativeUrl",relativeUrl:t})}})}export*from"@uniformdev/mesh-sdk";import{Button as Au,Callout as Hu,LoadingIndicator as Gu,LoadingOverlay as Ou,Menu as qu,MenuItem as $u,Input as Fu,InputSelect as Nu,InputToggle as Wu,Theme as Ku,InputKeywordSearch as Qu,Heading as Yu,ScrollableList as Zu,ScrollableListItem as Xu,Textarea as Ju,Switch as ju,Label as eg,AddListButton as tg,InputComboBox as rg}from"@uniformdev/design-system";export{tg as AddListButton,Au as Button,Hu as Callout,Yc as DamSelectedItem,Nr as DefaultSearchRow,Br as DefaultSelectedItem,no as EntrySearch,Yu as Heading,Je as Icons,Fu as Input,rg as InputComboBox,Nu as InputSelect,Wu as InputToggle,Qo as InputVariables,Qu as KeywordSearchInput,eg as Label,Gu as LoadingIndicator,Ou as LoadingOverlay,qu as Menu,$u as MenuItem,op as MeshApp,Zt as ProductPreviewList,$s as ProductQuery,Qt as ProductQueryContext,Ec as ProductSearch,Co as ProductSearchContext,fo as ProductSearchRow,So as ProductSelectedItem,jp as RequestBody,nu as RequestHeaders,uu as RequestMethodSelect,yu as RequestParameters,zp as RequestProvider,jo as RequestTypeContainer,Pu as RequestUrlInput,Bt as ResolvableLoadingValue,Zu as ScrollableList,Xu as ScrollableListItem,Ot as SelectionField,ju as Switch,Ju as Textarea,Ku as Theme,Vt as UniformMeshLocationContext,Ve as UniformMeshLocationContextProvider,Ie as UniformMeshSdkContext,Oi as UniformMeshSdkContextProvider,$o as VariableEditor,Tp as VariablesList,bp as VariablesProvider,ot as badgeIcon,pt as damSelectItemImage,Ro as damSelectedItemContainer,To as damSelectedItemCopy,ko as damSelectedItemDetails,_o as damSelectedItemIcon,Do as damSelectedItemInfoBtn,Po as damSelectedItemInner,ct as damSelectedItemLinkBtn,Vo as damSelectedItemLinkContainer,Eo as damSelectedItemMediaContainer,Io as damSelectedItemPopover,$e as damSelectedItemPopoverLabel,ve as damSelectedItemSmallText,Lo as damSelectedItemTitle,Ap as decomposeRelativeUrl,eo as draggableContainer,rt as draggableIcon,ro as draggableIconOffset,to as draggableIconWrapper,Kr as entrySearchBtn,Yr as entrySearchConfig,Zr as entrySearchConfigHidden,Qr as entrySearchLoadMoreBtn,Xr as entrySearchResultList,Jr as entrySearchSelectIcon,jr as entrySearchSelectImg,Id as entrySearchSelectInput,Vd as entrySearchSelectOption,Wr as entrySearchWrapper,go as productSearchRowActiveIcon,po as productSearchRowCategory,io as productSearchRowContainer,so as productSearchRowContent,lo as productSearchRowContentActive,uo as productSearchRowDetails,co as productSearchRowTitle,ho as productSelectedItemContainer,bo as productSelectedItemContent,yo as productSelectedItemDetails,xo as productSelectedItemIcon,it as productSelectedItemImage,wo as productSelectedItemLinkContainer,st as productedSelectedItemLinkBtn,lt as productedSelectedItemSmallText,Or as searchRowBtn,zr as searchRowContainer,Hr as searchRowContainerActive,Ar as searchRowContainerWithPopover,Gr as searchRowPopover,tt as searchRowText,et as searchRowTextSmall,je as selectItemLinkBtn,Dr as selectItemLinkContainer,Er as selectItemPopover,Te as selectItemPopoverLabel,le as selectItemSmallText,kr as selectedItemContainer,_r as selectedItemCopy,Lr as selectedItemDetails,Vr as selectedItemIcon,Tr as selectedItemInner,Ir as selectedItemTitle,Dt as useInitializeUniformMeshSdk,cs as useMeshLocation,Yt as useProductQueryContext,qe as useProductSearchContext,Y as useRequest,ts as useUniformMeshLocation,Ee as useUniformMeshLocationContext,It as useUniformMeshSdk,_t as useUniformMeshSdkContext,be as useVariables,Bo as variablesToList};
1120
+ `;import*as xe from"react";import{Button as eo,Input as ht}from"@uniformdev/design-system";import{Form as Si,Formik as Ci}from"formik";import{jsx as be,jsxs as to}from"@emotion/react/jsx-runtime";function ro({variable:e,onSubmit:r,onCancel:n}){var t,o,i,c,d,m,s,p,h;let{variables:a}=ye();return be(Ci,{initialValues:{name:e,default:(o=(t=a[e])==null?void 0:t.default)!=null?o:"",displayName:(c=(i=a[e])==null?void 0:i.displayName)!=null?c:"",helpText:(m=(d=a[e])==null?void 0:d.helpText)!=null?m:"",order:(s=a[e])==null?void 0:s.order,type:(h=(p=a[e])==null?void 0:p.type)!=null?h:""},onSubmit:f=>{let C={...f,helpText:f.helpText||void 0,type:f.type||void 0,displayName:f.displayName||void 0};return r(C)},children:({getFieldProps:f,initialValues:C})=>to(Si,{css:Za,children:[be(ht,{...f("name"),label:"Name",disabled:C.name!=="",caption:"This cannot change once created."}),be(ht,{...f("helpText"),label:"Help Text",caption:"Appears in the composition data resource when entering a value for this variable.",autoComplete:"off"}),be(ht,{...f("default"),label:"Default Value",autoComplete:"off"}),to("div",{css:Xa,children:[be(eo,{type:"submit",children:"Save"}),be(eo,{type:"button",buttonType:"ghost",onClick:n,children:"cancel"})]})]})})}import{jsx as Ri,jsxs as Pi}from"@emotion/react/jsx-runtime";var ao=xe.createContext(null);function au({value:e,onChange:r,editVariableComponent:n,children:a}){let[t,o]=xe.useState(),i=n!=null?n:ro,c={dispatch:d=>{if(d.type==="set"){let{name:m,...s}=d.variable;r({...c.variables,[d.variable.name]:s}),d.openEditor&&o(d.variable.name)}else if(d.type==="edit")o(d.variable);else if(d.type==="remove"){let m={...e};delete m[d.variable],r(m)}else if(d.type==="reorder")r(d.result);else throw new Error(`Unknown event ${JSON.stringify(d)}`)},variables:e};return Pi(ao.Provider,{value:c,children:[a,typeof t!="undefined"?Ri(i,{onSubmit:d=>{o(void 0);let{name:m,...s}=d;r({...e,[m]:s})},onCancel:()=>o(void 0),variable:t}):null]})}function ye(){let e=xe.useContext(ao);if(!e)throw new Error("No VariablesProvider present");return e}import{Fragment as Li,jsx as oo,jsxs as _i}from"@emotion/react/jsx-runtime";function bt(e){return e.replace(/\${{.*?"value":"([^"]+)".*?}}/g,"${$1}").replace(/[\r\n]+/g,"")}function no({label:e,value:r,disableVariables:n,onChange:a,onPaste:t}){let{variables:o,dispatch:i}=ye(),c=E.useRef(o),d=E.useRef(i),m=E.useRef(a),s=E.useRef();E.useEffect(()=>{c.current=o},[o]),E.useEffect(()=>{d.current=i},[i]),E.useEffect(()=>{m.current=a},[a]),E.useEffect(()=>{var f;((f=s==null?void 0:s.current)==null?void 0:f.DOM)&&t&&(s.current.DOM.input.onpaste=()=>{var C,b;return t(bt((b=(C=s.current)==null?void 0:C.getInputValue())!=null?b:""))})}),E.useEffect(()=>{var C,b,w;let f=bt((b=(C=s.current)==null?void 0:C.getInputValue())!=null?b:"");r!==f&&((w=s.current)==null||w.loadOriginalValues(r))},[r]);let p=E.useCallback(f=>{m.current(bt(f))},[]),h=E.useCallback(f=>{c.current[f]||d.current({type:"set",variable:{name:f,default:""},openEditor:!0})},[]);return _i(Li,{children:[oo(Ti,{styles:Ja}),oo(ki,{tagifyRef:s,"aria-label":e,defaultValue:r,autoFocus:!1,whitelist:Object.entries(o).map(([f,C])=>{var b;return{name:(b=C.displayName)!=null?b:f,value:f}}),settings:{pattern:n?null:/\$/,enforceWhitelist:n,mixTagsInterpolator:["${","}"],duplicates:!0,tagTextProp:"name",dropdown:{position:"text",enabled:0,mapValueTo:f=>f.name,includeSelectedTags:!0,searchKeys:["name","value"],highlightFirst:!0}},InputMode:"textarea",onAdd:f=>{var b;let C=(b=f.detail.data)==null?void 0:b.value;C&&h(C)},onRemove:f=>{p(f.detail.tagify.getInputValue())},onChange:f=>{p(f.detail.value)},onInput:f=>{p(f.detail.tagify.getInputValue())}})]})}import{css as Di}from"@emotion/react";import{AddListButton as Vi,button as Ei,Icon as Mi,Table as Ui,TableBody as Bi,TableCellData as yt,TableCellHead as xt,TableHead as zi,TableRow as uo}from"@uniformdev/design-system";import{DragDropContext as Ai,Draggable as Hi,Droppable as Gi}from"react-beautiful-dnd";import{css as Fe}from"@emotion/react";var io=e=>Fe`
1121
+ position: relative;
1122
+ ${e?`
1123
+ display: table;
1124
+ left: auto !important;
1125
+ top: auto !important;
1126
+ `:void 0}
1127
+ `,so=Fe`
1128
+ &::after {
1129
+ content: '';
1130
+ display: block;
1131
+ position: absolute;
1132
+ left: 2px;
1133
+ top: var(--spacing-base);
1134
+ bottom: var(--spacing-base);
1135
+ width: 5px;
1136
+ border-left: 2px dotted var(--gray-300);
1137
+ border-right: 2px dotted var(--gray-300);
1138
+ opacity: 0;
1139
+ }
1140
+
1141
+ &:hover::after {
1142
+ opacity: 1;
1143
+ }
1144
+ `,lo=Fe`
1145
+ border: none;
1146
+ color: var(--brand-secondary-5);
1147
+ font-weight: var(--fw-medium);
1148
+ padding: 0;
1149
+ background: none;
1150
+ overflow: hidden;
1151
+ text-overflow: ellipsis;
1152
+ white-space: nowrap;
1153
+ max-width: 20ch;
1154
+ `,co=Fe`
1155
+ overflow: hidden;
1156
+ text-overflow: ellipsis;
1157
+ white-space: nowrap;
1158
+ max-width: 20ch;
1159
+ `;function po(e){return Object.entries(e||{}).sort(([r,n],[a,t])=>{var o,i;return n.order&&t.order?n.order-t.order:n.order?1:t.order?-1:((o=n.displayName)!=null?o:r).localeCompare((i=t.displayName)!=null?i:a)}).map(([r,n])=>({name:r,...n}))}import{Fragment as Oi,jsx as k,jsxs as Le}from"@emotion/react/jsx-runtime";function Cu(){let{variables:e,dispatch:r}=ye(),n=po(e),a=t=>{var o,i;if(t.destination&&t.source.droppableId===((o=t.destination)==null?void 0:o.droppableId)){let c=[...n||[]],[d]=(i=c==null?void 0:c.splice(t.source.index,1))!=null?i:[];c==null||c.splice(t.destination.index,0,d);let m=c.reduce((s,p,h)=>({...s,[p.name]:{type:p.type,default:p.default,order:h}}),{});return r({type:"reorder",result:m}),c}};return Le(Oi,{children:[k(Ai,{onDragEnd:t=>a(t),children:k(Gi,{droppableId:"variables-table",children:t=>Le(Ui,{...t.droppableProps,ref:t.innerRef,children:[k(zi,{children:Le(uo,{children:[k(xt,{children:"Name"}),k(xt,{children:"Default Value"}),k(xt,{})]})}),Le(Bi,{children:[n.map(({name:o,displayName:i,default:c},d)=>{let m=i!=null?i:o;return k(Hi,{draggableId:o,index:d,isDragDisabled:n.length===1,children:(s,p)=>Le(uo,{ref:s.innerRef,...s.dragHandleProps,...s.draggableProps,id:m,css:io(p.isDragging),"data-dragging":p.isDragging,children:[k(yt,{css:n.length>1?so:void 0,children:k("button",{css:lo,type:"button",onClick:h=>{h.preventDefault(),r({type:"edit",variable:o})},title:m,children:m})}),k(yt,{children:k("span",{css:co,title:c,children:c})}),k(yt,{align:"right",children:k("button",{type:"button",title:`delete ${m}`,css:[Ei,Di`
1160
+ background: transparent;
1161
+ `],"aria-controls":m,onClick:()=>r({type:"remove",variable:o}),children:k(Mi,{icon:"trash",iconColor:"red"})})})]})},o)}),t.placeholder]})]})})}),k(Vi,{onButtonClick:()=>r({type:"edit",variable:""}),"aria-label":"Add variable",buttonText:"add variable",icon:"math-plus",css:{marginLeft:"var(--spacing-md)"}})]})}import{jsx as qi}from"@emotion/react/jsx-runtime";function Iu(e){let{request:r,dispatch:n}=Y();return qi(no,{...e,value:r.relativeUrl,onPaste:a=>{let t=a.indexOf("?");if(t>=0){let o=a.substring(0,t);n({type:"setRelativeUrl",relativeUrl:o});for(let i=r.parameters.length-1;i>=0;i--)n({type:"removeParameter",index:i});try{new URLSearchParams(a.substring(t)).forEach((c,d)=>{n({type:"updateParameter",parameter:{key:d,value:c}})})}catch(i){}}},onChange:a=>{let t=a;r.baseUrl&&t.startsWith(r.baseUrl)&&(t=t.substring(r.baseUrl.length)),n({type:"setRelativeUrl",relativeUrl:t})}})}function Mu(e,r){return wt(encodeURI(e),r)}function Uu(e,r){return{key:wt(encodeURIComponent(e.key),r),value:wt(encodeURIComponent(e.value),r)}}function wt(e,r){return e.replace(/(\$|%24)%7B(.*?)%7D/g,(n,a,t)=>{var i;let o=decodeURIComponent(t);return(i=r==null?void 0:r[o])!=null&&i.default?r[o].default:`\${${o}}`})}function Hu(e){let{location:r}=Ne();if(e&&r.type!==e)throw new Error(`Expected location type ${e} but got ${r.type}`);return r}function Nu(){let{location:e}=Ne();return e}import{AddListButton as eg,Button as tg,Callout as rg,Heading as ag,Input as og,InputComboBox as ng,InputSelect as ig,InputToggle as sg,InputKeywordSearch as lg,Label as dg,LoadingIndicator as cg,LoadingOverlay as pg,Menu as ug,MenuItem as gg,ScrollableList as mg,ScrollableListItem as fg,Switch as vg,Textarea as hg,Theme as bg}from"@uniformdev/design-system";export*from"@uniformdev/mesh-sdk";export{eg as AddListButton,tg as Button,rg as Callout,_c as DamSelectedItem,_r as DefaultSearchRow,Gr as DefaultSelectedItem,ea as EntrySearch,ag as Heading,Ze as Icons,og as Input,ng as InputComboBox,ig as InputSelect,sg as InputToggle,no as InputVariables,lg as KeywordSearchInput,dg as Label,cg as LoadingIndicator,pg as LoadingOverlay,ug as Menu,gg as MenuItem,np as MeshApp,dr as ProductPreviewList,yl as ProductQuery,sr as ProductQueryContext,uc as ProductSearch,ha as ProductSearchContext,da as ProductSearchRow,va as ProductSelectedItem,Rp as RequestBody,Ip as RequestHeaders,zp as RequestMethodSelect,Np as RequestParameters,dp as RequestProvider,Ha as RequestTypeContainer,Iu as RequestUrlInput,Xt as ResolvableLoadingValue,mg as ScrollableList,fg as ScrollableListItem,rr as SelectionField,vg as Switch,hg as Textarea,bg as Theme,Ua as UniformMeshLocationContext,qe as UniformMeshLocationContextProvider,Oe as UniformMeshSdkContext,qc as UniformMeshSdkContextProvider,ro as VariableEditor,Cu as VariablesList,au as VariablesProvider,at as badgeIcon,pt as damSelectItemImage,ba as damSelectedItemContainer,wa as damSelectedItemCopy,xa as damSelectedItemDetails,Ca as damSelectedItemIcon,ka as damSelectedItemInfoBtn,ya as damSelectedItemInner,ct as damSelectedItemLinkBtn,Pa as damSelectedItemLinkContainer,Ta as damSelectedItemMediaContainer,Ra as damSelectedItemPopover,Ge as damSelectedItemPopoverLabel,fe as damSelectedItemSmallText,Sa as damSelectedItemTitle,Xr as draggableContainer,rt as draggableIcon,jr as draggableIconOffset,Jr as draggableIconWrapper,$r as entrySearchBtn,Wr as entrySearchConfig,Kr as entrySearchConfigHidden,Fr as entrySearchLoadMoreBtn,Qr as entrySearchResultList,Yr as entrySearchSelectIcon,Zr as entrySearchSelectImg,gd as entrySearchSelectInput,md as entrySearchSelectOption,Nr as entrySearchWrapper,sa as productSearchRowActiveIcon,na as productSearchRowCategory,ta as productSearchRowContainer,ra as productSearchRowContent,aa as productSearchRowContentActive,ia as productSearchRowDetails,oa as productSearchRowTitle,pa as productSelectedItemContainer,ga as productSelectedItemContent,ua as productSelectedItemDetails,ma as productSelectedItemIcon,it as productSelectedItemImage,fa as productSelectedItemLinkContainer,st as productedSelectedItemLinkBtn,lt as productedSelectedItemSmallText,Pr as searchRowBtn,wr as searchRowContainer,Cr as searchRowContainerActive,Sr as searchRowContainerWithPopover,Rr as searchRowPopover,et as searchRowText,je as searchRowTextSmall,tt as selectItemLinkBtn,zr as selectItemLinkContainer,Br as selectItemPopover,Te as selectItemPopoverLabel,de as selectItemSmallText,Ir as selectedItemContainer,Er as selectedItemCopy,Vr as selectedItemDetails,Ur as selectedItemIcon,Dr as selectedItemInner,Mr as selectedItemTitle,Uu as urlEncodeRequestParameter,Mu as urlEncodeRequestUrl,Da as useInitializeUniformMeshSdk,Hu as useMeshLocation,lr as useProductQueryContext,He as useProductSearchContext,Y as useRequest,Nu as useUniformMeshLocation,Ne as useUniformMeshLocationContext,Ma as useUniformMeshSdk,Ea as useUniformMeshSdkContext,ye as useVariables,po as variablesToList};