import{s as e,x as t,N as n,j as s,a4 as r,a5 as a,a6 as o,u as i,a7 as l,a8 as c,G as u,a9 as d,i as h,aa as j,F as f,M as m,ab as p,Q as b,r as k,n as g,e as v,ac as x,Z as y,_,a0 as w,a1 as $,a2 as z,ad as C,ae as S,af as q,ag as I,O as F,S as E,A as T,H as P}from"shared";import{g as A,a as M,R as L}from"ticket-fields";const N=e(n)`
  background-color: ${({theme:e})=>t({theme:e,hue:"grey",shade:100})};
  width: ${e=>"large"===e.size?72:40}px !important;
  height: ${e=>"large"===e.size?72:40}px !important;

  && > svg {
    width: ${e=>"large"===e.size?28:16}px;
    height: ${e=>"large"===e.size?28:16}px;
    color: ${({theme:e})=>t({theme:e,hue:"grey",shade:600})};
  }
`,R=({size:e,url:t})=>s.jsx(N,{size:e,isSystem:!0,children:t?s.jsx("img",{src:t,alt:""}):s.jsx(r,{"aria-hidden":"true"})}),H=e.a`
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: ${e=>e.theme.borderRadii.md};
  padding: ${e=>e.theme.space.md};
  border: ${e=>e.theme.borders.sm}
    ${({theme:e})=>t({theme:e,hue:"grey",shade:300})};
  color: ${({theme:e})=>t({theme:e,variable:"foreground.default"})};

  &:hover {
    border-color: ${e=>e.theme.colors.primaryHue};
  }

  &:hover,
  &:visited {
    text-decoration: none;
  }
`,O=e.div`
  font-size: ${e=>e.theme.fontSizes.md};
  font-weight: ${e=>e.theme.fontWeights.semibold};
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
`,U=e.div`
  font-size: ${e=>e.theme.fontSizes.sm};
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
`,D=e.div`
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: ${e=>e.theme.space.xxs};
  color: ${({theme:e})=>t({theme:e,variable:"foreground.default"})};
  margin-top: ${e=>e.theme.space.sm};
`,B=({serviceItem:e,helpCenterPath:t})=>s.jsxs(H,{"data-testid":"service-catalog-list-item-container",href:`${t}/services/${e.id}`,children:[s.jsx(R,{size:"medium",url:e.thumbnail_url}),s.jsxs(D,{children:[s.jsx(O,{children:e.name}),s.jsx(U,{dangerouslySetInnerHTML:{__html:e.description}})]})]}),G=e(a)`
  padding: 0;
`,V=e(a.Col)`
  @media (min-width: 0px) {
    margin-bottom: ${e=>e.theme.space.md};
  }
`,J=()=>s.jsx(V,{xs:12,sm:6,md:4,lg:3,children:s.jsx(o,{width:"100%",height:"140px"})}),K=()=>s.jsx(G,{children:s.jsxs(a.Row,{wrap:"wrap",children:[s.jsx(J,{}),s.jsx(J,{}),s.jsx(J,{}),s.jsx(J,{})]})}),Q=e.div`
  padding: ${e=>e.theme.space.xl} 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: ${e=>e.theme.space.md};
`,W=e.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: ${e=>e.theme.space.xxs};
`,X=({helpCenterPath:e,searchInputValue:t})=>{const{t:n}=i();return s.jsxs(Q,{children:[s.jsxs(W,{children:[s.jsx(l,{children:n("service-catalog.empty-state.no-services","No services in sight")}),""===t?s.jsx(c,{children:n("service-catalog.empty-state.description","Once services are added to catalog, you'll find them here.")}):s.jsx(c,{children:n("service-catalog.empty-state.search-description","Enter your keywords in the search field.")})]}),""===t&&s.jsx(u,{isPrimary:!0,onClick:()=>{window.location.href=e},children:n("service-catalog.empty-state.go-to-homepage","Go to the homepage")})]})},Z=e(d)`
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
`,Y=({onChange:e})=>{const{t:t}=i();return s.jsx(h,{content:t("service-catalog.clear-search","Clear search"),placement:"bottom",size:"small",children:s.jsx(Z,{"aria-label":t("service-catalog.clear-search","Clear search"),size:"small",focusInset:!0,onClick:()=>e(""),children:s.jsx(j,{})})})},ee=e(f)`
  align-items: center;
  width: 320px;
  @media (max-width: 768px) {
    width: 100%;
    display: flex;
  }
`,te=e(m)`
  padding-inline-end: ${e=>7*e.theme.space.base}px;
`,ne=({searchInputValue:e,isLoading:t,onChange:n})=>{const{t:r}=i();return s.jsxs(ee,{children:[s.jsx(ee.Label,{hidden:!0,children:r("service-catalog.search-services","Search for services")}),s.jsx(te,{start:s.jsx(p,{}),type:"search",autoComplete:"off",end:t&&e?s.jsx(b,{}):void 0,value:e,placeholder:r("service-catalog.search-services","Search for services"),onChange:e=>n(e.target.value)}),!t&&e&&s.jsx(Y,{onChange:n})]})},se=16;const re=e(a.Col)`
  margin-bottom: ${e=>e.theme.space.md};
`,ae=e.div`
  padding-top: ${e=>e.theme.space.sm};
  gap: ${e=>6*e.theme.space.base+"px"};
  display: flex;
  flex-direction: column;
`,oe=e(a)`
  padding: 0;
`;function ie({helpCenterPath:e}){const[t,n]=k.useState(""),{t:r}=i(),{serviceCatalogItems:o,meta:l,count:c,isLoading:u,errorFetchingItems:d,fetchServiceCatalogItems:h}=function(){const[e,t]=k.useState(null),[n,s]=k.useState(0),[r,a]=k.useState(!1),[o,i]=k.useState(null),[l,c]=k.useState([]),u=k.useCallback((async(e,n)=>{a(!0);const r=new URLSearchParams;if(r.set("page[size]",se.toString()),n){const[e,t]=n.split("=");e&&t&&r.set(e,t)}e&&r.set("query",e);try{const e=await fetch(`/api/v2/help_center/service_catalog/items/search?${r.toString()}`),n=await e.json();if(e.ok&&(t(n.meta),c(n.service_catalog_items),s(n.count),a(!1)),!e.ok)throw a(!1),new Error(`HTTP error! status: ${e.status}`)}catch(e){a(!1),i(e)}}),[]);return{serviceCatalogItems:l,meta:e,count:n,isLoading:r,errorFetchingItems:o,fetchServiceCatalogItems:u}}();if(d)throw g({title:r("service-catalog.service-list-error-title","Services couldn't be loaded"),message:r("service-catalog.service-list-error-message","Give it a moment and try it again"),type:"error"}),d;const j=k.useMemo((()=>v(h,300)),[h]);k.useEffect((()=>{h("",null)}),[h]),k.useEffect((()=>()=>j.cancel()),[j]);return s.jsxs(ae,{children:[s.jsx(ne,{searchInputValue:t,isLoading:u,onChange:e=>{n(e),j(e,null)}}),s.jsx("span",{children:r("service-catalog.service-count","{{count}} services",{"defaultValue.one":"{{count}} service",count:c})}),u?s.jsx(K,{}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{children:s.jsx(a.Row,{wrap:"wrap",children:0!==o.length&&o.map((t=>s.jsx(re,{xs:12,sm:6,md:4,lg:3,children:s.jsx(B,{serviceItem:t,helpCenterPath:e},t.id)},t.id)))})}),0===o.length&&s.jsx(X,{helpCenterPath:e,searchInputValue:t}),l&&(l.before_cursor||l.after_cursor)&&s.jsxs(x,{children:[s.jsx(x.Previous,{onClick:()=>{l&&l.before_cursor&&h(t,"page[before]="+l.before_cursor)},disabled:null==l.before_cursor,children:r("service-catalog.pagination.previous","Previous")}),s.jsx(x.Next,{onClick:()=>{l&&l.after_cursor&&h(t,"page[after]="+l.after_cursor)},disabled:null==l.after_cursor,children:r("service-catalog.pagination.next","Next")})]})]})]})}async function le(e,t,n,r){y(r),await _(r,[()=>function(e){switch(e){case"./translations/locales/af.json":return import("service-catalog-translations").then((function(e){return e.a}));case"./translations/locales/ar-x-pseudo.json":return import("service-catalog-translations").then((function(e){return e.b}));case"./translations/locales/ar.json":return import("service-catalog-translations").then((function(e){return e.c}));case"./translations/locales/az.json":return import("service-catalog-translations").then((function(e){return e.d}));case"./translations/locales/be.json":return import("service-catalog-translations").then((function(e){return e.e}));case"./translations/locales/bg.json":return import("service-catalog-translations").then((function(e){return e.f}));case"./translations/locales/bn.json":return import("service-catalog-translations").then((function(e){return e.g}));case"./translations/locales/bs.json":return import("service-catalog-translations").then((function(e){return e.h}));case"./translations/locales/ca.json":return import("service-catalog-translations").then((function(e){return e.i}));case"./translations/locales/cs.json":return import("service-catalog-translations").then((function(e){return e.j}));case"./translations/locales/cy.json":return import("service-catalog-translations").then((function(e){return e.k}));case"./translations/locales/da.json":return import("service-catalog-translations").then((function(e){return e.l}));case"./translations/locales/de-de.json":return import("service-catalog-translations").then((function(e){return e.m}));case"./translations/locales/de-x-informal.json":return import("service-catalog-translations").then((function(e){return e.n}));case"./translations/locales/de.json":return import("service-catalog-translations").then((function(e){return e.o}));case"./translations/locales/el.json":return import("service-catalog-translations").then((function(e){return e.p}));case"./translations/locales/en-001.json":return import("service-catalog-translations").then((function(e){return e.q}));case"./translations/locales/en-150.json":return import("service-catalog-translations").then((function(e){return e.r}));case"./translations/locales/en-au.json":return import("service-catalog-translations").then((function(e){return e.s}));case"./translations/locales/en-ca.json":return import("service-catalog-translations").then((function(e){return e.t}));case"./translations/locales/en-gb.json":return import("service-catalog-translations").then((function(e){return e.u}));case"./translations/locales/en-my.json":return import("service-catalog-translations").then((function(e){return e.v}));case"./translations/locales/en-ph.json":return import("service-catalog-translations").then((function(e){return e.w}));case"./translations/locales/en-se.json":return import("service-catalog-translations").then((function(e){return e.x}));case"./translations/locales/en-us.json":return import("service-catalog-translations").then((function(e){return e.y}));case"./translations/locales/en-x-dev.json":return import("service-catalog-translations").then((function(e){return e.z}));case"./translations/locales/en-x-keys.json":return import("service-catalog-translations").then((function(e){return e.A}));case"./translations/locales/en-x-obsolete.json":return import("service-catalog-translations").then((function(e){return e.B}));case"./translations/locales/en-x-pseudo.json":return import("service-catalog-translations").then((function(e){return e.C}));case"./translations/locales/en-x-test.json":return import("service-catalog-translations").then((function(e){return e.D}));case"./translations/locales/es-419.json":return import("service-catalog-translations").then((function(e){return e.E}));case"./translations/locales/es-ar.json":return import("service-catalog-translations").then((function(e){return e.F}));case"./translations/locales/es-cl.json":return import("service-catalog-translations").then((function(e){return e.G}));case"./translations/locales/es-es.json":return import("service-catalog-translations").then((function(e){return e.H}));case"./translations/locales/es-mx.json":return import("service-catalog-translations").then((function(e){return e.I}));case"./translations/locales/es-pe.json":return import("service-catalog-translations").then((function(e){return e.J}));case"./translations/locales/es.json":return import("service-catalog-translations").then((function(e){return e.K}));case"./translations/locales/et.json":return import("service-catalog-translations").then((function(e){return e.L}));case"./translations/locales/eu.json":return import("service-catalog-translations").then((function(e){return e.M}));case"./translations/locales/fa-af.json":return import("service-catalog-translations").then((function(e){return e.N}));case"./translations/locales/fa.json":return import("service-catalog-translations").then((function(e){return e.O}));case"./translations/locales/fi.json":return import("service-catalog-translations").then((function(e){return e.P}));case"./translations/locales/fil.json":return import("service-catalog-translations").then((function(e){return e.Q}));case"./translations/locales/fo.json":return import("service-catalog-translations").then((function(e){return e.R}));case"./translations/locales/fr-ca.json":return import("service-catalog-translations").then((function(e){return e.S}));case"./translations/locales/fr-dz.json":return import("service-catalog-translations").then((function(e){return e.T}));case"./translations/locales/fr-mu.json":return import("service-catalog-translations").then((function(e){return e.U}));case"./translations/locales/fr.json":return import("service-catalog-translations").then((function(e){return e.V}));case"./translations/locales/ga.json":return import("service-catalog-translations").then((function(e){return e.W}));case"./translations/locales/he.json":return import("service-catalog-translations").then((function(e){return e.X}));case"./translations/locales/hi.json":return import("service-catalog-translations").then((function(e){return e.Y}));case"./translations/locales/hr.json":return import("service-catalog-translations").then((function(e){return e.Z}));case"./translations/locales/hu.json":return import("service-catalog-translations").then((function(e){return e._}));case"./translations/locales/hy.json":return import("service-catalog-translations").then((function(e){return e.$}));case"./translations/locales/id.json":return import("service-catalog-translations").then((function(e){return e.a0}));case"./translations/locales/is.json":return import("service-catalog-translations").then((function(e){return e.a1}));case"./translations/locales/it-ch.json":return import("service-catalog-translations").then((function(e){return e.a2}));case"./translations/locales/it.json":return import("service-catalog-translations").then((function(e){return e.a3}));case"./translations/locales/ja.json":return import("service-catalog-translations").then((function(e){return e.a4}));case"./translations/locales/ka.json":return import("service-catalog-translations").then((function(e){return e.a5}));case"./translations/locales/kk.json":return import("service-catalog-translations").then((function(e){return e.a6}));case"./translations/locales/kl-dk.json":return import("service-catalog-translations").then((function(e){return e.a7}));case"./translations/locales/km.json":return import("service-catalog-translations").then((function(e){return e.a8}));case"./translations/locales/ko.json":return import("service-catalog-translations").then((function(e){return e.a9}));case"./translations/locales/ku.json":return import("service-catalog-translations").then((function(e){return e.aa}));case"./translations/locales/ky.json":return import("service-catalog-translations").then((function(e){return e.ab}));case"./translations/locales/lt.json":return import("service-catalog-translations").then((function(e){return e.ac}));case"./translations/locales/lv.json":return import("service-catalog-translations").then((function(e){return e.ad}));case"./translations/locales/mk.json":return import("service-catalog-translations").then((function(e){return e.ae}));case"./translations/locales/mn.json":return import("service-catalog-translations").then((function(e){return e.af}));case"./translations/locales/ms.json":return import("service-catalog-translations").then((function(e){return e.ag}));case"./translations/locales/mt.json":return import("service-catalog-translations").then((function(e){return e.ah}));case"./translations/locales/my.json":return import("service-catalog-translations").then((function(e){return e.ai}));case"./translations/locales/ne.json":return import("service-catalog-translations").then((function(e){return e.aj}));case"./translations/locales/nl-be.json":return import("service-catalog-translations").then((function(e){return e.ak}));case"./translations/locales/nl.json":return import("service-catalog-translations").then((function(e){return e.al}));case"./translations/locales/no.json":return import("service-catalog-translations").then((function(e){return e.am}));case"./translations/locales/pl.json":return import("service-catalog-translations").then((function(e){return e.an}));case"./translations/locales/pt-br.json":return import("service-catalog-translations").then((function(e){return e.ao}));case"./translations/locales/pt.json":return import("service-catalog-translations").then((function(e){return e.ap}));case"./translations/locales/ro-md.json":return import("service-catalog-translations").then((function(e){return e.aq}));case"./translations/locales/ro.json":return import("service-catalog-translations").then((function(e){return e.ar}));case"./translations/locales/ru.json":return import("service-catalog-translations").then((function(e){return e.as}));case"./translations/locales/si.json":return import("service-catalog-translations").then((function(e){return e.at}));case"./translations/locales/sk.json":return import("service-catalog-translations").then((function(e){return e.au}));case"./translations/locales/sl.json":return import("service-catalog-translations").then((function(e){return e.av}));case"./translations/locales/sq.json":return import("service-catalog-translations").then((function(e){return e.aw}));case"./translations/locales/sr-me.json":return import("service-catalog-translations").then((function(e){return e.ax}));case"./translations/locales/sr.json":return import("service-catalog-translations").then((function(e){return e.ay}));case"./translations/locales/sv.json":return import("service-catalog-translations").then((function(e){return e.az}));case"./translations/locales/sw-ke.json":return import("service-catalog-translations").then((function(e){return e.aA}));case"./translations/locales/ta.json":return import("service-catalog-translations").then((function(e){return e.aB}));case"./translations/locales/th.json":return import("service-catalog-translations").then((function(e){return e.aC}));case"./translations/locales/tr.json":return import("service-catalog-translations").then((function(e){return e.aD}));case"./translations/locales/uk.json":return import("service-catalog-translations").then((function(e){return e.aE}));case"./translations/locales/ur-pk.json":return import("service-catalog-translations").then((function(e){return e.aF}));case"./translations/locales/ur.json":return import("service-catalog-translations").then((function(e){return e.aG}));case"./translations/locales/uz.json":return import("service-catalog-translations").then((function(e){return e.aH}));case"./translations/locales/vi.json":return import("service-catalog-translations").then((function(e){return e.aI}));case"./translations/locales/zh-cn.json":return import("service-catalog-translations").then((function(e){return e.aJ}));case"./translations/locales/zh-tw.json":return import("service-catalog-translations").then((function(e){return e.aK}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./translations/locales/${r}.json`),()=>function(e){switch(e){case"../ticket-fields/translations/locales/af.json":return import("ticket-fields").then((function(e){return e.b}));case"../ticket-fields/translations/locales/ar-x-pseudo.json":return import("ticket-fields").then((function(e){return e.c}));case"../ticket-fields/translations/locales/ar.json":return import("ticket-fields").then((function(e){return e.d}));case"../ticket-fields/translations/locales/az.json":return import("ticket-fields").then((function(e){return e.e}));case"../ticket-fields/translations/locales/be.json":return import("ticket-fields").then((function(e){return e.f}));case"../ticket-fields/translations/locales/bg.json":return import("ticket-fields").then((function(e){return e.h}));case"../ticket-fields/translations/locales/bn.json":return import("ticket-fields").then((function(e){return e.i}));case"../ticket-fields/translations/locales/bs.json":return import("ticket-fields").then((function(e){return e.j}));case"../ticket-fields/translations/locales/ca.json":return import("ticket-fields").then((function(e){return e.k}));case"../ticket-fields/translations/locales/cs.json":return import("ticket-fields").then((function(e){return e.l}));case"../ticket-fields/translations/locales/cy.json":return import("ticket-fields").then((function(e){return e.m}));case"../ticket-fields/translations/locales/da.json":return import("ticket-fields").then((function(e){return e.n}));case"../ticket-fields/translations/locales/de-de.json":return import("ticket-fields").then((function(e){return e.o}));case"../ticket-fields/translations/locales/de-x-informal.json":return import("ticket-fields").then((function(e){return e.p}));case"../ticket-fields/translations/locales/de.json":return import("ticket-fields").then((function(e){return e.q}));case"../ticket-fields/translations/locales/el.json":return import("ticket-fields").then((function(e){return e.r}));case"../ticket-fields/translations/locales/en-001.json":return import("ticket-fields").then((function(e){return e.s}));case"../ticket-fields/translations/locales/en-150.json":return import("ticket-fields").then((function(e){return e.t}));case"../ticket-fields/translations/locales/en-au.json":return import("ticket-fields").then((function(e){return e.u}));case"../ticket-fields/translations/locales/en-ca.json":return import("ticket-fields").then((function(e){return e.v}));case"../ticket-fields/translations/locales/en-gb.json":return import("ticket-fields").then((function(e){return e.w}));case"../ticket-fields/translations/locales/en-my.json":return import("ticket-fields").then((function(e){return e.x}));case"../ticket-fields/translations/locales/en-ph.json":return import("ticket-fields").then((function(e){return e.y}));case"../ticket-fields/translations/locales/en-se.json":return import("ticket-fields").then((function(e){return e.z}));case"../ticket-fields/translations/locales/en-us.json":return import("ticket-fields").then((function(e){return e.A}));case"../ticket-fields/translations/locales/en-x-dev.json":return import("ticket-fields").then((function(e){return e.B}));case"../ticket-fields/translations/locales/en-x-keys.json":return import("ticket-fields").then((function(e){return e.C}));case"../ticket-fields/translations/locales/en-x-obsolete.json":return import("ticket-fields").then((function(e){return e.E}));case"../ticket-fields/translations/locales/en-x-pseudo.json":return import("ticket-fields").then((function(e){return e.F}));case"../ticket-fields/translations/locales/en-x-test.json":return import("ticket-fields").then((function(e){return e.G}));case"../ticket-fields/translations/locales/es-419.json":return import("ticket-fields").then((function(e){return e.H}));case"../ticket-fields/translations/locales/es-ar.json":return import("ticket-fields").then((function(e){return e.J}));case"../ticket-fields/translations/locales/es-cl.json":return import("ticket-fields").then((function(e){return e.K}));case"../ticket-fields/translations/locales/es-es.json":return import("ticket-fields").then((function(e){return e.L}));case"../ticket-fields/translations/locales/es-mx.json":return import("ticket-fields").then((function(e){return e.M}));case"../ticket-fields/translations/locales/es-pe.json":return import("ticket-fields").then((function(e){return e.N}));case"../ticket-fields/translations/locales/es.json":return import("ticket-fields").then((function(e){return e.O}));case"../ticket-fields/translations/locales/et.json":return import("ticket-fields").then((function(e){return e.P}));case"../ticket-fields/translations/locales/eu.json":return import("ticket-fields").then((function(e){return e.Q}));case"../ticket-fields/translations/locales/fa-af.json":return import("ticket-fields").then((function(e){return e.S}));case"../ticket-fields/translations/locales/fa.json":return import("ticket-fields").then((function(e){return e.U}));case"../ticket-fields/translations/locales/fi.json":return import("ticket-fields").then((function(e){return e.V}));case"../ticket-fields/translations/locales/fil.json":return import("ticket-fields").then((function(e){return e.W}));case"../ticket-fields/translations/locales/fo.json":return import("ticket-fields").then((function(e){return e.X}));case"../ticket-fields/translations/locales/fr-ca.json":return import("ticket-fields").then((function(e){return e.Y}));case"../ticket-fields/translations/locales/fr-dz.json":return import("ticket-fields").then((function(e){return e.Z}));case"../ticket-fields/translations/locales/fr-mu.json":return import("ticket-fields").then((function(e){return e._}));case"../ticket-fields/translations/locales/fr.json":return import("ticket-fields").then((function(e){return e.$}));case"../ticket-fields/translations/locales/ga.json":return import("ticket-fields").then((function(e){return e.a0}));case"../ticket-fields/translations/locales/he.json":return import("ticket-fields").then((function(e){return e.a1}));case"../ticket-fields/translations/locales/hi.json":return import("ticket-fields").then((function(e){return e.a2}));case"../ticket-fields/translations/locales/hr.json":return import("ticket-fields").then((function(e){return e.a3}));case"../ticket-fields/translations/locales/hu.json":return import("ticket-fields").then((function(e){return e.a4}));case"../ticket-fields/translations/locales/hy.json":return import("ticket-fields").then((function(e){return e.a5}));case"../ticket-fields/translations/locales/id.json":return import("ticket-fields").then((function(e){return e.a6}));case"../ticket-fields/translations/locales/is.json":return import("ticket-fields").then((function(e){return e.a7}));case"../ticket-fields/translations/locales/it-ch.json":return import("ticket-fields").then((function(e){return e.a8}));case"../ticket-fields/translations/locales/it.json":return import("ticket-fields").then((function(e){return e.a9}));case"../ticket-fields/translations/locales/ja.json":return import("ticket-fields").then((function(e){return e.aa}));case"../ticket-fields/translations/locales/ka.json":return import("ticket-fields").then((function(e){return e.ab}));case"../ticket-fields/translations/locales/kk.json":return import("ticket-fields").then((function(e){return e.ac}));case"../ticket-fields/translations/locales/kl-dk.json":return import("ticket-fields").then((function(e){return e.ad}));case"../ticket-fields/translations/locales/km.json":return import("ticket-fields").then((function(e){return e.ae}));case"../ticket-fields/translations/locales/ko.json":return import("ticket-fields").then((function(e){return e.af}));case"../ticket-fields/translations/locales/ku.json":return import("ticket-fields").then((function(e){return e.ag}));case"../ticket-fields/translations/locales/ky.json":return import("ticket-fields").then((function(e){return e.ah}));case"../ticket-fields/translations/locales/lt.json":return import("ticket-fields").then((function(e){return e.ai}));case"../ticket-fields/translations/locales/lv.json":return import("ticket-fields").then((function(e){return e.aj}));case"../ticket-fields/translations/locales/mk.json":return import("ticket-fields").then((function(e){return e.ak}));case"../ticket-fields/translations/locales/mn.json":return import("ticket-fields").then((function(e){return e.al}));case"../ticket-fields/translations/locales/ms.json":return import("ticket-fields").then((function(e){return e.am}));case"../ticket-fields/translations/locales/mt.json":return import("ticket-fields").then((function(e){return e.an}));case"../ticket-fields/translations/locales/my.json":return import("ticket-fields").then((function(e){return e.ao}));case"../ticket-fields/translations/locales/ne.json":return import("ticket-fields").then((function(e){return e.ap}));case"../ticket-fields/translations/locales/nl-be.json":return import("ticket-fields").then((function(e){return e.aq}));case"../ticket-fields/translations/locales/nl.json":return import("ticket-fields").then((function(e){return e.ar}));case"../ticket-fields/translations/locales/no.json":return import("ticket-fields").then((function(e){return e.as}));case"../ticket-fields/translations/locales/pl.json":return import("ticket-fields").then((function(e){return e.at}));case"../ticket-fields/translations/locales/pt-br.json":return import("ticket-fields").then((function(e){return e.au}));case"../ticket-fields/translations/locales/pt.json":return import("ticket-fields").then((function(e){return e.av}));case"../ticket-fields/translations/locales/ro-md.json":return import("ticket-fields").then((function(e){return e.aw}));case"../ticket-fields/translations/locales/ro.json":return import("ticket-fields").then((function(e){return e.ax}));case"../ticket-fields/translations/locales/ru.json":return import("ticket-fields").then((function(e){return e.ay}));case"../ticket-fields/translations/locales/si.json":return import("ticket-fields").then((function(e){return e.az}));case"../ticket-fields/translations/locales/sk.json":return import("ticket-fields").then((function(e){return e.aA}));case"../ticket-fields/translations/locales/sl.json":return import("ticket-fields").then((function(e){return e.aB}));case"../ticket-fields/translations/locales/sq.json":return import("ticket-fields").then((function(e){return e.aC}));case"../ticket-fields/translations/locales/sr-me.json":return import("ticket-fields").then((function(e){return e.aD}));case"../ticket-fields/translations/locales/sr.json":return import("ticket-fields").then((function(e){return e.aE}));case"../ticket-fields/translations/locales/sv.json":return import("ticket-fields").then((function(e){return e.aF}));case"../ticket-fields/translations/locales/sw-ke.json":return import("ticket-fields").then((function(e){return e.aG}));case"../ticket-fields/translations/locales/ta.json":return import("ticket-fields").then((function(e){return e.aH}));case"../ticket-fields/translations/locales/th.json":return import("ticket-fields").then((function(e){return e.aI}));case"../ticket-fields/translations/locales/tr.json":return import("ticket-fields").then((function(e){return e.aJ}));case"../ticket-fields/translations/locales/uk.json":return import("ticket-fields").then((function(e){return e.aK}));case"../ticket-fields/translations/locales/ur-pk.json":return import("ticket-fields").then((function(e){return e.aL}));case"../ticket-fields/translations/locales/ur.json":return import("ticket-fields").then((function(e){return e.aM}));case"../ticket-fields/translations/locales/uz.json":return import("ticket-fields").then((function(e){return e.aN}));case"../ticket-fields/translations/locales/vi.json":return import("ticket-fields").then((function(e){return e.aO}));case"../ticket-fields/translations/locales/zh-cn.json":return import("ticket-fields").then((function(e){return e.aP}));case"../ticket-fields/translations/locales/zh-tw.json":return import("ticket-fields").then((function(e){return e.aQ}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../ticket-fields/translations/locales/${r}.json`),()=>function(e){switch(e){case"../shared/translations/locales/af.json":return import("shared").then((function(e){return e.aB}));case"../shared/translations/locales/ar-x-pseudo.json":return import("shared").then((function(e){return e.aC}));case"../shared/translations/locales/ar.json":return import("shared").then((function(e){return e.aD}));case"../shared/translations/locales/az.json":return import("shared").then((function(e){return e.aE}));case"../shared/translations/locales/be.json":return import("shared").then((function(e){return e.aF}));case"../shared/translations/locales/bg.json":return import("shared").then((function(e){return e.aG}));case"../shared/translations/locales/bn.json":return import("shared").then((function(e){return e.aH}));case"../shared/translations/locales/bs.json":return import("shared").then((function(e){return e.aI}));case"../shared/translations/locales/ca.json":return import("shared").then((function(e){return e.aJ}));case"../shared/translations/locales/cs.json":return import("shared").then((function(e){return e.aK}));case"../shared/translations/locales/cy.json":return import("shared").then((function(e){return e.aL}));case"../shared/translations/locales/da.json":return import("shared").then((function(e){return e.aM}));case"../shared/translations/locales/de-de.json":return import("shared").then((function(e){return e.aN}));case"../shared/translations/locales/de-x-informal.json":return import("shared").then((function(e){return e.aO}));case"../shared/translations/locales/de.json":return import("shared").then((function(e){return e.aP}));case"../shared/translations/locales/el.json":return import("shared").then((function(e){return e.aQ}));case"../shared/translations/locales/en-001.json":return import("shared").then((function(e){return e.aR}));case"../shared/translations/locales/en-150.json":return import("shared").then((function(e){return e.aS}));case"../shared/translations/locales/en-au.json":return import("shared").then((function(e){return e.aT}));case"../shared/translations/locales/en-ca.json":return import("shared").then((function(e){return e.aU}));case"../shared/translations/locales/en-gb.json":return import("shared").then((function(e){return e.aV}));case"../shared/translations/locales/en-my.json":return import("shared").then((function(e){return e.aW}));case"../shared/translations/locales/en-ph.json":return import("shared").then((function(e){return e.aX}));case"../shared/translations/locales/en-se.json":return import("shared").then((function(e){return e.aY}));case"../shared/translations/locales/en-us.json":return import("shared").then((function(e){return e.aZ}));case"../shared/translations/locales/en-x-dev.json":return import("shared").then((function(e){return e.a_}));case"../shared/translations/locales/en-x-keys.json":return import("shared").then((function(e){return e.a$}));case"../shared/translations/locales/en-x-obsolete.json":return import("shared").then((function(e){return e.b0}));case"../shared/translations/locales/en-x-pseudo.json":return import("shared").then((function(e){return e.b1}));case"../shared/translations/locales/en-x-test.json":return import("shared").then((function(e){return e.b2}));case"../shared/translations/locales/es-419.json":return import("shared").then((function(e){return e.b3}));case"../shared/translations/locales/es-ar.json":return import("shared").then((function(e){return e.b4}));case"../shared/translations/locales/es-cl.json":return import("shared").then((function(e){return e.b5}));case"../shared/translations/locales/es-es.json":return import("shared").then((function(e){return e.b6}));case"../shared/translations/locales/es-mx.json":return import("shared").then((function(e){return e.b7}));case"../shared/translations/locales/es-pe.json":return import("shared").then((function(e){return e.b8}));case"../shared/translations/locales/es.json":return import("shared").then((function(e){return e.b9}));case"../shared/translations/locales/et.json":return import("shared").then((function(e){return e.ba}));case"../shared/translations/locales/eu.json":return import("shared").then((function(e){return e.bb}));case"../shared/translations/locales/fa-af.json":return import("shared").then((function(e){return e.bc}));case"../shared/translations/locales/fa.json":return import("shared").then((function(e){return e.bd}));case"../shared/translations/locales/fi.json":return import("shared").then((function(e){return e.be}));case"../shared/translations/locales/fil.json":return import("shared").then((function(e){return e.bf}));case"../shared/translations/locales/fo.json":return import("shared").then((function(e){return e.bg}));case"../shared/translations/locales/fr-ca.json":return import("shared").then((function(e){return e.bh}));case"../shared/translations/locales/fr-dz.json":return import("shared").then((function(e){return e.bi}));case"../shared/translations/locales/fr-mu.json":return import("shared").then((function(e){return e.bj}));case"../shared/translations/locales/fr.json":return import("shared").then((function(e){return e.bk}));case"../shared/translations/locales/ga.json":return import("shared").then((function(e){return e.bl}));case"../shared/translations/locales/he.json":return import("shared").then((function(e){return e.bm}));case"../shared/translations/locales/hi.json":return import("shared").then((function(e){return e.bn}));case"../shared/translations/locales/hr.json":return import("shared").then((function(e){return e.bo}));case"../shared/translations/locales/hu.json":return import("shared").then((function(e){return e.bp}));case"../shared/translations/locales/hy.json":return import("shared").then((function(e){return e.bq}));case"../shared/translations/locales/id.json":return import("shared").then((function(e){return e.br}));case"../shared/translations/locales/is.json":return import("shared").then((function(e){return e.bs}));case"../shared/translations/locales/it-ch.json":return import("shared").then((function(e){return e.bt}));case"../shared/translations/locales/it.json":return import("shared").then((function(e){return e.bu}));case"../shared/translations/locales/ja.json":return import("shared").then((function(e){return e.bv}));case"../shared/translations/locales/ka.json":return import("shared").then((function(e){return e.bw}));case"../shared/translations/locales/kk.json":return import("shared").then((function(e){return e.bx}));case"../shared/translations/locales/kl-dk.json":return import("shared").then((function(e){return e.by}));case"../shared/translations/locales/km.json":return import("shared").then((function(e){return e.bz}));case"../shared/translations/locales/ko.json":return import("shared").then((function(e){return e.bA}));case"../shared/translations/locales/ku.json":return import("shared").then((function(e){return e.bB}));case"../shared/translations/locales/ky.json":return import("shared").then((function(e){return e.bC}));case"../shared/translations/locales/lt.json":return import("shared").then((function(e){return e.bD}));case"../shared/translations/locales/lv.json":return import("shared").then((function(e){return e.bE}));case"../shared/translations/locales/mk.json":return import("shared").then((function(e){return e.bF}));case"../shared/translations/locales/mn.json":return import("shared").then((function(e){return e.bG}));case"../shared/translations/locales/ms.json":return import("shared").then((function(e){return e.bH}));case"../shared/translations/locales/mt.json":return import("shared").then((function(e){return e.bI}));case"../shared/translations/locales/my.json":return import("shared").then((function(e){return e.bJ}));case"../shared/translations/locales/ne.json":return import("shared").then((function(e){return e.bK}));case"../shared/translations/locales/nl-be.json":return import("shared").then((function(e){return e.bL}));case"../shared/translations/locales/nl.json":return import("shared").then((function(e){return e.bM}));case"../shared/translations/locales/no.json":return import("shared").then((function(e){return e.bN}));case"../shared/translations/locales/pl.json":return import("shared").then((function(e){return e.bO}));case"../shared/translations/locales/pt-br.json":return import("shared").then((function(e){return e.bP}));case"../shared/translations/locales/pt.json":return import("shared").then((function(e){return e.bQ}));case"../shared/translations/locales/ro-md.json":return import("shared").then((function(e){return e.bR}));case"../shared/translations/locales/ro.json":return import("shared").then((function(e){return e.bS}));case"../shared/translations/locales/ru.json":return import("shared").then((function(e){return e.bT}));case"../shared/translations/locales/si.json":return import("shared").then((function(e){return e.bU}));case"../shared/translations/locales/sk.json":return import("shared").then((function(e){return e.bV}));case"../shared/translations/locales/sl.json":return import("shared").then((function(e){return e.bW}));case"../shared/translations/locales/sq.json":return import("shared").then((function(e){return e.bX}));case"../shared/translations/locales/sr-me.json":return import("shared").then((function(e){return e.bY}));case"../shared/translations/locales/sr.json":return import("shared").then((function(e){return e.bZ}));case"../shared/translations/locales/sv.json":return import("shared").then((function(e){return e.b_}));case"../shared/translations/locales/sw-ke.json":return import("shared").then((function(e){return e.b$}));case"../shared/translations/locales/ta.json":return import("shared").then((function(e){return e.c0}));case"../shared/translations/locales/th.json":return import("shared").then((function(e){return e.c1}));case"../shared/translations/locales/tr.json":return import("shared").then((function(e){return e.c2}));case"../shared/translations/locales/uk.json":return import("shared").then((function(e){return e.c3}));case"../shared/translations/locales/ur-pk.json":return import("shared").then((function(e){return e.c4}));case"../shared/translations/locales/ur.json":return import("shared").then((function(e){return e.c5}));case"../shared/translations/locales/uz.json":return import("shared").then((function(e){return e.c6}));case"../shared/translations/locales/vi.json":return import("shared").then((function(e){return e.c7}));case"../shared/translations/locales/zh-cn.json":return import("shared").then((function(e){return e.c8}));case"../shared/translations/locales/zh-tw.json":return import("shared").then((function(e){return e.c9}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../shared/translations/locales/${r}.json`)]),w.render(s.jsx($,{theme:z(t),children:s.jsx(C,{helpCenterPath:n,children:s.jsx(ie,{helpCenterPath:n})})}),e)}const ce=e=>"tagger"===e.type?e.custom_field_options.find((e=>e.default))?.value??null:null,ue=async(e,t)=>{const[n,s]=await Promise.all([fetch(`/api/v2/ticket_forms/${e}`),fetch(`/api/v2/ticket_fields?locale=${t}`)]);if(!n.ok)throw new Error("Error fetching form data");if(!s.ok)throw new Error("Error fetching fields data");const r=await n.json(),a=await s.json();if(!r.ticket_form.active)throw new Error("Associated ticket form is not active");const o=r.ticket_form,i=o.ticket_field_ids,l=o.end_user_conditions||[],c=a.ticket_fields;let u=null;const d=i.map((e=>{const t=c.find((t=>t.id===e));return t&&"subject"!==t.type&&"description"!==t.type&&t.active&&t.editable_in_portal?"lookup"===t.type&&"standard::service_catalog_item"===M(t.relationship_target_type)?(u=t,null):(e=>{const{id:t,type:n,description:s,title_in_portal:r,custom_field_options:a,required_in_portal:o,relationship_target_type:i,relationship_filter:l}=e;return{id:t,type:n,name:`custom_fields_${t}`,description:s,label:r,options:a,required:o,relationship_target_type:i,relationship_filter:l,error:null,value:ce(e)}})(t):null})).filter(Boolean);if(!u)throw new Error("Associated lookup field not found");return{requestFields:d,associatedLookupField:u,endUserConditions:l}};const de=e.div`
  border-bottom: ${e=>e.theme.borders.sm}
    ${({theme:e})=>t({theme:e,hue:"grey",shade:300})};
  padding-bottom: ${e=>e.theme.space.lg};
  margin-inline-end: ${e=>e.theme.space.xl};

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    margin-inline-end: 0;
  }
`,he=e(S)`
  font-weight: ${e=>e.theme.fontWeights.semibold};
  margin-bottom: 0;
  overflow-wrap: break-word;
  max-width: 100%;
`,je=e.div`
  font-size: ${e=>e.theme.fontSizes.md};
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: ${e=>e.isCollapsed?3:"none"};
  overflow: hidden;
  margin-top: ${e=>e.theme.space.md};
  padding-inline-end: ${e=>e.theme.space.xl};
  overflow-wrap: break-word;

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    padding-inline-end: 0;
  }
`,fe=e(u)`
  margin-top: ${e=>e.theme.space.sm};
  font-size: ${e=>e.theme.fontSizes.md};
  &:hover {
    text-decoration: none;
  }
`,me=e.div`
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: ${e=>e.theme.space.md};
`,pe=({title:e,description:t,thumbnailUrl:n})=>{const[r,a]=k.useState(!0),[o,l]=k.useState(!1),{t:c}=i(),d=k.useRef(null);k.useEffect((()=>{const e=d.current;if(e){requestAnimationFrame((()=>{const t=e.getBoundingClientRect().height,n=e.scrollHeight-t>1;l(n),n||a(!1)}))}}),[t]);return s.jsxs(de,{children:[s.jsxs(me,{children:[s.jsx(R,{size:"large",url:n}),s.jsx(he,{tag:"h1",children:e})]}),t&&s.jsx(je,{ref:d,className:"service-catalog-description",isCollapsed:r,dangerouslySetInnerHTML:{__html:t}}),o&&s.jsxs(fe,{isLink:!0,onClick:()=>{a(!r)},children:[r?c("service-catalog.item.read-more","Read more"):c("service-catalog.item.read-less","Read less"),s.jsx(u.EndIcon,{children:r?s.jsx(I,{}):s.jsx(q,{})})]})]})},be=(e,t)=>({fetchAssets:k.useCallback((async()=>{try{if(!e)return;const t=await fetch(`/api/v2/custom_objects/standard::service_catalog_asset_option/records/${e}`),n=await t.json(),s=n.custom_object_record.custom_object_fields?.["standard::asset_filter_ids"],r=n.custom_object_record.custom_object_fields?.["standard::description"];return{assetIds:s,assetDescription:r,assetName:n.custom_object_record.name}}catch(e){return void console.error(e)}}),[e]),fetchAssetTypes:k.useCallback((async()=>{try{if(!t)return;const e=await fetch(`/api/v2/custom_objects/standard::service_catalog_asset_type_option/records/${t}`),n=await e.json(),s=n.custom_object_record.custom_object_fields?.["standard::asset_type_ids"],r=!!n.custom_object_record.custom_object_fields?.["standard::is_hidden"],a=n.custom_object_record.custom_object_fields?.["standard::description"];return{assetTypeIds:s,isHiddenAssetsType:r,assetTypeDescription:a,assetTypeName:n.custom_object_record.name}}catch(e){return console.error(e),{assetTypeIds:void 0,isHiddenAssetsType:void 0,assetTypeDescription:void 0,assetTypeName:void 0}}}),[t])}),ke=e.form`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: ${e=>e.theme.space.md};

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    flex-direction: column;
  }
`,ge=e.div`
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: ${e=>e.theme.space.md};
  margin-inline-end: ${e=>e.theme.space.xl};

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    margin-inline-end: 0;
  }
`,ve=e.div`
  flex: 1;
  margin-inline-start: ${e=>e.theme.space.xl};
  padding: ${e=>e.theme.space.lg};
  border: ${e=>e.theme.borders.sm}
    ${({theme:e})=>t({theme:e,hue:"grey",shade:300})};
  height: fit-content;

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    position: sticky;
    top: 0;
    background: ${({theme:e})=>t({theme:e,variable:"background.default"})};
    padding: ${e=>e.theme.space.lg};
    border: none;
    border-top: ${e=>e.theme.borders.sm}
      ${({theme:e})=>t({theme:e,hue:"grey",shade:300})};
    width: 100vw;
    margin-inline-start: 0;
  }
`,xe=e.div`
  flex: 1;
  margin-inline-start: ${e=>e.theme.space.xl};

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    position: sticky;
    bottom: 0;
    margin-inline-start: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
`,ye=e.div`
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: ${e=>e.theme.space.lg};
  margin-inline-end: ${e=>e.theme.space.xl};
  min-width: 0;

  @media (max-width: ${e=>e.theme.breakpoints.md}) {
    margin-inline-end: 0;
  }
`,_e="zen:custom_object:standard::itam_asset_type",we=e=>"zen:custom_object:standard::itam_asset"===e.relationship_target_type,$e=e=>e.relationship_target_type===_e;function ze({requestFields:e,serviceCatalogItem:t,baseLocale:n,hasAtMentions:r,userRole:a,userId:o,brandId:l,defaultOrganizationId:c,handleChange:d,onSubmit:h}){const{t:j}=i(),f=t?.custom_object_fields?.["standard::asset_option"],m=t?.custom_object_fields?.["standard::asset_type_option"],{fetchAssets:p,fetchAssetTypes:b}=be(f,m),[g,v]=k.useState({ids:[],hidden:!1,ready:!1,description:void 0,name:void 0}),[x,y]=k.useState({ids:[],ready:!1,description:void 0,name:void 0}),[_,w]=k.useState(!1),$=g.hidden&&g.ids[0]?g.ids[0]:"";k.useEffect((()=>{let e=!0;return(async()=>{try{const t=await b();if(!e)return;const n=!!t?.isHiddenAssetsType,s=t?.assetTypeIds,r=t?.assetTypeDescription,a=t?.assetTypeName;let o=[];Array.isArray(s)?o=s.map(String):"string"==typeof s&&(o=s.split(",")),o=o.map((e=>e.trim())).filter(Boolean),v({ids:o,hidden:n,ready:!0,description:r,name:a}),w(n)}catch(t){if(!e)return;v({ids:[],hidden:!1,ready:!0,description:void 0,name:void 0})}try{const t=await p();if(!e)return;const n=t?.assetIds,s=t?.assetDescription,r=t?.assetName;let a=[];"string"==typeof n?a=n.split(","):Array.isArray(n)&&(a=n.map(String)),a=a.map((e=>e.trim())).filter(Boolean),y({ids:a,ready:!0,description:s,name:r})}catch(t){if(!e)return;y({ids:[],ready:!0,description:void 0,name:void 0})}})(),()=>{e=!1}}),[b,p,d]);const z=async(e,t)=>{if(!Array.isArray(e)||0===e.length)return[];const n=e.map((e=>{const t={name:e.name,value:e.id,serialNumber:e.custom_object_fields["standard::serial_number"]};if("standard::itam_asset"===e.custom_object_key){const n=e.custom_object_fields??{};return{...t,item_asset_type_id:n["standard::asset_type"]??""}}return{...t,item_asset_type_id:""}}));if($e(t))return g.hidden?[]:g.ids?.length?n.filter((e=>g.ids.includes(e.value))):[];if(we(t)){let e=n;return x.ids?.length&&(e=e.filter((e=>x.ids.includes(e.item_asset_type_id??"")))),e}return n.map((({name:e,value:t,serialNumber:n})=>({name:e,value:t,serialNumber:n})))},C=e=>e.serialNumber?s.jsxs(s.Fragment,{children:[e.name,s.jsx(F.Meta,{children:s.jsx(E,{hue:"grey",children:j("service-catalog.item.serial-number-label","SN: {{serialNumber}}",{serialNumber:e.serialNumber})})})]}):e.name;return s.jsxs(ke,{onSubmit:h,noValidate:!0,children:[s.jsxs(ye,{children:[s.jsx(pe,{title:t.name,description:t.description,thumbnailUrl:t.thumbnail_url}),s.jsx(ge,{children:e.map((t=>{if($e(t)&&_)return s.jsxs(s.Fragment,{children:[s.jsx("input",{type:"hidden",name:t.name,value:$}),s.jsx("input",{type:"hidden",name:"isAssetTypeHidden",value:"true"})]});const i={...t,label:we(t)?x.name||t.label:$e(t)&&g.name||t.label,description:we(t)?x.description||t.description:$e(t)&&g.description||t.description};return s.jsx(L,{field:i,baseLocale:n,hasAtMentions:r,userRole:a,userId:o,brandId:l,defaultOrganizationId:c,handleChange:d,visibleFields:e,buildLookupFieldOptions:z,renderLookupFieldOption:C},t.id)}))})]}),s.jsx(xe,{children:s.jsx(ve,{children:s.jsx(u,{isPrimary:!0,size:"large",isStretched:!0,type:"submit",children:j("service-catalog.item.submit-button","Submit request")})})})]})}const Ce=e.div`
  display: flex;
  flex-direction: column;
`,Se=e(T)`
  text-decoration: underline;
  display: block;
  margin-top: ${e=>e.theme.space.xxs}px;
`,qe=e=>e.relationship_target_type===_e;function Ie({serviceCatalogItemId:e,baseLocale:t,hasAtMentions:n,userRole:r,organizations:a,userId:o,brandId:l,helpCenterPath:c}){const{serviceCatalogItem:u,errorFetchingItem:d}=function(e){const[t,n]=k.useState(),[s,r]=k.useState(null);return k.useEffect((()=>{(async()=>{try{const t=await fetch(`/api/v2/help_center/service_catalog/items/${e}`);if(!t.ok)throw new Error("Error fetching service catalog item");{const e=await t.json();n(e.service_catalog_item)}}catch(e){r(e)}})()}),[e]),{serviceCatalogItem:t,errorFetchingItem:s}}(e),{requestFields:h,associatedLookupField:j,error:f,setRequestFields:m,handleChange:p}=function(e,t){const[n,s]=k.useState([]),[r,a]=k.useState([]),[o,i]=k.useState(),[l,c]=k.useState(null);k.useEffect((()=>{(async()=>{if(e&&e.form_id)try{const{requestFields:n,associatedLookupField:r,endUserConditions:o}=await ue(e.form_id,t);i(r),a(o),s(n)}catch(e){c(e)}})()}),[t,e]);const u=k.useCallback(((e,t)=>{const r=n.map((n=>n.name===e.name?{...n,value:t}:n));s(r)}),[n]);return{requestFields:A(n,r),associatedLookupField:o,error:l,setRequestFields:s,handleChange:u}}(u,t),{t:b}=i();if(f)throw f;if(d)throw d;const v=a.length>0&&a[0]?.id?a[0]?.id?.toString():null;return s.jsx(Ce,{children:u&&s.jsx(ze,{requestFields:h,serviceCatalogItem:u,baseLocale:t,hasAtMentions:n,userRole:r,userId:o,brandId:l,defaultOrganizationId:v,handleChange:p,onSubmit:async e=>{e.preventDefault();const n=e.currentTarget,r=new FormData(n),a="true"===r.get("isAssetTypeHidden"),o=h.map((e=>qe(e)&&a?{...e,value:r.get(e.name)}:e));if(!u||!j)return;const i=await async function(e,t,n,s){try{const r=await fetch("/api/v2/users/me.json");if(!r.ok)throw new Error("Error fetching current user data");const a=await r.json(),o=t.map((e=>({id:e.id,value:e.value})));return await fetch(`/api/v2/requests?locale=${s}`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":a.user.authenticity_token},body:JSON.stringify({request:{subject:`${e.name}`,comment:{html_body:`<a href="/hc/en-us/services/${e.id}" style="text-decoration: underline" target="_blank" rel="noopener noreferrer">${e.name}</a>`},ticket_form_id:e.form_id,custom_fields:[...o,{id:n.id,value:e.id}],via:{channel:"web form",source:50}}})})}catch(e){return void console.error("Error submitting service request:",e)}}(u,o,j,t);if(i?.ok){if(i&&i.ok){P({type:"success",message:b("service-catalog.item.service-request-submitted","Service request submitted")});const e=await(i?.json()),t=`${c}/requests/${e.request.id}`;window.location.href=t}}else if(422===i?.status){const e=(await i.json()).details.base;e.filter((e=>!h.some((t=>t.id===e.field_key)))).length>0&&g({type:"error",title:b("service-catalog.item.service-request-error-title","Service couldn't be submitted"),message:s.jsxs(s.Fragment,{children:[b("service-catalog.item.service-request-refresh-message","Refresh the page and try again in a few seconds.")," ",s.jsx(Se,{href:`${c}/services/${u.id}`,children:b("service-catalog.item.service-request-refresh-link-text","Refresh the page")})]})});const t=h.map((t=>{const n=e.find((e=>e.field_key===t.id));return{...t,error:n?.description||null}}));m(t)}else g({title:b("service-catalog.item.service-request-error-title","Service couldn't be submitted"),message:b("service-catalog.item.service-request-error-message","Give it a moment and try it again"),type:"error"})}})})}async function Fe(e,t,n){const{baseLocale:r,helpCenterPath:a}=n;y(r),await _(r,[()=>function(e){switch(e){case"./translations/locales/af.json":return import("service-catalog-translations").then((function(e){return e.a}));case"./translations/locales/ar-x-pseudo.json":return import("service-catalog-translations").then((function(e){return e.b}));case"./translations/locales/ar.json":return import("service-catalog-translations").then((function(e){return e.c}));case"./translations/locales/az.json":return import("service-catalog-translations").then((function(e){return e.d}));case"./translations/locales/be.json":return import("service-catalog-translations").then((function(e){return e.e}));case"./translations/locales/bg.json":return import("service-catalog-translations").then((function(e){return e.f}));case"./translations/locales/bn.json":return import("service-catalog-translations").then((function(e){return e.g}));case"./translations/locales/bs.json":return import("service-catalog-translations").then((function(e){return e.h}));case"./translations/locales/ca.json":return import("service-catalog-translations").then((function(e){return e.i}));case"./translations/locales/cs.json":return import("service-catalog-translations").then((function(e){return e.j}));case"./translations/locales/cy.json":return import("service-catalog-translations").then((function(e){return e.k}));case"./translations/locales/da.json":return import("service-catalog-translations").then((function(e){return e.l}));case"./translations/locales/de-de.json":return import("service-catalog-translations").then((function(e){return e.m}));case"./translations/locales/de-x-informal.json":return import("service-catalog-translations").then((function(e){return e.n}));case"./translations/locales/de.json":return import("service-catalog-translations").then((function(e){return e.o}));case"./translations/locales/el.json":return import("service-catalog-translations").then((function(e){return e.p}));case"./translations/locales/en-001.json":return import("service-catalog-translations").then((function(e){return e.q}));case"./translations/locales/en-150.json":return import("service-catalog-translations").then((function(e){return e.r}));case"./translations/locales/en-au.json":return import("service-catalog-translations").then((function(e){return e.s}));case"./translations/locales/en-ca.json":return import("service-catalog-translations").then((function(e){return e.t}));case"./translations/locales/en-gb.json":return import("service-catalog-translations").then((function(e){return e.u}));case"./translations/locales/en-my.json":return import("service-catalog-translations").then((function(e){return e.v}));case"./translations/locales/en-ph.json":return import("service-catalog-translations").then((function(e){return e.w}));case"./translations/locales/en-se.json":return import("service-catalog-translations").then((function(e){return e.x}));case"./translations/locales/en-us.json":return import("service-catalog-translations").then((function(e){return e.y}));case"./translations/locales/en-x-dev.json":return import("service-catalog-translations").then((function(e){return e.z}));case"./translations/locales/en-x-keys.json":return import("service-catalog-translations").then((function(e){return e.A}));case"./translations/locales/en-x-obsolete.json":return import("service-catalog-translations").then((function(e){return e.B}));case"./translations/locales/en-x-pseudo.json":return import("service-catalog-translations").then((function(e){return e.C}));case"./translations/locales/en-x-test.json":return import("service-catalog-translations").then((function(e){return e.D}));case"./translations/locales/es-419.json":return import("service-catalog-translations").then((function(e){return e.E}));case"./translations/locales/es-ar.json":return import("service-catalog-translations").then((function(e){return e.F}));case"./translations/locales/es-cl.json":return import("service-catalog-translations").then((function(e){return e.G}));case"./translations/locales/es-es.json":return import("service-catalog-translations").then((function(e){return e.H}));case"./translations/locales/es-mx.json":return import("service-catalog-translations").then((function(e){return e.I}));case"./translations/locales/es-pe.json":return import("service-catalog-translations").then((function(e){return e.J}));case"./translations/locales/es.json":return import("service-catalog-translations").then((function(e){return e.K}));case"./translations/locales/et.json":return import("service-catalog-translations").then((function(e){return e.L}));case"./translations/locales/eu.json":return import("service-catalog-translations").then((function(e){return e.M}));case"./translations/locales/fa-af.json":return import("service-catalog-translations").then((function(e){return e.N}));case"./translations/locales/fa.json":return import("service-catalog-translations").then((function(e){return e.O}));case"./translations/locales/fi.json":return import("service-catalog-translations").then((function(e){return e.P}));case"./translations/locales/fil.json":return import("service-catalog-translations").then((function(e){return e.Q}));case"./translations/locales/fo.json":return import("service-catalog-translations").then((function(e){return e.R}));case"./translations/locales/fr-ca.json":return import("service-catalog-translations").then((function(e){return e.S}));case"./translations/locales/fr-dz.json":return import("service-catalog-translations").then((function(e){return e.T}));case"./translations/locales/fr-mu.json":return import("service-catalog-translations").then((function(e){return e.U}));case"./translations/locales/fr.json":return import("service-catalog-translations").then((function(e){return e.V}));case"./translations/locales/ga.json":return import("service-catalog-translations").then((function(e){return e.W}));case"./translations/locales/he.json":return import("service-catalog-translations").then((function(e){return e.X}));case"./translations/locales/hi.json":return import("service-catalog-translations").then((function(e){return e.Y}));case"./translations/locales/hr.json":return import("service-catalog-translations").then((function(e){return e.Z}));case"./translations/locales/hu.json":return import("service-catalog-translations").then((function(e){return e._}));case"./translations/locales/hy.json":return import("service-catalog-translations").then((function(e){return e.$}));case"./translations/locales/id.json":return import("service-catalog-translations").then((function(e){return e.a0}));case"./translations/locales/is.json":return import("service-catalog-translations").then((function(e){return e.a1}));case"./translations/locales/it-ch.json":return import("service-catalog-translations").then((function(e){return e.a2}));case"./translations/locales/it.json":return import("service-catalog-translations").then((function(e){return e.a3}));case"./translations/locales/ja.json":return import("service-catalog-translations").then((function(e){return e.a4}));case"./translations/locales/ka.json":return import("service-catalog-translations").then((function(e){return e.a5}));case"./translations/locales/kk.json":return import("service-catalog-translations").then((function(e){return e.a6}));case"./translations/locales/kl-dk.json":return import("service-catalog-translations").then((function(e){return e.a7}));case"./translations/locales/km.json":return import("service-catalog-translations").then((function(e){return e.a8}));case"./translations/locales/ko.json":return import("service-catalog-translations").then((function(e){return e.a9}));case"./translations/locales/ku.json":return import("service-catalog-translations").then((function(e){return e.aa}));case"./translations/locales/ky.json":return import("service-catalog-translations").then((function(e){return e.ab}));case"./translations/locales/lt.json":return import("service-catalog-translations").then((function(e){return e.ac}));case"./translations/locales/lv.json":return import("service-catalog-translations").then((function(e){return e.ad}));case"./translations/locales/mk.json":return import("service-catalog-translations").then((function(e){return e.ae}));case"./translations/locales/mn.json":return import("service-catalog-translations").then((function(e){return e.af}));case"./translations/locales/ms.json":return import("service-catalog-translations").then((function(e){return e.ag}));case"./translations/locales/mt.json":return import("service-catalog-translations").then((function(e){return e.ah}));case"./translations/locales/my.json":return import("service-catalog-translations").then((function(e){return e.ai}));case"./translations/locales/ne.json":return import("service-catalog-translations").then((function(e){return e.aj}));case"./translations/locales/nl-be.json":return import("service-catalog-translations").then((function(e){return e.ak}));case"./translations/locales/nl.json":return import("service-catalog-translations").then((function(e){return e.al}));case"./translations/locales/no.json":return import("service-catalog-translations").then((function(e){return e.am}));case"./translations/locales/pl.json":return import("service-catalog-translations").then((function(e){return e.an}));case"./translations/locales/pt-br.json":return import("service-catalog-translations").then((function(e){return e.ao}));case"./translations/locales/pt.json":return import("service-catalog-translations").then((function(e){return e.ap}));case"./translations/locales/ro-md.json":return import("service-catalog-translations").then((function(e){return e.aq}));case"./translations/locales/ro.json":return import("service-catalog-translations").then((function(e){return e.ar}));case"./translations/locales/ru.json":return import("service-catalog-translations").then((function(e){return e.as}));case"./translations/locales/si.json":return import("service-catalog-translations").then((function(e){return e.at}));case"./translations/locales/sk.json":return import("service-catalog-translations").then((function(e){return e.au}));case"./translations/locales/sl.json":return import("service-catalog-translations").then((function(e){return e.av}));case"./translations/locales/sq.json":return import("service-catalog-translations").then((function(e){return e.aw}));case"./translations/locales/sr-me.json":return import("service-catalog-translations").then((function(e){return e.ax}));case"./translations/locales/sr.json":return import("service-catalog-translations").then((function(e){return e.ay}));case"./translations/locales/sv.json":return import("service-catalog-translations").then((function(e){return e.az}));case"./translations/locales/sw-ke.json":return import("service-catalog-translations").then((function(e){return e.aA}));case"./translations/locales/ta.json":return import("service-catalog-translations").then((function(e){return e.aB}));case"./translations/locales/th.json":return import("service-catalog-translations").then((function(e){return e.aC}));case"./translations/locales/tr.json":return import("service-catalog-translations").then((function(e){return e.aD}));case"./translations/locales/uk.json":return import("service-catalog-translations").then((function(e){return e.aE}));case"./translations/locales/ur-pk.json":return import("service-catalog-translations").then((function(e){return e.aF}));case"./translations/locales/ur.json":return import("service-catalog-translations").then((function(e){return e.aG}));case"./translations/locales/uz.json":return import("service-catalog-translations").then((function(e){return e.aH}));case"./translations/locales/vi.json":return import("service-catalog-translations").then((function(e){return e.aI}));case"./translations/locales/zh-cn.json":return import("service-catalog-translations").then((function(e){return e.aJ}));case"./translations/locales/zh-tw.json":return import("service-catalog-translations").then((function(e){return e.aK}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`./translations/locales/${r}.json`),()=>function(e){switch(e){case"../ticket-fields/translations/locales/af.json":return import("ticket-fields").then((function(e){return e.b}));case"../ticket-fields/translations/locales/ar-x-pseudo.json":return import("ticket-fields").then((function(e){return e.c}));case"../ticket-fields/translations/locales/ar.json":return import("ticket-fields").then((function(e){return e.d}));case"../ticket-fields/translations/locales/az.json":return import("ticket-fields").then((function(e){return e.e}));case"../ticket-fields/translations/locales/be.json":return import("ticket-fields").then((function(e){return e.f}));case"../ticket-fields/translations/locales/bg.json":return import("ticket-fields").then((function(e){return e.h}));case"../ticket-fields/translations/locales/bn.json":return import("ticket-fields").then((function(e){return e.i}));case"../ticket-fields/translations/locales/bs.json":return import("ticket-fields").then((function(e){return e.j}));case"../ticket-fields/translations/locales/ca.json":return import("ticket-fields").then((function(e){return e.k}));case"../ticket-fields/translations/locales/cs.json":return import("ticket-fields").then((function(e){return e.l}));case"../ticket-fields/translations/locales/cy.json":return import("ticket-fields").then((function(e){return e.m}));case"../ticket-fields/translations/locales/da.json":return import("ticket-fields").then((function(e){return e.n}));case"../ticket-fields/translations/locales/de-de.json":return import("ticket-fields").then((function(e){return e.o}));case"../ticket-fields/translations/locales/de-x-informal.json":return import("ticket-fields").then((function(e){return e.p}));case"../ticket-fields/translations/locales/de.json":return import("ticket-fields").then((function(e){return e.q}));case"../ticket-fields/translations/locales/el.json":return import("ticket-fields").then((function(e){return e.r}));case"../ticket-fields/translations/locales/en-001.json":return import("ticket-fields").then((function(e){return e.s}));case"../ticket-fields/translations/locales/en-150.json":return import("ticket-fields").then((function(e){return e.t}));case"../ticket-fields/translations/locales/en-au.json":return import("ticket-fields").then((function(e){return e.u}));case"../ticket-fields/translations/locales/en-ca.json":return import("ticket-fields").then((function(e){return e.v}));case"../ticket-fields/translations/locales/en-gb.json":return import("ticket-fields").then((function(e){return e.w}));case"../ticket-fields/translations/locales/en-my.json":return import("ticket-fields").then((function(e){return e.x}));case"../ticket-fields/translations/locales/en-ph.json":return import("ticket-fields").then((function(e){return e.y}));case"../ticket-fields/translations/locales/en-se.json":return import("ticket-fields").then((function(e){return e.z}));case"../ticket-fields/translations/locales/en-us.json":return import("ticket-fields").then((function(e){return e.A}));case"../ticket-fields/translations/locales/en-x-dev.json":return import("ticket-fields").then((function(e){return e.B}));case"../ticket-fields/translations/locales/en-x-keys.json":return import("ticket-fields").then((function(e){return e.C}));case"../ticket-fields/translations/locales/en-x-obsolete.json":return import("ticket-fields").then((function(e){return e.E}));case"../ticket-fields/translations/locales/en-x-pseudo.json":return import("ticket-fields").then((function(e){return e.F}));case"../ticket-fields/translations/locales/en-x-test.json":return import("ticket-fields").then((function(e){return e.G}));case"../ticket-fields/translations/locales/es-419.json":return import("ticket-fields").then((function(e){return e.H}));case"../ticket-fields/translations/locales/es-ar.json":return import("ticket-fields").then((function(e){return e.J}));case"../ticket-fields/translations/locales/es-cl.json":return import("ticket-fields").then((function(e){return e.K}));case"../ticket-fields/translations/locales/es-es.json":return import("ticket-fields").then((function(e){return e.L}));case"../ticket-fields/translations/locales/es-mx.json":return import("ticket-fields").then((function(e){return e.M}));case"../ticket-fields/translations/locales/es-pe.json":return import("ticket-fields").then((function(e){return e.N}));case"../ticket-fields/translations/locales/es.json":return import("ticket-fields").then((function(e){return e.O}));case"../ticket-fields/translations/locales/et.json":return import("ticket-fields").then((function(e){return e.P}));case"../ticket-fields/translations/locales/eu.json":return import("ticket-fields").then((function(e){return e.Q}));case"../ticket-fields/translations/locales/fa-af.json":return import("ticket-fields").then((function(e){return e.S}));case"../ticket-fields/translations/locales/fa.json":return import("ticket-fields").then((function(e){return e.U}));case"../ticket-fields/translations/locales/fi.json":return import("ticket-fields").then((function(e){return e.V}));case"../ticket-fields/translations/locales/fil.json":return import("ticket-fields").then((function(e){return e.W}));case"../ticket-fields/translations/locales/fo.json":return import("ticket-fields").then((function(e){return e.X}));case"../ticket-fields/translations/locales/fr-ca.json":return import("ticket-fields").then((function(e){return e.Y}));case"../ticket-fields/translations/locales/fr-dz.json":return import("ticket-fields").then((function(e){return e.Z}));case"../ticket-fields/translations/locales/fr-mu.json":return import("ticket-fields").then((function(e){return e._}));case"../ticket-fields/translations/locales/fr.json":return import("ticket-fields").then((function(e){return e.$}));case"../ticket-fields/translations/locales/ga.json":return import("ticket-fields").then((function(e){return e.a0}));case"../ticket-fields/translations/locales/he.json":return import("ticket-fields").then((function(e){return e.a1}));case"../ticket-fields/translations/locales/hi.json":return import("ticket-fields").then((function(e){return e.a2}));case"../ticket-fields/translations/locales/hr.json":return import("ticket-fields").then((function(e){return e.a3}));case"../ticket-fields/translations/locales/hu.json":return import("ticket-fields").then((function(e){return e.a4}));case"../ticket-fields/translations/locales/hy.json":return import("ticket-fields").then((function(e){return e.a5}));case"../ticket-fields/translations/locales/id.json":return import("ticket-fields").then((function(e){return e.a6}));case"../ticket-fields/translations/locales/is.json":return import("ticket-fields").then((function(e){return e.a7}));case"../ticket-fields/translations/locales/it-ch.json":return import("ticket-fields").then((function(e){return e.a8}));case"../ticket-fields/translations/locales/it.json":return import("ticket-fields").then((function(e){return e.a9}));case"../ticket-fields/translations/locales/ja.json":return import("ticket-fields").then((function(e){return e.aa}));case"../ticket-fields/translations/locales/ka.json":return import("ticket-fields").then((function(e){return e.ab}));case"../ticket-fields/translations/locales/kk.json":return import("ticket-fields").then((function(e){return e.ac}));case"../ticket-fields/translations/locales/kl-dk.json":return import("ticket-fields").then((function(e){return e.ad}));case"../ticket-fields/translations/locales/km.json":return import("ticket-fields").then((function(e){return e.ae}));case"../ticket-fields/translations/locales/ko.json":return import("ticket-fields").then((function(e){return e.af}));case"../ticket-fields/translations/locales/ku.json":return import("ticket-fields").then((function(e){return e.ag}));case"../ticket-fields/translations/locales/ky.json":return import("ticket-fields").then((function(e){return e.ah}));case"../ticket-fields/translations/locales/lt.json":return import("ticket-fields").then((function(e){return e.ai}));case"../ticket-fields/translations/locales/lv.json":return import("ticket-fields").then((function(e){return e.aj}));case"../ticket-fields/translations/locales/mk.json":return import("ticket-fields").then((function(e){return e.ak}));case"../ticket-fields/translations/locales/mn.json":return import("ticket-fields").then((function(e){return e.al}));case"../ticket-fields/translations/locales/ms.json":return import("ticket-fields").then((function(e){return e.am}));case"../ticket-fields/translations/locales/mt.json":return import("ticket-fields").then((function(e){return e.an}));case"../ticket-fields/translations/locales/my.json":return import("ticket-fields").then((function(e){return e.ao}));case"../ticket-fields/translations/locales/ne.json":return import("ticket-fields").then((function(e){return e.ap}));case"../ticket-fields/translations/locales/nl-be.json":return import("ticket-fields").then((function(e){return e.aq}));case"../ticket-fields/translations/locales/nl.json":return import("ticket-fields").then((function(e){return e.ar}));case"../ticket-fields/translations/locales/no.json":return import("ticket-fields").then((function(e){return e.as}));case"../ticket-fields/translations/locales/pl.json":return import("ticket-fields").then((function(e){return e.at}));case"../ticket-fields/translations/locales/pt-br.json":return import("ticket-fields").then((function(e){return e.au}));case"../ticket-fields/translations/locales/pt.json":return import("ticket-fields").then((function(e){return e.av}));case"../ticket-fields/translations/locales/ro-md.json":return import("ticket-fields").then((function(e){return e.aw}));case"../ticket-fields/translations/locales/ro.json":return import("ticket-fields").then((function(e){return e.ax}));case"../ticket-fields/translations/locales/ru.json":return import("ticket-fields").then((function(e){return e.ay}));case"../ticket-fields/translations/locales/si.json":return import("ticket-fields").then((function(e){return e.az}));case"../ticket-fields/translations/locales/sk.json":return import("ticket-fields").then((function(e){return e.aA}));case"../ticket-fields/translations/locales/sl.json":return import("ticket-fields").then((function(e){return e.aB}));case"../ticket-fields/translations/locales/sq.json":return import("ticket-fields").then((function(e){return e.aC}));case"../ticket-fields/translations/locales/sr-me.json":return import("ticket-fields").then((function(e){return e.aD}));case"../ticket-fields/translations/locales/sr.json":return import("ticket-fields").then((function(e){return e.aE}));case"../ticket-fields/translations/locales/sv.json":return import("ticket-fields").then((function(e){return e.aF}));case"../ticket-fields/translations/locales/sw-ke.json":return import("ticket-fields").then((function(e){return e.aG}));case"../ticket-fields/translations/locales/ta.json":return import("ticket-fields").then((function(e){return e.aH}));case"../ticket-fields/translations/locales/th.json":return import("ticket-fields").then((function(e){return e.aI}));case"../ticket-fields/translations/locales/tr.json":return import("ticket-fields").then((function(e){return e.aJ}));case"../ticket-fields/translations/locales/uk.json":return import("ticket-fields").then((function(e){return e.aK}));case"../ticket-fields/translations/locales/ur-pk.json":return import("ticket-fields").then((function(e){return e.aL}));case"../ticket-fields/translations/locales/ur.json":return import("ticket-fields").then((function(e){return e.aM}));case"../ticket-fields/translations/locales/uz.json":return import("ticket-fields").then((function(e){return e.aN}));case"../ticket-fields/translations/locales/vi.json":return import("ticket-fields").then((function(e){return e.aO}));case"../ticket-fields/translations/locales/zh-cn.json":return import("ticket-fields").then((function(e){return e.aP}));case"../ticket-fields/translations/locales/zh-tw.json":return import("ticket-fields").then((function(e){return e.aQ}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../ticket-fields/translations/locales/${r}.json`),()=>function(e){switch(e){case"../shared/translations/locales/af.json":return import("shared").then((function(e){return e.aB}));case"../shared/translations/locales/ar-x-pseudo.json":return import("shared").then((function(e){return e.aC}));case"../shared/translations/locales/ar.json":return import("shared").then((function(e){return e.aD}));case"../shared/translations/locales/az.json":return import("shared").then((function(e){return e.aE}));case"../shared/translations/locales/be.json":return import("shared").then((function(e){return e.aF}));case"../shared/translations/locales/bg.json":return import("shared").then((function(e){return e.aG}));case"../shared/translations/locales/bn.json":return import("shared").then((function(e){return e.aH}));case"../shared/translations/locales/bs.json":return import("shared").then((function(e){return e.aI}));case"../shared/translations/locales/ca.json":return import("shared").then((function(e){return e.aJ}));case"../shared/translations/locales/cs.json":return import("shared").then((function(e){return e.aK}));case"../shared/translations/locales/cy.json":return import("shared").then((function(e){return e.aL}));case"../shared/translations/locales/da.json":return import("shared").then((function(e){return e.aM}));case"../shared/translations/locales/de-de.json":return import("shared").then((function(e){return e.aN}));case"../shared/translations/locales/de-x-informal.json":return import("shared").then((function(e){return e.aO}));case"../shared/translations/locales/de.json":return import("shared").then((function(e){return e.aP}));case"../shared/translations/locales/el.json":return import("shared").then((function(e){return e.aQ}));case"../shared/translations/locales/en-001.json":return import("shared").then((function(e){return e.aR}));case"../shared/translations/locales/en-150.json":return import("shared").then((function(e){return e.aS}));case"../shared/translations/locales/en-au.json":return import("shared").then((function(e){return e.aT}));case"../shared/translations/locales/en-ca.json":return import("shared").then((function(e){return e.aU}));case"../shared/translations/locales/en-gb.json":return import("shared").then((function(e){return e.aV}));case"../shared/translations/locales/en-my.json":return import("shared").then((function(e){return e.aW}));case"../shared/translations/locales/en-ph.json":return import("shared").then((function(e){return e.aX}));case"../shared/translations/locales/en-se.json":return import("shared").then((function(e){return e.aY}));case"../shared/translations/locales/en-us.json":return import("shared").then((function(e){return e.aZ}));case"../shared/translations/locales/en-x-dev.json":return import("shared").then((function(e){return e.a_}));case"../shared/translations/locales/en-x-keys.json":return import("shared").then((function(e){return e.a$}));case"../shared/translations/locales/en-x-obsolete.json":return import("shared").then((function(e){return e.b0}));case"../shared/translations/locales/en-x-pseudo.json":return import("shared").then((function(e){return e.b1}));case"../shared/translations/locales/en-x-test.json":return import("shared").then((function(e){return e.b2}));case"../shared/translations/locales/es-419.json":return import("shared").then((function(e){return e.b3}));case"../shared/translations/locales/es-ar.json":return import("shared").then((function(e){return e.b4}));case"../shared/translations/locales/es-cl.json":return import("shared").then((function(e){return e.b5}));case"../shared/translations/locales/es-es.json":return import("shared").then((function(e){return e.b6}));case"../shared/translations/locales/es-mx.json":return import("shared").then((function(e){return e.b7}));case"../shared/translations/locales/es-pe.json":return import("shared").then((function(e){return e.b8}));case"../shared/translations/locales/es.json":return import("shared").then((function(e){return e.b9}));case"../shared/translations/locales/et.json":return import("shared").then((function(e){return e.ba}));case"../shared/translations/locales/eu.json":return import("shared").then((function(e){return e.bb}));case"../shared/translations/locales/fa-af.json":return import("shared").then((function(e){return e.bc}));case"../shared/translations/locales/fa.json":return import("shared").then((function(e){return e.bd}));case"../shared/translations/locales/fi.json":return import("shared").then((function(e){return e.be}));case"../shared/translations/locales/fil.json":return import("shared").then((function(e){return e.bf}));case"../shared/translations/locales/fo.json":return import("shared").then((function(e){return e.bg}));case"../shared/translations/locales/fr-ca.json":return import("shared").then((function(e){return e.bh}));case"../shared/translations/locales/fr-dz.json":return import("shared").then((function(e){return e.bi}));case"../shared/translations/locales/fr-mu.json":return import("shared").then((function(e){return e.bj}));case"../shared/translations/locales/fr.json":return import("shared").then((function(e){return e.bk}));case"../shared/translations/locales/ga.json":return import("shared").then((function(e){return e.bl}));case"../shared/translations/locales/he.json":return import("shared").then((function(e){return e.bm}));case"../shared/translations/locales/hi.json":return import("shared").then((function(e){return e.bn}));case"../shared/translations/locales/hr.json":return import("shared").then((function(e){return e.bo}));case"../shared/translations/locales/hu.json":return import("shared").then((function(e){return e.bp}));case"../shared/translations/locales/hy.json":return import("shared").then((function(e){return e.bq}));case"../shared/translations/locales/id.json":return import("shared").then((function(e){return e.br}));case"../shared/translations/locales/is.json":return import("shared").then((function(e){return e.bs}));case"../shared/translations/locales/it-ch.json":return import("shared").then((function(e){return e.bt}));case"../shared/translations/locales/it.json":return import("shared").then((function(e){return e.bu}));case"../shared/translations/locales/ja.json":return import("shared").then((function(e){return e.bv}));case"../shared/translations/locales/ka.json":return import("shared").then((function(e){return e.bw}));case"../shared/translations/locales/kk.json":return import("shared").then((function(e){return e.bx}));case"../shared/translations/locales/kl-dk.json":return import("shared").then((function(e){return e.by}));case"../shared/translations/locales/km.json":return import("shared").then((function(e){return e.bz}));case"../shared/translations/locales/ko.json":return import("shared").then((function(e){return e.bA}));case"../shared/translations/locales/ku.json":return import("shared").then((function(e){return e.bB}));case"../shared/translations/locales/ky.json":return import("shared").then((function(e){return e.bC}));case"../shared/translations/locales/lt.json":return import("shared").then((function(e){return e.bD}));case"../shared/translations/locales/lv.json":return import("shared").then((function(e){return e.bE}));case"../shared/translations/locales/mk.json":return import("shared").then((function(e){return e.bF}));case"../shared/translations/locales/mn.json":return import("shared").then((function(e){return e.bG}));case"../shared/translations/locales/ms.json":return import("shared").then((function(e){return e.bH}));case"../shared/translations/locales/mt.json":return import("shared").then((function(e){return e.bI}));case"../shared/translations/locales/my.json":return import("shared").then((function(e){return e.bJ}));case"../shared/translations/locales/ne.json":return import("shared").then((function(e){return e.bK}));case"../shared/translations/locales/nl-be.json":return import("shared").then((function(e){return e.bL}));case"../shared/translations/locales/nl.json":return import("shared").then((function(e){return e.bM}));case"../shared/translations/locales/no.json":return import("shared").then((function(e){return e.bN}));case"../shared/translations/locales/pl.json":return import("shared").then((function(e){return e.bO}));case"../shared/translations/locales/pt-br.json":return import("shared").then((function(e){return e.bP}));case"../shared/translations/locales/pt.json":return import("shared").then((function(e){return e.bQ}));case"../shared/translations/locales/ro-md.json":return import("shared").then((function(e){return e.bR}));case"../shared/translations/locales/ro.json":return import("shared").then((function(e){return e.bS}));case"../shared/translations/locales/ru.json":return import("shared").then((function(e){return e.bT}));case"../shared/translations/locales/si.json":return import("shared").then((function(e){return e.bU}));case"../shared/translations/locales/sk.json":return import("shared").then((function(e){return e.bV}));case"../shared/translations/locales/sl.json":return import("shared").then((function(e){return e.bW}));case"../shared/translations/locales/sq.json":return import("shared").then((function(e){return e.bX}));case"../shared/translations/locales/sr-me.json":return import("shared").then((function(e){return e.bY}));case"../shared/translations/locales/sr.json":return import("shared").then((function(e){return e.bZ}));case"../shared/translations/locales/sv.json":return import("shared").then((function(e){return e.b_}));case"../shared/translations/locales/sw-ke.json":return import("shared").then((function(e){return e.b$}));case"../shared/translations/locales/ta.json":return import("shared").then((function(e){return e.c0}));case"../shared/translations/locales/th.json":return import("shared").then((function(e){return e.c1}));case"../shared/translations/locales/tr.json":return import("shared").then((function(e){return e.c2}));case"../shared/translations/locales/uk.json":return import("shared").then((function(e){return e.c3}));case"../shared/translations/locales/ur-pk.json":return import("shared").then((function(e){return e.c4}));case"../shared/translations/locales/ur.json":return import("shared").then((function(e){return e.c5}));case"../shared/translations/locales/uz.json":return import("shared").then((function(e){return e.c6}));case"../shared/translations/locales/vi.json":return import("shared").then((function(e){return e.c7}));case"../shared/translations/locales/zh-cn.json":return import("shared").then((function(e){return e.c8}));case"../shared/translations/locales/zh-tw.json":return import("shared").then((function(e){return e.c9}));default:return new Promise((function(t,n){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}(`../shared/translations/locales/${r}.json`)]),w.render(s.jsx($,{theme:z(t),children:s.jsx(C,{helpCenterPath:a,children:s.jsx(Ie,{...n})})}),e)}export{Fe as renderServiceCatalogItem,le as renderServiceCatalogList};
