PageSourceSearch

https://www.alsglobal.com/_next/static/chunks/59-3d03aeb98dde5a97.js?dpl=dpl_4Kk8QQR4yUy8szrPxmWD41nDBi2F

js alsglobal.com collected 2026-10-01 11:24:36 UTC 873,583 bytes, 146 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59],{163:(e,t,r)=>{"use strict";r.d(t,{E:()=>u});var n=r(4232),i=r(3813),a=r(8741),s=r(3561),o=r(3282),l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let u=(0,a.O)((0,s.N)(e=>{var{field:t,tag:r,editable:a=!0,encode:s=!0}=e,o=l(e,["field","tag","editable","encode"]);if((0,i.JE)(t))return null;let u=void 0===t.value?"":t.value,c=String(u).split("\n");if(c.length){let e=[];c.forEach((t,r)=>{let i=r===c.length-1;e.push(t),i||e.push(n.createElement("br",{key:r}))}),u=e}let d=null,f=Object.assign({},o);s?d=u:f.dangerouslySetInnerHTML={__html:u};let p=r||"span";return t.metadata?n.createElement(p,Object.assign({},f,{suppressHydrationWarning:!0}),d):r||!s?n.createElement(p,Object.assign({},f),d):n.createElement(n.Fragment,null,d)},{defaultEmptyFieldEditingComponent:o.G}));u.displayName="Text"},310:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;let i=t.length,a=0,s="";do s+=e.substr(a,n-a)+t+r,a=n+i,n=e.indexOf(t,a);while(-1!==n);return s+e.substr(a)},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let i=0,a="";do{let s="\r"===e[n-1];a+=e.substr(i,(s?n-1:n)-i)+t+(s?"\r\n":"\n")+r,i=n+1,n=e.indexOf("\n",i)}while(-1!==n);return a+e.substr(i)}}},397:(e,t,r)=>{var n=r(8932),i=function(e){var t="",r=Object.keys(e);return r.forEach(function(i,a){var s,o=e[i];s=i=n(i),/[height|width]$/.test(s)&&"number"==typeof o&&(o+="px"),!0===o?t+=i:!1===o?t+="not "+i:t+="("+i+": "+o+")",a<r.length-1&&(t+=" and ")}),t};e.exports=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach(function(r,n){t+=i(r),n<e.length-1&&(t+=", ")}),t):i(e)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return C},useLinkStatus:function(){return _}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(8365),s=r(7876),o=a._(r(4232)),l=r(6662),u=r(7652),c=r(4989),d=r(347),f=r(5495),p=r(2925),h=r(3947),g=r(4400),m=r(5561),y=r(5022);r(608);let v=new Set;function b(e,t,r,n){if((0,u.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(v.has(i))return;v.add(i)}e.prefetch(t,r,n).catch(e=>{})}}function w(e){return"string"==typeof e?e:(0,c.formatUrl)(e)}let S=o.default.forwardRef(function(e,t){let r,n,{href:i,as:a,children:c,prefetch:v=null,passHref:S,replace:E,shallow:_,scroll:C,locale:O,onClick:k,onNavigate:I,onMouseEnter:A,onTouchStart:T,legacyBehavior:x=!1,transitionTypes:R,...N}=e;r=c,x&&("string"==typeof r||"number"==typeof r)&&(r=(0,s.jsx)("a",{children:r}));let j=o.default.useContext(p.RouterContext),P=!1!==v,{href:D,as:M}=o.default.useMemo(()=>{if(!j){let e=w(i);return{href:e,as:a?w(a):e}}let[e,t]=(0,l.resolveHref)(j,i,!0);return{href:e,as:a?(0,l.resolveHref)(j,a):t||e}},[j,i,a]),L=o.default.useRef(D),F=o.default.useRef(M);x&&(n=o.default.Children.only(r));let q=x?n&&"object"==typeof n&&n.ref:t,[U,$,V]=(0,h.useIntersection)({rootMargin:"200px"}),z=o.default.useCallback(e=>{(F.current!==M||L.current!==D)&&(V(),F.current=M,L.current=D),U(e)},[M,D,V,U]),B=(0,y.useMergedRef)(z,q);o.default.useEffect(()=>{!j||$&&P&&b(j,D,M,{locale:O})},[M,D,$,O,P,j?.locale,j]);let G={ref:B,onClick(e){x||"function"!=typeof k||k(e),x&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),!j||e.defaultPrevented||function(e,t,r,n,i,a,s,o,l){let c,{nodeName:d}=e.currentTarget;if(!("A"===d.toUpperCase()&&((c=e.currentTarget.getAttribute("target"))&&"_self"!==c||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))){if(!(0,u.isLocalURL)(r)){i&&(e.preventDefault(),location.replace(r));return}e.preventDefault(),(()=>{if(l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let e=s??!0;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:o,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})})()}}(e,j,D,M,E,_,C,O,I)},onMouseEnter(e){x||"function"!=typeof A||A(e),x&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),j&&b(j,D,M,{locale:O,priority:!0,bypassPrefetchedCheck:!0})},onTouchStart:function(e){x||"function"!=typeof T||T(e),x&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),j&&b(j,D,M,{locale:O,priority:!0,bypassPrefetchedCheck:!0})}};if((0,d.isAbsoluteUrl)(M))G.href=M;else if(!x||S||"a"===n.type&&!("href"in n.props)){let e=void 0!==O?O:j?.locale;G.href=j?.isLocaleDomain&&(0,g.getDomainLocale)(M,e,j?.locales,j?.domainLocales)||
1(0,m.addBasePath)((0,f.addLocale)(M,e,j?.defaultLocale))}return x?o.default.cloneElement(n,G):(0,s.jsx)("a",{...N,...G,children:r})}),E=(0,o.createContext)({pending:!1}),_=()=>(0,o.useContext)(E),C=S;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},560:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){var l=[a,o];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(5542),s=r(3135);t.backOff=function(e,t){return void 0===t&&(t={}),n(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:return[4,new o(e,a.getSanitizedOptions(t)).execute()];case 1:return[2,r.sent()]}})})};var o=function(){function e(e,t){this.request=e,this.options=t,this.attemptNumber=0}return e.prototype.execute=function(){return n(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(!t.sent()||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return n(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,s.DelayFactory(this.options,this.attemptNumber).apply()];case 1:return e.sent(),[2]}})})},e}()},608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var n=s(r(4232)),i=s(r(5039)),a=r(4523);function s(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?p(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function g(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var y=function(e){var t,r,n,i,a;return n=(a=e.rtl?e.slideCount-1-e.index:e.index)<0||a>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),r=(a-e.currentSlide)%e.slideCount==0,a>e.currentSlide-i-1&&a<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=a&&a<e.currentSlide+e.slidesToShow,{"slick-slide":!0,"slick-active":t,"slick-center":r,"slick-cloned":n,"slick-current":a===(e.targetSlide<0?e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},v=function(e){var t={};return(void 0===e.variableWidth||!1===e.variableWidth)&&(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=+(e.currentSlide===e.index),t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t},b=function(e,t){return e.key||t},w=function(e){var t,r=[],s=[],o=[],l=n.default.Children.count(e.children),u=(0,a.lazyStartIndex)(e),c=(0,a.lazyEndIndex)(e);return(n.default.Children.forEach(e.children,function(d,f){var p,g={message:"children",index:f,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};p=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(f)>=0?d:n.default.createElement("div",null);var m=v(h(h({},e),{},{index:f})),w=p.props.className||"",S=y(h(h({},e),{},{index:f}));if(r.push(n.default.cloneElement(p,{key:"original"+b(p,f),"data-index":f,className:(0,i.default)(S,w),tabIndex:"-1","aria-hidden":!S["slick-active"],style:h(h({outline:"none"},p.props.style||{}),m),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}})),e.infinite&&l>1&&!1===e.fade&&!e.unslick){var E=l-f;E<=(0,a.getPreClones)(e)&&((t=-E)>=u&&(p=d),S=y(h(h({},e),{},{index:t})),s.push(n.default.cloneElement(p,{key:"precloned"+b(p,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(S,w),"aria-hidden":!S["slick-active"],style:h(h({},p.props.style||{}),m),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}}))),f<(0,a.getPostClones)(e)&&((t=l+f)<c&&(p=d),S=y(h(h({},e),{},{index:t})),o.push(n.default.cloneElement(p,{key:"postcloned"+b(p,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(S,w),"aria-hidden":!S["slick-active"],style:h(h({},p.props.style||{}),m),onClick:function(t){p.props&&p.props.onClick&&p.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(g)}})))}}),e.rtl)?s.concat(r,o).reverse():s.concat(r,o)};t.Track=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),e&&u(a,e);var t,r,i=(t=d(),function(){var e,r=f(a);return e=t?Reflect.construct(r,arguments,f(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}(this,e)});function a(){var e;if(!(this instanceof a))throw TypeError("Cannot call a class as a function");for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return g(c(e=i.call.apply(i,[this].concat(r))),"node",null),g(c(e),"handleRef",function(t){e.node=t}),e}return r=[{key:"render",value:function(){var e=w(this.props),t=this.props,r=t.onMouseEnter,i=t.onMouseOver,a=t.onMouseLeave;return n.default.createElement("div",l({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},{onMouseEnter:r,onMouseOver:i,onMouseLeave:a}),e)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a}(n.default.PureComponent)},749:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSlider=void 0;var n=f(r(4232)),i=f(r(8321)),a=f(r(9149)),s=f(r(5039)),o=r(4523),l=r(710),u=r(1843),c=r(1457),d=f(r(2351));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e,t){return(y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}t.InnerSlider=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");g.prototype=Object.create(e&&e.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),e&&y(g,e);var t,r,f=(t=b(),function(){var e,r=w(g);return e=t?Reflect.construct(r,arguments,w(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return v(e)}(this,e)});function g(e){if(!(this instanceof g))throw TypeError("Cannot call a class as a function");S(v(t=f.call(this,e)),"listRefHandler",function(e){return t.list=e}),S(v(t),"trackRefHandler",function(e){return t.track=e}),S(v(t),"adaptHeight",function(){if(t.props.adaptiveHeight&&t.list){var e=t.list.querySelector('[data-index="'.concat(t.state.currentSlide,'"]'));t.list.style.height=(0,o.getHeight)(e)+"px"}}),S(v(t),"componentDidMount",function(){if(t.props.onInit&&t.props.onInit(),t.props.lazyLoad){var e=(0,o.getOnDemandLazySlides)(m(m({},t.props),t.state));e.length>0&&(t.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),t.props.onLazyLoad&&t.props.onLazyLoad(e))}var r=m({listRef:t.list,trackRef:t.track},t.props);t.updateState(r,!0,function(){t.adaptHeight(),t.props.autoplay&&t.autoPlay("update")}),"progressive"===t.props.lazyLoad&&(t.lazyLoadTimer=setInterval(t.progressiveLazyLoad,1e3)),t.ro=new d.default(function(){t.state.animating?(t.onWindowResized(!1),t.callbackTimers.push(setTimeout(function(){return t.onWindowResized()},t.props.speed))):t.onWindowResized()}),t.ro.observe(t.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),function(e){e.onfocus=t.props.pauseOnFocus?t.onSlideFocus:null,e.onblur=t.props.pauseOnFocus?t.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",t.onWindowResized):window.attachEvent("onresize",t.onWindowResized)}),S(v(t),"componentWillUnmount",function(){t.animationEndCallback&&clearTimeout(t.animationEndCallback),t.lazyLoadTimer&&clearInterval(t.lazyLoadTimer),t.callbackTimers.length&&(t.callbackTimers.forEac
1h(function(e){return clearTimeout(e)}),t.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",t.onWindowResized):window.detachEvent("onresize",t.onWindowResized),t.autoplayTimer&&clearInterval(t.autoplayTimer),t.ro.disconnect()}),S(v(t),"componentDidUpdate",function(e){if(t.checkImagesLoad(),t.props.onReInit&&t.props.onReInit(),t.props.lazyLoad){var r=(0,o.getOnDemandLazySlides)(m(m({},t.props),t.state));r.length>0&&(t.setState(function(e){return{lazyLoadedList:e.lazyLoadedList.concat(r)}}),t.props.onLazyLoad&&t.props.onLazyLoad(r))}t.adaptHeight();var i=m(m({listRef:t.list,trackRef:t.track},t.props),t.state),a=t.didPropsChange(e);a&&t.updateState(i,a,function(){t.state.currentSlide>=n.default.Children.count(t.props.children)&&t.changeSlide({message:"index",index:n.default.Children.count(t.props.children)-t.props.slidesToShow,currentSlide:t.state.currentSlide}),t.props.autoplay?t.autoPlay("update"):t.pause("paused")})}),S(v(t),"onWindowResized",function(e){t.debouncedResize&&t.debouncedResize.cancel(),t.debouncedResize=(0,a.default)(function(){return t.resizeWindow(e)},50),t.debouncedResize()}),S(v(t),"resizeWindow",function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(t.track&&t.track.node){var r=m(m({listRef:t.list,trackRef:t.track},t.props),t.state);t.updateState(r,e,function(){t.props.autoplay?t.autoPlay("update"):t.pause("paused")}),t.setState({animating:!1}),clearTimeout(t.animationEndCallback),delete t.animationEndCallback}}),S(v(t),"updateState",function(e,r,i){var a=(0,o.initializedState)(e);e=m(m(m({},e),a),{},{slideIndex:a.currentSlide});var s=(0,o.getTrackLeft)(e);e=m(m({},e),{},{left:s});var l=(0,o.getTrackCSS)(e);(r||n.default.Children.count(t.props.children)!==n.default.Children.count(e.children))&&(a.trackStyle=l),t.setState(a,i)}),S(v(t),"ssrInit",function(){if(t.props.variableWidth){var e=0,r=0,i=[],a=(0,o.getPreClones)(m(m(m({},t.props),t.state),{},{slideCount:t.props.children.length})),s=(0,o.getPostClones)(m(m(m({},t.props),t.state),{},{slideCount:t.props.children.length}));t.props.children.forEach(function(t){i.push(t.props.style.width),e+=t.props.style.width});for(var l=0;l<a;l++)r+=i[i.length-1-l],e+=i[i.length-1-l];for(var u=0;u<s;u++)e+=i[u];for(var c=0;c<t.state.currentSlide;c++)r+=i[c];var d={width:e+"px",left:-r+"px"};if(t.props.centerMode){var f="".concat(i[t.state.currentSlide],"px");d.left="calc(".concat(d.left," + (100% - ").concat(f,") / 2 ) ")}return{trackStyle:d}}var p=n.default.Children.count(t.props.children),h=m(m(m({},t.props),t.state),{},{slideCount:p}),g=(0,o.getPreClones)(h)+(0,o.getPostClones)(h)+p,y=100/t.props.slidesToShow*g,v=100/g,b=-v*((0,o.getPreClones)(h)+t.state.currentSlide)*y/100;return t.props.centerMode&&(b+=(100-v*y/100)/2),{slideWidth:v+"%",trackStyle:{width:y+"%",left:b+"%"}}}),S(v(t),"checkImagesLoad",function(){var e=t.list&&t.list.querySelectorAll&&t.list.querySelectorAll(".slick-slide img")||[],r=e.length,n=0;Array.prototype.forEach.call(e,function(e){var i=function(){return++n&&n>=r&&t.onWindowResized()};if(e.onclick){var a=e.onclick;e.onclick=function(t){a(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(t.props.lazyLoad?e.onload=function(){t.adaptHeight(),t.callbackTimers.push(setTimeout(t.onWindowResized,t.props.speed))}:(e.onload=i,e.onerror=function(){i(),t.props.onLazyLoadError&&t.props.onLazyLoadError()}))})}),S(v(t),"progressiveLazyLoad",function(){for(var e=[],r=m(m({},t.props),t.state),n=t.state.currentSlide;n<t.state.slideCount+(0,o.getPostClones)(r);n++)if(0>t.state.lazyLoadedList.indexOf(n)){e.push(n);break}for(var i=t.state.currentSlide-1;i>=-(0,o.getPreClones)(r);i--)if(0>t.state.lazyLoadedList.indexOf(i)){e.push(i);break}e.length>0?(t.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),t.props.onLazyLoad&&t.props.onLazyLoad(e)):t.lazyLoadTimer&&(clearInterval(t.lazyLoadTimer),delete t.lazyLoadTimer)}),S(v(t),"slideHandler",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.props,i=n.asNavFor,a=n.beforeChange,s=n.onLazyLoad,l=n.speed,u=n.afterChange,c=t.state.currentSlide,d=(0,o.slideHandler)(m(m(m({index:e},t.props),t.state),{},{trackRef:t.track,useCSS:t.props.useCSS&&!r})),f=d.state,p=d.nextState;if(f){a&&a(c,f.currentSlide);var h=f.lazyLoadedList.filter(function(e){return 0>t.state.lazyLoadedList.indexOf(e)});s&&h.length>0&&s(h),!t.props.waitForAnimate&&t.animationEndCallback&&(clearTimeout(t.animationEndCallback),u&&u(c),delete t.animationEndCallback),t.setState(f,function(){i&&t.asNavForIndex!==e&&(t.asNavForIndex=e,i.innerSlider.slideHandler(e)),p&&(t.animationEndCallback=setTimeout(function(){var e=p.animating,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(p,["animating"]);t.setState(r,function(){t.callbackTimers.push(setTimeout(function(){return t.setState({animating:e})},10)),u&&u(f.currentSlide),delete t.animationEndCallback})},l))})}}),S(v(t),"changeSlide",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=m(m({},t.props),t.state),i=(0,o.changeSlide)(n,e);if((0===i||i)&&(!0===r?t.slideHandler(i,r):t.slideHandler(i),t.props.autoplay&&t.autoPlay("update"),t.props.focusOnSelect)){var a=t.list.querySelectorAll(".slick-current");a[0]&&a[0].focus()}}),S(v(t),"clickHandler",function(e){!1===t.clickable&&(e.stopPropagation(),e.preventDefault()),t.clickable=!0}),S(v(t),"keyHandler",function(e){var r=(0,o.keyHandler)(e,t.props.accessibility,t.props.rtl);""!==r&&t.changeSlide({message:r})}),S(v(t),"selectHandler",function(e){t.changeSlide(e)}),S(v(t),"disableBodyScroll",function(){window.ontouchmove=function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}}),S(v(t),"enableBodyScroll",function(){window.ontouchmove=null}),S(v(t),"swipeStart",function(e){t.props.verticalSwiping&&t.disableBodyScroll();var r=(0,o.swipeStart)(e,t.props.swipe,t.props.draggable);""!==r&&t.setState(r)}),S(v(t),"swipeMove",function(e){var r=(0,o.swipeMove)(e,m(m(m({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));r&&(r.swiping&&(t.clickable=!1),t.setState(r))}),S(v(t),"swipeEnd",function(e){var r=(0,o.swipeEnd)(e,m(m(m({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));if(r){var n=r.triggerSlideHandler;delete r.triggerSlideHandler,t.setState(r),void 0!==n&&(t.slideHandler(n),t.props.verticalSwiping&&t.enableBodyScroll())}}),S(v(t),"touchEnd",function(e){t.swipeEnd(e),t.clickable=!0}),S(v(t),"slickPrev",function(){t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"previous"})},0))}),S(v(t),"slickNext",function(){t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"next"})},0))}),S(v(t),"slickGoTo",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(isNaN(e=Number(e)))return"";t.callbackTimers.push(setTimeout(function(){return t.changeSlide({message:"index",index:e,currentSlide:t.state.currentSlide},r)},0))}),S(v(t),"play",function(){var e;if(t.props.rtl)e=t.state.currentSlide-t.props.slidesToScroll;else{if(!(0,o.canGoNext)(m(m({},t.props),t.state)))return!1;e=t.state.currentSlide+t.props.slidesToScroll}t.slideHandler(e)}),S(v(t),"autoPlay",function(e){t.autoplayTimer&&clearInterval(t.autoplayTimer);var r=t.state.autoplaying;if("update"===e){if("hovered"===r||"focused"===r||"paused"===r)return}else if("leave"===e){if("paused"===r||"focused"===r)return}else if("blur"===e&&("paused"===r||"hovered"===r))return;t.autoplayTimer=setInterval(t.play,t.props.autoplaySpeed+50),t.setState({auto
1playing:"playing"})}),S(v(t),"pause",function(e){t.autoplayTimer&&(clearInterval(t.autoplayTimer),t.autoplayTimer=null);var r=t.state.autoplaying;"paused"===e?t.setState({autoplaying:"paused"}):"focused"===e?("hovered"===r||"playing"===r)&&t.setState({autoplaying:"focused"}):"playing"===r&&t.setState({autoplaying:"hovered"})}),S(v(t),"onDotsOver",function(){return t.props.autoplay&&t.pause("hovered")}),S(v(t),"onDotsLeave",function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")}),S(v(t),"onTrackOver",function(){return t.props.autoplay&&t.pause("hovered")}),S(v(t),"onTrackLeave",function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")}),S(v(t),"onSlideFocus",function(){return t.props.autoplay&&t.pause("focused")}),S(v(t),"onSlideBlur",function(){return t.props.autoplay&&"focused"===t.state.autoplaying&&t.autoPlay("blur")}),S(v(t),"render",function(){var e,r,i,a=(0,s.default)("slick-slider",t.props.className,{"slick-vertical":t.props.vertical,"slick-initialized":!0}),d=m(m({},t.props),t.state),f=(0,o.extractObject)(d,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),p=t.props.pauseOnHover;if(f=m(m({},f),{},{onMouseEnter:p?t.onTrackOver:null,onMouseLeave:p?t.onTrackLeave:null,onMouseOver:p?t.onTrackOver:null,focusOnSelect:t.props.focusOnSelect&&t.clickable?t.selectHandler:null}),!0===t.props.dots&&t.state.slideCount>=t.props.slidesToShow){var g=(0,o.extractObject)(d,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),y=t.props.pauseOnDotsHover;g=m(m({},g),{},{clickHandler:t.changeSlide,onMouseEnter:y?t.onDotsLeave:null,onMouseOver:y?t.onDotsOver:null,onMouseLeave:y?t.onDotsLeave:null}),e=n.default.createElement(u.Dots,g)}var v=(0,o.extractObject)(d,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);v.clickHandler=t.changeSlide,t.props.arrows&&(r=n.default.createElement(c.PrevArrow,v),i=n.default.createElement(c.NextArrow,v));var b=null;t.props.vertical&&(b={height:t.state.listHeight});var w=null;!1===t.props.vertical?!0===t.props.centerMode&&(w={padding:"0px "+t.props.centerPadding}):!0===t.props.centerMode&&(w={padding:t.props.centerPadding+" 0px"});var S=m(m({},b),w),E=t.props.touchMove,_={className:"slick-list",style:S,onClick:t.clickHandler,onMouseDown:E?t.swipeStart:null,onMouseMove:t.state.dragging&&E?t.swipeMove:null,onMouseUp:E?t.swipeEnd:null,onMouseLeave:t.state.dragging&&E?t.swipeEnd:null,onTouchStart:E?t.swipeStart:null,onTouchMove:t.state.dragging&&E?t.swipeMove:null,onTouchEnd:E?t.touchEnd:null,onTouchCancel:t.state.dragging&&E?t.swipeEnd:null,onKeyDown:t.props.accessibility?t.keyHandler:null},C={className:a,dir:"ltr",style:t.props.style};return t.props.unslick&&(_={className:"slick-list"},C={className:a,style:t.props.style}),n.default.createElement("div",C,t.props.unslick?"":r,n.default.createElement("div",h({ref:t.listRefHandler},_),n.default.createElement(l.Track,h({ref:t.trackRefHandler},f),t.props.children)),t.props.unslick?"":i,t.props.unslick?"":e)}),t.list=null,t.track=null,t.state=m(m({},i.default),{},{currentSlide:t.props.initialSlide,targetSlide:t.props.initialSlide?t.props.initialSlide:0,slideCount:n.default.Children.count(t.props.children)}),t.callbackTimers=[],t.clickable=!0,t.debouncedResize=null;var t,r=t.ssrInit();return t.state=m(m({},t.state),r),t}return r=[{key:"didPropsChange",value:function(e){for(var t=!1,r=0,i=Object.keys(this.props);r<i.length;r++){var a=i[r];if(!e.hasOwnProperty(a)||!("object"===p(e[a])||"function"==typeof e[a]||isNaN(e[a]))&&e[a]!==this.props[a]){t=!0;break}}return t||n.default.Children.count(this.props.children)!==n.default.Children.count(e.children)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}(g.prototype,r),Object.defineProperty(g,"prototype",{writable:!1}),g}(n.default.Component)},787:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return n}});let n=r(1705).unstable_rethrow;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},894:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4232))&&n.__esModule?n:{default:n};t.default={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return i.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return i.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,asNavFor:null,unslick:!1}},969:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(8955),i=r(8833);function a({config:e,src:t,width:r,quality:s}){let o=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),n=r.get("dpl");if(n){o=n,r.delete("dpl");let i=r.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
2Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,n.findClosestQuality)(s,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${l}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}a.__next_img_default=!0;let s=a},1123:(e,t,r)=>{"use strict";let n=r(9499);e.exports=c;let i=function(){function e(e){return void 0!==e&&e}try{if("u">typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function a(e,t){return"silent"===e?1/0:t.levels.values[e]}let s=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function u(e,t){let r={logger:t,parent:e[o]};t[o]=r}function c(e){var t,r,n;let o,h,g;(e=e||{}).browser=e.browser||{};let m=e.browser.transmit;if(m&&"function"!=typeof m.send)throw Error("pino: transmit option must have a send function");let w=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let S=e.serializers||{},E=(t=e.browser.serialize,Array.isArray(t)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(S)),_=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(_=!1);let C=Object.keys(e.customLevels||{}),O=["error","fatal","warn","info","debug","trace"].concat(C);"function"==typeof w&&O.forEach(function(e){w[e]=w}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let k=e.level||"info",I=Object.create(w);I.log||(I.log=y),o={},O.forEach(e=>{o[e]=w[e]?w[e]:i[e]||i[l[e]||"log"]||y}),I[s]=o,u({},I),Object.defineProperty(I,"levelVal",{get:function(){return a(this.level,this)}}),Object.defineProperty(I,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,A,I,"error"),d(this,A,I,"fatal"),d(this,A,I,"warn"),d(this,A,I,"info"),d(this,A,I,"debug"),d(this,A,I,"trace"),C.forEach(e=>{d(this,A,I,e)})}});let A={transmit:m,serialize:E,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,reportCaller:e.browser.reportCaller,levels:O,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?v:b,messageKey:e.messageKey||"msg",onChild:e.onChild||y};function T(t,r,n){if(!r)throw Error("missing bindings for child Pino");n=n||{},E&&r.serializers&&(n.serializers=r.serializers);let i=n.serializers;if(E&&i){var a=Object.assign({},S,i),s=!0===e.browser.serialize?Object.keys(a):E;delete r.serializers,f([r],s,a,this._stdErrSerialize)}function o(e){this._childLevel=(0|e._childLevel)+1,this.bindings=r,a&&(this.serializers=a,this._serialize=s),m&&(this._logEvent=p([].concat(e._logEvent.bindings,r)))}o.prototype=this;let l=new o(this);return u(this,l),l.child=function(...e){return T.call(this,t,...e)},l.level=n.level||this.level,t.onChild(l),l}return h=e.customLevels||{},I.levels={values:Object.assign({},c.levels.values,h),labels:Object.assign({},c.levels.labels,(g={},Object.keys(n=h).forEach(function(e){g[n[e]]=e}),g))},I.level=k,I.isLevelEnabled=function(e){return!!this.levels.values[e]&&this.levels.values[e]>=this.levels.values[this.level]},I.setMaxListeners=I.getMaxListeners=I.emit=I.addListener=I.on=I.prependListener=I.once=I.prependOnceListener=I.removeListener=I.removeAllListeners=I.listeners=I.listenerCount=I.eventNames=I.write=I.flush=y,I.serializers=S,I._serialize=E,I._stdErrSerialize=_,I.child=function(...e){return T.call(this,A,...e)},m&&(I._logEvent=p()),I}function d(e,t,r,l){var u,c,d,h,g,m,v;if(Object.defineProperty(e,l,{value:a(e.level,r)>a(l,r)?y:r[s][l],writable:!0,enumerable:!0,configurable:!0}),e[l]===y){if(!t.transmit)return;let n=a(t.transmit.level||e.level,r);if(a(l,r)<n)return}e[l]=(u=e,c=t,d=r,h=l,g=u[s][h],function(){let e=c.timestamp(),t=Array(arguments.length),r=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var s=0;s<t.length;s++)t[s]=arguments[s];var o=!1;if(c.serialize&&(f(t,this._serialize,this.serializers,this._stdErrSerialize),o=!0),c.asObject||c.formatters){let i=function(e,t,r,i,a){let{level:s,log:o=e=>e}=a.formatters||{},l=r.slice(),u=l[0],c={},d=(0|e._childLevel)+1;
2if(d<1&&(d=1),i&&(c.time=i),s?Object.assign(c,s(t,e.levels.values[t])):c.level=e.levels.values[t],a.asObjectBindingsOnly){if(null!==u&&"object"==typeof u)for(;d--&&"object"==typeof l[0];)Object.assign(c,l.shift());return[o(c),...l]}if(null!==u&&"object"==typeof u){for(;d--&&"object"==typeof l[0];)Object.assign(c,l.shift());u=l.length?n(l.shift(),l):void 0}else"string"==typeof u&&(u=n(l.shift(),l));return void 0!==u&&(c[a.messageKey]=u),[o(c)]}(this,h,t,e,c);if(c.reportCaller&&i&&i.length>0&&i[0]&&"object"==typeof i[0])try{let e=w();e&&(i[0].caller=e)}catch(e){}g.call(r,...i)}else{if(c.reportCaller)try{let e=w();e&&t.push(e)}catch(e){}g.apply(r,t)}if(c.transmit){let r=c.transmit.level||u._level,n=a(r,d),i=a(h,d);if(i<n)return;!function(e,t,r,n=!1){let i=t.send,a=t.ts,s=t.methodLevel,o=t.methodValue,l=t.val,u=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(e){return -1===u.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=o,i(s,e._logEvent,l),e._logEvent=p(u)}(this,{ts:e,methodLevel:h,methodValue:i,transmitLevel:r,transmitValue:d.levels.values[c.transmit.level||u._level],send:c.transmit.send,val:a(u._level,d)},t,o)}});let b=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[o];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==b.length&&(e[l]=(m=b,v=e[l],function(){return v.apply(this,[...m,...arguments])}))}function f(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=c.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i])&&t)for(let n in e[i])t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function p(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function g(){return{}}function m(e){return e}function y(){}function v(){return!1}function b(){return Date.now()}function w(){let e=Error().stack;if(!e)return null;let t=e.split("\n");for(let e=1;e<t.length;e++){let r=t[e].trim();if(/(^at\s+)?(createWrap|LOG|set\s*\(|asObject|Object\.apply|Function\.apply)/.test(r)||-1!==r.indexOf("browser.js")||-1!==r.indexOf("node:internal")||-1!==r.indexOf("node_modules"))continue;let n=r.match(/\((.*?):(\d+):(\d+)\)/);if(n||(n=r.match(/at\s+(.*?):(\d+):(\d+)/)),n)return n[1]+":"+n[2]+":"+n[3]}return null}c.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},c.stdSerializers={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:m,wrapResponseSerializer:m,wrapErrorSerializer:m,req:g,res:g,err:h,errWithCause:h},c.stdTimeFunctions=Object.assign({},{nullTime:v,epochTime:b,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=c,e.exports.pino=c},1187:e=>{"use strict";function t(){var e=Object.create(null),t=0,r=0,n=0,i=!1;function a(t){n--,delete e[t]}this.put=function(t,r,s,o){if(i&&console.log("caching: %s = %j (@%s)",t,r,s),void 0!==s&&("number"!=typeof s||isNaN(s)||s<=0))throw Error("Cache timeout must be a positive number");if(void 0!==o&&"function"!=typeof o)throw Error("Cache timeout callback must be a function");var l=e[t];l?clearTimeout(l.timeout):n++;var u={value:r,expire:s+Date.now()};return isNaN(u.expire)||(u.timeout=setTimeout((function(){a(t),o&&o(t,r)}).bind(this),s)),e[t]=u,r},this.del=function(t){var r=!0,n=e[t];return n?(clearTimeout(n.timeout),!isNaN(n.expire)&&n.expire<Date.now()&&(r=!1)):r=!1,r&&a(t),r},this.clear=function(){for(var a in e)clearTimeout(e[a].timeout);n=0,e=Object.create(null),i&&(t=0,r=0)},this.get=function(a){var s=e[a];if(void 0!==s)if(isNaN(s.expire)||s.expire>=Date.now())return i&&t++,s.value;else i&&r++,n--,delete e[a];else i&&r++;return null},this.size=function(){return n},this.memsize=function(){var t,r=0;for(t in e)r++;return r},this.debug=function(e){i=e},this.hits=function(){return t},this.misses=function(){return r},this.keys=function(){return Object.keys(e)},this.exportJson=function(){var t={};for(var r in e){var n=e[r];t[r]={value:n.value,expire:n.expire||"NaN"}}return JSON.stringify(t)},this.importJson=function(t,r){var n=JSON.parse(t),a=Date.now(),s=r&&r.skipDuplicates;for(var o in n)if(n.hasOwnProperty(o)){if(s&&e[o]){i&&console.log("Skipping duplicate imported key '%s'",o);continue}var l=n[o],u=l.expire-a;if(u<=0){this.del(o);continue}u=u>0?u:void 0,this.put(o,l.value,u)}return this.size()}}e.exports=new t,e.exports.Cache=t},1228:(e,t,r)=>{"use strict";r.d(t,{i:()=>s,k:()=>o});var n=r(7804),i=r(1282);let a=(e=n.Ty)=>(0,i.l)(e),s=(e=n.Ty)=>`${a(e)}
2/v1/content/api/graphql/v1`,o=(e,t,r=n.Ty)=>`${a(r)}/v1/forms/publisher/${t}?sitecoreContextId=${e}`},1376:(e,t,r)=>{"use strict";r.d(t,{D:()=>o});var n=r(4232),i=r(4825),a=r(6580),s=r(5333);let o=()=>{var e;let{page:{mode:t,layout:r},api:o}=(0,i.M5)(),{clientData:l,clientScripts:u}=r.sitecore.context;if(t.isNormal||t.isPreview)return n.createElement(n.Fragment,null);if(t.isDesignLibrary){let t=new Date,r=String(t.getUTCHours()).padStart(2,"0"),i=String(t.getUTCDate()).padStart(2,"0"),s=String(t.getUTCMonth()+1).padStart(2,"0"),l=String(t.getUTCFullYear()),u=`${r}-${i}-${s}-${l}`,c=`${(0,a.$O)(null==(e=null==o?void 0:o.edge)?void 0:e.edgeUrl)}?cb=${u}`;return n.createElement(n.Fragment,null,n.createElement("script",{src:c,suppressHydrationWarning:!0}))}let c=Object.assign(Object.assign({},l),(0,s.Z1)());return n.createElement(n.Fragment,null,null==u?void 0:u.map((e,t)=>n.createElement("script",{src:e,key:t})),Object.keys(c).map(e=>n.createElement("script",{key:e,id:e,type:"application/json",dangerouslySetInnerHTML:{__html:JSON.stringify(c[e])}})))}},1457:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.PrevArrow=t.NextArrow=void 0;var i=o(r(4232)),a=o(r(5039)),s=r(4523);function o(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=h(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function g(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function m(e,t){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=v();return function(){var r,i=b(e);return r=t?Reflect.construct(i,arguments,b(this).constructor):i.apply(this,arguments),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.PrevArrow=function(e){g(r,e);var t=y(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var r={key:"0","data-role":"none",className:(0,a.default)(e),style:{display:"block"},onClick:t},n={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?i.default.cloneElement(this.props.prevArrow,c(c({},r),n)):i.default.createElement("button",l({key:"0",type:"button"},r)," ","Previous")}}]),r}(i.default.PureComponent),t.NextArrow=function(e){g(r,e);var t=y(r);function r(){return d(this,r),t.apply(this,arguments)}return p(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,s.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var r={key:"1","data-role":"none",className:(0,a.default)(e),style:{display:"block"},onClick:t},n={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?i.default.cloneElement(this.props.nextArrow,c(c({},r),n)):i.default.createElement("button",l({key:"1",type:"button"},r)," ","Next")}}]),r}(i.default.PureComponent)},1576:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,a){var s=i.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},s.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},s.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var o=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var l=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=s.utcOffset;s.utcOffset=function(n,i){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],a=i[0],s=60*i[1]+ +i[2];return 0===s?0:"+"===a?s:-s}(n)))return this;var s=16>=Math.abs(n)?60*n:n;if(0===s)return this.utc(i);var o=this.clone();if(i)return o.$offset=s,o.$u=!1,o;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(s+l,e)).$offset=s,o.$x.$localOffset=l,o};var c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=s.diff;s.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),i=a(e).local();return f.call(n,i,t,r)}}}()},1645:(e,t,r)=>{"use strict";r.d(t,{G:()=>a,eq:()=>i});
2var n=r(6990);let i=n.ZS.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class a extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof a))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.ZS.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let r=n.path[0];t[r]=t[r]||[],t[r].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}a.create=e=>new a(e)},1705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return function e(t){if((0,i.isNextRouterError)(t)||(0,n.isBailoutToCSRError)(t))throw t;t instanceof Error&&"cause"in t&&e(t.cause)}}});let n=r(3870),i=r(1746);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1802:(e,t,r)=>{"use strict";let n;r.d(t,{bz:()=>ek,YO:()=>eA,zM:()=>eO,gM:()=>eR,k5:()=>eP,eu:()=>ej,fc:()=>eD,ai:()=>eC,Ik:()=>eT,g1:()=>eN,Yj:()=>e_,KC:()=>ex,L5:()=>eI});var i,a,s,o,l=r(1645),u=r(6990);let c=(e,t)=>{let r;switch(e.code){case l.eq.invalid_type:r=e.received===u.Zp.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case l.eq.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,u.ZS.jsonStringifyReplacer)}`;break;case l.eq.unrecognized_keys:r=`Unrecognized key(s) in object: ${u.ZS.joinValues(e.keys,", ")}`;break;case l.eq.invalid_union:r="Invalid input";break;case l.eq.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${u.ZS.joinValues(e.options)}`;break;case l.eq.invalid_enum_value:r=`Invalid enum value. Expected ${u.ZS.joinValues(e.options)}, received '${e.received}'`;break;case l.eq.invalid_arguments:r="Invalid function arguments";break;case l.eq.invalid_return_type:r="Invalid function return type";break;case l.eq.invalid_date:r="Invalid date";break;case l.eq.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:u.ZS.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case l.eq.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case l.eq.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case l.eq.custom:r="Invalid input";break;
2case l.eq.invalid_intersection_types:r="Intersection results could not be merged";break;case l.eq.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case l.eq.not_finite:r="Number must be finite";break;default:r=t.defaultError,u.ZS.assertNever(e)}return{message:r}};(i=s||(s={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},i.toString=e=>"string"==typeof e?e:e?.message;let d=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function f(e,t){let r=d({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,c,void 0].filter(e=>!!e)});e.common.issues.push(r)}class p{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return h;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return p.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return h;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let h=Object.freeze({status:"aborted"}),g=e=>({status:"dirty",value:e}),m=e=>({status:"valid",value:e}),y=e=>"u">typeof Promise&&e instanceof Promise;class v{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let b=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new l.G(e.common.issues);return this._error=t,this._error}}};function w(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class S{get description(){return this._def.description}_getType(e){return(0,u.CR)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,u.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p,ctx:{common:e.parent.common,data:e.data,parsedType:(0,u.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(y(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.CR)(e)},n=this._parseSync({data:e,path:r.path,parent:r});return b(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.CR)(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,u.CR
vendor: 9,778 bytes, line 2
2)(e)},n=this._parse({data:e,path:r.path,parent:r});return b(r,await (y(n)?n:Promise.resolve(n)))}refine(e,t){return this._refinement((r,n)=>{let i=e(r),a=()=>n.addIssue({code:l.eq.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"u">typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eh({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eg.create(this,this._def)}nullable(){return em.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Z.create(this)}promise(){return ep.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return er.create(this,e,this._def)}transform(e){return new eh({...w(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ey({...w(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new ew({typeName:o.ZodBranded,type:this,...w(this._def)})}catch(e){return new ev({...w(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eS.create(this,e)}readonly(){return eE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let E=/^c[^\s-]{8,}$/i,_=/^[0-9a-z]+$/,C=/^[0-9A-HJKMNP-TV-Z]{26}$/i,O=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,k=/^[a-z0-9_-]{21}$/i,I=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,A=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,T=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,R=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,N=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,j=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,P=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,M="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L=RegExp(`^${M}$`);function F(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class q extends S{_parse(e){var t,r,i,a;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.Zp.string){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.string,received:t.parsedType}),h}let o=new p;for(let c of this._def.checks)if("min"===c.kind)e.data.length<c.value&&(f(s=this._getOrReturnCtx(e,s),{code:l.eq.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),o.dirty());else if("max"===c.kind)e.data.length>c.value&&(f(s=this._getOrReturnCtx(e,s),{code:l.eq.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),o.dirty());else if("length"===c.kind){let t=e.data.length>c.value,r=e.data.length<c.value;(t||r)&&(s=this._getOrReturnCtx(e,s),t?f(s,{code:l.eq.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):r&&f(s,{code:l.eq.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),o.dirty())}else if("email"===c.kind)T.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"email",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("emoji"===c.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("uuid"===c.kind)O.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("nanoid"===c.kind)k.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("cuid"===c.kind)E.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("cuid2"===c.kind)_.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("ulid"===c.kind)C.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:l.eq.invalid_string,message:c.message}),o.dirty());else if("url"===c.kind)try{new URL(e.data)}catch{f(s=this._getOrReturnCtx(e,s),{validation:"url",code:l.eq.invalid_string,message:c.message}),o.dirty()}else"regex"===c.kind?(c.regex.lastIndex=0,c.regex.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"regex",code:l.eq.invalid_string,message:c.message}),o.dirty())):"trim"===c.kind?e.data=e.data.trim():"includes"===c.kind?e.data.includes(c.value,c.position)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),o.dirty()):"toLowerCase"===c.kind?e.data=e.data.toLowerCase():"toUpperCase"===c.kind?e.data=e.data.toUpperCase():"startsWith"===c.kind?e.data.startsWith(c.value)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:{startsWith:c.value},message:c.message}),o.dirty()):"endsWith"===c.kind?e.data.endsWith(c.value)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:{endsWith:c.value},message:c.message}),o.dirty()):"datetime"===c.kind?(function(e){let t=`${M}T${F(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(c).test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:"datetime",message:c.message}),o.dirty()):"date"===c.kind?L.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:"date",message:c.message}),o.dirty()):"time"===c.kind?RegExp(`^${F(c)}$`).test(e.data)||(f(s=this._getOrReturnCtx(e,s),{code:l.eq.invalid_string,validation:"time",message:c.message}),o.dirty()):"duration"===c.kind?A.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"duration",code:l.eq.invalid_string,message:c.message}),o.dirty()):"ip"===c.kind?(t=e.data,!(("v4"===(r=c.version)||!r)&&x.test(t)||("v6"===r||!r)&&N.test(t))&&1&&(f(s=this._getOrReturnCtx(e,s),{validation:"ip",code:l.eq.invalid_string,message:c.message}),o.dirty())):"jwt"===c.kind?!function(e,t){if(!I.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,c.alg)&&(f(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:l.eq.invali
2d_string,message:c.message}),o.dirty()):"cidr"===c.kind?(i=e.data,!(("v4"===(a=c.version)||!a)&&R.test(i)||("v6"===a||!a)&&j.test(i))&&1&&(f(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:l.eq.invalid_string,message:c.message}),o.dirty())):"base64"===c.kind?P.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"base64",code:l.eq.invalid_string,message:c.message}),o.dirty()):"base64url"===c.kind?D.test(e.data)||(f(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:l.eq.invalid_string,message:c.message}),o.dirty()):u.ZS.assertNever(c);return{status:o.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:l.eq.invalid_string,...s.errToObj(r)})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...s.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...s.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...s.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...s.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...s.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...s.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...s.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...s.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...s.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...s.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...s.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...s.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errToObj(t)})}nonempty(e){return this.min(1,s.errToObj(e))}trim(){return new q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}q.create=e=>new q({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...w(e)});class U extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.Zp.number){let t=this._getOrReturnCtx(e);
vendor: 4,116 bytes, line 2
2return f(t,{code:l.eq.invalid_type,expected:u.Zp.number,received:t.parsedType}),h}let r=new p;for(let n of this._def.checks)"int"===n.kind?u.ZS.isInteger(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:l.eq.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(f(t=this._getOrReturnCtx(e,t),{code:l.eq.not_finite,message:n.message}),r.dirty()):u.ZS.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.toString(t))}setLimit(e,t,r,n){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(n)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&u.ZS.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}U.create=e=>new U({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...w(e)});class $ extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.Zp.bigint)return this._getInvalidInput(e);let r=new p;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):u.ZS.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);
2return f(t,{code:l.eq.invalid_type,expected:u.Zp.bigint,received:t.parsedType}),h}gte(e,t){return this.setLimit("min",e,!0,s.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.toString(t))}setLimit(e,t,r,n){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.toString(n)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}$.create=e=>new $({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...w(e)});class V extends S{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.Zp.boolean){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.boolean,received:t.parsedType}),h}return m(e.data)}}V.create=e=>new V({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...w(e)});class z extends S{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.Zp.date){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.date,received:t.parsedType}),h}if(Number.isNaN(e.data.getTime()))return f(this._getOrReturnCtx(e),{code:l.eq.invalid_date}),h;let r=new p;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(f(t=this._getOrReturnCtx(e,t),{code:l.eq.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):u.ZS.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}z.create=e=>new z({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...w(e)});class B extends S{_parse(e){if(this._getType(e)!==u.Zp.symbol){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.symbol,received:t.parsedType}),h}return m(e.data)}}B.create=e=>new B({typeName:o.ZodSymbol,...w(e)});class G extends S{_parse(e){if(this._getType(e)!==u.Zp.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.undefined,received:t.parsedType}),h}return m(e.data)}}G.create=e=>new G({typeName:o.ZodUndefined,...w(e)});class H extends S{_parse(e){if(this._getType(e)!==u.Zp.null){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.null,received:t.parsedType}),h}return m(e.data)}}H.create=e=>new H({typeName:o.ZodNull,...w(e)});class Q extends S{constructor(){super(...arguments),this._any=!0}_parse(e){return m(e.data)}}Q.create=e=>new Q({typeName:o.ZodAny,...w(e)});class Y extends S{constructor(){super(...arguments),this._unknown=!0}_parse(e){return m(e.data)}}Y.create=e=>new Y({typeName:o.ZodUnknown,...w(e)});class W extends S{_parse(e){let t=this._getOrReturnCtx(e);
2return f(t,{code:l.eq.invalid_type,expected:u.Zp.never,received:t.parsedType}),h}}W.create=e=>new W({typeName:o.ZodNever,...w(e)});class K extends S{_parse(e){if(this._getType(e)!==u.Zp.undefined){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.void,received:t.parsedType}),h}return m(e.data)}}K.create=e=>new K({typeName:o.ZodVoid,...w(e)});class Z extends S{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.Zp.array)return f(t,{code:l.eq.invalid_type,expected:u.Zp.array,received:t.parsedType}),h;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(f(t,{code:e?l.eq.too_big:l.eq.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(f(t,{code:l.eq.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(f(t,{code:l.eq.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new v(t,e,t.path,r)))).then(e=>p.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new v(t,e,t.path,r)));return p.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new Z({...this._def,minLength:{value:e,message:s.toString(t)}})}max(e,t){return new Z({...this._def,maxLength:{value:e,message:s.toString(t)}})}length(e,t){return new Z({...this._def,exactLength:{value:e,message:s.toString(t)}})}nonempty(e){return this.min(1,e)}}Z.create=(e,t)=>new Z({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...w(t)});class J extends S{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=u.ZS.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.Zp.object){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.object,received:t.parsedType}),h}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=n[e],i=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new v(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof W){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(f(r,{code:l.eq.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new v(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>p.mergeObjectSync(t,e)):p.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return s.errToObj,new J({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:s.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(e){return new J({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new J({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}
2catchall(e){return new J({...this._def,catchall:e})}pick(e){let t={};for(let r of u.ZS.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new J({...this._def,shape:()=>t})}omit(e){let t={};for(let r of u.ZS.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new J({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof J){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=eg.create(e(i))}return new J({...t._def,shape:()=>r})}if(t instanceof Z)return new Z({...t._def,type:e(t.element)});if(t instanceof eg)return eg.create(e(t.unwrap()));if(t instanceof em)return em.create(e(t.unwrap()));if(t instanceof en)return en.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of u.ZS.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new J({...this._def,shape:()=>t})}required(e){let t={};for(let r of u.ZS.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eg;)e=e._def.innerType;t[r]=e}return new J({...this._def,shape:()=>t})}keyof(){return ec(u.ZS.objectKeys(this.shape))}}J.create=(e,t)=>new J({shape:()=>e,unknownKeys:"strip",catchall:W.create(),typeName:o.ZodObject,...w(t)}),J.strictCreate=(e,t)=>new J({shape:()=>e,unknownKeys:"strict",catchall:W.create(),typeName:o.ZodObject,...w(t)}),J.lazycreate=(e,t)=>new J({shape:e,unknownKeys:"strip",catchall:W.create(),typeName:o.ZodObject,...w(t)});class X extends S{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new l.G(e.ctx.common.issues));return f(t,{code:l.eq.invalid_union,unionErrors:r}),h});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new l.G(e));return f(t,{code:l.eq.invalid_union,unionErrors:i}),h}}get options(){return this._def.options}}X.create=(e,t)=>new X({options:e,typeName:o.ZodUnion,...w(t)});let ee=e=>{if(e instanceof el)return ee(e.schema);if(e instanceof eh)return ee(e.innerType());if(e instanceof eu)return[e.value];if(e instanceof ed)return e.options;if(e instanceof ef)return u.ZS.objectValues(e.enum);else if(e instanceof ey)return ee(e._def.innerType);else if(e instanceof G)return[void 0];else if(e instanceof H)return[null];else if(e instanceof eg)return[void 0,...ee(e.unwrap())];else if(e instanceof em)return[null,...ee(e.unwrap())];else if(e instanceof ew)return ee(e.unwrap());else if(e instanceof eE)return ee(e.unwrap());else if(e instanceof ev)return ee(e._def.innerType);else return[]};class et extends S{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.Zp.object)return f(t,{code:l.eq.invalid_type,expected:u.Zp.object,received:t.parsedType}),h;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(f(t,{code:l.eq.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),h)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=ee(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new et({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...w(r)})}}class er extends S{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if("aborted"===e.status||"aborted"===n.status)return h;let i=function e(t,r){let n=(0,u.CR)(t),i=(0,u.CR)(r);if(t===r)return{valid:!0,data:t};if(n===u.Zp.object&&i===u.Zp.object){let n=u.ZS.objectKeys(r),i=u.ZS.objectKeys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===u.Zp.array&&i===u.Zp.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);
2if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}if(n===u.Zp.date&&i===u.Zp.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return i.valid?(("dirty"===e.status||"dirty"===n.status)&&t.dirty(),{status:t.value,value:i.data}):(f(r,{code:l.eq.invalid_intersection_types}),h)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}er.create=(e,t,r)=>new er({left:e,right:t,typeName:o.ZodIntersection,...w(r)});class en extends S{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.Zp.array)return f(r,{code:l.eq.invalid_type,expected:u.Zp.array,received:r.parsedType}),h;if(r.data.length<this._def.items.length)return f(r,{code:l.eq.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h;!this._def.rest&&r.data.length>this._def.items.length&&(f(r,{code:l.eq.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new v(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>p.mergeArray(t,e)):p.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new en({...this._def,rest:e})}}en.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new en({items:e,typeName:o.ZodTuple,rest:null,...w(t)})};class ei extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.Zp.object)return f(r,{code:l.eq.invalid_type,expected:u.Zp.object,received:r.parsedType}),h;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new v(r,e,r.path,e)),value:a._parse(new v(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?p.mergeObjectAsync(t,n):p.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ei(t instanceof S?{keyType:e,valueType:t,typeName:o.ZodRecord,...w(r)}:{keyType:q.create(),valueType:e,typeName:o.ZodRecord,...w(t)})}}class ea extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.Zp.map)return f(r,{code:l.eq.invalid_type,expected:u.Zp.map,received:r.parsedType}),h;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new v(r,e,r.path,[a,"key"])),value:i._parse(new v(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return h;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return h;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}ea.create=(e,t,r)=>new ea({valueType:t,keyType:e,typeName:o.ZodMap,...w(r)});class es extends S{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.Zp.set)return f(r,{code:l.eq.invalid_type,expected:u.Zp.set,received:r.parsedType}),h;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(f(r,{code:l.eq.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(f(r,{code:l.eq.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return h;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>i._parse(new v(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new es({...this._def,minSize:{value:e,message:s.toString(t)}})}max(e,t){return new es({...this._def,maxSize:{value:e,message:s.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}es.create=(e,t)=>
2new es({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...w(t)});class eo extends S{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.Zp.function)return f(t,{code:l.eq.invalid_type,expected:u.Zp.function,received:t.parsedType}),h;function r(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c,c].filter(e=>!!e),issueData:{code:l.eq.invalid_arguments,argumentsError:r}})}function n(e,r){return d({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,c,c].filter(e=>!!e),issueData:{code:l.eq.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ep){let e=this;return m(async function(...t){let s=new l.G([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(r(t,e)),s}),u=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw s.addIssue(n(u,e)),s})})}{let e=this;return m(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new l.G([r(t,s.error)]);let o=Reflect.apply(a,this,s.data),u=e._def.returns.safeParse(o,i);if(!u.success)throw new l.G([n(o,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eo({...this._def,args:en.create(e).rest(Y.create())})}returns(e){return new eo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eo({args:e||en.create([]).rest(Y.create()),returns:t||Y.create(),typeName:o.ZodFunction,...w(r)})}}class el extends S{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}el.create=(e,t)=>new el({getter:e,typeName:o.ZodLazy,...w(t)});class eu extends S{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return f(t,{received:t.data,code:l.eq.invalid_literal,expected:this._def.value}),h}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ec(e,t){return new ed({values:e,typeName:o.ZodEnum,...w(t)})}eu.create=(e,t)=>new eu({value:e,typeName:o.ZodLiteral,...w(t)});class ed extends S{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return f(t,{expected:u.ZS.joinValues(r),received:t.parsedType,code:l.eq.invalid_type}),h}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return f(t,{received:t.data,code:l.eq.invalid_enum_value,options:r}),h}return m(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ed.create(e,{...this._def,...t})}exclude(e,t=this._def){return ed.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ed.create=ec;class ef extends S{_parse(e){let t=u.ZS.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.Zp.string&&r.parsedType!==u.Zp.number){let e=u.ZS.objectValues(t);return f(r,{expected:u.ZS.joinValues(e),received:r.parsedType,code:l.eq.invalid_type}),h}if(this._cache||(this._cache=new Set(u.ZS.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=u.ZS.objectValues(t);return f(r,{received:r.data,code:l.eq.invalid_enum_value,options:e}),h}return m(e.data)}get enum(){return this._def.values}}ef.create=(e,t)=>new ef({values:e,typeName:o.ZodNativeEnum,...w(t)});class ep extends S{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==u.Zp.promise&&!1===t.common.async?(f(t,{code:l.eq.invalid_type,expected:u.Zp.promise,received:t.parsedType}),h):m((t.parsedType===u.Zp.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ep.create=(e,t)=>
2new ep({type:e,typeName:o.ZodPromise,...w(t)});class eh extends S{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{f(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){let e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return h;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?h:"dirty"===n.status||"dirty"===t.value?g(n.value):n});{if("aborted"===t.value)return h;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?h:"dirty"===n.status||"dirty"===t.value?g(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?h:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?h:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?h:Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return h;let a=n.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}u.ZS.assertNever(n)}}eh.create=(e,t,r)=>new eh({schema:e,typeName:o.ZodEffects,effect:t,...w(r)}),eh.createWithPreprocess=(e,t,r)=>new eh({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...w(r)});class eg extends S{_parse(e){return this._getType(e)===u.Zp.undefined?m(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eg.create=(e,t)=>new eg({innerType:e,typeName:o.ZodOptional,...w(t)});class em extends S{_parse(e){return this._getType(e)===u.Zp.null?m(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}em.create=(e,t)=>new em({innerType:e,typeName:o.ZodNullable,...w(t)});class ey extends S{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===u.Zp.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ey.create=(e,t)=>new ey({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...w(t)});class ev extends S{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return y(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new l.G(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new l.G(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...w(t)});class eb extends S{_parse(e){if(this._getType(e)!==u.Zp.nan){let t=this._getOrReturnCtx(e);return f(t,{code:l.eq.invalid_type,expected:u.Zp.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}eb.create=e=>new eb({typeName:o.ZodNaN,...w(e)}),Symbol("zod_brand");class ew extends S{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eS extends S{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),g(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eS({in:e,out:t,typeName:o.ZodPipeline})}}class eE extends S{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return y(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eE.create=(e,t)=>
2new eE({innerType:e,typeName:o.ZodReadonly,...w(t)}),J.lazycreate,(a=o||(o={})).ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly";let e_=q.create,eC=U.create;eb.create,$.create;let eO=V.create;z.create,B.create,G.create,H.create;let ek=Q.create,eI=Y.create;W.create,K.create;let eA=Z.create,eT=J.create;J.strictCreate;let ex=X.create,eR=et.create;er.create,en.create;let eN=ei.create;ea.create,es.create,eo.create,el.create;let ej=eu.create,eP=ed.create,eD=ef.create;ep.create,eh.create,eg.create,em.create,eh.createWithPreprocess,eS.create},1843:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var i=o(r(4232)),a=o(r(5039)),s=r(4523);function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){return e.infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1};t.Dots=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");h.prototype=Object.create(e&&e.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),e&&c(h,e);var t,r,o=(t=d(),function(){var e,r=f(h);return e=t?Reflect.construct(r,arguments,f(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,e)});function h(){if(!(this instanceof h))throw TypeError("Cannot call a class as a function");return o.apply(this,arguments)}return r=[{key:"clickHandler",value:function(e,t){t.preventDefault(),this.props.clickHandler(e)}},{key:"render",value:function(){for(var e=this.props,t=e.onMouseEnter,r=e.onMouseOver,n=e.onMouseLeave,o=e.infinite,c=e.slidesToScroll,d=e.slidesToShow,f=e.slideCount,h=e.currentSlide,g=p({slideCount:f,slidesToScroll:c,slidesToShow:d,infinite:o}),m=[],y=0;y<g;y++){var v=(y+1)*c-1,b=o?v:(0,s.clamp)(v,0,f-1),w=b-(c-1),S=o?w:(0,s.clamp)(w,0,f-1),E=(0,a.default)({"slick-active":o?h>=S&&h<=b:h===S}),_={message:"dots",index:y,slidesToScroll:c,currentSlide:h},C=this.clickHandler.bind(this,_);m=m.concat(i.default.createElement("li",{key:y,className:E},i.default.cloneElement(this.props.customPaging(y),{onClick:C})))}return i.default.cloneElement(this.props.appendDots(m),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?l(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=u(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({className:this.props.dotsClass},{onMouseEnter:t,onMouseOver:r,onMouseLeave:n}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}(h.prototype,r),Object.defineProperty(h,"prototype",{writable:!1}),h}(i.default.PureComponent)},1958:(e,t,r)=>{"use strict";r.d(t,{O:()=>C});var n=r(4232),i=r(5333),a=r(9863);let s="Default";var o=r(3813),l=r(3802);let u={backgroundSize:"3px 3px",display:"flex",justifyContent:"center",alignItems:"center",padding:"30px",color:"#aaa"},c={backgroundImage:"linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%)"},d=()=>{let e=Object.assign(Object.assign({},u),c);return n.createElement("div",{style:e},"The component is hidden")},f="BYOCWrapper";var p=r(2914),h=r(3041);let g=(e,t,r)=>{let n,i=t.slice();return((null==e?void 0:e.placeholders)&&Object.entries(e.placeholders).forEach(([t,n])=>{let a=(0,o.Np)(t)?(0,o.jz)(t):null;a&&a.test(i)&&(r?i=t:(e.placeholders[i]=n,delete e.placeholders[t]))}),n=e&&e.placeholders&&Object.keys(e.placeholders).length>0?e.placeholders[i]:null)?n:(console.warn(`Placeholder '${i}' was not found in the current rendering data`,JSON.stringify(e,null,2)),[])};function m(e,t){return{fields:Object.assign(Object.assign({},e.fields||{}),t.fields||{}),params:Object.assign(Object.assign({},Object.assign(Object.assign({},e.params||{}),t.params||{})),(e=>{if(!e.params)return{styles:""};let{GridParameters:t,Styles:r}=e.params;return(t||r)&&{styles:`${t||""} ${r||""}`}})(t)),rendering:t}}let y=(e,t,r,i,o)=>{var u,c;let g=r=>{console.error(`Placeholder ${t} contains unknown component ${e.componentName}${r?` (${r})`:""}. Ensure that a React component exists for it, and that it is registered in your component-map file.`)};if(e.componentName===l.Y)return{component:null!=i?i:d,isEmpty:!0,componentType:"universal"};
2if(!e.componentName)return{component:()=>n.createElement(n.Fragment,null),isEmpty:!0,componentType:"universal"};let m=null;if(r&&0!==r.size?m=r.get(e.componentName):console.warn(`No components were available in component map to service request for component ${e}`),!m){if("FEaaSComponent"===e.componentName)return{component:p.a,isEmpty:!1,componentType:"universal"};if("FEaaSWrapper"===e.componentName)return{component:p.M,isEmpty:!1,componentType:"universal"};if("BYOCComponent"===e.componentName)return{component:h.Xf,isEmpty:!1,componentType:"universal"};else if(e.componentName===f)return{component:h.dW,dynamic:!0,componentType:"universal",isEmpty:!1};return g(),{component:null!=o?o:a.K,isEmpty:!0,componentType:"universal"}}let y=null==(u=e.params)?void 0:u.FieldNames,v=y&&y!==s?m[y]:m.default||m.Default||m;if(!v)return g(y!==s?y:void 0),{component:null!=o?o:a.K,isEmpty:!0,componentType:"universal"};let b=!!(null==(c=v.render)?void 0:c.preload)||e.componentName===f;return{component:v,dynamic:b,componentType:m.componentType,isEmpty:!1}};var v=r(4825),b=r(9764),w=r(9514);let S=e=>{let t=e.rendering,r=e.page.mode.isEditing,i=g(t,e.name,r),a=!i.length,s=E(e,i);if(a){let t,i=s;return e.renderEmpty&&(i=e.renderEmpty(s)),r?(t=i,n.createElement("div",{className:"sc-jss-empty-placeholder"},t)):i}return e.render?e.render(s,i,e):s},E=(e,t)=>{let{name:r,rendering:i,passThroughComponentProps:a,missingComponentComponent:s,hiddenRenderingComponent:o,errorComponent:l,componentLoadingMessage:u,renderEach:c,modifyComponentProps:d,componentMap:f,page:p}=e,h=p.mode.isEditing,g=t.map((t,i)=>{let{component:g,isEmpty:v,componentType:S,dynamic:E}=y(t,r,f,o,s),_=t.uid||`component-${i}`,C=d?d(m(e,t)):m(e,t),O=n.createElement(g,Object.assign({key:_},C,a,{page:p,componentMap:f}));if(c&&(O=c(O,i)),!v){let t=O.type+"-"+i;O=n.createElement(b.h,{"data-testid":"error-boundary",key:t,errorComponent:l,componentLoadingMessage:u,isDynamic:E,disableSuspense:e.disableSuspense,rendering:O.props.rendering},O)}return h?n.createElement(w.f,{key:_,rendering:t,componentRuntime:"client"},O):O}).filter(e=>e);return h?[n.createElement(w.f,{key:i.uid,placeholderName:r,rendering:i},g)]:g},_=e=>n.createElement(b.h,{errorComponent:e.errorComponent},n.createElement(S,Object.assign({},e))),C=e=>{let{page:t,componentMap:r}=(0,v.M5)(),a=!g(e.rendering,e.name,t.mode.isEditing).length;(0,n.useEffect)(()=>{a&&i.qH.isActive()&&i.qH.resetChromes()},[]);let s=Object.assign(Object.assign({},e),{page:t,componentMap:r});return n.createElement(_,Object.assign({},s))}},1977:()=>{},2078:(e,t,r)=>{"use strict";e.exports=r(7829).style},2095:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unauthorized",{enumerable:!0,get:function(){return n}}),r(4494).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2351:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=function(){if("u">typeof Map)return Map;function e(e,t){var r=-1;return e.some(function(e,n){return e[0]===t&&(r=n,!0)}),r}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];e.call(t,i[1],i[0])}},t}(),i="u">typeof window&&"u">typeof document&&window.document===document,a=void 0!==r.g&&r.g.Math===Math?r.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(a):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},o=["top","right","bottom","left","width","height","size","weight"],l="u">typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,r=!1,n=0;function i(){t&&(t=!1,e()),r&&o()}function a(){s(i)}function o(){var e=Date.now();if(t){if(e-n<2)return;r=!0}else t=!0,r=!1,setTimeout(a,20);n=e}return o}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;o.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=ne
2w e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||a},f=m(0,0,0,0);function p(e){return parseFloat(e)||0}function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){return t+p(e["border-"+r+"-width"])},0)}var g="u">typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function m(e,t,r,n){return{x:e,y:t,width:r,height:n}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!i)return f;if(g(e)){var t;return m(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,r=e.clientWidth,n=e.clientHeight;if(!r&&!n)return f;var i=d(e).getComputedStyle(e),a=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var i=n[r],a=e["padding-"+i];t[i]=p(a)}return t}(i),s=a.left+a.right,o=a.top+a.bottom,l=p(i.width),u=p(i.height);if("border-box"===i.boxSizing&&(Math.round(l+s)!==r&&(l-=h(i,"left","right")+s),Math.round(u+o)!==n&&(u-=h(i,"top","bottom")+o)),(t=e)!==d(t).document.documentElement){var c=Math.round(l+s)-r,g=Math.round(u+o)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(g)&&(u-=g)}return m(a.left,a.top,l,u)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),v=function(e,t){var r,n,i,a,s,o=(r=t.x,n=t.y,i=t.width,a=t.height,c(s=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:r,y:n,width:i,height:a,top:n,right:r+i,bottom:a+n,left:r}),s);c(this,{target:e,contentRect:o})},b=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new v(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="u">typeof WeakMap?new WeakMap:new n,S=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var r=new b(t,u.getInstance(),this);w.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){S.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}});let E=void 0!==a.ResizeObserver?a.ResizeObserver:S},2479:(e,t,r)=>{"use strict";r.d(t,{E8:()=>u,F3:()=>a,Hg:()=>o,SH:()=>l,XG:()=>s});let n="_default",i="_variantId_";function a(e,t){let r=e.endsWith("/")?e.slice(0,-1):e;return`${r}${t.map(e=>`/${i}${e}`).join("")}`}function s(e){let t=e.split("/"),r=[];
2return t.forEach(e=>{let t=e.match(`${i}(.*$)`);t&&r.push(t[1])}),o(r)}function o(e){let t={variantId:n,componentVariantIds:[]};return e.forEach(e=>{var r;e.includes("_")?null==(r=t.componentVariantIds)||r.push(e):t.variantId=e}),t}function l(e){if(!e.includes(i))return e;let t=e.split("/");return(t=t.filter(e=>!e.includes(i))).join("/")||"/"}class u{static getPageVariantId(e,t,r,i){let a=e.replace(/[{}-]/g,""),s=t.replace("-","_"),o=i?`${this.normalizeScope(i)}_`:"",l=r;return r&&r!==n||(l="default"),`${o}${a}_${s}_${l}`.toLowerCase()}static getPageFriendlyId(e,t,r){let n=e.replace(/[{}-]/g,""),i=t.replace("-","_"),a=r?`${this.normalizeScope(r)}_`:"";return`embedded_${a}${n}_${i}`.toLowerCase()}static getComponentFriendlyId(e,t,r,n){let i=e.replace(/[{}-]/g,""),a=t.replace(/[{}-]/g,""),s=r.replace("-","_"),o=n?`${this.normalizeScope(n)}_`:"";return`component_${o}${i}_${a}_${s}*`.toLowerCase()}static normalizeScope(e){return(null==e?void 0:e.replace(/[^a-zA-Z0-9]+/g,""))||""}}},2542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(r(4232)),i=r(749),a=l(r(397)),s=l(r(959)),o=r(4523);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){y(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");d.prototype=Object.create(e&&e.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),e&&p(d,e);var t,r,l=(t=g(),function(){var e,r=m(d);return e=t?Reflect.construct(r,arguments,m(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return h(e)}(this,e)});function d(e){var t;if(!(this instanceof d))throw TypeError("Cannot call a class as a function");return y(h(t=l.call(this,e)),"innerSliderRefHandler",function(e){return t.innerSlider=e}),y(h(t),"slickPrev",function(){return t.innerSlider.slickPrev()}),y(h(t),"slickNext",function(){return t.innerSlider.slickNext()}),y(h(t),"slickGoTo",function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.innerSlider.slickGoTo(e,r)}),y(h(t),"slickPause",function(){return t.innerSlider.pause("paused")}),y(h(t),"slickPlay",function(){return t.innerSlider.autoPlay("play")}),t.state={breakpoint:null},t._responsiveMediaHandlers=[],t}return r=[{key:"media",value:function(e,t){var r=window.matchMedia(e),n=function(e){e.matches&&t()};r.addListener(n),this._responsiveMediaHandlers.push({mql:r,query:e,listener:n})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map(function(e){return e.breakpoint});t.sort(function(e,t){return e-t}),t.forEach(function(r,n){var i;i=0===n?(0,a.default)({minWidth:0,maxWidth:r}):(0,a.default)({minWidth:t[n-1]+1,maxWidth:r}),(0,o.canUseDOM)()&&e.media(i,function(){e.setState({breakpoint:r})})});var r=(0,a.default)({minWidth:t.slice(-1)[0]});(0,o.canUseDOM)()&&this.media(r,function(){e.setState({breakpoint:null})})}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEac
2h(function(e){e.mql.removeListener(e.listener)})}},{key:"render",value:function(){var e,t,r=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter(function(e){return e.breakpoint===r.state.breakpoint}))[0].settings?"unslick":f(f(f({},s.default),this.props),t[0].settings):f(f({},s.default),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var a=n.default.Children.toArray(this.props.children);a=a.filter(function(e){return"string"==typeof e?!!e.trim():!!e}),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var l=[],u=null,d=0;d<a.length;d+=e.rows*e.slidesPerRow){for(var p=[],h=d;h<d+e.rows*e.slidesPerRow;h+=e.slidesPerRow){for(var g=[],m=h;m<h+e.slidesPerRow&&(e.variableWidth&&a[m].props.style&&(u=a[m].props.style.width),!(m>=a.length));m+=1)g.push(n.default.cloneElement(a[m],{key:100*d+10*h+m,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));p.push(n.default.createElement("div",{key:10*d+h},g))}e.variableWidth?l.push(n.default.createElement("div",{key:d,style:{width:u}},p)):l.push(n.default.createElement("div",{key:d},p))}if("unslick"===e){var y="regular slider "+(this.props.className||"");return n.default.createElement("div",{className:y},a)}return l.length<=e.slidesToShow&&(e.unslick=!0),n.default.createElement(i.InnerSlider,c({style:this.props.style,ref:this.innerSliderRefHandler},(0,o.filterSettings)(e)),l)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}(d.prototype,r),Object.defineProperty(d,"prototype",{writable:!1}),d}(n.default.Component)},2544:(e,t,r)=>{"use strict";var n=r(7711),i=r(9794),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(a,"")}var f=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function h(e){var t,n=("u">typeof window?window:void 0!==r.g?r.g:"u">typeof self?self:{}).location||{},i={},a=typeof(e=e||n);if("blob:"===e.protocol)i=new y(unescape(e.pathname),{});else if("string"===a)for(t in i=new y(e,{}),p)delete i[t];else if("object"===a){for(t in e)t in p||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=o.test(e.href))}return i}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=d(e)).replace(s,""),t=t||{};var r,n=u.exec(e),i=n[1]?n[1].toLowerCase():"",a=!!n[2],o=!!n[3],l=0;return a?o?(r=n[2]+n[3]+n[4],l=n[2].length+n[3].length):(r=n[2]+n[4],l=n[2].length):o?(r=n[3]+n[4],l=n[3].length):r=n[4],"file:"===i?l>=2&&(r=r.slice(2)):g(i)?r=n[4]:i?a&&(r=r.slice(2)):l>=2&&g(t.protocol)&&(r=n[4]),{protocol:i,slashes:a||g(i),slashesCount:l,rest:r}}function y(e,t,r){if(e=(e=d(e)).replace(s,""),!(this instanceof y))return new y(e,t,r);var a,o,l,u,p,v,b=f.slice(),w=typeof t,S=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=i.parse),a=!(o=m(e||"",t=h(t))).protocol&&!o.slashes,this.slashes=o.slashes||a&&t.slashes,this.protocol=o.protocol||t.protocol||"",e=o.rest,("file:"===o.protocol&&(2!==o.slashesCount||c.test(e))||!o.slashes&&(o.protocol||o.slashesCount<2||!g(this.protocol)))&&(b[3]=[/(.*)/,"pathname"]);S<b.length;S++){if("function"==typeof(u=b[S])){e=u(e,this);continue}l=u[0],v=u[1],l!=l?this[v]=e:"string"==typeof l?~(p="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof u[2]?(this[v]=e.slice(0,p),e=e.slice(p+u[2])):(this[v]=e.slice(p),e=e.slice(0,p))):(p=l.exec(e))&&(this[v]=p[1],e=e.slice(0,p.index)),this[v]=this[v]||a&&u[3]&&t[v]||"",u[4]&&(this[v]=this[v].toLowerCase())}r&&(this.query=r(this.query)),a&&t.slashes&&"/"!==this.pathname.charAt(0)&&(""!==this.pathname||""!==t.pathname)&&(this.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],a=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(a=!0),r.splice(n,1),s--);return a&&r.unshift(""),("."===i||".."===i)&&r.push(""),r.join("/")}(this.pathname,t.pathname)),"/"!==this.pathname.charAt(0)&&g(this.protocol)&&(this.pathname="/"+this.pathname),n(this.port,this.protocol)||(this.host=this.hostname,this.port=""),this.username=this.password="",this.auth&&(~(p=this.auth.indexOf(":"))?(this.username=this.auth.slice(0,p),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=this.auth.slice(p+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(this.auth)),this.auth=this.password?this.username+":"+this.password:this.username),this.origin="file:"!==this.protocol&&g(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString()}y.prototype={set:function(e,t,r){switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||i.parse)(t)),this[e]=t;break;case"port":this[e]=t,n(t,this.protocol)?t&&(this.host=this.hostname+":"+t):(this.host=this.hostname,this[e]="");break;case"hostname":this[e]=t,this.port&&(t+=":"+this.port),this.host=t;break;case"host":this[e]=t,l.test(t)?(t=t.split(":"),this.port=t.pop(),this.hostname=t.join(":")):(this.hostname=t,this.port="");break;case"protocol":this.protocol=t.toLowerCase(),this.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";this[e]=t.charAt(0)!==a?a+t:t}else this[e]=t;break;case"username":case"password":this[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(this.username=t.slice(0,s),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=t.slice(s+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<f.length;o++){var u=f[o];u[4]&&(this[u[1]]=this[u[1]].toLowerCase())}return this.auth=this.password?this.username+":"+this.password:this.username,this.origin="file:"!==this.protocol&&g(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString(),this},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,r=this.host,n=this.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var a=n+(this.protocol&&this.slashes||g(this.protocol)?"//":"");return this.username?(a+=this.username,this.password&&(a+=":"+this.password),a+="@"):this.password?(a+=":"+this.password,a+="@"):"file:"!==this.protocol&&g(this.protocol)&&!r&&"/"!==this.pathname&&(a+="@"),(":"===r[r.length-1]||l.test(this.hostname)&&!this.port)&&(r+=":"),a+=r+this.pathname,(t="object"==typeof this.query?e(this.query):this.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),this.hash&&(a+=this.hash),a}},y.extractProtocol=m,y.location=h,y.trimLeft=d,y.qs=i,e.exports=y},2552:()=>{},2571:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s,getComponentServerProps:()=>a});var n=r(3051),i=r(3041);let a=async e=>{let t=e.params||{};return await (0,n.WT)(t)},s=i.dW},2637:e=>{"use strict";let t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\}
2)|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,a=new Map([["n","\n"],["r","\r"],["t","	"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function s(e){let t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):a.get(e)||e}function o(e,t){let r={};for(let e of t)for(let t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(let[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,a)=>{let l=[],u=[],c=[];if(a.replace(t,(t,a,d,f,p,h)=>{if(a)c.push(s(a));else if(f){let t=c.join("");c=[],u.push(0===l.length?t:o(e,l)(t)),l.push({inverse:d,styles:function(e){let t;r.lastIndex=0;let a=[];for(;null!==(t=r.exec(e));){let e=t[1];if(t[2]){let r=function(e,t){let r,a=[];for(let o of t.trim().split(/\s*,\s*/g)){let t=Number(o);if(Number.isNaN(t))if(r=o.match(n))a.push(r[2].replace(i,(e,t,r)=>t?s(t):r));else throw Error(`Invalid Chalk template style argument: ${o} (in style '${e}')`);else a.push(t)}return a}(e,t[2]);a.push([e].concat(r))}else a.push([e])}return a}(f)})}else if(p){if(0===l.length)throw Error("Found extraneous } in Chalk template literal");u.push(o(e,l)(c.join(""))),c=[],l.pop()}else c.push(h)}),u.push(c.join("")),l.length>0)throw Error(`Chalk template literal is missing ${l.length} closing bracket${1===l.length?"":"s"} (\`}\`)`);return u.join("")}},2730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return a.ReadonlyURLSearchParams},RedirectType:function(){return f},forbidden:function(){return l.forbidden},notFound:function(){return o.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect},unauthorized:function(){return u.unauthorized},unstable_isUnrecognizedActionError:function(){return d},unstable_rethrow:function(){return c.unstable_rethrow}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(8551),s=r(9753),o=r(4755),l=r(9230),u=r(2095),c=r(787);function d(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let f={push:"push",replace:"replace"};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return w}});let n=r(4252),i=r(8365),a=r(7876),s=i._(r(4232)),o=n._(r(8477)),l=n._(r(8496)),u=r(5119),c=r(9484),d=r(1580);r(9150);let f=r(2925),p=n._(r(969)),h=r(5022),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,r,n,i,a,s){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function y(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}let v=(0,s.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:i,decoding:o,className:l,style:u,fetchPriority:c,placeholder:d,loading:f,unoptimized:p,fill:g,onLoadRef:v,onLoadingCompleteRef:b,setBlurComplete:w,setShowAltText:S,sizesInput:E,onLoad:_,onError:C,...O},k)=>{let I=(0,s.useCallback)(e=>{e&&(C&&(e.src=e.src),e.complete&&m(e,d,v,b,w,p,E))},[e,d,v,b,w,C,p,E]),A=(0,h.useMergedRef)(k,I);return(0,a.jsx)("img",{...O,...y(c),loading:f,width:i,height:n,decoding:o,"data-nimg":g?"fill":"1",className:l,style:u,sizes:r,srcSet:t,src:e,ref:A,onLoad:e=>{m(e.currentTarget,d,v,b,w,p,E)},onError:e=>{S(!0),"empty"!==d&&w(!0),C&&C(e)}})});function b({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,r),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,s.forwardRef)((e,t)=>{let r=(0,s.useContext)(f.RouterContext),n=(0,s.useContext)(d.ImageConfigContext),i=(0,s.useMemo)(()=>{let e=g||n||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>
2e-t),r=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:i,localPatterns:e.localPatterns}},[n]),{onLoad:o,onLoadingComplete:l}=e,h=(0,s.useRef)(o);(0,s.useEffect)(()=>{h.current=o},[o]);let m=(0,s.useRef)(l);(0,s.useEffect)(()=>{m.current=l},[l]);let[y,w]=(0,s.useState)(!1),[S,E]=(0,s.useState)(!1),{props:_,meta:C}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:y,showAltText:S});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{..._,unoptimized:C.unoptimized,placeholder:C.placeholder,fill:C.fill,onLoadRef:h,onLoadingCompleteRef:m,setBlurComplete:w,setShowAltText:E,sizesInput:e.sizes,ref:t}),C.preload?(0,a.jsx)(b,{isAppRouter:!r,imgAttributes:_}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2848:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){var l=[a,o];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){s=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){s.label=l[1];break}if(6===l[0]&&s.label<i[1]){s.label=i[1],i=l;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(l);break}i[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SkipFirstDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.apply=function(){return a(this,void 0,void 0,function(){return s(this,function(t){return[2,!!this.isFirstAttempt||e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return 0===this.attempt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(r(3770).Delay)},2914:(e,t,r)=>{"use strict";r.d(t,{M:()=>o,a:()=>s});var n=r(4232),i=r(4218),a=r(6056);let s=e=>{var t,r,s,o,l,u,c,d,f;let p=(null==(t=e.params)?void 0:t.ComponentRevision)||e.revisionFallback;if(!e.template&&(!e.params||!e.params.LibraryId||!e.params.ComponentId||!e.params.ComponentVersion||!e.params.ComponentHostName||!p))return null;let h=Object.assign(Object.assign({},e.fetchedData),{_:(0,a.q)(null!=(r=e.fields)?r:{})});return n.createElement(i.uA,{data:h,template:e.template,cdn:null==(s=e.params)?void 0:s.ComponentHostName,library:null!=(l=null==(o=e.params)?void 0:o.LibraryId)?l:"",version:null==(u=e.params)?void 0:u.ComponentVersion,component:null!=(d=null==(c=e.params)?void 0:c.ComponentId)?d:"",instance:null==(f=e.params)?void 0:f.ComponentInstanceId,revision:p,fetch:[]})},o=e=>{var t,r;let i=`component feaas ${null==(t=e.params)?void 0:t.styles}`.trimEnd(),a=null==(r=e.params)?void 0:r.RenderingIdentifier;return n.createElement("div",{className:i,id:a||void 0},n.createElement("div",{className:"component-content"},n.createElement(s,Object.assign({},e))))}},3041:(e,t,r)=>{"use strict";r.d(t,{Xf:()=>u,dW:()=>c});var n=r(4232),i=r(4218),a=r(6056),s=r(9863);let{bx:o}=i,l=e=>{var t;return n.createElement("div",null,"A rendering error occurred: ",null==(t=e.error)?void 0:t.message,".")};class u extends n.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){this.setState({error:e})}render(){var e,t,r;let i=this.props;if(this.state.error)return this.props.errorComponent?n.createElement(this.props.errorComponent,{error:this.state.error}):n.createElement(l,{error:this.state.error});let{ComponentName:u}=i.params||{};if(!u){let e={errorOverride:"BYOC: The ComponentName for this rendering is missing"},t=this.props.missingComponentComponent;return t?n.createElement(t,Object.assign({},e)):n.createElement(s.K,Object.assign({},e))}let c={rendering:{componentName:u},errorOverride:"BYOC: This component was not registered."},d=this.props.missingComponentComponent?n.createElement(this.props.missingComponentComponent,Object.assign({},c)):n.createElement(s.K,Object.assign({},c)),f=this.props.errorComponent,p={};if(null==(e=i.params)?void 0:e.ComponentProps)try{p=null!=(t=JSON.parse(i.params.ComponentProps))?t:{}}catch(e){return console.error(`Parsing props for ${u} component from rendering params failed. Error: ${e}`),f?n.createElement(f,{error:e}):n.createElement(l,{error:e})}let h=Object.assign(Object.assign({},i.fetchedData),{_:(0,a.q)(null!=(r=i.fields)?r:{})});return n.createElement(o,Object.assign({},i.rendering,{componentName:u,clientFallback:d,datasources:h},p))}}let c=e=>{var t,r,i;let a=null==(r=null==(t=e.params)?void 0:t.styles)?void 0:r.trimEnd(),s=null==(i=e.params)?void 0:i.RenderingIdentifier;return n.createElement("div",{className:a||void 0,id:s||void 0},n.createElement("div",{className:"component-content"},n.createElement(u,Object.assign({},e))))}},3051:(e,t,r)=>{"use strict";r.d(t,{WT:()=>i,h5:()=>a});var n=r(4218);async function i(e){let t=e.ComponentDataOverride?JSON.parse(e.ComponentDataOverride):{};return{fetchedData:await n.yi.fetch(t||{})}}async function a(e,t,r){let n=t?"published":"staged",i=r||l(e,n),a="",u={},c=e.ComponentDataOverride?JSON.parse(e.ComponentDataOverride):{};try{a=await s(i,e,n),u=await o(c)}catch(e){console.error(e)}return{fetchedData:u,revisionFallback:n,template:a}}async function s(e,t,r){try{let{template:t}=await n.Sn(e);return t}catch(n){throw console.error(`Fetch FEAAS component from ${e} failed. Ensure the component revision "${t.ComponentRevision||r}" is present`),n}}async function o(e){try{return await n.yi.fetch(e||{})}catch(e){throw console.error("Fetch FEAAS component data settings failed"),e}}let l=(e,t)=>
2{var r;let n=e.ComponentRevision||t,i=(null==(r=e.ComponentHostName)?void 0:r.startsWith("https://"))?e.ComponentHostName:`https://${e.ComponentHostName}`;return`${i}/components/${e.LibraryId}/${e.ComponentId}/${e.ComponentVersion}/${n}`}},3135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2848),i=r(8954);t.DelayFactory=function(e,t){var r,a=(r=e).delayFirstAttempt?new i.AlwaysDelay(r):new n.SkipFirstDelay(r);return a.setAttemptNumber(t),a}},3282:(e,t,r)=>{"use strict";r.d(t,{G:()=>i,n:()=>a});var n=r(4232);let i=e=>{let t=e.tag||"span";return n.createElement(t,Object.assign({},e,{suppressHydrationWarning:!0}),"[No text in field]")},a=e=>n.createElement("img",Object.assign({},e,{suppressContentEditableWarning:!0,alt:"",src:'data:image/svg+xml,%3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 240 240" style="enable-background:new 0 0 240 240;" xml:space="preserve"%3E%3Cstyle type="text/css"%3E .st0%7Bfill:none;%7D .st1%7Bfill:%23969696;%7D .st2%7Bfill:%23FFFFFF;%7D .st3%7Bfill:%23FFFFFF;stroke:%23FFFFFF;stroke-width:0.75;stroke-miterlimit:10;%7D%0A%3C/style%3E%3Cg%3E%3Crect class="st0" width="240" height="240"/%3E%3Cg%3E%3Cg%3E%3Crect x="20" y="20" class="st1" width="200" height="200"/%3E%3C/g%3E%3Cg%3E%3Ccircle class="st2" cx="174" cy="67" r="14"/%3E%3Cpath class="st2" d="M174,54c7.17,0,13,5.83,13,13s-5.83,13-13,13s-13-5.83-13-13S166.83,54,174,54 M174,52 c-8.28,0-15,6.72-15,15s6.72,15,15,15s15-6.72,15-15S182.28,52,174,52L174,52z"/%3E%3C/g%3E%3Cpolyline class="st3" points="29.5,179.25 81.32,122.25 95.41,137.75 137.23,91.75 209.5,179.75 "/%3E%3C/g%3E%3C/g%3E%3C/svg%3E',className:`scEmptyImage ${e.className||""}`,style:{minWidth:"48px",minHeight:"48px",maxWidth:"400px",maxHeight:"400px",cursor:"pointer"}}))},3440:(e,t)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:i,blurDataURL:a,objectFit:s}){let o=n?40*n:e,l=i?40*i:t,u=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},3561:(e,t,r)=>{"use strict";r.d(t,{N:()=>a});var n=r(4232),i=r(3813);function a(e,t){let r=e=>{var r;let{editable:a=!0}=e;if((null==(r=e.field)?void 0:r.metadata)&&a&&(0,i.JE)(e.field)){let r=e.emptyFieldEditingComponent||t.defaultEmptyFieldEditingComponent,i=e;return e.emptyFieldEditingComponent||(i=Object.assign(Object.assign({},e),{editable:void 0,field:void 0})),n.createElement(r,Object.assign({},i,{suppressHydrationWarning:!0}))}return null};return t.isForwardRef?t=>r(t)||n.createElement(e,Object.assign({},t)):t=>r(t)||n.createElement(e,Object.assign({},t))}},3576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let n=(e,t)=>r(6945).normalizeLocalePath(e,t);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8965);t.Delay=function(){function e(e){this.options=e,this.attempt=0}return e.prototype.apply=function(){var e=this;return new Promise(function(t){return setTimeout(t,e.jitteredDelay)})},e.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){return n.JitterFactory(this.options)(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return Math.min(this.options.startingDelay*Math.pow(this.options.timeMultiple,this.numOfDelayedAttempts),this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}()},3774:(e,t,r)=>{"use strict";let n,i=r(8135),{stdout:a,stderr:s}=r(8361),{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:l}=r(310),{isArray:u}=Array,c=["ansi","ansi","ansi256","ansi16m"],d=Object.create(null);class f{constructor(e){return p(e)}}let p=e=>{let t={};return((e,t={})=>
2{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let r=a?a.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>w(t.template,...e),Object.setPrototypeOf(t,h.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=f,t.template};function h(e){return p(e)}for(let[e,t]of Object.entries(i))d[e]={get(){let r=v(this,y(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};d.visible={get(){let e=v(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};let g=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of g)d[e]={get(){let{level:t}=this;return function(...r){return v(this,y(i.color[c[t]][e](...r),i.color.close,this._styler),this._isEmpty)}}};for(let e of g)d["bg"+e[0].toUpperCase()+e.slice(1)]={get(){let{level:t}=this;return function(...r){return v(this,y(i.bgColor[c[t]][e](...r),i.bgColor.close,this._styler),this._isEmpty)}}};let m=Object.defineProperties(()=>{},{...d,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),y=(e,t,r)=>{let n,i;return void 0===r?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},v=(e,t,r)=>{let n=(...e)=>u(e[0])&&u(e[0].raw)?b(n,w(n,...e)):b(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,m),n._generator=e,n._styler=t,n._isEmpty=r,n},b=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;let{openAll:n,closeAll:i}=r;if(-1!==t.indexOf("\x1b"))for(;void 0!==r;)t=o(t,r.close,r.open),r=r.parent;let a=t.indexOf("\n");return -1!==a&&(t=l(t,i,n,a)),n+t+i},w=(e,...t)=>{let[i]=t;if(!u(i)||!u(i.raw))return t.join(" ");let a=t.slice(1),s=[i.raw[0]];for(let e=1;e<i.length;e++)s.push(String(a[e-1]).replace(/[{}\\]/g,"\\$&"),String(i.raw[e]));return void 0===n&&(n=r(2637)),n(e,s.join(""))};Object.defineProperties(h.prototype,d);let S=p(void 0);S.supportsColor=a,S.stderr=p({level:s?s.level:0}),S.stderr.supportsColor=s,e.exports=S},3802:(e,t,r)=>{"use strict";r.d(t,{Y:()=>n});let n="Hidden Rendering"},3810:(e,t,r)=>{"use strict";r.d(t,{u:()=>l});var n=r(8992);let i=(e,t,r)=>{if(e&&"reportValidity"in e){let i=(0,n.Jt)(r,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},a=(e,t)=>{for(let r in t.fields){let n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?i(n.ref,r,e):n.refs&&n.refs.forEach(t=>i(t,r,e))}},s=(e,t)=>e.some(e=>e.startsWith(t+"."));var o=function(e,t){for(var r={};e.length;){var i=e[0],a=i.code,s=i.message,o=i.path.join(".");if(!r[o])if("unionErrors"in i){var l=i.unionErrors[0].errors[0];r[o]={message:l.message,type:l.code}}else r[o]={message:s,type:a};if("unionErrors"in i&&i.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var u=r[o].types,c=u&&u[i.code];r[o]=(0,n.Gb)(o,t,r,a,c?[].concat(c,i.message):i.message)}e.shift()}return r},l=function(e,t,r){return void 0===r&&(r={}),function(i,l,u){try{return Promise.resolve(function(n){try{var s=Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](i,t)).then(function(e){return u.shouldUseNativeValidation&&a({},u),{errors:{},values:r.raw?i:e}})}catch(e){return n(e)}return s&&s.then?s.then(void 0,n):s}(function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:((e,t)=>{t.shouldUseNativeValidation&&a(e,t);let r={};for(let i in e){let a=(0,n.Jt)(t.fields,i),o=Object.assign(e[i]||{},{ref:a&&a.ref});if(s(t.names||Object.keys(e),i)){let e=Object.assign({},(0,n.Jt)(r,i));(0,n.hZ)(e,"root",o),(0,n.hZ)(r,i,e)}else(0,n.hZ)(r,i,o)}return r})(o(e.errors,!u.shouldUseNativeValidation&&"all"===u.criteriaMode),u)};throw e}))}catch(e){return Promise.reject(e)}}}},3813:(e,t,r)=>{"use strict";function n(e,t,r){if(!e||!t)return r;let n=e[t];return n&&void 0!==n.value?n.value:e.fields&&e.fields[t]&&void 0!==e.fields[t].value?e.fields[t].value:r}r.d(t,{GR:()=>n,JE:()=>s,Np:()=>a,jz:()=>i});let i=e=>RegExp(`^${e.replace(/\{\*\}+/i,"\\d+")}$`),a=e=>-1!==e.indexOf("{*}");function s(e){if(!e)return!0;let t=e=>"string"==typeof e?"0001-01-01T00:00:00Z"===e:!("function"==typeof(null==e?void 0:e.getMonth)&&!isNaN(null==e?void 0:e.getMonth())),r=e=>null==e||("object"==typeof e?!e.src&&!e.src&&!e.href&&t(e):"number"!=typeof e&&"boolean"!=typeof e&&(!e||t(e)));return r(void 0!==e.value?e.value:e)}},3902:(e,t)=>
2{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noJitter=function(e){return e}},3947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(4232),i=r(9382),a="function"==typeof IntersectionObserver,s=new Map,o=[];function l({rootRef:e,rootMargin:t,disabled:r}){let u=r||!a,[c,d]=(0,n.useState)(!1),f=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{f.current=e},[]);return(0,n.useEffect)(()=>{if(a){if(u||c)return;let r=f.current;if(r&&r.tagName)return function(e,t,r){let{id:n,observer:i,elements:a}=function(e){let t,r={root:e.root||null,margin:e.rootMargin||""},n=o.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=s.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},o.push(r),s.set(r,t),t}(r);return a.set(e,t),i.observe(e),function(){if(a.delete(e),i.unobserve(e),0===a.size){i.disconnect(),s.delete(n);let e=o.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&o.splice(e,1)}}}(r,e=>e&&d(e),{root:e?.current,rootMargin:t})}else if(!c){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,t,e,c,f.current]),[p,c,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4e3:(e,t,r)=>{e.exports=r(6987)},4301:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,i){var a,s=function(e,r,n){void 0===n&&(n={});var i,a,s,o,l=new Date(e);return(void 0===(i=n)&&(i={}),(o=t[s=r+"|"+(a=i.timeZoneName||"short")])||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:a}),t[s]=o),o).formatToParts(l)},o=function(t,r){for(var n=s(t,r),a=[],o=0;o<n.length;o+=1){var l=n[o],u=l.type,c=l.value,d=e[u];d>=0&&(a[d]=parseInt(c,10))}var f=a[3],p=a[0]+"-"+a[1]+"-"+a[2]+" "+(24===f?0:f)+":"+a[4]+":"+a[5]+":000",h=+t;return(i.utc(p).valueOf()-(h-=h%1e3))/6e4},l=n.prototype;l.tz=function(e,t){void 0===e&&(e=a);var r,n=this.utcOffset(),s=this.toDate(),o=s.toLocaleString("en-US",{timeZone:e}),l=Math.round((s-new Date(o))/1e3/60),u=-(15*Math.round(s.getTimezoneOffset()/15))-l;if(Number(u)){if(r=i(o,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(u,!0),t){var c=r.utcOffset();r=r.add(n-c,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},l.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var u=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return u.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,s=r||t||a,l=o(+i(),s);if("string"!=typeof e)return i(e).tz(s);var u=function(e,t,r){var n=e-60*t*1e3,i=o(n,r);if(t===i)return[n,t];var a=o(n-=60*(i-t)*1e3,r);return i===a?[n,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,n).valueOf(),l,s),c=u[0],d=u[1],f=i(c).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}()},4400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return i}});let n=r(8902);function i(e,t,i,a){{let s=r(3576).normalizeLocalePath,o=r(6971).detectDomainLocale,l=t||s(e,i).detectedLocale,u=o(a,void 0,l);if(u){let t=`http${u.http?"":"s"}://`,r=l===u.defaultLocale?"":`/${l}`;return`${t}${u.domain}${(0,n.normalizePathTrailingSlash)(`${r}${e}`)}`}return!1}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
2dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSpecKeys=t.checkNavigable=t.changeSlide=t.canUseDOM=t.canGoNext=void 0,t.clamp=u,t.extractObject=void 0,t.filterSettings=function(e){return j.reduce(function(t,r){return e.hasOwnProperty(r)&&(t[r]=e[r]),t},{})},t.validSettings=t.swipeStart=t.swipeMove=t.swipeEnd=t.slidesOnRight=t.slidesOnLeft=t.slideHandler=t.siblingDirection=t.safePreventDefault=t.lazyStartIndex=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.keyHandler=t.initializedState=t.getWidth=t.getTrackLeft=t.getTrackCSS=t.getTrackAnimateCSS=t.getTotalSlides=t.getSwipeDirection=t.getSlideCount=t.getRequiredLazySlides=t.getPreClones=t.getPostClones=t.getOnDemandLazySlides=t.getNavigableIndexes=t.getHeight=void 0;var n=a(r(4232)),i=a(r(959));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return Math.max(t,Math.min(e,r))}var c=t.safePreventDefault=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},d=t.getOnDemandLazySlides=function(e){for(var t=[],r=f(e),n=p(e),i=r;i<n;i++)0>e.lazyLoadedList.indexOf(i)&&t.push(i);return t};t.getRequiredLazySlides=function(e){for(var t=[],r=f(e),n=p(e),i=r;i<n;i++)t.push(i);return t};var f=t.lazyStartIndex=function(e){return e.currentSlide-h(e)},p=t.lazyEndIndex=function(e){return e.currentSlide+g(e)},h=t.lazySlidesOnLeft=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+ +(parseInt(e.centerPadding)>0):0},g=t.lazySlidesOnRight=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+ +(parseInt(e.centerPadding)>0):e.slidesToShow},m=t.getWidth=function(e){return e&&e.offsetWidth||0},y=t.getHeight=function(e){return e&&e.offsetHeight||0},v=t.getSwipeDirection=function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=e.startX-e.curX,(r=Math.round(180*Math.atan2(e.startY-e.curY,t)/Math.PI))<0&&(r=360-Math.abs(r)),r<=45&&r>=0||r<=360&&r>=315)return"left";if(r>=135&&r<=225)return"right";if(!0===n)if(r>=35&&r<=135)return"up";else return"down";return"vertical"},b=t.canGoNext=function(e){var t=!0;return!e.infinite&&(e.centerMode&&e.currentSlide>=e.slideCount-1?t=!1:(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t};t.extractObject=function(e,t){var r={};return t.forEach(function(t){return r[t]=e[t]}),r},t.initializedState=function(e){var t,r=n.default.Children.count(e.children),i=e.listRef,a=Math.ceil(m(i)),s=Math.ceil(m(e.trackRef&&e.trackRef.node));if(e.vertical)t=a;else{var o=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(o*=a/100),t=Math.ceil((a-o)/e.slidesToShow)}var u=i&&y(i.querySelector('[data-index="0"]')),c=u*e.slidesToShow,f=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(f=r-1-e.initialSlide);var p=e.lazyLoadedList||[],h=d(l(l({},e),{},{currentSlide:f,lazyLoadedList:p})),g={slideCount:r,slideWidth:t,listWidth:a,trackWidth:s,currentSlide:f,slideHeight:u,listHeight:c,lazyLoadedList:p=p.concat(h)};return null===e.autoplaying&&e.autoplay&&(g.autoplaying="playing"),g},t.slideHandler=function(e){var t=e.waitForAnimate,r=e.animating,
2n=e.fade,i=e.infinite,a=e.index,s=e.slideCount,o=e.lazyLoad,c=e.currentSlide,f=e.centerMode,p=e.slidesToScroll,h=e.slidesToShow,g=e.useCSS,m=e.lazyLoadedList;if(t&&r)return{};var y,v,w,S=a,E={},_={},I=i?a:u(a,0,s-1);if(n){if(!i&&(a<0||a>=s))return{};a<0?S=a+s:a>=s&&(S=a-s),o&&0>m.indexOf(S)&&(m=m.concat(S)),E={animating:!0,currentSlide:S,lazyLoadedList:m,targetSlide:S},_={animating:!1,targetSlide:S}}else y=S,S<0?(y=S+s,i?s%p!=0&&(y=s-s%p):y=0):!b(e)&&S>c?S=y=c:f&&S>=s?(S=i?s:s-1,y=i?0:s-1):S>=s&&(y=S-s,i?s%p!=0&&(y=0):y=s-h),!i&&S+h>=s&&(y=s-h),v=k(l(l({},e),{},{slideIndex:S})),w=k(l(l({},e),{},{slideIndex:y})),i||(v===w&&(S=y),v=w),o&&(m=m.concat(d(l(l({},e),{},{currentSlide:S})))),g?(E={animating:!0,currentSlide:y,trackStyle:O(l(l({},e),{},{left:v})),lazyLoadedList:m,targetSlide:I},_={animating:!1,currentSlide:y,trackStyle:C(l(l({},e),{},{left:w})),swipeLeft:null,targetSlide:I}):E={currentSlide:y,trackStyle:C(l(l({},e),{},{left:w})),lazyLoadedList:m,targetSlide:I};return{state:E,nextState:_}},t.changeSlide=function(e,t){var r,n,i,a,s=e.slidesToScroll,o=e.slidesToShow,u=e.slideCount,c=e.currentSlide,d=e.targetSlide,f=e.lazyLoad,p=e.infinite;if(r=u%s!=0?0:(u-c)%s,"previous"===t.message)a=c-(i=0===r?s:o-r),f&&!p&&(a=-1==(n=c-i)?u-1:n),p||(a=d-s);else if("next"===t.message)a=c+(i=0===r?s:r),f&&!p&&(a=(c+s)%u+r),p||(a=d+s);else if("dots"===t.message)a=t.index*t.slidesToScroll;else if("children"===t.message){if(a=t.index,p){var h=x(l(l({},e),{},{targetSlide:a}));a>t.currentSlide&&"left"===h?a-=u:a<t.currentSlide&&"right"===h&&(a+=u)}}else"index"===t.message&&(a=Number(t.index));return a},t.keyHandler=function(e,t,r){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?r?"next":"previous":39===e.keyCode?r?"previous":"next":""},t.swipeStart=function(e,t,r){return("IMG"===e.target.tagName&&c(e),t&&(r||-1===e.type.indexOf("mouse")))?{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}:""},t.swipeMove=function(e,t){var r=t.scrolling,n=t.animating,i=t.vertical,a=t.swipeToSlide,s=t.verticalSwiping,o=t.rtl,u=t.currentSlide,d=t.edgeFriction,f=t.edgeDragged,p=t.onEdge,h=t.swiped,g=t.swiping,m=t.slideCount,y=t.slidesToScroll,w=t.infinite,S=t.touchObject,E=t.swipeEvent,_=t.listHeight,O=t.listWidth;if(!r){if(n)return c(e);i&&a&&s&&c(e);var I,A={},T=k(t);S.curX=e.touches?e.touches[0].pageX:e.clientX,S.curY=e.touches?e.touches[0].pageY:e.clientY,S.swipeLength=Math.round(Math.sqrt(Math.pow(S.curX-S.startX,2)));var x=Math.round(Math.sqrt(Math.pow(S.curY-S.startY,2)));if(!s&&!g&&x>10)return{scrolling:!0};s&&(S.swipeLength=x);var R=(o?-1:1)*(S.curX>S.startX?1:-1);s&&(R=S.curY>S.startY?1:-1);var N=Math.ceil(m/y),j=v(t.touchObject,s),P=S.swipeLength;return!w&&(0===u&&("right"===j||"down"===j)||u+1>=N&&("left"===j||"up"===j)||!b(t)&&("left"===j||"up"===j))&&(P=S.swipeLength*d,!1===f&&p&&(p(j),A.edgeDragged=!0)),!h&&E&&(E(j),A.swiped=!0),I=i?T+_/O*P*R:o?T-P*R:T+P*R,s&&(I=T+P*R),A=l(l({},A),{},{touchObject:S,swipeLeft:I,trackStyle:C(l(l({},t),{},{left:I}))}),Math.abs(S.curX-S.startX)<.8*Math.abs(S.curY-S.startY)||S.swipeLength>10&&(A.swiping=!0,c(e)),A}},t.swipeEnd=function(e,t){var r=t.dragging,n=t.swipe,i=t.touchObject,a=t.listWidth,s=t.touchThreshold,o=t.verticalSwiping,u=t.listHeight,d=t.swipeToSlide,f=t.scrolling,p=t.onSwipe,h=t.targetSlide,g=t.currentSlide,m=t.infinite;if(!r)return n&&c(e),{};var y=o?u/s:a/s,b=v(i,o),w={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(f||!i.swipeLength)return w;if(i.swipeLength>y){c(e),p&&p(b);var _,C,I=m?g:h;switch(b){case"left":case"up":C=I+E(t),_=d?S(t,C):C,w.currentDirection=0;break;case"right":case"down":C=I-E(t),_=d?S(t,C):C,w.currentDirection=1;break;default:_=I}w.triggerSlideHandler=_}else{var A=k(t);w.trackStyle=O(l(l({},t),{},{left:A}))}return w};var w=t.getNavigableIndexes=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,r=e.infinite?-1*e.slidesToShow:0,n=e.infinite?-1*e.slidesToShow:0,i=[];r<t;
2)i.push(r),r=n+e.slidesToScroll,n+=Math.min(e.slidesToScroll,e.slidesToShow);return i},S=t.checkNavigable=function(e,t){var r=w(e),n=0;if(t>r[r.length-1])t=r[r.length-1];else for(var i in r){if(t<r[i]){t=n;break}n=r[i]}return t},E=t.getSlideCount=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(!e.swipeToSlide)return e.slidesToScroll;var r,n=e.listRef;if(Array.from(n.querySelectorAll&&n.querySelectorAll(".slick-slide")||[]).every(function(n){if(e.vertical){if(n.offsetTop+y(n)/2>-1*e.swipeLeft)return r=n,!1}else if(n.offsetLeft-t+m(n)/2>-1*e.swipeLeft)return r=n,!1;return!0}),!r)return 0;var i=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(r.dataset.index-i)||1},_=t.checkSpecKeys=function(e,t){return t.reduce(function(t,r){return t&&e.hasOwnProperty(r)},!0)?null:console.error("Keys Missing:",e)},C=t.getTrackCSS=function(e){if(_(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]),e.vertical){var t,r;r=(e.unslick?e.slideCount:e.slideCount+2*e.slidesToShow)*e.slideHeight}else t=T(e)*e.slideWidth;var n={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var i=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";n=l(l({},n),{},{WebkitTransform:i,transform:a,msTransform:s})}else e.vertical?n.top=e.left:n.left=e.left;return e.fade&&(n={opacity:1}),t&&(n.width=t),r&&(n.height=r),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?n.marginTop=e.left+"px":n.marginLeft=e.left+"px"),n},O=t.getTrackAnimateCSS=function(e){_(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=C(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},k=t.getTrackLeft=function(e){if(e.unslick)return 0;_(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t=e.slideIndex,r=e.trackRef,n=e.infinite,i=e.centerMode,a=e.slideCount,s=e.slidesToShow,o=e.slidesToScroll,l=e.slideWidth,u=e.listWidth,c=e.variableWidth,d=e.slideHeight,f=e.fade,p=e.vertical,h=0,g=0;if(f||1===e.slideCount)return 0;var m=0;if(n?(m=-I(e),a%o!=0&&t+o>a&&(m=-(t>a?s-(t-a):a%o)),i&&(m+=parseInt(s/2))):(a%o!=0&&t+o>a&&(m=s-a%o),i&&(m=parseInt(s/2))),h=m*l,g=m*d,y=p?-(t*d*1)+g:-(t*l*1)+h,!0===c){var y,v,b,w=r&&r.node;if(b=t+I(e),y=(v=w&&w.childNodes[b])?-1*v.offsetLeft:0,!0===i){b=n?t+I(e):t,v=w&&w.children[b],y=0;for(var S=0;S<b;S++)y-=w&&w.children[S]&&w.children[S].offsetWidth;y-=parseInt(e.centerPadding),y+=v&&(u-v.offsetWidth)/2}}return y},I=t.getPreClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+ +!!e.centerMode},A=t.getPostClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+ +!!e.centerMode},T=t.getTotalSlides=function(e){return 1===e.slideCount?1:I(e)+e.slideCount+A(e)},x=t.siblingDirection=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+R(e)?"left":"right":e.targetSlide<e.currentSlide-N(e)?"right":"left"},R=t.slidesOnRight=function(e){var t=e.slidesToShow,r=e.centerMode,n=e.rtl,i=e.centerPadding;if(r){var a=(t-1)/2+1;return parseInt(i)>0&&(a+=1),n&&t%2==0&&(a+=1),a}return n?0:t-1},N=t.slidesOnLeft=function(e){var t=e.slidesToShow,r=e.centerMode,n=e.rtl,i=e.centerPadding;if(r){var a=(t-1)/2+1;return parseInt(i)>0&&(a+=1),n||t%2!=0||(a+=1),a}return n?t-1:0};t.canUseDOM=function(){return!!("u">typeof window&&window.document&&window.document.createElement)};var j=t.validSettings=Object.keys(i.default)},4587:(e,t,r)=>{e.exports=r(7749)},4699:(e,t,r)=>{"use strict";r.d(t,{Fz:()=>a,Ph:()=>s,sL:()=>i});var n=r(4232);let i=(0,n.createContext)({});function a(e){if(e)return(0,n.useContext)(i)[e]}let s=({children:e,value:t})=>n.createElement(i.Provider,{value:t},e)},4755:(e,t,r)=>{"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return a}});let n=r(4494),i=`${n.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function a(){let e=Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,configurable:!0});throw e.digest=i,e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4824:(e,t,r)=>{e.exports=r(8398)},4953:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,k6:()=>o,tS:()=>l});var n=r(2544),i=r.n(n);let a=/\/([-~]{1})\/media\//i,s=(e,t=a)=>{let r=i()(e,{},!0),n=t.exec(r.pathname);return n&&n.length>1&&r.set("pathname",r.pathname.replace(t,`/${n[1]}/jssmedia/`)),r.toString()},o=(e,t,r=a)=>{if(!t||0===Object.keys(t).length)return e;"u">typeof window&&!window.global&&(window.global={});let n=i()(s(e,r),{},!0),o=(e=>{let{rev:t,db:r,la:n,vs:i,ts:a}=e;return{rev:t,db:r,la:n,vs:i,ts:a}})(n.query),l=Object.assign({},t);return Object.entries(o).forEach(([e,t])=>{t&&(l[e]=t)}),n.set("query",l),n.toString()},l=(e,t,r,n)=>t.map(t=>{let i=Object.assign(Object.assign({},r),t),a=i.w||i.mw;return a?`${o(e,i,n)} ${a}w`:null}).filter(e=>e).join(", ")},5022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=r(4232);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=a(e,n)),t&&(i.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5030:function(e){e.exports=function(){"use strict";var e="month",t="quarter";return function(r,n){var i=n.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var a=i.add;i.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):a.bind(this)(r,n)};var s=i.startOf;i.startOf=function(r,n){var i=this.$utils(),a=!!i.u(n)||n;if(i.p(r)===t){var o=this.quarter()-1;return a?this.month(3*o).startOf(e).startOf("day"):this.month(3*o+2).endOf(e).endOf("day")}return s.bind(this)(r,n)}}}()},5039:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=a(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=a(t,r));return t}(r)))}return e}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(r=(function(){return i}).apply(t,[]))||(e.exports=r)}()},5105:(e,t,r)=>{e.exports=r(4087)},5119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return u}}),r(9150);let n=r(8833),i=r(3440),a=r(9484),s=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:f,className:p,quality:h,width:g,height:m,fill:y=!1,style:v,overrideSrc:b,onLoad:w,onLoadingComplete:S,placeholder:E="empty",blurDataURL:_,fetchPriority:C,decoding:O="async",layout:k,objectFit:I,objectPosition:A,lazyBoundary:T,lazyRoot:x,...R},N){var j;let P,D,M,{imgConf:L,showAltText:F,blurComplete:q,defaultLoader:U}=N,$=L||a.imageConfigDefault;if("allSizes"in $)P=$;else{let e=[...$.deviceSizes,...$.imageSizes].sort((e,t)=>
2e-t),t=$.deviceSizes.sort((e,t)=>e-t),r=$.qualities?.sort((e,t)=>e-t);P={...$,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let V=R.loader||U;delete R.loader,delete R.srcSet;let z="__next_img_default"in V;if(z){if("custom"===P.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
3Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=V;V=t=>{let{config:r,...n}=t;return e(n)}}if(k){"fill"===k&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[k];e&&(v={...v,...e});let r={responsive:"100vw",fill:"100vw"}[k];r&&!t&&(t=r)}let B="",G=l(g),H=l(m);if((j=e)&&"object"==typeof j&&(o(j)||void 0!==j.src)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(D=t.blurWidth,M=t.blurHeight,_=_||t.blurDataURL,B=t.src,!y)if(G||H){if(G&&!H){let e=G/t.width;H=Math.round(t.height*e)}else if(!G&&H){let e=H/t.height;G=Math.round(t.width*e)}}else G=t.width,H=t.height}let Q=!c&&!d&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,Q=!1),P.unoptimized&&(r=!0),z&&!P.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let Y=l(h),W=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:I,objectPosition:A}:{},F?{}:{color:"transparent"},v),K=q||"empty"===E?null:"blur"===E?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:G,heightInt:H,blurWidth:D,blurHeight:M,blurDataURL:_||"",objectFit:W.objectFit})}")`:`url("${E}")`,Z=s.includes(W.objectFit)?"fill"===W.objectFit?"100% 100%":"cover":W.objectFit,J=K?{backgroundSize:Z,backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:K}:{},X=function({config:e,src:t,unoptimized:r,width:i,quality:a,sizes:s,loader:o}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(e){let r=t.indexOf("?");if(-1!==r){let n=new URLSearchParams(t.slice(r+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,r)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:u}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=r.exec(n);)i.push(parseInt(e[2]));if(i.length){let r=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,s),c=l.length-1;return{sizes:s||"w"!==u?s:"100vw",srcSet:l.map((r,n)=>`${o({config:e,src:t,quality:a,width:r})} ${"w"===u?r:n+1}${u}`).join(", "),src:o({config:e,src:t,quality:a,width:l[c]})}}({config:P,src:e,unoptimized:r,width:G,quality:Y,sizes:t,loader:V}),ee=Q?"lazy":f;return{props:{...R,loading:ee,fetchPriority:C,width:G,height:H,decoding:O,className:p,style:{...W,...J},sizes:X.sizes,srcSet:X.srcSet,src:b||X.src},meta:{unoptimized:r,preload:d||c,placeholder:E,fill:y}}}},5122:(e,t,r)=>{"use strict";var n,i,a,s,o,l,u;r.d(t,{dQ:()=>n,lq:()=>a,mV:()=>i,pM:()=>s}),(o=n||(n={})).Final="final",o.Shared="shared",(l=i||(i={})).Open="open",l.Close="close",(u=a||(a={})).Normal="library",u.Metadata="library-metadata",(s||(s={})).Variant="variant"},5271:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o,getComponentServerProps:()=>s});var n=r(2130),i=r(3051),a=r(2914);let s=async(e,t)=>{let r=e.params||{},a=!t.sitecore.context.pageState||t.sitecore.context.pageState===n.IY.Normal;return await (0,i.h5)(r,a)},o=a.M},5333:(e,t,r)=>{"use strict";r.d(t,{Z1:()=>u,fF:()=>i,qH:()=>o,sx:()=>l});var n=r(8217);let i="00000000-0000-0000-0000-000000000000",a="jss-hrz-editing",s="Sitecore.Horizon.ResetChromes";class o{static isActive(){return!(0,n.A)()&&(window.location.search.indexOf("sc_headless_mode=edit")>-1||!!window.document.getElementById(a))}static resetChromes(){!(0,n.A)()&&window[s]&&window[s]()}}let l=()=>{o.isActive()&&o.resetChromes()},u=()=>{let e={};return e[a]={},e}},5527:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(e){return(e*=1)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var r,n=s.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*e}],SS:[n,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l("seconds")],ss:[i,l("seconds")],m:[i,l("minutes")],mm:[i,l("minutes")],H:[i,l("hours")],h:[i,l("hours")],HH:[i,l("hours")],hh:[i,l("hours")],D:[i,l("day")],DD:[n,l("day")],Do:[a,function(e){var t=s.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[i,l("week")],ww:[n,l("week")],M:[i,l("month")],MM:[n,l("month")],MM
3M:[a,function(e){var t=c("months"),r=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw Error();this.month=r%12||r}],MMMM:[a,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[n,function(e){this.year=o(e)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};return function(r,n,i){i.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(o=r.parseTwoDigitYear);var a=n.prototype,l=a.parse;a.parse=function(r){var n=r.date,a=r.utc,o=r.args;this.$u=a;var u=o[1];if("string"==typeof u){var c=!0===o[2],d=!0===o[3],p=o[2];d&&(p=o[2]),s=this.$locale(),!c&&p&&(s=i.Ls[p]),this.$d=function(r,n,i,a){try{if(["x","X"].indexOf(n)>-1)return new Date(("X"===n?1e3:1)*r);var o=(function(r){var n,i;n=r,i=s&&s.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var a=n&&n.toUpperCase();return r||i[n]||e[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),o=a.length,l=0;l<o;l+=1){var u=a[l],c=f[u],d=c&&c[0],p=c&&c[1];a[l]=p?{regex:d,parser:p}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},r=0,n=0;r<o;r+=1){var i=a[r];if("string"==typeof i)n+=i.length;else{var s=i.regex,l=i.parser,u=e.slice(n),c=s.exec(u)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var r=e.hours;t?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}(t),t}})(n)(r),l=o.year,u=o.month,c=o.day,d=o.hours,p=o.minutes,h=o.seconds,g=o.milliseconds,m=o.zone,y=o.week,v=new Date,b=c||(l||u?1:v.getDate()),w=l||v.getFullYear(),S=0;l&&!u||(S=u>0?u-1:v.getMonth());var E,_=d||0,C=p||0,O=h||0,k=g||0;return m?new Date(Date.UTC(w,S,b,_,C,O,k+60*m.offset*1e3)):i?new Date(Date.UTC(w,S,b,_,C,O,k)):(E=new Date(w,S,b,_,C,O,k),y&&(E=a(E).week(y).toDate()),E)}catch(e){return new Date("")}}(n,u,a,i),this.init(),p&&!0!==p&&(this.$L=this.locale(p).$L),(c||d)&&n!=this.format(u)&&(this.$d=new Date("")),s={}}else if(u instanceof Array)for(var h=u.length,g=1;g<=h;g+=1){o[1]=u[g-1];var m=i.apply(this,o);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}g===h&&(this.$d=new Date(""))}else l.call(this,r)}}}()},5541:(e,t,r)=>{var n="u">typeof globalThis&&globalThis||"u">typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();(function(e){var t=void 0!==i&&i||"u">typeof self&&self||void 0!==r.g&&r.g||{},n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function f(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=f(t);return t.readAsArrayBuffer(e),r}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(n.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(n.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;n.arrayBuffer&&n.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=d(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(n.blob)return this.blob().then(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,a=d(this);if(a)return a;
3if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},n.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=o(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[o(e)]},c.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},c.prototype.set=function(e,t){this.map[o(e)]=l(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),u(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),u(e)},n.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var m=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(e,r){if(!(this instanceof y))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,i,a=(r=r||{}).body;if(e instanceof y){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,r.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=r.credentials||this.credentials||"same-origin",(r.headers||!this.headers)&&(this.headers=new c(r.headers)),this.method=(i=(n=r.method||this.method||"GET").toUpperCase(),m.indexOf(i)>-1?i:n),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in t)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var w=[301,302,303,307,308];b.redirect=function(e,t){if(-1===w.indexOf(t))throw RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function S(r,i){return new Promise(function(a,s){var u=new y(r,i);if(u.signal&&u.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function f(){d.abort()}if(d.onload=function(){var e,t,r={statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}
3).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===u.url.indexOf("file://")&&(d.status<200||d.status>599)?r.status=200:r.status=d.status,r.url="responseURL"in d?d.responseURL:r.headers.get("X-Request-URL");var n="response"in d?d.response:d.responseText;setTimeout(function(){a(new b(n,r))},0)},d.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},d.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},d.open(u.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?d.withCredentials=!0:"omit"===u.credentials&&(d.withCredentials=!1),"responseType"in d&&(n.blob?d.responseType="blob":n.arrayBuffer&&(d.responseType="arraybuffer")),i&&"object"==typeof i.headers&&!(i.headers instanceof c||t.Headers&&i.headers instanceof t.Headers)){var p=[];Object.getOwnPropertyNames(i.headers).forEach(function(e){p.push(o(e)),d.setRequestHeader(e,l(i.headers[e]))}),u.headers.forEach(function(e,t){-1===p.indexOf(t)&&d.setRequestHeader(t,e)})}else u.headers.forEach(function(e,t){d.setRequestHeader(t,e)});u.signal&&(u.signal.addEventListener("abort",f),d.onreadystatechange=function(){4===d.readyState&&u.signal.removeEventListener("abort",f)}),d.send(void 0===u._bodyInit?null:u._bodyInit)})}S.polyfill=!0,t.fetch||(t.fetch=S,t.Headers=c,t.Request=y,t.Response=b),e.Headers=c,e.Request=y,e.Response=b,e.fetch=S,Object.defineProperty(e,"__esModule",{value:!0})})({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},5542:function(e,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var n={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};t.getSanitizedOptions=function(e){var t=r(r({},n),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}},5984:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(2770);let i={form:(0,n.wV)(`${n.DS}:form`),layout:(0,n.wV)(`${n.DS}:layout`),dictionary:(0,n.wV)(`${n.DS}:dictionary`),editing:(0,n.wV)(`${n.DS}:editing`),sitemap:(0,n.wV)(`${n.DS}:sitemap`),multisite:(0,n.wV)(`${n.DS}:multisite`),robots:(0,n.wV)(`${n.DS}:robots`),redirects:(0,n.wV)(`${n.DS}:redirects`),personalize:(0,n.wV)(`${n.DS}:personalize`),locale:(0,n.wV)(`${n.DS}:locale`),errorpages:(0,n.wV)(`${n.DS}:errorpages`)}},6056:(e,t,r)=>{"use strict";r.d(t,{B:()=>i,q:()=>a});var n=r(3813);let i=e=>{if(e.class){if(e.className){let t=e.className;t+=` ${e.class}`,e.className=t}else e.className=e.class;delete e.class}},a=e=>{let t={};return Object.entries(e).reduce((t,[r])=>(t[r]=(0,n.GR)(e,r),t),t)}},6557:function(e){e.exports=function(){"use strict";var e="millisecond",t="second",r="minute",n="hour",i="week",a="month",s="quarter",o="year",l="date",u="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},p="en",h={};h[p]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}};var g="$isDayjsObject",m=function(e){return e instanceof w||!(!e||!e[g])},y=function e(t,r,n){var i;if(!t)return p;if("string"==typeof t){var a=t.toLowerCase();h[a]&&(i=a),r&&(h[a]=r,i=a);var s=t.split("-");if(!i&&s.length>1)return e(s[0])}else{var o=t.name;h[o]=t,i=o}return!n&&i&&(p=i),i||!n&&p},v=function(e,t){if(m(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new w(r)},b={s:f,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+f(Math.floor(r/60),2,"0")+":"+f(r%60,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,a),s=r-i<0,o=t.clone().add(n+(s?-1:1),a);return+(-(n+(r-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(u){return({M:a,y:o,w:i,d:"day",D:l,h:n,m:r,s:t,ms:e,Q:s})[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=y,b.i=m,b.w=function(e,t){return v(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function f(e){this.$L=y(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[g]=!0}var p=f.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(c);if(n){var i=n[2]-1||0,a=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,a)}}return new Date(t)}(e),this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return b},p.isValid=function(){return this.$d.toString()!==u},p.isSame=function(e,t){var r=v(e);return this.startOf(t)<=r&&r<=this.endOf(t)},p.isAfter=function(e,t){return v(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<v(e)},p.$g=function(e,t,r){return b.u(e)?this[t]:this.set(r,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,s){var u=this,c=!!b.u(s)||s,d=b.p(e),f=function(e,t){var r=b.w(u.$u?Date.UTC(u.$y,t,e):new Date(u.$y,t,e),u);return c?r:r.endOf("day")},p=function(e,t){return b.w(u.toDate()[e].apply(u.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),u)},h=this.$W,g=this.$M,m=this.$D,y="set"+(this.$u?"UTC":"");switch(d){case o:return c?f(1,0):f(31,11);case a:return c?f(1,g):f(0,g+1);
3case i:var v=this.$locale().weekStart||0,w=(h<v?h+7:h)-v;return f(c?m-w:m+(6-w),g);case"day":case l:return p(y+"Hours",0);case n:return p(y+"Minutes",1);case r:return p(y+"Seconds",2);case t:return p(y+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(i,s){var u,c=b.p(i),d="set"+(this.$u?"UTC":""),f=((u={}).day=d+"Date",u[l]=d+"Date",u[a]=d+"Month",u[o]=d+"FullYear",u[n]=d+"Hours",u[r]=d+"Minutes",u[t]=d+"Seconds",u[e]=d+"Milliseconds",u)[c],p="day"===c?this.$D+(s-this.$W):s;if(c===a||c===o){var h=this.clone().set(l,1);h.$d[f](p),h.init(),this.$d=h.set(l,Math.min(this.$D,h.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[b.p(e)]()},p.add=function(e,s){var l,u=this;e=Number(e);var c=b.p(s),d=function(t){var r=v(u);return b.w(r.date(r.date()+Math.round(t*e)),u)};if(c===a)return this.set(a,this.$M+e);if(c===o)return this.set(o,this.$y+e);if("day"===c)return d(1);if(c===i)return d(7);var f=((l={})[r]=6e4,l[n]=36e5,l[t]=1e3,l)[c]||1,p=this.$d.getTime()+e*f;return b.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||u;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),a=this.$H,s=this.$m,o=this.$M,l=r.weekdays,c=r.months,f=r.meridiem,p=function(e,r,i,a){return e&&(e[r]||e(t,n))||i[r].slice(0,a)},h=function(e){return b.s(a%12||12,e,"0")},g=f||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(d,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return o+1;case"MM":return b.s(o+1,2,"0");case"MMM":return p(r.monthsShort,o,c,3);case"MMMM":return p(c,o);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,l,2);case"ddd":return p(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(a);case"HH":return b.s(a,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return g(a,s,!0);case"A":return g(a,s,!1);case"m":return String(s);case"mm":return b.s(s,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},p.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},p.diff=function(e,l,u){var c,d=this,f=b.p(l),p=v(e),h=(p.utcOffset()-this.utcOffset())*6e4,g=this-p,m=function(){return b.m(d,p)};switch(f){case o:c=m()/12;break;case a:c=m();break;case s:c=m()/3;break;case i:c=(g-h)/6048e5;break;case"day":c=(g-h)/864e5;break;case n:c=g/36e5;break;case r:c=g/6e4;break;case t:c=g/1e3;break;default:c=g}return u?c:b.a(c)},p.daysInMonth=function(){return this.endOf(a).$D},p.$locale=function(){return h[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=y(e,t,!0);return n&&(r.$L=n),r},p.clone=function(){return b.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},f}(),S=w.prototype;return v.prototype=S,[["$ms",e],["$s",t],["$m",r],["$H",n],["$W","day"],["$M",a],["$y",o],["$D",l]].forEach(function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),v.extend=function(e,t){return e.$i||(e(t,w,v),e.$i=!0),v},v.locale=y,v.isDayjs=m,v.unix=function(e){return v(1e3*e)},v.en=h[p],v.Ls=h,v.p={},v}()},6580:(e,t,r)=>{"use strict";r.d(t,{$O:()=>g,$r:()=>c,$u:()=>m,gn:()=>i,mv:()=>h,sI:()=>l});var n,i,a=r(7804),s=r(1282);let{UU:o}=a;(n=i||(i={})).READY="ready",n.RENDERED="rendered";let l=(e,t)=>{if(!window)return;let r=r=>d(r,e,t);return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},u=e=>["*"].some(t=>t===e.origin||RegExp("^"+t.replace(".","\\.").replace(/\*/g,".*")+"$").test(e.origin)),c=(e,t)=>!!e.origin&&!!e.data&&e.data.name===t||(u(e)||console.debug("Component Library: event skipped - invalid origin: message %s from origin %s",e.data.name,e.origin),!1),d=(e,t,r)=>{var n;let i=e.data;if(!e.origin||!i||"component:update"!==i.name){u(e)||console.debug("Component Library: event skipped: message %s from origin %s",i.name,e.origin);return}if(!(null==(n=i.details)?void 0:n.uid))return void console.debug("Received component:update event without uid, aborting event handler...");let a=f(t,i.details.uid);return a?(console.debug("Found component with uid %s to update. Update fields: %o. Update params: %o.",i.details.uid,i.details.fields,i.details.params),p(a,i.details.fields,i.details.params),r&&r(t)):console.debug("Rendering with uid %s not found",i.details.uid),t},f=(e,t)=>{var r;if((null==(r=e.uid)?void 0:r.toLowerCase())===t.toLowerCase())return e;if(e.placeholders)for(let r of Object.keys(e.placeholders))for(let n of e.placeholders[r]){let e=f(n,t);if(e)return e}return null},p=(e,t,r)=>{t&&(e.fields=Object.assign(Object.assign({},e.fields),t)),r&&(e.params=Object.assign(Object.assign({},e.params),r))};function h(e,t,r=!1){return{name:"component:status",message:{status:e,uid:t,isRenderingServerComponent:r}}}function g(e=a.Ty){return`${(0,s.l)(e)}
3/v1/files/designlibrary/lib/rh-lib-script.js`}let m=e=>{if("u"<typeof window)return;let t=window.parent&&window.parent!==window?window.parent:window;try{console.log("Component Library: sending event",e.name,e),t.postMessage(e,"*")}catch(t){console.error(`Component Library: postMessage failed. ${o.CONTACT_SUPPORT}`,t,e)}}},6588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={ServerInsertedHTMLContext:function(){return s},useServerInsertedHTML:function(){return o}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(8365)._(r(4232)),s=a.default.createContext(null);function o(e){let t=(0,a.useContext)(s);t&&t(e)}},6652:(e,t,r)=>{"use strict";r.d(t,{V:()=>ek});let n=JSON,i=/\r\n|[\n\r]/g;function a(e,t){let r=0,n=1;for(let a of e.body.matchAll(i)){if("number"==typeof a.index||function(e){if(!e)throw Error("Unexpected invariant triggered.")}(!1),a.index>=t)break;r=a.index+a[0].length,n+=1}return{line:n,column:t+1-r}}function s(e,t){let r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,a=e.locationOffset.line-1,s=t.line+a,l=1===t.line?r:0,u=t.column+l,c=`${e.name}:${s}:${u}
4`,d=n.split(/\r\n|[\n\r]/g),f=d[i];if(f.length>120){let e=Math.floor(u/80),t=[];for(let e=0;e<f.length;e+=80)t.push(f.slice(e,e+80));return c+o([[`${s} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(u%80)],["|",t[e+1]]])}return c+o([[`${s-1} |`,d[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,d[i+1]]])}function o(e){let t=e.filter(([e,t])=>void 0!==t),r=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(r)+(t?" "+t:"")).join("\n")}class l extends Error{constructor(e,...t){var r,n,i;const{nodes:s,source:o,positions:c,path:d,originalError:f,extensions:p}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=d?d:void 0,this.originalError=null!=f?f:void 0,this.nodes=u(Array.isArray(s)?s:s?[s]:void 0);const h=u(null==(r=this.nodes)?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=o?o:null==h||null==(n=h[0])?void 0:n.source,this.positions=null!=c?c:null==h?void 0:h.map(e=>e.start),this.locations=c&&o?c.map(e=>a(o,e)):null==h?void 0:h.map(e=>a(e.source,e.start));const g=!function(e){return"object"==typeof e&&null!==e}(null==f?void 0:f.extensions)||null==f?void 0:f.extensions;this.extensions=null!=(i=null!=p?p:g)?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=f&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,l):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let r of this.nodes){var t;r.loc&&(e+="\n\n"+s((t=r.loc).source,a(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+s(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function u(e){return void 0===e||0===e.length?void 0:e}function c(e,t,r){return new l(`Syntax Error: ${r}`,{source:e,positions:[t]})}class d{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class f{constructor(e,t,r,n,i,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let p={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
4Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:["name","directives"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},h=new Set(Object.keys(p));function g(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&h.has(t)}function m(e){return 9===e||32===e}function y(e){return e>=48&&e<=57}function v(e){return e>=97&&e<=122||e>=65&&e<=90}function b(e){return v(e)||95===e}(K=ee||(ee={})).QUERY="query",K.MUTATION="mutation",K.SUBSCRIPTION="subscription",(Z=et||(et={})).QUERY="QUERY",Z.MUTATION="MUTATION",Z.SUBSCRIPTION="SUBSCRIPTION",Z.FIELD="FIELD",Z.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",Z.FRAGMENT_SPREAD="FRAGMENT_SPREAD",Z.INLINE_FRAGMENT="INLINE_FRAGMENT",Z.VARIABLE_DEFINITION="VARIABLE_DEFINITION",Z.SCHEMA="SCHEMA",Z.SCALAR="SCALAR",Z.OBJECT="OBJECT",Z.FIELD_DEFINITION="FIELD_DEFINITION",Z.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",Z.INTERFACE="INTERFACE",Z.UNION="UNION",Z.ENUM="ENUM",Z.ENUM_VALUE="ENUM_VALUE",Z.INPUT_OBJECT="INPUT_OBJECT",Z.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",Z.DIRECTIVE_DEFINITION="DIRECTIVE_DEFINITION",(J=er||(er={})).NAME="Name",J.DOCUMENT="Document",J.OPERATION_DEFINITION="OperationDefinition",J.VARIABLE_DEFINITION="VariableDefinition",J.SELECTION_SET="SelectionSet",J.FIELD="Field",J.ARGUMENT="Argument",J.FRAGMENT_SPREAD="FragmentSpread",J.INLINE_FRAGMENT="InlineFragment",J.FRAGMENT_DEFINITION="FragmentDefinition",J.VARIABLE="Variable",J.INT="IntValue",J.FLOAT="FloatValue",J.STRING="StringValue",J.BOOLEAN="BooleanValue",J.NULL="NullValue",J.ENUM="EnumValue",J.LIST="ListValue",J.OBJECT="ObjectValue",J.OBJECT_FIELD="ObjectField",J.DIRECTIVE="Directive",J.NAMED_TYPE="NamedType",J.LIST_TYPE="ListType",J.NON_NULL_TYPE="NonNullType",J.SCHEMA_DEFINITION="SchemaDefinition",J.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",J.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",J.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",J.FIELD_DEFINITION="FieldDefinition",J.INPUT_VALUE_DEFINITION="InputValueDefinition",J.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",J.UNION_TYPE_DEFINITION="UnionTypeDefinition",J.ENUM_TYPE_DEFINITION="EnumTypeDefinition",J.ENUM_VALUE_DEFINITION="EnumValueDefinition",J.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",J.DIRECTIVE_DEFINITION="DirectiveDefinition",J.SCHEMA_EXTENSION="SchemaExtension",J.DIRECTIVE_EXTENSION="DirectiveExtension",J.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",J.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",J.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",J.UNION_TYPE_EXTENSION="UnionTypeExtension",J.ENUM_TYPE_EXTENSION="EnumTypeExtension",J.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",J.TYPE_COORDINATE="TypeCoordinate",J.MEMBER_COORDINATE="MemberCoordinate",J.ARGUMENT_COORDINATE="ArgumentCoordinate",J.DIRECTIVE_COORDINATE="DirectiveCoordinate",J.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate",(X=en||(en={})).SOF="<SOF>",X.EOF="<EOF>",X.BANG="!",X.DOLLAR="$",X.AMP="&",X.PAREN_L="(",X.PAREN_R=")",X.DOT=".",X.SPREAD="...",X.COLON=":",X.EQUALS="=",X.AT="@",X.BRACKET_L="[",X.BRACKET_R="]",X.BRACE_L="{",X.PIPE="|",X.BRACE_R="}
4",X.NAME="Name",X.INT="Int",X.FLOAT="Float",X.STRING="String",X.BLOCK_STRING="BlockString",X.COMMENT="Comment";class w{constructor(e){const t=new f(en.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==en.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let r=e.source.body,n=r.length,i=t;for(;i<n;){let t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return function(e,t){let r=e.source.body,n=r.length,i=t+1;for(;i<n;){let e=r.charCodeAt(i);if(10===e||13===e)break;if(S(e))++i;else if(E(r,i))i+=2;else break}return k(e,en.COMMENT,t,i,r.slice(t+1,i))}(e,i);case 33:return k(e,en.BANG,i,i+1);case 36:return k(e,en.DOLLAR,i,i+1);case 38:return k(e,en.AMP,i,i+1);case 40:return k(e,en.PAREN_L,i,i+1);case 41:return k(e,en.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return k(e,en.SPREAD,i,i+3);break;case 58:return k(e,en.COLON,i,i+1);case 61:return k(e,en.EQUALS,i,i+1);case 64:return k(e,en.AT,i,i+1);case 91:return k(e,en.BRACKET_L,i,i+1);case 93:return k(e,en.BRACKET_R,i,i+1);case 123:return k(e,en.BRACE_L,i,i+1);case 124:return k(e,en.PIPE,i,i+1);case 125:return k(e,en.BRACE_R,i,i+1);case 34:if(34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2))return function(e,t){let r=e.source.body,n=r.length,i=e.lineStart,a=t+3,s=a,o="",l=[];for(;a<n;){let n=r.charCodeAt(a);if(34===n&&34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)){o+=r.slice(s,a),l.push(o);let n=k(e,en.BLOCK_STRING,t,a+3,(function(e){var t,r;let n=Number.MAX_SAFE_INTEGER,i=null,a=-1;for(let t=0;t<e.length;++t){let s=e[t],o=function(e){let t=0;for(;t<e.length&&m(e.charCodeAt(t));)++t;return t}(s);o!==s.length&&(i=null!=(r=i)?r:t,a=t,0!==t&&o<n&&(n=o))}return e.map((e,t)=>0===t?e:e.slice(n)).slice(null!=(t=i)?t:0,a+1)})(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,n}if(92===n&&34===r.charCodeAt(a+1)&&34===r.charCodeAt(a+2)&&34===r.charCodeAt(a+3)){o+=r.slice(s,a),s=a+1,a+=4;continue}if(10===n||13===n){o+=r.slice(s,a),l.push(o),13===n&&10===r.charCodeAt(a+1)?a+=2:++a,o="",s=a,i=a;continue}if(S(n))++a;else if(E(r,a))a+=2;else throw c(e.source,a,`Invalid character within String: ${O(e,a)}.`)}throw c(e.source,a,"Unterminated string.")}(e,i);return function(e,t){let r=e.source.body,n=r.length,i=t+1,a=i,s="";for(;i<n;){let n=r.charCodeAt(i);if(34===n)return s+=r.slice(a,i),k(e,en.STRING,t,i+1,s);if(92===n){s+=r.slice(a,i);let t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?function(e,t){let r=e.source.body,n=0,i=3;for(;i<12;){let e=r.charCodeAt(t+i++);if(125===e){if(i<5||!S(n))break;return{value:String.fromCodePoint(n),size:i}}if((n=n<<4|T(e))<0)break}throw c(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}(e,i):function(e,t){let r=e.source.body,n=A(r,t+2);if(S(n))return{value:String.fromCodePoint(n),size:6};if(_(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){let e=A(r,t+8);if(C(e))return{value:String.fromCodePoint(n,e),size:12}}throw c(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}(e,i):function(e,t){let r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"	",size:2}}throw c(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}(e,i);s+=t.value,i+=t.size,a=i;continue}if(10===n||13===n)break;if(S(n))++i;else if(E(r,i))i+=2;else throw c(e.source,i,`Invalid character within String: ${O(e,i)}.`)}throw c(e.source,i,"Unterminated string.")}(e,i)}if(y(t)||45===t)return function(e,t,r){let n=e.source.body,i=t,a=r,s=!1;if(45===a&&(a=n.charCodeAt(++i)),48===a){if(y(a=n.charCodeAt(++i)))throw c(e.source,i,`Invalid number, unexpected digit after 0: ${O(e,i)}.`)}else i=I(e,i,a),a=n.charCodeAt(i);if(46===a&&(s=!0,a=n.charCodeAt(++i),i=I(e,i,a),a=n.charCodeAt(i)),(69===a||101===a)&&(s=!0,(43===(a=n.charCodeAt(++i))||45===a)&&(a=n.
4charCodeAt(++i)),i=I(e,i,a),a=n.charCodeAt(i)),46===a||b(a))throw c(e.source,i,`Invalid number, expected digit but got: ${O(e,i)}.`);return k(e,s?en.FLOAT:en.INT,t,i,n.slice(t,i))}(e,i,t);if(b(t))return function(e,t){let r=e.source.body,n=r.length,i=t+1;for(;i<n;){var a;if(v(a=r.charCodeAt(i))||y(a)||95===a)++i;else break}return k(e,en.NAME,t,i,r.slice(t,i))}(e,i);throw c(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":S(t)||E(r,i)?`Unexpected character: ${O(e,i)}.`:`Invalid character: ${O(e,i)}.`)}return k(e,en.EOF,n,n)}(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===en.COMMENT);return e}}function S(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function E(e,t){return _(e.charCodeAt(t))&&C(e.charCodeAt(t+1))}function _(e){return e>=55296&&e<=56319}function C(e){return e>=56320&&e<=57343}function O(e,t){let r=e.source.body.codePointAt(t);if(void 0===r)return en.EOF;if(r>=32&&r<=126){let e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function k(e,t,r,n,i){let a=e.line,s=1+r-e.lineStart;return new f(t,r,n,a,s,i)}function I(e,t,r){if(!y(r))throw c(e.source,t,`Invalid number, expected digit but got: ${O(e,t)}.`);let n=e.source.body,i=t+1;for(;y(n.charCodeAt(i));)++i;return i}function A(e,t){return T(e.charCodeAt(t))<<12|T(e.charCodeAt(t+1))<<8|T(e.charCodeAt(t+2))<<4|T(e.charCodeAt(t+3))}function T(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function x(e,t){if(!e)throw Error(t)}function R(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){let r;if(null===e)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if("function"==typeof e.toJSON){let t=e.toJSON();if(t!==e)return"string"==typeof t?t:R(t,n)}else if(Array.isArray(e)){var i,a,s=e,o=n;if(0===s.length)return"[]";if(o.length>2)return"[Array]";let t=Math.min(10,s.length),r=s.length-t,l=[];for(let e=0;e<t;++e)l.push(R(s[e],o));return 1===r?l.push("... 1 more item"):r>1&&l.push(`... ${r} more items`),"["+l.join(", ")+"]"}return i=e,a=n,0===(r=Object.entries(i)).length?"{}":a.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(i)+"]":"{ "+r.map(([e,t])=>e+": "+R(t,a)).join(", ")+" }"}(e,t);default:return String(e)}}let N=globalThis.process&&1?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var r;let n=t.prototype[Symbol.toStringTag];if(n===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null==(r=e.constructor)?void 0:r.name)){let t=R(e,[]);throw Error(`Cannot use ${n} "${t}" from another module or realm.
5
6Ensure that there is only one instance of "graphql" in the node_modules
7directory. If different versions of "graphql" are the dependencies of other
8relied on modules, use "resolutions" to ensure only one version is installed.
9
10https://yarnpkg.com/en/docs/selective-version-resolutions
11
12Duplicate "graphql" modules cannot be used at the same time since different
13versions may have different capabilities and behavior. The data from one
14version used in the function from another could produce confusing and
15spurious results.`)}}return!1};class j{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||x(!1,`Body must be a string. Received: ${function(e){return R(e,[])}(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||x(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||x(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class P{constructor(e,t={}){const{lexer:r,...n}=t;if(r)this._lexer=r;else{const t=!function(e){return N(e,j)}(e)?new j(e):e;this._lexer=new w(t)}this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(en.NAME);return this.node(e,{kind:er.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:er.DOCUMENT,definitions:this.many(en.SOF,this.parseDefinition,en.EOF)})}parseDefinition(){if(this.peek(en.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;
15if(e&&t.kind===en.BRACE_L)throw c(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===en.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw c(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e,t=this._lexer.token;if(this.peek(en.BRACE_L))return this.node(t,{kind:er.OPERATION_DEFINITION,operation:ee.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseDescription(),n=this.parseOperationType();return this.peek(en.NAME)&&(e=this.parseName()),this.node(t,{kind:er.OPERATION_DEFINITION,operation:n,description:r,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(en.NAME);switch(e.value){case"query":return ee.QUERY;case"mutation":return ee.MUTATION;case"subscription":return ee.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(en.PAREN_L,this.parseVariableDefinition,en.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:er.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(en.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(en.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(en.DOLLAR),this.node(e,{kind:er.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:er.SELECTION_SET,selections:this.many(en.BRACE_L,this.parseSelection,en.BRACE_R)})}parseSelection(){return this.peek(en.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(en.COLON)?(e=n,t=this.parseName()):t=n,this.node(r,{kind:er.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(en.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(en.PAREN_L,t,en.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,r=this.parseName();return this.expectToken(en.COLON),this.node(t,{kind:er.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(en.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(en.NAME)?this.node(e,{kind:er.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:er.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:er.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:er.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case en.BRACKET_L:return this.parseList(e);case en.BRACE_L:return this.parseObject(e);case en.INT:return this.advanceLexer(),this.node(t,{kind:er.INT,value:t.value});case en.FLOAT:return this.advanceLexer(),this.node(t,{kind:er.FLOAT,value:t.value});case en.STRING:case en.BLOCK_STRING:return this.parseStringLiteral();case en.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:er.BOOLEAN,value:!0});case"false":return this.node(t,{kind:er.BOOLEAN,value:!1});case"null":return this.node(t,{kind:er.NULL});default:return this.node(t,{kind:er.ENUM,value:t.value})}case en.DOLLAR:if(e){if(this.expectToken(en.DOLLAR),this._lexer.token.kind===e
15n.NAME){let e=this._lexer.token.value;throw c(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:er.STRING,value:e.value,block:e.kind===en.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:er.LIST,values:this.any(en.BRACKET_L,t,en.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:er.OBJECT,fields:this.any(en.BRACE_L,t,en.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,r=this.parseName();return this.expectToken(en.COLON),this.node(t,{kind:er.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(en.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(en.AT),this.node(t,{kind:er.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e,t=this._lexer.token;if(this.expectOptionalToken(en.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(en.BRACKET_R),e=this.node(t,{kind:er.LIST_TYPE,type:r})}else e=this.parseNamedType();return this.expectOptionalToken(en.BANG)?this.node(t,{kind:er.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:er.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(en.STRING)||this.peek(en.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),n=this.many(en.BRACE_L,this.parseOperationTypeDefinition,en.BRACE_R);return this.node(e,{kind:er.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(en.COLON);let r=this.parseNamedType();return this.node(e,{kind:er.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:er.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:er.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(en.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(en.BRACE_L,this.parseFieldDefinition,en.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(en.COLON);let i=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:er.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:a})}parseArgumentDefs(){return this.optionalMany(en.PAREN_L,this.parseInputValueDef,en.PAREN_R)}parseInputValueDef(){let e,t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(en.COLON);let i=this.parseTypeReference();this.expectOptionalToken(en.EQUALS)&&(e=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:er.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:e,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(e,{kind:er.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:a})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:er.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(en.EQUALS)?this.delimitedMany(en.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:er.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(en.BRACE_L,this.parseEnumValueDefinition,en.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:er.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw c(this._lexer.source,this._lexer.token.start,`${D(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:er.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(en.BRACE_L,this.parseInputValueDef,en.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();
15if(e.kind===en.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension();case"directive":if(this._options.experimentalDirectivesOnDirectiveDefinitions)return this.parseDirectiveDefinitionExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),r=this.optionalMany(en.BRACE_L,this.parseOperationTypeDefinition,en.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:er.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:er.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:er.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:er.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:er.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:er.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:er.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinitionExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("directive"),this.expectToken(en.AT);let t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:er.DIRECTIVE_EXTENSION,name:t,directives:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(en.AT);let r=this.parseName(),n=this.parseArgumentDefs(),i=this._options.experimentalDirectivesOnDirectiveDefinitions?this.parseConstDirectives():[],a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:er.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,directives:i,repeatable:a,locations:s})}parseDirectiveLocations(){return this.delimitedMany(en.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(et,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e,t,r=this._lexer.token,n=this.expectOptionalToken(en.AT),i=this.parseName();return(!n&&this.expectOptionalToken(en.DOT)&&(e=this.parseName()),(n||e)&&this.expectOptionalToken(en.PAREN_L)&&(t=this.parseName(),this.expectToken(en.COLON),this.expectToken(en.PAREN_R)),n)?t?this.node(r,{kind:er.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:t}):this.node(r,{kind:er.DIRECTIVE_COORDINATE,name:i}):e?t?this.node(r,{kind:er.ARGUMENT_COORDINATE,name:i,fieldName:e,argumentName:t}):this.node(r,{kind:er.MEMBER_COORDINATE,name:i,memberName:e}):this.node(r,{kind:er.TYPE_COORDINATE,name:i})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new d(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw c(this._lexer.source,t.start,`Expected ${M(e)}, found ${D(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;
15if(t.kind===en.NAME&&t.value===e)this.advanceLexer();else throw c(this._lexer.source,t.start,`Expected "${e}", found ${D(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===en.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return c(this._lexer.source,t.start,`Unexpected ${D(t)}.`)}any(e,t,r){this.expectToken(e);let n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);let n=[];do n.push(t.call(this));while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);let r=[];do r.push(t.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==en.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw c(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function D(e){let t=e.value;return M(e.kind)+(null!=t?` "${t}"`:"")}function M(e){return e===en.BANG||e===en.DOLLAR||e===en.AMP||e===en.PAREN_L||e===en.PAREN_R||e===en.DOT||e===en.SPREAD||e===en.COLON||e===en.EQUALS||e===en.AT||e===en.BRACKET_L||e===en.BRACKET_R||e===en.BRACE_L||e===en.PIPE||e===en.BRACE_R?`"${e}"`:e}let L=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function F(e){return q[e.charCodeAt(0)]}let q=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],U=Object.freeze({}),$={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>V(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=H(e.variableDefinitions)?B("(\n",V(e.variableDefinitions,"\n"),"\n)"):B("(",V(e.variableDefinitions,", "),")"),r=B("",e.description,"\n")+V([e.operation,V([e.name,t]),V(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n,description:i})=>B("",i,"\n")+e+": "+t+B(" = ",r)+B(" ",V(n," "))},SelectionSet:{leave:({selections:e})=>z(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){let a=B("",e,": ")+t,s=a+B("(",V(r,", "),")");return s.length>80&&(s=a+B("(\n",G(V(r,"\n")),"\n)")),V([s,V(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+B(" ",V(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>V(["...",B("on ",e),V(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i,description:a})=>B("",a,"\n")+`fragment ${e}${B("(",V(r,", "),")")} `+`on ${t} ${B("",V(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>{let r,n,i,a,s,o,l,u,c,d,f;return t?(i=1===(n=(r=e.replace(/"""/g,'\\"""')).split(/\r\n|[\n\r]/g)).length,a=n.length>1&&n.slice(1).every(e=>0===e.length||m(e.charCodeAt(0))),s=r.endsWith('\\"""'),o=e.endsWith('"')&&!s,l=e.endsWith("\\"),u=o||l,c=!i||e.length>70||u||a||s,d="",f=i&&m(e.charCodeAt(0)),(c&&!f||a)&&(d+="\n"),d+=r,(c||u)&&(d+="\n"),'"""'+d+'"""'):`"${e.replace(L,F)}"`}},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+V(e,", ")+"]"}
15,ObjectValue:{leave:({fields:e})=>"{"+V(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+B("(",V(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>B("",e,"\n")+V(["schema",V(t," "),z(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>B("",e,"\n")+V(["scalar",t,V(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>B("",e,"\n")+V(["type",t,B("implements ",V(r," & ")),V(n," "),z(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>B("",e,"\n")+t+(H(r)?B("(\n",G(V(r,"\n")),"\n)"):B("(",V(r,", "),")"))+": "+n+B(" ",V(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>B("",e,"\n")+V([t+": "+r,B("= ",n),V(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>B("",e,"\n")+V(["interface",t,B("implements ",V(r," & ")),V(n," "),z(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>B("",e,"\n")+V(["union",t,V(r," "),B("= ",V(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>B("",e,"\n")+V(["enum",t,V(r," "),z(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>B("",e,"\n")+V([t,V(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>B("",e,"\n")+V(["input",t,V(r," "),z(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,directives:n,repeatable:i,locations:a})=>B("",e,"\n")+"directive @"+t+(H(r)?B("(\n",G(V(r,"\n")),"\n)"):B("(",V(r,", "),")"))+B(" ",V(n," "))+(i?" repeatable":"")+" on "+V(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>V(["extend schema",V(e," "),z(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>V(["extend scalar",e,V(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>V(["extend type",e,B("implements ",V(t," & ")),V(r," "),z(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>V(["extend interface",e,B("implements ",V(t," & ")),V(r," "),z(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>V(["extend union",e,V(t," "),B("= ",V(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>V(["extend enum",e,V(t," "),z(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>V(["extend input",e,V(t," "),z(r)]," ")},DirectiveExtension:{leave:({name:e,directives:t})=>V(["extend directive @"+e,V(t," ")]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>V([e,B(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:r})=>V([e,B(".",t),B("(",r,":)")])},DirectiveCoordinate:{leave:({name:e})=>V(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>V(["@",e,B("(",t,":)")])}};function V(e,t=""){var r;return null!=(r=null==e?void 0:e.filter(e=>e).join(t))?r:""}function z(e){return B("{\n",G(V(e,"\n")),"\n}")}function B(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function G(e){return B("  ",e.replace(/\n/g,"\n  "))}function H(e){var t;return null!=(t=null==e?void 0:e.some(e=>e.includes("\n")))&&t}let Q=e=>{let t,r=e.definitions.filter(e=>"OperationDefinition"===e.kind);return 1===r.length&&(t=r[0]?.name?.value),t},Y=e=>{if("string"==typeof e){let t;try{let r,n,i=(n=(r=new P(e,void 0)).parseDocument(),Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n);t=Q(i)}catch(e){}return{query:e,operationName:t}}let t=Q(e);return{query:function(e,t,r=p){let n,i,a,s=new Map;for(let e of Object.values(er))s.set(e,function(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let o=Array.isArray(e),l=[e],u=-1,c=[],d=e,f=[],h=[];do{var m,y,v;let e,p=++u===l.length,b=p&&0!==c.length;if(p){if(i=0===h.length?void 0:f[f.length-1],d=a,a=h.pop(),b)if(o){d=d.slice();let e=0;for(let[t,r]of c){let n=t-e;null===r?(d.splice(n,1),e++):d[n]=r}}else for(let[e,t]of(d={...d},c))d[e]=t;u=n.index,l=n.keys,c=n.edits,o=n.inArray,n=n.prev}else if(a){if(null==(d=a[i=o?u:l[u]]))continue;f.push(i)}if(!Array.isArray(d)){g(d)||x(!1,`Invalid AST Node: ${R(d,[])}.`);
15let r=p?null==(m=s.get(d.kind))?void 0:m.leave:null==(y=s.get(d.kind))?void 0:y.enter;if((e=null==r?void 0:r.call(t,d,i,a,f,h))===U)break;if(!1===e){if(!p){f.pop();continue}}else if(void 0!==e&&(c.push([i,e]),!p))if(g(e))d=e;else{f.pop();continue}}void 0===e&&b&&c.push([i,d]),p?f.pop():(n={inArray:o,index:u,keys:l,edits:c,prev:n},l=(o=Array.isArray(d))?d:null!=(v=r[d.kind])?v:[],u=-1,c=[],a&&h.push(a),a=d)}while(void 0!==n);return 0!==c.length?c[c.length-1][1]:e}(e,$),operationName:t}};class W extends Error{constructor(e,t){super(`${W.extractMessage(e)}: ${JSON.stringify({response:e,request:t})}`),Object.setPrototypeOf(this,W.prototype),this.response=e,this.request=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,W)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${e.status})`}}var K,Z,J,X,ee,et,er,en,ei=r(5541),ea=r.t(ei,2);let es="ping",eo="pong",el="complete";class eu{get type(){return this._type}get id(){return this._id}get payload(){return this._payload}constructor(e,t,r){this._type=e,this._payload=t,this._id=r}get text(){let e={type:this.type};return null!=this.id&&void 0!=this.id&&(e.id=this.id),null!=this.payload&&void 0!=this.payload&&(e.payload=this.payload),JSON.stringify(e)}static parse(e,t){let{type:r,payload:n,id:i}=JSON.parse(e);return new eu(r,t(n),i)}}class ec{constructor(e,{onInit:t,onAcknowledged:r,onPing:n,onPong:i}){this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=e,e.addEventListener("open",async r=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={},e.send(new eu("connection_init",t?await t():null).text)}),e.addEventListener("close",e=>{this.socketState.acknowledged=!1,this.socketState.subscriptions={}}),e.addEventListener("error",e=>{console.error(e)}),e.addEventListener("message",t=>{try{let a=function(e,t=e=>e){return eu.parse(e,t)}(t.data);switch(a.type){case"connection_ack":this.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(this.socketState.acknowledged=!0,r&&r(a.payload));return;case es:n?n(a.payload).then(t=>e.send(ed(t).text)):e.send(ed(null).text);return;case eo:i&&i(a.payload);return}if(!this.socketState.acknowledged||void 0===a.id||null===a.id||!this.socketState.subscriptions[a.id])return;let{query:s,variables:o,subscriber:l}=this.socketState.subscriptions[a.id];switch(a.type){case"next":!a.payload.errors&&a.payload.data&&l.next&&l.next(a.payload.data),a.payload.errors&&l.error&&l.error(new W({...a.payload,status:200},{query:s,variables:o}));return;case"error":l.error&&l.error(new W({errors:a.payload,status:200},{query:s,variables:o}));return;case el:l.complete&&l.complete(),delete this.socketState.subscriptions[a.id];return}}catch(t){console.error(t),e.close(1006)}e.close(4400,"Unknown graphql-ws message.")})}makeSubscribe(e,t,r,n){let i=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[i]={query:e,variables:n,subscriber:r},this.socket.send(new eu("subscribe",{query:e,operationName:t,variables:n},i).text),()=>{this.socket.send(new eu(el,void 0,i).text),delete this.socketState.subscriptions[i]}}rawRequest(e,t){return new Promise((r,n)=>{let i;this.rawSubscribe(e,{next:(e,t)=>i={data:e,extensions:t},error:n,complete:()=>r(i)},t)})}request(e,t){return new Promise((r,n)=>{let i;this.subscribe(e,{next:e=>i=e,error:n,complete:()=>r(i)},t)})}subscribe(e,t,r){let{query:n,operationName:i}=Y(e);return this.makeSubscribe(n,i,t,r)}rawSubscribe(e,t,r){return this.makeSubscribe(e,void 0,t,r)}ping(e){this.socket.send(new eu(es,e,void 0).text)}close(){this.socket.close(1e3)}}function ed(e){return new eu(eo,e,void 0)}ec.PROTOCOL="graphql-transport-ws";let ef=e=>{let t={};if(e)if("u">typeof Headers&&e instanceof Headers||ea&&ei.Headers&&e instanceof ei.Headers){let r;r={},e.forEach((e,t)=>{r[t]=e}),t=r}else Array.isArray(e)?e.forEach(([e,r])=>{e&&void 0!==r&&(t[e]=r)}):t=e;return t},ep=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim();class eh{constructor(e,t={}){this.url=e,this.requestConfig=t,this.rawRequest=async(...e)=>{let[t,r,n]=e,i=t.query?t:{query:t,variables:r,requestHeaders:n,signal:void 0},{headers:a,fetch:s=ei,method:o="POST",requestMiddleware:l,responseMiddleware:u,...c}=this.requestConfig,{url:d}=this;void 0!==i.signal&&(c.signal=i.signal);let{operationName:f}=Y(i.query);return eg({url:d,query:i.query,variables:i.variables,headers:{...ef(ev(a)),...ef(i.requestHeaders)},operationName:f,fetch:s,method:o,fetchOptions:c,middleware:l}).then(e=>(u&&u(e),e)).catch(e=>{throw u&&u(e),e})}}async request(e,...t){let[r,n]=t,i=e.document?e:{document:e,variables:r,requestHeaders:n,signal:void 0},{headers:a,fetch:s=ei,method:o="POST",requestMiddleware:l,responseMiddleware:u,...c}=this.requestConfig,{url:d}=this;void 0!==i.signal&&(c.signal=i.signal);let{query:f,operationName:p}=Y(i.document);return eg({url:d,query:f,variables:i.variables,headers:{...ef(ev(a)),...ef(i.requestHeaders)},operationName:p,fetch:s,method:o,fetchOptions:c,middleware:l}).then(e=>(u&&u(e),e.data)).catch(e=>{throw u&&u(e),e})}batchRequests(e,t){let r=e.documents?e:{documents:e,requestHeaders:t,signal:void 0},{headers:n,...i}=this.requestConfig;void 0!==r.signal&&(i.signal=r.signal);let a=r.documents.map(({document:e})=>Y(e).query),s=r.documents.map(({variables:e})=>e);return eg({url:this.url,query:a,variables:s,headers:{...ef(ev(n)),...ef(r.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??ei,method:this.requestConfig.method||"POST",fetchOptions:i,middleware:this.requestConfig.requestMiddleware}).then(e=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e.data)).catch(e=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(e),e})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){let{headers:r}=this.requestConfig;return r?r[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}}let eg=async e=>{let t,{query:r,variables:i,fetchOptions:a}=e,s=(t=(e.method??"post").toUpperCase(),async e=>{let r,{url:i,query:a,variables:s,operationName:o,fetch:l,fetchOptions:u,middleware:c}=e,d={...e.headers},f="";"POST"===t?"string"==typeof(r=em(a,s,o,u.jsonSerializer))&&(d["Content-Type"]="application/json"):f=(e=>{if(!Array.isArray(e.query)){let t=[`query=${encodeURIComponent(ep(e.query))}`];return e.variables&&t.push(`variables=${encodeURIComponent(e.jsonSerializer.stringify(e.variables))}`),e.operationName&&t.push(`operationName=${encodeURIComponent(e.operationName)}`),t.join("&")}if(void 0!==e.variables&&!Array.isArray(e.variables))throw Error("Cannot create query with given variable type, array expected");let t=e.query.reduce((t,r,n)=>(t.push({query:ep(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[n]):void 0}),t),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(t))}`})({query:a,variables:s,operationName:o,jsonSerializer:u.jsonSerializer??n});let p={method:t,headers:d,body:r,...u},h=i,g=p;if(c){let{url:e,...t}=await Promise.resolve(c({...p,url:i,operationName:o,variables:s}));h=e,g=t}return f&&(h=`${h}?${f}`),await l(h,g)}),o=Array.isArray(e.query),l=await s(e),u=await ey(l,a.jsonSerializer??n),c=Array.isArray(u)?!u.some(({data:e})=>!e):!!u.data,d=Array.isArray(u)||!u.errors||Array.isArray(u.errors)&&!u.errors.length||"all"===a.errorPolicy||"ignore"===a.errorPolicy;if(l.ok&&d&&c){let{errors:e,...t}=(Array.isArray(u),u),r="ignore"===a.errorPolicy?t:u;return{...o?{data:r}:r,headers:l.headers,status:l.status}}throw new W({..."string"==typeof u?{error:u}:u,status:l.status,headers:l.headers},{query:r,variables:i})},em=(e,t,r,i)=>{let a=i??n;if(!Array.isArray(e))return a.stringify({query:e,variables:t,operationName:r});if(void 0!==t&&!Array.isArray(t))throw Error("Cannot create request body with given variable type, array expected");let s=e.reduce((e,r,n)=>(e.push({query:r,variables:t?t[n]:void 0}),e),[]);return a.stringify(s)},ey=async(e,t)=>{let r;
15return(e.headers.forEach((e,t)=>{"content-type"===t.toLowerCase()&&(r=e)}),r&&(r.toLowerCase().startsWith("application/json")||r.toLowerCase().startsWith("application/graphql+json")||r.toLowerCase().startsWith("application/graphql-response+json")))?t.parse(await e.text()):e.text()},ev=e=>"function"==typeof e?e():e;var eb=r(2544),ew=r.n(eb),eS=r(2770),eE=r(4090),e_=r(63);class eC{constructor(e,t={}){var r;if(this.endpoint=e,this.headers={},t.apiKey&&(this.headers.sc_apikey=t.apiKey),t.headers&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),t.contextId&&(this.headers["x-sitecore-contextid"]=t.contextId),!e||!ew()(e).hostname)throw Error(`Invalid GraphQL endpoint '${e}'. Verify that appropriate environment variable is set`);this.timeout=t.timeout,this.retries=null!=(r=t.retries)?r:3,this.retryStrategy=t.retryStrategy||new e_.H({statusCodes:[429,502,503,504,520,521,522,523,524]}),this.client=new eh(e,{headers:this.headers,fetch:t.fetch}),this.debug=t.debugger||eS.Ay.http}static createClientFactory({endpoint:e,apiKey:t,contextId:r}){return (n={})=>new eC(e,Object.assign(Object.assign({},n),{apiKey:t,contextId:r}))}async request(e,t,r){let n=1,i=async()=>{let a=(null==r?void 0:r.retries)||this.retries,s=(null==r?void 0:r.retryStrategy)||this.retryStrategy,o=(null==r?void 0:r.debugger)||this.debug;o("request: %o",{url:this.endpoint,headers:Object.assign(Object.assign({},this.headers),null==r?void 0:r.headers),query:e,variables:t,timeout:this.timeout});let l=Object.assign(Object.assign({},this.headers),null==r?void 0:r.headers),u=performance.now(),c=[this.client.request(e,t,l)];return this.timeout&&(this.abortTimeout=new eE.A(this.timeout),c.push(this.abortTimeout.start)),Promise.race(c).then(e=>{var t;return null==(t=this.abortTimeout)||t.clear(),this.debug("response in %dms: %o",performance.now()-u,e),Promise.resolve(e)},async e=>{var t,r;null==(t=this.abortTimeout)||t.clear(),o("response error: %o",e.response||e.message||e);let l=(null==(r=e.response)?void 0:r.status)||e.code;if(!s.shouldRetry(e,n,a))return Promise.reject(e);{let t=s.getDelay(e,n);return o("Error: %s. Retrying in %dms (attempt %d).",l,t,n),n++,new Promise(e=>setTimeout(e,t)).then(i)}})};return i()}}var eO=r(1228);let ek=e=>{let t,{api:r}=e,{edge:n,local:i}=null!=r?r:{},a="u">typeof window;if(null==n?void 0:n.contextId)t={endpoint:(0,eO.i)(n.edgeUrl),contextId:n.contextId};else if(a&&(null==n?void 0:n.clientContextId))t={endpoint:(0,eO.i)(n.edgeUrl),contextId:n.clientContextId};else if((null==i?void 0:i.apiKey)&&(null==i?void 0:i.apiHost))t={endpoint:`${i.apiHost}${i.path}`,apiKey:i.apiKey};else if(a)console.warn("GraphQL client initialised in the browser without Edge or local API configuration; client-side requests may fail."),t={endpoint:"/api/graphql"};else throw Error(`GraphQL client misconfigured.
16      Configure one of the following in sitecore.config or your .env file:
17      Edge mode: set both sitecore.edge.contextId (server-side) and sitecore.edge.clientContextId (browser).
18      Local API mode: set api.local.apiHost and api.local.apiKey.
19      Supplying only api.edge.clientContextId will cause the application to fail at runtime.`);return eC.createClientFactory(Object.assign(Object.assign({},t),e))}},6905:(e,t,r)=>{"use strict";r.d(t,{G3:()=>f,_Y:()=>p});var n,i=r(4232),a=r(9742),s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e){var t;e?function(e){if(e)for(;e.lastChild;)e.lastChild.remove()}("string"==typeof e?document.getElementById(e):e):(t=document.querySelector(".grecaptcha-badge"))&&t.parentNode&&document.body.removeChild(t.parentNode)},l=function(e,t){o(t),window.___grecaptcha_cfg=void 0;var r,n=document.querySelector("#"+e);n&&n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))&&r.remove()},u=function(e){var t=e.render,r=e.onLoadCallbackName,n=e.language,i=e.onLoad,a=e.useRecaptchaNet,s=e.useEnterprise,o=e.scriptProps,l=void 0===o?{}:o,u=l.nonce,c=void 0===u?"":u,d=l.defer,f=l.async,p=l.id,h=l.appendTo,g=(void 0===p?"":p)||"google-recaptcha-v3";
19if(document.querySelector("#"+g))i();else{var m,y="https://www."+((m={useEnterprise:s,useRecaptchaNet:a}).useRecaptchaNet?"recaptcha.net":"google.com")+"/recaptcha/"+(m.useEnterprise?"enterprise.js":"api.js"),v=document.createElement("script");v.id=g,v.src=y+"?render="+t+("explicit"===t?"&onload="+r:"")+(n?"&hl="+n:""),c&&(v.nonce=c),v.defer=!!(void 0!==d&&d),v.async=!!(void 0!==f&&f),v.onload=i,("body"===h?document.body:document.getElementsByTagName("head")[0]).appendChild(v)}},c=function(e){void 0===a||a.env,console.warn(e)};(n||(n={})).SCRIPT_NOT_AVAILABLE="Recaptcha script is not available";var d=(0,i.createContext)({executeRecaptcha:function(){throw Error("GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider")}});function f(e){var t=e.reCaptchaKey,r=e.useEnterprise,a=void 0!==r&&r,o=e.useRecaptchaNet,f=void 0!==o&&o,p=e.scriptProps,h=e.language,g=e.container,m=e.children,y=(0,i.useState)(null),v=y[0],b=y[1],w=(0,i.useRef)(t),S=JSON.stringify(p),E=JSON.stringify(null==g?void 0:g.parameters);(0,i.useEffect)(function(){if(t){var e=(null==p?void 0:p.id)||"google-recaptcha-v3",r=(null==p?void 0:p.onLoadCallbackName)||"onRecaptchaLoadCallback";return window[r]=function(){var e=a?window.grecaptcha.enterprise:window.grecaptcha,r=s({badge:"inline",size:"invisible",sitekey:t},(null==g?void 0:g.parameters)||{});w.current=e.render(null==g?void 0:g.element,r)},u({render:(null==g?void 0:g.element)?"explicit":t,onLoadCallbackName:r,useEnterprise:a,useRecaptchaNet:f,scriptProps:p,language:h,onLoad:function(){if(window&&window.grecaptcha){var e=a?window.grecaptcha.enterprise:window.grecaptcha;e.ready(function(){b(e)})}else c("<GoogleRecaptchaProvider /> "+n.SCRIPT_NOT_AVAILABLE)},onError:function(){c("Error loading google recaptcha script")}}),function(){l(e,null==g?void 0:g.element)}}c("<GoogleReCaptchaProvider /> recaptcha key not provided")},[a,f,S,E,h,t,null==g?void 0:g.element]);var _=(0,i.useCallback)(function(e){if(!v||!v.execute)throw Error("<GoogleReCaptchaProvider /> Google Recaptcha has not been loaded");return v.execute(w.current,{action:e})},[v,w]),C=(0,i.useMemo)(function(){return{executeRecaptcha:v?_:void 0,container:null==g?void 0:g.element}},[_,v,null==g?void 0:g.element]);return i.createElement(d.Provider,{value:C},m)}d.Consumer;var p=function(){return(0,i.useContext)(d)};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var g="function"==typeof Symbol&&Symbol.for,m=g?Symbol.for("react.element"):60103,y=g?Symbol.for("react.portal"):60106,v=g?Symbol.for("react.fragment"):60107,b=g?Symbol.for("react.strict_mode"):60108,w=g?Symbol.for("react.profiler"):60114,S=g?Symbol.for("react.provider"):60109,E=g?Symbol.for("react.context"):60110,_=g?Symbol.for("react.async_mode"):60111,C=g?Symbol.for("react.concurrent_mode"):60111,O=g?Symbol.for("react.forward_ref"):60112,k=g?Symbol.for("react.suspense"):60113,I=g?Symbol.for("react.suspense_list"):60120,A=g?Symbol.for("react.memo"):60115,T=g?Symbol.for("react.lazy"):60116,x=g?Symbol.for("react.block"):60121,R=g?Symbol.for("react.fundamental"):60117,N=g?Symbol.for("react.responder"):60118,j=g?Symbol.for("react.scope"):60119;function P(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case m:switch(e=e.type){case _:case C:case v:case w:case b:case k:return e;default:switch(e=e&&e.$$typeof){case E:case O:case T:case A:case S:return e;default:return t}}case y:return t}}}function D(e){return P(e)===C}var M={AsyncMode:_,ConcurrentMode:C,ContextConsumer:E,ContextProvider:S,Element:m,ForwardRef:O,Fragment:v,Lazy:T,Memo:A,Portal:y,Profiler:w,StrictMode:b,Suspense:k,isAsyncMode:function(e){return D(e)||P(e)===_},isConcurrentMode:D,isContextConsumer:function(e){return P(e)===E},isContextProvider:function(e){return P(e)===S},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===m},isForwardRef:function(e){return P(e)===O},isFragment:function(e){return P(e)===v},isLazy:function(e){return P(e)===T},isMemo:function(e){return P(e)===A},isPortal:function(e){return P(e)===y},isProfiler:function(e){return P(e)===w},isStrictMode:function(e){return P(e)===b},isSuspense:function(e){return P(e)===k},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===v||e===C||e===w||e===b||e===k||e===I||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===A||e.$$typeof===S||e.$$typeof===E||e.$$typeof===O||e.$$typeof===R||e.$$typeof===N||e.$$typeof===j||e.$$typeof===x)},typeOf:P},L=h(function(e,t){}),F=(L.AsyncMode,L.ConcurrentMode,L.ContextConsumer,L.ContextProvider,L.Element,L.ForwardRef,L.Fragment,L.Lazy,L.Memo,L.Portal,L.Profiler,L.StrictMode,L.Suspense,L.isAsyncMode,L.isConcurrentMode,L.isContextConsumer,L.isContextProvider,L.isElement,L.isForwardRef,L.isFragment,L.isLazy,L.isMemo,L.isPortal,L.isProfiler,L.isStrictMode,L.isSuspense,L.isValidElementType,L.typeOf,h(function(e){e.exports=M})),q={};q[F.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},q[F.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0}},6987:(e,t,r)=>{"use strict";
19Object.defineProperty(t,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return o.ReadonlyURLSearchParams},RedirectType:function(){return d.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},forbidden:function(){return d.forbidden},notFound:function(){return d.notFound},permanentRedirect:function(){return d.permanentRedirect},redirect:function(){return d.redirect},unauthorized:function(){return d.unauthorized},unstable_isUnrecognizedActionError:function(){return c.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return d.unstable_rethrow},useParams:function(){return w},usePathname:function(){return v},useRouter:function(){return b},useSearchParams:function(){return y},useSelectedLayoutSegment:function(){return E},useSelectedLayoutSegments:function(){return S},useServerInsertedHTML:function(){return u.useServerInsertedHTML}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(8365)._(r(4232)),s=r(1335),o=r(2998),l=r(1967),u=r(6588),c=r(7436),d=r(2730),f,p,{instrumentParamsForClientValidation:h,instrumentSearchParamsForClientValidation:g,expectCompleteParamsInClientValidation:m}={};function y(){p?.("useSearchParams()");let e=(0,a.useContext)(o.SearchParamsContext);return(0,a.useMemo)(()=>e?new o.ReadonlyURLSearchParams(e):null,[e])}function v(){return f?.("usePathname()"),(0,a.useContext)(o.PathnameContext)}function b(){let e=(0,a.useContext)(s.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return e}function w(){return f?.("useParams()"),(0,a.useContext)(o.PathParamsContext)}function S(e="children"){f?.("useSelectedLayoutSegments()");let t=(0,a.useContext)(s.LayoutRouterContext);return t?(0,l.getSelectedLayoutSegmentPath)(t.parentTree,e):null}function E(e="children"){f?.("useSelectedLayoutSegment()"),(0,a.useContext)(o.NavigationPromisesContext);let t=S(e);return(0,l.computeSelectedLayoutSegment)(t,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6990:(e,t,r)=>{"use strict";var n,i,a;r.d(t,{CR:()=>o,ZS:()=>n,Zp:()=>s}),(a=n||(n={})).assertEqual=e=>{},a.assertIs=function(e){},a.assertNever=function(e){throw Error()},a.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},a.getValidEnumValues=e=>{let t=a.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return a.objectValues(r)},a.objectValues=e=>a.objectKeys(e).map(function(t){return e[t]}),a.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},a.find=(e,t)=>{for(let r of e)if(t(r))return r},a.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,a.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},a.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(i||(i={})).mergeShapes=(e,t)=>({...e,...t});let s=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),o=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return Number.isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":if(Array.isArray(e))return s.array;if(null===e)return s.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return s.promise;if("u">typeof Map&&e instanceof Map)return s.map;if("u">typeof Set&&e instanceof Set)return s.set;if("u">typeof Date&&e instanceof Date)return s.date;return s.object;default:return s.unknown}}},7063:(e,t,r)=>{"use strict";let n,i,a,s;r.d(t,{gx:()=>M,xB:()=>D,LN:()=>y9,gC:()=>vc,St:()=>vY,C4:()=>wQ,iZ:()=>wR,bs:()=>wN,r7:()=>aN,Y4:()=>wY,Er:()=>Sn,XD:()=>gX,fY:()=>SK,n_:()=>Ef,a6:()=>Eb,S$:()=>Ew,as:()=>ES,_X:()=>Ey,PY:()=>EE});var o,l,u,c,d,f,p,h,g,m,y,v,b,w,S,E,_,C,O,k,I,A,T,x,R,N,j,P,D,M,L,F,q,U={};r.r(U),r.d(U,{JsonPatchError:()=>dP,_areEquals:()=>dB,applyOperation:()=>dq,applyPatch:()=>dU,applyReducer:()=>d$,deepClone:()=>dD,getValueByPointer:()=>dF,validate:()=>dz,validator:()=>dV});var $={};r.r($),r.d($,{compare:()=>dJ,generate:()=>dK,observe:()=>dW,unobserve:()=>dY});
19var V=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},z=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let e in this.definition){let t=this.definition[e].validate(r[e]);t&&n.push(`${e}: ${t}`)}if(n.length)throw new V(`
20  The following properties are invalid:
21
22    ${n.join("\n	")}
23  
24  ${t}
25  `);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;void 0!==r&&(e[t]=r)}return e}},B=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&H(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return!0===this.baseConfig.required}};function G(e){return void 0===e}function H(e){return G(e)||null===e}var Q=class{value;constructor(e={}){this.value=new B(e)}validate(e){var t;let r=this.value.validate(e);return r||(G(t=e)||Y(t)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Y(e){return"boolean"==typeof e}var W=class{constructor(e={}){this.config=e,this.value=new B(e)}value;validate(e){var t;let r=this.value.validate(e);return r||(G(t=e)||K(t)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function K(e){return"number"==typeof e&&!Number.isNaN(e)}var Z=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,J=class{value;config;constructor(e={}){this.config={emptyAllowed:!0,url:!1,...e},this.value=new B(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:a}=this.config,s=this.value.validate(e);if(s)return s;if(G(e))return null;if(!X(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch(e){return"value is not a valid URL."}if(n&&!n.test(e))return`value did not match provided regex ${n}`;if(i&&!i.includes(e)){let e=i.join(", ");return`value should be one of: ${e}.`}return a&&!(Z.test(e)&&"Invalid Date"!==new Date(e).toString())?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function X(e){return"[object String]"===Object.prototype.toString.call(e)}var ee=class{config;constructor(e={}){this.config={options:{required:!1},values:{},...e}}validate(e){if(G(e))return this.config.options.required?"value is required and is currently undefined":null;if(!et(e))return"value is not an object";for(let[t,r]of Object.entries(this.config.values))if(r.required&&H(e[t]))return`value does not contain ${t}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],a=n.validate(i);null!==a&&(t+=` ${a}`)}return""===t?null:t}get default(){}get required(){return!!this.config.options.required}};function et(e){return void 0!==e&&"object"==typeof e}var er=class{constructor(e={}){this.config=e,this.value=new B(this.config)}value;validate(e){if(!H(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(null!==t)return t;if(H(e))return null;if(void 0!==this.config.max&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(void 0!==this.config.min&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(void 0!==this.config.each){let t="";return e.forEach(r=>{this.config.each.required&&H(r)&&(t=`value is null or undefined: ${e.join(",")}`);let n=this.validatePrimitiveValue(r,this.config.each);null!==n&&(t+=` ${n}`)}),""===t?null:t}return null}validatePrimitiveValue(e,t){return Y(e)||X(e)?t.validate(e):K(e)?t.validate(e):et(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function en(e){return Array.isArray(e)}var ei=class{constructor(e){this.config=e,this.value=new B(e)}value;validate(e){let t=this.value.validate(e);return null!==t?t:G(e)||Object.values(this.config.enum).find(t=>t===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};function ea(e){return Array.isArray(e)}let es=new Set(["1",1,"yes",!0]);function eo(e){if("object"!=typeof e||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}function el(e,t,r={}){let n;return(...i)=>{let a=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,i)},t),a)return e.apply(void 0,i)}}function eu(e,t){return t?t.open+e+t.close:e}async function ec(e,t){let r,n=e.getReader();for(;!(r=await n.read()).done;)t(r.value)}function ed(){return{data:"",event:"",id:"",retry:void 0}}(o=I||(I={}))[o.NewLine=10]="NewLine",o[o.CarriageReturn=13]="CarriageReturn",o[o.Space
25=32]="Space",o[o.Colon=58]="Colon";let ef="text/event-stream",ep="last-event-id";function eh(){return"u">typeof window}function eg(e,{signal:t,headers:r,onopen:n,onmessage:i,onclose:a,onerror:s,openWhenHidden:o,fetch:l,...u}){return new Promise((c,d)=>{let f,p,h={...r};function g(){f?.abort(),document.hidden||w()}h.accept||(h.accept=ef),!o&&eh()&&document.addEventListener("visibilitychange",g);let m=1e3;function y(){eh()&&document.removeEventListener("visibilitychange",g),clearTimeout(p),f?.abort()}t?.addEventListener("abort",()=>{y(),c()});let v=l??fetch,b=n??em;async function w(){f=AbortController?new AbortController:null;try{var t,r,n;let s,o,l,d,p,g,w=await v(e,{...u,headers:h,signal:f?.signal});await b(w),await ec(w.body,(t=e=>{e?h[ep]=e:delete h[ep]},r=e=>{m=e},s=ed(),o=new TextDecoder,n=function(e,n){if(0===e.length)i?.(s),s=ed();else if(n>0){let i=o.decode(e.subarray(0,n)),c=n+(e[n+1]===I.Space?2:1),d=o.decode(e.subarray(c));switch(i){case"data":s.data=s.data?`${s.data}
26${d}`:d;break;case"event":s.event=d;break;case"id":t(s.id=d);break;case"retry":var a,l,u;let f;a=d,l=s,u=r,f=parseInt(a,10),Number.isNaN(f)||u(l.retry=f)}}},g=!1,function(e){var t,r;let i;void 0===l?(l=e,d=0,p=-1):(t=l,r=e,(i=new Uint8Array(t.length+r.length)).set(t),i.set(r,t.length),l=i);let a=l.length,s=0;for(;d<a;){g&&(l[d]===I.NewLine&&(s=++d),g=!1);let e=-1;for(;d<a&&-1===e;++d)switch(l[d]){case I.Colon:-1===p&&(p=d-s);break;case I.CarriageReturn:g=!0,e=d;break;case I.NewLine:e=d}if(-1===e)break;n(l.subarray(s,e),p),s=d,p=-1}s===a?l=void 0:0!==s&&(l=l.subarray(s),d-=s)})),a?.(),y(),c()}catch(e){if(!f?.signal?.aborted)try{let t=s?.(e)??m;clearTimeout(p),p=setTimeout(w,t)}catch(e){y(),d(e)}}}w()})}function em(e){let t=e.headers.get("content-type");if(!t?.startsWith(ef))throw Error(`Expected content-type to be ${ef}, Actual: ${t}`)}class ey{_basePath;_params={};constructor(e){this._basePath=e}addParam(e,t){this._params={...this.params,[e]:t}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&")}`:this.basePath}}class ev extends Error{}class eb extends Error{payload;constructor(e){super(e.message),this.payload=e}}class ew{timeouts=new Set;add(e){this.timeouts.add(e)}remove(e){clearTimeout(e),this.timeouts.delete(e)}isActive(e){return this.timeouts.has(e)}}class eS{logger;constructor(e){this.logger=e.logger}streamGeneratedAnswer(e,t){let r,{url:n,organizationId:i,streamId:a,accessToken:s}=e,{write:o,abort:l,close:u,resetAnswer:c}=t,d=new ew;if(!a)return void this.logger.error("No stream ID found");let f=0,p=()=>{r&&!d.isActive(r)&&(h?.abort(),c(),g())},h=new AbortController,g=()=>eg(new ey(`${n}/rest/organizations/${i}/machinelearning/streaming/${a}`).href,{method:"GET",fetch,headers:{Authorization:`Bearer ${s}`,accept:"*/*"},openWhenHidden:!0,signal:h?.signal,async onopen(e){if(!e.ok||"text/event-stream"!==e.headers.get("content-type")){if(e.status>=400&&e.status<500&&429!==e.status)throw new eb({message:"Error opening stream",code:e.status});throw new ev}},onmessage:e=>{if(h?.signal.aborted)return;let t=JSON.parse(e.data);if("ERROR"===t.finishReason){d.remove(r),h?.abort(),l({message:t.errorMessage,code:t.statusCode});return}if(o(t),f=0,"COMPLETED"===t.finishReason)d.remove(r),u();else d.remove(r),clearTimeout(r),r=setTimeout(p,5e3),d.add(r)},onerror:e=>{if(!h?.signal.aborted){if(d.remove(r),e instanceof eb)throw h?.abort(),l(e),e;if(++f>3){this.logger.info("Maximum retry exceeded.");let e={message:"Failed to complete stream.",code:1};throw h?.abort(),l(e),new eb(e)}this.logger.info(`Retrying...(${f}/3)`),c()}}});return g(),h}}let eE=e=>e;function e_(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function eC(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:e_(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:e_(),extendedResults:{},searchAction:void 0}}function eO(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...a}=e;return a}let ek=e=>{let{response:t}=e;return t.body?eI(e):eA(t)},eI=e=>void 0!==e.body.exception?eT(e):void 0!==e.body.statusCode?e.body:{message:"unknown",statusCode:0,type:"unknown"},eA=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}},eT=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});var ex=r(560);let eR=Error("Failed to load reducers.");
26class eN extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}}class ej extends Error{statusCode;constructor(e,t){super(),this.name="Disconnected",this.message=`Client could not connect to the following URL: ${e}`,this.statusCode=t??0}}function eP(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}class eD{static async call(e){let t=function(e){let{url:t,method:r,requestParams:n,contentType:i,accessToken:a,signal:s}=e,o="POST"===e.method||"PUT"===e.method,l=function(e,t){if("application/x-www-form-urlencoded"===t)return"object"==typeof e&&e&&Object.values(e).every(eP)?function(e){let t=[];for(let r in e){let n=encodeURIComponent(r),i=encodeURIComponent(e[r]);t.push(`${n}=${i}`)}return t.join("&")}(e):"";return JSON.stringify(e)}(n,i);return{url:t,method:r,headers:{"Content-Type":i,Authorization:`Bearer ${a}`,...e.headers},...o&&{body:l},signal:s}}(e),{logger:r}=e,n=await eD.preprocessRequest(t,e);r.info(n,"Platform request");let{url:i,...a}=n,s=async()=>{let e=await fetch(i,a);if(429===e.status)throw e;return e};try{let e=await (0,ex.backOff)(s,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:async e=>{var t;let n=e&&(t=e.status,429===t);return n&&(r.info("Platform retrying request"),await new Promise(e=>setTimeout(e,1e3))),n}});switch(e.status){case 419:case 401:throw r.info("Platform renewing token"),new eN;case 404:throw new ej(i,e.status);default:return r.info({response:e,requestInfo:n},"Platform response"),e}}catch(e){if("Failed to fetch"===e.message)return new ej(i);return e}}static async preprocessRequest(e,t){let{origin:r,preprocessRequest:n,logger:i,requestMetadata:a}=t,{signal:s,...o}=e,l=eo(o);try{let t=await n(e,r,a);return{...e,...t}}catch(e){i.error(e,"Platform request preprocessing failed. Returning default request options.")}return l}}function eM(e,t="prod",r="platform"){let n="platform"===r?"":`.${r}`;return`https://${e}${n}.org${"prod"===t?"":t}.coveo.com`}function eL(e,t="prod"){let r=eM(e,t);return`${r}/rest/search/v2`}class eF{currentAbortController=null;async enqueue(e,t){let r=this.currentAbortController;this.currentAbortController=new AbortController;let n=this.currentAbortController;r&&(t.warnOnAbort&&t.logger.warn("Cancelling current pending search query"),r.abort());try{return await e(n?.signal??null)}finally{this.currentAbortController===n&&(this.currentAbortController=null)}}}let eq=(e,t,r,n)=>{let i=new ey(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}},eU=async(e,t)=>{let r=await eD.call({...eq(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:eO(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=((r.headers.get("content-type")||"").split(";").find(e=>-1!==e.indexOf("charset="))||"").split("=")[1]||"UTF-8",i=await r.arrayBuffer(),a=new TextDecoder(n).decode(i);return"string"==typeof a?{success:a}:{error:ek({response:r,body:a})}};function e$(e,t){if(t&&"AbortError"===e.name)return{error:{statusCode:e.code,type:e.name,message:e.message,ignored:!0}};if(e instanceof ej)return{error:{statusCode:e.statusCode,type:e.name,message:e.message}};throw e}class eV{options;constructor(e){this.options=e}async plan(e){let t=await eD.call({...eq(e,"POST","application/json","/plan"),requestParams:eO(e),requestMetadata:{method:"plan"},...this.options});if(t instanceof Error)return e$(t);let r=await t.json();return void 0!==r.preprocessingOutput?{success:r}:{error:ek({response:t,body:r})}}async querySuggest(e){let t=await eD.call({...eq(e,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:eO(e),...this.options});if(t instanceof Error)return e$(t);let r=await t.json(),n={response:t,body:r};return void 0!==r.completions?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(n)).body}:{error:ek(n)}}apiCallsQueues={unknown:new eF,mainSearch:new eF,facetValues:new eF,foldingCollection:new eF,instantResults:new eF};async search(e,t){let r=t?.origin??"unknown",n=await this.apiCallsQueues[r].enqueue(r=>
26eD.call({...eq(e,"POST","application/json",""),requestParams:eO(e),requestMetadata:{method:"search",origin:t?.origin},...this.options,signal:r??void 0}),{logger:this.options.logger,warnOnAbort:!t?.disableAbortWarning});if(n instanceof Error)return e$(n,t?.disableAbortWarning);let i=await n.json(),a={response:n,body:i};return ez(i)?(a.body=eB(i),{success:(await this.options.postprocessSearchResponseMiddleware(a)).body}):{error:ek(a)}}async facetSearch(e){let t=await eD.call({...eq(e,"POST","application/json","/facet"),requestParams:eO(e),requestMetadata:{method:"facetSearch"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return(await this.options.postprocessFacetSearchResponseMiddleware({response:t,body:r})).body}async recommendations(e){let t=await eD.call({...eq(e,"POST","application/json",""),requestParams:eO(e),requestMetadata:{method:"recommendations"},...this.options});if(t instanceof Error)throw t;let r=await t.json();if(ez(r)){let e={response:t,body:r};return e.body=eB(r),{success:(await this.options.postprocessSearchResponseMiddleware(e)).body}}return{error:ek({response:t,body:r})}}async html(e){return eU(e,{...this.options})}async fieldDescriptions(e){let t=await eD.call({...eq(e,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return void 0!==r.fields?{success:r}:{error:ek({response:t,body:r})}}}function ez(e){return void 0!==e.results}function eB(e){let t=e_();return H(e.questionAnswer)?e.questionAnswer=t:e.questionAnswer={...t,...e.questionAnswer},e}let eG=e=>e,eH=e=>e,eQ=e=>e,eY=new J({required:!0,emptyAllowed:!1}),eW=new J({required:!1,emptyAllowed:!1}),eK=new J({required:!0,emptyAllowed:!0});new J({required:!1,emptyAllowed:!0});let eZ=new er({each:eY,required:!0}),eJ=new J({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),eX=new J({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/});new J({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/});let e0=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),e1=(e,t)=>{if("required"in t)return{payload:new z({value:t}
26).validate({value:e}).value};let r=new ee({options:{required:!0},values:t}).validate(e);if(r)throw new V(r);return{payload:e}},e2=(e,t)=>{try{return e1(e,t)}catch(t){return{payload:e,error:e0(t)}}},e3=(e,t,r,n)=>e4(e,t,r,`Check the initialState of ${n}`,"Controller initialization error"),e5=(e,t,r,n)=>e4(e,t,r,`Check the options of ${n}`,"Controller initialization error"),e4=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(t){throw e.logger.error(t,i),t}};var e8=Symbol.for("immer-nothing"),e6=Symbol.for("immer-draftable"),e9=Symbol.for("immer-state");function e7(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var te=Object,tt=te.getPrototypeOf,tr="constructor",tn="prototype",ti="configurable",ta="enumerable",ts="writable",to="value",tl=e=>!!e&&!!e[e9];function tu(e){return!!e&&(tf(e)||tv(e)||!!e[e6]||!!e[tr]?.[e6]||tb(e)||tw(e))}var tc=te[tn][tr].toString(),td=new WeakMap;function tf(e){if(!e||!tS(e))return!1;let t=tt(e);if(null===t||t===te[tn])return!0;let r=te.hasOwnProperty.call(t,tr)&&t[tr];if(r===Object)return!0;if(!tE(r))return!1;let n=td.get(r);return void 0===n&&(n=Function.toString.call(r),td.set(r,n)),n===tc}function tp(e,t,r=!0){0===th(e)?(r?Reflect.ownKeys(e):te.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function th(e){let t=e[e9];return t?t.type_:tv(e)?1:tb(e)?2:3*!!tw(e)}var tg=(e,t,r=th(e))=>2===r?e.has(t):te[tn].hasOwnProperty.call(e,t),tm=(e,t,r=th(e))=>2===r?e.get(t):e[t],ty=(e,t,r,n=th(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},tv=Array.isArray,tb=e=>e instanceof Map,tw=e=>e instanceof Set,tS=e=>"object"==typeof e,tE=e=>"function"==typeof e,t_=e=>e.modified_?e.copy_:e.base_;function tC(e,t){if(tb(e))return new Map(e);if(tw(e))return new Set(e);if(tv(e))return Array[tn].slice.call(e);let r=tf(e);if(!0!==t&&("class_only"!==t||r)){let t=tt(e);if(null!==t&&r)return{...e};let n=te.create(t);return te.assign(n,e)}{let t=te.getOwnPropertyDescriptors(e);delete t[e9];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],a=t[i];!1===a[ts]&&(a[ts]=!0,a[ti]=!0),(a.get||a.set)&&(t[i]={[ti]:!0,[ts]:!0,[ta]:a[ta],[to]:e[i]})}return te.create(tt(e),t)}}function tO(e,t=!1){return tI(e)||tl(e)||!tu(e)||(th(e)>1&&te.defineProperties(e,{set:tk,add:tk,clear:tk,delete:tk}),te.freeze(e),t&&tp(e,(e,t)=>{tO(t,!0)},!1)),e}var tk={[to]:function(){e7(2)}};function tI(e){return!(null!==e&&tS(e))||te.isFrozen(e)}var tA="MapSet",tT="Patches",tx="ArrayMethods",tR={};function tN(e){let t=tR[e];return t||e7(0,e),t}var tj=e=>!!tR[e];function tP(e,t){t&&(e.patchPlugin_=tN(tT),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tD(e){tM(e),e.drafts_.forEach(tF),e.drafts_=null}function tM(e){e===A&&(A=e.parent_)}var tL=e=>A={drafts_:[],parent_:A,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:tj(tA)?tN(tA):void 0,arrayMethodsPlugin_:tj(tx)?tN(tx):void 0};function tF(e){let t=e[e9];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function tq(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[e9].modified_&&(tD(t),e7(4)),tu(e)&&(e=tU(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[e9].base_,e,t)}else e=tU(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tO(t,r)}(t,e,!0),tD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==e8?e:void 0}function tU(e,t){if(tI(t))return t;let r=t[e9];if(!r)return tH(t,e.handledSet_,e);if(!tV(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);tG(r,e)}return r.copy_}function t$(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var tV=(e,t)=>e.scope_===t,tz=[];function tB(e,t,r,n){let i=e.copy_||e.base_,a=e.type_;if(void 0!==n&&tm(i,n,a)===t)return void ty(i,n,r,a);if(!e.draftLocations_){let t=e.draftLocations_=new Map;tp(i,(e,r)=>{if(tl(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??tz)ty(i,n,r,a)}function tG(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}t$(e)}}function tH(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||tl(e)||t.has(e)||!tu(e)||tI(e)||(t.add(e),tp(e,(n,i)=>{if(tl(i)){let t=i[e9];tV(t,r)&&(ty(e,n,t_(t),e.type_),t$(t))}else tu(i)&&tH(i,t,r)})),e}var tQ={get(e,t){let r;if(t===e9)return e;let n=e.scope_.arrayMethodsPlugin_,i=1===e.type_&&"string"==typeof t;if(i&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=e.copy_||e.base_;if(!tg(a,t,e.type_)){var s;let r;return s=e,(r=tK(a,t))?to in r?r[to]:r.get?.call(s.draft_):void 0}let o=a[t];if(e.finalized_||!tu(o)||i&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(r=+t)&&String(r)===t)return o;if(o===tW(e.base_,t)){tJ(e);let r=1===e.type_?+t:t,n=tX(e.scope_,o,e,r);return e.copy_[r]=n}return o},has:(e,t)=>t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,r){let n=tK(e.copy_||e.base_,t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=tW(e.copy_||e.base_,t),i=n?.[e9];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||tg(e.base_,t,e.type_)))return!0;tJ(e),tZ(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||
26(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(tl(r)){let i=r[e9];tV(i,n)&&i.callbacks_.push(function(){tJ(e),tB(e,r,t_(i),t)})}else tu(r)&&e.callbacks_.push(function(){let i=e.copy_||e.base_;3===e.type_?i.has(r)&&tH(r,n.handledSet_,n):tm(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&tH(tm(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(tJ(e),void 0!==tW(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),tZ(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=e.copy_||e.base_,n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[ts]:!0,[ti]:1!==e.type_||"length"!==t,[ta]:n[ta],[to]:r[t]}:n},defineProperty(){e7(11)},getPrototypeOf:e=>tt(e.base_),setPrototypeOf(){e7(12)}},tY={};for(let e in tQ){let t=tQ[e];tY[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function tW(e,t){let r=e[e9];return(r?r.copy_||r.base_:e)[t]}function tK(e,t){if(!(t in e))return;let r=tt(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=tt(r)}}function tZ(e){!e.modified_&&(e.modified_=!0,e.parent_&&tZ(e.parent_))}function tJ(e){e.copy_||(e.assigned_=new Map,e.copy_=tC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function tX(e,t,r,n){let[i,a]=tb(t)?tN(tA).proxyMap_(t,r):tw(t)?tN(tA).proxySet_(t,r):function(e,t){let r=tv(e),n={type_:+!!r,scope_:t?t.scope_:A,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,a=tQ;r&&(i=[n],a=tY);let{revoke:s,proxy:o}=Proxy.revocable(i,a);return n.draft_=o,n.revoke_=s,[o,n]}(t,r);if((r?.scope_??A).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&void 0!==n)r.callbacks_.push(function(e){if(!a||!tV(a,e))return;e.mapSetPlugin_?.fixSetContents(a);let t=t_(a);tB(r,a.draft_??a,t,n),tG(a,e)});else a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)});return i}function t0(e){return tl(e)||e7(10,e),function e(t){let r;if(!tu(t)||tI(t))return t;let n=t[e9],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=tC(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=tC(t,!0);return tp(r,(t,n)=>{ty(r,t,e(n))},i),n&&(n.finalized_=!1),r}(e)}tY.deleteProperty=function(e,t){return tY.set.call(this,e,t,void 0)},tY.set=function(e,t,r){return tQ.set.call(this,e[0],t,r,e[0])};var t1=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(tE(e)&&!tE(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(tE(t)||e7(6),void 0===r||tE(r)||e7(7),tu(e)){let i=tL(this),a=tX(i,e,void 0),s=!0;try{n=t(a),s=!1}finally{s?tD(i):tM(i)}return tP(i,r),tq(n,i)}if(e&&tS(e))e7(1,e);else{if(void 0===(n=t(e))&&(n=e),n===e8&&(n=void 0),this.autoFreeze_&&tO(n,!0),r){let t=[],i=[];tN(tT).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return tE(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){tu(e)||e7(8),tl(e)&&(e=t0(e));let t=tL(this),r=tX(t,e,void 0);return r[e9].isManual_=!0,tM(t),r}finishDraft(e,t){let r=e&&e[e9];r&&r.isManual_||e7(9);let{scope_:n}=r;return tP(n,t),tq(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=tN(tT).applyPatches_;return tl(e)?n(e,t):this.produce(e,e=>n(e,t))}}
26,t2=t1.produce,t3=t1.produceWithPatches.bind(t1),t5=t1.applyPatches.bind(t1);function t4(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var t8="function"==typeof Symbol&&Symbol.observable||"@@observable",t6=()=>Math.random().toString(36).substring(7).split("").join("."),t9={INIT:`@@redux/INIT${t6()}`,REPLACE:`@@redux/REPLACE${t6()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${t6()}`};function t7(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function re(e){let t,r=Object.keys(e),n={};for(let t=0;t<r.length;t++){let i=r[t];"function"==typeof e[i]&&(n[i]=e[i])}let i=Object.keys(n);try{Object.keys(n).forEach(e=>{let t=n[e];if(void 0===t(void 0,{type:t9.INIT}))throw Error(t4(12));if(void 0===t(void 0,{type:t9.PROBE_UNKNOWN_ACTION()}))throw Error(t4(13))})}catch(e){t=e}return function(e={},r){if(t)throw t;let a=!1,s={};for(let t=0;t<i.length;t++){let o=i[t],l=n[o],u=e[o],c=l(u,r);if(void 0===c)throw r&&r.type,Error(t4(14));s[o]=c,a=a||c!==u}return(a=a||i.length!==Object.keys(e).length)?s:e}}function rt(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function rr(e){return t7(e)&&"type"in e&&"string"==typeof e.type}function rn(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var ri=rn(),ra=(r(9742),"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?rt:rt.apply(null,arguments)});function rs(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(nt(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>rr(t)&&t.type===e,r}"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var ro=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function rl(e){return tu(e)?t2(e,()=>{}):e}function ru(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var rc="RTK_autoBatch",rd=()=>e=>({payload:e,meta:{[rc]:!0}}),rf=e=>t=>{setTimeout(t,e)};function rp(e){let t,r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(nt(28));if(n in r)throw Error(nt(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}function rh(e,t){let r,[n,i,a]=rp(t);if("function"==typeof e)r=()=>rl(e());else{let t=rl(e);r=()=>t}function s(e=r(),t){let o=[n[t.type],...i.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===o.filter(e=>!!e).length&&(o=[a]),o.reduce((e,r)=>{if(r)if(tl(e)){let n=r(e,t);return void 0===n?e:n}else{if(tu(e))return t2(e,e=>r(e,t));let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e},e)}return s.getInitialState=r,s}var rg=(e,t)=>e&&"function"==typeof e.match?e.match(t):e(t);function rm(...e){return t=>e.some(e=>rg(e,t))}function ry(...e){return t=>e.every(e=>rg(e,t))}function rv(e,t){if(!e||!e.meta)return!1;let r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function rb(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function rw(...e){return 0===e.length?e=>rv(e,["pending"]):rb(e)?rm(...e.map(e=>e.pending)):rw()(e[0])}function rS(...e){return 0===e.length?e=>
26rv(e,["rejected"]):rb(e)?rm(...e.map(e=>e.rejected)):rS()(e[0])}function rE(...e){let t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||rb(e)?ry(rS(...e),t):rE()(e[0])}function r_(...e){return 0===e.length?e=>rv(e,["fulfilled"]):rb(e)?rm(...e.map(e=>e.fulfilled)):r_()(e[0])}function rC(...e){return 0===e.length?e=>rv(e,["pending","fulfilled","rejected"]):rb(e)?rm(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):rC()(e[0])}var rO=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},rk=["name","message","stack","code"],rI=class{constructor(e,t){this.payload=e,this.meta=t}_type},rA=class{constructor(e,t){this.payload=e,this.meta=t}_type},rT="External signal was aborted",rx=(()=>{function e(e,t,r){let n=rs(e+"/fulfilled",(e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}})),i=rs(e+"/pending",(e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}})),a=rs(e+"/rejected",(e,t,n,i,a)=>({payload:i,error:(r&&r.serializeError||(e=>{if("object"==typeof e&&null!==e){let t={};for(let r of rk)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}}))(e||"Rejected"),meta:{...a||{},arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:e?.name==="AbortError",condition:e?.name==="ConditionError"}}));return Object.assign(function(e,{signal:s}={}){return(o,l,u)=>{let c,d,f=r?.idGenerator?r.idGenerator(e):rO(),p=new AbortController;function h(e){d=e,p.abort()}s&&(s.aborted?h(rT):s.addEventListener("abort",()=>h(rT),{once:!0}));let g=async function(){let s;try{var g;let a=r?.condition?.(e,{getState:l,extra:u});if(g=a,null!==g&&"object"==typeof g&&"function"==typeof g.then&&(a=await a),!1===a||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let m=new Promise((e,t)=>{c=()=>{t({name:"AbortError",message:d||"Aborted"})},p.signal.addEventListener("abort",c,{once:!0})});o(i(f,e,r?.getPendingMeta?.({requestId:f,arg:e},{getState:l,extra:u}))),s=await Promise.race([m,Promise.resolve(t(e,{dispatch:o,getState:l,extra:u,requestId:f,signal:p.signal,abort:h,rejectWithValue:(e,t)=>new rI(e,t),fulfillWithValue:(e,t)=>new rA(e,t)})).then(t=>{if(t instanceof rI)throw t;return t instanceof rA?n(t.payload,f,e,t.meta):n(t,f,e)})])}catch(t){s=t instanceof rI?a(null,f,e,t.payload,t.meta):a(t,f,e)}finally{c&&p.signal.removeEventListener("abort",c)}return r&&!r.dispatchConditionRejection&&a.match(s)&&s.meta.condition||o(s),s}();return Object.assign(g,{abort:h,requestId:f,arg:e,unwrap:()=>g.then(rR)})}},{pending:i,rejected:a,fulfilled:n,settled:rm(a,n),typePrefix:e})}return e.withTypes=()=>e,e})();function rR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var rN=Symbol.for("rtk-slice-createasyncthunk"),rj=((l=rj||{}).reducer="reducer",l.reducerWithPrepare="reducerWithPrepare",l.asyncThunk="asyncThunk",l),rP=function({creators:e}={}){let t=e?.asyncThunk?.[rN];return function(e){let r,{name:n,reducerPath:i=n}=e;if(!n)throw Error(nt(11));let a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(a),o={},l={},u={},c=[],d={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(nt(12));if(r in l)throw Error(nt(13));return l[r]=t,d},addMatcher:(e,t)=>(c.push({matcher:e,reducer:t}),d),exposeAction:(e,t)=>(u[e]=t,d),exposeCaseReducer:(e,t)=>(o[e]=t,d)};function f(){let[t={},r=[],n]="function"==typeof e.extraReducers?rp(e.extraReducers):[e.extraReducers],i={...t,...l};return rh(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of c)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}s.forEach(r=>{let i=a[r],s={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(nt(18));let{payloadCreator:a,fulfilled:s,pending:o,rejected:l,settled:u,options:c}=r,d=i(e,a,c);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),o&&n.addCase(d.pending,o),l&&n.addCase(d.rejected,l),u&&n.addMatcher(d.settled,u),n.exposeCaseReducer(t,{fulfilled:s||rD,pending:o||rD,rejected:l||rD,settled:u||rD})}(s,i,d,t):function({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(nt(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?rs(e,s):rs(e))}(s,i,d)});let p=e=>e,h=new Map,g=new WeakMap;function m(e,t){return r||(r=f()),r(e,t)}function y(){return r||(r=f()),r.getInitialState()}function v(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=ru(g,n,y)),i}function i(t=p){let n=ru(h,r,()=>new WeakMap);return ru(n,t,()=>{let n={};for(let[i,a]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(a,...s){let o=t(a);
26return void 0===o&&n&&(o=r()),e(o,...s)}return i.unwrapped=e,i}(a,t,()=>ru(g,t,y),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let b={name:n,reducer:m,actions:u,caseReducers:o,getInitialState:y,...v(i),injectInto(e,{reducerPath:t,...r}={}){let n=t??i;return e.inject({reducerPath:n,reducer:m},r),{...b,...v(n,!0)}}};return b}}();function rD(){}var rM="listener",rL="completed",rF="cancelled",rq=`task-${rF}`,rU=`task-${rL}`,r$=`${rM}-${rF}`,rV=`${rM}-${rL}`,rz=class{constructor(e){this.code=e,this.message=`task ${rF} (reason: ${e})`}name="TaskAbortError";message},rB=(e,t)=>{if("function"!=typeof e)throw TypeError(nt(32))},rG=()=>{},rH=(e,t=rG)=>(e.catch(t),e),rQ=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),rY=e=>{if(e.aborted)throw new rz(e.reason)};function rW(e,t){let r=rG;return new Promise((n,i)=>{let a=()=>i(new rz(e.reason));e.aborted?a():(r=rQ(e,a),t.finally(()=>r()).then(n,i))}).finally(()=>{r=rG})}var rK=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof rz?"cancelled":"rejected",error:e}}finally{t?.()}},rZ=e=>t=>rH(rW(e,t).then(t=>(rY(e),t))),rJ=e=>{let t=rZ(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:rX}=Object,r0={},r1="listenerMiddleware",r2=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=rs(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(nt(21));return rB(a,"options.listener"),{predicate:i,type:t,effect:a}},r3=rX(e=>{let{type:t,predicate:r,effect:n}=r2(e);
26return{id:rO(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(nt(22))}}},{withTypes:()=>r3}),r5=(e,t)=>{let{type:r,effect:n,predicate:i}=r2(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},r4=e=>{e.pending.forEach(e=>{e.abort(r$)})},r8=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},r6=rX(rs(`${r1}/add`),{withTypes:()=>r6}),r9=rs(`${r1}/removeAll`),r7=rX(rs(`${r1}/remove`),{withTypes:()=>r7}),ne=(...e)=>{console.error(`${r1}/error`,...e)};function nt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original");let nr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,nn="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ni=new Uint8Array(16),na=[];for(let e=0;e<256;++e)na.push((e+256).toString(16).slice(1));let ns=function(e,t,r){if(nn&&!t&&!e)return nn();var i=e,a=r;let s=(i=i||{}).random??i.rng?.()??function(){if(!n){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(ni)}();if(s.length<16)throw Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((a=a||0)<0||a+16>t.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[a+e]=s[e];return t}return function(e,t=0){return(na[e[t+0]]+na[e[t+1]]+na[e[t+2]]+na[e[t+3]]+"-"+na[e[t+4]]+na[e[t+5]]+"-"+na[e[t+6]]+na[e[t+7]]+"-"+na[e[t+8]]+na[e[t+9]]+"-"+na[e[t+10]]+na[e[t+11]]+na[e[t+12]]+na[e[t+13]]+na[e[t+14]]+na[e[t+15]]).toLowerCase()}(s)};async function no({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:a,mode:s}=e;if("disabled"!==s)return n.call(r),t.send(i,a,r)}let nl="2.1.1";function nu(e,t,r){let{getReferrer:n,getLocation:i,getUserAgent:a}=r,s=function(e){let{trackingId:t}=e;return{trackingId:t}}(t),o=r.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:(t.source||[]).concat([`relay@${nl}`]),clientId:o,userAgent:a(),referrer:nc(n()),location:nc(i())})}function nc(e){return null!==e?function(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&"%"==e.charAt(r-3);){let n=Number.parseInt(e.substring(r-2,r),16);if((128&n)!=128)break;if(r-=3,(192&n)!=128){t-r>=3*((248&n)==240?4:(240&n)==224?3:(224&n)==192?2:1)&&(r=t);break}}return e.substring(0,r)}(e,1024):null}function nd({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}let nf=(s="coveo_",{getItem(e){let t=`${s}${e}=`;for(let e of document.cookie.split(";")){let r=e.replace(/^\s+/,"");if(0===r.lastIndexOf(t,0))return r.substring(t.length,r.length)}return null},setItem(e,t,r){let n,i=2==(n=window.location.hostname.split(".").slice(-2)).length?n.join("."):"",a=`;expires=${new Date(new Date().getTime()+r).toUTCString()}`,o=i?`;domain=${i}`:"";document.cookie=`${s}${e}=${t}${a}${o};path=/;SameSite=Lax`},removeItem(e){this.setItem(e,"",-1)}}),np="visitorId";function nh(){let e={getItem:e=>nf.getItem(e)||localStorage.getItem(e),removeItem(e){nf.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),nf.setItem(e,t,31556952e3)}};return{runtime:"browser",send:async(e,t,r)=>{let n,i=fetch(e,{method:"POST",body:JSON.stringify([r]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});(n="u">typeof window,{sendMessage(e){n&&window.postMessage(e,"*")}}).sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t});let a=await i;if(a?.ok){let e;try{e=await a.json()}catch{return}for(let t of e.events)if(!t.accepted)throw Error(`Received event was rejected for processing: ${t.errorMessage}`)}else throw Error(`Error ${a.status}: Failed to send the event(s).`)},getReferrer:()=>{let e;return""===(e=document.referrer)?null:e},getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{var t;let r=e.getItem(np);if(r&&"string"==typeof(t=r)&&nr.test(t))return r;let n=ns();return e.setItem(np,n),n}}}var ng=e=>Array.isArray(e)?e:[e],nm=0,ny=class{revision=nm;_value;
26_lastValue;_isEqual=nv;constructor(e,t=nv){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++nm)}};function nv(e,t){return e===t}function nb(e){return e instanceof ny||console.warn("Not a valid cell! ",e),e.value}var nw=(e,t)=>!1;function nS(){return function(e=nv){return new ny(null,e)}(nw)}var nE=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=nS()),nb(t)};Symbol();var n_=0,nC=Object.getPrototypeOf({}),nO=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,nk);tag=nS();tags={};children={};collectionTag=null;id=n_++},nk={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in nC)return n;if("object"==typeof n&&null!==n){var i;let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(i=n)?new nI(i):new nO(i)),r.tag&&nb(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=nS()).value=n),nb(r),n}})(),ownKeys:e=>(nE(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},nI=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],nA);tag=nS();tags={};children={};collectionTag=null;id=n_++},nA={get:([e],t)=>("length"===t&&nE(e),nk.get(e,t)),ownKeys:([e])=>nk.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>nk.getOwnPropertyDescriptor(e,t),has:([e],t)=>nk.has(e,t)},nT="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function nx(){return{s:0,v:void 0,o:null,p:null}}function nR(e,t={}){let r,n=nx(),{resultEqualityCheck:i}=t,a=0;function s(){let t,s=n,{length:o}=arguments;for(let e=0;e<o;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);let r=e.get(t);void 0===r?(s=nx(),e.set(t,s)):s=r}else{let e=s.p;null===e&&(s.p=e=new Map);let r=e.get(t);void 0===r?(s=nx(),e.set(t,s)):s=r}}let l=s;if(1===s.s)t=s.v;else if(t=e.apply(null,arguments),a++,i){let e=r?.deref?.()??r;null!=e&&i(e,t)&&(t=e,0!==a&&a--),r="object"==typeof t&&null!==t||"function"==typeof t?new nT(t):t}return l.s=1,l.v=t,t}return s.clearCache=()=>{n=nx(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}var nN=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n,i=0,a=0,s={},o=e.pop();"object"==typeof o&&(s=o,o=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:l,memoizeOptions:u=[],argsMemoize:c=nR,argsMemoizeOptions:d=[],devModeChecks:f={}}={...r,...s},p=ng(u),h=ng(d),g=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),m=l(function(){return i++,o.apply(null,arguments)},...p);return Object.assign(c(function(){a++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}(g,arguments);return n=m.apply(null,e)},...h),{resultFunc:o,memoizedResultFunc:m,dependencies:g,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>n,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:l,argsMemoize:c})};return Object.assign(n,{withTypes:()=>n}),n}(nR),nj=Object.assign((e,t=nN)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>nj});let nP="3.50.1",nD=nN(e=>e.source,e=>Object.entries(e).map(([e,t])=>`${e}@${t}`).concat(`@coveo/headless@${nP}`)),nM=nN(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>nD(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:a},s,o)=>{let l=nF(o);return function(e){let t,r=(t=nd(e),{get:()=>t,update:e=>{t=nd({...t,...e})}}),n=function(){let e=[];function t({type:r,callback:n}){return e.findIndex(e=>e.type===r&&e.callback===n)}function r(r,n){if(n){let i;(i=t({type:r,callback:n}))>=0&&e.splice(i,1)}else if("*"===r)e.length=0;else for(let t=e.length-1;t>=0;t--)e[t].type===r&&e.splice(t,1)}return{add:function(n){return 0>t(n)&&e.push(n),()=>r(n.type,n.callback)}
26,call:function(t){e.forEach(e=>{var r;if(r=t.meta.type,"*"===e.type||r===e.type)try{e.callback(t)}catch(e){console.error(e)}})},remove:r}}(),i={get:()=>{let e,t;return Object.freeze((e="disabled"!==r.get().mode,t=r.get().environment,e&&t?{...t,runtime:"custom"}:e&&function(){try{return"object"==typeof window}catch{return!1}}()&&function(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&"QuotaExceededError"===e.name&&localStorage&&0!==localStorage.length}}()?nh():{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}))}};return{emit:async(e,t)=>{let a=r.get(),s=i.get(),o={...t,meta:nu(e,a,s)};return no({config:a,environment:s,event:o,listenerManager:n})},getMeta:e=>nu(e,r.get(),i.get()),on:(e,t)=>n.add({type:e,callback:t}),off:(e,t)=>n.remove(e,t),updateConfig:e=>r.update(e),version:nl}}({mode:a?"emit":"disabled",url:i??function(e,t="prod"){let r=eM(e,t,"analytics");return`${r}/rest/organizations/${e}/events/v1`}(e,t),token:r,trackingId:n??null,source:s,environment:l})}),nL={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:async()=>{}},nF=e=>{if(!e)return;let t=e();return{..."u">typeof window&&"u">typeof document?nh():nL,getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};function nq(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function nU(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{l(n.next(e))}catch(e){a(e)}}function o(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}l((n=n.apply(e,t||[])).next())})}function n$(){return"u">typeof window}function nV(){return"u">typeof navigator}function nz(){return"u">typeof document}function nB(){try{return"u">typeof localStorage}catch(e){return!1}}function nG(){return nV()&&navigator.cookieEnabled}"function"==typeof SuppressedError&&SuppressedError,(u=T||(T={})).search="search",u.click="click",u.custom="custom",u.view="view",u.collect="collect";let nH=[T.click,T.custom,T.search,T.view],nQ=(e,t)=>-1!==nH.indexOf(e)?Object.assign({language:nz()?document.documentElement.lang:"unknown",userAgent:nV()?navigator.userAgent:"unknown"},t):t;class nY{static set(e,t,r){var n,i,a;r&&(n=new Date).setTime(n.getTime()+r),-1===(a=window.location.hostname).indexOf(".")?nW(e,t,n):nW(e,t,n,(i=a.split("."))[i.length-2]+"."+i[i.length-1])}static get(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){var i=r[n];if(0===(i=i.replace(/^\s+/,"")).lastIndexOf(t,0))return i.substring(t.length,i.length)}return null}static erase(e){nY.set(e,"",-1)}}function nW(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}class nK{getItem(e){return nY.get(`${nK.prefix}${e}`)}removeItem(e){nY.erase(`${nK.prefix}${e}`)}setItem(e,t,r){nY.set(`${nK.prefix}${e}`,t,r)}}nK.prefix="coveo_";class nZ{constructor(){this.cookieStorage=new nK}getItem(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)}removeItem(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)}setItem(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t,31556926e3)}}class nJ{getItem(e){return null}removeItem(e){}setItem(e,t){}}let nX="__coveo.analytics.history";class n0{constructor(e){this.store=e||(nB()?localStorage:nG()?new nK:!function(){try{return"u">typeof sessionStorage}catch(e){return!1}}()?new nJ:sessionStorage)}addElement(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}addElementAsync(e){return nU(this,void 0,void 0,function*(){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=yield this.getHistoryWithInternalTimeAsync();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])})}getHistory(){let e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))}getHistoryAsync(){return nU(this,void 0,void 0,function*(){let e=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(e))})}getHistoryWithInternalTime(){try{let e=this.store.getItem(nX);if(e&&"string"==typeof e)return JSON.parse(e);return[]}catch(e){return[]}}getHistoryWithInternalTimeAsync(){return nU(this,void 0,void 0,function*(){try{let e=yield this.store.getItem(nX);if(e)return JSON.parse(e);return[]}catch(e){return[]}})}setHistory(e){try{this.store.setItem(nX,JSON.stringify(e.slice(0,20)))}catch(e){}}clear(){try{this.store.removeItem(nX)}catch(e){}}getMostRecentElement(){let e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort((e,t)=>
26(t.internalTime||0)-(e.internalTime||0))[0]:null}cropQueryElement(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e}isValidEntry(e){let t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4}stripInternalTime(e){return Array.isArray(e)?e.map(e=>{let{name:t,time:r,value:n}=e;return{name:t,time:r,value:n}}):[]}stripEmptyQuery(e){let{name:t,time:r,value:n}=e;return t&&"string"==typeof n&&"query"===t.toLowerCase()&&""===n.trim()?{name:t,time:r}:e}stripEmptyQueries(e){return e.map(e=>this.stripEmptyQuery(e))}}let n1=(e,t)=>nU(void 0,void 0,void 0,function*(){return e===T.view?(yield n2(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),n2=e=>nU(void 0,void 0,void 0,function*(){let t=new n0,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),n3=new Uint8Array(16);var n5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function n4(e){return"string"==typeof e&&n5.test(e)}let n8=[];for(let e=0;e<256;++e)n8.push((e+256).toString(16).slice(1));function n6(e,t=0){return n8[e[t+0]]+n8[e[t+1]]+n8[e[t+2]]+n8[e[t+3]]+"-"+n8[e[t+4]]+n8[e[t+5]]+"-"+n8[e[t+6]]+n8[e[t+7]]+"-"+n8[e[t+8]]+n8[e[t+9]]+"-"+n8[e[t+10]]+n8[e[t+11]]+n8[e[t+12]]+n8[e[t+13]]+n8[e[t+14]]+n8[e[t+15]]}var n9="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function n7(e,t,r){if(n9&&!t&&!e)return n9();let n=(e=e||{}).random||(e.rng||function(){if(!i&&!(i="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(n3)})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return n6(n)}function ie(e,t){return e<<t|e>>>32-t}let it=function(e){function t(t,r,n,i){var a;if("string"==typeof t&&(t=function(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(t)),"string"==typeof r&&(r=function(e){let t;if(!n4(e))throw TypeError("Invalid UUID");let r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(r)),(null==(a=r)?void 0:a.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+t.length);if(s.set(r),s.set(t,r.length),(s=e(s))[6]=15&s[6]|80,s[8]=63&s[8]|128,n){i=i||0;for(let e=0;e<16;++e)n[i+e]=s[e];return n}return n6(s)}try{t.name="v5"}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}(function(e){let t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){let t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=Math.ceil((e.length/4+2)/16),i=Array(n);for(let t=0;t<n;++t){let r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];i[t]=r}i[n-1][14]=(e.length-1)*8/0x100000000,i[n-1][14]=Math.floor(i[n-1][14]),i[n-1][15]=(e.length-1)*8|0;for(let e=0;e<n;++e){let n=new Uint32Array(80);for(let t=0;t<16;++t)n[t]=i[e][t];for(let e=16;e<80;++e)n[e]=ie(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);let a=r[0],s=r[1],o=r[2],l=r[3],u=r[4];for(let e=0;e<80;++e){let r=Math.floor(e/20),i=ie(a,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(r,s,o,l)+u+t[r]+n[e]>>>0;u=l,l=o,o=ie(s,30)>>>0,s=a,a=i}r[0]=r[0]+a>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+l>>>0,r[4]=r[4]+u>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),ir="2.30.55",ii=e=>`${e.protocol}//${e.hostname}${0===e.pathname.indexOf("/")?e.pathname:`/${e.pathname}`}${e.search}`,ia={pageview:"pageview",event:"event"};class is{constructor({client:e,uuidGenerator:t=n7}){this.client=e,this.uuidGenerator=t}}class io extends is{constructor({client:e,uuidGenerator:t=n7}){super({client:e,uuidGenerator:t}),this.actionData={},this.pageViewId=t(),this.nextPageViewId=this.pageViewId,this.currentLocation=ii(window.location),this.lastReferrer=nz()?document.referrer:"",this.addHooks()}getApi(e){return"setAction"===e?this.setAction:null}setAction(e,t){this.action=e,this.actionData=t}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(e,t){return Object.assign({hitType:e},this.getNextValues(e,t))}updateLocationInformation(e,t){this.updateLocationForNextPageView(e,t)}getDefaultContextInformation(e){let t={title:nz()?document.title:"",encoding:nz()?document.characterSet:"UTF-8"},r={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent};return Object.assign(Object.assign(Object.assign(Object.assign({},{time:Date.now(),eventId:this.uuidGenerator()}),r),n),t)}updateLocationForNextPageView(e,t){let{pageViewId:r,referrer:n,location:i}=this.getNextValues(e,t);this.lastReferrer=n,this.pageViewId=r,this.currentLocation=i,e===ia.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(e,t){return{pageViewId:e===ia.pageview?this.nextPageViewId:this.pageViewId,referrer:e===ia.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===ia.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}}getCurrentLocationFromPayload(e){return e.page?`${this.currentLocation.split("/").slice(0,3).join("/")}${e.page.replace(/^\/?(.*)$/,"/$1")}`:ii(window.location)}}class il{constructor(e,t){if(!n4(e))throw Error("Not a valid uuid");this.clientId=e,this.creationDate=Math.floor(t/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let e=Math.floor(Date.now()/1e3)-this.creationDate;return e<0||e>il.expirationTime}validate(e,t){return!this.expired&&this.matchReferrer(e,t)}matchReferrer(e,t){try{let r=new URL(e);return t.some(e=>RegExp(e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(r.host))}catch(e){return!1}}static fromString(e){let t=e.split(".");if(2!==t.length)return null;let[r,n]=t;if(32!==r.length||isNaN(parseInt(n)))return null;let i=r.substring(0,8)+"-"+r.substring(8,12)+"-"+r.substring(12,16)+"-"+r.substring(16,20)+"-"+r.substring(20,32);return n4(i)?new il(i,1e3*Number.parseInt(n)):null}}il.cvo_cid="cvo_cid",il.expirationTime=120;class iu extends is{constructor({client:e,uuidGenerator:t=n7}){super({client:e,uuidGenerator:t})}getApi(e){switch(e){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(e){return nU(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw Error("Could not retrieve current clientId");try{let t=new URL(e),r=yield this.client.getCurrentVisitorId();return t.searchParams.set(il.cvo_cid,new il(r,Date.now()).toString()),t.toString()}catch(e){throw Error("Invalid URL provided")}})}acceptFrom(e){this.client.setAcceptedLinkReferrers(e)}}iu.Id="link";let ic=Object.keys;function id(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}let ip={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},ih=[...ic(ip).map(e=>ip[e])].join("|"),ig=RegExp(`^(${ih}$)`),im=[e=>ig.test(e)],iy={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},iv={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ib={action:"pa",list:"pal",listSource:"pls"},iw={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},iS={id:"quoteId",affiliation:"quoteAffiliation"},iE={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},i_={add:ib,bookmark_add:ib,bookmark_remove:ib,click:ib,checkout:ib,checkout_option:ib,detail
26:ib,impression:ib,remove:ib,refund:Object.assign(Object.assign({},ib),iw),purchase:Object.assign(Object.assign({},ib),iw),quickview:ib,quote:Object.assign(Object.assign({},ib),iS),review:Object.assign(Object.assign({},ib),iE)},iC=ic(iy).map(e=>iy[e]),iO=ic(iv).map(e=>iv[e]),ik=ic(ib).map(e=>ib[e]),iI=ic(iw).map(e=>iw[e]),iA=ic(iE).map(e=>iE[e]),iT=ic(iS).map(e=>iS[e]),ix=[...iC,"custom"].join("|"),iR=[...iO,"custom"].join("|"),iN="(pr[0-9]+)",ij="(il[0-9]+pi[0-9]+)",iP=RegExp(`^${iN}(${ix})$`),iD=RegExp(`^(${ij}(${iR}))|(il[0-9]+nm)$`),iM=RegExp(`^(${ik.join("|")})$`),iL=RegExp(`^(${iI.join("|")})$`),iF=RegExp(`^${iN}custom$`),iq=RegExp(`^${ij}custom$`),iU=RegExp(`^(${["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit",...iA,...iT].join("|")})$`),i$=[e=>iD.test(e),e=>iP.test(e),e=>iM.test(e),e=>iL.test(e),e=>iU.test(e)],iV=[iF,iq],iz=Object.assign(Object.assign({},Object.assign(Object.assign(Object.assign(Object.assign({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"].reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{}))),{svcAction:"svc_action",svcActionData:"svc_action_data"}),iB=ic(iz).map(e=>iz[e]),iG=e=>-1!==iB.indexOf(e),iH=e=>"custom"===e;class iQ{constructor(e){this.opts=e}sendEvent(e,t){return nU(this,void 0,void 0,function*(){if(!this.isAvailable())throw Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:r,preprocessRequest:n}=this.opts,i=yield this.getQueryParamsForEventType(e),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${r}/analytics/${e}?${i}`,t,n),o=new Blob([this.encodeForEventType(e,s)],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,o)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(e,t,r){return nU(this,void 0,void 0,function*(){let n=e,i=t;if(r){let{url:a,body:s}=yield r({url:e,body:JSON.stringify(t)},"analyticsBeacon");n=a||e;try{i=JSON.parse(s)}catch(e){console.error("Unable to process the request body as a JSON string",e)}}return{payload:i,url:n}})}encodeForEventType(e,t){return this.isEventTypeLegacy(e)?this.encodeEventToJson(e,t):this.encodeEventToJson(e,t,this.opts.token)}getQueryParamsForEventType(e){return nU(this,void 0,void 0,function*(){let{token:t,visitorIdProvider:r}=this.opts,n=yield r.getCurrentVisitorId();return[t&&this.isEventTypeLegacy(e)?`access_token=${t}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(e=>!!e).join("&")})}isEventTypeLegacy(e){return -1!==[T.click,T.custom,T.search,T.view].indexOf(e)}encodeEventToJson(e,t,r){let n=`${e}Event=${encodeURIComponent(JSON.stringify(t))}`;return r&&(n=`access_token=${encodeURIComponent(r)}&${n}`),n}}class iY{sendEvent(e,t){return nU(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return nU(this,void 0,void 0,function*(){return Promise.resolve()})}}let iW=globalThis.fetch;class iK{constructor(e){this.opts=e}sendEvent(e,t){return nU(this,void 0,void 0,function*(){let r,{baseUrl:n,visitorIdProvider:i,preprocessRequest:a}=this.opts,s=this.shouldAppendVisitorId(e)?yield this.getVisitorIdParam():"",o={url:`${n}/analytics/${e}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},l=Object.assign(Object.assign({},o),a?yield a(o,"analyticsFetch"):{}),{url:u}=l,c=nq(l,["url"]);try{r=yield iW(u,c)}catch(e){console.error("An error has occured when sending the event.",e);return}if(r.ok){let e=yield r.json();return e.visitorId&&i.setCurrentVisitorId(e.visitorId),e}try{r.json()}catch(e){}throw console.error(`An error has occured when sending the "${e}" event.`,r,t),Error(`An error has occurred when sending the "${e}" event. Check the console logs for more details.`)})}deleteHttpCookieVisitorId(){return nU(this,void 0,void 0,function*(){let{baseUrl:e}=this.opts,t=`${e}/analytics/visit`;yield iW(t,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(e){return -1!==[T.click,T.custom,T.search,T.view].indexOf(e)}getVisitorIdParam(){return nU(this,void 0,void 0,function*(){let{visitorIdProvider:e}=this.opts,t=yield e.getCurrentVisitorId();return t?`?visitor=${t}`:""})}getHeaders(){let{token:e}=this.opts;return Object.assign(Object.assign({},e?{Authorization:`Bearer ${e}`}:{}),{"Content-Type":"application/json"})}}class iZ{constructor(e,t){nB()&&nG()?this.storage=new nZ:nB()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new nJ),this.client=new iK(e),this.beaconClient=new iQ(e),window.addEventListener("beforeunload",()=>{for(let{eventType:e,payload:r}of t())this.beaconClient.sendEvent(e,r)})}
26getClientDependingOnEventType(e){return"click"===e&&this.beaconClient.isAvailable()?this.beaconClient:this.client}}class iJ{constructor(e,t){this.storage=t||new nJ,this.client=new iK(e)}getClientDependingOnEventType(e){return this.client}}class iX{constructor(){this.storage=new nJ,this.client=new iY}getClientDependingOnEventType(e){return this.client}}let i0=`
27        We've detected you're using React Native but have not provided the corresponding runtime, 
28        for an optimal experience please use the "coveo.analytics/react-native" subpackage.
29        Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
30    `,i1=["1",1,"yes",!0];function i2(){let e=[];return n$()&&e.push(window.doNotTrack),nV()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(e=>-1!==i1.indexOf(e))}let i3="https://analytics.cloud.coveo.com/rest/ua";class i5{get defaultOptions(){return{endpoint:i3,isCustomEndpoint:!1,token:"",version:"v15",beforeSendHooks:[],afterSendHooks:[]}}get version(){return ir}constructor(e){if(this.acceptedLinkReferrers=[],!e)throw Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[n1,nQ].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};const t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};i2()?this.runtime=new iX:this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),this.addEventTypeMapping(T.view,{newEventType:T.view,addClientIdParameter:!0}),this.addEventTypeMapping(T.click,{newEventType:T.click,addClientIdParameter:!0}),this.addEventTypeMapping(T.custom,{newEventType:T.custom,addClientIdParameter:!0}),this.addEventTypeMapping(T.search,{newEventType:T.search,addClientIdParameter:!0})}initRuntime(e){return n$()&&nz()?new iZ(e,()=>{let e=[...this.bufferedRequests];return this.bufferedRequests=[],e}):("u">typeof navigator&&"ReactNative"==navigator.product&&console.warn(i0),new iJ(e))}get storage(){return this.runtime.storage}determineVisitorId(){return nU(this,void 0,void 0,function*(){try{return n$()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||n7()}catch(e){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",e),n7()}})}getCurrentVisitorId(){return nU(this,void 0,void 0,function*(){if(!this.visitorId){let e=yield this.determineVisitorId();yield this.setCurrentVisitorId(e)}return this.visitorId})}setCurrentVisitorId(e){return nU(this,void 0,void 0,function*(){this.visitorId=e,yield this.storage.setItem("visitorId",e)})}setClientId(e,t){return nU(this,void 0,void 0,function*(){if(n4(e))this.setCurrentVisitorId(e.toLowerCase());else{if(!t)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(it(e,it(t,"38824e1f-37f5-42d3-8372-a4b8fa9df946")))}})}getParameters(e,...t){return nU(this,void 0,void 0,function*(){return yield this.resolveParameters(e,...t)})}getPayload(e,...t){return nU(this,void 0,void 0,function*(){let r=yield this.resolveParameters(e,...t);return yield this.resolvePayloadForParameters(e,r)})}get currentVisitorId(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(n7()),this.visitorId}set currentVisitorId(e){this.visitorId=e,this.storage.setItem("visitorId",e)}extractClientIdFromLink(e){if(i2())return null;try{let t=new URL(e).searchParams.get(il.cvo_cid);if(null==t)return null;let r=il.fromString(t);if(!r||!nz()||!r.validate(document.referrer,this.acceptedLinkReferrers))return null;return r.clientId}catch(e){}return null}resolveParameters(e,...t){return nU(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:r=[],addVisitorIdParameter:n=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[e]||{},s=e=>r.length>0?this.parseVariableArgumentsPayload(r,e):e[0],o=e=>nU(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{visitorId:n?yield this.getCurrentVisitorId():""})}),l=e=>nU(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},e),{clientId:yield this.getCurrentVisitorId()}):e}),u=e=>i?this.ensureAnonymousUserWhenUsingApiKey(e):e,c=t=>this.beforeSendHooks.reduce((t,r)=>nU(this,void 0,void 0,function*(){let n=yield t;return yield r(e,n)}),t);return yield[s,o,l,u,c].reduce((e,t)=>
30nU(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}resolvePayloadForParameters(e,t){return nU(this,void 0,void 0,function*(){let{usesMeasurementProtocol:r=!1}=this.eventTypeMapping[e]||{},n=e=>this.setTrackingIdIfTrackingIdNotPresent(e),i=t=>this.removeEmptyPayloadValues(t,e),a=t=>this.validateParams(t,e),s=e=>r?this.removeUnknownParameters(e):e,o=e=>r?this.processCustomParameters(e):this.mapCustomParametersToCustomData(e);return yield[n,i,a,e=>{let t;return r?(t=!!e.action&&i_[e.action]||{},ic(e).reduce((r,n)=>{let i=t[n]||iz[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})):e},s,o].reduce((e,t)=>nU(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}makeEvent(e,...t){return nU(this,void 0,void 0,function*(){let{newEventType:r=e}=this.eventTypeMapping[e]||{},n=yield this.resolveParameters(e,...t),i=yield this.resolvePayloadForParameters(e,n);return{eventType:r,payload:i,log:t=>nU(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:r,payload:Object.assign(Object.assign({},i),t)}),yield Promise.all(this.afterSendHooks.map(r=>r(e,Object.assign(Object.assign({},n),t)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(e,...t){return nU(this,void 0,void 0,function*(){return(yield this.makeEvent(e,...t)).log({})})}deferExecution(){return new Promise(e=>setTimeout(e,0))}sendFromBuffer(){return nU(this,void 0,void 0,function*(){let e=this.bufferedRequests.shift();if(e){let{eventType:t,payload:r}=e;return this.runtime.getClientDependingOnEventType(t).sendEvent(t,r)}})}clear(){this.storage.removeItem("visitorId"),new n0().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(e){return nU(this,void 0,void 0,function*(){return this.makeEvent(T.search,e)})}sendSearchEvent(e){return nU(this,void 0,void 0,function*(){var{searchQueryUid:t}=e,r=nq(e,["searchQueryUid"]);return(yield this.makeSearchEvent(r)).log({searchQueryUid:t})})}makeClickEvent(e){return nU(this,void 0,void 0,function*(){return this.makeEvent(T.click,e)})}sendClickEvent(e){return nU(this,void 0,void 0,function*(){var{searchQueryUid:t}=e,r=nq(e,["searchQueryUid"]);return(yield this.makeClickEvent(r)).log({searchQueryUid:t})})}makeCustomEvent(e){return nU(this,void 0,void 0,function*(){return this.makeEvent(T.custom,e)})}sendCustomEvent(e){return nU(this,void 0,void 0,function*(){var{lastSearchQueryUid:t}=e,r=nq(e,["lastSearchQueryUid"]);return(yield this.makeCustomEvent(r)).log({lastSearchQueryUid:t})})}makeViewEvent(e){return nU(this,void 0,void 0,function*(){return this.makeEvent(T.view,e)})}sendViewEvent(e){return nU(this,void 0,void 0,function*(){return(yield this.makeViewEvent(e)).log({})})}getVisit(){return nU(this,void 0,void 0,function*(){let e=yield fetch(`${this.baseUrl}/analytics/visit`),t=yield e.json();return this.visitorId=t.visitorId,t})}getHealth(){return nU(this,void 0,void 0,function*(){let e=yield fetch(`${this.baseUrl}/analytics/monitoring/health`);return yield e.json()})}registerBeforeSendEventHook(e){this.beforeSendHooks.push(e)}registerAfterSendEventHook(e){this.afterSendHooks.push(e)}addEventTypeMapping(e,t){this.eventTypeMapping[e]=t}setAcceptedLinkReferrers(e){if(Array.isArray(e)&&e.every(e=>"string"==typeof e))this.acceptedLinkReferrers=e;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(e,t){let r={};for(let n=0,i=t.length;n<i;n++){let i=t[n];if("string"==typeof i)r[e[n]]=i;else if("object"==typeof i)return Object.assign(Object.assign({},r),i)}return r}isKeyAllowedEmpty(e,t){return -1!==(({[T.search]:["queryText"]})[e]||[]).indexOf(t)}removeEmptyPayloadValues(e,t){return Object.keys(e).filter(r=>{let n;return this.isKeyAllowedEmpty(t,r)||null!=(n=e[r])&&""!==n}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}removeUnknownParameters(e){return Object.keys(e).filter(e=>{if([...i$,...im,iG,iH].some(t=>t(e)))return!0;console.log(e,"is not processed by coveoua")}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}processCustomParameters(e){let{custom:t}=e,r=nq(e,["custom"]),n={};t&&id(t)&&(n=this.lowercaseKeys(t));let i=ic(r).reduce((e,t)=>
30{var n;let i,a,s,o=(n=t,[...iV].every(e=>{var t;return!(i=null==(t=e.exec(n))?void 0:t[1])}),i);return o?Object.assign(Object.assign({},e),(a=o,ic(s=r[t]).reduce((e,t)=>Object.assign(Object.assign({},e),{[`${a}${t}`]:s[t]}),{}))):Object.assign(Object.assign({},e),{[t]:r[t]})},{});return Object.assign(Object.assign({},n),i)}mapCustomParametersToCustomData(e){let{custom:t}=e,r=nq(e,["custom"]);if(!(t&&id(t)))return e;{let n=this.lowercaseKeys(t);return Object.assign(Object.assign({},r),{customData:Object.assign(Object.assign({},n),e.customData)})}}lowercaseKeys(e){let t=Object.keys(e),r={};return t.forEach(t=>{r[t.toLowerCase()]=e[t]}),r}validateParams(e,t){let{anonymizeIp:r}=e,n=nq(e,["anonymizeIp"]);return void 0!==r&&-1==["0","false","undefined","null","{}","[]",""].indexOf(`${r}`.toLowerCase())&&(n.anonymizeIp=1),(t==T.view||t==T.click||t==T.search||t==T.custom)&&(n.originLevel3=this.limit(n.originLevel3,1024)),t==T.view&&(n.location=this.limit(n.location,1024)),("pageview"==t||"event"==t)&&(n.referrer=this.limit(n.referrer,2048),n.location=this.limit(n.location,2048),n.page=this.limit(n.page,2048)),n}ensureAnonymousUserWhenUsingApiKey(e){let t,{userId:r}=e,n=nq(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!r?(n.userId="anonymous",n):e}setTrackingIdIfTrackingIdNotPresent(e){let{trackingId:t}=e,r=nq(e,["trackingId"]);return t?e:(r.hasOwnProperty("custom")&&id(r.custom)&&(r.custom.hasOwnProperty("context_website")||r.custom.hasOwnProperty("siteName"))&&(r.trackingId=r.custom.context_website||r.custom.siteName),r.hasOwnProperty("customData")&&id(r.customData)&&(r.customData.hasOwnProperty("context_website")||r.customData.hasOwnProperty("siteName"))&&(r.trackingId=r.customData.context_website||r.customData.siteName),r)}limit(e,t){return"string"==typeof e?function(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&"%"==e.charAt(r-3);){let n=Number.parseInt(e.substring(r-2,r),16);if((128&n)!=128)break;if(r-=3,(192&n)!=128){t-r>=3*((248&n)==240?4:(240&n)==224?3:(224&n)==192?2:1)&&(r=t);break}}return e.substring(0,r)}(e,t):e}get baseUrl(){return function(e=i3,t="v15",r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}}(c=x||(x={})).contextChanged="contextChanged",c.expandToFullUI="expandToFullUI",c.openUserActions="openUserActions",c.showPrecedingSessions="showPrecedingSessions",c.showFollowingSessions="showFollowingSessions",c.clickViewedDocument="clickViewedDocument",c.clickPageView="clickPageView",c.createArticle="createArticle",(d=R||(R={})).interfaceLoad="interfaceLoad",d.interfaceChange="interfaceChange",d.didyoumeanAutomatic="didyoumeanAutomatic",d.didyoumeanClick="didyoumeanClick",d.resultsSort="resultsSort",d.searchboxSubmit="searchboxSubmit",d.searchboxClear="searchboxClear",d.searchboxAsYouType="searchboxAsYouType",d.breadcrumbFacet="breadcrumbFacet",d.breadcrumbResetAll="breadcrumbResetAll",d.documentQuickview="documentQuickview",d.documentOpen="documentOpen",d.omniboxAnalytics="omniboxAnalytics",d.omniboxFromLink="omniboxFromLink",d.searchFromLink="searchFromLink",d.triggerNotify="notify",d.triggerExecute="execute",d.triggerQuery="query",d.undoTriggerQuery="undoQuery",d.triggerRedirect="redirect",d.pagerResize="pagerResize",d.pagerNumber="pagerNumber",d.pagerNext="pagerNext",d.pagerPrevious="pagerPrevious",d.pagerScrolling="pagerScrolling",d.staticFilterClearAll="staticFilterClearAll",d.staticFilterSelect="staticFilterSelect",d.staticFilterDeselect="staticFilterDeselect",d.facetClearAll="facetClearAll",d.facetSearch="facetSearch",d.facetSelect="facetSelect",d.facetSelectAll="facetSelectAll",d.facetDeselect="facetDeselect",d.facetExclude="facetExclude",d.facetUnexclude="facetUnexclude",d.facetUpdateSort="facetUpdateSort",d.facetShowMore="showMoreFacetResults",d.facetShowLess="showLessFacetResults",d.queryError="query",d.queryErrorBack="errorBack",d.queryErrorClear="errorClearQuery",d.queryErrorRetry="errorRetry",d.recommendation="recommendation",d.recommendationInterfaceLoad="recommendationInterfaceLoad",d.recommendationOpen="recommendationOpen",d.likeSmartSnippet="likeSmartSnippet",d.dislikeSmartSnippet="dislikeSmartSnippet",d.expandSmartSnippet="expandSmartSnippet",d.collapseSmartSnippet="collapseSmartSnippet",d.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",d.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",d.sendSmartSnippetReason="sendSmartSnippetReason",d.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",d.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",d.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",d.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",d.openSmartSnippetSource="openSmartSnippetSource",d.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",d.openSmartSnippetInlineLink="openSmartSnippetInlineLink",d.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",d.recentQueryClick="recentQueriesClick",d.clearRecentQueries="clearRecentQueries",d.recentResultClick="recentResultClick",d.clearRecentResults="clearRecentResults",d.noResultsBack="noResultsBack",d.showMoreFoldedResults="showMoreFoldedResults",d.showLessFoldedResults="showLessFoldedResults",d.copyToClipboard="copyToClipboard",d.caseSendEmail="Case.SendEmail",d.feedItemTextPost="FeedItem.TextPost",d.caseAttach="caseAttach",d.caseDetach="caseDetach",d.retryGeneratedAnswer="retryGeneratedAnswer",d.likeGeneratedAnswer="likeGeneratedAnswer",d.dislikeGeneratedAnswer="dislikeGeneratedAnswer",d.openGeneratedAnswerSource="openGeneratedAnswerSource",d.generatedAnswerOpenInlineLink="generatedAnswerOpenInlineLink",d.generatedAnswerStreamEnd="generatedAnswerStreamEnd",d.generatedAnswerSourceHover="generatedAnswerSourceHover",d.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",d.generatedAnswerHideAnswers="generatedAnswerHideAnswers",d.generatedAnswerShowAnswers="generatedAnswerShowAnswers",d.generatedAnswerExpand="generatedAnswerExpand",d.generatedAnswerCollapse="generatedAnswerCollapse",d.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",d.rephraseGeneratedAnswer="rephraseGeneratedAnswer",d.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",d.generatedAnswerCitationClick="generatedAnswerCitationClick",d.generatedAnswerCitationDocumentAttach="generatedAnswerCitationDocumentAttach";let i4={[R.triggerNotify]:"queryPipelineTriggers",[R.triggerExecute]:"queryPipelineTriggers",[R.triggerQuery]:"queryPipelineTriggers",[R.triggerRedirect]:"queryPipelineTriggers",[R.queryErrorBack]:"errors",[R.queryErrorClear]:"errors",[R.queryErrorRetry]:"errors",[R.pagerNext]:"getMoreResults",[R.pagerPrevious]:"getMoreResults",[R.pagerNumber]:"getMoreResults",[R.pagerResize]:"getMoreResults",[R.pagerScrolling]:"getMoreResults",[R.facetSearch]:"facet",[R.facetShowLess]:"facet",[R.facetShowMore]:"facet",[R.recommendation]:"recommendation",[R.likeSmartSnippet]:"smartSnippet",[R.dislikeSmartSnippet]:"smartSnippet",[R.expandSmartSnippet]:"smartSnippet",[R.collapseSmartSnippet]:"smartSnippet",[R.openSmartSnippetFeedbackModal]:"smartSnippet",[R.closeSmartSnippetFeedbackModal]:"smartSnippet",[R.sendSmartSnippetReason]:"smartSnippet",[R.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.clearRecentQueries]:"recentQueries",[R.recentResultClick]:"recentlyClickedDocuments",[R.clearRecentResults]:"recentlyClickedDocuments",[R.showLessFoldedResults]:"folding",[R.caseDetach]:"case",[R.likeGeneratedAnswer]:"generatedAnswer",[R.dislikeGeneratedAnswer]:"generatedAnswer",[R.openGeneratedAnswerSource]:"generatedAnswer",[R.generatedAnswerOpenInlineLink]:"generatedAnswer",[R.generatedAnswerStreamEnd]:"generatedAnswer",[R.generatedAnswerSourceHover]:"generatedAnswer",[R.generatedAnswerCopyToClipboard]:"generatedAnswer",[R.generatedAnswerHideAnswers]:"generatedAnswer",[R.generatedAnswerShowAnswers]:"generatedAnswer",[R.generatedAnswerExpand]:"generatedAnswer",[R.generatedAnswerCollapse]:"generatedAnswer",[R.generatedAnswerFeedbackSubmit]:"generatedAnswer",[R.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[x.expandToFullUI]:"interface",[x.openUserActions]:"User Actions",[x.showPrecedingSessions]:"User Actions",[x.showFollowingSessions]:"User Actions",[x.clickViewedDocument]:"User Actions",[x.clickPageView]:"User Actions",[x.createArticle]:"createArticle"};class i8{constructor(){this.runtime=new iX,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(e){return Promise.resolve({eventType:e,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(T.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(T.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(T.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(T.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return ir}}let i6=e=>{let t,r=e.map(e=>e.replace(/;/g,""));return function e(t){let r=t.join(";");return r.length<=256?r:e(t.slice(1))}((t="",r.filter(e=>{let r=e!==t;return t=e,r})))};function i9(e){let t="string"==typeof e.partialQueries?e.partialQueries:i6(e.partialQueries),r="string"==typeof e.suggestions?e.suggestions:i6(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}class i7{constructor(e,t){this.opts=e,this.provider=t;const r=!1===e.enableAnalytics||i2();this.coveoAnalyticsClient=r?new i8:new i5(e)}disable(){this.coveoAnalyticsClient=new i8}enable(){this.coveoAnalyticsClient=new i5(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(R.interfaceLoad)}logInterfaceLoad(){return nU(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(R.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return nU(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(R.recommendation)}logRecommendation(){return nU(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(e,t){return this.makeClickEvent(R.recommendationOpen,e,t)}logRecommendationOpen(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(e){return this.makeSearchEvent(R.staticFilterClearAll,e)}logStaticFilterClearAll(e){return nU(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(e){return this.makeSearchEvent(R.staticFilterSelect,e)}logStaticFilterSelect(e){return nU(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(e){return this.makeSearchEvent(R.staticFilterDeselect,e)}logStaticFilterDeselect(e){return nU(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(R.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return nU(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(e){return this.makeSearchEvent(R.interfaceChange,e)}logInterfaceChange(e){return nU(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(e)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(R.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return nU(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(R.didyoumeanClick)}logDidYouMeanClick(){return nU(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(e){return this.makeSearchEvent(R.resultsSort,e)}logResultsSort(e){return nU(this,void 0,void 0,function*(){return(yield this.makeResultsSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(R.searchboxSubmit)}logSearchboxSubmit(){return nU(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(R.searchboxClear)}logSearchboxClear(){return nU(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(R.searchboxAsYouType)}logSearchboxAsYouType(){return nU(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(e){return this.makeSearchEvent(R.breadcrumbFacet,e)}logBreadcrumbFacet(e){return nU(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(e)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(R.breadcrumbResetAll)}logBreadcrumbResetAll(){return nU(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(e,t){return this.makeClickEvent(R.documentQuickview,e,t)}logDocumentQuickview(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(e,t){return this.makeClickEvent(R.documentOpen,e,t)}logDocumentOpen(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(e){return this.makeSearchEvent(R.omniboxAnalytics,i9(e))}logOmniboxAnalytics(e){return nU(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(e)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(e){return this.makeSearchEvent(R.omniboxFromLink,i9(e))}logOmniboxFromLink(e){return nU(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(R.searchFromLink)}logSearchFromLink(){return nU(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(e){return this.makeCustomEvent(R.triggerNotify,e)}logTriggerNotify(e){return nU(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(e){return this.makeCustomEvent(R.triggerExecute,e)}logTriggerExecute(e){return nU(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(R.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return nU(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(e){return this.makeSearchEvent(R.undoTriggerQuery,e)}logUndoTriggerQuery(e){return nU(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(e){return this.makeCustomEvent(R.triggerRedirect,Object.assign(Object.assign({},e),{query:this.provider.getSearchEventRequestPayload().qu
vendor: 18,577 bytes, line 30
30eryText}))}logTriggerRedirect(e){return nU(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(e){return this.makeCustomEvent(R.pagerResize,e)}logPagerResize(e){return nU(this,void 0,void 0,function*(){return(yield this.makePagerResize(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(e){return this.makeCustomEvent(R.pagerNumber,e)}logPagerNumber(e){return nU(this,void 0,void 0,function*(){return(yield this.makePagerNumber(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(e){return this.makeCustomEvent(R.pagerNext,e)}logPagerNext(e){return nU(this,void 0,void 0,function*(){return(yield this.makePagerNext(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(e){return this.makeCustomEvent(R.pagerPrevious,e)}logPagerPrevious(e){return nU(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(R.pagerScrolling)}logPagerScrolling(){return nU(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(e){return this.makeSearchEvent(R.facetClearAll,e)}logFacetClearAll(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(e){return this.makeSearchEvent(R.facetSearch,e)}logFacetSearch(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(e){return this.makeSearchEvent(R.facetSelect,e)}logFacetSelect(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(e){return this.makeSearchEvent(R.facetDeselect,e)}logFacetDeselect(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(e){return this.makeSearchEvent(R.facetExclude,e)}logFacetExclude(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(e){return this.makeSearchEvent(R.facetUnexclude,e)}logFacetUnexclude(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(e){return this.makeSearchEvent(R.facetSelectAll,e)}logFacetSelectAll(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(e){return this.makeSearchEvent(R.facetUpdateSort,e)}logFacetUpdateSort(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(e){return this.makeCustomEvent(R.facetShowMore,e)}logFacetShowMore(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(e){return this.makeCustomEvent(R.facetShowLess,e)}logFacetShowLess(e){return nU(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(e){return this.makeCustomEvent(R.queryError,e)}logQueryError(e){return nU(this,void 0,void 0,function*(){return(yield this.makeQueryError(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return nU(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorBack);return{description:e.description,log:()=>nU(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorBack)})}})}logQueryErrorBack(){return nU(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return nU(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorRetry);return{description:e.description,log:()=>nU(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorRetry)})}})}logQueryErrorRetry(){return nU(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return nU(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorClear);return{description:e.description,log:()=>nU(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorClear)})}})}logQueryErrorClear(){return nU(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(R.likeSmartSnippet)}logLikeSmartSnippet(){return nU(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(R.dislikeSmartSnippet)}logDislikeSmartSnippet(){return nU(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(R.expandSmartSnippet)}logExpandSmartSnippet(){return nU(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(R.collapseSmartSnippet)}logCollapseSmartSnippet(){return nU(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(R.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(R.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return nU(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(e,t){return this.makeCustomEvent(R.sendSmartSnippetReason,{reason:e,details:t})}logSmartSnippetFeedbackReason(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(e){return this.makeCustomEvent(R.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logExpandSmartSnippetSuggestion(e){return nU(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(e){return this.makeCustomEvent(R.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logCollapseSmartSnippetSuggestion(e){return nU(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(e){return this.makeCustomEvent(R.showMoreSmartSnippetSuggestion,e)}logShowMoreSmartSnippetSuggestion(e){return nU(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(e){return this.makeCustomEvent(R.showLessSmartSnippetSuggestion,e)}logShowLessSmartSnippetSuggestion(e){return nU(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(e,t){return this.makeClickEvent(R.openSmartSnippetSource,e,t)}logOpenSmartSnippetSource(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(e,t){return this.makeClickEvent(R.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}makeCopyToClipboard(e,t){return this.makeClickEvent(R.copyToClipboard,e,t)}logCopyToClipboard(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(e,t)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(e,t){return this.makeClickEvent(R.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)}logOpenSmartSnippetInlineLink(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(e,t){return this.makeClickEvent(R.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}logOpenSmartSnippetSuggestionInlineLink(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(R.recentQueryClick)}logRecentQueryClick(){return nU(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(R.clearRecentQueries)}logClearRecentQueries(){return nU(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(e,t){return this.makeCustomEvent(R.recentResultClick,{info:e,identifier:t})}logRecentResultClick(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(R.clearRecentResults)}logClearRecentResults(){return nU(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(R.noResultsBack)}logNoResultsBack(){return nU(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(e,t){return this.makeClickEvent(R.showMoreFoldedResults,e,t)}logShowMoreFoldedResults(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(R.showLessFoldedResults)}logShowLessFoldedResults(){return nU(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(e,t){var r;return{actionCause:t,customData:null==(r=e.payload)?void 0:r.customData}}makeCustomEvent(e,t){return nU(this,arguments,void 0,function*(e,t,r=i4[e]){this.coveoAnalyticsClient.getParameters;let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:r,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEvent(e,t){return nU(this,arguments,void 0,function*(e,t,r=i4[e]){return(yield this.makeCustomEvent(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(e,t,r){return nU(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:t,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEventWithType(e,t,r){return nU(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(e,t){return nU(this,void 0,void 0,function*(){let r=yield this.getBaseSearchEventRequest(e,t),n=yield this.coveoAnalyticsClient.makeSearchEvent(r);return{description:this.makeEventDescription(n,e),log:({searchUID:e})=>n.log({searchQueryUid:e})}})}makeClickEvent(e,t,r,n){return nU(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},t),(yield this.getBaseEventRequest(Object.assign(Object.assign({},r),n)))),{queryPipeline:this.provider.getPipeline(),actionCause:e}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({searchQueryUid:e})}})}logClickEvent(e,t,r,n){return nU(this,void 0,void 0,function*(){return(yield this.makeClickEvent(e,t,r,n)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(e,t){return nU(this,void 0,void 0,function*(){var r,n;return Object.assign(Object.assign(Object.assign({},(yield this.getBaseEventRequest(Object.assign(Object.assign({},t),null==(n=(r=this.provider).getGeneratedAnswerMetadata)?void 0:n.call(r))))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:e})})}getBaseEventRequest(e){return nU(this,void 0,void 0,function*(){let t=Object.assign(Object.assign({},this.provider.getBaseMetadata()),e);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var e,t;return{originContext:null==(t=(e=this.provider).getOriginContext)?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof i5?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})}makeLikeGeneratedAnswer(e){return this.makeCustomEvent(R.likeGeneratedAnswer,e)}logLikeGeneratedAnswer(e){return nU(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(e){return this.makeCustomEvent(R.dislikeGeneratedAnswer,e)}logDislikeGeneratedAnswer(e){return nU(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(e){return this.makeCustomEvent(R.openGeneratedAnswerSource,e)}logOpenGeneratedAnswerSource(e){return nU(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerOpenInlineLink(e){return this.makeCustomEvent(R.generatedAnswerOpenInlineLink,e)}logGeneratedAnswerOpenInlineLink(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerOpenInlineLink(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(e,t){return this.makeClickEvent(R.generatedAnswerCitationClick,Object.assign(Object.assign({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}logGeneratedAnswerCitationClick(e,t){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(e){return this.makeCustomEvent(R.generatedAnswerSourceHover,e)}logGeneratedAnswerSourceHover(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(e){return this.makeCustomEvent(R.generatedAnswerCopyToClipboard,e)}logGeneratedAnswerCopyToClipboard(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(e){return this.makeCustomEvent(R.generatedAnswerHideAnswers,e)}logGeneratedAnswerHideAnswers(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(e){return this.makeCustomEvent(R.generatedAnswerShowAnswers,e)}logGeneratedAnswerShowAnswers(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(e){return this.makeCustomEvent(R.generatedAnswerExpand,e)}logGeneratedAnswerExpand(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(e){return this.makeCustomEvent(R.generatedAnswerCollapse,e)}logGeneratedAnswerCollapse(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(e){return this.makeCustomEvent(R.generatedAnswerFeedbackSubmit,e)}logGeneratedAnswerFeedbackSubmit(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(e){return this.makeCustomEvent(R.generatedAnswerFeedbackSubmitV2,e)}logGeneratedAnswerFeedbackSubmitV2(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(e)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(e){return this.makeSearchEvent(R.rephraseGeneratedAnswer,e)}
30logRephraseGeneratedAnswer(e){return nU(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(R.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return nU(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(e){return this.makeCustomEvent(R.generatedAnswerStreamEnd,e)}logGeneratedAnswerStreamEnd(e){return nU(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(e)).log({searchUID:this.provider.getSearchUID()})})}}let ae=Object.assign({},ia),at=Object.keys(ae).map(e=>ae[e]);class ar extends io{constructor({client:e,uuidGenerator:t=n7}){super({client:e,uuidGenerator:t}),this.ticket={}}getApi(e){let t=super.getApi(e);return null!==t?t:"setTicket"===e?this.setTicket:null}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(e){this.ticket=e}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((e,...[t])=>-1!==at.indexOf(e)?this.addSVCDataToPayload(e,t):t),this.client.registerAfterSendEventHook((e,...[t])=>(-1!==at.indexOf(e)&&this.updateLocationInformation(e,t),t))}addHooksForPageView(){this.client.addEventTypeMapping(ae.pageview,{newEventType:T.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(ae.event,{newEventType:T.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(e,t){var r;let n=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!=(r=this.actionData)?r:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),n),t)}getTicketPayload(){let e;return ic(e=this.ticket).filter(t=>void 0!==e[t]).reduce((t,r)=>{let n=ip[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{})}}ar.Id="svc",(f=N||(N={})).click="click",f.flowStart="flowStart",(p=j||(j={})).enterInterface="ticket_create_start",p.fieldUpdate="ticket_field_update",p.fieldSuggestionClick="ticket_classification_click",p.documentSuggestionClick="documentSuggestionClick",p.documentSuggestionQuickview="documentSuggestionQuickview",p.suggestionRate="suggestion_rate",p.nextCaseStep="ticket_next_stage",p.caseCancelled="ticket_cancel",p.caseSolved="ticket_cancel",p.caseCreated="ticket_create",(h=P||(P={})).quit="Quit",h.solved="Solved";class an{constructor(e,t){var r;this.options=e,this.provider=t;const n=(null==(r=e.enableAnalytics)||r)&&!i2();this.coveoAnalyticsClient=n?new i5(e):new i8,this.svc=new ar({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new i8,this.svc=new ar({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new i5(this.options),this.svc=new ar({client:this.coveoAnalyticsClient})}logEnterInterface(e){return this.svc.setAction(j.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()}logUpdateCaseField(e){return this.svc.setAction(j.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logSelectFieldSuggestion(e){return this.svc.setAction(j.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(e){return this.logClickEvent(j.documentSuggestionClick,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})}logQuickviewDocumentSuggestion(e){return this.logClickEvent(j.documentSuggestionQuickview,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})}logRateDocumentSuggestion(e){return this.svc.setAction(j.suggestionRate,Object.assign({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()}
30logMoveToNextCaseStep(e){return this.svc.setAction(j.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseCancelled(e){return this.svc.setAction(j.caseCancelled,{reason:P.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseSolved(e){return this.svc.setAction(j.caseSolved,{reason:P.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseCreated(e){return this.svc.setAction(j.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",N.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",N.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(e){return nU(this,void 0,void 0,function*(){var t,r;let n=Object.assign({},e);return Object.assign(Object.assign({},this.getOrigins()),{customData:n,language:null==(t=this.provider)?void 0:t.getLanguage(),anonymous:null==(r=this.provider)?void 0:r.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof i5?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var e,t,r,n,i;return{originContext:null==(t=null==(e=this.provider)?void 0:e.getOriginContext)?void 0:t.call(e),originLevel1:null==(r=this.provider)?void 0:r.getOriginLevel1(),originLevel2:null==(n=this.provider)?void 0:n.getOriginLevel2(),originLevel3:null==(i=this.provider)?void 0:i.getOriginLevel3()}}logClickEvent(e,t,r,n){return nU(this,void 0,void 0,function*(){var i,a;let s=Object.assign(Object.assign(Object.assign({},t),(yield this.getBaseEventRequest(Object.assign(Object.assign({},r),n)))),{searchQueryUid:null!=(a=null==(i=this.provider)?void 0:i.getSearchUID())?a:"",actionCause:e});return this.coveoAnalyticsClient.sendClickEvent(s)})}}class ai{getState;state;constructor(e){this.getState=e,this.state=e()}getLanguage(){let e;return(e=this.state.configuration.search.locale.split("-")[0])&&2===e.length?e:"en"}getBaseMetadata(){let{context:e,configuration:t}=this.state,r=e?.contextValues||{},n={};for(let[e,t]of Object.entries(r))n[`context_${e}`]=t;return"legacy"===t.analytics.analyticsMode&&(n.coveoHeadlessVersion=nP),n}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||"default"}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}}let aa=(e,t)=>"function"==typeof t?(...r)=>{let n=eo(r[0]);try{return t.apply(t,r)}catch(t){return e.error(t,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,as=(e,t)=>(...r)=>{let n=eo(r[1]);try{return t.apply(t,r)}catch(t){return e.error(t,"Error in analytics hook. Returning original request."),n}};class ao extends ai{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}}let al=e=>e.configuration?.knowledge?.agentId,au=e=>ac(e)||ad(e)?e.generatedAnswer?.answerId:af(e)?e.search?.response?.extendedResults?.generativeQuestionAnsweringId:void 0,ac=e=>"answer"in e&&"generatedAnswer"in e&&!H(e.generatedAnswer?.answerConfigurationId),ad=e=>{let t=al(e);return"generatedAnswer"in e&&"string"==typeof t&&t.trim().length>0},af=e=>"search"in e&&void 0!==e.search&&"object"==typeof e.search,ap=e=>e.generatedAnswer?.fieldsToIncludeInCitations,ah=nN(e=>e.followUpAnswers?.followUpAnswers,e=>e?.flatMap(e=>e.citations));function ag(){return{desiredCount:5,numberOfValues:8,set:{}}}nN(e=>e.generatedAnswer?.citations,ah,(e,t)=>t,(e,t,r)=>e?.find(e=>e.id===r)??t?.find(e=>e.id===r));let am=(e,t)=>e.search?.response.facets.find(e=>e.facetId===t),ay=(e,t)=>{let r=am(e,t);return r&&r.facetId in e.facetSet?r:void 0},av=(e,t)=>ay(e,t)?.values.filter(e=>"idle"!==e.state)||[];function ab(e){let{activeValue:t,ancestryMap:r}=function(e){let t=[...e],r=new Map;for(;t.length>0;){let e=t.shift();if("selected"===e.state)return{activeValue:e,ancestryMap:r};if(r)for(let t of e.children)r.set(t,e);t.unshift(...e.children)}return{}}(e);return t?function(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}(t,r):[]}let aw=(e,t)=>{let r=e.categoryFacetSet[t]?.request;return ab(r?.currentValues??[])},aS=(e,t)=>{let r=aA(t,e),n=r?r.field:"",i=aI(n,e);return{facetId:e,facetField:n,facetTitle:i}};function aE(e,t){let{facetId:r,facetValue:n}=e,i=aS(r,t),a=aT(t,r);return{...i,facetValue:"hierarchical"===a?ak(t,r):n}}function a_(e){return{facetSet:e.facetSet??{},categoryFacetSet:e.categoryFacetSet??{},dateFacetSet:e.dateFacetSet??{},numericFacetSet:e.numericFacetSet??{}
30,automaticFacetSet:e.automaticFacetSet??ag()}}let aC=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),aO=e=>({displayValue:e.value,value:e.value}),ak=(e,t)=>aw(e,t).map(e=>e.value).join(";"),aI=(e,t)=>`${e}_${t}`,aA=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,aT=(e,t)=>{let r=aA(e,t);return r?r.type:"specific"},ax=()=>({q:"",enableQuerySyntax:!1});(g=D||(D={})).Ascending="ascending",g.Descending="descending",(m=M||(M={})).Relevancy="relevancy",m.QRE="qre",m.Date="date",m.Field="field",m.NoSort="nosort";let aR=e=>{if(en(e))return e.map(e=>aR(e)).join(",");switch(e.by){case M.Relevancy:case M.QRE:case M.NoSort:return e.by;case M.Date:return`date ${e.order}`;case M.Field:return`@${e.field} ${e.order}`;default:return""}},aN=()=>({by:M.Relevancy}),aj=new ee({values:{by:new ei({enum:M,required:!0}),order:new ei({enum:D}),field:new J}});function aP(){return aR(aN())}class aD{static set(e,t,r){let n,i;r&&(n=new Date).setTime(n.getTime()+r);let a=window.location.hostname;/^(\d{1,3}\.){3}\d{1,3}$/.test(a)||/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/.test(a)||-1===a.indexOf(".")?aM(e,t,n):aM(e,t,n,(i=a.split("."))[i.length-2]+"."+i[i.length-1])}static get(e){let t=e+"=",r=document.cookie.split(";");for(let e=0;e<r.length;e++){let n=r[e];if(0===(n=n.replace(/^\s+/,"")).lastIndexOf(t,0))return n.substring(t.length,n.length)}return null}static erase(e){aD.set(e,"",-1)}}function aM(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+("https:"===window.location.protocol?";Secure":"")}class aL{static prefix="coveo_";getItem(e){return aD.get(`${aL.prefix}${e}`)}removeItem(e){aD.erase(`${aL.prefix}${e}`)}setItem(e,t,r){aD.set(`${aL.prefix}${e}`,t,r)}}class aF{getItem(e){return null}removeItem(e){}setItem(e,t){}}let aq="__coveo.analytics.history";class aU{static instance=null;static getInstance(e){return aU.instance||(aU.instance=new aU(e)),aU.instance}store;constructor(e){this.store=e||(!function(){try{return"u">typeof localStorage}catch(e){return!1}}()?"u">typeof navigator&&navigator.cookieEnabled?new aL:!function(){try{return"u">typeof sessionStorage}catch(e){return!1}}()?new aF:sessionStorage:localStorage)}addElement(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=this.getHistoryWithInternalTime();null!==t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}async addElementAsync(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=await this.getHistoryWithInternalTimeAsync();null!==t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}getHistory(){let e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))}async getHistoryAsync(){let e=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(e))}getHistoryWithInternalTime(){try{let e=this.store.getItem(aq);if(e&&"string"==typeof e)return JSON.parse(e);return[]}catch(e){return[]}}async getHistoryWithInternalTimeAsync(){try{let e=await this.store.getItem(aq);if(e)return JSON.parse(e);return[]}catch(e){return[]}}setHistory(e){try{this.store.setItem(aq,JSON.stringify(e.slice(0,20)))}catch(e){}}clear(){try{this.store.removeItem(aq)}catch(e){}}getMostRecentElement(){let e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort((e,t)=>(t.internalTime||0)-(e.internalTime||0))[0]:null}cropQueryElement(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e}isValidEntry(e){let t=this.getMostRecentElement();return!t||t.value!==e.value||(e.internalTime||0)-(t.internalTime||0)>6e4}stripInternalTime(e){return Array.isArray(e)?e.map(e=>{let{name:t,time:r,value:n}=e;return{name:t,time:r,value:n}}):[]}stripEmptyQuery(e){let{name:t,time:r,value:n}=e;return t&&"string"==typeof n&&"query"===t.toLowerCase()&&""===n.trim()?{name:t,time:r}:e}stripEmptyQueries(e){return e.map(e=>this.stripEmptyQuery(e))}}class a$ extends ai{static fallbackPipelineName="default";getFacetState(){var e;let t,r;return e=a_(this.getState()),t=[],[...Object.values((r=e).facetSet),...Object.values(r.categoryFacetSet),...Object.values(r.dateFacetSet),...Object.values(r.numericFacetSet)].map(e=>e.request).forEach((r,n)=>{let i,a,s=aT(e,r.facetId),o=(i=r,a=n+1,{title:aI(i.field,i.facetId),field:i.field,id:i.facetId,facetPosition:a});if("hierarchical"===r.type){let n;if(!aw(e,r.facetId).length)return;t.push({...o,...{value:n=ak(e,r.facetId),valuePosition:1,displayValue:n},facetType:s,state:"selected"});return}
30r.currentValues.forEach((e,n)=>{let i;if("idle"===e.state)return;let a=aC(e,n+1,s),l="specific"===r.type?aO(e):(i=e,{displayValue:`${i.start}..${i.end}`,value:`${i.start}..${i.end}`,start:i.start,end:i.end,endInclusive:i.endInclusive});t.push({...o,...a,...l})})}),[...Object.values(e.automaticFacetSet.set)].map(e=>e.response).forEach((e,r)=>{let n,i,a=(n=e,i=r+1,{title:aI(n.field,n.field),field:n.field,id:n.field,facetPosition:i});e.values.forEach((e,r)=>{if("idle"===e.state)return;let n=aC(e,r+1,"specific"),i=aO(e);t.push({...a,...n,...i})})}),t}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||a$.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let e=this.getState();return e.search?.searchResponseId||e.search?.response.searchUid||eC().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let e=!!this.getSplitTestRunName(),t=this.state.search?.response.pipeline||this.state.pipeline||a$.fallbackPipelineName;return e?t:void 0}getBaseMetadata(){let e=this.getState(),t=super.getBaseMetadata(),r=au(e);return r&&(t.generativeQuestionAnsweringId=r),t}getFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,facetValue:t,facetTitle:`${n}_${e}`}}getFacetClearAllMetadata(e){let t=this.getFacetRequest(e),r=t?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:r,facetTitle:`${r}_${e}`}}getFacetUpdateSortMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,criteria:t,facetTitle:`${n}_${e}`}}getRangeBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,facetRangeEnd:t.end,facetRangeEndInclusive:t.endInclusive,facetRangeStart:t.start,facetTitle:`${n}_${e}`}}getFacetRequest=e=>this.state.facetSet?.[e]?.request||this.state.categoryFacetSet?.[e]?.request||this.state.dateFacetSet?.[e]?.request||this.state.numericFacetSet?.[e]?.request||this.state.automaticFacetSet?.set[e]?.response;getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??aP()}}getStaticFilterToggleMetadata(e,t){return{...this.getBaseMetadata(),staticFilterId:e,staticFilterValue:t}}getStaticFilterClearAllMetadata(e){return{...this.getBaseMetadata(),staticFilterId:e}}getUndoTriggerQueryMetadata(e){return{...this.getBaseMetadata(),undoneQuery:e}}getCategoryBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),categoryFacetId:e,categoryFacetField:n,categoryFacetPath:t,categoryFacetTitle:`${n}_${e}`}}getOmniboxAnalyticsMetadata(e,t){let r=this.state.querySuggest?.[e],n=r.completions.map(e=>e.expression),i=r.partialQueries.length-1,a=r.partialQueries[i]||"",s=r.responseId;return{...this.getBaseMetadata(),suggestionRanking:n.indexOf(t),partialQuery:a,partialQueries:r.partialQueries.length>0?r.partialQueries:"",suggestions:n.length>0?n:"",querySuggestResponseId:s}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(e){return{...this.getBaseMetadata(),...e}}getGeneratedAnswerMetadata(){let e=this.getState(),t={};return e.generatedAnswer?.isVisible!==void 0&&(t.showGeneratedAnswer=e.generatedAnswer.isVisible),t}get resultURIs(){return this.results?.map(e=>({documentUri:e.uri,documentUriHash:e.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||ax().q}get responseTime(){return this.state.search?.duration||eC().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||eC().response.totalCountFiltered}}let aV=()=>{let e=aU.getInstance().getHistory().reverse().find(e=>"PageView"===e.name&&e.value);return e?e.value:""};function az(e){var t,r;let n=function e(t){return t.childResults?t.childResults.flatMap(t=>[t,...e(t)]):[]}(e),i=[e,...n].filter(e=>e.parentResult).map(e=>e.parentResult);return t=[e,...n,...i],r=e=>e.uniqueId,[...t.reduce((e,t)=>
30{let n=r(t);return e.has(n)||e.set(n,t),e},new Map).values()]}let aB=(e,t,r)=>function(...n){return aG(1===n.length?{...n[0],__legacy__getBuilder:t(n[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:n[0],__legacy__getBuilder:t(n[1]),__legacy__provider:n[2],analyticsConfigurator:e,providerClass:r})},aG=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:i,analyticsConfigurator:a,providerClass:s})=>{var o;let l,u;return r??=e=>new s(e),o=async({getState:e,analyticsClientMiddleware:s,preprocessRequest:o,logger:l})=>{let u=[],c={log:async({state:e})=>{for(let t of u)await t(e)}},d=e(),f=a({getState:e,logger:l,analyticsClientMiddleware:s,preprocessRequest:o,provider:r(e)}),p=await t(f,e());c.description=p?.description,u.push(async e=>{"legacy"===e.configuration.analytics.analyticsMode&&await aH(p,r,e,l,f.coveoAnalyticsClient)});let{emit:h}=nM(d);return u.push(async e=>{if("next"===e.configuration.analytics.analyticsMode&&i&&n){let t=n(e);await a1(h,i,t)}}),c},Object.assign(u=(l=t=>{let r=rx(e,t);return Object.assign(Object.assign(r,{type:r.typePrefix}),{instantlyCallable:!0})})(async(e,{getState:t,extra:r})=>{let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=r;return await (await o({getState:t,analyticsClientMiddleware:n,preprocessRequest:i,logger:a})).log({state:t(),extra:r})}),{prepare:async({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n})=>{let{description:i,log:a}=await o({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n});return{description:i,action:l(async(e,{getState:t,extra:r})=>await a({state:t(),extra:r}))}}}),u};async function aH(e,t,r,n,i){t(()=>r);let a=await e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:i,response:a},"Analytics response")}let aQ=aB(e=>(({logger:e,getState:t,analyticsClientMiddleware:r=(e,t)=>t,preprocessRequest:n,provider:i})=>{let a=t(),s=a.configuration.accessToken,o=a.configuration.analytics.apiBaseUrl??eM(a.configuration.organizationId,a.configuration.environment,"analytics"),l=a.configuration.analytics.runtimeEnvironment,u=a.configuration.analytics.enabled,c=new i7({token:s,endpoint:o,runtimeEnvironment:l,preprocessRequest:aa(e,n),beforeSendHooks:[as(e,r),(t,r)=>(e.info({...r,type:t,endpoint:o,token:s},"Analytics request"),r)]},i);return u||c.disable(),c})({...e,provider:e.provider||new a$(e.getState)}),e=>e,a$);aB(({logger:e,getState:t,analyticsClientMiddleware:r=(e,t)=>t,preprocessRequest:n,provider:i=new ao(t)})=>{let a=t(),s=a.configuration.accessToken,o=a.configuration.analytics.apiBaseUrl??eM(a.configuration.organizationId,a.configuration.environment,"analytics"),l=a.configuration.analytics.runtimeEnvironment,u=a.configuration.analytics.enabled,c=new an({enableAnalytics:u,token:s,endpoint:o,runtimeEnvironment:l,preprocessRequest:aa(e,n),beforeSendHooks:[as(e,r),(t,r)=>(e.info({...r,type:t,endpoint:o,token:s},"Analytics request"),r)]},i);return u||c.disable(),c},e=>(t,r)=>Promise.resolve({description:{actionCause:"caseAssist"},log:async n=>{e(t,r)}}),ao);let aY=(e,t)=>{var r,n,i;let a,s,o,l=-1,u=t.search?.results;(l=a0(e,u))<0&&(l=function(e,t){for(let[r,n]of t.entries())if(-1!==a0(e,az(n)))return r;return -1}(e,u)),l<0&&(l=0);return r=e,n=l+(t.pagination?.firstResult??0),i=t,{collectionName:"string"==typeof(a=r.raw.collection)?a:"default",documentAuthor:H(s=r.raw.author)?"unknown":Array.isArray(s)?s.join(";"):`${s}`,...aW(r)?{documentCategory:aW(r)}:{},documentPosition:n+1,documentTitle:r.title,documentUri:r.uri,documentUriHash:r.raw.urihash,documentUrl:r.clickUri,rankingModifier:r.rankingModifier||"",sourceName:H(o=r.raw.source)?"unknown":o,queryPipeline:i.pipeline||""}};function aW(e){return e.raw?.objecttype||void 0}let aK=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),aZ={urihash:new J,sourcetype:new J,permanentid:new J},aJ={uniqueId:eY,raw:new ee({values:aZ}),title:eY,uri:eY,clickUri:eY,rankingModifier:new J({required:!1,emptyAllowed:!0})},aX=e=>{var t;return new z(aJ).validate(Object.assign({},...Object.keys(aJ).map(t=>({[t]:e[t]})),{raw:(t=e.raw,Object.assign({},...Object.keys(aZ).map(e=>({[e]:t[e]}))))}))};function a0(e,t=[]){return t.findIndex(({uniqueId:t})=>t===e.uniqueId)}async function a1(e,t,r){await e(t,r)}(y=L||(L={})).interfaceLoad="interfaceLoad",y.interfaceChange="interfaceChange",y.didYouMeanAutomatic="didYouMeanAutomatic",y.didYouMeanClick="didYouMeanClick",y.resultsSort="resultsSort",y.searchboxSubmit="searchboxSubmit",y.searchboxAsYouType="searchboxAsYouType",y.breadcrumbFacet="breadcrumbFacet",y.breadcrumbResetAll="breadcrumbResetAll",y.documentOpen="documentOpen",y.omniboxAnalytics="omniboxAnalytics",y.omniboxFromLink="omniboxFromLink",y.searchFromLink="searchFromLink",y.triggerQuery="query",y.browseResults="browseResults",y.staticFilterDeselect="staticFilterDeselect",y.facetClearAll="facetClearAll",y.facetSelect="facetSelect",y.facetDeselect="facetDeselect",y.facetExclude="facetExclude",y.facetUnexclude="facetUnexclude",y.facetUpdateSort="facetUpdateSort",y.documentSuggestion="documentSuggestion",y.facetShowMore="showMoreFacetResults",y.facetShowLess="showLessFacetResults",y.queryError="query",y.recommendationInterfaceLoad="recommendationInterfaceLoad",y.likeSmartSnippet="likeSmartSnippet",y.dislikeSmartSnippet="dislikeSmartSnippet",y.expandSmartSnippet="expandSmartSnippet",y.collapseSmartSnippet="collapseSmartSnippet",y.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",y.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",y.sendSmartSnippetReason="sendSmartSnippetReason",y.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",y.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",y.openSmartSnippetSource="openSmartSnippetSource",y.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",y.showMoreFoldedResults="showMoreFoldedResults",y.showLessFoldedResults="showLessFoldedResults",y.copyToClipboard="copyToClipboard",y.caseSendEmail="Case.SendEmail",y.feedItemTextPost="FeedItem.TextPost",y.caseAttach="caseAttach",y.caseDetach="caseDetach",y.generatedAnswerCitationDocumentAttach="generatedAnswerCitationDocumentAttach",y.retryGeneratedAnswer="retryGeneratedAnswer",y.likeGeneratedAnswer="likeGeneratedAnswer",y.dislikeGeneratedAnswer="dislikeGeneratedAnswer",y.openGeneratedAnswerSource="openGeneratedAnswerSource",y.generatedAnswerStreamEnd="generatedAnswerStreamEnd",y.contextChanged="contextChanged",y.generatedAnswerSourceHover="generatedAnswerSourceHover",y.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",y.generatedAnswerHideAnswers="generatedAnswerHideAnswers",y.generatedAnswerShowAnswers="generatedAnswerShowAnswers",y.generatedAnswerExpand="generatedAnswerExpand",y.generatedAnswerCollapse="generatedAnswerCollapse",y.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",y.expandToFullUI="expandToFullUI",y.createArticle="createArticle",y.recentQueriesClick="recentQueriesClick",y.clearRecentQueries="clearRecentQueries";let a2=()=>aQ("analytics/interface/load",e=>e.makeInterfaceLoad()),a3=()=>aQ("analytics/interface/change",(e,t)=>e.makeInterfaceChange({interfaceChangeTo:t.configuration.analytics.originLevel2})),a5=()=>aQ("analytics/interface/searchFromLink",e=>e.makeSearchFromLink()),a4=e=>aQ("analytics/interface/omniboxFromLink",t=>t.makeOmniboxFromLink(e)),a8=()=>({actionCause:L.interfaceChange}),a6=rs("configuration/updateBasicConfiguration",e=>e2(e,{accessToken:eW,environment:new J({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:eW})),a9=rs("configuration/updateSearchConfiguration",e=>e2(e,{proxyBaseUrl:new J({required:!1,url:!0}),pipeline:new J({required:!1,emptyAllowed:!0}),searchHub:eW,timezone:eW,locale:eW,authenticationProviders:new er({required:!1,each:eY})})),a7={enabled:new Q({default:!0}),originContext:eW,originLevel2:eW,originLevel3:eW,proxyBaseUrl:new J({required:!1,url:!0}),runtimeEnvironment:new B,anonymous:new Q({default:!1}),deviceId:eW,userDisplayName:eW,documentLocation:eW,trackingId:eX,analyticsMode:new J({constrainTo:["legacy","
30next"],required:!1,default:"next"}),source:new ee({options:{required:!1},values:["@coveo/atomic","@coveo/quantic"].reduce((e,t)=>(e[t]=eJ,e),{})})},se=rs("configuration/updateAnalyticsConfiguration",e=>e2(e,a7)),st=rs("configuration/analytics/disable"),sr=rs("configuration/analytics/enable"),sn=rs("configuration/analytics/originlevel2",e=>e2(e,{originLevel2:eY})),si=rs("configuration/analytics/originlevel3",e=>e2(e,{originLevel3:eY})),sa=rs("knowledge/setAgentId",e=>e2(e,new J({required:!0}))),ss={q:new J,enableQuerySyntax:new Q,aq:new J,cq:new J,firstResult:new W({min:0}),numberOfResults:new W({min:0}),sortCriteria:new J,f:new ee,fExcluded:new ee,cf:new ee,nf:new ee,mnf:new ee,df:new ee,debug:new Q,sf:new ee,tab:new J,af:new ee},so=rs("searchParameters/restore",e=>e2(e,ss)),sl=rs("searchParameters/restoreTab",e=>e2(e,eY)),su=rs("debug/enable"),sc=rs("debug/disable"),sd=rh(!1,e=>{e.addCase(su,()=>!0).addCase(sc,()=>!1).addCase(so,(e,t)=>t.payload.debug??e)}),sf=rs("history/undo"),sp=rs("history/redo"),sh=rs("history/snapshot");rx("history/back",async(e,{dispatch:t})=>{t(sf()),await t(sg())}),rx("history/forward",async(e,{dispatch:t})=>{t(sp()),await t(sg())});let sg=rx("history/change",async(e,{getState:t})=>t().history.present),sm=rs("pipeline/set",e=>e2(e,new J({required:!0,emptyAllowed:!0}))),sy=rh("",e=>{e.addCase(sm,(e,t)=>t.payload).addCase(sg.fulfilled,(e,t)=>t.payload?.pipeline??e).addCase(a9,(e,t)=>t.payload.pipeline||e)}),sv=rs("breadcrumb/deselectAll"),sb=rs("breadcrumb/deselectAllNonBreadcrumbs"),sw=rs("facet/updateFacetAutoSelection",e=>e2(e,{allow:new Q({required:!0})}));class sS extends a${getState;constructor(e){super(e),this.getState=e}get activeInstantResultQuery(){let e=this.getState().instantResults;for(let t in e)for(let r in e[t].cache)if(e[t].cache[r].isActive)return e[t].q;return null}get activeInstantResultCache(){let e=this.getState().instantResults;for(let t in e)for(let r in e[t].cache)if(e[t].cache[r].isActive)return e[t].cache[r];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??ax().q}get responseTime(){return this.activeInstantResultCache?.duration??eC().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??eC().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}}let sE={id:eY},s_={...sE,q:eK},sC=rs("instantResults/register",e=>e2(e,sE)),sO=rs("instantResults/updateQuery",e=>e2(e,s_)),sk=rs("instantResults/clearExpired",e=>e2(e,sE)),sI=new W({required:!0,min:0}),sA=rs("pagination/registerNumberOfResults",e=>e2(e,sI)),sT=rs("pagination/updateNumberOfResults",e=>e2(e,sI)),sx=rs("pagination/registerPage",e=>e2(e,sI)),sR=rs("pagination/updatePage",e=>e2(e,sI)),sN=rs("pagination/nextPage"),sj=rs("pagination/previousPage"),sP=rs("query/updateQuery",e=>e2(e,{q:new J,enableQuerySyntax:new Q})),sD=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...r&&{actionCause:r.actionCause},...r&&{customData:r.customData},...e.userDisplayName&&{userDisplayName:e.userDisplayName},...e.deviceId&&{deviceId:e.deviceId},...e.trackingId&&{trackingId:e.trackingId},...{capture:t.capture??""!==t.clientId},...{source:nD(e)}}}),sM=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??eL(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq},...e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq},...e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq},...e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq},...e.context&&{context:e.context.contextValues},...e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude},...e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues},...e.pipeline&&{pipeline:e.pipeline},...e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax},...e.searchHub&&{searchHub:e.searchHub},...e.sortCriteria&&{sortCriteria:e.sortCriteria},...e.configuration.analytics.enabled&&sD(e.configuration.analytics,t,r),...e.excerptLength&&!H(e.excerptLength.length)&&{excerptLength:e.excerptLength.length},...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}}),sL=async(e,t)=>{let r="next"===e.analyticsMode;return{analytics:{clientId:await new i5(e).getCurrentVisitorId(),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...t&&{actionCause:t.actionCause,customData:t.customData},...t&&!r&&{customData:t.customData},...e.userDisplayName&&{userDisplayName:e.userDisplayName},...e.documentLocation&&{documentLocation:e.documentLocation},...e.deviceId&&{deviceId:e.deviceId},...aV()&&{pageId:aV()},...r&&e.trackingId&&{trackingId:e.trackingId},...{capture:r},...r&&{source:nD(e)}}}},sF=async(e,t)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??eL(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...e.configuration.analytics.enabled&&{actionsHistory:aU.getInstance().getHistory()},...e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq},...e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq},...e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq},...e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq},...e.context&&{context:e.context.contextValues},...e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude},...e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues},...e.pipeline&&{pipeline:e.pipeline},...e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax},...e.searchHub&&{searchHub:e.searchHub},...e.sortCriteria&&{sortCriteria:e.sortCriteria},...e.configuration.analytics.enabled&&await sL(e.configuration.analytics,t),...e.excerptLength&&!H(e.excerptLength.length)&&{excerptLength:e.excerptLength.length},...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}}),sq=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}}),sU=()=>aQ("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),s$=e=>aQ("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||ax().q,aq:r.advancedSearchQueries?.aq||sq().aq,cq:r.advancedSearchQueries?.cq||sq().cq,dq:r.advancedSearchQueries?.dq||sq().dq,errorType:e.type,errorMessage:e.message}));var sV=r(6557),sz=r(5030),sB=r(5527);sV.extend(sB);let sG="YYYY/MM/DD@HH:mm:ss";function sH(e,t){let r=sV(e,t);return r.isValid()||t?r:sV(e,sG)}function sQ(e){return e.format(sG)}function sY(e,t){let r=sH(e,t);if(!r.isValid()){let r=` with the format "${t}"`;throw Error(`Could not parse the provided date "${e}
30"${t?r:". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information."}`)}sW(r)}function sW(e){if(e.isBefore("1401-01-01"))throw Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}sV.extend(sz);let sK=["past","now","next"],sZ=["minute","hour","day","week","month","quarter","year"];function sJ(e){let t;if("string"==typeof e&&!s2(e))throw Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let r="string"==typeof e?s3(e):e;new z({amount:new W({required:!(t="now"===r.period),min:1}),unit:new J({required:!t,constrainTo:sZ}),period:new J({required:!0,constrainTo:sK})}).validate(r);let n=sX(r),i=JSON.stringify(r);if(!n.isValid())throw Error(`Date is invalid: ${i}`);sW(n)}function sX(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return sV().subtract(r,n);case"next":return sV().add(r,n);case"now":return sV()}}function s0(e){return sQ(sX(s3(e)))}function s1(e){return e.toLocaleLowerCase().split("-")}function s2(e){let[t,r,n]=s1(e);if("now"===t)return!0;if(!sK.includes(t)||!sZ.includes(n))return!1;let i=parseInt(r,10);return!Number.isNaN(i)&&!(i<=0)}function s3(e){let[t,r,n]=s1(e);return"now"===t?{period:"now"}:{period:t,amount:r?parseInt(r,10):void 0,unit:n||void 0}}let s5=()=>({dateFacetValueMap:{}});function s4(e,t){if("dateRange"===e.type){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(e=>{var n,i,a,s,o;let l,u;return n=e,i=r,a=t,l=n.start,u=n.end,s2(l)&&(l=s0(l),a.dateFacetValueMap[i][s=l,`start${s}`]=n.start),s2(u)&&(u=s0(u),a.dateFacetValueMap[i][o=u,`end${o}`]=n.end),{...n,start:l,end:u}})}}return e}function s8(e){let t=s5();return{request:{...e,facets:e.facets?.map(e=>s4(e,t))},mappings:t}}function s6(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(e=>e.facetId in t.dateFacetValueMap?{...e,values:e.values.map(r=>{var n,i,a;return n=e.facetId,{...r,start:t.dateFacetValueMap[n][i=r.start,`start${i}`]||r.start,end:t.dateFacetValueMap[n][a=r.end,`end${a}`]||r.end}})}:e)}}:e}let s9=rs("didYouMean/enable"),s7=rs("didYouMean/disable"),oe=rs("didYouMean/automaticCorrections/disable"),ot=rs("didYouMean/automaticCorrections/enable"),or=rs("didYouMean/correction",e=>e2(e,eY)),on=rs("didYouMean/automaticCorrections/mode",e=>e2(e,new J({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0}))),oi=()=>aQ("analytics/didyoumean/click",e=>e.makeDidYouMeanClick()),oa=()=>aQ("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());function os(){return{contextValues:{}}}function oo(){return{contextValues:{}}}function ol(){return{enabled:!0,tabs:{}}}function ou(){return{freezeFacetOrder:!1,facets:{}}}function oc(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}function od(e){return{context:e.context||os(),dictionaryFieldContext:e.dictionaryFieldContext||oo(),facetSet:e.facetSet||{},numericFacetSet:e.numericFacetSet||{},dateFacetSet:e.dateFacetSet||{},categoryFacetSet:e.categoryFacetSet||{},automaticFacetSet:e.automaticFacetSet??ag(),pagination:e.pagination||oc(),query:e.query||ax(),tabSet:e.tabSet||{},advancedSearchQueries:e.advancedSearchQueries||sq(),staticFilterSet:e.staticFilterSet||{},querySet:e.querySet||{},sortCriteria:e.sortCriteria||aP(),pipeline:e.pipeline||"",searchHub:e.searchHub||"default",facetOptions:e.facetOptions||ou(),facetOrder:e.facetOrder??[],debug:e.debug??!1}}let of=new ee({values:{undoneQuery:eK},options:{required:!0}}),op=()=>aQ("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null),oh=e=>aQ("analytics/trigger/query/undo",t=>(e2(e,of),t.makeUndoTriggerQuery(e))),og=()=>aQ("analytics/trigger/notify",(e,t)=>t.triggers?.notifications.length?e.makeTriggerNotify({notifications:t.triggers.notifications}):null),om=()=>aQ("analytics/trigger/redirect",(e,t)=>t.triggers?.redirectTo?e.makeTriggerRedirect({redirectedTo:t.triggers.redirectTo}):null),oy=()=>aQ("analytics/trigger/execute",(e,t)=>t.triggers?.executions.length?e.makeTriggerExecute({executions:t.triggers.executions}):null),ov=rs("trigger/query/ignore",e=>e2(e,new J({emptyAllowed:!0,required:!0}))),ob=rs("trigger/query/modification",e=>e2(e,new ee({values:{originalQuery:eW,modification:eW}})));function ow(e){return Object.values(e).map(e=>e.request)}function oS(e,t){let r={};
30e.forEach(e=>{r[e.facetId]=e});let n=[];return t.forEach(e=>{e in r&&(n.push(r[e]),delete r[e])}),[...n,...Object.values(r)]}function oE(e){return ow(e).map(e=>{let t=e.currentValues.some(({state:e})=>"idle"!==e);return e.generateAutomaticRanges&&!t?{...e,currentValues:[]}:e})}let o_={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function oC(e){var t;return oS([...ow((t=e).facetSet??{}).map(e=>{let t=o_[e.sortCriteria];return t?{...e,sortCriteria:t}:e}),...oE(t.numericFacetSet??{}),...oE(t.dateFacetSet??{}),...ow(t.categoryFacetSet??{})].filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0),e.facetOrder??[])}let oO=async(e,t)=>{var r,n;let i,a,s,o=(r=e,i=r.advancedSearchQueries?.cq.trim()||"",a=Object.values(r.tabSet||{}).find(e=>e.isActive),[i,a?.expression.trim()||"",...Object.values(r.staticFilterSet||{}).map(e=>{let t=e.values.filter(e=>"selected"===e.state&&!!e.expression.trim()),r=t.map(e=>e.expression).join(" OR ");return t.length>1?`(${r})`:r})].filter(e=>!!e).join(" AND ")),l=oC(e),u=(n=e,(s=n.automaticFacetSet?.set)?Object.values(s).map(e=>e.response).map(ok).filter(e=>e.currentValues.length>0):void 0);return s8({...await sF(e,t),...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...o&&{cq:o},...l.length&&{facets:l},...e.pagination&&{numberOfResults:e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0,firstResult:e.pagination.firstResult},...e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}},...e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange},...e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:u}},...e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}}})};function ok(e){let{field:t,label:r,values:n}=e;return{field:t,label:r,currentValues:n.filter(e=>"selected"===e.state)}}class oI{config;onUpdateQueryForCorrection;constructor(e,t=e=>{this.dispatch(sP({q:e}))}){this.config=e,this.onUpdateQueryForCorrection=t}async fetchFromAPI({mappings:e,request:t},r){let n=Date.now(),i=s6(await this.extra.apiClient.search(t,r),e);return{response:i,duration:Date.now()-n,queryExecuted:this.getState().query?.q||"",requestExecuted:t}}async process(e){return this.processQueryErrorOrContinue(e)??await this.processQueryCorrectionsOrContinue(e)??await this.processQueryTriggersOrContinue(e)??this.processSuccessResponse(e)}processQueryErrorOrContinue(e){return void 0!==e.response.error?(this.dispatch(s$(e.response.error)),this.rejectWithValue(e.response.error)):null}async processQueryCorrectionsOrContinue(e){let t=this.getState(),r=this.getSuccessResponse(e);if(!r||!t.didYouMean)return null;let{enableDidYouMean:n,automaticallyCorrectQuery:i}=t.didYouMean,{results:a,queryCorrections:s,queryCorrection:o}=r;if(!n||!i)return null;let l=0===a.length&&s&&0!==s.length,u=!H(o)&&!H(o.correctedQuery);if(!l&&!u)return null;let c=l?await this.processLegacyDidYouMeanAutoCorrection(e):this.processModernDidYouMeanAutoCorrection(e);return this.dispatch(sh(od(this.getState()))),c}async processLegacyDidYouMeanAutoCorrection(e){let t=this.getCurrentQuery(),r=this.getSuccessResponse(e);if(!r.queryCorrections)return null;let{correctedQuery:n}=r.queryCorrections[0],i=await this.automaticallyRetryQueryWithCorrection(n);return void 0!==i.response.error?(this.dispatch(s$(i.response.error)),this.rejectWithValue(i.response.error)):(this.logOriginalAnalyticsQueryBeforeAutoCorrection(e),this.dispatch(sh(od(this.getState()))),{...i,response:{...i.response.success,queryCorrections:r.queryCorrections},automaticallyCorrected:!0,originalQuery:t,analyticsAction:oa()})}processModernDidYouMeanAutoCorrection(e){let t=this.getSuccessResponse(e),{correctedQuery:r,originalQuery:n}=t.queryCorrection;return this.onUpdateQueryForCorrection(r),{...e,response:{...t},queryExecuted:r,automaticallyCorrected:!0,originalQuery:n,analyticsAction:oa()}}logOriginalAnalyticsQueryBeforeAutoCorrection(e){let t=this.getState(),r=this.getSuccessResponse(e);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(e.queryExecuted,e.duration,t,r),this.extra)}async processQueryTriggersOrContinue(e){let t=this.getSuccessResponse(e);if(!t)return null;let r=t.triggers.find(e=>"query"===e.type)?.content||"";if(!r)return null;if(this.getState().triggers?.queryModification.queryToIgnore===r)return this.dispatch(ov("")),null;this.analyticsAction&&await this.dispatch(this.analyticsAction);let n=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(r);return void 0!==i.response.error?(this.dispatch(s$(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch(sh(od(this.getState()))),{...i,response:{...i.response.success},automaticallyCorrected:!1,originalQuery:n,analyticsAction:op()})}getStateAfterResponse(e,t,r,n){return{...r,query:{q:e,enableQuerySyntax:r.query?.enableQuerySyntax??ax().enableQuerySyntax},search:{...eC(),duration:t,response:n,results:n.results}}}processSuccessResponse(e){return this.dispatch(sh(od(this.getState()))),{...e,response:this.getSuccessResponse(e),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(e){return void 0!==e.response.success?e.response.success:null}async automaticallyRetryQueryWithCorrection(e){this.onUpdateQueryForCorrection(e);let t=await this.fetchFromAPI(await oO(this.getState()),{origin:"mainSearch"});return this.dispatch(or(e)),t}async automaticallyRetryQueryWithTriggerModification(e){return this.dispatch(ob({newQuery:e,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(e),await this.fetchFromAPI(await oO(this.getState()),{origin:"mainSearch"})}getCurrentQuery(){let e=this.getState();return e.query?.q!==void 0?e.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}}let oA=rx("search/executeSearch",async(e,t)=>{let r=t.getState();return await o$(r,t,e)}),oT=rx("search/fetchPage",async(e,t)=>{let r=t.getState();return await oF(r,t,e)}),ox=rx("search/fetchMoreResults",async(e,t)=>{let r=t.getState();return await oq(t,r)}),oR=rx("search/fetchFacetValues",async(e,t)=>{let r=t.getState();return await oU(t,e,r)}
30),oN=rx("search/fetchInstantResults",async(e,t)=>oL(e,t)),oj=async(e,t)=>{let r=await oO(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r},oP=async(e,t,r)=>s8({...await sF(e),...e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean},numberOfResults:r,q:t}),oD=async(e,t)=>{let r=await oO(e,t);return r.request.numberOfResults=0,r},oM=e=>{e.configuration.analytics.enabled&&aU.getInstance().addElement({name:"Query",...e.query?.q&&{value:e.query.q},time:JSON.stringify(new Date)})};async function oL(e,t){e2(e,{id:eY,q:eY,maxResultsPerQuery:new W({required:!0,min:1}),cacheTimeout:new W});let{q:r,maxResultsPerQuery:n}=e,i=t.getState(),a=new oI({...t,analyticsAction:aQ("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new sS(e))},r=>{t.dispatch(sO({q:r,id:e.id}))}),s=await oP(i,r,n),o=await a.fetchFromAPI(s,{origin:"instantResults",disableAbortWarning:!0}),l=await a.process(o);return"response"in l?{results:l.response.results,searchUid:l.response.searchUid,analyticsAction:l.analyticsAction,totalCountFiltered:l.response.totalCountFiltered,duration:l.duration}:l}async function oF(e,t,r){oM(e);let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=t.extra,{description:s}=await r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=new oI({...t,analyticsAction:r}),l=await oO(e,s),u=await o.fetchFromAPI(l,{origin:"mainSearch"});return await o.process(u)}async function oq(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:i}=e.extra,{description:a}=await sU().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:i}),s=new oI({...e,analyticsAction:sU()}),o=await oj(t,a),l=await s.fetchFromAPI(o,{origin:"mainSearch"});return await s.process(l)}async function oU(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=e.extra,{description:s}=await t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=new oI({...e,analyticsAction:t}),l=await oD(r,s),u=await o.fetchFromAPI(l,{origin:"facetValues"});return await o.process(u)}async function o$(e,t,r){oM(e);let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=t.extra,{description:s}=await r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=await oO(e,s),l=new oI({...t,analyticsAction:r}),u=await l.fetchFromAPI(o,{origin:"mainSearch"});return await l.process(u)}let oV=nN(e=>e.staticFilterSet,e=>Object.values(e||{}).map(e=>{let t=e.values.filter(e=>"selected"===e.state&&!!e.expression.trim()),r=t.map(e=>e.expression).join(" OR ");return t.length>1?`(${r})`:r})),oz=async(e,t,r)=>{var n,i,a,s;let o,l=oQ(e),u=oS([...ow((a=i=n=e).facetSet??{}).map(e=>{let t=o_[e.sortCriteria];return t?{...e,sortCriteria:t}:e}),...oH(a.numericFacetSet??{}),...oH(a.dateFacetSet??{}),...ow(a.categoryFacetSet??{})].filter(({facetId:e})=>i.facetOptions?.facets[e]?.enabled??!0),n.facetOrder??[]),c=(s=e,(o=s.automaticFacetSet?.set)?Object.values(o).map(e=>e.response).map(oG).filter(e=>e.currentValues.length>0):void 0);return s8({..."legacy"===e.configuration.analytics.analyticsMode?await sF(e,r):sM(e,t,r),...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...l&&{cq:l},...u.length&&{facets:u},...e.pagination&&{numberOfResults:oB(e),firstResult:e.pagination.firstResult},...e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}},...e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange},...e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:c}},...e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}}})};function oB(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function oG(e){let{field:t,label:r,values:n}=e;return{field:t,label:r,currentValues:n.filter(e=>"selected"===e.state)}}function oH(e){return ow(e).map(e=>{let t=e.currentValues,r=t.some(({state:e})=>"idle"!==e),n=t.some(e=>e.previousState);return!e.generateAutomaticRanges||r||n?e:{...e,currentValues:[]}})}function oQ(e){let t=e.advancedSearchQueries?.cq.trim()||"",r=Object.values(e.tabSet||{}).find(e=>e.isActive);return[t,r?.expression.trim()||"",...oV(e)].filter(e=>!!e).join(" AND ")}class oY{config;onUpdateQueryForCorrection;constructor(e,t=e=>{this.dispatch(sP({q:e}))}){this.config=e,this.onUpdateQueryForCorrection=t}async fetchFromAPI({mappings:e,request:t},r){let n=Date.now(),i=s6(await this.extra.apiClient.search(t,r),e);return{response:i,duration:Date.now()-n,queryExecuted:this.getState().query?.q||"",requestExecuted:t}}async process(e){return this.processQueryErrorOrContinue(e)??await this.processQueryCorrectionsOrContinue(e)??await this.processQueryTriggersOrContinue(e)??this.processSuccessResponse(e)}processQueryErrorOrContinue(e){return void 0!==e.response.error?(this.dispatch(s$(e.response.error)),this.rejectWithValue(e.response.error)):null}async processQueryCorrectionsOrContinue(e){let t=this.getState(),r=this.getSuccessResponse(e);if(!r||!t.didYouMean)return null;let{enableDidYouMean:n,automaticallyCorrectQuery:i}=t.didYouMean,{results:a,queryCorrections:s,queryCorrection:o}=r;if(!n||!i)return null;let l=0===a.length&&s&&0!==s.length,u=!H(o)&&!H(o.correctedQuery);if(!l&&!u)return null;
30let c=l?await this.processLegacyDidYouMeanAutoCorrection(e):this.processModernDidYouMeanAutoCorrection(e);return this.dispatch(sh(od(this.getState()))),c}async processLegacyDidYouMeanAutoCorrection(e){let t=this.getCurrentQuery(),r=this.getSuccessResponse(e);if(!r.queryCorrections)return null;let{correctedQuery:n}=r.queryCorrections[0],i=await this.automaticallyRetryQueryWithCorrection(n);return void 0!==i.response.error?(this.dispatch(s$(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch(sh(od(this.getState()))),{...i,response:{...i.response.success,queryCorrections:r.queryCorrections},automaticallyCorrected:!0,originalQuery:t})}processModernDidYouMeanAutoCorrection(e){let t=this.getSuccessResponse(e),{correctedQuery:r,originalQuery:n}=t.queryCorrection;return this.onUpdateQueryForCorrection(r),{...e,response:{...t},queryExecuted:r,automaticallyCorrected:!0,originalQuery:n}}async processQueryTriggersOrContinue(e){let t=this.getSuccessResponse(e);if(!t)return null;let r=t.triggers.find(e=>"query"===e.type)?.content||"";if(!r)return null;if(this.getState().triggers?.queryModification.queryToIgnore===r)return this.dispatch(ov("")),null;let n=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(r);return void 0!==i.response.error?(this.dispatch(s$(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch(sh(od(this.getState()))),{...i,response:{...i.response.success},automaticallyCorrected:!1,originalQuery:n})}processSuccessResponse(e){return this.dispatch(sh(od(this.getState()))),{...e,response:this.getSuccessResponse(e),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(e){return void 0!==e.response.success?e.response.success:null}async automaticallyRetryQueryWithCorrection(e){this.onUpdateQueryForCorrection(e);let t=this.getState(),{actionCause:r}={actionCause:L.didYouMeanAutomatic},n=await this.fetchFromAPI(await oz(t,this.extra.navigatorContext,{actionCause:r}),{origin:"mainSearch"});return this.dispatch(or(e)),n}async automaticallyRetryQueryWithTriggerModification(e){return this.dispatch(ob({newQuery:e,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(e),await this.fetchFromAPI(await oz(this.getState(),this.extra.navigatorContext),{origin:"mainSearch"})}getCurrentQuery(){let e=this.getState();return e.query?.q!==void 0?e.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}}let oW=rx("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;e2(e,{q:new J,enableQuerySyntax:new Q,clearFilters:new Q}),e.clearFilters&&(r(sv()),r(sb())),r(sw({allow:!0})),r(sP({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(sR(1))}),oK=rs("search/updateSearchAction"),oZ=rx("search/executeSearch",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return o$(r,t,e.legacy);o4(r);let n=e.next?o8(e.next):void 0,i=await oz(r,t.extra.navigatorContext,n),a=new oY({...t,analyticsAction:n??{}}),s=await a.fetchFromAPI(i,{origin:"mainSearch"});return await a.process(s)}),oJ=rx("search/fetchPage",async(e,t)=>{let r=t.getState();if(o4(r),"legacy"===r.configuration.analytics.analyticsMode||!e.next)return oF(r,t,e.legacy);let n=new oY({...t,analyticsAction:e.next}),i=await oz(r,t.extra.navigatorContext,e.next),a=await n.fetchFromAPI(i,{origin:"mainSearch"});return await n.process(a)}),oX=rx("search/fetchMoreResults",async(e,t)=>{var r;let n=t.getState();if("legacy"===n.configuration.analytics.analyticsMode)return oq(t,n);let i=(r=L.browseResults,{...new a$(t.getState).getBaseMetadata(),actionCause:r,type:r}),a=new oY({...t,analyticsAction:i}),s=await o2(n,t.extra.navigatorContext,i),o=await a.fetchFromAPI(s,{origin:"mainSearch"});return await a.process(o)}),o0=rx("search/fetchFacetValues",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return o$(r,t,e.legacy);let n=new oY({...t,analyticsAction:{}}),i=await o5(r,t.extra.navigatorContext),a=await n.fetchFromAPI(i,{origin:"facetValues"});return await n.process(a)}
30),o1=rx("search/fetchInstantResults",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return oL(e,t);e2(e,{id:eY,q:eY,maxResultsPerQuery:new W({required:!0,min:1}),cacheTimeout:new W});let{q:n,maxResultsPerQuery:i}=e,a=o8({actionCause:L.searchboxAsYouType}),s=await o3(r,t.extra.navigatorContext,n,i,a),o=new oY({...t,analyticsAction:a},r=>{t.dispatch(sO({q:r,id:e.id}))}),l=await o.fetchFromAPI(s,{origin:"instantResults",disableAbortWarning:!0}),u=await o.process(l);return"response"in u?{results:u.response.results,searchUid:u.response.searchUid,totalCountFiltered:u.response.totalCountFiltered,duration:u.duration}:u}),o2=async(e,t,r)=>{let n=await oz(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n},o3=async(e,t,r,n,i)=>s8({...sM(e,t,i),...e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean},numberOfResults:n,q:r}),o5=async(e,t,r)=>{let n=await oz(e,t,r);return n.request.numberOfResults=0,n},o4=e=>{e.configuration.analytics.enabled&&aU.getInstance().addElement({name:"Query",...e.query?.q&&{value:e.query.q},time:JSON.stringify(new Date)})},o8=e=>({actionCause:e.actionCause,type:e.actionCause}),o6=(e,t)=>H(e[t])?H(e.raw[t])?null:e.raw[t]:e[t];function o9(e){return""!==e.search.response.searchUid}let o7=nN(e=>e.search,e=>e?.searchAction?.actionCause||""),le=rs("app/setError");function lt(e,t){let r=t.payload??null;r&&(e.response=eC().response,e.results=[],e.questionAnswer=e_()),e.error=r,e.isLoading=!1}function lr(e,t){e.error=null,e.response=t.payload.response,e.queryExecuted=t.payload.queryExecuted,e.duration=t.payload.duration,e.isLoading=!1}function ln(e,t){e.isLoading=!0,e.searchAction=t.meta.arg.next,e.requestId=t.meta.requestId}function li(e,t){e.isLoading=!0,e.searchAction={actionCause:L.browseResults},e.requestId=t.meta.requestId}let la=rh(eC(),e=>{e.addCase(oZ.rejected,(e,t)=>lt(e,t)),e.addCase(oX.rejected,(e,t)=>lt(e,t)),e.addCase(oJ.rejected,(e,t)=>lt(e,t)),e.addCase(oZ.fulfilled,(e,t)=>{lr(e,t),e.results=t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid})),e.searchResponseId=t.payload.response.searchUid,e.questionAnswer=t.payload.response.questionAnswer,e.extendedResults=t.payload.response.extendedResults}),e.addCase(oX.fulfilled,(e,t)=>{lr(e,t),e.results=[...e.results,...t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid}))]}),e.addCase(oJ.fulfilled,(e,t)=>{lr(e,t),e.results=[...t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid}))]}),e.addCase(o0.fulfilled,(e,t)=>{e.response.facets=t.payload.response.facets,e.response.searchUid=t.payload.response.searchUid}),e.addCase(oZ.pending,ln),e.addCase(oX.pending,li),e.addCase(oJ.pending,ln),e.addCase(oK,(e,t)=>{e.searchAction=t.payload}),e.addCase(le,(e,t)=>{e.error=t.payload,e.isLoading=!1})}),ls=rs("searchHub/set",e=>e2(e,new J({required:!0,emptyAllowed:!0}))),lo=rh("default",e=>{e.addCase(ls,(e,t)=>t.payload).addCase(sg.fulfilled,(e,t)=>t.payload?.searchHub??e).addCase(a9,(e,t)=>t.payload.searchHub||e)});nN(e=>e.query?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,i)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:i})),nN(e=>e.generatedAnswer?.answerApiQueryParams,e=>e);let ll=(e,t,r)=>aQ({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(n,i)=>{let a,s=t??au(i);if(!s)return null;let o=(a=i,a.followUpAnswers?.conversationId);return n.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:s,answerGenerated:e,answerTextIsEmpty:r,...o&&{conversationId:o}})},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:r=>({answerId:t??au(r)??"",answerGenerated:e??!1})}),lu=e=>aQ({prefix:"analytics/generatedAnswer/responseLinked",__legacy__getBuilder:()=>null,analyticsType:"Rga.ResponseLinked",analyticsPayloadBuilder:t=>({answerId:e??au(t)??"",responseId:t.search?.searchResponseId||t.search?.response.searchUid||""})}),lc=nN(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:i}=e;return{...t&&{aq:t}
30,...r&&{cq:r},...n&&{dq:n},...i&&{lq:i}}}),ld=nN(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""});nN(e=>e,e=>{let t=ld(e);return t&&e?e[t].expression:""});let lf=async e=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:eM(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}),lp=e=>oC(e)?.map(e=>s4(e,s5())).sort((e,t)=>e.facetId>t.facetId?1:t.facetId>e.facetId?-1:0),lh=["searching","thinking","answering"];function lg(e){return e.toLowerCase()}function lm(){return{id:"",isVisible:!0,isEnabled:!0,isLoading:!1,isStreaming:!1,citations:[],liked:!1,disliked:!1,responseFormat:{contentFormat:["text/plain"]},feedbackModalOpen:!1,feedbackSubmitted:!1,fieldsToIncludeInCitations:[],isAnswerGenerated:!1,expanded:!1,cannotAnswer:!1,answerApiQueryParams:void 0,answerId:void 0,answerGenerationMode:"automatic",generationSteps:[]}}let ly=new J({required:!0}),lv=new J,lb=new Q({required:!0}),lw={id:ly,title:ly,uri:ly,permanentid:ly,clickUri:lv},lS=new J({required:!0,constrainTo:["text/plain","text/markdown"]}),lE=new J({required:!0,constrainTo:lh}),l_=e=>({...e,name:lg(e.name)}),lC=rs("generatedAnswer/setIsVisible",e=>e2(e,lb)),lO=rs("generatedAnswer/setAnswerId",e=>e2(e,eY)),lk=rs("generatedAnswer/setAnswerGenerationMode",e=>e2(e,new J({constrainTo:["automatic","manual"],required:!1,default:"automatic"}))),lI=rs("generatedAnswer/setIsEnabled",e=>e2(e,lb)),lA=rs("generatedAnswer/updateMessage",e=>e2(e,{textDelta:ly})),lT=rs("generatedAnswer/updateCitations",e=>e2(e,{citations:new er({required:!0,each:new ee({values:lw})})})),lx=rs("generatedAnswer/updateError",e=>e2(e,{message:lv,code:new W({min:0})})),lR=rs("generatedAnswer/resetAnswer"),lN=rs("generatedAnswer/like"),lj=rs("generatedAnswer/dislike"),lP=rs("generatedAnswer/feedbackModal/open"),lD=rs("generatedAnswer/expand"),lM=rs("generatedAnswer/collapse"),lL=rs("generatedAnswer/setId",e=>e2(e,{id:new J({required:!0})})),lF=rs("generatedAnswer/feedbackModal/close"),lq=rs("generatedAnswer/sendFeedback"),lU=rs("generatedAnswer/setIsLoading",e=>e2(e,lb)),l$=rs("generatedAnswer/setIsStreaming",e=>e2(e,lb)),lV=rs("generatedAnswer/setAnswerContentFormat",e=>e2(e,lS)),lz=rs("generatedAnswer/updateResponseFormat",e=>e2(e,{contentFormat:new er({each:lS,default:["text/plain"]})})),lB=rs("knowledge/updateAnswerConfigurationId",e=>e2(e,ly)),lG=rs("generatedAnswer/registerFieldsToIncludeInCitations",e=>e2(e,eZ)),lH=rs("generatedAnswer/setIsAnswerGenerated",e=>e2(e,lb)),lQ=rs("generatedAnswer/setCannotAnswer",e=>e2(e,lb)),lY=rs("generatedAnswer/setAnswerApiQueryParams",e=>e2(e,new ee({}))),lW=rs("generatedAnswer/startStep",e=>e2(l_(e),{name:lE,startedAt:new W({min:0,required:!0})})),lK=rs("generatedAnswer/finishStep",e=>e2(l_(e),{name:lE,finishedAt:new W({min:0,required:!0})}));rx("generatedAnswer/streamAnswer",async(e,t)=>{let r=t.getState(),{dispatch:n,extra:i,getState:a}=t,{search:s}=a(),{queryExecuted:o}=s,{setAbortControllerRef:l}=e,u=await lf(r);n(lU(!0));let c=e=>e.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,d=i.streamingClient?.streamGeneratedAnswer(u,{write:e=>{c(u)&&(n(lU(!1)),e.payload&&e.payloadType&&((e,t)=>{switch(e){case"genqa.headerMessageType":n(lV(JSON.parse(t).contentFormat));break;case"genqa.messageType":n(lA(JSON.parse(t)));break;case"genqa.citationsType":n(lT(JSON.parse(t)));break;case"genqa.endOfStreamType":{let e=JSON.parse(t).answerGenerated,{answerId:r,answer:i}=a().generatedAnswer,s=0!==o.length&&!e,l=!i?.trim();n(lQ(s)),n(l$(!1)),n(lH(e)),n(ll(e,r,e?l:void 0)),n(lu());break}default:r.debug&&i.logger.warn(`Unknown payloadType: "${e}"`)}})(e.payloadType,e.payload))},abort:e=>{c(u)&&n(lx(e))},close:()=>{c(u)&&n(l$(!1))},resetAnswer:()=>{c(u)&&n(lR())}});d?l(d):n(lU(!1))}),rx("generatedAnswer/generateAnswer",async(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:i}})=>{r(lR());let a=t();if(a.generatedAnswer.answerConfigurationId){let e=((e,t)=>{var r;let n,i,a=e.query?.q,{aq:s,cq:o,dq:l,lq:u}=(n=lc(r=e),i=oQ(r),{...n,...i&&{cq:i}}),c=e.context,d=sD(e.configuration.analytics,t,{actionCause:o7(e)}),f=e.searchHub,p=e.pipeline,h=ap(e)??[],g=lp(e),m=ld(e.tabSet)||"default",y=e.configuration.search.locale,v=e.configuration.search.timezone,b=t.referrer||"",w=(e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return void 0!==t?{freezeFacetOrder:t}:void 0})(e),S=e.sortCriteria,E={actionsHistory:e.configuration.analytics.enabled?aU.getInstance().getHistory():[]},_=e.excerptLength?.length,C=(e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}})(e),O=(e=>{if(e.dictionaryFieldContext&&Object.keys(e.dictionaryFieldContext.contextValues).length)return e.dictionaryFieldContext.contextValues})(e);return{q:a,...s&&{aq:s},...o&&{cq:o},...l&&{dq:l},...u&&{lq:u},...e.query&&{enableQuerySyntax:e.query?.enableQuerySyntax},...c?.contextValues&&{context:c.contextValues},pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...f?.length&&{searchHub:f},...p?.length&&{pipeline:p},...g.length&&{facets:g},...e.fields&&{fieldsToInclude:e.fields.fieldsToInclude},...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...e.pagination&&{numberOfResults:oB(e),firstResult:e.pagination.firstResult},tab:m,locale:y,timezone:v,...void 0!==e.debug&&{debug:e.debug},referrer:b,...E,...C??{},..._&&{excerptLength:_},...O&&{dictionaryFieldContext:O},sortCriteria:S,...w&&{facetOptions:w},...d,...e.insightCaseContext?.caseContext&&{caseContext:e.insightCaseContext?.caseContext}}})(a,n);r(lY(e)),await r(u0(e))}else i.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")});
30var lZ=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},lJ=(r(9742),(v=lJ||{}).uninitialized="uninitialized",v.pending="pending",v.fulfilled="fulfilled",v.rejected="rejected",v),lX="uninitialized",l0="pending",l1="fulfilled",l2="rejected";function l3(e){return{status:e,isUninitialized:e===lX,isLoading:e===l0,isSuccess:e===l1,isError:e===l2}}function l5(e,t,r){return e.reduce((e,n,i)=>(t(n,i)&&e.push(r(n,i)),e),[]).flat()}function l4(e){return null!=e}function l8(e){return[...e?.values()??[]].filter(l4)}function l6(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var l9=()=>new Map,l7=(...e)=>fetch(...e),ue=e=>e.status>=200&&e.status<=299;function ut(e){if(!t7(e))return e;let t={...e};for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}var ur=class{constructor(e,t){this.value=e,this.meta=t}};async function un(e=0,t=5,r){let n=~~((Math.random()+.4)*(300<<Math.min(e,t)));await new Promise((e,t)=>{let i=setTimeout(()=>e(),n);r&&(r.aborted?(clearTimeout(i),t(Error("Aborted"))):r.addEventListener("abort",()=>{clearTimeout(i),t(Error("Aborted"))},{once:!0}))})}function ui(e,t){throw Object.assign(new ur({error:e,meta:t}),{throwImmediately:!0})}function ua(e){e.aborted&&ui({status:"CUSTOM_ERROR",error:"Aborted"})}var us={},uo=Object.assign((e,t)=>async(r,n,i)=>{let[a]=[5,(t||us).maxRetries,(i||us).maxRetries].filter(e=>void 0!==e).slice(-1),s={maxRetries:a,backoff:un,retryCondition:(e,t,{attempt:r})=>r<=a,...t,...i},o=0;for(;;){ua(n.signal);try{let t=await e(r,n,i);if(t.error)throw new ur(t);return t}catch(e){if(o++,e.throwImmediately){if(e instanceof ur)return e.value;throw e}if(e instanceof ur){if(!s.retryCondition(e.value.error,r,{attempt:o,baseQueryApi:n,extraOptions:i}))return e.value}else if(o>s.maxRetries)return{error:e};ua(n.signal);try{await s.backoff(o,s.maxRetries,n.signal)}catch(e){throw ua(n.signal),e}}}},{fail:ui}),ul="__rtkq/",uu="focused",uc=rs(`${ul}${uu}`),ud=rs(`${ul}un${uu}`),uf=rs(`${ul}online`),up=rs(`${ul}offline`),uh="query",ug="mutation",um="infinitequery";function uy(e){return e.type===uh}function uv(e){return e.type===um}function ub(e){return uy(e)||uv(e)}function uw(e,t,r,n,i,a){let s="function"==typeof e?e(t,r,n,i):e;return s?l5(s,l4,e=>a(uS(e))):[]}function uS(e){return"string"==typeof e?{type:e}:e}var uE=(e,t)=>e.endpointDefinitions[t],u_=Symbol("forceQueryFn"),uC=e=>"function"==typeof e[u_],uO=class extends lZ{constructor(e,t,r,n){super(e),this.value=t,this.schemaName=r,this._bqMeta=n}},uk=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function uI(e,t,r,n){let i=await e["~standard"].validate(t);if(i.issues)throw new uO(i.issues,t,r,n);return i.value}function uA(e){return e}var uT=(e={})=>({...e,[rc]:!0});function ux(e,{pages:t,pageParams:r},n){let i=t.length-1;return e.getNextPageParam(t[i],t,r[i],r,n)}function uR(e,{pages:t,pageParams:r},n){return e.getPreviousPageParam?.(t[0],t,r[0],r,n)}function uN(e,t,r,n){return uw(r[e.meta.arg.endpointName][t],r_(e)?e.payload:void 0,rE(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function uj(e,t,r){let n=e[t];n&&r(n)}function uP(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function uD(e,t,r){let n=e[uP(t)];n&&r(n)}var uM={},uL=Symbol.for("RTKQ/skipToken"),uF={status:lX},uq=t2(uF,()=>{}),uU=t2(uF,()=>{}),u$=WeakMap?new WeakMap:void 0,uV=({endpointName:e,queryArgs:t})=>{let r="",n=u$?.get(t);if("string"==typeof n)r=n;else{let e=JSON.stringify(t,(e,t)=>t=t7(t="bigint"==typeof t?{$bigint:t.toString()}:t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t);t7(t)&&u$?.set(t,e),r=e}return`${e}(${r})`};function uz(e,...t){return Object.assign(e,...t)}var uB=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:i,selectors:{selectQueryEntry:a,selectConfig:s},getRunningQueryThunk:o,mwApi:l})=>{let{removeQueryResult:u,unsubscribeQueryResult:c,cacheEntriesUpserted:d}=t.internalActions,f=rm(c.match,r.fulfilled,r.rejected,d.match);function p(e){let t=i.currentSubscriptions.get(e);return!!t&&t.size>0}let h={};function g(e){for(let t of e.values())t?.abort?.()}function m(e,t,r){let i=t.getState();for(let s of e){let e=a(i,s);e?.endpointName&&function(e,t,r,i){let s=uE(n,t),l=s?.keepUnusedData
30For??i.keepUnusedDataFor;if(l===1/0)return;let c=Math.max(0,Math.min(l,2147482.647));if(!p(e)){let t=h[e];t&&clearTimeout(t),h[e]=setTimeout(()=>{if(!p(e)){let t=a(r.getState(),e);if(t?.endpointName){let e=r.dispatch(o(t.endpointName,t.originalArgs));e?.abort()}r.dispatch(u({queryCacheKey:e}))}delete h[e]},1e3*c)}}(s,e.endpointName,t,r)}}return(e,r)=>{let a=s(r.getState());if(f(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{let{queryCacheKey:r}=c.match(e)?e.payload:e.meta.arg;t=[r]}m(t,r,a)}if(t.util.resetApiState.match(e)){for(let[e,t]of Object.entries(h))t&&clearTimeout(t),delete h[e];g(i.runningQueries),g(i.runningMutations)}if(n.hasRehydrationInfo(e)){let{queries:t}=n.extractRehydrationInfo(e);m(Object.keys(t),r,a)}}},uG=Error("Promise never resolved before cacheEntryRemoved."),uH=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:i,internalState:a,selectors:{selectQueryEntry:s,selectApiState:o}})=>{let l=rC(n),u=rC(i),c=r_(n,i),d={},{removeQueryResult:f,removeMutationResult:p,cacheEntriesUpserted:h}=e.internalActions;function g(e,t,r){let n=d[e];n?.valueResolved&&(n.valueResolved({data:t,meta:r}),delete n.valueResolved)}function m(e){let t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function y(e){let{arg:t,requestId:r}=e.meta,{endpointName:n,originalArgs:i}=t;return[n,i,r]}function v(t,n,i,a,s){let o=uE(r,t),l=o?.onCacheEntryAdded;if(!l)return;let u={},c=new Promise(e=>{u.cacheEntryRemoved=e}),f=Promise.race([new Promise(e=>{u.valueResolved=e}),c.then(()=>{throw uG})]);f.catch(()=>{}),d[i]=u;let p=e.endpoints[t].select(ub(o)?n:i),h=a.dispatch((e,t,r)=>r),g={...a,getCacheEntry:()=>p(a.getState()),requestId:s,extra:h,updateCachedData:ub(o)?r=>a.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:f,cacheEntryRemoved:c};Promise.resolve(l(n,g)).catch(e=>{if(e!==uG)throw e})}return(r,a,o)=>{var b;let w=l(b=r)?b.meta.arg.queryCacheKey:u(b)?b.meta.arg.fixedCacheKey??b.meta.requestId:f.match(b)?b.payload.queryCacheKey:p.match(b)?uP(b.payload):"";function S(e,t,r,n){let i=s(o,t),l=s(a.getState(),t);!i&&l&&v(e,n,t,a,r)}if(n.pending.match(r)){let[e,t,n]=y(r);S(e,w,n,t)}else if(h.match(r))for(let{queryDescription:e,value:t}of r.payload){let{endpointName:n,originalArgs:i,queryCacheKey:a}=e;S(n,a,r.meta.requestId,i),g(a,t,{})}else if(i.pending.match(r)){if(a.getState()[t].mutations[w]){let[e,t,n]=y(r);v(e,t,w,a,n)}}else if(c(r))g(w,r.payload,r.meta.baseQueryMeta);else if(f.match(r)||p.match(r))m(w);else if(e.util.resetApiState.match(r))for(let e of Object.keys(d))m(e)}},uQ=({api:e,context:{apiUid:t},reducerPath:r})=>(r,n)=>{e.util.resetApiState.match(r)&&n.dispatch(e.internalActions.middlewareRegistered(t))},uY=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:i,api:a,assertTagType:s,refetchQuery:o,internalState:l})=>{let{removeQueryResult:u}=a.internalActions,c=rm(r_(n),rE(n)),d=rm(r_(i,n),rS(i,n)),f=[],p=0;function h(r,n){let i=n.getState(),s=i[e];if(f.push(...r),"delayed"===s.config.invalidationBehavior&&p>0)return;let c=f;if(f=[],0===c.length)return;let d=a.util.selectInvalidatedBy(i,c);t.batch(()=>{for(let{queryCacheKey:e}of Array.from(d.values())){let t=s.queries[e],r=l6(l.currentSubscriptions,e,l9);t&&(0===r.size?n.dispatch(u({queryCacheKey:e})):t.status!==lX&&n.dispatch(o(t)))}})}return(e,t)=>{(i.pending.match(e)||n.pending.match(e))&&p++,d(e)&&(p=Math.max(0,p-1)),c(e)?h(uN(e,"invalidatesTags",r,s),t):d(e)?h([],t):a.util.invalidateTags.match(e)&&h(uw(e.payload,void 0,void 0,void 0,void 0,s),t)}},uW=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:i})=>{let{currentPolls:a,currentSubscriptions:s}=i,o=new Set,l=null;function u(t,r){o.add(t),l||(l=setTimeout(()=>{for(let t of o)!function({queryCacheKey:t},r){let n=r.getState()[e].queries[t],i=s.get(t);if(!n||n.status===lX)return;let{lowestPollingInterval:o}=f(i);if(!Number.isFinite(o))return d(t);let l=a.get(t),u=Date.now()+o;(!l||u<l.nextPollTimestamp)&&c({queryCacheKey:t},r)}({queryCacheKey:t},r);o.clear(),l=null},0))}function c({queryCacheKey:t},r){let i=r.getState()[e],o=i.queries[t],l=s.get(t);if(!o||o.status===lX)return;let{lowestPollingInterval:u,skipPollingIfUnfocused:d}=f(l);if(!Number.isFinite(u))return;let p=a.get(t);p?.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);let h=Date.now()+u;a.set(t,{nextPollTimestamp:h,pollingInterval:u,timeout:setTimeout(()=>{(i.config.focused||!d)&&r.dispatch(n(o)),c({queryCacheKey:t},r)},u)})}function d(e){let t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function f(e=new Map){let t=!1,r=1/0;for(let n of e.values())n.pollingInterval&&(r=Math.min(n.pollingInterval,r),t=n.skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,n),(t.pen
30ding.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&c(e.meta.arg,n),r.util.resetApiState.match(e)&&(function(){for(let e of a.keys())d(e)}(),l&&(clearTimeout(l),l=null),o.clear())}},uK=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let i=rw(r,n),a=rS(r,n),s=r_(r,n),o={};return(r,n)=>{if(i(r)){let{requestId:i,arg:{endpointName:a,originalArgs:s}}=r.meta,l=uE(t,a),u=l?.onQueryStarted;if(u){let t={},r=new Promise((e,r)=>{t.resolve=e,t.reject=r});r.catch(()=>{}),o[i]=t;let c=e.endpoints[a].select(ub(l)?s:i),d=n.dispatch((e,t,r)=>r),f={...n,getCacheEntry:()=>c(n.getState()),requestId:i,extra:d,updateCachedData:ub(l)?t=>n.dispatch(e.util.updateQueryData(a,s,t)):void 0,queryFulfilled:r};u(s,f)}}else if(s(r)){let{requestId:e,baseQueryMeta:t}=r.meta;o[e]?.resolve({data:r.payload,meta:t}),delete o[e]}else if(a(r)){let{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;o[e]?.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete o[e]}}},uZ=Symbol();let uJ=(function(...e){return function(t){let r=nR(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:r,serializeQueryArgs(e){let r=uV;if("serializeQueryArgs"in e.endpointDefinition){let t=e.endpointDefinition.serializeQueryArgs;r=e=>{let r=t(e);return"string"==typeof r?r:uV({...e,queryArgs:r})}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:rO(),extractRehydrationInfo:r,hasRehydrationInfo:nR(e=>null!=r(e))},a={injectEndpoints:function(e){for(let[t,r]of Object.entries(e.endpoints({query:e=>({...e,type:uh}),mutation:e=>({...e,type:ug}),infiniteQuery:e=>({...e,type:um})}))){if(!0!==e.overrideExisting&&t in i.endpointDefinitions){if("throw"===e.overrideExisting)throw Error(nt(39));continue}for(let e of(i.endpointDefinitions[t]=r,s))e.injectEndpoint(t,r)}return a},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(let t of e)n.tagTypes.includes(t)||n.tagTypes.push(t);if(t)for(let[e,r]of Object.entries(t))"function"==typeof r?r(uE(i,e)):Object.assign(uE(i,e)||{},r);return a}},s=e.map(e=>e.init(a,n,i));return a.injectEndpoints({endpoints:t.endpoints})}})((({createSelector:e=nN}={})=>({name:uZ,init(t,{baseQuery:r,tagTypes:n,reducerPath:i,serializeQueryArgs:a,keepUnusedDataFor:s,refetchOnMountOrArgChange:o,refetchOnFocus:l,refetchOnReconnect:u,invalidationBehavior:c,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p},h){!function(){let e="replace",t="remove";function r(e){if(!tu(e))return e;if(tv(e))return e.map(r);if(tb(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(tw(e))return new Set(Array.from(e).map(r));let t=Object.create(tt(e));for(let n in e)t[n]=r(e[n]);
30return tg(e,e6)&&(t[e6]=e[e6]),t}function n(e){return tl(e)?r(e):e}tR[tT]||(tR[tT]={applyPatches_:function(n,i){return i.forEach(i=>{let{path:a,op:s}=i,o=n;for(let e=0;e<a.length-1;e++){let t=th(o),r=a[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||r===tr)&&e7(19),tE(o)&&r===tn&&e7(19),tS(o=tm(o,r))||e7(18,a.join("/"))}let l=th(o),u=r(i.value),c=a[a.length-1];switch(s){case e:switch(l){case 2:return o.set(c,u);case 3:e7(16);default:return o[c]=u}case"add":switch(l){case 1:return"-"===c?o.push(u):o.splice(c,0,u);case 2:return o.set(c,u);case 3:return o.add(u);default:return o[c]=u}case t:switch(l){case 1:return o.splice(c,1);case 2:return o.delete(c);case 3:return o.delete(i.value);default:return delete o[c]}default:e7(17,s)}}),n},generatePatches_:function(r,i,a){if(r.scope_.processedForPatches_.has(r))return;r.scope_.processedForPatches_.add(r);let{patches_:s,inversePatches_:o}=a;switch(r.type_){case 0:case 2:return function(r,i,a,s){let{base_:o,copy_:l,type_:u}=r;tp(r.assigned_,(r,c)=>{let d=tm(o,r,u),f=tm(l,r,u),p=c?tg(o,r)?e:"add":t;if(d===f&&p===e)return;let h=i.concat(r);a.push(p===t?{op:p,path:h}:{op:p,path:h,value:n(f)}),s.push("add"===p?{op:t,path:h}:p===t?{op:"add",path:h,value:n(d)}:{op:e,path:h,value:n(d)})})}(r,i,s,o);case 1:return function(r,i,a,s){let{base_:o,assigned_:l}=r,u=r.copy_;u.length<o.length&&([o,u]=[u,o],[a,s]=[s,a]);let c=!0===r.allIndicesReassigned_;for(let t=0;t<o.length;t++){let r=u[t],d=o[t];if((c||l?.get(t.toString()))&&r!==d){let o=r?.[e9];if(o&&o.modified_)continue;let l=i.concat([t]);a.push({op:e,path:l,value:n(r)}),s.push({op:e,path:l,value:n(d)})}}for(let e=o.length;e<u.length;e++){let t=i.concat([e]);a.push({op:"add",path:t,value:n(u[e])})}for(let e=u.length-1;o.length<=e;--e){let r=i.concat([e]);s.push({op:t,path:r})}}(r,i,s,o);case 3:return function(e,r,n,i){let{base_:a,copy_:s}=e,o=0;a.forEach(e=>{if(!s.has(e)){let a=r.concat([o]);n.push({op:t,path:a,value:e}),i.unshift({op:"add",path:a,value:e})}o++}),o=0,s.forEach(e=>{if(!a.has(e)){let a=r.concat([o]);n.push({op:"add",path:a,value:e}),i.unshift({op:t,path:a,value:e})}o++})}(r,i,s,o)}},generateReplacementPatches_:function(t,r,n){let{patches_:i,inversePatches_:a}=n;i.push({op:e,path:[],value:r===e8?void 0:r}),a.push({op:e,path:[],value:t})},getPath:function e(t,r=[]){if(void 0!==t.key_){var n;let e,i=t.parent_.copy_??t.parent_.base_,a=tS(n=tm(i,t.key_))?n?.[e9]:null,s=tm(i,t.key_);
30if(void 0===s||s!==t.draft_&&s!==t.base_&&s!==t.copy_||null!=a&&a.base_!==t.base_)return null;let o=3===t.parent_.type_;if(e=o?Array.from(t.parent_.drafts_.keys()).indexOf(t.key_):t.key_,!(o&&i.size>e||tg(i,e)))return null;r.push(e)}if(t.parent_)return e(t.parent_,r);r.reverse();try{var i=t.copy_,a=r;let e=i;for(let t=0;t<a.length-1;t++)if(!tS(e=tm(e,a[t]))||null===e)throw Error(`Cannot resolve path at '${a.join("/")}'`)}catch(e){return null}return r}})}();let g=e=>e;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:uf,onOffline:up,onFocus:uc,onFocusLost:ud},util:{}});let m=function({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=e=>uq,i=e=>uU;return{buildQuerySelector:function(e,t){return u(e,t,a)},buildInfiniteQuerySelector:function(e,t){let{infiniteQueryOptions:r}=t;return u(e,t,function(e){var t,n,i,a,s,o;let l={...e,...l3(e.status)},{isLoading:u,isError:c,direction:d}=l,f="forward"===d,p="backward"===d;return{...l,hasNextPage:(t=r,n=l.data,i=l.originalArgs,!!n&&null!=ux(t,n,i)),hasPreviousPage:(a=r,s=l.data,o=l.originalArgs,!!s&&!!a.getPreviousPageParam&&null!=uR(a,s,o)),isFetchingNextPage:u&&f,isFetchingPreviousPage:u&&p,isFetchNextPageError:c&&f,isFetchPreviousPageError:c&&p}})},buildMutationSelector:function(){return e=>{let n;return r((n="object"==typeof e?uP(e)??uL:e)===uL?i:e=>(function(e){return e[t]})(e)?.mutations?.[n]??uU,a)}},selectInvalidatedBy:function(e,r){let n=e[t],i=new Set;for(let e of l5(r,l4,uS)){let t=n.provided.tags[e.type];if(t)for(let r of(void 0!==e.id?t[e.id]:Object.values(t).flat())??[])i.add(r)}return Array.from(i.values()).flatMap(e=>{let t=n.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return l5(Object.values(o(e)),e=>e?.endpointName===t&&e.status!==lX,e=>e.originalArgs)},selectApiState:s,selectQueries:o,selectMutations:function(e){return function(e){return e[t]}(e)?.mutations},selectQueryEntry:l,selectConfig:function(e){return function(e){return e[t]}(e)?.config}};function a(e){return{...e,...l3(e.status)}}function s(e){return e[t]}function o(e){return e[t]?.queries}function l(e,t){return o(e)?.[t]}function u(t,i,a){return s=>{if(s===uL)return r(n,a);let o=e({queryArgs:s,endpointDefinition:i,endpointName:t});return r(e=>l(e,o)??uq,a)}}}({serializeQueryArgs:a,reducerPath:i,createSelector:e}),{selectInvalidatedBy:y,selectCachedArgsForQuery:v,buildQuerySelector:b,buildInfiniteQuerySelector:w,buildMutationSelector:S}=m;uz(t.util,{selectInvalidatedBy:y,selectCachedArgsForQuery:v});let{queryThunk:E,infiniteQueryThunk:_,mutationThunk:C,patchQueryData:O,updateQueryData:k,upsertQueryData:I,prefetch:A,buildMatchThunkActions:T}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:i,assertTagType:a,selectors:s,onSchemaFailure:o,catchSchemaFailure:l,skipSchemaValidation:u}){function c(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}function d(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}let f=(e,t)=>e.query&&e[t]?e[t]:uA,p=async(e,{signal:n,abort:i,rejectWithValue:a,fulfillWithValue:p,dispatch:g,getState:m,extra:y})=>{let v=r[e.endpointName],{metaSchema:b,skipSchemaValidation:w=u}=v,S=e.type===uh;try{let r,a=uA,o={signal:n,abort:i,dispatch:g,getState:m,extra:y,endpoint:e.endpointName,type:e.type,forced:S?h(e,m()):void 0,queryCacheKey:S?e.queryCacheKey:void 0},l=S?e[u_]:void 0,u=async(t,r,n,i)=>{if(null==r&&t.pages.length)return Promise.resolve({data:t});let a={queryArg:e.originalArgs,pageParam:r},s=await E(a),o=i?c:d;return{data:{pages:o(t.pages,s.data,n),pageParams:o(t.pageParams,r,n)},meta:s.meta}};async function E(e){let r,{extraOptions:n,argSchema:i,rawResponseSchema:s,responseSchema:u}=v;if(i&&!uk(w,"arg")&&(e=await uI(i,e,"argSchema",{})),l?r=l():v.query?(a=f(v,"transformResponse"),r=await t(v.query(e),o,n)):r=await v.queryFn(e,o,n,e=>t(e,o,n)),r.error)throw new ur(r.error,r.meta);let{data:c}=r;s&&!uk(w,"rawResponse")&&(c=await uI(s,r.data,"rawResponseSchema",r.meta));let d=await a(c,r.meta,e);return u&&!uk(w,"response")&&(d=await uI(u,d,"responseSchema",r.meta)),{...r,data:d}}if(S&&"infiniteQueryOptions"in v){let t,{infiniteQueryOptions:n}=v,{maxPages:i=1/0}=n,a=e.refetchCachedPages??n.refetchCachedPages??!0,o=s.selectQueryEntry(m(),e.queryCacheKey)?.data,c=(!h(e,m())||e.direction)&&o?o:{pages:[],pageParams:[]};if("direction"in e&&e.direction&&c.pages.length){let r="backward"===e.direction,a=(r?uR:ux)(n,c,e.originalArgs);t=await u(c,a,i,r)}else{let{initialPageParam:r=n.initialPageParam}=e,s=o?.pageParams??[],d=s[0]??r,f=s.length;if(t=await u(c,d,i),l&&(t={data:t.data.pages[0]}),a)for(let r=1;r<f;r++){let r=ux(n,t.data,e.originalArgs);t=await u(t.data,r,i)}}r=t}else r=await E(e.originalArgs);return b&&!uk(w,"meta")&&r.meta&&(r.meta=await uI(b,r.meta,"metaSchema",r.meta)),p(r.data,uT({fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta}
30))}catch(r){let t=r;if(t instanceof ur){let r=f(v,"transformErrorResponse"),{rawErrorResponseSchema:n,errorResponseSchema:i}=v,{value:s,meta:o}=t;try{n&&!uk(w,"rawErrorResponse")&&(s=await uI(n,s,"rawErrorResponseSchema",o)),b&&!uk(w,"meta")&&(o=await uI(b,o,"metaSchema",o));let t=await r(s,o,e.originalArgs);return i&&!uk(w,"errorResponse")&&(t=await uI(i,t,"errorResponseSchema",o)),a(t,uT({baseQueryMeta:o}))}catch(e){t=e}}try{if(t instanceof uO){let r={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:S?e.queryCacheKey:void 0};v.onSchemaFailure?.(t,r),o?.(t,r);let{catchSchemaFailure:n=l}=v;if(n)return a(n(t,r),uT({baseQueryMeta:t._bqMeta}))}}catch(e){t=e}throw console.error(t),t}};function h(e,t){let r=s.selectQueryEntry(t,e.queryCacheKey),n=s.selectConfig(t).refetchOnMountOrArgChange,i=r?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&n);return!!a&&(!0===a||(Number(new Date)-Number(i))/1e3>=a)}let g=()=>rx(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){let t=r[e.endpointName];return uT({startedTimeStamp:Date.now(),...uv(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){let n=t(),i=s.selectQueryEntry(n,e.queryCacheKey),a=i?.fulfilledTimeStamp,o=e.originalArgs,l=i?.originalArgs,u=r[e.endpointName],c=e.direction;return!!uC(e)||i?.status!=="pending"&&(!!(h(e,n)||uy(u)&&u?.forceRefetch?.({currentArg:o,previousArg:l,endpointState:i,state:n}))||!a||!!c)},dispatchConditionRejection:!0}),m=g(),y=g();function v(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:m,mutationThunk:rx(`${e}/executeMutation`,p,{getPendingMeta:()=>uT({startedTimeStamp:Date.now()})}),infiniteQueryThunk:y,prefetch:(e,t,r={})=>(n,a)=>{let s="force"in r&&r.force,o="ifOlderThan"in r&&r.ifOlderThan,l=(r=!0)=>i.endpoints[e].initiate(t,{forceRefetch:r,subscribe:!1}),u=i.endpoints[e].select(t)(a());if(s)n(l());else if(o){let e=u?.fulfilledTimeStamp;if(!e)return void n(l());(Number(new Date)-Number(new Date(e)))/1e3>=o&&n(l())}else n(l(!1))},updateQueryData:(e,t,r,n=!0)=>(a,s)=>{let o,l=i.endpoints[e].select(t)(s()),u={patches:[],inversePatches:[],undo:()=>a(i.util.patchQueryData(e,t,u.inversePatches,n))};if(l.status===lX)return u;if("data"in l)if(tu(l.data)){let[e,t,n]=t3(l.data,r);u.patches.push(...t),u.inversePatches.push(...n),o=e}else o=r(l.data),u.patches.push({op:"replace",path:[],value:o}),u.inversePatches.push({op:"replace",path:[],value:l.data});return 0===u.patches.length||a(i.util.patchQueryData(e,t,u.patches,n)),u},upsertQueryData:(e,t,r)=>n=>n(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[u_]:()=>({data:r})})),patchQueryData:(e,t,s,o)=>(l,u)=>{let c=r[e],d=n({queryArgs:t,endpointDefinition:c,endpointName:e});if(l(i.internalActions.queryResultPatched({queryCacheKey:d,patches:s})),!o)return;let f=i.endpoints[e].select(t)(u()),p=uw(c.providesTags,f.data,void 0,t,{},a);l(i.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:ry(rw(e),v(t)),matchFulfilled:ry(r_(e),v(t)),matchRejected:ry(rS(e),v(t))}}}}({baseQuery:r,reducerPath:i,context:h,api:t,serializeQueryArgs:a,assertTagType:g,selectors:m,onSchemaFailure:d,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:x,actions:R}=function({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:i,apiUid:a,extractRehydrationInfo:s,hasRehydrationInfo:o},assertTagType:l,config:u}){let c=rs(`${e}/resetApiState`);function d(e,t,r,n){e[t.queryCacheKey]??={status:lX,endpointName:t.endpointName},uj(e,t.queryCacheKey,e=>{e.status=l0,e.requestId=r&&e.requestId?e.requestId:n.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=n.startedTimeStamp,uv(i[n.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function f(e,t,r,n){uj(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!n)return;let{merge:a}=i[t.arg.endpointName];if(e.status=l1,a)if(void 0!==e.data){let{fulfilledTimeStamp:n,arg:i,baseQueryMeta:s,requestId:o}=t,l=t2(e.data,e=>a(e,r,{arg:i.originalArgs,baseQueryMeta:s,fulfilledTimeStamp:n,requestId:o}));e.data=l}else e.data=r;else{var s;e.data=i[t.arg.endpointName].structuralSharing??!0?function e(t,r){if(t===r||!(t7(t)&&t7(r)||Array.isArray(t)&&Array.isArray(r)))return r;let n=Object.keys(r),i=Object.keys(t),a=n.length===i.length,s=Array.isArray(r)?[]:{};for(let i of n)s[i]=e(t[i],r[i]),a&&(a=t[i]===s[i]);return a?t:s}
30(tl(e.data)?(tl(s=e.data)||e7(15,s),s[e9].base_):e.data,r):r}delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}let p=rP({name:`${e}/queries`,initialState:uM,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:rd()},cacheEntriesUpserted:{reducer(e,t){for(let r of t.payload){let{queryDescription:n,value:i}=r;d(e,n,!0,{arg:n,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),f(e,{arg:n,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},i,!0)}},prepare:e=>({payload:e.map(e=>{let{endpointName:t,arg:r,value:a}=e,s=i[t];return{queryDescription:{type:uh,endpointName:t,originalArgs:e.arg,queryCacheKey:n({queryArgs:r,endpointDefinition:s,endpointName:t})},value:a}}),meta:{[rc]:!0,requestId:rO(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){uj(e,t,e=>{e.data=t5(e.data,r.concat())})},prepare:rd()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:r}})=>{let n=uC(r);d(e,r,n,t)}).addCase(t.fulfilled,(e,{meta:t,payload:r})=>{let n=uC(t.arg);f(e,t,r,n)}).addCase(t.rejected,(e,{meta:{condition:t,arg:r,requestId:n},error:i,payload:a})=>{uj(e,r.queryCacheKey,e=>{if(t);else{if(e.requestId!==n)return;e.status=l2,e.error=a??i}})}).addMatcher(o,(e,t)=>{let{queries:r}=s(t);for(let[t,n]of Object.entries(r))(n?.status===l1||n?.status===l2)&&(e[t]=n)})}}),h=rP({name:`${e}/mutations`,initialState:uM,reducers:{removeMutationResult:{reducer(e,{payload:t}){let r=uP(t);r in e&&delete e[r]},prepare:rd()}},extraReducers(e){e.addCase(r.pending,(e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:i}})=>{n.track&&(e[uP(t)]={requestId:r,status:l0,endpointName:n.endpointName,startedTimeStamp:i})}).addCase(r.fulfilled,(e,{payload:t,meta:r})=>{r.arg.track&&uD(e,r,e=>{e.requestId===r.requestId&&(e.status=l1,e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)})}).addCase(r.rejected,(e,{payload:t,error:r,meta:n})=>{n.arg.track&&uD(e,n,e=>{e.requestId===n.requestId&&(e.status=l2,e.error=t??r)})}).addMatcher(o,(e,t)=>{let{mutations:r}=s(t);for(let[t,n]of Object.entries(r))(n?.status===l1||n?.status===l2)&&t!==n?.requestId&&(e[t]=n)})}}),g=rP({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(let{queryCacheKey:r,providedTags:n}of t.payload){for(let{type:t,id:i}of(m(e,r),n)){let n=(e.tags[t]??={})[i||"__internal_without_id"]??=[];n.includes(r)||n.push(r)}e.keys[r]=n}},prepare:rd()}},extraReducers(e){e.addCase(p.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{m(e,t)}).addMatcher(o,(e,t)=>{let{provided:r}=s(t);for(let[t,n]of Object.entries(r.tags??{}))for(let[i,a]of Object.entries(n)){let n=(e.tags[t]??={})[i||"__internal_without_id"]??=[];for(let t of a)n.includes(t)||n.push(t),e.keys[t]=r.keys[t]}}).addMatcher(rm(r_(t),rE(t)),(e,t)=>{y(e,[t])}).addMatcher(p.actions.cacheEntriesUpserted.match,(e,t)=>{y(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function m(e,t){var r;for(let n of tl(r=e.keys[t]??[])?t0(r):r){let r=n.type,i=n.id??"__internal_without_id",a=e.tags[r]?.[i];a&&(e.tags[r][i]=(tl(a)?t0(a):a).filter(e=>e!==t))}delete e.keys[t]}function y(e,t){let r=t.map(e=>{let t=uN(e,"providesTags",i,l),{queryCacheKey:r}=e.meta.arg;return{queryCacheKey:r,providedTags:t}});g.caseReducers.updateProvidedBy(e,g.actions.updateProvidedBy(r))}let v=rP({name:`${e}/subscriptions`,initialState:uM,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),b=rP({name:`${e}/internalSubscriptions`,initialState:uM,reducers:{subscriptionsUpdated:{reducer:(e,t)=>t5(e,t.payload),prepare:rd()}}}),w=rP({name:`${e}/config`,initialState:{online:"u"<typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"u"<typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(uf,e=>{e.online=!0}).addCase(up,e=>{e.online=!1}).addCase(uc,e=>{e.focused=!0}).addCase(ud,e=>{e.focused=!1}).addMatcher(o,e=>({...e}))}}),S=re({queries:p.reducer,mutations:h.reducer,provided:g.reducer,subscriptions:b.reducer,config:w.reducer});return{reducer:(e,t)=>S(c.match(t)?void 0:e,t),actions:{...w.actions,...p.actions,...v.actions,...b.actions,...h.actions,...g.actions,resetApiState:c}}}({context:h,queryThunk:E,infiniteQueryThunk:_,mutationThunk:C,serializeQueryArgs:a,reducerPath:i,assertTagType:g,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:o,keepUnusedData
30For:s,reducerPath:i,invalidationBehavior:c}});uz(t.util,{patchQueryData:O,updateQueryData:k,upsertQueryData:I,prefetch:A,resetApiState:R.resetApiState,upsertQueryEntries:R.cacheEntriesUpserted}),uz(t.internalActions,R);let N=new WeakMap,j=e=>l6(N,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:P,buildInitiateInfiniteQuery:D,buildInitiateMutation:M,getRunningMutationThunk:L,getRunningMutationsThunk:F,getRunningQueriesThunk:q,getRunningQueryThunk:U}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:i,context:a,getInternalState:s}){let o=e=>s(e)?.runningQueries,l=e=>s(e)?.runningMutations,{unsubscribeQueryResult:u,removeMutationResult:c,updateSubscriptionOptions:d}=i.internalActions;return{buildInitiateQuery:function(e,t){return f(e,t)},buildInitiateInfiniteQuery:function(e,t){return f(e,t)},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{var o,u;let d=a(n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i})),{requestId:f,abort:p,unwrap:h}=d,g=Object.assign((o=d.unwrap().then(e=>({data:e})),u=e=>({error:e}),o.catch(u)),{arg:d.arg,requestId:f,abort:p,unwrap:h,reset:()=>{a(c({requestId:f,fixedCacheKey:i}))}}),m=l(a);return m.set(f,g),g.then(()=>{m.delete(f)}),i&&(m.set(i,g),g.then(()=>{m.get(i)===g&&m.delete(i)})),g}},getRunningQueryThunk:function(t,r){return n=>{let i=e({queryArgs:r,endpointDefinition:uE(a,t),endpointName:t});return o(n)?.get(i)}},getRunningMutationThunk:function(e,t){return e=>l(e)?.get(t)},getRunningQueriesThunk:function(){return e=>l8(o(e))},getRunningMutationsThunk:function(){return e=>l8(l(e))}};function f(n,a){let s=(l,{subscribe:c=!0,forceRefetch:f,subscriptionOptions:p,[u_]:h,...g}={})=>(m,y)=>{let v,b=e({queryArgs:l,endpointDefinition:a,endpointName:n}),w={...g,type:uh,subscribe:c,forceRefetch:f,subscriptionOptions:p,endpointName:n,originalArgs:l,queryCacheKey:b,[u_]:h};if(uy(a))v=t(w);else{let{direction:e,initialPageParam:t,refetchCachedPages:n}=g;v=r({...w,direction:e,initialPageParam:t,refetchCachedPages:n})}let S=i.endpoints[n].select(l),E=m(v),_=S(y()),{requestId:C,abort:O}=E,k=_.requestId!==C,I=o(m)?.get(b),A=()=>S(y()),T=Object.assign(h?E.then(A):k&&!I?Promise.resolve(_):Promise.all([I,E]).then(A),{arg:l,requestId:C,subscriptionOptions:p,queryCacheKey:b,abort:O,async unwrap(){let e=await T;if(e.isError)throw e.error;return e.data},refetch:e=>m(s(l,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){c&&m(u({queryCacheKey:b,requestId:C}))},updateSubscriptionOptions(e){T.subscriptionOptions=e,m(d({endpointName:n,requestId:C,queryCacheKey:b,options:e}))}});if(!I&&!k&&!h){let e=o(m);e.set(b,T),T.then(()=>{e.delete(b)})}return T};return s}}({queryThunk:E,mutationThunk:C,infiniteQueryThunk:_,api:t,serializeQueryArgs:a,context:h,getInternalState:j});uz(t.util,{getRunningMutationThunk:L,getRunningMutationsThunk:F,getRunningQueryThunk:U,getRunningQueriesThunk:q});let{middleware:$,actions:V}=function(e){let{reducerPath:t,queryThunk:r,api:n,context:i,getInternalState:a}=e,{apiUid:s}=i,o={invalidateTags:rs(`${t}/invalidateTags`)},l=e=>e.type.startsWith(`${t}/`),u=[uQ,uB,uY,uW,uH,uK];return{middleware:r=>{let o=!1,d=a(r.dispatch),f={...e,internalState:d,refetchQuery:c,isThisApiSliceAction:l,mwApi:r},p=u.map(e=>e(f)),h=(({api:e,queryThunk:t,internalState:r,mwApi:n})=>{let i=`${e.reducerPath}/subscriptions`,a=null,s=null,{updateSubscriptionOptions:o,unsubscribeQueryResult:l}=e.internalActions,u=()=>r.currentSubscriptions,c={getSubscriptions:u,getSubscriptionCount:e=>{let t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{let r=u();return!!r?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(n,u)=>{if(a||(a=d(r.currentSubscriptions)),e.util.resetApiState.match(n))return a={},r.currentSubscriptions.clear(),s=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(n))return[!1,c];let f=((r,n)=>{if(o.match(n)){let{queryCacheKey:e,requestId:t,options:i}=n.payload,a=r.get(e);return a?.has(t)&&a.set(t,i),!0}if(l.match(n)){let{queryCacheKey:e,requestId:t}=n.payload,i=r.get(e);return i&&i.delete(t),!0}if(e.internalActions.removeQueryResult.match(n))return r.delete(n.payload.queryCacheKey),!0;if(t.pending.match(n)){let{meta:{arg:e,requestId:t}}=n,i=l6(r,e.queryCacheKey,l9);return e.subscribe&&i.set(t,e.subscriptionOptions??i.get(t)??{}),!0}let i=!1;if(t.rejected.match(n)){let{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){let e=l6(r,t.queryCacheKey,l9);e.set(a,t.subscriptionOptions??e.get(a)??{}),i=!0}}return i})(r.currentSubscriptions,n),p=!0;if(f){s||(s=setTimeout(()=>{let t=d(r.currentSubscriptions),[,n]=t3(a,()=>t);u.next(e.internalActions.subscriptionsUpdated(n)),a=t,s=null},500));let o="string"==typeof n.type&&!!n.type.startsWith(i),l=t.rejected.match(n)&&n.meta.condition&&!!n.meta.arg.subscribe;p=!o&&!l}return[p,!1]}})(f),g=(({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:i})=>{let{removeQueryResult:a}=r.internalActions;function s(r,s){let o=r.getState()[e],l=o.queries,u=i.currentSubscriptions;t.batch(()=>{for(let e of u.keys()){let t=l[e],i=u.get(e);if(!i||!t)continue;let c=[...i.values()];(c.some(e=>!0===e[s])||c.every(e=>void 0===e[s])&&o.config[s])&&(0===i.size?r.dispatch(a({queryCacheKey:e})):t.status!==lX&&r.dispatch(n(t)))}})}return(e,t)=>{uc.match(e)&&s(t,"refetchOnFocus"),uf.match(e)&&s(t,"refetchOnReconnect")}})(f);return e=>a=>{let u;if(!rr(a))return e(a);o||(o=!0,r.dispatch(n.internalActions.middlewareRegistered(s)));let c={...r,next:e},d=r.getState(),[f,m]=h(a,c,d);if(u=f?e(a):m,r.getState()[t]&&(g(a,c,d),l(a)||i.hasRehydrationInfo(a)))for(let e of p)e(a,c,d);return u}},actions:o};function c(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}({reducerPath:i,context:h,queryThunk:E,mutationThunk:C,infiniteQueryThunk:_,api:t,assertTagType:g,selectors:m,getRunningQueryThunk:U,getInternalState:j});return uz(t.util,V),uz(t,{reducer:x,middleware:$}),{name:uZ,injectEndpoint(e,r){let n=t.endpoints[e]??={};uy(r)&&uz(n,{name:e,select:b(e,r),initiate:P(e,r)},T(E,e)),r.type===ug&&uz(n,{name:e,select:S(),initiate:M(e)},T(C,e)),uv(r)&&uz(n,{name:e,select:w(e,r),initiate:D(e,r)},T(E,e))}}}}))())({reducerPath:"answer",baseQuery:uo(async(e,t,r)=>{let n=t.getState(),{accessToken:i,environment:a,organizationId:s}=n.configuration,o=n.generatedAnswer.answerConfigurationId,l={...e,headers:{...e?.headers||{},Authorization:`Bearer ${i}`}};try{let e=eM(s,a);return{data:(function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=l7,paramsSerializer:n,isJsonContentType:i=e=>
30/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||""),jsonContentType:a="application/json",jsonReplacer:s,timeout:o,responseHandler:l,validateStatus:u,...c}={}){return"u"<typeof fetch&&r===l7&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p,h)=>{let g,m,y,v,b,{getState:w,extra:S,endpoint:E,forced:_,type:C}=p,{url:O,headers:k=new Headers(c.headers),params:I,responseHandler:A=l??"json",validateStatus:T=u??ue,timeout:x=o,...R}="string"==typeof f?{url:f}:f,N={...c,signal:x?((...e)=>{for(let t of e)if(t.aborted)return AbortSignal.abort(t.reason);let t=new AbortController;for(let r of e)r.addEventListener("abort",()=>t.abort(r.reason),{signal:t.signal,once:!0});return t.signal})(p.signal,(v=new AbortController,setTimeout(()=>{let e="signal timed out",t="TimeoutError";v.abort("u">typeof DOMException?new DOMException(e,t):Object.assign(Error(e),{name:t}))},x),v.signal)):p.signal,...R};k=new Headers(ut(k)),N.headers=await t(k,{getState:w,arg:f,extra:S,endpoint:E,forced:_,type:C,extraOptions:h})||k;let j="object"==typeof(b=N.body)&&(t7(b)||Array.isArray(b)||"function"==typeof b.toJSON);if(null==N.body||j||"string"==typeof N.body||N.headers.delete("content-type"),!N.headers.has("content-type")&&j&&N.headers.set("content-type",a),j&&i(N.headers)&&(N.body=JSON.stringify(N.body,s)),N.headers.has("accept")||("json"===A?N.headers.set("accept","application/json"):"text"===A&&N.headers.set("accept","text/plain, text/html, */*")),I){let e=~O.indexOf("?")?"&":"?";O+=e+(n?n(I):new URLSearchParams(ut(I)))}let P=new Request(O=function(e,t){var r;if(!e)return t;if(!t)return e;if(r=t,RegExp("(^|:)//").test(r))return t;let n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=e.replace(/\/$/,""),t=t.replace(/^\//,""),`${e}${n}${t}`}(e,O),N);g={request:new Request(O,N)};try{m=await r(P)}catch(e){return{error:{status:(e instanceof Error||"u">typeof DOMException&&e instanceof DOMException)&&"TimeoutError"===e.name?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:g}}let D=m.clone();g.response=D;let M="";try{let e;if(await Promise.all([d(m,A).then(e=>y=e,t=>e=t),D.text().then(e=>M=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:m.status,data:M,error:String(e)},meta:g}}return T(m,y)?{data:y,meta:g}:{error:{status:m.status,data:y},meta:g}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=i(e.headers)?"json":"text"),"json"===t){let t=await e.text();return t.length?JSON.parse(t):null}return e.text()}})({baseUrl:`${e}/rest/organizations/${s}/answer/v1/configs/${o}`})(l,t,r)}}catch(e){return{error:e}}},{maxRetries:3}),endpoints:()=>({})}),uX=uJ.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:e,queryArgs:t})=>{let{analytics:r,...n}=t;return`${e}(${JSON.stringify(n)})`},async onCacheEntryAdded(e,{getState:t,cacheDataLoaded:r,updateCachedData:n,dispatch:i}){await r;let{configuration:a,generatedAnswer:s,insightConfiguration:o}=t(),{organizationId:l,environment:u,accessToken:c}=a,d=((e,t,r,n)=>{if(!e||!t||!r)throw Error("Missing required parameters for answer endpoint");let i=`/rest/organizations/${t}`,a=n?`insight/v1/configs/${n}/answer`:"answer/v1/configs";return`${e}${i}/${a}/${r}/generate`})(eM(l,u),l,s.answerConfigurationId,o?.insightId);await eg(d,{method:"POST",body:JSON.stringify(e),headers:{Authorization:`Bearer ${c}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch,onopen:async e=>{let t=e.headers.get("x-answer-id");t&&n(e=>{e.answerId=t,i(lO(t))})},onmessage:e=>{n(t=>{((e,t,r)=>{let n,i=JSON.parse(e.data);"ERROR"===i.finishReason&&i.errorMessage&&(t.error={message:n=i.errorMessage||"Unknown error occurred",code:i.code},t.isStreaming=!1,t.isLoading=!1,console.error(`Generated answer error: ${n} (code: ${i.code})`));let a=i.payload.length?JSON.parse(i.payload):{};switch(i.payloadType){case"genqa.headerMessageType":a.contentFormat&&(((e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1})(t,a),r(lV(a.contentFormat)));break;case"genqa.messageType":"string"==typeof a.textDelta&&(((e,t)=>{let{textDelta:r}=t;if("string"!=typeof r)return;let n=e.answer;(n?.trim()||r.trim())&&(e.answer=n?.trim()?n.concat(r):r)})(t,a),r(lA({textDelta:a.textDelta})));break;case"genqa.citationsType":a.citations&&(t.citations=a.citations,r(lT({citations:a.citations})));break;case"genqa.endOfStreamType":{t.generated=a.answerGenerated,t.isStreaming=!1;let e=t.answerId,n=a.answerGenerated??!1,i=n?!t.answer?.trim():void 0;r(ll(n,e,i)),r(lu())}}})(e,t,i)})},onerror:e=>{throw e},onclose:()=>{n(e=>{i(lQ(!e.generated))})}})}})})}),u0=e=>uX.endpoints.getAnswer.initiate(e),u1=rh(nP,e=>e),u2=e=>t=>r=>{let n,i;i=r.payload?.analyticsAction,"type"in r&&!H(i)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let a=t(r);return"type"in r&&("search/executeSearch/fullfilled"===r.type&&void 0===n&&console.error("No anal
30ytics action associated with search:",r),"recommendation/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with recommendation:",r),"productRecommendations/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with product recommendation:",r)),void 0!==n&&e.dispatch(n),a},u3=rs("tab/register",e=>e2(e,new ee({values:{id:eY,expression:eK}}))),u5=rs("tab/updateActiveTab",e=>e2(e,eY));var u4=r(4301),u8=r(1576);sV.extend(u8),sV.extend(u4);let u6=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:sV.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:"",agentId:void 0},environment:"prod"}),u9=/(^|; )Coveo-Pendragon=([^;]*)/,u7=/(^|; )Coveo-SearchAgentDebug=([^;]*)/,ce=rh(u6(),e=>e.addCase(a6,(e,t)=>{var r,n;r=e,H((n=t.payload).accessToken)||(r.accessToken=n.accessToken),r.environment=n.environment??"prod",H(n.organizationId)||(r.organizationId=n.organizationId)}).addCase(a9,(e,t)=>{var r,n;r=e,H((n=t.payload).proxyBaseUrl)||(r.search.apiBaseUrl=n.proxyBaseUrl),H(n.locale)||(r.search.locale=n.locale),H(n.timezone)||(r.search.timezone=n.timezone),H(n.authenticationProviders)||(r.search.authenticationProviders=n.authenticationProviders)}).addCase(se,(e,t)=>{var r=e,n=t.payload;H(n.enabled)||(r.analytics.enabled=n.enabled),H(n.originContext)||(r.analytics.originContext=n.originContext),H(n.originLevel2)||(r.analytics.originLevel2=n.originLevel2),H(n.originLevel3)||(r.analytics.originLevel3=n.originLevel3),H(n.proxyBaseUrl)||(r.analytics.apiBaseUrl=n.proxyBaseUrl),H(n.trackingId)||(r.analytics.trackingId=n.trackingId),H(n.analyticsMode)||(r.analytics.analyticsMode=n.analyticsMode),H(n.source)||(r.analytics.source=n.source);try{let e=!("u"<typeof window)&&(u9.exec(document.cookie)?.pop()||null);e&&(r.analytics.analyticsMode="next",r.analytics.trackingId=e)}catch(e){}H(n.runtimeEnvironment)||(r.analytics.runtimeEnvironment=n.runtimeEnvironment),H(n.anonymous)||(r.analytics.anonymous=n.anonymous),H(n.deviceId)||(r.analytics.deviceId=n.deviceId),H(n.userDisplayName)||(r.analytics.userDisplayName=n.userDisplayName),H(n.documentLocation)||(r.analytics.documentLocation=n.documentLocation)}).addCase(st,e=>{e.analytics.enabled=!1}).addCase(sr,e=>{e.analytics.enabled=!0}).addCase(sn,(e,t)=>{e.analytics.originLevel2=t.payload.originLevel2}).addCase(si,(e,t)=>{e.analytics.originLevel3=t.payload.originLevel3}).addCase(u5,(e,t)=>{e.analytics.originLevel2=t.payload}).addCase(sl,(e,t)=>{e.analytics.originLevel2=t.payload}).addCase(so,(e,t)=>{H(t.payload.tab)||(e.analytics.originLevel2=t.payload.tab)}).addCase(sa,(e,{payload:t})=>{var r=e,n=t;r.knowledge.agentId=n;try{let e=!("u"<typeof window)&&u7.test(document.cookie);H(e)||(r.knowledge.debugAgentSession=!0)}catch(e){}})),ct=()=>e=>t=>e(t.instantlyCallable?t():t),cr="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cn=new Uint8Array(16),ci=[];for(let e=0;e<256;++e)ci.push((e+256).toString(16).slice(1));let ca=function(e,t,r){if(cr&&!t&&!e)return cr();let n=(e=e||{}).random??e.rng?.()??function(){if(!a){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");a=crypto.getRandomValues.bind(crypto)}return a(cn)}();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase()}(n)};var cs=r(1802),co=r(1645);let cl=cs.Ik({name:cs.Yj(),arguments:cs.Yj()}),cu=cs.Ik({id:cs.Yj(),type:cs.eu("function"),function:cl,encryptedValue:cs.Yj().optional()}),cc=cs.Ik({id:cs.Yj(),role:cs.Yj(),content:cs.Yj().optional(),name:cs.Yj().optional(),encryptedValue:cs.Yj().optional()}),cd=cs.Ik({type:cs.eu("text"),text:cs.Yj()}),cf=cs.Ik({type:cs.eu("data"),value:cs.Yj(),mimeType:cs.Yj()}),cp=cs.Ik({type:cs.eu("url"),value:cs.Yj(),mimeType:cs.Yj().optional()}),ch=cs.gM("type",[cf,cp]),cg=cs.Ik({type:cs.eu("image"),source:c
30h,metadata:cs.L5().optional()}),cm=cs.Ik({type:cs.eu("audio"),source:ch,metadata:cs.L5().optional()}),cy=cs.Ik({type:cs.eu("video"),source:ch,metadata:cs.L5().optional()}),cv=cs.Ik({type:cs.eu("document"),source:ch,metadata:cs.L5().optional()}),cb=cs.Ik({type:cs.eu("binary"),mimeType:cs.Yj(),id:cs.Yj().optional(),url:cs.Yj().optional(),data:cs.Yj().optional(),filename:cs.Yj().optional()}),cw=(e,t)=>{e.id||e.url||e.data||t.addIssue({code:co.eq.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};cb.superRefine((e,t)=>{cw(e,t)});let cS=cs.gM("type",[cd,cg,cm,cy,cv,cb]).superRefine((e,t)=>{"binary"===e.type&&cw(e,t)}),cE=cc.extend({role:cs.eu("developer"),content:cs.Yj()}),c_=cc.extend({role:cs.eu("system"),content:cs.Yj()}),cC=cc.extend({role:cs.eu("assistant"),content:cs.Yj().optional(),toolCalls:cs.YO(cu).optional()}),cO=cc.extend({role:cs.eu("user"),content:cs.KC([cs.Yj(),cs.YO(cS)])}),ck=cs.Ik({id:cs.Yj(),content:cs.Yj(),role:cs.eu("tool"),toolCallId:cs.Yj(),error:cs.Yj().optional(),encryptedValue:cs.Yj().optional()}),cI=cs.Ik({id:cs.Yj(),role:cs.eu("activity"),activityType:cs.Yj(),content:cs.g1(cs.bz())}),cA=cs.Ik({id:cs.Yj(),role:cs.eu("reasoning"),content:cs.Yj(),encryptedValue:cs.Yj().optional()}),cT=cs.gM("role",[cE,c_,cC,cO,ck,cI,cA]);cs.KC([cs.eu("developer"),cs.eu("system"),cs.eu("assistant"),cs.eu("user"),cs.eu("tool"),cs.eu("activity"),cs.eu("reasoning")]);let cx=cs.Ik({description:cs.Yj(),value:cs.Yj()}),cR=cs.Ik({name:cs.Yj(),description:cs.Yj(),parameters:cs.bz(),metadata:cs.g1(cs.bz()).optional()}),cN=cs.Ik({threadId:cs.Yj(),runId:cs.Yj(),parentRunId:cs.Yj().optional(),state:cs.bz(),messages:cs.YO(cT),tools:cs.YO(cR),context:cs.YO(cx),forwardedProps:cs.bz()}),cj=cs.bz();var cP=class extends Error{constructor(e){super(e)}},cD=class extends cP{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}};let cM=cs.Ik({name:cs.Yj(),description:cs.Yj().optional()}),cL=cs.Ik({name:cs.Yj().optional(),type:cs.Yj().optional(),description:cs.Yj().optional(),version:cs.Yj().optional(),provider:cs.Yj().optional(),documentationUrl:cs.Yj().optional(),metadata:cs.g1(cs.L5()).optional()}),cF=cs.Ik({streaming:cs.zM().optional(),websocket:cs.zM().optional(),httpBinary:cs.zM().optional(),pushNotifications:cs.zM().optional(),resumable:cs.zM().optional()}),cq=cs.Ik({supported:cs.zM().optional(),items:cs.YO(cR).optional(),parallelCalls:cs.zM().optional(),clientProvided:cs.zM().optional()}),cU=cs.Ik({structuredOutput:cs.zM().optional(),supportedMimeTypes:cs.YO(cs.Yj()).optional()}),c$=cs.Ik({snapshots:cs.zM().optional(),deltas:cs.zM().optional(),memory:cs.zM().optional(),persistentState:cs.zM().optional()}),cV=cs.Ik({supported:cs.zM().optional(),delegation:cs.zM().optional(),handoffs:cs.zM().optional(),subAgents:cs.YO(cM).optional()}),cz=cs.Ik({supported:cs.zM().optional(),streaming:cs.zM().optional(),encrypted:cs.zM().optional()}),cB=cs.Ik({image:cs.zM().optional(),audio:cs.zM().optional(),video:cs.zM().optional(),pdf:cs.zM().optional(),file:cs.zM().optional()}),cG=cs.Ik({image:cs.zM().optional(),audio:cs.zM().optional()}),cH=cs.Ik({input:cB.optional(),output:cG.optional()}),cQ=cs.Ik({codeExecution:cs.zM().optional(),sandboxed:cs.zM().optional(),maxIterations:cs.ai().optional(),maxExecutionTime:cs.ai().optional()}),cY=cs.Ik({supported:cs.zM().optional(),approvals:cs.zM().optional(),interventions:cs.zM().optional(),feedback:cs.zM().optional()});cs.Ik({identity:cL.optional(),transport:cF.optional(),tools:cq.optional(),output:cU.optional(),state:c$.optional(),multiAgent:cV.optional(),reasoning:cz.optional(),multimodal:cH.optional(),execution:cQ.optional(),humanInTheLoop:cY.optional(),custom:cs.g1(cs.L5()).optional()});let cW=cs.KC([cs.eu("developer"),cs.eu("system"),cs.eu("assistant"),cs.eu("user")]),cK=((b={}).TEXT_MESSAGE_START="TEXT_MESSAGE_START",b.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",b.TEXT_MESSAGE_END="TEXT_MESSAGE_END",b.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",b.TOOL_CALL_START="TOOL_CALL_START",b.TOOL_CALL_ARGS="TOOL_CALL_ARGS",b.TOOL_CALL_END="TOOL_CALL_END",b.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",b.TOOL_CALL_RESULT="TOOL_CALL_RESULT",b.THINKING_START="THINKING_START",b.THINKING_END="THINKING_END",b.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",b.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",b.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",b.STATE_SNAPSHOT="STATE_
30SNAPSHOT",b.STATE_DELTA="STATE_DELTA",b.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",b.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",b.ACTIVITY_DELTA="ACTIVITY_DELTA",b.RAW="RAW",b.CUSTOM="CUSTOM",b.RUN_STARTED="RUN_STARTED",b.RUN_FINISHED="RUN_FINISHED",b.RUN_ERROR="RUN_ERROR",b.STEP_STARTED="STEP_STARTED",b.STEP_FINISHED="STEP_FINISHED",b.REASONING_START="REASONING_START",b.REASONING_MESSAGE_START="REASONING_MESSAGE_START",b.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",b.REASONING_MESSAGE_END="REASONING_MESSAGE_END",b.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",b.REASONING_END="REASONING_END",b.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",b),cZ=cs.Ik({type:cs.fc(cK),timestamp:cs.ai().optional(),rawEvent:cs.bz().optional()}).passthrough(),cJ=cZ.extend({type:cs.eu(cK.TEXT_MESSAGE_START),messageId:cs.Yj(),role:cW.default("assistant"),name:cs.Yj().optional()}),cX=cZ.extend({type:cs.eu(cK.TEXT_MESSAGE_CONTENT),messageId:cs.Yj(),delta:cs.Yj()}),c0=cZ.extend({type:cs.eu(cK.TEXT_MESSAGE_END),messageId:cs.Yj()}),c1=cZ.extend({type:cs.eu(cK.TEXT_MESSAGE_CHUNK),messageId:cs.Yj().optional(),role:cW.optional(),delta:cs.Yj().optional(),name:cs.Yj().optional()}),c2=cZ.extend({type:cs.eu(cK.THINKING_TEXT_MESSAGE_START)}),c3=cX.omit({messageId:!0,type:!0}).extend({type:cs.eu(cK.THINKING_TEXT_MESSAGE_CONTENT)}),c5=cZ.extend({type:cs.eu(cK.THINKING_TEXT_MESSAGE_END)}),c4=cZ.extend({type:cs.eu(cK.TOOL_CALL_START),toolCallId:cs.Yj(),toolCallName:cs.Yj(),parentMessageId:cs.Yj().optional()}),c8=cZ.extend({type:cs.eu(cK.TOOL_CALL_ARGS),toolCallId:cs.Yj(),delta:cs.Yj()}),c6=cZ.extend({type:cs.eu(cK.TOOL_CALL_END),toolCallId:cs.Yj()}),c9=cZ.extend({messageId:cs.Yj(),type:cs.eu(cK.TOOL_CALL_RESULT),toolCallId:cs.Yj(),content:cs.Yj(),role:cs.eu("tool").optional()}),c7=cZ.extend({type:cs.eu(cK.TOOL_CALL_CHUNK),toolCallId:cs.Yj().optional(),toolCallName:cs.Yj().optional(),parentMessageId:cs.Yj().optional(),delta:cs.Yj().optional()}),de=cZ.extend({type:cs.eu(cK.THINKING_START),title:cs.Yj().optional()}),dt=cZ.extend({type:cs.eu(cK.THINKING_END)}),dr=cZ.extend({type:cs.eu(cK.STATE_SNAPSHOT),snapshot:cj}),dn=cZ.extend({type:cs.eu(cK.STATE_DELTA),delta:cs.YO(cs.bz())}),di=cZ.extend({type:cs.eu(cK.MESSAGES_SNAPSHOT),messages:cs.YO(cT)}),da=cZ.extend({type:cs.eu(cK.ACTIVITY_SNAPSHOT),messageId:cs.Yj(),activityType:cs.Yj(),content:cs.g1(cs.bz()),replace:cs.zM().optional().default(!0)}),ds=cZ.extend({type:cs.eu(cK.ACTIVITY_DELTA),messageId:cs.Yj(),activityType:cs.Yj(),patch:cs.YO(cs.bz())}),dl=cZ.extend({type:cs.eu(cK.RAW),event:cs.bz(),source:cs.Yj().optional()}),du=cZ.extend({type:cs.eu(cK.CUSTOM),name:cs.Yj(),value:cs.bz()}),dc=cZ.extend({type:cs.eu(cK.RUN_STARTED),threadId:cs.Yj(),runId:cs.Yj(),parentRunId:cs.Yj().optional(),input:cN.optional()}),dd=cZ.extend({type:cs.eu(cK.RUN_FINISHED),threadId:cs.Yj(),runId:cs.Yj(),result:cs.bz().optional()}),df=cZ.extend({type:cs.eu(cK.RUN_ERROR),message:cs.Yj(),code:cs.Yj().optional()}),dp=cZ.extend({type:cs.eu(cK.STEP_STARTED),stepName:cs.Yj()}),dh=cZ.extend({type:cs.eu(cK.STEP_FINISHED),stepName:cs.Yj()}),dg=cs.KC([cs.eu("tool-call"),cs.eu("message")]),dm=cZ.extend({type:cs.eu(cK.REASONING_START),messageId:cs.Yj()}),dy=cZ.extend({type:cs.eu(cK.REASONING_MESSAGE_START),messageId:cs.Yj(),role:cs.eu("reasoning")}),dv=cZ.extend({type:cs.eu(cK.REASONING_MESSAGE_CONTENT),messageId:cs.Yj(),delta:cs.Yj()}),db=cZ.extend({type:cs.eu(cK.REASONING_MESSAGE_END),messageId:cs.Yj()}),dw=cZ.extend({type:cs.eu(cK.REASONING_MESSAGE_CHUNK),messageId:cs.Yj().optional(),delta:cs.Yj().optional()}),dS=cZ.extend({type:cs.eu(cK.REASONING_END),messageId:cs.Yj()}),dE=cZ.extend({type:cs.eu(cK.REASONING_ENCRYPTED_VALUE),subtype:dg,entityId:cs.Yj(),encryptedValue:cs.Yj()}),d_=cs.gM("type",[cJ,cX,c0,c1,de,dt,c2,c3,c5,c4,c8,c6,c7,c9,dr,dn,di,da,ds,dl,du,dc,dd,df,dp,dh,dm,dy,dv,db,dw,dS,dE]);var dC=(w=function(e,t){return(w=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}w(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),dO=Object.prototype.hasOwnProperty;function dk(e,t){return dO.call(e,t)}function dI(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var i in e)dk(e,i)&&n.push(i);return n}function dA(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function dT(e){for(var t,r=0,n=e.length;r<n;){if((t=e.charCodeAt(r))>=48&&t<=57){r++;continue}return!1}return!0}function dx(e){return -1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function dR(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function dN(e,t){var r=[e];for(var n in t){var i="object"==typeof t[n]?JSON.stringify(t[n],null,2):t[n];void 0!==i&&r.push(n+": "+i)}return r.join("\n")}var dj=function(e){function t(t,r,n,i,a){var s=this.constructor,o=e.call(this,dN(t,{name:r,index:n,operation:i,tree:a}))||this;return o.name=r,o.index=n,o.operation=i,o.tree=a,Object.setPrototypeOf(o,s.prototype),o.message=dN(t,{name:r,index:n,operation:i,tree:a}),o}return dC(t,e),t}(Error),dP=dj,dD=dA,dM={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=dF(r,this.path);n&&(n=dA(n));var i=dq(r,{op:"remove",path:this.from}).removed;return dq(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=dF(r,this.from);return dq(r,{op:"add",path:this.path,value:dA(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:dB(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},dL={add:function(e,t,r){return dT(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){return{newDocument:r,removed:e.splice(t,1)[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:dM.move,copy:dM.copy,test:dM.test,_get:dM._get};function dF(e,t){if(""==t)return e;var r={op:"_get",path:t};return dq(e,r),r.value}function dq(e,t,r,n,i,a){if(void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),void 0===a&&(a=0),r&&("function"==typeof r?r(t,0,e,t.path):dV(t,0)),""===t.path){var s={newDocument:e};if("add"===t.op)return s.newDocument=t.value,s;if("replace"===t.op)return s.newDocument=t.value,s.removed=e,s;if("move"===t.op||"copy"===t.op)return s.newDocument=dF(e,t.from),"move"===t.op&&(s.removed=e),s;else if("test"===t.op){if(s.test=dB(e,t.value),!1===s.test)throw new dP("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else if("remove"===t.op)return s.removed=e,s.newDocument=null,s;else if("_get"===t.op)return t.value=e,s;else if(!r)return s;else throw new dP("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e)}n||(e=dA(e));var o=(t.path||"").split("/"),l=e,u=1,c=o.length,d=void 0,f=void 0,p=void 0;for(p="function"==typeof r?r:dV;;
30){if((f=o[u])&&-1!=f.indexOf("~")&&(f=dR(f)),i&&("__proto__"==f||"prototype"==f&&u>0&&"constructor"==o[u-1]))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&void 0===d&&(void 0===l[f]?d=o.slice(0,u).join("/"):u==c-1&&(d=t.path),void 0!==d&&p(t,0,e,d)),u++,Array.isArray(l)){if("-"===f)f=l.length;else if(r&&!dT(f))throw new dP("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);else dT(f)&&(f=~~f);if(u>=c){if(r&&"add"===t.op&&f>l.length)throw new dP("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=dL[t.op].call(t,l,f,e);if(!1===s.test)throw new dP("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(u>=c){var s=dM[t.op].call(t,l,f,e);if(!1===s.test)throw new dP("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(l=l[f],r&&u<c&&(!l||"object"!=typeof l))throw new dP("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}function dU(e,t,r,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=!0),r&&!Array.isArray(t))throw new dP("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=dA(e));for(var a=Array(t.length),s=0,o=t.length;s<o;s++)a[s]=dq(e,t[s],r,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function d$(e,t,r){var n=dq(e,t);if(!1===n.test)throw new dP("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function dV(e,t,r,n){if("object"!=typeof e||null===e||Array.isArray(e))throw new dP("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);
30if(dM[e.op]){if("string"!=typeof e.path)throw new dP("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);else if(0!==e.path.indexOf("/")&&e.path.length>0)throw new dP('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);else if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new dP("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new dP("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t){if(Array.isArray(t)){for(var r=0,n=t.length;r<n;r++)if(e(t[r]))return!0}else if("object"==typeof t){for(var i=dI(t),a=i.length,s=0;s<a;s++)if(e(t[i[s]]))return!0}}return!1}(e.value))throw new dP("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);else if(r){if("add"==e.op){var i=e.path.split("/").length,a=n.split("/").length;if(i!==a+1&&i!==a)throw new dP("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==n)throw new dP("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if("move"===e.op||"copy"===e.op){var s=dz([{op:"_get",path:e.from,value:void 0}],r);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new dP("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new dP("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function dz(e,t,r){try{if(!Array.isArray(e))throw new dP("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)dU(dA(t),dA(e),r||!0);else{r=r||dV;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0)}}catch(e){if(e instanceof dP)return e;throw e}}function dB(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var r,n,i,a=Array.isArray(e),s=Array.isArray(t);if(a&&s){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!dB(e[r],t[r]))return!1;return!0}if(a!=s)return!1;var o=Object.keys(e);if((n=o.length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!t.hasOwnProperty(o[r]))return!1;for(r=n;0!=r--;)if(!dB(e[i=o[r]],t[i]))return!1;return!0}return e!=e&&t!=t}var dG=new WeakMap,dH=function(e){this.observers=new Map,this.obj=e},dQ=function(e,t){this.callback=e,this.observer=t};function dY(e,t){t.unobserve()}function dW(e,t){var r=dG.get(e);if(r){var n,i=r.observers.get(t);n=i&&i.observer}else r=new dH(e),dG.set(e,r);if(n)return n;if(n={},r.value=dA(e),t){n.callback=t,n.next=null;var a=function(){dK(n)},s=function(){clearTimeout(n.next),n.next=setTimeout(a)};"u">typeof window&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s))}return n.patches=[],n.object=e,n.unobserve=function(){var e,t;dK(n),clearTimeout(n.next),e=r,t=n,e.observers.delete(t.callback),"u">typeof window&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s))},r.observers.set(t,new dQ(t,n)),n}function dK(e,t){void 0===t&&(t=!1);var r=dG.get(e.object);dZ(r.value,e.object,e.patches,"",t),e.patches.length&&dU(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function dZ(e,t,r,n,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=dI(t),s=dI(e),o=!1,l=s.length-1;l>=0;l--){var u=s[l],c=e[u];if(dk(t,u)&&(void 0!==t[u]||void 0===c||!1!==Array.isArray(t))){var d=t[u];"object"==typeof c&&null!=c&&"object"==typeof d&&null!=d&&Array.isArray(c)===Array.isArray(d)?dZ(c,d,r,n+"/"+dx(u),i):c!==d&&(i&&r.push({op:"test",path:n+"/"+dx(u),value:dA(c)}),r.push({op:"replace",path:n+"/"+dx(u),value:dA(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:n+"/"+dx(u),value:dA(c)}),r.push({op:"remove",path:n+"/"+dx(u)}),o=!0):(i&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}))}if(o||a.length!=s.length)for(var l=0;l<a.length;l++){var u=a[l];dk(e,u)||void 0===t[u]||r.push({op:"add",path:n+"/"+dx(u),value:dA(t[u])})}}}function dJ(e,t,r){void 0===r&&(r=!1);var n=[];return dZ(e,t,n,"",r),n}function dX(e){return"function"==typeof e}Object.assign({},U,$,{JsonPatchError:dj,deepClone:dA,escapePathComponent:dx,unescapePathComponent:dR});
30var d0=function(e,t){return(d0=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function d1(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}d0(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function d2(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){var u=[o,l];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,n=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function d3(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d5(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return s}function d4(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function d8(e){return this instanceof d8?(this.v=e,this):new d8(e)}var d6=("function"==typeof SuppressedError&&SuppressedError,function(e){return e&&"number"==typeof e.length&&"function"!=typeof e});function d9(e){return dX(null==e?void 0:e.then)}function d7(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var fe=d7(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function ft(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var fr=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=d3(a),o=s.next();!o.done;o=s.next())o.value.remove(this)}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(dX(l))try{l()}catch(e){i=e instanceof fe?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var c=d3(u),d=c.next();!d.done;d=c.next()){var f=d.value;try{fa(f)}catch(e){i=null!=i?i:[],e instanceof fe?i=d4(d4([],d5(i)),d5(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}if(i)throw new fe(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)fa(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ft(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&ft(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),fn=fr.EMPTY;function fi(e){return e instanceof fr||e&&"closed"in e&&dX(e.remove)&&dX(e.add)&&dX(e.unsubscribe)}function fa(e){dX(e)?e():e.unsubscribe()}var fs=void 0,fo={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=fo.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,d4([e,t],d5(r))):setTimeout.apply(void 0,d4([e,t],d5(r)))},clearTimeout:function(e){var t=fo.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function fl(e){fo.setTimeout(function(){!1;throw e})}function fu(){}var fc=fd("C",void 0,void 0);function fd(e,t,r){return{kind:e,value:t,error:r}}var ff=null;function fp(e){var t,r,n,i;1;e()}var fh=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,fi(t)&&t.add(r)):r.destination=fS,r}return d1(t,e),t.create=function(e,t,r){return new fv(e,t,r)},t.prototype.next=function(e){this.isStopped?fw(fd("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?fw(fd("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?fw(fc,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(fr),fg=Function.prototype.bind;function fm(e,t){return fg.call(e,t)}var fy=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){fb(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){fb(e)}else fb(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){fb(e)}},e}(),fv=function(e){function t(t,r,n){var i,a,s=e.call(this)||this;return dX(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i=t,s.destination=new fy(i),s}return d1(t,e),t}(fh);function fb(e){1;fl(e)}function fw(e,t){}var fS={closed:!0,next:fu,error:function(e){throw e},complete:fu},fE="function"==typeof Symbol&&Symbol.observable||"@@observable";function f_(e){return e}function fC(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fO(e)}function fO(e){return 0===e.length?f_:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var fk=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,i=!function(e){return e&&e instanceof fh||e&&dX(e.next)&&dX(e.error)&&dX(e.complete)&&fi(e)}(e)?new fv(e,t,r):e;return fp(function(){var e=n.operator,t=n.source;i.add(e?e.call(i,t):t?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=fI(t))(function(t,n){var i=new fv({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[fE]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fO(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=fI(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function fI(e){var t;return null!=(t=null!=e?e:fs)?t:Promise}function fA(e){return Symbol.asyncIterator&&dX(null==e?void 0:e[Symbol.asyncIterator])}function fT(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
30d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var fx="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function fR(e){return dX(null==e?void 0:e[fx])}function fN(e){return function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var r;(r=i[e](t)).value instanceof d8?Promise.resolve(r.value.v).then(l,u):c(a[0][2],r)}catch(e){c(a[0][3],e)}}function l(e){o("next",e)}function u(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}(this,arguments,function(){var t,r,n;return d2(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,d8(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,d8(void 0)];case 4:return[2,i.sent()];case 5:return[4,d8(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function fj(e){return dX(null==e?void 0:e.getReader)}function fP(e){if(e instanceof fk)return e;if(null!=e){var t,r,n,i;if(dX(e[fE])){return t=e,new fk(function(e){var r=t[fE]();if(dX(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(d6(e)){return r=e,new fk(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(d9(e)){return n=e,new fk(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,fl)})}if(fA(e))return fD(e);if(fR(e)){return i=e,new fk(function(e){var t,r;try{for(var n=d3(i),a=n.next();!a.done;a=n.next()){var s=a.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(fj(e))return fD(fN(e))}throw fT(e)}function fD(e){return new fk(function(t){(function(e,t){var r,n,i,a,s,o,l,u;return s=this,o=void 0,l=void 0,u=function(){var s;return d2(this,function(o){switch(o.label){case 0:o.trys.push([0,5,6,11]),r=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d3(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var a,s,o;a=n,s=i,o=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:o})},s)})}}}(e),o.label=1;case 1:return[4,r.next()];case 2:if((n=o.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];o.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:o.sent()},[3,11];case 6:if(o.trys.push([6,,9,10]),!(n&&!n.done&&(a=r.return)))return[3,8];return[4,a.call(r)];case 7:o.sent(),o.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})},new(l||(l=Promise))(function(e,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function n(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof l?i:new l(function(e){e(i)})).then(r,n)}i((u=u.apply(s,o||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function fM(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var a=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(a),!i)return a}function fL(e){return function(t){if(dX(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function fF(e,t,r,n,i){return new fq(e,t,r,n,i)}var fq=function(e){function t(t,r,n,i,a,s){var o=e.call(this,t)||this;return o.onFinalize=a,o.shouldUnsubscribe=s,o._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return d1(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(fh);function fU(e,t){return void 0===t&&(t=0),fL(function(r,n){r.subscribe(fF(n,function(r){return fM(n,e,function(){return n.next(r)},t)},function(){return fM(n,e,function(){return n.complete()},t)},function(r){return fM(n,e,function(){return n.error(r)},t)}
30))})}function f$(e,t){return void 0===t&&(t=0),fL(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function fV(e,t){if(!e)throw Error("Iterable cannot be null");return new fk(function(r){fM(r,t,function(){var n=e[Symbol.asyncIterator]();fM(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function fz(e,t){return t?function(e,t){if(null!=e){if(dX(e[fE]))return fP(e).pipe(f$(t),fU(t));if(d6(e))return new fk(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(d9(e))return fP(e).pipe(f$(t),fU(t));if(fA(e))return fV(e,t);if(fR(e))return new fk(function(r){var n;return fM(r,t,function(){n=e[fx](),fM(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return dX(null==n?void 0:n.return)&&n.return()}});if(fj(e))return fV(fN(e),t)}throw fT(e)}(e,t):fP(e)}function fB(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=(e=t[t.length-1])&&dX(e.schedule)?t.pop():void 0;return fz(t,n)}var fG=new fk(function(e){return e.complete()});function fH(e,t){var r=dX(e)?e:function(){return e},n=function(e){return e.error(r())};return new fk(t?function(e){return t.schedule(n,0,e)}:n)}function fQ(e){return new fk(function(t){fP(e()).subscribe(t)})}var fY=d7(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),fW=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return d1(t,e),t.prototype.lift=function(e){var t=new fK(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new fY},t.prototype.next=function(e){var t=this;fp(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=d3(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;fp(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;fp(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?fn:(this.currentObservers=null,i.push(e),new fr(function(){t.currentObservers=null,ft(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new fk;return e.source=this,e},t.create=function(e,t){return new fK(e,t)},t}(fk),fK=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return d1(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:fn},t}(fW),fZ={now:function(){return(fZ.delegate||Date).now()},delegate:void 0},fJ=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=fZ);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return d1(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,a=this._timestampProvider,s=this._windowTime;!r&&(n.push(t),i||n.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var a=t.now(),s=0,o=1;o<r.length&&r[o]<=a;o+=2)s=o;s&&r.splice(0,s+1)}},t}(fW);function fX(e,t){return fL(function(r,n){var i=0;r.subscribe(fF(n,function(r){n.next(e.call(t,r,i++))}))})}function f0(e,t,r){return(void 0===r&&(r=1/0),dX(t))?f0(function(r,n){return fX(function(e,i){return t(r,e,n,i)})(fP(e(r,n)))},r):("number"==typeof t&&(r=t),fL(function(t,n){var i,a,s,o,l,u,c,d;return i=r,a=[],s=0,o=0,l=!1,u=function(){!l||a.length||s||n.complete()},c=function(e){return s<i?d(e):a.push(e)},d=function(t){s++;var r=!1;fP(e(t,o++)).subscribe(fF(n,function(e){n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(s--;a.length&&s<i;)!function(){var e=a.shift();d(e)}();u()}catch(e){n.error(e)}}))},t.subscribe(fF(n,c,function(){l=!0,u()})),function(){}}))}function f1(e){return fL(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var f2=d7(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function f3(e,t){var r="object"==typeof t;return new Promise(function(n,i){var a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:i,complete:function(){s?n(a):r?n(t.defaultValue):i(new f2)}})})}function f5(e,t){return dX(t)?f0(e,t,1):f0(e,1)}function f4(e){return fL(function(t,r){fP(e).subscribe(fF(r,function(){return r.complete()},fu)),r.closed||t.subscribe(r)})}function f8(e){return fL(function(t,r){var n,i=null,a=!1;i=t.subscribe(fF(r,void 0,void 0,function(s){n=fP(e(s,f8(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(r)):a=!0})),a&&(i.unsubscribe(),i=null,n.subscribe(r))})}function f6(e){return" \r\n	".indexOf(e)>=0}function f9(e){for(var t,r,n,i=["topLevel"],a=0,s=function(e){return i.push(e)},o=function(e){return i[i.length-1]=e},l=function(e){null==t&&(t=a,r=i.length,n=e)},u=function(e){e===n&&(t=void 0,r=void 0,n=void 0)},c=function(){return i.pop()},d=function(){return a--},f=function(e){if("0"<=e&&e<="9")return void s("number");switch(e){case'"':s("string");return;case"-":s("numberNeedsDigit");return;case"t":s("true");return;case"f":s("false");return;case"n":s("null");return;case"[":s("arrayNeedsValue");return;case"{":s("objectNeedsKey");return}},p=e.length;a<p;a++){var h=e[a];switch(i[i.length-1]){case"topLevel":f(h);break;case"string":switch(h){case'"':c();break;case"\\":l("stringEscape"),s("stringEscaped")}break;
30case"stringEscaped":"u"===h?s("stringUnicode"):(u("stringEscape"),c());break;case"stringUnicode":a-e.lastIndexOf("u",a)==4&&(u("stringEscape"),c());break;case"number":"."===h?o("numberNeedsDigit"):"e"===h||"E"===h?o("numberNeedsExponent"):(h<"0"||h>"9")&&(d(),c());break;case"numberNeedsDigit":o("number");break;case"numberNeedsExponent":o("+"===h||"-"===h?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(h<"a"||h>"z")&&(d(),c());break;case"arrayNeedsValue":"]"===h?c():f6(h)||(u("collectionItem"),o("arrayNeedsComma"),f(h));break;case"arrayNeedsComma":"]"===h?c():","===h&&(l("collectionItem"),o("arrayNeedsValue"));break;case"objectNeedsKey":"}"===h?c():'"'===h&&(l("collectionItem"),o("objectNeedsColon"),s("string"));break;case"objectNeedsColon":":"===h&&o("objectNeedsValue");break;case"objectNeedsValue":f6(h)||(u("collectionItem"),o("objectNeedsComma"),f(h));break;case"objectNeedsComma":"}"===h?c():","===h&&(l("collectionItem"),o("objectNeedsKey"))}}null!=r&&(i.length=r);for(var g=[null!=t?e.slice(0,t):e],m=function(t){return g.push(t.slice(e.length-e.lastIndexOf(t[0])))},y=i.length-1;y>=0;y--)switch(i[y]){case"string":g.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":g.push("0");break;case"true":m("true");break;case"false":m("false");break;case"null":m("null");break;case"arrayNeedsValue":case"arrayNeedsComma":g.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":g.push("}")}return g.join("")}function f7(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<<r,(128&n)==0)return this.assertBounds(),[e,t]}let r=this.buf[this.pos++];if(e|=(15&r)<<28,t=(112&r)>>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<<r,(128&n)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function pe(e,t,r){for(let n=0;n<28;n+=7){let i=e>>>n,a=i>>>7!=0||0!=t,s=(a?128|i:i)&255;if(r.push(s),!a)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,a=(i?128|n:n)&255;if(r.push(a),!i)return}r.push(t>>>31&1)}}function pt(e){let t="-"===e[0];t&&(e=e.slice(1));let r=0,n=0;function i(t,i){let a=Number(e.slice(t,i));n*=1e6,(r=1e6*r+a)>=0x100000000&&(n+=r/0x100000000|0,r%=0x100000000)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?pi(r,n):pn(r,n)}function pr(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(0x100000000*t+e);let r=0xffffff&e,n=(e>>>24|t<<8)&0xffffff,i=t>>16&65535,a=r+6777216*n+6710656*i,s=n+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+pa(s)+pa(a)}function pn(e,t){return{lo:0|e,hi:0|t}}function pi(e,t){return t=~t,e?e=~e+1:t+=1,pn(e,t)}let pa=e=>{let t=String(e);return"0000000".slice(t.length)+t};function ps(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function po(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var pl=r(9742);let pu=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&(globalThis.Deno||"object"!=typeof pl||"object"!=typeof pl.env||"1"!==pl.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),n=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let n="bigint"==typeof e?e:BigInt(e);if(n>r||n<t)throw Error(`invalid int64: ${e}`);return n},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<n)throw Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,r)=>(e.setInt32(0,t,!0),e.setInt32(4,r,!0),e.getBigInt64(0,!0)),uDec:(t,r)=>(e.setInt32(0,t,!0),e.setInt32(4,r,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),pc(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),pd(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),pc(e),pt(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),pd(e),pt(e)),dec:(e,t)=>{let r,n,i;return(n=0x80000000&(r=pn(e,t)).hi)&&(r=pi(r.lo,r.hi)),i=pr(r.lo,r.hi),n?"-"+i:i},uDec:(e,t)=>pr(e,t)}}();function pc(e){if(!/^-?[0-9]+$/.test(e))throw Error("invalid int64: "+e)}function pd(e){if(!/^[0-9]+$/.test(e))throw Error("invalid uint64: "+e)}let pf=Symbol.for("@bufbuild/protobuf/text-encoding");function pp(){if(void 0==globalThis[pf]){let e,t=new globalThis.TextEncoder,r=new globalThis.TextDecoder;globalThis[pf]={encodeUtf8:e=>t.encode(e),decodeUtf8:(t,n)=>n?(void 0===e&&(e=new globalThis.TextDecoder("utf-8",{fatal:!0})),e.decode(t)):r.decode(t),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[pf]}(S=F||(F={}))[S.Varint=0]="Varint",S[S.Bit64=1]="Bit64",S[S.LengthDelimited=2]="LengthDelimited",S[S.StartGroup=3]="StartGroup",S[S.EndGroup=4]="EndGroup",S[S.Bit32=5]="Bit32";class ph{constructor(e=pp().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),r=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],r),r+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(py(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return pm(e),ps(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){var t=e;if("string"==typeof t){let e=t;if(Number.isNaN(t=Number(t))&&"NaN"!==e)throw Error("invalid float32: "+e)}else if("number"!=typeof t)throw Error("invalid float32: "+typeof t);
30if(Number.isFinite(t)&&(t>34028234663852886e22||t<-34028234663852886e22))throw Error("invalid float32: "+t);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){py(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){pm(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return pm(e),ps(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=pu.enc(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=pu.uEnc(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}int64(e){let t=pu.enc(e);return pe(t.lo,t.hi,this.buf),this}sint64(e){let t=pu.enc(e),r=t.hi>>31;return pe(t.lo<<1^r,(t.hi<<1|t.lo>>>31)^r,this.buf),this}uint64(e){let t=pu.uEnc(e);return pe(t.lo,t.hi,this.buf),this}}class pg{constructor(e,t=pp().decodeUtf8){this.decodeUtf8=t,this.varint64=f7,this.uint32=po,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),r=this.pos-e;if(r>5||5==r&&this.buf[this.pos-1]>15)throw Error("illegal tag: varint overflows uint32");let n=t>>>3,i=7&t;if(n<=0||i>5)throw Error("illegal tag: field no "+n+" wire type "+i);return[n,i]}skip(e,t){let r=this.pos;switch(e){case F.Varint:for(;128&this.buf[this.pos++];);break;case F.Bit64:this.pos+=4;case F.Bit32:this.pos+=4;break;case F.LengthDelimited:let n=this.uint32();this.pos+=n;break;case F.StartGroup:for(;;){let[e,r]=this.tag();if(r===F.EndGroup){if(void 0!==t&&e!==t)throw Error("invalid end group tag");break}this.skip(r,e)}break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return pu.dec(...this.varint64())}uint64(){return pu.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(1&e);return e=(e>>>1|(1&t)<<31)^r,t=t>>>1^r,pu.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return pu.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return pu.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){return this.decodeUtf8(this.bytes(),e)}}function pm(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>0x7fffffff||e<-0x80000000)throw Error("invalid int32: "+e)}function py(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>0xffffffff||e<0)throw Error("invalid uint32: "+e)}let pv=((E={})[E.NULL_VALUE=0]="NULL_VALUE",E[E.UNRECOGNIZED=-1]="UNRECOGNIZED",E);function pb(){return{fields:{}}}let pw={encode:(e,t=new ph)=>(Object.entries(e.fields).forEach(([e,r])=>{void 0!==r&&pE.encode({key:e,value:r},t.uint32(10).fork()).join()}),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pb();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:{if(10!==e)break;let t=pE.decode(r,r.uint32());void 0!==t.value&&(i.fields[t.key]=t.value);continue}}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pw.fromPartial(e??{}),fromPartial(e){let t=pb();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,r])=>(void 0!==r&&(e[t]=r),e),{}),t},wrap(e){let t=pb();if(void 0!==e)for(let r of Object.keys(e))t.fields[r]=e[r];return t},unwrap(e){let t={};if(e.fields)for(let r of Object.keys(e.fields))t[r]=e.fields[r];return t}};function pS(){return{key:"",value:void 0}}let pE={encode:(e,t=new ph)=>(""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&pC.encode(pC.wrap(e.value),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pS();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.key=r.string();continue;case 2:if(18!==e)break;i.value=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pE.fromPartial(e??{}),fromPartial(e){let t=pS();return t.key=e.key??"",t.value=e.value??void 0,t}};function p_(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}let pC={encode:(e,t=new ph)=>(void 0!==e.nullValue&&t.uint32(8).int32(e.nullValue),void 0!==e.numberValue&&t.uint32(17).double(e.numberValue),void 0!==e.stringValue&&t.uint32(26).string(e.stringValue),void 0!==e.boolValue&&t.uint32(32).bool(e.boolValue),void 0!==e.structValue&&pw.encode(pw.wrap(e.structValue),t.uint32(42).fork()).join(),void 0!==e.listValue&&pk.encode(pk.wrap(e.listValue),t.uint32(50).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p_();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.nullValue=r.int32();continue;case 2:if(17!==e)break;i.numberValue=r.double();continue;case 3:if(26!==e)break;
30i.stringValue=r.string();continue;case 4:if(32!==e)break;i.boolValue=r.bool();continue;case 5:if(42!==e)break;i.structValue=pw.unwrap(pw.decode(r,r.uint32()));continue;case 6:if(50!==e)break;i.listValue=pk.unwrap(pk.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pC.fromPartial(e??{}),fromPartial(e){let t=p_();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=p_();if(null===e)t.nullValue=pv.NULL_VALUE;else if("boolean"==typeof e)t.boolValue=e;else if("number"==typeof e)t.numberValue=e;else if("string"==typeof e)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if("object"==typeof e)t.structValue=e;else if(void 0!==e)throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(void 0!==e.stringValue)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;else if(e?.nullValue!==void 0)return null}};function pO(){return{values:[]}}let pk={encode(e,t=new ph){for(let r of e.values)pC.encode(pC.wrap(r),t.uint32(10).fork()).join();return t},decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pO();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.values.push(pC.unwrap(pC.decode(r,r.uint32())));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pk.fromPartial(e??{}),fromPartial(e){let t=pO();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=pO();return t.values=e??[],t},unwrap:e=>e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e},pI=((_={})[_.ADD=0]="ADD",_[_.REMOVE=1]="REMOVE",_[_.REPLACE=2]="REPLACE",_[_.MOVE=3]="MOVE",_[_.COPY=4]="COPY",_[_.TEST=5]="TEST",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_);function pA(){return{op:0,path:"",from:void 0,value:void 0}}let pT={encode:(e,t=new ph)=>(0!==e.op&&t.uint32(8).int32(e.op),""!==e.path&&t.uint32(18).string(e.path),void 0!==e.from&&t.uint32(26).string(e.from),void 0!==e.value&&pC.encode(pC.wrap(e.value),t.uint32(34).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pA();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.op=r.int32();continue;case 2:if(18!==e)break;i.path=r.string();continue;case 3:if(26!==e)break;i.from=r.string();continue;case 4:if(34!==e)break;i.value=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pT.fromPartial(e??{}),fromPartial(e){let t=pA();return t.op=e.op??0,t.path=e.path??"",t.from=e.from??void 0,t.value=e.value??void 0,t}};function px(){return{id:"",type:"",function:void 0}}let pR={encode:(e,t=new ph)=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.type&&t.uint32(18).string(e.type),void 0!==e.function&&pj.encode(e.function,t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=px();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=r.string();continue;case 2:if(18!==e)break;i.type=r.string();continue;case 3:if(26!==e)break;i.function=pj.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pR.fromPartial(e??{}),fromPartial(e){let t=px();return t.id=e.id??"",t.type=e.type??"",t.function=void 0!==e.function&&null!==e.function?pj.fromPartial(e.function):void 0,t}};function pN(){return{name:"",arguments:""}}let pj={encode:(e,t=new ph)=>(""!==e.name&&t.uint32(10).string(e.name),""!==e.arguments&&t.uint32(18).string(e.arguments),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pN();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.name=r.string();continue;case 2:if(18!==e)break;i.arguments=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pj.fromPartial(e??{}),fromPartial(e){let t=pN();return t.name=e.name??"",t.arguments=e.arguments??"",t}};function pP(){return{value:"",mimeType:""}}let pD={encode:(e,t=new ph)=>(""!==e.value&&t.uint32(10).string(e.value),""!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pP();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=r.string();continue;case 2:if(18!==e)break;i.mimeType=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pD.fromPartial(e??{}),fromPartial(e){let t=pP();return t.value=e.value??"",t.mimeType=e.mimeType??"",t}};function pM(){return{value:"",mimeType:void 0}}let pL={encode:(e,t=new ph)=>(""!==e.value&&t.uint32(10).string(e.value),void 0!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pM();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=r.string();continue;case 2:if(18!==e)break;i.mimeType=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pL.fromPartial(e??{}),fromPartial(e){let t=pM();return t.value=e.value??"",t.mimeType=e.mimeType??void 0,t}};function pF(){return{data:void 0,url:void 0}}let pq={encode:(e,t=new ph)=>(void 0!==e.data&&pD.encode(e.data,t.uint32(10).fork()).join(),void 0!==e.url&&pL.encode(e.url,t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pF();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.data=pD.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.url=pL.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pq.fromPartial(e??{}),fromPartial(e){let t=pF();return t.data=void 0!==e.data&&null!==e.data?pD.fromPartial(e.data):void 0,t.url=void 0!==e.url&&null!==e.url?pL.fromPartial(e.url):void 0,t}},pU={encode:(e,t=new ph)=>(""!==e.text&&t.uint32(10).string(e.text),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i={text:""};for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pU.fromPartial(e??{}),fromPartial(e){let t={text:""};return t.text=e.text??"",t}};function p$(){return{source:void 0,metadata:void 0}}let pV={encode:(e,t=new ph)=>(void 0!==e.source&&pq.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&pC.encode(pC.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p$();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=pq.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pV.fromPartial(e??{}),fromPartial(e){let t=p$();return t.source=void 0!==e.source&&null!==e.source?pq.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function pz(){return{source:void 0,metadata:void 0}}let pB={encode:(e,t=new ph)=>(void 0!==e.source&&pq.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&pC.encode(pC.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pz();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=pq.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pB.fromPartial(e??{}),fromPartial(e){let t=pz();return t.source=void 0!==e.source&&null!==e.source?pq.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function pG(){return{source:void 0,metadata:void 0}}let pH={encode:(e,t=new ph)=>(void 0!==e.source&&pq.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&pC.encode(pC.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pG();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=pq.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pH.fromPartial(e??{}),fromPartial(e){let t=pG();return t.source=void 0!==e.source&&null!==e.source?pq.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function pQ(){return{source:void 0,metadata:void 0}}let pY={encode:(e,t=new ph)=>(void 0!==e.source&&pq.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&pC.encode(pC.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pQ();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=pq.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pY.fromPartial(e??{}),fromPartial(e){let t=pQ();return t.source=void 0!==e.source&&null!==e.source?pq.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function pW(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}let pK={encode:(e,t=new ph)=>(void 0!==e.text&&pU.encode(e.text,t.uint32(10).fork()).join(),void 0!==e.image&&pV.encode(e.image,t.uint32(18).fork()).join(),void 0!==e.audio&&pB.encode(e.audio,t.uint32(26).fork()).join(),void 0!==e.video&&pH.encode(e.video,t.uint32(34).fork()).join(),void 0!==e.document&&pY.encode(e.document,t.uint32(42).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pW();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=pU.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.image=pV.decode(r,r.uint32());continue;case 3:if(26!==e)break;i.audio=pB.decode(r,r.uint32());continue;case 4:if(34!==e)break;i.video=pH.decode(r,r.uint32());continue;case 5:if(42!==e)break;i.document=pY.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pK.fromPartial(e??{}),fromPartial(e){let t=pW();return t.text=void 0!==e.text&&null!==e.text?pU.fromPartial(e.text):void 0,t.image=void 0!==e.image&&null!==e.image?pV.fromPartial(e.image):void 0,t.audio=void 0!==e.audio&&null!==e.audio?pB.fromPartial(e.audio):void 0,t.video=void 0!==e.video&&null!==e.video?pH.fromPartial(e.video):void 0,t.document=void 0!==e.document&&null!==e.document?pY.fromPartial(e.document):void 0,t}};function pZ(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[]}}let pJ={encode(e,t=new ph){for(let r of(""!==e.id&&t.uint32(10).string(e.id),""!==e.role&&t.uint32(18).string(e.role),void 0!==e.content&&t.uint32(26).string(e.content),void 0!==e.name&&t.uint32(34).string(e.name),e.toolCalls))pR.encode(r,t.uint32(42).fork()).join();for(let r of(void 0!==e.toolCallId&&t.uint32(50).string(e.toolCallId),void 0!==e.error&&t.uint32(58).string(e.error),e.contentParts))pK.encode(r,t.uint32(66).fork()).join();return t},decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=pZ();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=r.string();continue;case 2:if(18!==e)break;i.role=r.string();continue;case 3:if(26!==e)break;i.content=r.string();continue;case 4:if(34!==e)break;i.name=r.string();continue;case 5:if(42!==e)break;
30i.toolCalls.push(pR.decode(r,r.uint32()));continue;case 6:if(50!==e)break;i.toolCallId=r.string();continue;case 7:if(58!==e)break;i.error=r.string();continue;case 8:if(66!==e)break;i.contentParts.push(pK.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>pJ.fromPartial(e??{}),fromPartial(e){let t=pZ();return t.id=e.id??"",t.role=e.role??"",t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>pR.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>pK.fromPartial(e))||[],t}},pX=((C={})[C.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",C[C.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",C[C.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",C[C.TOOL_CALL_START=3]="TOOL_CALL_START",C[C.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",C[C.TOOL_CALL_END=5]="TOOL_CALL_END",C[C.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",C[C.STATE_DELTA=7]="STATE_DELTA",C[C.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",C[C.RAW=9]="RAW",C[C.CUSTOM=10]="CUSTOM",C[C.RUN_STARTED=11]="RUN_STARTED",C[C.RUN_FINISHED=12]="RUN_FINISHED",C[C.RUN_ERROR=13]="RUN_ERROR",C[C.STEP_STARTED=14]="STEP_STARTED",C[C.STEP_FINISHED=15]="STEP_FINISHED",C[C.UNRECOGNIZED=-1]="UNRECOGNIZED",C);function p0(){return{type:0,timestamp:void 0,rawEvent:void 0}}let p1={encode:(e,t=new ph)=>(0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.timestamp&&t.uint32(16).int64(e.timestamp),void 0!==e.rawEvent&&pC.encode(pC.wrap(e.rawEvent),t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p0();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.type=r.int32();continue;case 2:if(16!==e)break;i.timestamp=function(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}(r.int64());continue;case 3:if(26!==e)break;i.rawEvent=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>p1.fromPartial(e??{}),fromPartial(e){let t=p0();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t}};function p2(){return{baseEvent:void 0,messageId:"",role:void 0,name:void 0}}let p3={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.name&&t.uint32(34).string(e.name),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p2();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.role=r.string();continue;case 4:if(34!==e)break;i.name=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>p3.fromPartial(e??{}),fromPartial(e){let t=p2();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.role=e.role??void 0,t.name=e.name??void 0,t}};function p5(){return{baseEvent:void 0,messageId:"",delta:""}}let p4={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p5();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>p4.fromPartial(e??{}),fromPartial(e){let t=p5();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.delta=e.delta??"",t}};function p8(){return{baseEvent:void 0,messageId:""}}let p6={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p8();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>p6.fromPartial(e??{}),fromPartial(e){let t=p8();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t}};function p9(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}let p7={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=p9();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.toolCallName=r.string();continue;case 4:if(34!==e)break;i.parentMessageId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>p7.fromPartial(e??{}),fromPartial(e){let t=p9();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.toolCallName=e.toolCallName??"",t.parentMessageId=e.parentMessageId??void 0,t}};function he(){return{baseEvent:void 0,toolCallId:"",delta:""}}let ht={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=he();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>ht.fromPartial(e??{}),fromPartial(e){let t=he();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.delta=e.delta??"",t}};function hr(){return{baseEvent:void 0,toolCallId:""}}let hn={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hr();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hn.fromPartial(e??{}),fromPartial(e){let t=hr();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t}};function hi(){return{baseEvent:void 0,snapshot:void 0}}let ha={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.snapshot&&pC.encode(pC.wrap(e.snapshot),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hi();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.snapshot=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>ha.fromPartial(e??{}),fromPartial(e){let t=hi();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t}};function hs(){return{baseEvent:void 0,delta:[]}}let ho={encode(e,t=new ph){for(let r of(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),e.delta))pT.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hs();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.delta.push(pT.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>ho.fromPartial(e??{}),fromPartial(e){let t=hs();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>pT.fromPartial(e))||[],t}};function hl(){return{baseEvent:void 0,messages:[]}}let hu={encode(e,t=new ph){for(let r of(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messages))pJ.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hl();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messages.push(pJ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hu.fromPartial(e??{}),fromPartial(e){let t=hl();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>pJ.fromPartial(e))||[],t}};function hc(){return{baseEvent:void 0,event:void 0,source:void 0}}let hd={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.event&&pC.encode(pC.wrap(e.event),t.uint32(18).fork()).join(),void 0!==e.source&&t.uint32(26).string(e.source),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hc();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.event=pC.unwrap(pC.decode(r,r.uint32()));continue;case 3:if(26!==e)break;i.source=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hd.fromPartial(e??{}),fromPartial(e){let t=hc();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t}};function hf(){return{baseEvent:void 0,name:"",value:void 0}}let hp={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.name&&t.uint32(18).string(e.name),void 0!==e.value&&pC.encode(pC.wrap(e.value),t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hf();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.name=r.string();continue;case 3:if(26!==e)break;i.value=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hp.fromPartial(e??{}),fromPartial(e){let t=hf();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.name=e.name??"",t.value=e.value??void 0,t}};function hh(){return{baseEvent:void 0,threadId:"",runId:""}}let hg={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hh();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.threadId=r.string();continue;case 3:if(26!==e)break;
30i.runId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hg.fromPartial(e??{}),fromPartial(e){let t=hh();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t}};function hm(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0}}let hy={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),void 0!==e.result&&pC.encode(pC.wrap(e.result),t.uint32(34).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hm();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.threadId=r.string();continue;case 3:if(26!==e)break;i.runId=r.string();continue;case 4:if(34!==e)break;i.result=pC.unwrap(pC.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hy.fromPartial(e??{}),fromPartial(e){let t=hm();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t.result=e.result??void 0,t}};function hv(){return{baseEvent:void 0,code:void 0,message:""}}let hb={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.code&&t.uint32(18).string(e.code),""!==e.message&&t.uint32(26).string(e.message),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hv();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.code=r.string();continue;case 3:if(26!==e)break;i.message=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hb.fromPartial(e??{}),fromPartial(e){let t=hv();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??"",t}};function hw(){return{baseEvent:void 0,stepName:""}}let hS={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hw();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.stepName=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hS.fromPartial(e??{}),fromPartial(e){let t=hw();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function hE(){return{baseEvent:void 0,stepName:""}}let h_={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hE();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.stepName=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>h_.fromPartial(e??{}),fromPartial(e){let t=hE();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function hC(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0}}let hO={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.delta&&t.uint32(34).string(e.delta),void 0!==e.name&&t.uint32(42).string(e.name),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hC();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.role=r.string();continue;case 4:if(34!==e)break;i.delta=r.string();continue;case 5:if(42!==e)break;i.name=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hO.fromPartial(e??{}),fromPartial(e){let t=hC();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t}};function hk(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}let hI={encode:(e,t=new ph)=>(void 0!==e.baseEvent&&p1.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.toolCallId&&t.uint32(18).string(e.toolCallId),void 0!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),void 0!==e.delta&&t.uint32(42).string(e.delta),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hk();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=p1.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.toolCallName=r.string();continue;case 4:if(34!==e)break;i.parentMessageId=r.string();continue;case 5:if(42!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hI.fromPartial(e??{}),fromPartial(e){let t=hk();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?p1.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t}};function hA(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}let hT={encode:(e,t=new ph)=>(void 0!==e.textMessageStart&&p3.encode(e.textMessageStart,t.uint32(10).fork()).join(),void 0!==e.textMessageContent&&p4.encode(e.textMessageContent,t.uint32(18).fork()).join(),void 0!==e.textMessageEnd&&p6.encode(e.textMessageEnd,t.uint32(26).fork()).join(),void 0!==e.toolCallStart&&p7.encode(e.toolCallStart,t.uint32(34).fork()).join(),void 0!==e.toolCallArgs&&ht.encode(e.toolCallArgs,t.uint32(42).fork()).join(),void 0!==e.toolCallEnd&&hn.encode(e.toolCallEnd,t.uint32(50).fork()).join(),void 0!==e.stateSnapshot&&ha.encode(e.stateSnapshot,t.uint32(58).fork()).join(),void 0!==e.stateDelta&&ho.encode(e.stateDelta,t.uint32(66).fork()).join(),void 0!==e.messagesSnapshot&&hu.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),void 0!==e.raw&&hd.encode(e.raw,t.uint32(82).fork()).join(),void 0!==e.custom&&hp.encode(e.custom,t.uint32(90).fork()).join(),void 0!==e.runStarted&&hg.encode(e.runStarted,t.uint32(98).fork()).join(),void 0!==e.runFinished&&hy.encode(e.runFinished,t.uint32(106).fork()).join(),void 0!==e.runError&&hb.encode(e.runError,t.uint32(114).fork()).join(),void 0!==e.stepStarted&&hS.encode(e.stepStarted,t.uint32(122).fork()).join(),void 0!==e.stepFinished&&h_.encode(e.stepFinished,t.uint32(130).fork()).join(),void 0!==e.textMessageChunk&&hO.encode(e.textMessageChunk,t.uint32(138).fork()).join(),void 0!==e.toolCallChunk&&hI.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t),decode(e,t){let r=e instanceof pg?e:new pg(e),n=void 0===t?r.len:r.pos+t,i=hA();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.textMessageStart=p3.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.textMessageContent=p4.decode(r,r.uint32());continue;case 3:if(26!==e)break;i.textMessageEnd=p6.decode(r,r.uint32());continue;case 4:if(34!==e)break;i.toolCallStart=p7.decode(r,r.uint32());continue;case 5:if(42!==e)break;i.toolCallArgs=ht.decode(r,r.uint32());continue;case 6:if(50!==e)break;i.toolCallEnd=hn.decode(r,r.uint32());continue;case 7:if(58!==e)break;i.stateSnapshot=ha.decode(r,r.uint32());continue;case 8:if(66!==e)break;i.stateDelta=ho.decode(r,r.uint32());continue;case 9:if(74!==e)break;i.messagesSnapshot=hu.decode(r,r.uint32());continue;case 10:if(82!==e)break;
30i.raw=hd.decode(r,r.uint32());continue;case 11:if(90!==e)break;i.custom=hp.decode(r,r.uint32());continue;case 12:if(98!==e)break;i.runStarted=hg.decode(r,r.uint32());continue;case 13:if(106!==e)break;i.runFinished=hy.decode(r,r.uint32());continue;case 14:if(114!==e)break;i.runError=hb.decode(r,r.uint32());continue;case 15:if(122!==e)break;i.stepStarted=hS.decode(r,r.uint32());continue;case 16:if(130!==e)break;i.stepFinished=h_.decode(r,r.uint32());continue;case 17:if(138!==e)break;i.textMessageChunk=hO.decode(r,r.uint32());continue;case 18:if(146!==e)break;i.toolCallChunk=hI.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>hT.fromPartial(e??{}),fromPartial(e){let t=hA();return t.textMessageStart=void 0!==e.textMessageStart&&null!==e.textMessageStart?p3.fromPartial(e.textMessageStart):void 0,t.textMessageContent=void 0!==e.textMessageContent&&null!==e.textMessageContent?p4.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=void 0!==e.textMessageEnd&&null!==e.textMessageEnd?p6.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=void 0!==e.toolCallStart&&null!==e.toolCallStart?p7.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=void 0!==e.toolCallArgs&&null!==e.toolCallArgs?ht.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=void 0!==e.toolCallEnd&&null!==e.toolCallEnd?hn.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=void 0!==e.stateSnapshot&&null!==e.stateSnapshot?ha.fromPartial(e.stateSnapshot):void 0,t.stateDelta=void 0!==e.stateDelta&&null!==e.stateDelta?ho.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=void 0!==e.messagesSnapshot&&null!==e.messagesSnapshot?hu.fromPartial(e.messagesSnapshot):void 0,t.raw=void 0!==e.raw&&null!==e.raw?hd.fromPartial(e.raw):void 0,t.custom=void 0!==e.custom&&null!==e.custom?hp.fromPartial(e.custom):void 0,t.runStarted=void 0!==e.runStarted&&null!==e.runStarted?hg.fromPartial(e.runStarted):void 0,t.runFinished=void 0!==e.runFinished&&null!==e.runFinished?hy.fromPartial(e.runFinished):void 0,t.runError=void 0!==e.runError&&null!==e.runError?hb.fromPartial(e.runError):void 0,t.stepStarted=void 0!==e.stepStarted&&null!==e.stepStarted?hS.fromPartial(e.stepStarted):void 0,t.stepFinished=void 0!==e.stepFinished&&null!==e.stepFinished?h_.fromPartial(e.stepFinished):void 0,t.textMessageChunk=void 0!==e.textMessageChunk&&null!==e.textMessageChunk?hO.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=void 0!==e.toolCallChunk&&null!==e.toolCallChunk?hI.fromPartial(e.toolCallChunk):void 0,t}},hx=e=>{if(e&&"object"==typeof e){if(e.data)return{type:"data",value:e.data.value,mimeType:e.data.mimeType};if(e.url)return{type:"url",value:e.url.value,mimeType:e.url.mimeType}}},hR=e=>{if(e&&"object"==typeof e){if(e.text)return{type:"text",text:e.text.text};if(e.image)return{type:"image",source:hx(e.image.source),metadata:e.image.metadata};if(e.audio)return{type:"audio",source:hx(e.audio.source),metadata:e.audio.metadata};if(e.video)return{type:"video",source:hx(e.video.source),metadata:e.video.metadata};if(e.document)return{type:"document",source:hx(e.document.source),metadata:e.document.metadata}}},hN="application/vnd.ag-ui.event+proto",hj=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hP=e=>{if("string"!=typeof e)throw TypeError("Invalid argument expected string");let t=e.match(hj);
30if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},hD=e=>"*"===e||"x"===e||"X"===e,hM=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},hL=(e,t)=>{let r,n;if(hD(e)||hD(t))return 0;let[i,a]=typeof(r=hM(e))!=typeof(n=hM(t))?[String(r),String(n)]:[r,n];return i>a?1:i<a?-1:0},hF=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){let n=hL(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},hq=(e,t)=>{let r=hP(e),n=hP(t),i=r.pop(),a=n.pop(),s=hF(r,n);return 0!==s?s:i&&a?hF(i.split("."),a.split(".")):i||a?i?-1:1:0};var hU=r(9742);let h$=e=>{if("function"==typeof structuredClone)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function hV(e){if(Object.freeze(e),"object"==typeof e&&e)for(let t of Object.values(e))"object"==typeof t&&t&&!Object.isFrozen(t)&&hV(t);return e}async function hz(e,t,r,n){let i="u">typeof hU&&void 0!==hU.env,a=i&&!!hU.env.VITEST_WORKER_ID,s=i&&!!hU.env.VITEST_WORKER_ID,o=h$(t),l=h$(r),u=o,c=l,d;for(let t of e)try{s&&(hV(u),hV(c));let e=await n(t,u,c);if(void 0===e)continue;if(void 0!==e.messages&&e.messages!==u&&(u=h$(e.messages)),void 0!==e.state&&e.state!==c&&(c=h$(e.state)),d=e.stopPropagation,!0===d)break}catch(e){if(s&&e instanceof TypeError){if(a)throw e;console.error("AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.",e)}else a||console.error("Subscriber error:",e);continue}return{...u===o?{}:{messages:s&&Object.isFrozen(u)?h$(u):u},...c===l?{}:{state:s&&Object.isFrozen(c)?h$(c):c},...void 0===d?{}:{stopPropagation:d}}}function hB(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(!0===e)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,r=e.lifecycle??!0;return{enabled:t||r,events:t,lifecycle:r,verbose:e.verbose??!1}}function hG(e){return e instanceof hH?e:!0===e?new hH(hB(!0)):void 0}var hH=class{constructor(e){this.config=e}event(e,t,r,n){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,"string"==typeof r?r:JSON.stringify(r)):console.debug(`[${e}] ${t}`,n??r))}lifecycle(e,t,r){this.config.lifecycle&&(r?console.debug(`[${e}] ${t}`,r):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function hQ(e){return e.enabled?new hH(e):void 0}let hY=(e,t,r,n,i)=>{var a,s;let o=hG(i),l=h$(r.messages),u=h$(e.state),c={},d=e=>{void 0!==e.messages&&(l=e.messages,c.messages=e.messages),void 0!==e.state&&(u=e.state,c.state=e.state)},f=()=>{let e=h$(c);return c={},void 0!==e.messages||void 0!==e.state?fB(e):fG};return t.pipe(f5(async t=>{let i=await hz(n,l,u,(n,i,a)=>n.onEvent?.({event:t,agent:r,input:e,messages:i,state:a}));if(d(i),!0===i.stopPropagation?o?.event("APPLY","Event dropped:",t,{type:t.type,reason:"stopPropagation by subscriber"}):o?.event("APPLY","Event applied:",t,{type:t.type,subscribers:n.length}),!0===i.stopPropagation)return f();switch(t.type){case cK.TEXT_MESSAGE_START:{let i=await hz(n,l,u,(n,i,a)=>n.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e,role:r="assistant",name:n}=t;if(!l.find(t=>t.id===e)){let t={id:e,role:r,content:"",...void 0!==n&&{name:n}};l.push(t),d({messages:l})}}return f()}case cK.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,s=l.find(e=>e.id===i);if(!s)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),f();let o=await hz(n,l,u,(n,i,a)=>n.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:r,input:e,textMessageBuffer:"string"==typeof s.content?s.content:""}));return d(o),!0!==o.stopPropagation&&(s.content=`${"string"==typeof s.content?s.content:""}${a}`,d({messages:l})),f()}case cK.TEXT_MESSAGE_END:{let{messageId:i}=t,a=l.find(e=>e.id===i);return a?(d(await hz(n,l,u,(n,i,s)=>n.onTextMessageEndEvent?.({event:t,messages:i,state:s,agent:r,input:e,textMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(n.map(t=>{t.onNewMessage?.({message:a,messages:l,state:u,agent:r,input:e})}))):console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),f()}case cK.TOOL_CALL_START:{let i=await hz(n,l,u,(n,i,a)=>n.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{toolCallId:e,toolCallName:r,parentMessageId:n}=t,i=function(e,t,r){if(t){let n=e.find(e=>e.id===t);if(n?.role==="assistant")return n;n&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${n.role}' message, not assistant — falling back to toolCallId`);let i={id:n?r:t,role:"assistant",toolCalls:[]};return e.push(i),i}let n={id:r,role:"assistant",toolCalls:[]};return e.push(n),n}(l,n,e);i.toolCalls??=[],i.toolCalls.push({id:e,type:"function",function:{name:r,arguments:""}}),d({messages:l})}return f()}case cK.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}
30=t,s=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!s)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),f();let o=s.toolCalls?.find(e=>e.id===i);if(!o)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),f();let c=await hz(n,l,u,(n,i,a)=>{let s=o.function.arguments,l=o.function.name,u={};try{u=f9(s)}catch{}return n.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:r,input:e,toolCallBuffer:s,toolCallName:l,partialToolCallArgs:u})});return d(c),!0!==c.stopPropagation&&(o.function.arguments+=a,d({messages:l})),f()}case cK.TOOL_CALL_END:{let{toolCallId:i}=t,a=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),f();let s=a.toolCalls?.find(e=>e.id===i);return s?(d(await hz(n,l,u,(n,i,a)=>{let o=s.function.arguments,l=s.function.name,u={};try{u=JSON.parse(o)}catch{}return n.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:r,input:e,toolCallName:l,toolCallArgs:u})})),await Promise.all(n.map(t=>{t.onNewToolCall?.({toolCall:s,messages:l,state:u,agent:r,input:e})}))):console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),f()}case cK.TOOL_CALL_RESULT:{let i=await hz(n,l,u,(n,i,a)=>n.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:i,toolCallId:a,content:s,role:o}=t,c={id:i,toolCallId:a,role:o||"tool",content:s};l.push(c),await Promise.all(n.map(t=>{t.onNewMessage?.({message:c,messages:l,state:u,agent:r,input:e})})),d({messages:l})}return f()}case cK.STATE_SNAPSHOT:{let i=await hz(n,l,u,(n,i,a)=>n.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{snapshot:e}=t;d({state:u=e})}return f()}case cK.STATE_DELTA:{let i=await hz(n,l,u,(n,i,a)=>n.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{delta:e}=t;try{u=dU(u,e,!0,!1).newDocument,d({state:u})}catch(r){let t=r instanceof Error?r.message:String(r);console.warn(`Failed to apply state patch:
31Current state: ${JSON.stringify(u,null,2)}
32Patch operations: ${JSON.stringify(e,null,2)}
33Error: ${t}`)}}return f()}case cK.MESSAGES_SNAPSHOT:{let i=await hz(n,l,u,(n,i,a)=>n.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messages:e}=t,r=new Map(e.map(e=>[e.id,e])),n=e=>"activity"===e||"reasoning"===e,i=new Set((l=l.filter(e=>n(e.role)||r.has(e.id)).map(e=>n(e.role)?e:r.get(e.id))).map(e=>e.id));for(let t of e)i.has(t.id)||l.push(t);d({messages:l})}return f()}case cK.ACTIVITY_SNAPSHOT:{let i=l.findIndex(e=>e.id===t.messageId),a=i>=0?l[i]:void 0,s=a?.role==="activity"?a:void 0,o=t.replace??!0,c=await hz(n,l,u,(n,i,o)=>n.onActivitySnapshotEvent?.({event:t,messages:i,state:o,agent:r,input:e,activityMessage:s,existingMessage:a}));if(d(c),!0!==c.stopPropagation){let a={id:t.messageId,role:"activity",activityType:t.activityType,content:h$(t.content)},c;-1===i?(l.push(a),c=a):s?o&&(l[i]={...s,activityType:t.activityType,content:h$(t.content)}):o&&(l[i]=a,c=a),d({messages:l}),c&&await Promise.all(n.map(t=>t.onNewMessage?.({message:c,messages:l,state:u,agent:r,input:e})))}return f()}case cK.ACTIVITY_DELTA:{let i=l.findIndex(e=>e.id===t.messageId);if(-1===i)return f();let a=l[i];if("activity"!==a.role)return console.warn(`ACTIVITY_DELTA: Message '${t.messageId}' is not an activity message`),f();let s=await hz(n,l,u,(n,i,s)=>n.onActivityDeltaEvent?.({event:t,messages:i,state:s,agent:r,input:e,activityMessage:a}));if(d(s),!0!==s.stopPropagation)try{let e=h$(a.content??{}),r=dU(e,t.patch??[],!0,!1).newDocument;l[i]={...a,content:h$(r),activityType:t.activityType},d({messages:l})}catch(r){let e=r instanceof Error?r.message:String(r);console.warn(`Failed to apply activity patch for '${t.messageId}': ${e}`)}return f()}case cK.RAW:return d(await hz(n,l,u,(n,i,a)=>n.onRawEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.CUSTOM:return d(await hz(n,l,u,(n,i,a)=>n.onCustomEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.RUN_STARTED:{let i=await hz(n,l,u,(n,i,a)=>n.onRunStartedEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation&&t.input?.messages){for(let e of t.input.messages)l.find(t=>
33t.id===e.id)||l.push(e);d({messages:l})}return f()}case cK.RUN_FINISHED:return d(await hz(n,l,u,(n,i,a)=>n.onRunFinishedEvent?.({event:t,messages:i,state:a,agent:r,input:e,result:t.result}))),f();case cK.RUN_ERROR:return d(await hz(n,l,u,(n,i,a)=>n.onRunErrorEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.STEP_STARTED:return d(await hz(n,l,u,(n,i,a)=>n.onStepStartedEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.STEP_FINISHED:return d(await hz(n,l,u,(n,i,a)=>n.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.TEXT_MESSAGE_CHUNK:throw Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case cK.TOOL_CALL_CHUNK:throw Error("TOOL_CALL_CHUNK must be tranformed before being applied");case cK.THINKING_START:case cK.THINKING_END:case cK.THINKING_TEXT_MESSAGE_START:case cK.THINKING_TEXT_MESSAGE_CONTENT:case cK.THINKING_TEXT_MESSAGE_END:return f();case cK.REASONING_START:return d(await hz(n,l,u,(n,i,a)=>n.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.REASONING_MESSAGE_START:{let i=await hz(n,l,u,(n,i,a)=>n.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e}=t;l.find(t=>t.id===e)||(l.push({id:e,role:"reasoning",content:""}),d({messages:l}))}return f()}case cK.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,s=l.find(e=>e.id===i);if(!s)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),f();let o=await hz(n,l,u,(n,i,a)=>n.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:r,input:e,reasoningMessageBuffer:"string"==typeof s.content?s.content:""}));return d(o),!0!==o.stopPropagation&&(s.content=`${"string"==typeof s.content?s.content:""}${a}`,d({messages:l})),f()}case cK.REASONING_MESSAGE_END:{let{messageId:i}=t,a=l.find(e=>e.id===i);return a?(d(await hz(n,l,u,(n,i,s)=>n.onReasoningMessageEndEvent?.({event:t,messages:i,state:s,agent:r,input:e,reasoningMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(n.map(t=>{t.onNewMessage?.({message:a,messages:l,state:u,agent:r,input:e})}))):console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),f()}case cK.REASONING_MESSAGE_CHUNK:throw Error("REASONING_MESSAGE_CHUNK must be transformed before being applied");case cK.REASONING_END:return d(await hz(n,l,u,(n,i,a)=>n.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case cK.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:s}=t,o=await hz(n,l,u,(n,i,a)=>n.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(o),!0!==o.stopPropagation){let e=!1;if("tool-call"===i){for(let t of l)if("assistant"===t.role&&t.toolCalls){let r=t.toolCalls.find(e=>e.id===a);if(r){r.encryptedValue=s,e=!0;break}}}else{let t=l.find(e=>e.id===a);t?.role!=="activity"&&t&&(t.encryptedValue=s,e=!0)}e&&(c.messages=l)}return f()}}return t.type,f()}),(void 0===a&&(a=1/0),f0(f_,a)),n.length>0?(s={},fL(function(e,t){var r=!1;e.subscribe(fF(t,function(e){r=!0,t.next(e)},function(){r||t.next(s),t.complete()}))})):e=>e)},hW=e=>t=>{let r=hG(e),n=new Map,i=new Map,a=!1,s=!1,o=!1,l=new Map,u=!1,c=!1,d=!1;return t.pipe(f0(e=>{let t=e.type;if(r?.event("VERIFY","Event:",e,{type:e.type}),s)return fH(()=>new cP(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&t!==cK.RUN_ERROR&&t!==cK.RUN_STARTED)return fH(()=>new cP(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(o){if(t===cK.RUN_STARTED){if(d&&!a)return fH(()=>new cP("Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run."));a&&(n.clear(),i.clear(),l.clear(),u=!1,c=!1,a=!1,s=!1,d=!0)}}else if(o=!0,t!==cK.RUN_STARTED&&t!==cK.RUN_ERROR)return fH(()=>new cP("First event must be 'RUN_STARTED'"));switch(t){case cK.TEXT_MESSAGE_START:{let t=e.messageId;return n.has(t)?fH(()=>new cP(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${t}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(n.set(t,!0),fB(e))}case cK.TEXT_MESSAGE_CONTENT:{let t=e.messageId;return n.has(t)?fB(e):fH(()=>new cP(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${t}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case cK.TEXT_MESSAGE_END:{let t=e.messageId;return n.has(t)?(n.delete(t),fB(e)):fH(()=>new cP(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${t}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case cK.TOOL_CALL_START:{let t=e.toolCallId;return i.has(t)?fH(()=>new cP(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${t}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(i.set(t,!0),fB(e))}case cK.TOOL_CALL_ARGS:{let t=e.toolCallId;return i.has(t)?fB(e):fH(()=>new cP(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${t}'. Start a tool call with 'TOOL_CALL_START' first.`))}case cK.TOOL_CALL_END:{let t=e.toolCallId;return i.has(t)?(i.delete(t),fB(e)):fH(()=>new cP(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${t}'. A 'TOOL_CALL_START' event must be sent first.`))}case cK.STEP_STARTED:{let t=e.stepName;return l.has(t)?fH(()=>new cP(`Step "${t}" is already active for 'STEP_STARTED'`)):(l.set(t,!0),fB(e))}case cK.STEP_FINISHED:{let t=e.stepName;return l.has(t)?(l.delete(t),fB(e)):fH(()=>new cP(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}case cK.RUN_STARTED:return d=!0,fB(e);case cK.RUN_FINISHED:if(l.size>0){let e=Array.from(l.keys()).join(", ");return fH(()=>new cP(`Cannot send 'RUN_FINISHED' while steps are still active: ${e}`))}if(n.size>0){let e=Array.from(n.keys()).join(", ");return fH(()=>new cP(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(", ");return fH(()=>new cP(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}return a=!0,fB(e);case cK.RUN_ERROR:return s=!0,fB(e);case cK.CUSTOM:return fB(e);case cK.THINKING_TEXT_MESSAGE_START:return u?c?fH(()=>new cP("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.")):(c=!0,fB(e)):fH(()=>new cP("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case cK.THINKING_TEXT_MESSAGE_CONTENT:return c?fB(e):fH(()=>new cP("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case cK.THINKING_TEXT_MESSAGE_END:return c?(c=!1,fB(e)):fH(()=>new cP("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case cK.THINKING_START:return u?fH(()=>new cP("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(u=!0,fB(e));case cK.THINKING_END:return u?(u=!1,fB(e)):fH(()=>new cP("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return fB(e)}}))},hK=((O={}).HEADERS="headers",O.DATA="data",O),hZ=cs.k5(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),hJ=cs.k5(["LangGraphInterruptEvent","PredictState","Exit"]),hX=cs.Ik({type:cs.eu(hZ.enum.TextMessageStart),messageId:cs.Yj(),parentMessageId:cs.Yj().optional(),role:cs.Yj().optional()}),h0=cs.Ik({type:cs.eu(hZ.enum.TextMessageContent),messageId:cs.Yj(),content:cs.Yj()}),h1=cs.Ik({type:cs.eu(hZ.enum.TextMessageEnd),messageId:cs.Yj()}),h2=cs.Ik({type:cs.eu(hZ.enum.ActionExecutionStart),actionExecutionId:cs.Yj(),actionName:cs.Yj(),parentMessageId:cs.Yj().optional()}),h3=cs.Ik({type:cs.eu(hZ.enum.ActionExecutionArgs),actionExecutionId:cs.Yj(),args:cs.Yj()}),h5=cs.Ik({type:cs.eu(hZ.enum.ActionExecutionEnd),actionExecutionId:cs.Yj()}),h4=cs.Ik({type:cs.eu(hZ.enum.ActionExecutionResult),actionName:cs.Yj(),actionExecutionId:cs.Yj(),result:cs.Yj()}),h8=cs.Ik({type:cs.eu(hZ.enum.AgentStateMessage),threadId:cs.Yj(),agentName:cs.Yj(),nodeName:cs.Yj(),runId:cs.Yj(),active:cs.zM(),role:cs.Yj(),state:cs.Yj(),running:cs.zM()}),h6=cs.Ik({type:cs.eu(hZ.enum.MetaEvent),name:hJ,value:cs.bz()}),h9=cs.Ik({type:cs.eu(hZ.enum.RunError),message:cs.Yj(),code:cs.Yj().optional()});cs.gM("type",[hX,h0,h1,h2,h3,h5,h4,h8,h6,h9]),cs.Ik({id:cs.Yj(),role:cs.Yj(),content:cs.Yj(),parentMessageId:cs.Yj().optional()}),cs.Ik({id:cs.Yj(),name:cs.Yj(),arguments:cs.bz(),parentMessageId:cs.Yj().optional()}),cs.Ik({id:cs.Yj(),result:cs.bz(),actionExecutionId:cs.Yj(),actionName:cs.Yj()});let h7=e=>{if("string"==typeof e)return e;if(!Array.isArray(e))return;let t=e.filter(e=>"text"===e.type).map(e=>e.text).filter(e=>e.length>0);if(0!==t.length)return t.join(`
34`)},ge=e=>t=>{let r=hG(e),n,i,a,s,o=()=>"text"===s?[(()=>{if(!n||"text"!==s)throw Error("No text message to close");let e={type:cK.TEXT_MESSAGE_END,messageId:n.messageId};return s=void 0,n=void 0,r?.event("TRANSFORM","TEXT_MESSAGE_END",e,{messageId:e.messageId}),e})()]:"tool"===s?[(()=>{if(!i||"tool"!==s)throw Error("No tool call to close");let e={type:cK.TOOL_CALL_END,toolCallId:i.toolCallId};return s=void 0,i=void 0,r?.event("TRANSFORM","TOOL_CALL_END",e,{toolCallId:e.toolCallId}),e})()]:"reasoning"===s?[(()=>{if(!a||"reasoning"!==s)throw Error("No reasoning message to close");let e={type:cK.REASONING_MESSAGE_END,messageId:a.messageId};return s=void 0,a=void 0,r?.event("TRANSFORM","REASONING_MESSAGE_END",e,{messageId:e.messageId}),e})()]:[];return t.pipe(f0(e=>{switch(e.type){case cK.TEXT_MESSAGE_START:case cK.TEXT_MESSAGE_CONTENT:case cK.TEXT_MESSAGE_END:case cK.TOOL_CALL_START:case cK.TOOL_CALL_ARGS:case cK.TOOL_CALL_END:case cK.TOOL_CALL_RESULT:case cK.STATE_
34SNAPSHOT:case cK.STATE_DELTA:case cK.MESSAGES_SNAPSHOT:case cK.CUSTOM:case cK.RUN_STARTED:case cK.RUN_FINISHED:case cK.RUN_ERROR:case cK.STEP_STARTED:case cK.STEP_FINISHED:case cK.THINKING_START:case cK.THINKING_END:case cK.THINKING_TEXT_MESSAGE_START:case cK.THINKING_TEXT_MESSAGE_CONTENT:case cK.THINKING_TEXT_MESSAGE_END:case cK.REASONING_START:case cK.REASONING_MESSAGE_START:case cK.REASONING_MESSAGE_CONTENT:case cK.REASONING_MESSAGE_END:case cK.REASONING_END:return[...o(),e];case cK.RAW:case cK.ACTIVITY_SNAPSHOT:case cK.ACTIVITY_DELTA:case cK.REASONING_ENCRYPTED_VALUE:return[e];case cK.TEXT_MESSAGE_CHUNK:let t=[];if(("text"!==s||void 0!==e.messageId&&e.messageId!==n?.messageId)&&t.push(...o()),"text"!==s){if(void 0===e.messageId)throw Error("First TEXT_MESSAGE_CHUNK must have a messageId");n={messageId:e.messageId,name:e.name},s="text";let i={type:cK.TEXT_MESSAGE_START,messageId:e.messageId,role:e.role||"assistant",...void 0!==e.name&&{name:e.name}};t.push(i),r?.event("TRANSFORM","TEXT_MESSAGE_START",i,{messageId:e.messageId})}if(void 0!==e.delta){let i={type:cK.TEXT_MESSAGE_CONTENT,messageId:n.messageId,delta:e.delta};t.push(i),r?.event("TRANSFORM","TEXT_MESSAGE_CONTENT",i,{messageId:n.messageId})}return t;case cK.TOOL_CALL_CHUNK:let l=[];
34if(("tool"!==s||void 0!==e.toolCallId&&e.toolCallId!==i?.toolCallId)&&l.push(...o()),"tool"!==s){if(void 0===e.toolCallId)throw Error("First TOOL_CALL_CHUNK must have a toolCallId");if(void 0===e.toolCallName)throw Error("First TOOL_CALL_CHUNK must have a toolCallName");i={toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId},s="tool";let t={type:cK.TOOL_CALL_START,toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId};l.push(t),r?.event("TRANSFORM","TOOL_CALL_START",t,{toolCallId:e.toolCallId,toolCallName:e.toolCallName})}if(void 0!==e.delta){let t={type:cK.TOOL_CALL_ARGS,toolCallId:i.toolCallId,delta:e.delta};l.push(t),r?.event("TRANSFORM","TOOL_CALL_ARGS",t,{toolCallId:i.toolCallId})}return l;case cK.REASONING_MESSAGE_CHUNK:let u=[];if(("reasoning"!==s||e.messageId&&e.messageId!==a?.messageId)&&u.push(...o()),"reasoning"!==s){if(void 0===e.messageId)throw Error("First REASONING_MESSAGE_CHUNK must have a messageId");a={messageId:e.messageId},s="reasoning";let t={type:cK.REASONING_MESSAGE_START,messageId:e.messageId};u.push(t),r?.event("TRANSFORM","REASONING_MESSAGE_START",t,{messageId:e.messageId})}if(void 0!==e.delta){let t={type:cK.REASONING_MESSAGE_CONTENT,messageId:a.messageId,delta:e.delta};u.push(t),r?.event("TRANSFORM","REASONING_MESSAGE_CONTENT",t,{messageId:a.messageId})}return u}return e.type,[]}),f1(()=>{o()}))};var gt=class{runNext(e,t){return t.run(e).pipe(ge(!1))}runNextWithState(e,t){let r=h$(e.messages||[]),n=h$(e.state||{}),i=new fJ;return hY(e,i,t,[]).subscribe(e=>{void 0!==e.messages&&(r=e.messages),void 0!==e.state&&(n=e.state)}),this.runNext(e,t).pipe(f5(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:h$(r),state:h$(n)})))}},gr=class extends gt{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function gn(e){let t=e.content;if(Array.isArray(t)){let r=t.filter(e=>"object"==typeof e&&!!e&&"type"in e&&"text"===e.type&&"string"==typeof e.text).map(e=>e.text).join("");return{...e,content:r}}return"string"==typeof t?e:{...e,content:""}}var gi=class extends gt{run(e,t){let{parentRunId:r,...n}=e,i={...n,messages:n.messages.map(gn)};return this.runNext(i,t)}};let ga="THINKING_START",gs="THINKING_END",go="THINKING_TEXT_MESSAGE_START",gl="THINKING_TEXT_MESSAGE_CONTENT",gu="THINKING_TEXT_MESSAGE_END";var gc=class extends gt{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){"u">typeof hU&&void 0!==hU.env&&hU.env.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(fX(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case ga:{this.currentReasoningId=ca();let{title:t,...r}=e;return this.warnAboutTransformation(ga,cK.REASONING_START),{...r,type:cK.REASONING_START,messageId:this.currentReasoningId}}case go:return this.currentMessageId=ca(),this.warnAboutTransformation(go,cK.REASONING_MESSAGE_START),{...e,type:cK.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:"assistant"};case gl:{let{delta:t,...r}=e;return this.warnAboutTransformation(gl,cK.REASONING_MESSAGE_CONTENT),{...r,type:cK.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??ca(),delta:t}}case gu:{let t=this.currentMessageId??ca();return this.warnAboutTransformation(gu,cK.REASONING_MESSAGE_END),{...e,type:cK.REASONING_MESSAGE_END,messageId:t}}case gs:{let t=this.currentReasoningId??ca();return this.warnAboutTransformation(gs,cK.REASONING_END),{...e,type:cK.REASONING_END,messageId:t}}default:return e}}},gd=class{get maxVersion(){return"0.0.52"}get debug(){return this._debug}set debug(e){this._debug=hB(e),this._debugLogger=hQ(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){"boolean"==typeof e?this._debugLogger=e?hQ(hB(!0)):void 0:this._debugLogger=e}constructor({agentId:e,description:t,threadId:r,initialMessages:n,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=r??ca(),this.messages=h$(n??[]),this.state=h$(i??{}),this._debug=hB(a),this._debugLogger=hQ(this._debug),0>=hq(this.maxVersion,"0.0.39")&&this.middlewares.unshift(new gi),0>=hq(this.maxVersion,"0.0.45")&&this.middlewares.unshift(new gc)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>"function"==typeof e?new gr(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{let r;this.isRunning=!0,this.agentId=this.agentId??ca();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle("LIFECYCLE","Run started:",{agentId:this.agentId,threadId:this.threadId});let i,a=new Set(this.messages.map(e=>e.id)),s=[{onRunFinishedEvent:e=>{i=e.result}},...this.subscribers,t??{}];await this.onInitialize(n,s),this.activeRunDetach$=new fW,this.activeRunCompletionPromise=new Promise(e=>{r=e}),await f3(fC(()=>0===this.middlewares.length?this.run(n):this.middlewares.reduceRight((e,t)=>({run:r=>t.run(r,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),ge(this.debugLogger),hW(this.debugLogger),e=>e.pipe(f4(this.activeRunDetach$)),e=>this.apply(n,e,s),e=>this.processApplyEvents(n,e,s),f8(e=>(this.debugLogger?.lifecycle("LIFECYCLE","Run errored:",{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,s))),f1(()=>{this.debugLogger?.lifecycle("LIFECYCLE","Run finished:",{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,s),r?.(),r=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fB(null)));let o=h$(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:o}}finally{this.isRunning=!1}}connect(e){throw new cD}async connectAgent(e,t){try{let r;this.isRunning=!0,this.agentId=this.agentId??ca();let n=this.prepareRunAgentInput(e),i,a=new Set(this.messages.map(e=>e.id)),s=[{onRunFinishedEvent:e=>{i=e.result}},...this.subscribers,t??{}];await this.onInitialize(n,s),this.activeRunDetach$=new fW,this.activeRunCompletionPromise=new Promise(e=>{r=e}),await f3(fC(()=>fQ(()=>this.connect(n)),ge(this.debugLogger),hW(this.debugLogger),e=>e.pipe(f4(this.activeRunDetach$)),e=>this.apply(n,e,s),e=>this.processApplyEvents(n,e,s),f8(e=>(this.isRunning=!1,e instanceof cD?fG:this.onError(n,e,s))),f1(()=>{this.isRunning=!1,this.onFinalize(n,s),r?.(),r=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fB(null)),{defaultValue:void 0});let o=h$(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:o}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,r){return hY(e,t,this,r,this.debugLogger)}processApplyEvents(e,t,r){var n,i;return t.pipe((i=dX(n=t=>{t.messages&&(this.messages=t.messages,r.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,r.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))})?{next:n,error:void 0,complete:void 0}:n)?fL(function(e,t){null==(r=i.subscribe)||r.call(i);var r,n=!0;e.subscribe(fF(t,function(e){var r;null==(r=i.next)||r.call(i,e),t.next(e)},function(){var e;n=!1,null==(e=i.complete)||e.call(i),t.complete()},function(e){var r;n=!1,null==(r=i.error)||r.call(i,e),t.error(e)},function(){var e,t;n&&(null==(e=i.unsubscribe)||e.call(i)),null==(t=i.finalize)||t.call(i)}))}):f_)}prepareRunAgentInput(e){let t=h$(this.messages).filter(e=>"activity"!==e.role);return{threadId:this.threadId,runId:e?.runId||ca(),tools:h$(e?.tools??[]),context:h$(e?.context??[]),forwardedProps:h$(e?.forwardedProps??{}),state:h$(this.state),messages:t}}async onInitialize(e,t){let r=await hz(t,this.messages,this.state,(t,r,n)=>t.onRunInitialized?.({messages:r,state:n,agent:this,input:e}));(void 0!==r.messages||void 0!==r.state)&&(r.messages&&(this.messages=r.messages,e.messages=r.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),r.state&&(this.state=r.state,e.state=r.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,r){return fz(hz(r,this.messages,this.state,(r,n,i)=>r.onRunFailed?.({error:t,messages:n,state:i,agent:this,input:e}))).pipe(fX(n=>{if((void 0!==n.messages||void 0!==n.state)&&(void 0!==n.messages&&(this.messages=n.messages,r.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==n.state&&(this.state=n.state,r.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),!0!==n.stopPropagation){let e=String(t);if("AbortError"!==t.name&&"Fetch is aborted"!==t.message&&"signal is aborted without reason"!==t.message&&"component unmounted"!==t.message&&"component unmounted"!==e)throw console.error("Agent execution failed:",t),t}return{}}))}async onFinalize(e,t){let r=await hz(t,this.messages,this.state,(t,r,n)=>t.onRunFinalized?.({messages:r,state:n,agent:this,input:e}));(void 0!==r.messages||void 0!==r.state)&&(void 0!==r.messages&&(this.messages=r.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==r.state&&(this.state=r.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=h$(this.messages),e.state=h$(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if("assistant"===e.role&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if("assistant"===t.role&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=h$(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=h$(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){let t,r,n;this.agentId=this.agentId??ca();let i=this.prepareRunAgentInput(e);return(0===this.middlewares.length?this.run(i):this.middlewares.reduceRight((e,t)=>({run:r=>t.run(r,e),get messages(){return e.messages},get state(){return e.state}}),this).run(i)).pipe(ge(this.debugLogger),hW(this.debugLogger),(t=this.threadId,r=i.runId,n=this.agentId,e=>{let i={},a=!0,s=!0,o="",l=null,u=null,c=[],d={},f=e=>{"object"==typeof e&&e&&("messages"in e&&delete e.messages,i=e)};return e.pipe(f0(e=>{switch(e.type){case cK.TEXT_MESSAGE_START:return[{type:hZ.enum.TextMessageStart,messageId:e.messageId,role:e.role}];case cK.TEXT_MESSAGE_CONTENT:return[{type:hZ.enum.TextMessageContent,messageId:e.messageId,content:e.delta}];case cK.TEXT_MESSAGE_END:return[{type:hZ.enum.TextMessageEnd,messageId:e.messageId}];case cK.TOOL_CALL_START:return c.push({id:e.toolCallId,type:"function",function:{name:e.toolCallName,arguments:""}}),s=!0,d[e.toolCallId]=e.toolCallName,[{type:hZ.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}];case cK.TOOL_CALL_ARGS:{let l=c.find(t=>
34t.id===e.toolCallId);if(!l)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${e.toolCallId}'`),[];l.function.arguments+=e.delta;let d=!1;if(u){let e=u.find(e=>e.tool==l.function.name);if(e)try{let t=JSON.parse(f9(l.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),d=!0):e.tool_argument||(f({...i,[e.state_key]:t}),d=!0)}catch{}}return[{type:hZ.enum.ActionExecutionArgs,actionExecutionId:e.toolCallId,args:e.delta},...d?[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}]:[]]}case cK.TOOL_CALL_END:return[{type:hZ.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}];case cK.TOOL_CALL_RESULT:return[{type:hZ.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||"unknown"}];case cK.RAW:return[];case cK.CUSTOM:switch(e.name){case"Exit":a=!1;break;case"PredictState":u=e.value}return[{type:hZ.enum.MetaEvent,name:e.name,value:e.value}];case cK.STATE_SNAPSHOT:return f(e.snapshot),[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}];case cK.STATE_DELTA:{let l=dU(i,e.delta,!0,!1);return l?(f(l.newDocument),[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}]):[]}case cK.MESSAGES_SNAPSHOT:return l=e.messages,[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify({...i,...l?{messages:l}:{}}),active:!0}];case cK.RUN_STARTED:return[];case cK.RUN_FINISHED:return l&&(i.messages=l),0===Object.keys(i).length?[]:[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify({...i,...l?{messages:function(e){let t=[];for(let r of e)if("assistant"===r.role||"user"===r.role||"system"===r.role){let e=h7(r.content);if(e){let n={id:r.id,role:r.role,content:e};t.push(n)}if("assistant"===r.role&&r.toolCalls&&r.toolCalls.length>0)for(let e of r.toolCalls){let n={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:r.id};t.push(n)}}else if("tool"===r.role){let n="unknown";for(let t of e)if("assistant"===t.role&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===r.toolCallId){n=e.function.name;break}}let i={id:r.id,result:r.content,actionExecutionId:r.toolCallId,actionName:n};t.push(i)}return t}(l)}:{}}),active:!1}];case cK.RUN_ERROR:return[{type:hZ.enum.RunError,message:e.message,code:e.code}];case cK.STEP_STARTED:return o=e.stepName,c=[],u=null,[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:!0}];case cK.STEP_FINISHED:return c=[],u=null,[{type:hZ.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:!1}];default:return[]}}))}),e=>e.pipe(fX(e=>(this.debugLogger?.event("LEGACY","Event:",e,{type:e.type}),e))))}},gf=class extends gd{requestInit(e){return{method:"POST",headers:{...this.headers,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=h$(e.headers??{})}run(e){var t,r,n,i;let a,s,o,l;return t=this.url,r=this.requestInit(e),i=fQ(()=>fz(fetch(t,r))).pipe((n=e=>{if(!e.ok){let t=e.headers.get("content-type")||"";return fz(e.text()).pipe(f0(r=>{let n=r;if(t.includes("application/json"))try{n=JSON.parse(r)}catch{}let i=Error(`HTTP ${e.status}: ${"string"==typeof n?n:JSON.stringify(n)}`);return i.status=e.status,i.payload=n,fH(()=>i)}))}let t={type:hK.HEADERS,status:e.status,headers:e.headers},r=e.body?.getReader();return r?new fk(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:n}=await r.read();if(t)break;let i={type:hK.DATA,data:n};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{r.cancel().catch(e=>{if(e?.name!=="AbortError")throw e})})):fH(()=>Error("Failed to getReader() from response"))},fL(function(e,t){var r=null,i=0,a=!1,s=function(){return a&&!r&&t.complete()};e.subscribe(fF(t,function(e){null==r||r.unsubscribe(),fP(n(e,i++)).subscribe(r=fF(t,function(e){return t.next(e)},function(){r=null,s()}))},function(){a=!0,s()}))}))),a=hG(this.debugLogger),s=new fW,o=new fJ,l=!1,i.subscribe({next:e=>{if(o.next(e),e.type!==hK.HEADERS||l)l||s.error(Error("No headers event received before data events"));else{l=!0;let t=e.headers.get("content-type");a?.lifecycle("HTTP","Stream format detected:",{contentType:t,parser:t===hN?"protobuf":"sse"}),t===hN?(e=>{let t=new fW,r=new Uint8Array;function n(){for(;r.length>=4;){let e=4+new DataView(r.buffer,r.byteOffset,4).getUint32(0,!1);if(r.length<e)break;try{let n=r.slice(4,e),i=function(e){let t=Object.values(hT.decode(e)).find(e=>void 0!==e);if(!t)throw Error("Invalid event");
34if(t.type=pX[t.baseEvent.type],t.timestamp=t.baseEvent.timestamp,t.rawEvent=t.baseEvent.rawEvent,t.type===cK.MESSAGES_SNAPSHOT)for(let e of t.messages){if("user"===e.role&&Array.isArray(e.contentParts)){let t=e.contentParts.map(e=>hR(e)).filter(e=>void 0!==e);t.length>0&&(e.content=t)}Array.isArray(e.contentParts)&&0===e.contentParts.length&&(e.contentParts=void 0),e.toolCalls?.length===0&&(e.toolCalls=void 0)}if(t.type===cK.STATE_DELTA)for(let e of t.delta)e.op=pI[e.op].toLowerCase(),Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]});return Object.keys(t).forEach(e=>{void 0===t[e]&&delete t[e]}),d_.parse(t)}(n);t.next(i),r=r.slice(e)}catch(r){let e=r instanceof Error?r.message:String(r);t.error(Error(`Failed to decode protocol buffer message: ${e}`));return}}}return e.subscribe({next:e=>{if(e.type!==hK.HEADERS&&e.type===hK.DATA&&e.data){let t=new Uint8Array(r.length+e.data.length);t.set(r,0),t.set(e.data,r.length),r=t,n()}},error:e=>t.error(e),complete:()=>{if(r.length>0)try{n()}catch{console.warn("Incomplete or invalid protocol buffer data at stream end")}t.complete()}}),t.asObservable()})(o).subscribe({next:e=>s.next(e),error:e=>s.error(e),complete:()=>s.complete()}):((e,t)=>{let r=hG(t),n=new fW,i=new TextDecoder("utf-8",{fatal:!1}),a="";function s(e){let t=e.split(`
35`),i=[];for(let e of t)e.startsWith("data:")&&i.push(e.slice(5).replace(/^ /,""));if(i.length>0)try{let e=i.join(`
36`),t=JSON.parse(e);r?.event("SSE","Event received:",t,{type:t.type}),n.next(t)}catch(e){n.error(e)}}return e.subscribe({next:e=>{if(e.type!==hK.HEADERS&&e.type===hK.DATA&&e.data){let t=i.decode(e.data,{stream:!0}),r=(a+=t).split(/\n\n/);for(let e of(a=r.pop()||"",r))s(e)}},error:e=>n.error(e),complete:()=>{a&&s(a+=i.decode()),n.complete()}}),n.asObservable()})(o,a).subscribe({next:e=>{try{let t=d_.parse(e);
36a?.event("HTTP","Event validated:",t,{type:t.type,valid:!0}),s.next(t)}catch(t){a?.event("HTTP","Event invalid:",{json:e,error:String(t)}),s.error(t)}},error:e=>{if(e?.name==="AbortError"){s.next({type:cK.RUN_ERROR,message:e.message||"Request aborted",code:"abort",rawEvent:e}),s.complete();return}return s.error(e)},complete:()=>s.complete()})}},error:e=>{o.error(e),s.error(e)},complete:()=>{o.complete()}}),s.asObservable()}clone(){let e=super.clone();e.url=this.url,e.headers=h$(this.headers??{});let t=new AbortController,r=this.abortController.signal;return r.aborted&&t.abort(r.reason),e.abortController=t,e}};class gp extends gf{requestInit(e){let{params:t,accessToken:r,recordDebugSession:n}=e.forwardedProps||{},i={...t,...n&&{recordDebugSession:!0}};return{method:"POST",headers:{...this.headers,Authorization:`Bearer ${r}`,"Content-Type":"application/json",Accept:"text/event-stream, application/json"},body:JSON.stringify(i),signal:this.abortController.signal}}}let gh=new J({required:!0}),gg=new J({required:!0,constrainTo:lh}),gm=e=>({...e,name:lg(e.name)}),gy=rs("followUpAnswers/setIsEnabled",e=>e2(e,new Q({required:!0}))),gv=rs("followUpAnswers/setFollowUpAnswersConversationId",e=>e2(e,eY)),gb=rs("followUpAnswers/setFollowUpAnswersConversationToken",e=>e2(e,eY)),gw=rs("followUpAnswers/clearFollowUpAnswersConversationToken"),gS=rs("followUpAnswers/createFollowUpAnswer",e=>e2(e,{question:eY})),gE=rs("followUpAnswers/setActiveFollowUpAnswerId",e=>e2(e,eY)),g_=rs("followUpAnswers/setFollowUpAnswerContentFormat",e=>e2(e,{contentFormat:lS,answerId:eY})),gC=rs("followUpAnswers/setFollowUpIsLoading",e=>e2(e,{isLoading:new Q({required:!0}),answerId:eY})),gO=rs("followUpAnswers/setFollowUpIsStreaming",e=>e2(e,{isStreaming:new Q({required:!0}),answerId:eY})),gk=rs("followUpAnswers/followUpMessageChunkReceived",e=>e2(e,{textDelta:gh,answerId:eY})),gI=rs("followUpAnswers/followUpCitationsReceived",e=>e2(e,{citations:new er({required:!0,each:new ee({values:lw})}),answerId:eY})),gA=rs("followUpAnswers/followUpCompleted",e=>e2(e,{answerId:eY,cannotAnswer:new Q({required:!1})})),gT=rs("followUpAnswers/followUpFailed",e=>e2(e,{message:new J,code:new W({min:0}),answerId:eY})),gx=rs("followUpAnswers/activeFollowUpStartFailed",e=>e2(e,{message:new J})),gR=rs("followUpAnswers/likeFollowUp",e=>e2(e,{answerId:eY})),gN=rs("followUpAnswers/dislikeFollowUp",e=>e2(e,{answerId:eY})),gj=rs("followUpAnswers/submitFollowUpFeedback",e=>e2(e,{answerId:eY})),gP=rs("followUpAnswers/resetFollowUpAnswers"),gD=rs("followUpAnswers/stepStarted",e=>e2(gm(e),{answerId:eY,name:gg,startedAt:new W({min:0,required:!0})})),gM=rs("followUpAnswers/stepFinished",e=>e2(gm(e),{answerId:eY,name:gg,finishedAt:new W({min:0,required:!0})}));(k=q||(q={}))[k.SseMaxDurationExceeded=1e3]="SseMaxDurationExceeded",k[k.SseFollowUpNotSupported=1001]="SseFollowUpNotSupported",k[k.ConversationNotFound=1002]="ConversationNotFound",k[k.SseModelsNotAvailable=1003]="SseModelsNotAvailable",k[k.SseInternalError=1004]="SseInternalError",k[k.SseTurnLimitReached=1005]="SseTurnLimitReached";let gL={"KNOWLEDGE:SSE_MAX_DURATION_EXCEEDED":q.SseMaxDurationExceeded,"KNOWLEDGE:SSE_FOLLOW_UP_NOT_SUPPORTED":q.SseFollowUpNotSupported,"KNOWLEDGE:NOT_FOUND":q.ConversationNotFound,"KNOWLEDGE:SSE_MODELS_NOT_AVAILABLE":q.SseModelsNotAvailable,"KNOWLEDGE:SSE_INTERNAL_ERROR":q.SseInternalError,"KNOWLEDGE:SSE_TURN_LIMIT_REACHED":q.SseTurnLimitReached},gF=(e,t)=>{let{referrer:r,userAgent:n,location:i,clientId:a}=e.getMeta("");return{...t?t():{},referrer:r,userAgent:n,location:i,clientId:a}};function gq(e){var t;if(!e||!((t=e)&&/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(t)))return null;try{let t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=atob(t),n=decodeURIComponent(r.split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(n)}catch(e){return null}}function gU(e,t){e.dispatch(le({status:401,statusCode:401,message:t.message,type:t.name}))}let g$=Symbol.for("coveo-headless-internal-state");var gV=r(1123);let gz=(e,t,r,n,i,a)=>{let s=e[t];H(s)||H(i)||i===s||i!==n&&(a.warn(`Mismatch on access token (JWT Token) ${t} and engine configuration.`),a.warn(`To remove this warning, make sure that access token value [${s}] matches engine configuration value [${r}]`))},gB=(e,t)=>!H(e)&&t!==e,gG=e=>{let t=gq(e);return!!t&&t},gH=(e,t)=>(gB(e.searchHub,t.searchHub)&&(t.searchHub=e.searchHub),t),gQ=(e,t,r,n)=>(gz(e,"searchHub",t.searchHub,"default",r,n),gH(e,t)),gY=(e,t)=>
36(gB(e.pipeline,t.pipeline)&&(t.pipeline=e.pipeline),t),gW=(e,t,r,n)=>(gz(e,"pipeline",t.pipeline,"",r,n),gY(e,t)),gK=(e,t)=>(gB(e.userDisplayName,t.configuration.analytics.userDisplayName)&&(t.configuration.analytics.userDisplayName=e.userDisplayName),t),gZ=new z({...{organizationId:eY,accessToken:eY,name:new J({required:!1,emptyAllowed:!1}),analytics:new ee({options:{required:!1},values:{enabled:new Q({required:!1}),originContext:new J({required:!1}),originLevel2:new J({required:!1}),originLevel3:new J({required:!1}),analyticsMode:new J({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new J({required:!1,url:!0}),trackingId:new J({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new J({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})},search:new ee({options:{required:!1},values:{pipeline:new J({required:!1,emptyAllowed:!0}),searchHub:eW,locale:eW,timezone:eW,authenticationProviders:new er({required:!1,each:eY}),proxyBaseUrl:new J({required:!1,url:!0})}})}),gJ={debug:sd,pipeline:sy,searchHub:lo,search:la};function gX(e){let t=(n=e.loggerOptions,(0,gV.pino)({name:"@coveo/headless",level:n?.level||"warn",formatters:{log:n?.logFormatter}})),{configuration:r}=e;var n,i=r,a=t;try{gZ.validate(i)}catch(e){throw a.error(e,"Search engine configuration error"),e}let s=function(e,t){let{search:r}=e;return new eV({logger:t,preprocessRequest:e.preprocessRequest||eE,postprocessSearchResponseMiddleware:r?.preprocessSearchResponseMiddleware||eG,postprocessFacetSearchResponseMiddleware:r?.preprocessFacetSearchResponseMiddleware||eH,postprocessQuerySuggestResponseMiddleware:r?.preprocessQuerySuggestResponseMiddleware||eQ})}(r,t),o=new eS({logger:t}),l={...{analyticsClientMiddleware:function(e){let{analytics:t}=e;return t?.analyticsClientMiddleware||((e,t)=>t)}(r),validatePayload:e1,preprocessRequest:r.preprocessRequest||eE,logger:t},apiClient:s,streamingClient:o},u=function(e,t){let r={...e.reducers,configuration:ce,version:u1},n=function(e,t,r){var n,i;let a,s,{reducers:o,navigatorContextProvider:l}=e,u=(n={...o,configurationReducer:r},i=e.preloadedState??{},s={...n},{get combinedReducer(){let e;return e=re({...function(e){let t={};for(let[r,n]of e)t[r]=n;return t}(Object.entries(i).filter(([e])=>!(e in s)).map(([e,t])=>[e,()=>t])),...s}),(t,r)=>{let n=e(t,r);return a?a(n,r):n}},containsAll:e=>Object.keys(e).every(e=>e in s),add(e){Object.keys(e).filter(e=>!(e in s)).forEach(t=>{s[t]=e[t]})},addCrossReducer(e){a=e}});e.crossReducer&&u.addCrossReducer(e.crossReducer);let c=t.logger,d=function(e,t,r){let{preloadedState:n,configuration:i}=e,a=i.name||"coveo-headless",s=function(e,t,r){var n;let i,a,s,o,l,u,c,d,f,p,{renewAccessToken:h}=e.configuration,g=(i=0,a=null,s=el(()=>{i=0},500),o=async(e,t=!1)=>{let r=!a;r&&h&&(a=(async()=>{try{return await h()}catch(e){if(!t)throw e;return null}})().finally(()=>{a=null}));let n=await a;return r&&n&&e.dispatch(a6({accessToken:n})),n},l=async e=>{let r=e.getState().configuration.accessToken;if(r&&function(e,t=60){if(!e)return!1;let r=gq(e);if(!r||"number"!=typeof r.exp)return!1;let n=Math.floor(Date.now()/1e3);return r.exp<=n+t}(r)){t.debug("Access token is expired or about to expire, attempting renewal.");try{await o(e)?t.debug("Access token was renewed."):t.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(e){t.warn(e,"Access token renewal failed. A retry will occur if necessary.")}}},u=async(e,r,n)=>{if(i>=5)return t.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),gU(e,r.error),r;a||(i++,s());try{await o(e,!0)}catch(e){t.debug(e,"Token renewal failed in reactive path (piggybacked on a proactive renewal). The action will be re-dispatched.")}e.dispatch(n)},e=>r=>async n=>{var i;let a="function"==typeof h;if("function"!=typeof n)return r(n);a&&await l(e);let s=await r(n);return"object"==typeof(i=s)&&null!==i&&"error"in i&&i.error?.name===new eN().name?a?await u(e,s,n):(t.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),gU(e,s.error),s):s}),m=(c=((e={})=>{let t=new Map,r=new Map,{extra:n,onError:i=ne}=e;rB(i,"onError");let a=e=>{var r;return(r=r5(t,e)??r3(e)).unsubscribe=()=>t.delete(r.id),t.set(r.id,r),e=>{r.unsubscribe(),e?.cancelActive&&r4(r)}};rX(a,{withTypes:()=>a});let s=e=>{let r=r5(t,e);return r&&(r.unsubscribe(),e.cancelActive&&r4(r)),!!r};rX(s,{withTypes:()=>s});let o=async(e,s,o,l)=>{var u,c;let d,f=new AbortController,p=(u=f.signal,d=async(e,t)=>{rY(u);let r=()=>{},n=[new Promise((t,n)=>{let i=a({predicate:e,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});r=()=>{i(),n()}})];null!=t&&n.push(new Promise(e=>setTimeout(e,t,null)));try{let e=await rW(u,Promise.race(n));return rY(u),e}finally{r()}},(e,t)=>rH(d(e,t))),h=[];try{let i;
36e.pending.add(f),i=r.get(e)??0,r.set(e,i+1),await Promise.resolve(e.effect(s,rX({},o,{getOriginalState:l,condition:(e,t)=>p(e,t).then(Boolean),take:p,delay:rJ(f.signal),pause:rZ(f.signal),extra:n,signal:f.signal,fork:(c=f.signal,(e,t)=>{rB(e,"taskExecutor");let r=new AbortController;rQ(c,()=>r.abort(c.reason));let n=rK(async()=>{rY(c),rY(r.signal);let t=await e({pause:rZ(r.signal),delay:rJ(r.signal),signal:r.signal});return rY(r.signal),t},()=>r.abort(rU));return t?.autoJoin&&h.push(n.catch(rG)),{result:rZ(c)(n),cancel(){r.abort(rq)}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==f&&(e.abort(r$),r.delete(e))})},cancel:()=>{f.abort(r$),e.pending.delete(f)},throwIfCancelled:()=>{rY(f.signal)}})))}catch(e){e instanceof rz||r8(i,e,{raisedBy:"effect"})}finally{let t;await Promise.all(h),f.abort(rV),1===(t=r.get(e)??1)?r.delete(e):r.set(e,t-1),e.pending.delete(f)}},l=()=>{for(let e of r.keys())r4(e);t.clear()};return{middleware:e=>r=>n=>{let u;if(!rr(n))return r(n);if(r6.match(n))return a(n.payload);if(r9.match(n))return void l();if(r7.match(n))return s(n.payload);let c=e.getState(),d=()=>{if(c===r0)throw Error(nt(23));return c};try{if(u=r(n),t.size>0){let r=e.getState();for(let a of Array.from(t.values())){let t=!1;try{t=a.predicate(n,r,c)}catch(e){t=!1,r8(i,e,{raisedBy:"predicate"})}t&&o(a,n,e,d)}}}finally{c=r0}return u},startListening:a,stopListening:s,clearListeners:l}})({extra:n={getNavigatorContext:r}}),p={run:async(e,t,r)=>{var n,i;let a,s,o,l,u,c,p,h,g,m;f();let y=al(e),v=e.configuration.organizationId,b=e.configuration.environment,w=e.configuration.accessToken,S=e.configuration.knowledge.debugAgentSession,E=new gp({url:`${((e,t,r)=>{let n=eM(t,r),i=e?.trim();if(!n||!t||!i)throw Error("Missing required parameters for answer endpoint");let a=`/api/preview/organizations/${t}/agents`;return`${n}${a}/${i}`})(y,v,b)}/answer`});d=E;let _=(a="",s=!1,{onRunStartedEvent:({event:e})=>{a=e.runId,s=!1,t(lO(e.runId)),t(lU(!1)),t(l$(!0)),t(gv(e.threadId)),t(gw())},onStepStartedEvent:({event:e})=>{t(lW({name:e.stepName,startedAt:e.timestamp??Date.now()}))},onStepFinishedEvent:({event:e})=>{t(lK({name:e.stepName,finishedAt:e.timestamp??Date.now()}))},onTextMessageContentEvent:({event:e})=>{e.delta.length>0&&(s=!0),t(lA({textDelta:e.delta}))},onCustomEvent:({event:e})=>{let{name:r,value:n}=e;switch(r){case"header":n?.contentFormat&&t(lV(n.contentFormat)),"boolean"==typeof n?.followUpEnabled&&t(gy(n.followUpEnabled)),n?.conversationToken&&t(gb(n.conversationToken));return;case"citations":return void t(lT({citations:n.citations}))}},onRunErrorEvent:({event:e})=>{var r;let n=(r=e.code)?gL[r]??q.SseInternalError:q.SseInternalError;t(lx({message:e.message,code:n}))},onRunFinishedEvent:({event:e})=>{let r=e.result?.completionReason==="ANSWERED",n=r?!s:void 0;t(lH(r)),t(lQ(!r)),t(l$(!1)),t(ll(r,a,n)),t(lu())}}),C=(n=e,i=r(),o=n.query?.q,l=lp(n),u=sD(n.configuration.analytics,i,{actionCause:o7(n)}),c=n.configuration.search.locale,p=n.searchHub,h=n.pipeline,g=n.context,m=ap(n)??[],{q:o||"",...l.length&&{facets:l},citationsFieldToInclude:m,...p?.length&&{searchHub:p},...h?.length&&{pipeline:h},...g?.contextValues&&{context:g.contextValues},...u,locale:c});try{t(lU(!0)),await E.runAgent({forwardedProps:{params:C,accessToken:w,recordDebugSession:S}},_)}catch(e){t(lU(!1)),t(lx({message:"An error occurred while starting the answer generation."})),console.error("Error running the answer agent:",e)}},abortRun:f=()=>{d?.abortRun(),d=void 0}},c.startListening({actionCreator:oZ.pending,effect:async(e,t)=>{let r=t.getState();if(!ad(r))return;p.abortRun(),t.dispatch(lR()),t.dispatch(gP());let i=r.query?.q;i&&""!==i.trim()&&p.run(r,t.dispatch,n.getNavigatorContext)}}),c);return[ct,g,()=>e=>r=>{if(!r.error)return e(r);let n=r.error;if(r.payload?.ignored||t.error({error:n,action:r},`Action dispatch error ${r.type}`),"SchemaValidationError"!==r.error.name)return e(r)},u2].concat(uX.middleware,m.middleware,e.middlewares||[])}(e,t.logger,()=>t.navigatorContext);return function({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:i}){return function(e){let t,r,n,i=function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},a=new ro;return t&&("boolean"==typeof t?a.push(ri):a.push(rn(t.extraArgument))),a},{reducer:a,middleware:s,devTools:o=!0,duplicateMiddlewareCheck:l=!0,preloadedState:u,enhancers:c}=e||{};if("function"==typeof a)t=a;else if(t7(a))t=re(a);else throw Error(nt(1));r="function"==typeof s?s(i):i();let d=rt;o&&(d=ra({trace:!1,..."object"==typeof o&&o}));let f=(n=function(...e){return t=>(r,n)=>{let i=t(r,n),a=()=>{throw Error(t4(15))},s={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=rt(...e.map(e=>e(s)))(i.dispatch),{...i,dispatch:a}}}(...r),function(e){let{autoBatch:t=!0}=e??{},r=new ro(n);return t&&r.push(((e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,a=!1,s=!1,o=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:rf(10):"callback"===e.type?e.queueNotification:rf(e.timeout),u=()=>
36{s=!1,a&&(a=!1,o.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return o.add(e),()=>{t(),o.delete(e)}},dispatch(e){try{return(a=!(i=!e?.meta?.[rc]))&&!s&&(s=!0,l(u)),n.dispatch(e)}finally{i=!0}}})})("object"==typeof t?t:void 0)),r});return function e(t,r,n){if("function"!=typeof t)throw Error(t4(2));if("function"==typeof r&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw Error(t4(0));if("function"==typeof r&&void 0===n&&(n=r,r=void 0),void 0!==n){if("function"!=typeof n)throw Error(t4(1));return n(e)(t,r)}let i=t,a=r,s=new Map,o=s,l=0,u=!1;function c(){o===s&&(o=new Map,s.forEach((e,t)=>{o.set(t,e)}))}function d(){if(u)throw Error(t4(3));return a}function f(e){if("function"!=typeof e)throw Error(t4(4));if(u)throw Error(t4(5));let t=!0;c();let r=l++;return o.set(r,e),function(){if(t){if(u)throw Error(t4(6));t=!1,c(),o.delete(r),s=null}}}function p(e){if(!t7(e))throw Error(t4(7));if(void 0===e.type)throw Error(t4(8));if("string"!=typeof e.type)throw Error(t4(17));if(u)throw Error(t4(9));try{u=!0,a=i(a,e)}finally{u=!1}return(s=o).forEach(e=>{e()}),e}return p({type:t9.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:function(e){if("function"!=typeof e)throw Error(t4(10));i=e,p({type:t9.REPLACE})},[t8]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(t4(11));function t(){e.next&&e.next(d())}return t(),{unsubscribe:f(t)}},[t8](){return this}}}}}(t,u,d(..."function"==typeof c?c(f):f()))}({reducer:e,preloadedState:t,devTools:{stateSanitizer:e=>e.history?{...e,history:"<<OMIT>>"}:e,name:i,shouldHotReload:!1},middleware:e=>{let t;return e({thunk:{extraArgument:n}}).prepend(...r).concat((t=n.logger,e=>r=>n=>(t.debug({action:n,nextState:e.getState()},`Action dispatched: ${n.type}`),r(n))))}})}({preloadedState:n,reducer:r.combinedReducer,middlewares:s,thunkExtraArguments:t,name:a})}(e,{...t,get relay(){return nM(f.state,l)},get navigatorContext(){return gF(this.relay,l)}},u),f={addReducers(e){u.containsAll(e)||(u.add(e),d.replaceReducer(u.combinedReducer))},dispatch:d.dispatch,subscribe:d.subscribe,enableAnalytics(){d.dispatch(sr())},disableAnalytics(){d.dispatch(st())},get state(){return d.getState()},get relay(){return nM(this.state,l)},get navigatorContext(){return gF(this.relay,l)},logger:c,store:d};return f}({...e,reducers:r},t,ce),{accessToken:i,environment:a,organizationId:s}=e.configuration;n.dispatch(a6({accessToken:i,environment:a,organizationId:s}));let o=function(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...i}=r??{},a={...i,...r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl}};return"next"!==a.analyticsMode&&function(){if("u"<typeof navigator||"u"<typeof window)return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(e=>es.has(e))}()?(t.info("Analytics disabled since doNotTrack is active."),{...a,enabled:!1}):a}(e.configuration,n.logger);return o&&n.dispatch(se(o)),n}({...e,reducers:gJ,crossReducer:rh({},e=>{e.addCase(ls,(e,r)=>{let n=gG(e.configuration.accessToken);return n?gQ(n,e,r.payload,t):e}).addCase(sm,(e,r)=>{let n=gG(e.configuration.accessToken);return n?gW(n,e,r.payload,t):e}).addCase(a6,(e,t)=>{if(e.configuration.accessToken!==t.payload.accessToken)return e;let{accessToken:r}=t.payload;if(!r)return e;let n=gG(r);return n?[gY,gH,gK].reduce((e,t)=>t(n,e),e):e}).addCase(a9,(e,r)=>{let n=gG(e.configuration.accessToken);if(!n)return e;let i=gQ(n,e,r.payload.searchHub,t);return gW(n,i,r.payload?.pipeline,t)}).addCase(se,(e,r)=>{var n;let i=gG(e.configuration.accessToken);return i?(n=r.payload.userDisplayName,gz(i,"userDisplayName",e.configuration.analytics.userDisplayName,u6().analytics.userDisplayName,n,t),gK(i,e)):e})})},l),c=function(e){let{search:t}=e,{proxyBaseUrl:r,pipeline:n,searchHub:i,timezone:a,locale:s,authenticationProviders:o}=t??{};return{proxyBaseUrl:r,pipeline:n,searchHub:i,timezone:a,locale:s,authenticationProviders:o}}(r);return c&&u.dispatch(a9(c)),{...u,get state(){return u.state},executeFirstSearch(e=a2()){if(o9(u.state))return;let t=oZ({legacy:e,next:{actionCause:L.interfaceLoad}});u.dispatch(t)},executeFirstSearchAfterStandaloneSearchBoxRedirect(e){let{cause:t,metadata:r}=e;if(o9(u.state))return;let n=r&&"omniboxFromLink"===t,i=oZ({legacy:n?a4(r):a5(),next:n?{actionCause:L.omniboxFromLink}:{actionCause:L.searchFromLink}});u.dispatch(i)}}}let g0={value:eY,numberOfResults:new W({min:0}),state:eY},g1=new W({min:1,default:8,required:!1}),g2={desiredCount:new W({min:1,max:20,default:5,required:!1}),numberOfValues:g1},g3=rs("automaticFacet/setOptions",e=>e2(e,g2)),g5=rs("automaticFacet/deselectAll",e=>e2(e,eY)),g4=rs("automaticFacet/toggleSelectValue",e=>e2(e,{field:eY,selection:new ee({values:g0})})),g8={state:new B({required:!0}),numberOfResults:new W({required:!0,min:0}),value:new J({required:!0,emptyAllowed:!0}),path:new er({required:!0,each:eY}),moreValuesAvailable:new Q({required:!1})},g6={facetId:eY,field:eY,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),activeTab:new J({required:!1}),delimitingCharacter:new J({required:!1,emptyAllowed:!0}),filterFacetCount:new Q({required:!1}),injectionDepth:new W({required:!1,min:0}),numberOfValues:new W({required:!1,min:1}),sortCriteria:new B({required:!1}),basePath:new er({required:!1,each:eY}),filterByBasePath:new Q({required:!1})},g9=rs("categoryFacet/register",e=>e2(e,g6)),g7=rs("categoryFacet/toggleSelectValue",e=>
36{try{return e1(e.facetId,eY),!function e(t){t.children.forEach(t=>{e(t)}),e1({state:t.state,numberOfResults:t.numberOfResults,value:t.value,path:t.path,moreValuesAvailable:t.moreValuesAvailable},g8)}(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:e0(t)}}}),me=rs("categoryFacet/deselectAll",e=>e2(e,g6.facetId)),mt=rs("categoryFacet/updateNumberOfValues",e=>e2(e,{facetId:g6.facetId,numberOfValues:g6.numberOfValues})),mr=rs("categoryFacet/updateSortCriterion",e=>e2(e,{facetId:g6.facetId,criterion:new B})),mn=rs("categoryFacet/updateBasePath",e=>e2(e,{facetId:g6.facetId,basePath:new er({each:eY})})),mi={categoryFacetId:eY,categoryFacetPath:new er({required:!0,each:eY})},ma=e=>aQ("analytics/categoryFacet/breadcrumb",(t,r)=>(e2(e,mi),t.makeBreadcrumbFacet(((e,{categoryFacetId:t,categoryFacetPath:r})=>{let n=e.categoryFacetSet[t],i=n?.request.field,a=`${i}_${t}`;return{categoryFacetId:t,categoryFacetPath:r,categoryFacetField:i,categoryFacetTitle:a}})(r,e)))),ms=rs("facetOptions/update",(e={freezeFacetOrder:!0})=>e2(e,{freezeFacetOrder:new Q({required:!1})})),mo=rs("facetOptions/facet/enable",e=>e2(e,eY)),ml=rs("facetOptions/facet/disable",e=>e2(e,eY)),mu=(e,t)=>"object"==typeof e&&0===Object.keys({...e}).length||!t||!e||!e.excluded?.includes(t)&&(!!(e.included&&(0===e.included.length||e.included.includes(t)))||!!e.excluded&&!e.included),mc={facetId:eY,captions:new ee({options:{required:!1}}),numberOfValues:new W({required:!1,min:1}),query:new J({required:!1,emptyAllowed:!0})},md={path:new er({required:!0,each:eY}),displayValue:eK,rawValue:eK,count:new W({required:!0,min:0})},mf=rs("categoryFacet/selectSearchResult",e=>e2(e,{facetId:eY,value:new ee({values:md})})),mp=rs("categoryFacetSearch/register",e=>e2(e,mc));function mh(e,t){let{facetId:r,criterion:n}=t,i=e[r]?.request;i&&(i.sortCriteria=n)}function mg(e){e&&(e.currentValues=e.currentValues.map(e=>({...e,...{previousState:"idle"!==e.state?e.state:void 0},state:"idle"})),e.preventAutoSelect=!0)}function mm(e,t){e&&(e.numberOfValues=t)}function my(e,t){let r=e[t];r&&(r.request.numberOfValues=r.initialNumberOfValues,r.request.currentValues=[],r.request.preventAutoSelect=!0)}function mv(e,t,r){e.currentValues=function(e,t){if(!e.length)return[];let r=mb(e[0],t),n=r;for(let r of e.splice(1)){let e=mb(r,t);n.children.push(e),n=e}return n.state="selected",n.retrieveChildren=!0,[r]}(t,r),e.numberOfValues=t.length?1:r,e.preventAutoSelect=!0}function mb(e,t){return{value:e,retrieveCount:t,children:[],state:"idle",retrieveChildren:!1}}let mw=rh({},e=>{e.addCase(g9,(e,t)=>{var r;let n=t.payload,{facetId:i,tabs:a}=n;if(i in e)return;let s=(r=n,{...mS,currentValues:[],preventAutoSelect:!1,type:"hierarchical",...r}),o=s.numberOfValues;e[i]={request:s,initialNumberOfValues:o,tabs:a}}).addCase(sg.fulfilled,(e,t)=>t.payload?.categoryFacetSet??e).addCase(so,(e,t)=>{let r=t.payload.cf||{},n=t.payload.tab;Object.keys(e).forEach(t=>{let i=e[t],a=i.request;if((i.tabs?.included?.length||i.tabs?.excluded?.length)&&!mu(i.tabs,n)){a.currentValues.length&&mv(a,[],i.initialNumberOfValues);return}let s=r[t]||[];(s.length||a.currentValues.length)&&mv(a,s,i.initialNumberOfValues)})}).addCase(mr,(e,t)=>{let{facetId:r,criterion:n}=t.payload,i=e[r]?.request;i&&(i.sortCriteria=n)}).addCase(mn,(e,t)=>{let{facetId:r,basePath:n}=t.payload,i=e[r]?.request;i&&(i.basePath=[...n])}).addCase(g7,(e,t)=>{let{facetId:r,selection:n,retrieveCount:i}=t.payload,a=e[r]?.request;if(!a)return;let{path:s}=n,o=function(e,t,r){let n=e.currentValues;for(let e of t){let t=n[0];t&&e===t.value||(t=mE(e,r),n.length=0,n.push(t)),t.retrieveChildren=!1,t.previousState=void 0,t.state="idle",n=t.children}return n}(a,s.slice(0,s.length-1),i);if(o.length){let e=o[0];e.retrieveChildren=!0,e.state="selected",e.previousState="idle",e.children=[];return}let l=mE(n.value,i);l.state="selected",l.previousState="idle",o.push(l),a.numberOfValues=1}).addCase(me,(e,t)=>{my(e,t.payload)}).addCase(sv,e=>{Object.keys(e).forEach(t=>my(e,t))}).addCase(sw,(e,t)=>Object.keys(e).forEach(r=>{e[r].request.preventAutoSelect=!t.payload.allow})).addCase(mt,(e,t)=>{let{facetId:r,numberOfValues:n}=t.payload,i=e[r]?.request;if(i){if(!i.currentValues.length)return mm(i,n);!function(e,t){let{facetId:r,numberOfValues:n}=t,i=e[r]?.request.currentValues[0];if(i){for(;i.children.length&&i?.state!=="selected";)i=i.children[0];i.retrieveCount=n}}(e,t.payload)}}).addCase(mf,(e,t)=>{let{facetId:r,value:n}=t.payload,i=e[r];if(!i)return;let a=[...n.path,n.rawValue];mv(i.request,a,i.initialNumberOfValues)}).addCase(o0.fulfilled,(e,t)=>{m_(e,t.payload.response.facets)}).addCase(oZ.fulfilled,(e,t)=>{m_(e,t.payload.response.facets)}).addCase(ml,(e,t)=>{my(e,t.payload)}).addCase(u5,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!mu(n.tabs,r)&&my(e,t)})})}),mS={delimitingCharacter:";",filterFacetCount:!0,injectionDepth:1e3,numberOfValues:5,sortCriteria:"occurrences",basePath:[],filterByBasePath:!0,resultsMustMatch:"atLeastOneValue"};function mE(e,t){return{value:e,state:"idle",children:[],retrieveChildren:!0,retrieveCount:t}}function m_(e,t){t.forEach(t=>{var r,n,i;let a,s;if(r=e,!(t.facetId in r))return;let o=t.facetId,l=e[o]?.request;if(!l)return;let u=(n=l,i=t,a=ab(n.currentValues),s=ab(i.values),a.length!==s.length);l.currentValues=u?[]:l.currentValues,l.preventAutoSelect=!1})}let mC=new J({regex:/^[a-zA-Z0-9-_]+$/}),mO=new J({required:!0}),mk=new er({each:new J}),mI=new J,mA=new Q,mT=new Q,mx=new W({min:0}),mR=new W({min:1}),mN=new Q({required:!0}),mj=new ee,mP=new ee({values:{captions:mj,numberOfValues:mR,query:new J}}),mD=new ee({options:{required:!1},values:{type:new J({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new er({required:!0,max:25,each:new J({emptyAllowed:!1,required:!0})})}}),mM=new Q,mL=new er({min:1,max:25,required:!1,each:new J({emptyAllowed:!1,required:!0})}),mF={facetId:eY,field:new J({required:!0,emptyAllowed:!0}),tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),activeTab:new J({required:!1}),filterFacetCount:new Q({required:!1}),injectionDepth:new W({required:!1,min:0}),numberOfValues:new W({required:!1,min:1}),sortCriteria:new B({required:!1}),resultsMustMatch:new B({required:!1}),allowedValues:mD,customSort:mL},mq=rs("facet/register",e=>e2(e,mF)),mU=rs("facet/toggleSelectValue",e=>e2(e,{facetId:eY,selection:new ee({values:g0})})),m$=rs("facet/toggleExcludeValue",e=>e2(e,{facetId:eY,selection:new ee({values:g0})})),mV=rs("facet/deselectAll",e=>e2(e,eY)),mz=rs("facet/updateSortCriterion",e=>e2(e,{facetId:eY,criterion:new B({required:!0})})),mB=rs("facet/updateNumberOfValues",e=>e2(e,{facetId:eY,numberOfValues:new W({required:!0,min:1})}
36)),mG=rs("facet/updateIsFieldExpanded",e=>e2(e,{facetId:eY,isFieldExpanded:new Q({required:!0})})),mH=rs("facet/updateFreezeCurrentValues",e=>e2(e,{facetId:eY,freezeCurrentValues:new Q({required:!0})})),mQ=e=>aQ("analytics/facet/showMore",(t,r)=>{e2(e,eY);let n=aS(e,a_(r));return t.makeFacetShowMore(n)}),mY=e=>aQ("analytics/facet/showLess",(t,r)=>{e2(e,eY);let n=aS(e,a_(r));return t.makeFacetShowLess(n)}),mW=e=>aQ("analytics/facet/sortChange",(t,r)=>{e2(e,{facetId:eY,criterion:new B({required:!0})});let{facetId:n,criterion:i}=e,a={...aS(n,a_(r)),criteria:i};return t.makeFacetUpdateSort(a)}),mK=e=>aQ("analytics/facet/reset",(t,r)=>{e2(e,eY);let n=aS(e,a_(r));return t.makeFacetClearAll(n)}),mZ=e=>aQ("analytics/facet/select",(t,r)=>{e2(e,{facetId:eY,facetValue:eY});let n=aE(e,a_(r));return t.makeFacetSelect(n)}),mJ=e=>aQ("analytics/facet/exclude",(t,r)=>{e2(e,{facetId:eY,facetValue:eY});let n=aE(e,a_(r));return t.makeFacetExclude(n)}),mX=e=>aQ("analytics/facet/deselect",(t,r)=>{e2(e,{facetId:eY,facetValue:eY});let n=aE(e,a_(r));return t.makeFacetDeselect(n)}),m0=e=>aQ("analytics/facet/unexclude",(t,r)=>{e2(e,{facetId:eY,facetValue:eY});let n=aE(e,a_(r));return t.makeFacetUnexclude(n)}),m1=e=>aQ("analytics/facet/breadcrumb",(t,r)=>{e2(e,{facetId:eY,facetValue:eY});let n=aE(e,a_(r));return t.makeBreadcrumbFacet(n)}),m2=()=>({actionCause:L.facetClearAll}),m3=()=>({actionCause:L.facetSelect}),m5=()=>({actionCause:L.facetExclude}),m4=()=>({actionCause:L.facetDeselect}),m8=()=>({actionCause:L.breadcrumbFacet}),m6={facetId:eY,value:new ee({values:{displayValue:eK,rawValue:eK,count:new W({required:!0,min:0})}})},m9=rs("facetSearch/register",e=>e2(e,mc)),m7=rs("facetSearch/update",e=>e2(e,mc)),ye=rs("facetSearch/toggleSelectValue",e=>e2(e,m6)),yt=rs("facetSearch/toggleExcludeValue",e=>e2(e,m6)),yr=rh({},e=>{e.addCase(mq,(e,t)=>{let{facetId:r,tabs:n}=t.payload;if(!(r in e)){var i;e[r]=(i=t.payload,{request:{...ya,type:"specific",currentValues:[],freezeCurrentValues:!1,isFieldExpanded:!1,preventAutoSelect:!1,...i},hasBreadcrumbs:!0,tabs:n})}}).addCase(sg.fulfilled,(e,t)=>{if(t.payload&&0!==Object.keys(t.payload.facetSet).length)return t.payload.facetSet}).addCase(so,(e,t)=>{let r=t.payload.f||{},n=t.payload.fExcluded||{};Object.keys(e).forEach(t=>{let{request:i}=e[t],a=r[t]||[],s=n[t]||[],o=a.length+s.length,l=i.currentValues.filter(e=>!a.includes(e.value)&&!s.includes(e.value));i.currentValues=[...a.map(yo),...s.map(yl),...l.map(yu)],i.preventAutoSelect=o>0,i.numberOfValues=Math.max(o,i.numberOfValues)})}).addCase(mU,(e,t)=>{let{facetId:r,selection:n}=t.payload,i=e[r]?.request;if(!i)return;i.preventAutoSelect=!0;let a=i.currentValues.find(e=>e.value===n.value);if(!a)return void yn(i,n);let s="selected"===a.state;a.previousState=a.state,a.state=s?"idle":"selected",i.freezeCurrentValues=!0}).addCase(m$,(e,t)=>{let{facetId:r,selection:n}=t.payload,i=e[r]?.request;if(!i)return;i.preventAutoSelect=!0;let a=i.currentValues.find(e=>e.value===n.value);if(!a)return void yn(i,n);let s="excluded"===a.state;a.previousState=a.state,a.state=s?"idle":"excluded",i.freezeCurrentValues=!0}).addCase(mH,(e,t)=>{let{facetId:r,freezeCurrentValues:n}=t.payload,i=e[r]?.request;i&&(i.freezeCurrentValues=n)}).addCase(mV,(e,t)=>{mg(e[t.payload]?.request)}).addCase(sv,e=>{Object.values(e).filter(e=>e.hasBreadcrumbs).forEach(({request:e})=>mg(e))}).addCase(sb,e=>{Object.values(e).filter(e=>!e.hasBreadcrumbs).forEach(({request:e})=>mg(e))}).addCase(sw,(e,t)=>Object.values(e).forEach(e=>{e.request.preventAutoSelect=!t.payload.allow})).addCase(mz,(e,t)=>{mh(e,t.payload)}).addCase(mB,(e,t)=>{let{facetId:r,numberOfValues:n}=t.payload;mm(e[r]?.request,n)}).addCase(mG,(e,t)=>{let{facetId:r,isFieldExpanded:n}=t.payload,i=e[r]?.request;i&&(i.isFieldExpanded=n)}).addCase(oZ.fulfilled,(e,t)=>{t.payload.response.facets.forEach(t=>yi(e[t.facetId]?.request,t))}).addCase(o0.fulfilled,(e,t)=>{t.payload.response.facets.forEach(t=>yi(e[t.facetId]?.request,t))}).addCase(ye,(e,t)=>{let{facetId:r,value:n}=t.payload,i=e[r]?.request;if(!i)return;let{rawValue:a}=n,{currentValues:s}=i,o=s.find(e=>e.value===a);if(o){o.state="selected";return}yn(i,yo(a)),i.freezeCurrentValues=!0,i.preventAutoSelect=!0}).addCase(yt,(e,t)=>{let{facetId:r,value:n}=t.payload,i=e[r]?.request;if(!i)return;let{rawValue:a}=n,{currentValues:s}=i,o=s.find(e=>e.value===a);if(o){o.state="excluded";return}yn(i,yl(a)),i.freezeCurrentValues=!0,i.preventAutoSelect=!0}).addCase(ml,(e,t)=>{if(!(t.payload in e))return;let{request:r}=e[t.payload];mg(r)}).addCase(u5,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!mu(n.tabs,r)&&mg(n.request)})})});function yn(e,t){let{currentValues:r}=e,n=r.findIndex(e=>"idle"===e.state),i=-1===n?r.length:n;e.currentValues.splice(i,0,t),n>-1&&e.currentValues.pop(),e.numberOfValues=e.currentValues.length}function yi(e,t){e&&(e.currentValues=t.values.map(ys),e.freezeCurrentValues=!1,e.preventAutoSelect=!1)}let ya={filterFacetCount:!0,injectionDepth:1e3,numberOfValues:8,sortCriteria:"automatic",resultsMustMatch:"atLeastOneValue"};function ys(e){let{value:t,state:r}=e;return{value:t,state:r}}function yo(e){return{value:e,state:"selected"}}function yl(e){return{value:e,state:"excluded"}}function yu(e){return{...e,state:"idle"}}let yc=()=>aQ("analytics/facet/deselectAllBreadcrumbs",e=>e.makeBreadcrumbResetAll());function yd(e){let t=yf(e.start,e),r=yf(e.end,e);return{start:t,end:r,endInclusive:e.endInclusive??!1,state:e.state??"idle"}}function yf(e,t){let{dateFormat:r}=t;return e&&"object"==typeof e&&"period"in e?(sJ(e),function(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}(e)):"string"==typeof e&&s2(e)?(sJ(e),e):(sY(e,r),sQ(sH(e,r)))}let yp=rs("rangeFacet/updateSortCriterion",e=>e2(e,{facetId:eY,criterion:new B({required:!0})})),yh={state:eY,start:new W({required:!0}),end:new W({required:!0}
36),endInclusive:new Q({required:!0}),numberOfResults:new W({required:!0,min:0})},yg={start:eY,end:eY,endInclusive:new Q({required:!0}),state:eY,numberOfResults:new W({required:!0,min:0})},ym=e=>({facetId:eY,selection:new ee("string"==typeof e.start?{values:yg}:{values:yh})}),yy={start:eY,end:eY,endInclusive:new Q({required:!0}),state:eY},yv={facetId:eY,field:eY,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),activeTab:new J({required:!1}),currentValues:new er({required:!1,each:new ee({values:yy})}),generateAutomaticRanges:new Q({required:!0}),filterFacetCount:new Q({required:!1}),injectionDepth:new W({required:!1,min:0}),numberOfValues:new W({required:!1,min:1}),sortCriteria:new B({required:!1}),rangeAlgorithm:new B({required:!1})};function yb(e){e.currentValues&&e.currentValues.forEach(e=>{let{start:t,end:r}=yd(e);if(sH(s2(t)?s0(t):t).isAfter(sH(s2(r)?s0(r):r)))throw Error(`The start value is greater than the end value for the date range ${e.start} to ${e.end}`)})}let yw=rs("dateFacet/register",e=>{try{return e1(e,yv),yb(e),{payload:e,error:null}}catch(t){return{payload:e,error:e0(t)}}}),yS=rs("dateFacet/toggleSelectValue",e=>e2(e,{facetId:eY,selection:new ee({values:yg})})),yE=rs("dateFacet/toggleExcludeValue",e=>e2(e,{facetId:eY,selection:new ee({values:yg})})),y_=rs("dateFacet/updateFacetValues",e=>{try{return e1(e,{facetId:eY,values:new er({each:new ee({values:yg})})}),yb({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:e0(t)}}}),yC=(e,{facetId:t,selection:r})=>{let n=(e.dateFacetSet[t]||e.numericFacetSet[t]).request.field,i=`${n}_${t}`;return{facetId:t,facetField:n,facetTitle:i,facetRangeEndInclusive:r.endInclusive,facetRangeEnd:`${r.end}`,facetRangeStart:`${r.start}`}},yO=()=>({actionCause:L.breadcrumbFacet}),yk=e=>aQ("analytics/dateFacet/breadcrumb",(t,r)=>{e2(e,ym(e.selection));let n=yC(r,e);return t.makeBreadcrumbFacet(n)}),yI=(e,t)=>(((e,t)=>{let r=am(e,t);if(r&&r.facetId in e.dateFacetSet)return r})(e,t)||{values:[]}).values.filter(e=>"idle"!==e.state),yA={filterFacetCount:!0,injectionDepth:1e3,numberOfValues:8,sortCriteria:"ascending",rangeAlgorithm:"even",resultsMustMatch:"atLeastOneValue"};function yT(e,t){let{request:r}=t,{facetId:n}=r;if(n in e)return;let i=yL(r);r.numberOfValues=i,e[n]=t}function yx(e,t,r){let n=e[t]?.request;n&&(n.currentValues=r,n.numberOfValues=yL(n))}function yR(e,t,r){let n=e[t]?.request;if(!n)return;let i=yM(n.currentValues,r);if(!i)return;let a="selected"===i.state;i.previousState=i.state,i.state=a?"idle":"selected",n.preventAutoSelect=!0}function yN(e,t,r){let n=e[t]?.request;if(!n)return;let i=yM(n.currentValues,r);if(!i)return;let a="excluded"===i.state;i.previousState=i.state,i.state=a?"idle":"excluded",n.preventAutoSelect=!0}function yj(e,t){let r=e[t]?.request;r&&r.currentValues.forEach(e=>{"idle"!==e.state&&(e.previousState=e.state),e.state="idle"})}function yP(e,t){Object.entries(e).forEach(([e,{request:r}])=>{let n=t[e]||[];r.currentValues.forEach(e=>(yM(n,e)&&(e.state="selected"),e));let i=n.filter(e=>!yM(r.currentValues,e)),a=r.currentValues;a.push(...i),r.numberOfValues=Math.max(r.numberOfValues,a.length)})}function yD(e,t,r){t.forEach(t=>{let n=t.facetId,i=e[n]?.request;i&&(i.currentValues=r(t.values),i.preventAutoSelect=!1)})}function yM(e,t){let{start:r,end:n}=t;return e.find(e=>e.start===r&&e.end===n)}function yL(e){let{generateAutomaticRanges:t,currentValues:r,numberOfValues:n}=e;return t?Math.max(n,r.length):r.length}let yF=rh({},e=>{e.addCase(yw,(e,t)=>{var r;let{payload:n}=t,{tabs:i}=n;yT(e,(r=n,{request:{...yA,currentValues:[],preventAutoSelect:!1,type:"dateRange",...r},tabs:i}))}).addCase(sg.fulfilled,(e,t)=>t.payload?.dateFacetSet??e).addCase(so,(e,t)=>{yP(e,t.payload.df||{})}).addCase(yS,(e,t)=>{let{facetId:r,selection:n}=t.payload;yR(e,r,n)}).addCase(yE,(e,t)=>{let{facetId:r,selection:n}=t.payload;yN(e,r,n)}).addCase(y_,(e,t)=>{let{facetId:r,values:n}=t.payload;yx(e,r,n)}).addCase(mV,(e,t)=>{yj(e,t.payload)}).addCase(sv,e=>{Object.keys(e).forEach(t=>{yj(e,t)})}).addCase(yp,(e,t)=>{mh(e,t.payload)}).addCase(oZ.fulfilled,(e,t)=>{yD(e,t.payload.response.facets,yq)}).addCase(ml,(e,t)=>{yj(e,t.payload)}).addCase(u5,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!mu(n.tabs,r)&&yj(e,t)})})});function yq(e){return e.map(e=>{let{numberOfResults:t,...r}=e;return r})}let yU={state:eY,start:new W({required:!0}),end:new W({required:!0}
36),endInclusive:new Q({required:!0})},y$={facetId:eY,field:eY,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),activeTab:new J({required:!1}),currentValues:new er({required:!1,each:new ee({values:yU})}),generateAutomaticRanges:new Q({required:!0}),filterFacetCount:new Q({required:!1}),injectionDepth:new W({required:!1,min:0}),numberOfValues:new W({required:!1,min:1}),sortCriteria:new B({required:!1}),rangeAlgorithm:new B({required:!1})};function yV(e){e.currentValues&&e.currentValues.forEach(({start:e,end:t})=>{if(e>t)throw Error(`The start value is greater than the end value for the numeric range ${e} to ${t}`)})}let yz=rs("numericFacet/register",e=>{try{return e2(e,y$),yV(e),{payload:e,error:null}}catch(t){return{payload:e,error:e0(t)}}}),yB=rs("numericFacet/toggleSelectValue",e=>e2(e,{facetId:eY,selection:new ee({values:yh})})),yG=rs("numericFacet/toggleExcludeValue",e=>e2(e,{facetId:eY,selection:new ee({values:yh})})),yH=rs("numericFacet/updateFacetValues",e=>{try{return e1(e,{facetId:eY,values:new er({each:new ee({values:yh})})}),yV({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:e0(t)}}}),yQ=e=>aQ("analytics/numericFacet/breadcrumb",(t,r)=>{e2(e,ym(e.selection));let n=yC(r,e);return t.makeBreadcrumbFacet(n)}),yY=(e,t)=>(((e,t)=>{let r=am(e,t);if(r&&r.facetId in e.numericFacetSet)return r})(e,t)||{values:[]}).values.filter(e=>"idle"!==e.state),yW=rh({},e=>{e.addCase(yz,(e,t)=>{var r;let{payload:n}=t,{tabs:i}=n;yT(e,(r=n,{request:{...yA,currentValues:[],preventAutoSelect:!1,type:"numericalRange",...r},tabs:i}))}).addCase(sg.fulfilled,(e,t)=>t.payload?.numericFacetSet??e).addCase(so,(e,t)=>{yP(e,t.payload.nf||{})}).addCase(yB,(e,t)=>{let{facetId:r,selection:n}=t.payload;yR(e,r,n)}).addCase(yG,(e,t)=>{let{facetId:r,selection:n}=t.payload;yN(e,r,n)}).addCase(yH,(e,t)=>{let{facetId:r,values:n}=t.payload;yx(e,r,n)}).addCase(mV,(e,t)=>{yj(e,t.payload)}).addCase(sv,e=>{Object.keys(e).forEach(t=>{yj(e,t)})}).addCase(yp,(e,t)=>{mh(e,t.payload)}).addCase(oZ.fulfilled,(e,t)=>{yD(e,t.payload.response.facets,yK)}).addCase(ml,(e,t)=>{yj(e,t.payload)}).addCase(u5,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!mu(n.tabs,r)&&yj(e,t)})})});function yK(e){return e.map(e=>{let{numberOfResults:t,...r}=e;return r})}let yZ=new ee({options:{required:!0},values:{caption:eK,expression:eK,state:new J({constrainTo:["idle","selected","excluded"]})}}),yJ=new er({required:!0,each:yZ}),yX=rs("staticFilter/register",e=>e2(e,{id:eY,values:yJ})),y0=rs("staticFilter/toggleSelect",e=>e2(e,{id:eY,value:yZ})),y1=rs("staticFilter/toggleExclude",e=>e2(e,{id:eY,value:yZ})),y2=rs("staticFilter/deselectAllFilterValues",e=>e2(e,eY)),y3=e=>aQ("analytics/staticFilter/select",t=>t.makeStaticFilterSelect(e)),y5=e=>aQ("analytics/staticFilter/deselect",t=>t.makeStaticFilterDeselect(e)),y4=e=>aQ("analytics/staticFilter/clearAll",t=>t.makeStaticFilterClearAll(e));function y8(e){let t,r=new Map;return{subscribe(n){let i;n();let a=Symbol();return 0===r.size&&(t=JSON.stringify(this.state),i=e.subscribe(()=>{(e=>{try{let r=JSON.stringify(e),n=t!==r;return t=r,n}catch(e){return console.warn('Could not detect if state has changed, check the controller "get state method"',e),!0}})(this.state)&&r.forEach(e=>e())})),r.set(a,n),()=>{r.delete(a),0===r.size&&i?.()}},get state(){return{}}}}let y6=e=>Object.keys(e.facetSet).map(t=>{let r=e.facetValuesSelector(e.engine.state,t).map(r=>({value:r,deselect:()=>{"selected"===r.state?e.executeToggleSelect({facetId:t,selection:r}):"excluded"===r.state&&e.executeToggleExclude({facetId:t,selection:r})}}));return{facetId:t,field:e.facetSet[t].request.field,values:r}}).filter(e=>e.values.length);function y9(e){e.addReducers({configuration:ce,search:la,facetSet:yr,numericFacetSet:yW,dateFacetSet:yF,categoryFacetSet:mw}),!1;let t=function(e){let t=y8(e),{dispatch:r}=e;return{...t,get state(){return{facetBreadcrumbs:[],categoryFacetBreadcrumbs:[],numericFacetBreadcrumbs:[],dateFacetBreadcrumbs:[],staticFilterBreadcrumbs:[],hasBreadcrumbs:!1}},deselectAll:()=>{r(sv())}
36,deselectBreadcrumb(e){e.deselect()}}}(e),{dispatch:r}=e,n=()=>y6({engine:e,facetSet:e.state.facetSet,executeToggleSelect:({facetId:e,selection:t})=>{r(mU({facetId:e,selection:t})),r(mH({facetId:e,freezeCurrentValues:!1})),r(oZ({legacy:m1({facetId:e,facetValue:t.value}),next:m8()}))},executeToggleExclude:({facetId:e,selection:t})=>{r(m$({facetId:e,selection:t})),r(mH({facetId:e,freezeCurrentValues:!1})),r(oZ({legacy:m1({facetId:e,facetValue:t.value}),next:m8()}))},facetValuesSelector:av}),i=()=>y6({engine:e,facetSet:e.state.numericFacetSet,executeToggleSelect:e=>{r(yB(e)),r(oZ({legacy:yQ(e),next:yO()}))},executeToggleExclude:e=>{r(yG(e)),r(oZ({legacy:yQ(e),next:yO()}))},facetValuesSelector:yY}),a=()=>y6({engine:e,facetSet:e.state.dateFacetSet,executeToggleSelect:e=>{r(yS(e)),r(oZ({legacy:yk(e),next:yO()}))},executeToggleExclude:e=>{r(yE(e)),r(oZ({legacy:yk(e),next:yO()}))},facetValuesSelector:yI}),s=()=>Object.keys(e.state.categoryFacetSet).map(o).filter(e=>e.path.length),o=t=>{let n,i=(n=((e,t)=>{let r=am(e,t);if(r&&r.facetId in e.categoryFacetSet)return r})(e.state,t),ab(n?.values??[]));return{facetId:t,field:e.state.categoryFacetSet[t].request.field,path:i,deselect:()=>{r(me(t)),r(oZ({legacy:ma({categoryFacetPath:i.map(e=>e.value),categoryFacetId:t}),next:{actionCause:L.breadcrumbFacet}}))}}},l=()=>Object.values(e.state.staticFilterSet??{}).map(u),u=e=>{let{id:t,values:r}=e,n=r.filter(e=>"idle"!==e.state).map(e=>c(t,e));return{id:t,values:n}},c=(e,t)=>({value:t,deselect:()=>{let{caption:n,expression:i}=t;"selected"===t.state?r(y0({id:e,value:t})):"excluded"===t.state&&r(y1({id:e,value:t})),r(oZ({legacy:y5({staticFilterId:e,staticFilterValue:{caption:n,expression:i}})}))}}),d=()=>Object.values(e.state.automaticFacetSet?.set??{}).map(e=>f(e.response)).filter(e=>e.values.length>0),f=e=>{let{field:t,label:r}=e,n=e.values.filter(e=>"idle"!==e.state).map(e=>p(t,e));return{facetId:t,field:t,label:r,values:n}},p=(e,t)=>({value:t,deselect:()=>{r(g4({field:e,selection:t})),r(oZ({legacy:m1({facetId:e,facetValue:t.value}),next:m8()}))}});return{...t,get state(){return{facetBreadcrumbs:n(),categoryFacetBreadcrumbs:s(),numericFacetBreadcrumbs:i(),dateFacetBreadcrumbs:a(),staticFilterBreadcrumbs:l(),automaticFacetBreadcrumbs:d(),hasBreadcrumbs:!![...n(),...i(),...a(),...s(),...l(),...d()].length}},deselectAll:()=>{t.deselectAll(),r(oZ({legacy:yc(),next:{actionCause:L.breadcrumbResetAll}}))}}}let y7=new er({each:eY,required:!0}),ve=(e,t)=>(e2(e,eY),X(t)?e2(t,eY):e2(t,y7),{payload:{contextKey:e,contextValue:t}}),vt=rs("context/set",e=>{for(let[t,r]of Object.entries(e))ve(t,r);return{payload:e}}),vr=rs("context/add",e=>ve(e.contextKey,e.contextValue)),vn=rs("context/remove",e=>e2(e,eY)),vi=rh(os(),e=>{e.addCase(vt,(e,t)=>{e.contextValues=t.payload}).addCase(vr,(e,t)=>{e.contextValues[t.payload.contextKey]=t.payload.contextValue}).addCase(vn,(e,t)=>{delete e.contextValues[t.payload]}).addCase(sg.fulfilled,(e,t)=>{t.payload&&(e.contextValues=t.payload.context.contextValues)})}),va=["caseId","caseNumber"],vs={caseId:"caseContext",caseNumber:"caseContext"};
36class vo extends Error{constructor(e){super(`The key "${e}" is reserved for internal use. Use ${vs[e]} to set this value.}`)}}function vl(e){return va.includes(e)}let vu=new z({values:new ee({options:{required:!1}})});function vc(e,t){return function(e,t={}){let r,n;e.addReducers({context:vi}),!1;let i=y8(e),{dispatch:a}=e,s=e3(e,vu,t.initialState,"buildContext");return s.values&&a(vt(s.values)),{...i,get state(){return{values:e.state.context.contextValues}},set(e){a(vt(e))},..."legacy"===e.state.configuration.analytics.analyticsMode?(r=a,{add(e,t){r(vr({contextKey:e,contextValue:t}))},remove(e){r(vn(e))}}):(n=a,{add(e,t){if(vl(e))throw new vo(e);n(vr({contextKey:e,contextValue:t}))},remove(e){if(vl(e))throw new vo(e);n(vn(e))}})}}(e,t)}let vd=rh(ou(),e=>{e.addCase(ms,(e,t)=>({...e,...t.payload})).addCase(oZ.fulfilled,e=>{e.freezeFacetOrder=!1}).addCase(oZ.rejected,e=>{e.freezeFacetOrder=!1}).addCase(sg.fulfilled,(e,t)=>t.payload?.facetOptions??e).addCase(g9,(e,t)=>{let{facetId:r,tabs:n}=t.payload;vf(n,e,r)}).addCase(mq,(e,t)=>{let{facetId:r,tabs:n}=t.payload;vf(n,e,r)}).addCase(yw,(e,t)=>{let{facetId:r,tabs:n}=t.payload;vf(n,e,r)}).addCase(yz,(e,t)=>{let{facetId:r,tabs:n}=t.payload;vf(n,e,r)}).addCase(mo,(e,t)=>{e.facets[t.payload].enabled=!0}).addCase(ml,(e,t)=>{e.facets[t.payload].enabled=!1}).addCase(so,(e,t)=>{[...Object.keys(t.payload.f??{}),...Object.keys(t.payload.fExcluded??{}),...Object.keys(t.payload.cf??{}),...Object.keys(t.payload.nf??{}),...Object.keys(t.payload.df??{})].forEach(t=>{t in e||(e.facets[t]=ol()),e.facets[t].enabled=!0})})});function vf(e,t,r){let n={...ol(),tabs:e??{}};t.facets[r]=n}function vp(e,t){t in e&&Object.keys(e).forEach(r=>{e[r].isActive=r===t})}rh({},e=>{e.addCase(u3,(e,t)=>{let r=t.payload,{id:n}=r;n in e||(e[n]={...r,isActive:!1})}).addCase(u5,(e,t)=>{vp(e,t.payload)}).addCase(sl,(e,t)=>{vp(e,t.payload)}).addCase(sg.fulfilled,(e,t)=>t.payload?.tabSet??e).addCase(so,(e,t)=>{let r=t.payload.tab;H(r)||Object.keys(e).forEach(t=>{e[t].isActive=t===r})})});let vh=rs("dictionaryFieldContext/set",e=>{let t=e2(e,new ee({options:{required:!0}})).error;if(t)return{payload:e,error:t};let r=e2(Object.values(e),new er({each:eK})).error;return r?{payload:e,error:r}:{payload:e}}),vg=rs("dictionaryFieldContext/add",e=>e2(e,new ee({options:{required:!0},values:{field:eK,key:eK}}))),vm=rs("dictionaryFieldContext/remove",e=>e2(e,eK));rh(oo(),e=>{e.addCase(vh,(e,t)=>{e.contextValues=t.payload}).addCase(vg,(e,t)=>{let{field:r,key:n}=t.payload;e.contextValues[r]=n}).addCase(vm,(e,t)=>{delete e.contextValues[t.payload]}).addCase(sg.fulfilled,(e,t)=>{t.payload&&(e.contextValues=t.payload.dictionaryFieldContext.contextValues)})});let vy=()=>({correctedQuery:"",wordCorrections:[],originalQuery:""});function vv(e){return{value:e,state:"selected",numberOfResults:0}}rh({enableDidYouMean:!1,wasCorrectedTo:"",wasAutomaticallyCorrected:!1,queryCorrection:vy(),originalQuery:"",automaticallyCorrectQuery:!0,queryCorrectionMode:"legacy"},e=>{e.addCase(s9,e=>{e.enableDidYouMean=!0}).addCase(s7,e=>{e.enableDidYouMean=!1}).addCase(ot,e=>{e.automaticallyCorrectQuery=!0}).addCase(oe,e=>{e.automaticallyCorrectQuery=!1}).addCase(oZ.pending,e=>{e.queryCorrection=vy(),e.wasAutomaticallyCorrected=!1,e.wasCorrectedTo=""}).addCase(oZ.fulfilled,(e,t)=>{let r,{queryCorrection:n,queryCorrections:i}=t.payload.response;"legacy"===e.queryCorrectionMode&&(e.queryCorrection=i?.[0]?i[0]:vy()),"next"===e.queryCorrectionMode&&(e.queryCorrection=r={...{correctedQuery:"",corrections:[],originalQuery:""},...n,correctedQuery:n?.correctedQuery||n?.corrections[0]?.correctedQuery||""},e.wasCorrectedTo=r.correctedQuery),e.wasAutomaticallyCorrected=t.payload.automaticallyCorrected,e.originalQuery=t.payload.originalQuery}).addCase(or,(e,t)=>{e.wasCorrectedTo=t.payload}).addCase(on,(e,t)=>{e.queryCorrectionMode=t.payload})}),rh(ag(),e=>{e.addCase(oZ.fulfilled,(e,t)=>{e.set={};let r=t.payload.response.generateAutomaticFacets?.facets;r?.forEach(t=>{e.set[t.field]={response:t}})}).addCase(g3,(e,t)=>{t.payload.desiredCount&&(e.desiredCount=t.payload.desiredCount),t.payload.numberOfValues&&(e.numberOfValues=t.payload.numberOfValues)}).addCase(g4,(e,t)=>{let{field:r,selection:n}=t.payload,i=e.set[r]?.response;if(!i)return;let a=i.values.find(e=>e.value===n.value);if(!a)return;let s="selected"===a.state;a.state=s?"idle":"selected"}).addCase(g5,(e,t)=>{let r=t.payload,n=e.set[r]?.response;if(n)for(let e of n.values)e.state="idle"}).addCase(so,(e,t)=>{let r=t.payload.af??{},n=Object.keys(e.set);for(let t in r)if(!e.set[t]){let n={field:t,values:[],moreValuesAvailable:!1,label:"",indexScore:0},i=r[t].map(e=>vv(e));n.values.push(...i),e.set[t]={response:n}}for(let t of n)if(!(t in r))for(let r of(e.set[t]?.response).values)r.state="idle";for(let t in r){let n=e.set[t]?.response;if(n){let e=n.values,i=new Set(r[t]);for(let t of e)i.has(t.value)?(t.state="selected",i.delete(t.value)):t.state="idle";for(let e of i)n.values.push(vv(e))}}}).addCase(sg.fulfilled,(e,t)=>{if(t.payload&&0!==Object.keys(t.payload.automaticFacetSet.set).length)return t.payload.automaticFacetSet}).addCase(sv,e=>{Object.values(e.set).forEach(({response:e})=>
36{e.values.forEach(e=>{e.state="idle"})})})});let vb=e=>"selected"===e.state,vw=e=>"excluded"===e.state;function vS(e,t,r){let{facetId:n}=t;if(e[n])return;let i={...vA,...t},a=r();e[n]={options:i,isLoading:!1,response:a,initialNumberOfValues:i.numberOfValues,requestId:""}}function vE(e,t){let{facetId:r,...n}=t,i=e[r];i&&(i.options={...i.options,...n})}function v_(e,t,r){let n=e[t];n&&(n.requestId=r,n.isLoading=!0)}function vC(e,t){let r=e[t];r&&(r.isLoading=!1)}function vO(e,t,r){let{facetId:n,response:i}=t,a=e[n];a&&a.requestId===r&&(a.isLoading=!1,a.response=i)}function vk(e,t,r){let{facetId:n}=t,i=e[n];i&&(i.requestId="",i.isLoading=!1,i.response=r(),i.options.numberOfValues=i.initialNumberOfValues,i.options.query=vA.query)}function vI(e,t){Object.keys(e).forEach(r=>vk(e,{facetId:r},t))}let vA={captions:{},numberOfValues:10,query:""},vT=async(e,t,r,n)=>{let i=t.categoryFacetSearchSet[e].options,a=t.categoryFacetSet[e].request,{captions:s,query:o,numberOfValues:l}=i,{field:u,delimitingCharacter:c,basePath:d,filterFacetCount:f}=a,p=vx(a),h=p.length?[p]:[],g=`*${o}*`;return{url:t.configuration.search.apiBaseUrl??eL(t.configuration.organizationId,t.configuration.environment),accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,...t.configuration.search.authenticationProviders.length&&{authentication:t.configuration.search.authenticationProviders.join(",")},basePath:d,captions:s,numberOfValues:l,query:g,field:u,delimitingCharacter:c,ignorePaths:h,filterFacetCount:f,type:"hierarchical",...n?{}:{searchContext:(await oz(t,r)).request}}},vx=e=>{let t=[],r=e.currentValues[0];for(;r;)t.push(r.value),r=r.children[0];return t},vR=async(e,t,r,n)=>{let{captions:i,query:a,numberOfValues:s}=t.facetSearchSet[e].options,{field:o,currentValues:l,filterFacetCount:u}=t.facetSet[e].request,c=l.filter(e=>"idle"!==e.state).map(e=>e.value),d=`*${a}*`;return{url:t.configuration.search.apiBaseUrl??eL(t.configuration.organizationId,t.configuration.environment),accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,...t.configuration.search.authenticationProviders&&{authentication:t.configuration.search.authenticationProviders.join(",")},captions:i,numberOfValues:s,query:d,field:o,ignoreValues:c,filterFacetCount:u,type:"specific",...n?{}:{searchContext:(await oz(t,r)).request}}},vN=e=>async(t,{getState:r,extra:{apiClient:n,validatePayload:i,navigatorContext:a}})=>{let s,o=r();return i(t,eY),s=vM(o,t)?await vR(t,o,a,e):await vT(t,o,a,e),{facetId:t,response:await n.facetSearch(s)}},vj=rx("facetSearch/executeSearch",vN(!1)),vP=rx("facetSearch/executeSearch",vN(!0)),vD=rs("facetSearch/clearResults",e=>e2(e,{facetId:eY})),vM=(e,t)=>void 0!==e.facetSearchSet&&void 0!==e.facetSet&&void 0!==e.facetSet[t];function vL(){return{moreValuesAvailable:!1,values:[]}}rh({},e=>{e.addCase(mp,(e,t)=>{vS(e,t.payload,vL)}).addCase(m7,(e,t)=>{vE(e,t.payload)}).addCase(vj.pending,(e,t)=>{v_(e,t.meta.arg,t.meta.requestId)}).addCase(vj.rejected,(e,t)=>{vC(e,t.meta.arg)}).addCase(vj.fulfilled,(e,t)=>{vO(e,t.payload,t.meta.requestId)}).addCase(vD,(e,{payload:{facetId:t}})=>{vk(e,{facetId:t},vL)}).addCase(oZ.fulfilled,e=>{vI(e,vL)})}),new z({field:mO,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),basePath:mk,delimitingCharacter:mI,facetId:mC,facetSearch:mP,filterByBasePath:mA,filterFacetCount:mT,injectionDepth:mx,numberOfValues:mR,sortCriteria:new J({constrainTo:["alphanumeric","occurrences"]})});let vF=rh({},e=>{e.addCase(m9,(e,t)=>{vS(e,t.payload,vq)}).addCase(m7,(e,t)=>{vE(e,t.payload)}).addCase(vj.pending,(e,t)=>{v_(e,t.meta.arg,t.meta.requestId)}).addCase(vj.rejected,(e,t)=>{vC(e,t.meta.arg)}).addCase(vj.fulfilled,(e,t)=>{vO(e,t.payload,t.meta.requestId)}).addCase(vD,(e,{payload:t})=>{vk(e,t,vq)}).addCase(oZ.fulfilled,e=>{vI(e,vq)})});function vq(){return{moreValuesAvailable:!1,values:[]}}let vU={facetId:eY,selection:new ee({values:g0})},v$=rx("facet/executeToggleSelect",({facetId:e,selection:t},r)=>{let{dispatch:n,extra:{validatePayload:i}}=r;i({facetId:e,selection:t},vU),n(mU({facetId:e,selection:t})),n(ms())}),vV=rx("facet/executeToggleExclude",({facetId:e,selection:t},r)=>{let{dispatch:n,extra:{validatePayload:i}}=r;i({facetId:e,selection:t},vU),n(m$({facetId:e,selection:t})),n(ms())});function vz(e){let{facetSet:t,numericFacetSet:r,dateFacetSet:n,categoryFacetSet:i}=e;return[t,r,n,i]}let vB=["allValues","atLeastOneValue"],vG=["score","alphanumeric","alphanumericDescending","occurrences","automatic","alphanumericNatural","alphanumericNaturalDesce
36nding"],vH=new z({facetId:mC,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),field:mO,filterFacetCount:mT,injectionDepth:mx,numberOfValues:mR,sortCriteria:new J({constrainTo:vG}),resultsMustMatch:new J({constrainTo:vB}),facetSearch:mP}),vQ=new z({facetId:mC,field:mO,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),filterFacetCount:mT,injectionDepth:mx,numberOfValues:mR,sortCriteria:new J({constrainTo:vG}),resultsMustMatch:new J({constrainTo:vB}),facetSearch:mP,allowedValues:mD,hasBreadcrumbs:mM,customSort:mL});function vY(e,t){e.addReducers({facetSet:yr,configuration:ce,facetSearchSet:vF,search:la}),!1;let{dispatch:r}=e,n=function(e,t,r=vH){e.addReducers({facetSet:yr,facetOptions:vd,configuration:ce,facetSearchSet:vF}),!1;let{dispatch:n}=e,i=y8(e),a=function(e,t){let{state:r,logger:n}=e,{field:i,facetId:a}=t;return a||function(e,t){var r,n,i,a,s;let o,{field:l,state:u}=e;if(!function(e){let{field:t,state:r}=e;return vz(r).some(e=>e&&t in e)}(e))return l;let c=`${l}_`,d=(r=c,n=vz(u).map(e=>Object.keys(e||{})).reduce((e,t)=>e.concat(t),[]),i=r,(n.map(e=>{let t=parseInt(e.split(i)[1],10);return Number.isNaN(t)?0:t}).sort().pop()??0)+1);return a=l,s=t,o=`A facet with field "${a}" already exists.
37  To avoid unexpected behaviour, configure the #id option on the facet controller.`,s.warn(o),`${c}${d}`}({field:i,state:r},n)}(e,t.options),s=t.options.tabs??{},o=ld(e.state.tabSet),l={...ya,...function(e,t){let{[e]:r,...n}=t;return n}("facetSearch",t.options),field:t.options.field,facetId:a,tabs:s,activeTab:o},u={facetSearch:{...vA,...t.options.facetSearch},...l};e5(e,r,u,"buildFacet");let c=()=>{let t;return t=e.state,t.facetSet[a]?.request};return n(mq(l)),{...i,toggleSelect:e=>n(v$({facetId:u.facetId,selection:e})),toggleExclude:e=>n(vV({facetId:u.facetId,selection:e})),toggleSingleSelect:function(e){"idle"===e.state&&n(mV(a)),this.toggleSelect(e)},toggleSingleExclude:function(e){"idle"===e.state&&n(mV(a)),this.toggleExclude(e)},isValueSelected:vb,isValueExcluded:vw,deselectAll(){n(mV(a)),n(ms())},sortBy(e){n(mz({facetId:a,criterion:e})),n(ms())},isSortedBy(e){return this.state.sortCriterion===e},showMoreValues(){let e=c().numberOfValues,t=u.numberOfValues;n(mB({facetId:a,numberOfValues:e+(t-e%t)})),n(mG({facetId:a,isFieldExpanded:!0})),n(ms())},showLessValues(){n(mB({facetId:a,numberOfValues:Math.max(u.numberOfValues,(()=>{let{currentValues:e}=c();return e.filter(e=>"idle"!==e.state).length})())})),n(mG({facetId:a,isFieldExpanded:!1})),n(ms())},enable(){n(mo(a))},disable(){n(ml(a))},get state(){let t,r,n=c(),i=ay(e.state,a),o=e.state.search.isLoading,l=(r=e.state,r.facetOptions.facets[a]?.enabled??!0);t="object"==typeof n.sortCriteria?"descending"===n.sortCriteria.order?"alphanumericDescending":"alphanumeric":n.sortCriteria;let d=i?i.values:[],f=d.some(e=>"idle"!==e.state),p=!!i&&i.moreValuesAvailable,h=n.resultsMustMatch;return{label:i?.label,facetId:a,tabs:s,values:d,sortCriterion:t,resultsMustMatch:h,isLoading:o,hasActiveValues:f,canShowMoreValues:p,canShowLessValues:(()=>{let{currentValues:e}=c(),t=u.numberOfValues,r=!!e.find(e=>"idle"===e.state);return t<e.length&&r})(),enabled:l}}}}(e,{...t,options:{...t.options,...t.options.allowedValues&&{allowedValues:{type:"simple",values:t.options.allowedValues}}}},vQ),i=(()=>{let{facetSearch:i}=t.options;return function(e,t){let{dispatch:r}=e,{options:n,select:i,exclude:a,isForFieldSuggestions:s,executeFacetSearchActionCreator:o,executeFieldSuggestActionCreator:l}=t,{facetId:u}=n;r(m9(n));let c=function(e,t){let r=e.dispatch,{options:n,getFacetSearch:i,executeFacetSearchActionCreator:a,executeFieldSuggestActionCreator:s}=t,{facetId:o}=n;return{updateText(e){r(m7({facetId:o,query:e,numberOfValues:i().initialNumberOfValues}))},showMoreResults(){let{initialNumberOfValues:e,options:n}=i();r(m7({facetId:o,numberOfValues:n.numberOfValues+e})),r(t.isForFieldSuggestions?s(o):a(o))},search(){r(t.isForFieldSuggestions?s(o):a(o))},clear(){r(vD({facetId:o}))},updateCaptions(e){r(m7({facetId:o,captions:e}))},get state(){let{response:e,isLoading:t,options:r}=i(),{query:n}=r,a=e.values;return{...e,values:a,isLoading:t,query:n}}}}(e,{options:n,getFacetSearch:()=>"state"in e?e.state.facetSearchSet[u]:e[g$].facetSearchSet[u],isForFieldSuggestions:s,executeFacetSearchActionCreator:o,executeFieldSuggestActionCreator:l});return{...c,select(e){r(ye({facetId:u,value:e})),i(e)},exclude(e){r(yt({facetId:u,value:e})),a(e)},singleSelect(e){r(mV(u)),r(ye({facetId:u,value:e})),i(e)},singleExclude(e){r(mV(u)),r(yt({facetId:u,value:e})),a(e)},get state(){let{values:e}=c.state;return{...c.state,values:e.map(({count:e,displayValue:t,rawValue:r})=>({count:e,displayValue:t,rawValue:r}))}}}}(e,{options:{facetId:n.state.facetId,...i},select:e=>{r(ms()),r(oZ({legacy:mZ({facetId:n.state.facetId,facetValue:e.rawValue}),next:m3()}))},exclude:e=>{r(ms()),r(oZ({legacy:mJ({facetId:n.state.facetId,facetValue:e.rawValue}),next:m5()}))},isForFieldSuggestions:!1,executeFacetSearchActionCreator:vj,executeFieldSuggestActionCreator:vP})})(),{state:a,...s}=i;return{...n,facetSearch:s,toggleSelect(e){let t;n.toggleSelect(e),r(oZ({legacy:(t={facetId:n.state.facetId,facetValue:e.value},vb(e)?mX(t):mZ(t)),next:vb(e)?m4():m3()}))},toggleExclude(e){let t;n.toggleExclude(e),r(oZ({legacy:(t={facetId:n.state.facetId,facetValue:e.value},vw(e)?m0(t):mJ(t)),next:vw(e)?{actionCause:L.facetUnexclude}:m5()}))},deselectAll(){n.deselectAll(),r(oZ({legacy:mK(n.state.facetId),next:m2()}))},sortBy(e){n.sortBy(e),r(oZ({legacy:mW({facetId:n.state.facetId,criterion:e})}))},isSortedBy(e){return this.state.sortCriterion===e},showMoreValues(){n.showMoreValues(),r(o0({legacy:mQ(n.state.facetId)}))},showLessValues(){n.showLessValues(),r(o0({legacy:mY(n.state.facetId)}))},get state(){return{...n.state,facetSearch:i.state}}}}let vW=rs("rangeFacet/executeToggleSelect",e=>e2(e,ym(e.selection))),vK=rs("rangeFacet/executeToggleExclude",e=>e2(e,ym(e.selection))),vZ={facetId:eY,selection:new ee({values:yg})};rx("dateFacet/executeToggleSelect",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,vZ),t(yS(e)),t(vW(e)),t(ms())}),rx("dateFacet/executeToggleExclude",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,vZ),t(yE(e)),t(vK(e)),t(ms())});let vJ=["idle","selected","excluded"],vX=["ascending","descending"],v0=["even","equiprobable"],v1={start:new J,end:new J,endInclusive:ne
37w Q,state:new J({constrainTo:vJ})};new z({facetId:mC,field:mO,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),generateAutomaticRanges:mN,filterFacetCount:mT,injectionDepth:mx,numberOfValues:mR,currentValues:new er({each:new ee({values:v1})}),sortCriteria:new J({constrainTo:vX}),rangeAlgorithm:new J({constrainTo:v0})});let v2={facetId:eY,selection:new ee({values:yh})};rx("numericFacet/executeToggleSelect",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,v2),t(yB(e)),t(vW(e)),t(ms())}),rx("numericFacet/executeToggleExclude",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,v2),t(yG(e)),t(vK(e)),t(ms())});let v3={start:new W,end:new W,endInclusive:new Q,state:new J({constrainTo:vJ})};new z({facetId:mC,tabs:new ee({options:{required:!1},values:{included:new er({each:new J}),excluded:new er({each:new J})}}),field:mO,generateAutomaticRanges:mN,filterFacetCount:mT,injectionDepth:mx,numberOfValues:mR,currentValues:new er({each:new ee({values:v3})}),sortCriteria:new J({constrainTo:vX}),resultsMustMatch:new J({constrainTo:vB}),rangeAlgorithm:new J({constrainTo:v0})});let v5={collectionField:new J({emptyAllowed:!1,required:!1}),parentField:new J({emptyAllowed:!1,required:!1}),childField:new J({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new W({min:0,required:!1})},v4=rs("folding/register",e=>e2(e,v5)),v8=rx("folding/loadCollection",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:i}})=>{var a;let s=t(),o="legacy"===s.configuration.analytics.analyticsMode?await sF(s):sM(s,i),l=await n.search({...o,q:""===(a=s).query.q?"":a.query.enableQuerySyntax?`${a.query.q} OR @uri`:`( <@- ${a.query.q} -@> ) OR @uri`,enableQuerySyntax:!0,cq:`@${s.folding.fields.collection}="${e}"`,filterField:s.folding.fields.collection,childField:s.folding.fields.parent,parentField:s.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return void 0!==l.error?r(l.error):{collectionId:e,results:l.success.results,searchUid:l.success.searchUid,rootResult:s.folding.collections[e].result}}),v6=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});function v9(e,t){return e.raw[t.parent]}function v7(e,t){let r=e.raw[t.child];return ea(r)?r[0]:r}function be(e,t,r,n){let i={};return e.forEach(e=>{let a=e.raw[t.collection];if(a&&(v7(e,t)||e.parentResult)){let s,o,l;i[a]=(s=az(e),l=function e(t,r,n,i=[]){let a=v7(t,n);return a&&-1===i.indexOf(a)?r.filter(e=>{let r=v7(e,n)===v7(t,n);return v9(e,n)===a&&!r}).map(s=>{let o={...s,searchUid:t.searchUid};return{result:o,children:e(o,r,n,[...i,a])}}):[]}(o={...n??s.find(e=>{var r,n;let i=void 0===v9(e,t),a=(r=v9(e,t),n=v7(e,t),(r||n)!==void 0&&r===n);return i||a})??function e(t){return t.parentResult?e(t.parentResult):t}(e),searchUid:r},s,t),{result:o,children:l,moreResultsAvailable:e.totalNumberOfChildResults>l.length+1,isLoadingMoreResults:!1})}}),i}function bt(e,t){if(!e.collections[t])throw Error(`Missing collection ${t} from ${Object.keys(e.collections)}: Folding most probably in an invalid state...`);return e.collections[t]}rh(v6(),e=>e.addCase(oZ.fulfilled,(e,{payload:t})=>{e.collections=e.enabled?be(t.response.results,e.fields,t.response.searchUid):{}}).addCase(oJ.fulfilled,(e,{payload:t})=>{e.collections=e.enabled?be(t.response.results,e.fields,t.response.searchUid):{}}).addCase(oX.fulfilled,(e,{payload:t})=>{e.collections=e.enabled?{...e.collections,...be(t.response.results,e.fields,t.response.searchUid)}:{}}).addCase(v4,(e,{payload:t})=>e.enabled?e:{enabled:!0,collections:{},fields:{collection:t.collectionField??e.fields.collection,parent:t.parentField??e.fields.parent,child:t.childField??e.fields.child},filterFieldRange:t.numberOfFoldedResults??e.filterFieldRange}).addCase(v8.pending,(e,{meta:t})=>{bt(e,t.arg).isLoadingMoreResults=!0}).addCase(v8.rejected,(e,{meta:t})=>{bt(e,t.arg).isLoadingMoreResults=!1}).addCase(v8.fulfilled,(e,{payload:{collectionId:t,results:r,rootResult:n,searchUid:i}})=>{let a=be(r,e.fields,i,n);if(!a||!a[t])throw Error(`Unable to create collection ${t} from received results: ${JSON.stringify(r)}
37. Folding most probably in an invalid state... `);e.collections[t]=a[t],e.collections[t].moreResultsAvailable=!1}));let br={id:eY},bn=rs("querySuggest/register",e=>e2(e,{...br,count:new W({min:0})})),bi=rs("querySuggest/unregister",e=>e2(e,br)),ba=rs("querySuggest/selectSuggestion",e=>e2(e,{...br,expression:eK})),bs=rs("querySuggest/clear",e=>e2(e,br)),bo=rx("querySuggest/fetch",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,validatePayload:i,navigatorContext:a}})=>{i(e,br);let s=e.id,o=await bl(s,t(),a),l=await n.querySuggest(o);return void 0!==l.error?r(l.error):{id:s,q:o.q,...l.success}}),bl=async(e,t,r)=>({accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,url:t.configuration.search.apiBaseUrl??eL(t.configuration.organizationId,t.configuration.environment),count:t.querySuggest[e].count,q:t.querySet[e],locale:t.configuration.search.locale,timezone:t.configuration.search.timezone,actionsHistory:t.configuration.analytics.enabled?aU.getInstance().getHistory():[],...t.context&&{context:t.context.contextValues},...t.pipeline&&{pipeline:t.pipeline},...t.searchHub&&{searchHub:t.searchHub},tab:t.configuration.analytics.originLevel2,...t.configuration.analytics.enabled&&{...t.configuration.analytics.enabled&&"legacy"===t.configuration.analytics.analyticsMode?await sL(t.configuration.analytics):sD(t.configuration.analytics,r)},...t.configuration.search.authenticationProviders.length&&{authentication:t.configuration.search.authenticationProviders.join(",")}}),bu=rh(ax(),e=>e.addCase(sP,(e,t)=>({...e,...t.payload})).addCase(or,(e,t)=>{e.q=t.payload}).addCase(ba,(e,t)=>{e.q=t.payload.expression}).addCase(sg.fulfilled,(e,t)=>t.payload?.query??e).addCase(so,(e,t)=>{e.q=t.payload.q??e.q,e.enableQuerySyntax=t.payload.enableQuerySyntax??e.enableQuerySyntax})),bc=rs("fields/registerFieldsToInclude",e=>e2(e,eZ)),bd=rs("fields/fetchall/enable"),bf=rs("fields/fetchall/disable"),bp=rx("fields/fetchDescription",async(e,{extra:t,getState:r,rejectWithValue:n})=>{let i=r(),{accessToken:a,environment:s,organizationId:o}=i.configuration,{apiBaseUrl:l}=i.configuration.search,u=await t.apiClient.fieldDescriptions({accessToken:a,organizationId:o,url:l??eL(o,s)});return void 0!==u.error?n(u.error):u.success.fields}),bh=["author","language","urihash","objecttype","collection","source","permanentid"];[...bh];let bg=rh({fieldsToInclude:bh,fetchAllFields:!1,fieldsDescription:[]},e=>e.addCase(bc,(e,t)=>{e.fieldsToInclude=[...new Set(e.fieldsToInclude.concat(t.payload))]}).addCase(bd,e=>{e.fetchAllFields=!0}).addCase(bf,e=>{e.fetchAllFields=!1}).addCase(bp.fulfilled,(e,{payload:t})=>{e.fieldsDescription=t}).addCase(v4,(e,{payload:t})=>{let r=v6().fields;e.fieldsToInclude.push(t.collectionField??r.collection,t.parentField??r.parent,t.childField??r.child)}));function bm(e){e.addReducers({search:la}),!1;return{...y8(e),get state(){let t=e.state;return{hasError:null!==t.search.error,isLoading:t.search.isLoading,hasResults:!!t.search.results.length,firstSearchExecuted:o9(t)}}}}let by=new z({fieldsToInclude:new er({required:!1,each:new J({required:!0,emptyAllowed:!1})})});function bv(e){let t=new Set;return e.filter(e=>{let r=!t.has(e.uri);return r&&t.add(e.uri),r})}function bb(e){return e.followUpAnswers.find(e=>e.isActive)}function bw(e,t){return e.followUpAnswers.find(e=>e.answerId===t)}function bS(e,t){return t.payload.response.facets.map(e=>e.facetId)}new z(v5),rh(lm(),e=>e.addCase(lC,(e,{payload:t})=>{e.isVisible=t}).addCase(lI,(e,{payload:t})=>{e.isEnabled=t}).addCase(lL,(e,{payload:t})=>{e.id=t.id}).addCase(lA,(e,{payload:t})=>{e.isLoading=!1,e.isStreaming=!0,delete e.error;let r=t.textDelta,n=!!e.answer?.trim(),i=r.trim().length>0;if(n){e.answer+=r;return}e.answer=i?r:void 0}).addCase(lT,(e,{payload:t})=>{e.isLoading=!1,e.isStreaming=!0,e.citations=bv([...e.citations,...t.citations]),delete e.error}).addCase(lx,(e,{payload:t})=>{e.isLoading=!1,e.isStreaming=!1,e.error={...t,isRetryable:1===t.code},e.citations=[],delete e.answer}).addCase(lN,e=>{e.liked=!0,e.disliked=!1}).addCase(lj,e=>{e.liked=!1,e.disliked=!0}).addCase(lP,e=>{e.feedbackModalOpen=!0}).addCase(lF,e=>{e.feedbackModalOpen=!1}).addCase(lq,e=>{e.feedbackSubmitted=!0}).addCase(lR,e=>({...lm(),...e.answerConfigurationId?{answerConfigurationId:e.answerConfigurationId}:{},responseFormat:e.responseFormat,fieldsToIncludeInCitations:e.fieldsToIncludeInCitations,isVisible:e.isVisible,id:e.id})).addCase(lU,(e,{payload:t})=>{e.isLoading=t}).addCase(l$,(e,{payload:t})=>{e.isStreaming=t}).addCase(lV,(e,{payload:t})=>{e.answerContentFormat=t}).addCase(lz,(e,{payload:t})=>{e.responseFormat=t}).addCase(lG,(e,t)=>{e.fieldsToIncludeInCitations=[...new Set(e.fieldsToIncludeInCitations.concat(t.payload))]}).addCase(lH,(e,{payload:t})=>{e.isAnswerGenerated=t}).addCase(lD,e=>{e.expanded=!0}).addCase(lM,e=>{e.expanded=!1}).addCase(lB,(e,{payload:t})=>{e.answerConfigurationId=t}).addCase(lQ,(e,{payload:t})=>{e.cannotAnswer=t}).addCase(lY,(e,{payload:t})=>{e.answerApiQueryParams=t}).addCase(lO,(e,{payload:t})=>{e.answerId=t}).addCase(lk,(e,{payload:t})=>{e.answerGenerationMode=t}).addCase(lW,(e,{payload:t})=>{e.generationSteps.push({name:t.name,status:"active",startedAt:t.startedAt})}).addCase(lK,(e,{payload:t})=>{let r=e.generationSteps.findLast(e=>
37e.name===t.name&&"active"===e.status);r&&(r.status="completed",r.finishedAt=t.finishedAt)})),uJ.injectEndpoints({endpoints:e=>({post:e.query({query:e=>({url:"/evaluations",method:"POST",body:e})})})}),rh({conversationId:"",conversationToken:"",isEnabled:!1,followUpAnswers:[]},e=>e.addCase(gy,(e,{payload:t})=>{e.isEnabled=t}).addCase(gv,(e,{payload:t})=>{e.conversationId=t}).addCase(gb,(e,{payload:t})=>{e.conversationToken=t}).addCase(gw,e=>{e.conversationToken=""}).addCase(gS,(e,{payload:t})=>{let r=bb(e);r&&(r.isActive=!1),e.followUpAnswers.push({question:t.question,isLoading:!0,isStreaming:!1,citations:[],liked:!1,disliked:!1,feedbackSubmitted:!1,cannotAnswer:!1,isActive:!0,generationSteps:[]})}).addCase(gE,(e,{payload:t})=>{let r=bb(e);r&&!r.answerId&&(r.answerId=t)}).addCase(g_,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.answerContentFormat=t.contentFormat)}).addCase(gC,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.isLoading=t.isLoading)}).addCase(gO,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.isStreaming=t.isStreaming)}).addCase(gk,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.answer||(r.answer=""),r.answer+=t.textDelta,delete r.error)}).addCase(gI,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.citations=bv([...r.citations,...t.citations]),delete r.error)}).addCase(gA,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.isLoading=!1,r.isStreaming=!1,r.isActive=!1,r.cannotAnswer=!!t.cannotAnswer)}).addCase(gT,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.isLoading=!1,r.isStreaming=!1,r.error={message:t.message,code:t.code},r.citations=[],delete r.answer)}).addCase(gx,(e,{payload:t})=>{let r=bb(e);r&&(r.isLoading=!1,r.isStreaming=!1,r.error={message:t.message},r.citations=[],delete r.answer)}).addCase(gR,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.liked=!0,r.disliked=!1)}).addCase(gN,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.liked=!1,r.disliked=!0)}).addCase(gj,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.feedbackSubmitted=!0)}).addCase(gD,(e,{payload:t})=>{let r=bw(e,t.answerId);r&&(r.generationSteps=[...r.generationSteps,{name:t.name,status:"active",startedAt:t.startedAt}])}).addCase(gM,(e,{payload:t})=>{let r=bw(e,t.answerId);if(!r)return;let n=r.generationSteps.findLast(e=>e.name===t.name&&"active"===e.status);n&&(n.status="completed",n.finishedAt=t.finishedAt)}).addCase(gP,e=>{e.followUpAnswers=[],e.conversationId="",e.conversationToken="",e.isEnabled=!1})),rh([],e=>{e.addCase(oZ.fulfilled,bS).addCase(sg.fulfilled,(e,t)=>t.payload?.facetOrder??e)});let bE=()=>aQ("history/analytics/forward",e=>e.makeSearchEvent("historyForward")),b_=()=>aQ("history/analytics/backward",e=>e.makeSearchEvent("historyBackward")),bC=()=>aQ("history/analytics/noresultsback",e=>e.makeNoResultsBack()),bO=e=>({past:[],present:e,future:[]}),{getOwnPropertyNames:bk,getOwnPropertySymbols:bI}=Object,{hasOwnProperty:bA}=Object.prototype;function bT(e,t){return function(r,n,i){return e(r,n,i)&&t(r,n,i)}}function bx(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);let{cache:i}=n,a=i.get(t),s=i.get(r);if(a&&s)return a===r&&s===t;i.set(t,r),i.set(r,t);let o=e(t,r,n);return i.delete(t),i.delete(r),o}}function bR(e){return bk(e).concat(bI(e))}let bN=Object.hasOwn||((e,t)=>bA.call(e,t)),{getOwnPropertyDescriptor:bj,keys:bP}=Object,bD=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};function bM(e,t){return e===t}function bL(e,t){return e.byteLength===t.byteLength&&bY(new Uint8Array(e),new Uint8Array(t))}function bF(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function bq(e,t){return e.byteLength===t.byteLength&&bY(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function bU(e,t){return bD(e.getTime(),t.getTime())}function b$(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function bV(e,t,r){let n,i,a=e.size;if(a!==t.size)return!1;if(!a)return!0;let s=Array(a),o=e.entries(),l=0;for(;(n=o.next())&&!n.done;){let a=t.entries(),o=!1,u=0;for(;(i=a.next())&&!i.done;){if(s[u]){u++;continue}let a=n.value,c=i.value;if(r.equals(a[0],c[0],l,u,e,t,r)&&r.equals(a[1],c[1],a[0],c[0],e,t,r)){o=s[u]=!0;break}u++}if(!o)return!1;l++}return!0}function bz(e,t,r){let n=bP(e),i=n.length;if(bP(t).length!==i)return!1;for(;i-- >0;)if(!bK(e,t,r,n[i]))return!1;return!0}function bB(e,t,r){let n,i,a,s=bR(e),o=s.length;if(bR(t).length!==o)return!1;for(;o-- >0;)if(!bK(e,t,r,n=s[o])||(i=bj(e,n),a=bj(t,n),(i||a)&&(!i||!a||i.c
37onfigurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function bG(e,t){return bD(e.valueOf(),t.valueOf())}function bH(e,t){return e.source===t.source&&e.flags===t.flags}function bQ(e,t,r){let n,i,a=e.size;if(a!==t.size)return!1;if(!a)return!0;let s=Array(a),o=e.values();for(;(n=o.next())&&!n.done;){let a=t.values(),o=!1,l=0;for(;(i=a.next())&&!i.done;){if(!s[l]&&r.equals(n.value,i.value,n.value,i.value,e,t,r)){o=s[l]=!0;break}l++}if(!o)return!1}return!0}function bY(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function bW(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function bK(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||bN(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}let bZ=Object.prototype.toString,bJ=bX();function bX(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=function(e){let t=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p}){return{"[object Arguments]":l,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":o,"[object BigInt64Array]":f,"[object BigUint64Array]":f,"[object Boolean]":u,"[object DataView]":r,"[object Date]":n,"[object Error]":i,"[object Float16Array]":f,"[object Float32Array]":f,"[object Float64Array]":f,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":f,"[object Int16Array]":f,"[object Int32Array]":f,"[object Map]":s,"[object Number]":u,"[object Object]":(e,t,r)=>"function"!=typeof e.then&&"function"!=typeof t.then&&l(e,t,r),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":p,"[object Uint8Array]":f,"[object Uint8ClampedArray]":f,"[object Uint16Array]":f,"[object Uint32Array]":f}}(e),{areArraysEqual:r,areDatesEqual:n,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:s,areObjectsEqual:o,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=e;return function(e,d,f){if(e===d)return!0;if(null==e||null==d)return!1;let p=typeof e;if(p!==typeof d)return!1;if("object"!==p)return"number"===p||"bigint"===p?s(e,d,f):"function"===p&&i(e,d,f);let h=e.constructor;if(h!==d.constructor)return!1;if(h===Object)return o(e,d,f);if(h===Array)return r(e,d,f);if(h===Date)return n(e,d,f);if(h===RegExp)return l(e,d,f);if(h===Map)return a(e,d,f);if(h===Set)return u(e,d,f);if(h===Promise)return!1;if(Array.isArray(e))return r(e,d,f);let g=bZ.call(e),m=t[g];if(m)return m(e,d,f);let y=c&&c(e,d,f,g);return!!y&&y(e,d,f)}}(function({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:bL,areArraysEqual:r?bB:bF,areDataViewsEqual:bq,areDatesEqual:bU,areErrorsEqual:b$,areFunctionsEqual:bM,areMapsEqual:r?bT(bV,bB):bV,areNumbersEqual:bD,areObjectsEqual:r?bB:bz,arePrimitiveWrappersEqual:bG,areRegExpsEqual:bH,areSetsEqual:r?bT(bQ,bB):bQ,areTypedArraysEqual:r?bT(bY,bB):bY,areUrlsEqual:bW,getUnsupportedCustomComparator:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let e=bx(n.areArraysEqual),t=bx(n.areMapsEqual),r=bx(n.areObjectsEqual),i=bx(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:r,areSetsEqual:i})}return n}(e)),s=r?r(a):function(e,t,r,n,i,s,o){return a(e,t,o)};return function({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(a,s){let{cache:o=e?new WeakMap:void 0,meta:l}=r();return t(a,s,{cache:o,equals:n,meta:l,strict:i})};if(e)return function(e,r){return t(e,r,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};let a={cache:void 0,equals:n,meta:void 0,strict:i};return function(e,r){return t(e,r,a)}}({circular:t,comparator:a,createState:n,equals:s,strict:i})}function b0(e,t){return e.length===t.length&&e.every(e=>-1!==t.findIndex(t=>b1(e,t)))}bX({strict:!0}),bX({circular:!0}),bX({circular:!0,strict:!0}),bX({createInternalComparator:()=>bD}),bX({strict:!0,createInternalComparator:()=>bD}),bX({circular:!0,createInternalComparator:()=>bD}),bX({circular:!0,createInternalComparator:()=>bD,strict:!0});let b1=bX({createCustomConfig:e=>({...e,areArraysEqual:b0})}),b2=rh(od({}),e=>{e.addCase(sh,(e,t)=>b3(e,t.payload)?void 0:t.payload)}),b3=(e,t)=>
37b5(e.context,t.context)&&b4(e.dictionaryFieldContext,t.dictionaryFieldContext)&&wa(e.advancedSearchQueries,t.advancedSearchQueries)&&b8(e.tabSet,t.tabSet)&&b9(e.staticFilterSet,t.staticFilterSet)&&we(e.facetSet,t.facetSet)&&we(e.dateFacetSet,t.dateFacetSet)&&we(e.numericFacetSet,t.numericFacetSet)&&wr(e.automaticFacetSet,t.automaticFacetSet)&&wt(e.categoryFacetSet,t.categoryFacetSet)&&wn(e.pagination,t.pagination)&&wi(e.query,t.query)&&ws(e,t)&&wo(e.pipeline,t.pipeline)&&wl(e.searchHub,t.searchHub)&&wu(e.facetOrder,t.facetOrder)&&wc(e.debug,t.debug),b5=(e,t)=>JSON.stringify(e.contextValues)===JSON.stringify(t.contextValues),b4=(e,t)=>JSON.stringify(e.contextValues)===JSON.stringify(t.contextValues),b8=(e,t)=>{let r=b6(e),n=b6(t);return r?.id===n?.id},b6=e=>Object.values(e).find(e=>e.isActive),b9=(e,t)=>{for(let[r,n]of Object.entries(t)){if(!e[r])return!1;let t=b7(e[r]),i=b7(n);if(JSON.stringify(t)!==JSON.stringify(i))return!1}return!0},b7=e=>e.values.filter(e=>"idle"!==e.state),we=(e,t)=>{for(let[r,n]of Object.entries(t)){if(!e[r])return!1;let t=e[r].request.currentValues.filter(e=>"idle"!==e.state),i=n.request.currentValues.filter(e=>"idle"!==e.state);if(JSON.stringify(t)!==JSON.stringify(i))return!1}return!0},wt=(e,t)=>{for(let[r,n]of Object.entries(t)){if(!e[r])return!1;let t=ab(e[r]?.request.currentValues).map(({value:e})=>e),i=ab(n?.request.currentValues).map(({value:e})=>e);if(JSON.stringify(t)!==JSON.stringify(i))return!1}return!0},wr=(e,t)=>{for(let[r,n]of Object.entries(t.set)){if(!e.set[r])return!1;let t=e.set[r].response.values.filter(e=>"idle"!==e.state),i=n.response.values.filter(e=>"idle"!==e.state);if(JSON.stringify(t)!==JSON.stringify(i))return!1}return!0},wn=(e,t)=>e.firstResult===t.firstResult&&e.numberOfResults===t.numberOfResults,wi=(e,t)=>JSON.stringify(e)===JSON.stringify(t),wa=(e,t)=>JSON.stringify(e)===JSON.stringify(t),ws=(e,t)=>e.sortCriteria===t.sortCriteria,wo=(e,t)=>e===t,wl=(e,t)=>e===t,wu=(e,t)=>(function(e,t,r=(e,t)=>e===t){return e.length===t.length&&-1===e.findIndex((e,n)=>!r(t[n],e))})(e,t),wc=(e,t)=>e===t;(e=>{let{actionTypes:t,reducer:r}=e,n=bO();return(e=n,i)=>{switch(i.type){case t.undo:return(e=>{let{past:t,present:r,future:n}=e;if(!r||0===t.length)return e;let i=t[t.length-1];return{past:t.slice(0,t.length-1),present:i,future:[r,...n]}})(e);case t.redo:return(e=>{let{past:t,present:r,future:n}=e;return r&&0!==n.length?{past:[...t,r],present:n[0],future:n.slice(1)}:e})(e);case t.snapshot:return(e=>{let{action:t,state:r,reducer:n}=e,{past:i,present:a}=r,s=n(a,t);return a?a===s?r:{past:[...i,a].slice(-10),present:s,future:[]}:bO(s)})({state:e,reducer:r,action:i});default:return e}}})({actionTypes:{redo:sp.type,undo:sf.type,snapshot:sh.type},reducer:b2});let wd={results:new er({required:!0,each:new ee({values:aJ})}),maxLength:new W({required:!0,min:1,default:10})},wf=rs("recentResults/registerRecentResults",e=>e2(e,wd)),wp=rs("recentResults/pushRecentResult",e=>(aX(e),{payload:e})),wh=rs("recentResults/clearRecentResults"),wg=(e,t)=>{let{q:r,id:n}=e;return t[n].cache[r]||null};rh({},e=>{e.addCase(sC,(e,t)=>{((e,t)=>{let{id:r}=e;if(!t[r])return t[r]={q:"",cache:{}}})(t.payload,e)}),e.addCase(sO,(e,t)=>{((e,t)=>{let{q:r,id:n}=e;r&&(t[n].q=r)})(t.payload,e)}),e.addCase(sk,(e,t)=>{((e,t)=>{let{id:r}=e;Object.entries(t[r].cache).forEach(([e,n])=>{n&&n.expiresAt&&Date.now()>=n.expiresAt&&delete t[r].cache[e]})})(t.payload,e)}),e.addCase(o1.pending,(e,t)=>{((e,t,r)=>{for(let e in t)for(let r in t[e].cache)t[e].cache[r].isActive=!1;if(!wg(e,t))return((e,t,r)=>{let{q:n,id:i}=e;t[i].cache[n]={isLoading:!0,error:null,expiresAt:0,isActive:!0,searchUid:"",totalCountFiltered:0,duration:0,...r}})(e,t,r);let n=wg(e,t);n.isLoading=!0,n.isActive=!0,n.error=null})(t.meta.arg,e,{results:[]})}),e.addCase(o1.fulfilled,(e,t)=>{let r=t.payload.results.map(e=>({...e,searchUid:t.payload.searchUid}));((e,t,r)=>{let{id:n,q:i,searchUid:a,cacheTimeout:s,totalCountFiltered:o,duration:l}=e;t[n].cache[i]={...wg(e,t),...r,isActive:!0,searchUid:a,isLoading:!1,error:null,expiresAt:s?s+Date.now():0,totalCountFiltered:o,duration:l}})({...t.payload,...t.meta.arg},e,{results:r})}),e.addCase(o1.rejected,(e,t)=>{((e,t)=>
37{let{id:r,q:n,error:i}=e;t[r].cache[n].error=i||null,t[r].cache[n].isLoading=!1,t[r].cache[n].isActive=!1})(t.meta.arg,e)})}),new z({searchBoxId:eW,maxResultsPerQuery:new W({required:!0,min:1}),cacheTimeout:new W});let wm=rh(oc(),e=>{e.addCase(sA,(e,t)=>{let r=wv(e),n=t.payload;e.defaultNumberOfResults=e.numberOfResults=n,e.firstResult=(r-1)*n}).addCase(sT,(e,t)=>{e.numberOfResults=t.payload,e.firstResult=0}).addCase(u5,e=>{e.firstResult=0}).addCase(sx,(e,t)=>{var r;r=t.payload,e.firstResult=(r-1)*e.numberOfResults}).addCase(sR,(e,t)=>{var r;r=t.payload,e.firstResult=(r-1)*e.numberOfResults}).addCase(sj,e=>{let t=Math.max(wv(e)-1,1);e.firstResult=(t-1)*e.numberOfResults}).addCase(sN,e=>{let t=Math.min(wv(e)+1,function(e){let{totalCountFiltered:t,numberOfResults:r}=e;return ww(t,r)}(e));e.firstResult=(t-1)*e.numberOfResults}).addCase(sg.fulfilled,(e,t)=>{t.payload&&(e.numberOfResults=t.payload.pagination.numberOfResults,e.firstResult=t.payload.pagination.firstResult)}).addCase(so,(e,t)=>{e.firstResult=t.payload.firstResult??e.firstResult,e.numberOfResults=t.payload.numberOfResults??e.defaultNumberOfResults}).addCase(oZ.fulfilled,(e,t)=>{let{response:r}=t.payload;e.totalCountFiltered=r.totalCountFiltered}).addCase(oJ.fulfilled,(e,t)=>{let{response:r}=t.payload;e.totalCountFiltered=r.totalCountFiltered}).addCase(mV,e=>{wy(e)}).addCase(yE,e=>{wy(e)}).addCase(m$,e=>{wy(e)}).addCase(yG,e=>{wy(e)}).addCase(yt,e=>{wy(e)}).addCase(mU,e=>{wy(e)}).addCase(me,e=>{wy(e)}).addCase(g7,e=>{wy(e)}).addCase(mf,e=>{wy(e)}).addCase(yS,e=>{wy(e)}).addCase(yB,e=>{wy(e)}).addCase(sv,e=>{wy(e)}).addCase(y_,e=>{wy(e)}).addCase(yH,e=>{wy(e)}).addCase(ye,e=>{wy(e)}).addCase(g4,e=>{wy(e)})});function wy(e){e.firstResult=oc().firstResult}function wv(e){let{firstResult:t,numberOfResults:r}=e;return wb(t,r)}function wb(e,t){return Math.round(e/t)+1}function ww(e,t){return Math.ceil(Math.min(e,5e3)/t)}function wS(e){return e.pagination.numberOfResults}let wE=e=>wb(e.pagination.firstResult,wS(e)),w_=e=>ww(e.pagination.totalCountFiltered,wS(e)),wC=()=>aQ("analytics/pager/resize",(e,t)=>e.makePagerResize({currentResultsPerPage:t.pagination?.numberOfResults||oc().numberOfResults})),wO=()=>aQ("analytics/pager/number",(e,t)=>e.makePagerNumber({pagerNumber:wE(t)})),wk=()=>aQ("analytics/pager/next",(e,t)=>e.makePagerNext({pagerNumber:wE(t)})),wI=()=>aQ("analytics/pager/previous",(e,t)=>e.makePagerPrevious({pagerNumber:wE(t)})),wA=()=>({actionCause:L.browseResults}),wT=new z({numberOfPages:new W({default:5,min:0})}),wx=new z({page:new W({min:1})});function wR(e,t={}){let{dispatch:r}=e,n=function(e,t={}){e.addReducers({configuration:ce,pagination:wm}),!1;let r=y8(e),{dispatch:n}=e,i=e5(e,wT,t.options,"buildPager"),a=e3(e,wx,t.initialState,"buildPager").page;return a&&n(sx(a)),{...r,get state(){let t=wE(e.state),r=w_(e.state);return{currentPage:t,currentPages:(()=>{var t,r,n,a,s,o;let l,u,c,d,f,p,{numberOfPages:h}=i;return t=e.state,d=wE(t),f=w_(t),function(e){let t=[];for(let r=e.start;r<=e.end;++r)t.push(r);return t}((s=(u=Math.max(1-(a={start:(r=d)-(l=Math.floor((n=h)/2)),end:r+(n%2==0?l-1:l)}).start,0),p={start:a.start+u,end:a.end+u}),o=f,c=Math.max(s.end-o,0),p={start:Math.max(s.start-c,1),end:s.end-c}))})(),maxPage:r,hasPreviousPage:t>1&&r>0,hasNextPage:t<r}},selectPage(e){n(sR(e))},nextPage(){n(sN())},previousPage(){n(sj())},isCurrentPage(e){return e===this.state.currentPage}}}(e,t);return{...n,get state(){return n.state},selectPage(e){n.selectPage(e),r(oJ({legacy:wO(),next:wA()}))},nextPage(){n.nextPage(),r(oJ({legacy:wk(),next:wA()}))},previousPage(){n.previousPage(),r(oJ({legacy:wI(),next:wA()}))}}}function wN(e){e.addReducers({search:la,pagination:wm}),!1;let t=y8(e),r=bm(e);return{...t,get state(){return{...r.state,durationInMilliseconds:e.state.search.duration,durationInSeconds:Math.round((e.state.search.duration/1e3+Number.EPSILON)*100)/100,firstResult:e.state.pagination.firstResult+1,hasDuration:0!==e.state.search.duration,hasQuery:""!==e.state.search.queryExecuted,lastResult:e.state.pagination.firstResult+e.state.search.results.length,query:e.state.search.queryExecuted,total:e.state.pagination.totalCountFiltered}}}}async function wj(e,t){let{search:r,accessToken:n,organizationId:i}=e.configuration,a=e.query?.q||"";return{url:r.apiBaseUrl??eL(e.configuration.organizationId,e.configuration.environment),accessToken:n,organizationId:i,enableNavigation:!1,q:a,...t,requestedOutputSize:t.requestedOutputSize||0,...r.authenticationProviders.length&&{authentication:r.authenticationProviders.join(",")}}}let wP=rx("resultPreview/fetchResultContent",async(e,{extra:t,getState:r,rejectWithValue:n})=>{let i=r(),a=await wj(i,e),s=await t.apiClient.html(a);return void 0!==s.error?n(s.error):{content:s.success,uniqueId:e.uniqueId}}),wD=rs("resultPreview/next"),wM=rs("resultPreview/previous"),wL=rs("resultPreview/prepare",e=>e2(e,{results:new er({required:!0})})),wF=rx("resultPreview/updateContentURL",async(e,{getState:t,extra:r})=>{var n,i;let a,s=t(),o=(n=await e.buildResultPreviewRequest(s,{uniqueId:e.uniqueId,requestedOutputSize:e.requestedOutputSize}
37),i=e.path,(a=new ey(`${n.url}${i}`)).addParam("access_token",n.accessToken),a.addParam("organizationId",n.organizationId),a.addParam("uniqueId",n.uniqueId),n.authentication&&a.addParam("authentication",n.authentication),void 0!==n.q&&a.addParam("q",n.q),void 0!==n.enableNavigation&&a.addParam("enableNavigation",`${n.enableNavigation}`),void 0!==n.requestedOutputSize&&a.addParam("requestedOutputSize",`${n.requestedOutputSize}`),a.href);return o?.length>2048&&r.logger.error("The content URL was truncated as it exceeds the maximum allowed length of 2048 characters."),{contentURL:o}});function wq(){return{uniqueId:"",content:"",isLoading:!1,position:-1,resultsWithPreview:[]}}let wU=e=>{let{content:t,isLoading:r,uniqueId:n,contentURL:i}=wq();e.content=t,e.isLoading=r,e.uniqueId=n,e.contentURL=i},w$=e=>e.filter(e=>e.hasHtmlVersion).map(e=>e.uniqueId);rh(wq(),e=>{e.addCase(wP.pending,e=>{e.isLoading=!0}).addCase(wP.fulfilled,(e,t)=>{let{content:r,uniqueId:n}=t.payload;e.position=e.resultsWithPreview.indexOf(n),e.content=r,e.uniqueId=n,e.isLoading=!1}).addCase(oZ.fulfilled,(e,t)=>{wU(e),e.resultsWithPreview=w$(t.payload.response.results)}).addCase(oX.fulfilled,(e,t)=>{wU(e),e.resultsWithPreview=e.resultsWithPreview.concat(w$(t.payload.response.results))}).addCase(oJ.fulfilled,wU).addCase(wL,(e,t)=>{e.resultsWithPreview=w$(t.payload.results)}).addCase(wD,e=>{if(e.isLoading)return;let t=e.position+1;t>e.resultsWithPreview.length-1&&(t=0),e.position=t}).addCase(wM,e=>{if(e.isLoading)return;let t=e.position-1;t<0&&(t=e.resultsWithPreview.length-1),e.position=t}).addCase(wF.fulfilled,(e,t)=>{e.contentURL=t.payload.contentURL})});let wV={queries:new er({required:!0,each:new J({emptyAllowed:!1})}),maxLength:new W({required:!0,min:1,default:10})},wz=rs("recentQueries/registerRecentQueries",e=>e2(e,wV)),wB=rs("recentQueries/clearRecentQueries");function wG(e,t){e.queries=Array.from(new Set(t.payload.queries.map(e=>e.trim().toLowerCase()))).slice(0,t.payload.maxLength),e.maxLength=t.payload.maxLength}function wH(e){e.queries=[]}function wQ(e,t){let r,n=!1;var i=()=>
37{if(!n){let r;n=!0,e.dispatch((r=t.options.result,aQ({prefix:"analytics/result/open",__legacy__getBuilder:(e,t)=>(aX(r),e.makeDocumentOpen(aY(r,t),aK(r))),analyticsType:"itemClick",analyticsPayloadBuilder:e=>{let t=aY(r,e),n=aK(r);return{responseId:r.searchUid??"",position:t.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:t.documentTitle,author:t.documentAuthor,url:t.documentUrl}}}})))}e.dispatch(wp(t.options.result))};e.addReducers({configuration:ce}),!1;let a={selectionDelay:1e3,debounceWait:1e3,...t.options};return{select:el(i,a.debounceWait,{isImmediate:!0}),beginDelayedSelect(){r=setTimeout(i,a.selectionDelay)},cancelPendingSelect(){r&&clearTimeout(r)}}}function wY(e,t){return function(e,t){e.addReducers({search:la,configuration:ce,fields:bg}),!1;let r=y8(e),n=bm(e),{dispatch:i}=e,a=e5(e,by,t?.options,"buildCoreResultList");a.fieldsToInclude&&i(bc(a.fieldsToInclude));let s=()=>e.state.search.results.length<e.state.search.response.totalCountFiltered,o=0,l=0,u=!1,c=async()=>{if(!e.state.search.isLoading){if(!s())return void e.logger.info("No more results are available for the result list to fetch.");if(Date.now()-o<200){if(++l>=5){o=Date.now(),u||e.logger.error('The result list method "fetchMoreResults" execution prevented because it has been triggered consecutively 5 times, with little delay. Please verify the conditions under which the function is called.'),u=!0;return}}else l=0;u=!1,t?.fetchMoreResultsActionCreator&&(await i(t?.fetchMoreResultsActionCreator()),o=Date.now())}};return{...r,get state(){let t=e.state;return{...n.state,results:t.search.results,moreResultsAvailable:s(),searchResponseId:t.search.searchResponseId}},fetchMoreResults:c}}(e,{...t,fetchMoreResultsActionCreator:oX})}rh({queries:[],maxLength:10},e=>{e.addCase(wz,wG).addCase(wB,wH).addCase(oZ.fulfilled,(e,t)=>{let r=t.payload.queryExecuted,n=t.payload.response.results;r.length&&n.length&&function(e,t){let r=e.trim().toLowerCase();if(""===r)return;let n=Array.from(new Set(t.queries.filter(e=>e.trim().toLowerCase()!==r))).slice(0,t.maxLength-1);t.queries=[r,...n]}(r,e)})}),new z({queries:new er({required:!0})}),new z({maxLength:new W({required:!0,min:1}),clearFilters:new Q}),rh({results:[],maxLength:10},e=>{e.addCase(wf,(e,t)=>{e.results=t.payload.results.slice(0,t.payload.maxLength),e.maxLength=t.payload.maxLength}).addCase(wh,e=>{e.results=[]}).addCase(wp,(e,t)=>{let r=t.payload;e.results=e.results.filter(e=>e.uniqueId!==r.uniqueId);let n=e.results.slice(0,e.maxLength-1);e.results=[r,...n]})}),new z({results:new er({required:!0})}),new z({maxLength:new W({required:!0,min:1})}),new z({enabled:new Q({default:!1})}),new z({numberOfResults:new W({min:0})});let wW=()=>aQ("analytics/searchbox/submit",e=>e.makeSearchboxSubmit()),wK=()=>({actionCause:L.searchboxSubmit}),wZ={id:eY,query:eK},wJ=rs("querySet/register",e=>e2(e,wZ)),wX=rs("querySet/update",e=>e2(e,wZ)),w0=rh({},e=>{e.addCase(wJ,(e,t)=>w5(e,t.payload)).addCase(wX,(e,t)=>{let{id:r,query:n}=t.payload;w3(e,r,n)}).addCase(ba,(e,t)=>{let{id:r,expression:n}=t.payload;w3(e,r,n)}).addCase(oZ.fulfilled,(e,t)=>{let{queryExecuted:r}=t.payload;w2(e,r)}).addCase(so,w1).addCase(sg.fulfilled,(e,t)=>{if(t.payload)for(let[r,n]of Object.entries(t.payload.querySet))w3(e,r,n)})});function w1(e,t){H(t.payload.q)||w2(e,t.payload.q)}function w2(e,t){Object.keys(e).forEach(r=>{e[r]=t})}let w3=(e,t,r)=>{t in e&&(e[t]=r)},w5=(e,t)=>{let{id:r,query:n}=t;r in e||(e[r]=n)},w4=e=>aQ("analytics/querySuggest",(t,r)=>{let n=function(e,t){let{id:r,suggestion:n}=t,i=e.querySuggest?.[r];if(!i)throw Error(`Unable to determine the query suggest analytics metadata to send because no query suggest with id "${r}" was found. Please check the sent #id.`);let a=i.completions.map(e=>e.expression),s=i.partialQueries.length-1,o=i.partialQueries[s]||"",l=i.responseId;return{suggestionRanking:a.indexOf(n),partialQuery:o,partialQueries:i.partialQueries,suggestions:a,querySuggestResponseId:l}}(r,e);return t.makeOmniboxAnalytics(n)});function w8(e,t){let r=e[t.meta.arg.id];r&&(r.currentRequestId=t.meta.requestId,r.isLoading=!0)}function w6(e,t){let r=e[t.meta.arg.id];r&&(r.error=t.payload||null,r.isLoading=!1)}let w9=rh({},e=>e.addCase(bn,(e,t)=>{var r;let n;
37(n=(r=t.payload).id)in e||(e[n]={id:"",completions:[],responseId:"",count:5,currentRequestId:"",error:null,partialQueries:[],isLoading:!1,...r})}).addCase(bi,(e,t)=>{delete e[t.payload.id]}).addCase(bo.pending,w8).addCase(bo.fulfilled,(e,t)=>{let r=e[t.meta.arg.id];if(!r||t.meta.requestId!==r.currentRequestId)return;let{q:n}=t.payload;n&&r.partialQueries.push(n.replace(/;/,encodeURIComponent(";"))),r.responseId=t.payload.responseId,r.completions=t.payload.completions,r.isLoading=!1,r.error=null}).addCase(bo.rejected,w6).addCase(bs,(e,t)=>{let r;(r=e[t.payload.id])&&(r.responseId="",r.completions=[],r.partialQueries=[])}).addCase(le,(e,t)=>{Object.keys(e).forEach(r=>{let n=e[r];n&&(n.error=t.payload,n.isLoading=!1)})})),w7={enableQuerySyntax:!1,numberOfSuggestions:5,clearFilters:!0},Se={open:new J,close:new J},St={id:eY,numberOfSuggestions:new W({min:0}),enableQuerySyntax:new Q,highlightOptions:new ee({values:{notMatchDelimiters:new ee({values:Se}),exactMatchDelimiters:new ee({values:Se}),correctionDelimiters:new ee({values:Se})}}),clearFilters:new Q},Sr=new z(St);function Sn(e,t={}){let r=function(e,t){e.addReducers({query:bu,querySuggest:w9,configuration:ce,querySet:w0,search:la}),!1;let r=y8(e),{dispatch:n}=e,i=t.options?.id||((e,t=5)=>e+Math.random().toString(36).substring(2,2+t))("search_box"),a={id:i,highlightOptions:{...t.options?.highlightOptions},...w7,...t.options};e5(e,Sr,a,"buildSearchBox"),n(wJ({id:i,query:e.state.query.q})),a.numberOfSuggestions&&n(bn({id:i,count:a.numberOfSuggestions})),a.enableQuerySyntax&&n(sP({enableQuerySyntax:a.enableQuerySyntax}));let s=()=>e.state.querySet[a.id],o=async e=>{let{enableQuerySyntax:r,clearFilters:i}=a;n(oW({q:s(),enableQuerySyntax:r,clearFilters:i})),t.isNextAnalyticsReady?n(t.executeSearchActionCreator(e)):n(t.executeSearchActionCreator(e.legacy))};return{...r,updateText(e){n(wX({id:i,query:e})),this.showSuggestions()},clear(){n(wX({id:i,query:""})),n(bs({id:i}))},showSuggestions(){a.numberOfSuggestions&&n(t.fetchQuerySuggestionsActionCreator({id:i}))},selectSuggestion(e){n(ba({id:i,expression:e})),o({legacy:w4({id:i,suggestion:e}),next:{actionCause:L.omniboxAnalytics}}).then(()=>{n(bs({id:i}))})},submit(e=wW(),t){o({legacy:e,next:t}),n(bs({id:i}))},get state(){var l,u;let t=e.state,r=t.querySuggest[a.id],n=(l=r,u=a.highlightOptions,l?l.completions.map(e=>{var t,r;let n,i,a,s;return{highlightedValue:(t=e.highlighted,(r=t,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},a=RegExp(i=`(?:${Object.keys(n).join("|")})`),s=RegExp(i,"g"),t=a.test(r)?r.replace(s,e=>n[e]):r).replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(e,t,r,n)=>t?eu(t,u.notMatchDelimiters):r?eu(r,u.exactMatchDelimiters):n?eu(n,u.correctionDelimiters):e)),rawValue:e.expression}}):[]),o=!!r&&r.isLoading;return{searchBoxId:i,value:s(),suggestions:n,isLoading:t.search.isLoading,isLoadingSuggestions:o}}}}(e,{...t,executeSearchActionCreator:oZ,fetchQuerySuggestionsActionCreator:bo,isNextAnalyticsReady:!0});return{...r,submit(){r.submit(wW(),wK())},get state(){return r.state}}}let Si=()=>aQ("analytics/sort/results",(e,t)=>e.makeResultsSort({resultsSortBy:t.sortCriteria||aP()})),Sa=()=>({actionCause:L.resultsSort});function Ss(e={},t={},r=!1){let n=Object.keys(e),i=Object.keys(t),a=n.filter(e=>!i.includes(e));if(a.length){let t=a[0];switch(!0){case e[t].length>1:return mK(t);case r:return m0({facetId:t,facetValue:e[t][0]});default:return mX({facetId:t,facetValue:e[t][0]})}}let s=i.filter(e=>!n.includes(e));if(s.length){let e=s[0];return r?mJ({facetId:e,facetValue:t[e][0]}):mZ({facetId:e,facetValue:t[e][0]})}let o=i.find(r=>t[r].filter(t=>e[r].includes(t)));if(!o)return a3();let l=e[o],u=t[o],c=u.filter(e=>!l.includes(e));if(c.length)return r?mJ({facetId:o,facetValue:c[0]}):mZ({facetId:o,facetValue:c[0]});let d=l.filter(e=>!u.includes(e));return d.length?r?m0({facetId:o,facetValue:d[0]}):mX({facetId:o,facetValue:d[0]}):a3()}function So(e={},t={}){return Ss(Sc(e),Sc(t))}function Sl(e={},t={}){return JSON.stringify(e)!==JSON.stringify(t)}function Su(e={},t={},r=!1){let n=Object.keys(e),i=Object.keys(t),a=n.filter(e=>!i.includes(e));if(a.length)return e[a[0]].length>1?m2():m4();if(i.filter(e=>!n.includes(e)).length)return r?m5():m3();let s=i.find(r=>t[r].filter(t=>e[r].includes(t)));if(!s)return a8();let o=e[s],l=t[s];return l.filter(e=>!o.includes(e)).length?r?m5():m3():o.filter(e=>!l.includes(e)).length?m4():a8()}function Sc(e={}){let t={};return Object.keys(e).forEach(r=>{t[r]=e[r].map(e=>`${e.start}..${e.end}`)}),t}function Sd(e,t,r,n){if(void 0===e)return{};let i=Object.entries(e).filter(([e])=>t(e)).map(([e,{request:t}])=>{let n=r(t);return n.length?{[e]:n}:{}}).reduce((e,t)=>
37({...e,...t}),{});return Object.keys(i).length?{[n]:i}:{}}let Sf=new z({parameters:new ee({options:{required:!0},values:ss})});function Sp(e,t){var r;return{...(r=e.state,{q:ax().q,enableQuerySyntax:ax().enableQuerySyntax,aq:r.advancedSearchQueries?.defaultFilters.aq??sq().defaultFilters.aq,cq:r.advancedSearchQueries?.defaultFilters.cq??sq().defaultFilters.cq,firstResult:oc().firstResult,numberOfResults:r.pagination?.defaultNumberOfResults??oc().defaultNumberOfResults,sortCriteria:aP(),f:{},fExcluded:{},cf:{},nf:{},df:{},debug:!1,sf:{},tab:"",af:{},mnf:{}}),...t}}function Sh(e,t){if(H(t.tab)||!e)return t;if(""===t.tab)return{...t,tab:Sg(e)};if(!Object.values(e).some(e=>e.id===t.tab)){let r=Object.values(e).find(e=>e.isActive);return{...t,tab:r?.id??Sg(e)}}return t}function Sg(e){return Object.keys(e)[0]??""}function Sm(e){var t,r,n;let i=e.state;return{...function(e,t,r){if(void 0===e)return{};let n=t(e);return n!==r?{q:n}:{}}(i.query,e=>e.q,ax().q),...function(e,t,r){if(void 0===e)return{};let n=t(e);return n!==r?{tab:n}:{}}(i.tabSet,e=>{let t=Object.values(e??{}).find(e=>e.isActive);return t?t.id:Object.keys(e??{})[0]},i.tabSet?Object.keys(i.tabSet)[0]:""),...function(e,t,r){if(void 0===e)return{};let n=t(e);return bJ(n,r)?{}:{sortCriteria:n}}(i.sortCriteria,e=>e,aP()),...function(e){let t=e.facetSet;if(void 0===t)return{};let r=Sy(e),n={},i={};for(let[e,{request:a}]of Object.entries(t)){if(!r(e))continue;let t=a.currentValues.filter(e=>"selected"===e.state).map(e=>e.value),s=a.currentValues.filter(e=>"excluded"===e.state).map(e=>e.value);t.length&&(n[e]=t),s.length&&(i[e]=s)}return{...Object.keys(n).length?{f:n}:{},...Object.keys(i).length?{fExcluded:i}:{}}}(i),...Sd((t=i).categoryFacetSet,Sy(t),e=>ab(e.currentValues).map(e=>e.value),"cf"),...Sd((r=i).numericFacetSet,Sy(r),Sv,"nf"),...Sd((n=i).dateFacetSet,Sy(n),Sv,"df"),...function(e){let t=e.automaticFacetSet?.set;if(void 0===t)return{};let r=Object.entries(t).map(([e,{response:t}])=>{let r=t.values.filter(e=>"selected"===e.state).map(e=>e.value);return r.length?{[e]:r}:{}}).reduce((e,t)=>({...e,...t}),{});return Object.keys(r).length?{af:r}:{}}(i)}}function Sy(e){let t=function(e){let t=e.tabSet;if(!t)return;let r=Object.values(t).find(e=>e.isActive);return r?.id}(e);return r=>{let n=e.facetOptions?.facets[r],i=n?.enabled??!0,a=mu(n?.tabs,t);return i&&a}}function Sv(e){return e.currentValues.filter(e=>"selected"===e.state)}function Sb(e){let t=e.state;return{...Sm(e),...function(e){if(void 0===e.query)return{};let t=e.query.enableQuerySyntax;return void 0!==t&&t!==ax().enableQuerySyntax?{enableQuerySyntax:t}:{}}(t),...function(e){if(void 0===e.advancedSearchQueries)return{};let{aq:t,defaultFilters:r}=e.advancedSearchQueries;return t!==r.aq?{aq:t}:{}}(t),...function(e){if(void 0===e.advancedSearchQueries)return{};let{cq:t,defaultFilters:r}=e.advancedSearchQueries;return t!==r.cq?{cq:t}:{}}(t),...function(e){if(void 0===e.pagination)return{};let t=e.pagination.firstResult;return t!==oc().firstResult?{firstResult:t}:{}}(t),...function(e){if(void 0===e.pagination)return{};let{numberOfResults:t,defaultNumberOfResults:r}=e.pagination;return t!==r?{numberOfResults:t}:{}}(t),...function(e){if(void 0===e.debug)return{};let t=e.debug;return!1!==t?{debug:t}:{}}(t),...function(e){if(void 0===e.staticFilterSet)return{};let t=Object.entries(e.staticFilterSet).map(([e,t])=>{let r=t.values.filter(e=>"selected"===e.state).map(e=>e.caption);return r.length?{[e]:r}:{}}).reduce((e,t)=>({...e,...t}),{});return Object.keys(t).length?{sf:t}:{}}(t)}}function Sw(e){return e2(e,new ee({values:{questionAnswerId:eY},options:{required:!0}}))}function SS(e,t){var r,n;let i=t??e.search?.questionAnswer?.documentId;return i&&e.search&&(r=i.contentIdKey,n=i.contentIdValue,e.search.results.find(e=>o6(e,r)===n))}function SE(e,t){let r=e.questionAnswering?.relatedQuestions.findIndex(e=>e.questionAnswerId===t)??-1;return -1===r?null:e.search?.questionAnswer?.relatedQuestions?.[r]??null}let S_=()=>aQ({prefix:"analytics/smartSnippet/expand",__legacy__getBuilder:e=>e.makeExpandSmartSnippet(),analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:e=>{let t=SS(e),r=aK(t),n=e.search?.response.searchUid;if(n)return{action:"expand",snippetType:"SmartSnippet",responseId:n,itemMetadata:{uniqueFieldName:r.contentIDKey,uniqueFieldValue:r.contentIDValue,title:t.title,url:t.clickUri}}}}),SC=()=>aQ({prefix:"analytics/smartSnippet/collapse",__legacy__getBuilder:e=>e.makeCollapseSmartSnippet(),analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:e=>{let t=SS(e),r=aK(t),n=e.search?.response.searchUid;if(n)return{action:"collapse",snippetType:"SmartSnippet",responseId:n,itemMetadata:{uniqueFieldName:r.contentIDKey,uniqueFieldValue:r.contentIDValue,title:t.title,url:t.clickUri}}}}),SO=()=>aQ({prefix:"analytics/smartSnippet/like",__legacy__getBuilder:e=>e.makeLikeSmartSnippet(),analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:e=>{let t=SS(e),r=aK(t),n=e.search?.response.searchUid;if(n)return{action:"like",snippetType:"SmartSnippet",responseId:n,itemMetadata:{uniqueFieldName:r.contentIDKey,uniqueFieldValue:r.contentIDValue,title:t.title,url:t.clickUri}}}}),Sk=()=>aQ({prefix:"analytics/smartSnippet/dislike",__legacy__getBuilder:e=>e.makeDislikeSmartSnippet(),analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:e=>{let t=SS(e),r=aK(t),n=e.search?.response.searchUid;if(n)return{action:"dislike",snippetType:"SmartSnippet",responseId:n,itemMetadata:{uniqueFieldName:r.contentIDKey,uniqueFieldValue:r.contentIDValue,title:t.title,url:t.clickUri}}}}),SI=()=>aQ("analytics/smartSnippet/feedbackModal/open",e=>e.makeOpenSmartSnippetFeedbackModal()),SA=()=>aQ("analytics/smartSnippet/feedbackModal/close",e=>e.makeCloseSmartSnippetFeedbackModal()),ST={does_not_answer:"doesNotAnswer",partially_answers:"partiallyAnswers",
37was_not_a_question:"wasNotAQuestion"},Sx=e=>aQ({prefix:"analytics/smartSnippet/sendFeedback",__legacy__getBuilder:t=>t.makeSmartSnippetFeedbackReason(e),analyticsType:"SmartSnippets.SubmitFeedback",analyticsPayloadBuilder:t=>{let r=SS(t),n=aK(r),i=t.search?.response.searchUid;if(i)return{responseId:i,snippetType:"SmartSnippet",itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.title,url:r.clickUri},reason:ST[e]}}}),SR=e=>aQ({prefix:"analytics/smartSnippet/sendFeedback",__legacy__getBuilder:t=>t.makeSmartSnippetFeedbackReason("other",e),analyticsType:"SmartSnippets.SubmitFeedback",analyticsPayloadBuilder:t=>{let r=SS(t),n=aK(r),i=t.search?.response.searchUid;if(i)return{responseId:i,snippetType:"SmartSnippet",itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.title,url:r.clickUri},reason:"other",additionalNotes:e}}}),SN=e=>aQ({prefix:"analytics/smartSnippetSuggestion/expand",__legacy__getBuilder:(t,r)=>{Sw(e);let n=SE(r,e.questionAnswerId);return n?t.makeExpandSmartSnippetSuggestion({question:n.question,answerSnippet:n.answerSnippet,documentId:n.documentId}):null},analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:t=>{let r=SE(t,e.questionAnswerId),n=t.search?.response.searchUid;if(n&&r){let e=SS(t,r.documentId);return{action:"expand",responseId:n,snippetType:"SmartSnippetSuggestion",itemMetadata:{uniqueFieldName:r.documentId.contentIdKey,uniqueFieldValue:r.documentId.contentIdValue,title:e?.title,url:e?.clickUri}}}}}),Sj=e=>aQ({prefix:"analytics/smartSnippetSuggestion/collapse",__legacy__getBuilder:(t,r)=>{Sw(e);let n=SE(r,e.questionAnswerId);return n?t.makeCollapseSmartSnippetSuggestion({question:n.question,answerSnippet:n.answerSnippet,documentId:n.documentId}):null},analyticsType:"SmartSnippets.AnswerAction",analyticsPayloadBuilder:t=>{let r=SE(t,e.questionAnswerId),n=t.search?.response.searchUid;if(n&&r){let e=SS(t,r.documentId);return{action:"collapse",responseId:n,snippetType:"SmartSnippetSuggestion",itemMetadata:{uniqueFieldName:r.documentId.contentIdKey,uniqueFieldValue:r.documentId.contentIdValue,title:e?.title,url:e?.clickUri}}}}}),SP=rs("smartSnippet/expand"),SD=rs("smartSnippet/collapse"),SM=rs("smartSnippet/like"),SL=rs("smartSnippet/dislike"),SF=rs("smartSnippet/feedbackModal/open"),Sq=rs("smartSnippet/feedbackModal/close"),SU=rs("smartSnippet/related/expand",e=>Sw(e)),S$=rs("smartSnippet/related/collapse",e=>Sw(e)),SV=()=>({liked:!1,disliked:!1,expanded:!1,feedbackModalOpen:!1,relatedQuestions:[]}),Sz=(e,t)=>e.findIndex(e=>e.questionAnswerId===t.questionAnswerId);function SB({question:e,answerSnippet:t,documentId:{contentIdKey:r,contentIdValue:n}}){return btoa(encodeURI(JSON.stringify({question:e,answerSnippet:t,contentIdKey:r,contentIdValue:n})))}rh(SV(),e=>e.addCase(SP,e=>{e.expanded=!0}).addCase(SD,e=>{e.expanded=!1}).addCase(SM,e=>{e.liked=!0,e.disliked=!1,e.feedbackModalOpen=!1}).addCase(SL,e=>{e.liked=!1,e.disliked=!0}).addCase(SF,e=>{e.feedbackModalOpen=!0}).addCase(Sq,e=>{e.feedbackModalOpen=!1}).addCase(oZ.fulfilled,(e,t)=>{let r=t.payload.response.questionAnswer.relatedQuestions.map((t,r)=>{var n;let i;return n=e.relatedQuestions[r],i=SB(t),n&&i===n.questionAnswerId?n:{contentIdKey:t.documentId.contentIdKey,contentIdValue:t.documentId.contentIdValue,expanded:!1,questionAnswerId:i}}),n=SB(t.payload.response.questionAnswer);return e.questionAnswerId===n?{...e,relatedQuestions:r}:{...SV(),relatedQuestions:r,questionAnswerId:n}}).addCase(SU,(e,t)=>{let r=Sz(e.relatedQuestions,t.payload);-1!==r&&(e.relatedQuestions[r].expanded=!0)}).addCase(S$,(e,t)=>{let r=Sz(e.relatedQuestions,t.payload);-1!==r&&(e.relatedQuestions[r].expanded=!1)}));let SG={by:new ei({enum:M,required:!0})},SH=rs("sortCriteria/register",e=>SY(e)),SQ=rs("sortCriteria/update",e=>SY(e)),SY=e=>en(e)?(e.forEach(e=>e2(e,SG)),{payload:e}):e2(e,SG),SW=rh(aP(),e=>{e.addCase(SH,(e,t)=>aR(t.payload)).addCase(SQ,(e,t)=>aR(t.payload)).addCase(sg.fulfilled,(e,t)=>t.payload?.sortCriteria??e).addCase(so,(e,t)=>t.payload.sortCriteria??e)});function SK(e,t={}){let{dispatch:r}=e,n=function(e,t){e.addReducers({configuration:ce,sortCriteria:SW}),!1;let r=y8(e),{dispatch:n}=e;!function(e,t){var r;if(!t)return;let n=new z({criterion:new er({each:aj})}),i=(r=t).criterion?en(r.criterion)?r.criterion:[r.criterion]:[];e3(e,n,{...t,criterion:i},"buildSort")}(e,t.initialState);let i=t.initialState?.criterion;return i&&n(SH(i)),{...r,sortBy(e){n(SQ(e)),n(sR(1))},isSortedBy(e){return this.state.sortCriteria===aR(e)},get state(){return{sortCriteria:e.state.sortCriteria}}}}(e,t);return{...n,get state(){return n.state},sortBy(e){n.sortBy(e),r(oZ({legacy:Si(),next:Sa()}))}}}function SZ(e){return"redirect"===e.type}class SJ{response;constructor(e){this.response=e}get basicExpression(){return this.response.parsedInput.basicExpression}get largeExpression(){return this.response.parsedInput.largeExpression}get redirectionUrl(){let e=this.response.preprocessingOutput.triggers.filter(SZ);return e.length?e[0].content:null}}let SX=rs("standaloneSearchBox/register",e=>e2(e,{id:eY,redirectionUrl:eY,overwrite:new Q({required:!1})})),S0=rs("standaloneSearchBox/updateRedirectionUrl",e=>e2(e,{id:eY,redirectionUrl:eY})),S1=rs("standaloneSearchBox/reset",e=>e2(e,{id:eY})),S2=rs("standaloneSearchBox/updateAnalyticsToSearchFromLink",e=>e2(e,{id:eY})),S3=rs("standaloneSearchBox/updateAnalyticsToOmniboxFromLink"),S5=rx("standaloneSearchBox/fetchRedirect",async(e,{dispatch:t,getState:r,rejectWithValue:n,extra:{apiClient:i,validatePayload:a,navigatorContext:s}})=>{a(e,{id:new J({emptyAllowed:!1})});let o=await S8(r(),s),l=await i.plan(o);if(void 0!==l.error)return n(l.error);let{redirectionUrl:u}=new SJ(l.success);return u&&t(S4(u)),u||""}),S4=e=>aQ("analytics/standaloneSearchBox/redirect",t=>t.makeTriggerRedirect({redirectedTo:e})),S8=async(e,t)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??eL(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,timezone:e.configuration.search.timezone,q:e.query.q,...e.context&&{context:e.context.contextValues},...e.pipeline&&{pipeline:e.pipeline},...e.searchHub&&{searchHub:e.searchHub},...void 0!==e.query.enableQuerySyntax&&{enableQuerySyntax:e.query.enableQuerySyntax},...e.configuration.analytics.enabled&&"legacy"===e.configuration.analytics.analyticsMode?await sL(e.configuration.analytics):sD(e.configuration.analytics,t),...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}});function S6(e){return{defaultRedirectionUrl:e,redirectTo:"",isLoading:!1,analytics:{cause:"",metadata:null}}}function S9(e){return e.query="",e.queryModification={originalQuery:"",newQuery:"",queryToIgnore:e.queryModification.queryToIgnore},e}rh({},e=>e.addCase(SX,(e,t)=>{let{id:r,redirectionUrl:n,overwrite:i}=t.payload;!i&&r in e||(e[r]=S6(n))}).addCase(S1,(e,t)=>{let{id:r}=t.payload,n=e[r];if(n){e[r]=S6(n.defaultRedirectionUrl);return}}).addCase(S0,(e,t)=>{let{id:r,redirectionUrl:n}=t.payload;r in e&&(e[r]=S6(n))}).addCase(S5.pending,(e,t)=>{let r=e[t.meta.arg.id];r&&(r.isLoading=!0)}).addCase(S5.fulfilled,(e,t)=>{let r=t.payload,n=e[t.meta.arg.id];n&&(n.redirectTo=r||n.defaultRedirectionUrl,n.isLoading=!1)}).addCase(S5.rejected,(e,t)=>{let r=e[t.meta.arg.id];r&&(r.isLoading=!1)}).addCase(S2,(e,t)=>{let r=e[t.payload.id];r&&(r.analytics.cause="searchFromLink")}).addCase(S3,(e,t)=>{let r=e[t.payload.id];r&&(r.analytics.cause="omniboxFromLink",r.analytics.metadata=t.payload.metadata)})),new z({...St,redirectionUrl:new J({required:!0,emptyAllowed:!1}),overwrite:new Q({required:!1})}),rh({},e=>e.addCase(yX,(e,t)=>{let r=t.payload,{id:n}=r;
37n in e||(e[n]=r)}).addCase(y0,(e,t)=>{let{id:r,value:n}=t.payload,i=e[r];if(!i)return;let a=i.values.find(e=>e.caption===n.caption);if(!a)return;let s="selected"===a.state;a.state=s?"idle":"selected"}).addCase(y1,(e,t)=>{let{id:r,value:n}=t.payload,i=e[r];if(!i)return;let a=i.values.find(e=>e.caption===n.caption);if(!a)return;let s="excluded"===a.state;a.state=s?"idle":"excluded"}).addCase(y2,(e,t)=>{let r=e[t.payload];r&&r.values.forEach(e=>{e.state="idle"})}).addCase(sv,e=>{Object.values(e).forEach(e=>{e.values.forEach(e=>{e.state="idle"})})}).addCase(so,(e,t)=>{let r=t.payload.sf||{};Object.entries(e).forEach(([e,t])=>{let n=r[e]||[];t.values.forEach(e=>{e.state=n.includes(e.caption)?"selected":"idle"})})})),new z({id:eY,values:yJ}),new z({expression:eK,id:eY,clearFiltersOnTabChange:new Q}),new z({isActive:new Q}),rh({redirectTo:"",query:"",executions:[],notifications:[],queryModification:{originalQuery:"",newQuery:"",queryToIgnore:""}},e=>e.addCase(oZ.pending,S9).addCase(oZ.fulfilled,(e,t)=>{var r;let n,i,a,s;return r=t.payload.response.triggers,n=[],i=[],a=[],s=[],r.forEach(e=>{switch(e.type){case"redirect":n.push(e.content);break;case"query":i.push(e.content);break;case"execute":a.push({functionName:e.content.name,params:e.content.params});break;case"notify":s.push(e.content)}}),e.redirectTo=n[0]??"",e.query=e.queryModification.newQuery,e.executions=a,e.notifications=s,e}).addCase(ob,(e,t)=>(e.queryModification={...t.payload,queryToIgnore:""},e)).addCase(ov,(e,t)=>{var r;return r=t.payload,e.queryModification.queryToIgnore=r,e}));let S7=/^(f|fExcluded|cf|nf|df|sf|af|mnf)-(.+)$/,Ee={f:!0,fExcluded:!0,cf:!0,sf:!0,af:!0,nf:!0,df:!0,mnf:!0};function Et(){return{serialize:En(Ei),deserialize:Eo}}function Er(e){return e in{q:!0,aq:!0,cq:!0,enableQuerySyntax:!0,firstResult:!0,numberOfResults:!0,sortCriteria:!0,debug:!0,tab:!0}||e in Ee}let En=e=>t=>Object.entries(t).map(e).filter(e=>e).join("&");function Ei(e){var t,r,n,i,a,s,o;let[l,u]=e;if(!Er(l))return"";return l in Ee&&!((t=l)in Ee&&t in{nf:!0,df:!0,mnf:!0})?Ea(r=u)&&Es(r,e=>"string"==typeof e)?(n=l,Object.entries(u).map(([e,t])=>`${n}-${e}=${t.map(e=>encodeURIComponent(e)).join(",")}`).join("&")):"":"nf"===l||"df"===l?Ea(i=u)&&Es(i,e=>Ea(e)&&"start"in e&&"end"in e)?(a=l,Object.entries(u).map(([e,t])=>{let r=t.map(({start:e,end:t,endInclusive:r})=>`${e}${r?"...":".."}${t}`).join(",");return`${a}-${e}=${r}`}).join("&")):"":(s=l,o=u,`${s}=${encodeURIComponent(o)}`)}function Ea(e){return!!(e&&"object"==typeof e)}function Es(e,t){return 0===Object.entries(e).filter(e=>{let r=e[1];return!Array.isArray(r)||!r.every(t)}).length}function Eo(e){return e.split("&").map(e=>(function(e){let[t,...r]=e.split("=");return[t,r.join("=")]})(e)).map(e=>(function(e,t=S7){var r,n;let[i,a]=e,s=t.exec(i);if(!s)return e;let o=s[1],l=s[2],u=(r=o,n=a.split(","),"nf"===r||"mnf"===r?function(e,t){let r=[];for(let n of e){let{startAsString:e,endAsString:i,isEndInclusive:a}=Ec(n),s=parseFloat(e),o=parseFloat(i);Number.isFinite(s)&&Number.isFinite(o)&&r.push({endInclusive:!1,state:"idle",start:s,end:o,state:t,endInclusive:a})}return r}(n,"selected"):"df"===r?function(e,t){let r=[];for(let n of e){let{isEndInclusive:e,startAsString:i,endAsString:a}=Ec(n);El(i)&&El(a)&&r.push(yd({start:i,end:a,state:t,endInclusive:e}))}return r}(n,"selected"):n);return[o,JSON.stringify({[l]:u})]})(e)).filter(Eu).map(e=>(function(e,t=!0){let r,n,[i,a]=e;if("enableQuerySyntax"===i||"debug"===i)return[i,"true"===a];if("firstResult"===i||"numberOfResults"===i)return[i,parseInt(a,10)];return i in Ee?[i,(r=JSON.parse(a),n={},Object.entries(r).forEach(e=>{let[t,r]=e;n[t]=r.map(e=>X(e)?decodeURIComponent(e):e)}),n)]:[i,t?decodeURIComponent(a):a]})(e)).reduce((e,t)=>{let[r,n]=t;if(r in Ee){let t={...e[r],...n};return{...e,[r]:t}}return{...e,[r]:n}},{})}function El(e){try{if(sQ(sH(e))===e)return sY(e,sG),!0;if(s2(e))return sJ(e),!0;return!1}catch(e){return!1}}function Eu(e){let t=Er(e[0]),r=2===e.length;return t&&r}function Ec(e){let t=-1!==e.indexOf("..."),[r,n]=e.split(t?"...":"..");return{isEndInclusive:t,startAsString:r,endAsString:n}}let Ed=new z({fragment:new J});function Ef(e,t){let r;function n(){r=e.state.search.requestId}e.addReducers({configuration:ce}),!1;e3(e,Ed,t.initialState,"buildUrlManager");let i=y8(e),a=t.initialState.fragment;n();let s=function(e,t){let{dispatch:r}=e,n=function(e,t){let{dispatch:r}=e,n=y8(e);return e3(e,Sf,t.initialState,"buildSearchParameterManager"),r(so(Sh(e.state.tabSet,t.initialState.parameters))),{...n,synchronize(t){r(so(Sh(e.state.tabSet,Sp(e,t))))},get state(){return{parameters:Sm(e)}}}}(e,t);return{...n,synchronize(t){let i=Sb(e),a=Sp(e,i),s=Sp(e,t);!b1(a,s)&&(n.synchronize(t),r(oZ({legacy:a.q!==s.q?wW():a.sortCriteria!==s.sortCriteria?Si():a.firstResult!==s.firstResult?wO():a.numberOfResults!==s.numberOfResults?wC():Sl(a.f,s.f)?Ss(a.f,s.f):Sl(a.fExcluded,s.fExcluded)?Ss(a.fExcluded,s.fExcluded,!0):Sl(a.cf,s.cf)?Ss(a.cf,s.cf):Sl(a.af,s.af)?Ss(a.af,s.af):Sl(a.nf,s.nf)?So(a.nf,s.nf):Sl(a.df,s.df)?So(a.df,s.df):a3(),next:a.q!==s.q?wK():a.sortCriteria!==s.sortCriteria?Sa():Sl(a.f,s.f)?Su(a.f,s.f):Sl(a.fExcluded,s.fExcluded)?Su(a.fExcluded,s.fExcluded,!0):Sl(a.cf,s.cf)?Su(a.cf,s.cf):Sl(a.af,s.af)?Su(a.af,s.af):Sl(a.nf,s.nf)?Su(Sc(a.nf),Sc(s.nf)):Sl(a.df,s.df)?Su(Sc(a.df),Sc(s.df)):a8()})))},get state(){return{parameters:Sb(e)}}}}(e,{initialState:{parameters:Ep(a)}});return{...i,subscribe(t){let i=()=>{var i,s;let o=this.state.fragment;(i=a)===(s=o)||b1(Ep(i),Ep(s))||r===e.state.search.requestId||(a=o,t()),n()};return i(),e.subscribe(i)},get state(){return{fragment:Et().serialize(s.state.parameters)}},synchronize(e){a=e;let t=Ep(e);s.synchronize(t)}}}function Ep(e){return Et().deserialize(e)}rx("analytics/addPageViewEntry",async(e,{getState:t})=>{t().configuration.analytics.enabled&&aU.getInstance().addElement({name:"PageView",value:e,time:JSON.stringify(new Date)})});let Eh=()=>new J({required:!1,emptyAllowed:!0}),Eg=rs("advancedSearchQueries/update",e=>e2(e,{aq:Eh(),cq:Eh(),lq:Eh(),dq:Eh()})),Em=rs("advancedSearchQueries/register",e=>e2(e,{aq:Eh(),cq:Eh(),lq:Eh(),dq:Eh()}));function Ey(e){return e.addReducers({}),{logClearBreadcrumbs:yc,logInterfaceLoad:a2,logSearchFromLink:a5,logOmniboxFromLink:a4,logInterfaceChange:a3,logDidYouMeanClick:oi,logCategoryFacetBreadcrumb:ma,logFacetBreadcrumb:m1,logFacetClearAll:mK,logFacetUnexclude:m0,logFacetExclude:mJ,logFacetDeselect:mX,logFacetSelect:mZ,logFacetShowLess:mY,logFacetShowMore:mQ,logFacetUpdateSort:mW,logDateFacetBreadcrumb:yk,logNumericFacetBreadcrumb:yQ,logNavigateBackward:b_,logNavigateForward:bE,logPageNext:wk,logPageNumber:wO,logPagePrevious:wI,logPagerResize:wC,logSearchboxSubmit:wW,logQuerySuggestionClick:w4,logResultsSort:Si,logDislikeSmartSnippet:Sk,logLikeSmartSnippet:SO,logOpenSmartSnippetFeedbackModal:SI,logCloseSmartSnippetFeedbackModal:SA,logSmartSnippetFeedback:Sx,logSmartSnippetDetailedFeedback:SR,logExpandSmartSnippet:S_,logCollapseSmartSnippet:SC,logExpandSmartSnippetSuggestion:SN,logCollapseSmartSnippetSuggestion:Sj,logNoResultsBack:bC,logStaticFilterSelect:y3,logStaticFilterDeselect:y5,logStaticFilterClearAll:y4,logTriggerQuery:op,logUndoTriggerQuery:oh,logNotifyTrigger:og,logTriggerRedirect:om,logTriggerExecute:oy}}rh(sq(),e=>{e.addCase(Eg,(e,t)=>{let{aq:r,cq:n,lq:i,dq:a}=t.payload;G(r)||(e.aq=r,e.aqWasSet=!0),G(n)||(e.cq=n,e.cqWasSet=!0),G(i)||(e.lq=i,e.lqWasSet=!0),G(a)||(e.dq=a,e.dqWasSet=!0)}).addCase(Em,(e,t)=>{let{aq:r,cq:n,lq:i,dq:a}=t.payload;!G(r)&&(e.defaultFilters.aq=r,e.aqWasSet||(e.aq=r)),!G(n)&&(e.defaultFilters.cq=n,e.cqWasSet||(e.cq=n)),!G(i)&&(e.defaultFilters.lq=i,e.lqWasSet||(e.lq=i)),!G(a)&&(e.defaultFilters.dq=a,e.dqWasSet||(e.dq=a))}).addCase(sg.fulfilled,(e,t)=>t.payload?.advancedSearchQueries??e).addCase(so,(e,t)=>{let{aq:r,cq:n}
37=t.payload;G(r)||(e.aq=r,e.aqWasSet=!0),G(n)||(e.cq=n,e.cqWasSet=!0)})});let Ev=rs("excerptLength/set",e=>e2(e,new W({min:0,required:!0})));function Eb(e){return e.addReducers({pagination:wm}),{nextPage:sN,previousPage:sj,registerNumberOfResults:sA,registerPage:sx,updateNumberOfResults:sT,updatePage:sR}}function Ew(e){return e.addReducers({query:bu}),{updateQuery:sP}}function ES(e){return e.addReducers({search:la}),{executeSearch:oA,fetchMoreResults:ox,fetchFacetValues:oR,fetchPage:oT,fetchInstantResults:oN}}function EE(e){return e.addReducers({searchHub:lo}),{setSearchHub:ls}}rh({length:void 0},e=>{e.addCase(Ev,(e,t)=>{e.length=t.payload})}),new z({content:new B({required:!0}),conditions:new B({required:!0}),priority:new W({required:!1,default:0,min:0}),fields:new er({required:!1,each:eY})})},7085:function(e,t){var r,n;void 0===(n="function"==typeof(r=function e(){var t,r="u">typeof self?self:"u">typeof window?window:void 0!==r?r:{},n=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,a={},s=0,o={};function l(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new h(t),(this._handle.streamer=this)._config=t}).call(this,e),this.parseChunk=function(e,t){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let t=this._config.newline;t||(a=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,a)),e=[...e.split(t).slice(n)].join(t)}this.isFirstChunk&&E(this._config.beforeFirstChunk)&&void 0!==(a=this._config.beforeFirstChunk(e))&&(e=a),this.isFirstChunk=!1,this._halted=!1;var n=this._partialLine+e,a=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=a.meta.cursor,this._finished||(this._partialLine=n.substring(e
37-this._baseIndex),this._baseIndex=e),a&&a.data&&(this._rowCount+=a.data.length),n=this._finished||this._config.preview&&this._rowCount>=this._config.preview,i)r.postMessage({results:a,workerId:o.WORKER_ID,finished:n});else if(E(this._config.chunk)&&!t){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=a=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!n||!E(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):i&&this._config.error&&r.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e,r,i=this._config.downloadRequestHeaders;for(r in i)t.setRequestHeader(r,i[r])}this._config.chunkSize&&(e=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+e));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){let e;4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(null!==(e=(e=t).getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),u.call(this,e);var t,r,n="u">typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,i=(this._config.chunkSize&&(i=Math.min(this._start+this._config.chunkSize,this._input.size),e=r.call(e,this._start,i)),t.readAsText(e,this._config.encoding));n||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;u.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,r;if(!this._finished)return t=(e=this._config.chunkSize)?(r=t.substring(0,e),t.substring(e)):(r=t,""),this._finished=!t,this.parseChunk(r)}}function p(e){u.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=S(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=S(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=S(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=S(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(e){var t,r,n,i,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,s=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,c=0,d=0,f=!1,p=!1,h=[],y={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function b(){if(y&&n&&(_("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!v(e)})),S()){if(y)if(Array.isArray(y.data[0])){for(var t,r=0;S()&&r<y.data.length;r++)y.data[r].forEach(i);y.data.splice(0,1)}else y.data.forEach(i);function i(t,r){t=l(t),E(e.transformHeader)&&(t=e.transformHeader(t,r)),h.push(t)}}function u(t,r){for(var n=e.header?{}:[],i=0;i<t.length;i++){var o=i,l=t[i],l=((t,r)=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping))?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&((e=>{if(a.test(e)&&-0x20000000000000<(e=parseFloat(e))&&e<0x20000000000000)return 1})(r)?parseFloat(r):s.test(r)?new Date(r):""===r?null:r):r)(o=e.header?i>=h.length?"__parsed_extra":h[i]:o,l=e.transform?e.transform(l,o):l);"__parsed_extra"===o?(n[o]=n[o]||[],n[o].push(l)):n[o]=l}return e.header&&(i>h.length?_("FieldMismatch","TooManyFields","Too many fields: expected "+h.length+" fields but parsed "+i,d+r):i<h.length&&_("FieldMismatch","TooFewFields","Too few fields: expected "+h.length+" fields but parsed "+i,d+r)),n}y&&(e.header||e.dynamicTyping||e.transform)&&(t=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(u),t=y.data.length):y.data=u(y.data,0),e.header&&y.meta&&(y.meta.fields=h),d+=t)}function S(){return e.header&&0===h.length}function _(e,t,r,n){e={type:e,code:t,message:r},void 0!==n&&(e.row=n),y.errors.push(e)}E(e.step)&&(i=e.step,e.step=function(t){y=t,S()?b():(b(),0!==y.data.length&&(c+=t.data.length,e.preview&&c>e.preview?r.abort():(y.data=y.data[0],i(y,u))))}),this.parse=function(i,a,s){var l=e.quoteChar||'"',l=(e.newline||(e.newline=this.guessLineEndings(i,l)),n=!1,e.delimiter?E(e.delimiter)&&(e.delimiter=e.delimiter(i),y.meta.delimiter=e.delimiter):((l=((t,r,n,i,a)=>{var s,l,u,c;a=a||[",","	","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var d=0;d<a.length;d++){for(var f,p=a[d],h=0,g=0,y=0,b=(u=void 0,new m({comments:i,delimiter:p,newline:r,preview:10}).parse(t)),w=0;w<b.data.length;w++)n&&v(b.data[w])?y++:(g+=f=b.data[w].length,void 0===u?u=f:0<f&&(h+=Math.abs(f-u),u=f));0<b.data.length&&(g/=b.data.length-y),(void 0===l||h<=l)&&(void 0===c||c<g)&&1.99<g&&(l=h,s=p,c=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}})(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=l.bestDelimiter:(n=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),w(e));return e.preview&&e.header&&l.preview++,t=i,y=(r=new m(l)).parse(t,a,s),b(),f?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,r.abort(),t=E(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,r.abort(),y.meta.aborted=!0,E(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var t=RegExp(g(t)+"([^]*?)"+g(t),"gm"),r=(e=e.replace(t,"")).split("\r"),t=e.split("\n"),e=1<t.length&&t[0].length<r[0].length;if(1===r.length||e)return"\n";for(var n=0,i=0;i<r.length;i++)"\n"===r[i][0]&&n++;return n>=r.length/2?"\r\n":"\r"}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,a=e.preview,s=e.fastMode,u=null,c=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),n===t)throw Error("Comment character same as delimiter");
vendor: 4,681 bytes, line 37
37!0===n?n="#":("string"!=typeof n||-1<o.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var p=0,h=!1;this.parse=function(o,m,y){if("string"!=typeof o)throw Error("Input must be a string");var v=o.length,b=t.length,w=r.length,S=n.length,_=E(i),C=[],O=[],k=[],I=p=0;if(!o)return q();if(s||!1!==s&&-1===o.indexOf(d)){for(var A=o.split(r),T=0;T<A.length;T++){if(k=A[T],p+=k.length,T!==A.length-1)p+=r.length;else if(y)break;if(!n||k.substring(0,S)!==n){if(_){if(C=[],D(k.split(t)),U(),h)return q()}else D(k.split(t));if(a&&a<=T)return C=C.slice(0,a),q(!0)}}return q()}for(var x=o.indexOf(t,p),R=o.indexOf(r,p),N=RegExp(g(f)+g(d),"g"),j=o.indexOf(d,p);;)if(o[p]===d)for(j=p,p++;;){if(-1===(j=o.indexOf(d,j+1)))return y||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:C.length,index:p}),L();if(j===v-1)return L(o.substring(p,j).replace(N,d));if(d===f&&o[j+1]===f)j++;else if(d===f||0===j||o[j-1]!==f){-1!==x&&x<j+1&&(x=o.indexOf(t,j+1));var P=M(-1===(R=-1!==R&&R<j+1?o.indexOf(r,j+1):R)?x:Math.min(x,R));if(o.substr(j+1+P,b)===t){k.push(o.substring(p,j).replace(N,d)),o[p=j+1+P+b]!==d&&(j=o.indexOf(d,p)),x=o.indexOf(t,p),R=o.indexOf(r,p);break}if(P=M(R),o.substring(j+1+P,j+1+P+w)===r){if(k.push(o.substring(p,j).replace(N,d)),F(j+1+P+w),x=o.indexOf(t,p),j=o.indexOf(d,p),_&&(U(),h))return q();if(a&&C.length>=a)return q(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:C.length,index:p}),j++}}else if(n&&0===k.length&&o.substring(p,p+S)===n){if(-1===R)return q();p=R+w,R=o.indexOf(r,p),x=o.indexOf(t,p)}else if(-1!==x&&(x<R||-1===R))k.push(o.substring(p,x)),p=x+b,x=o.indexOf(t,p);else{if(-1===R)break;if(k.push(o.substring(p,R)),F(R+w),_&&(U(),h))return q();if(a&&C.length>=a)return q(!0)}return L();function D(e){C.push(e),I=p}function M(e){return -1!==e&&(e=o.substring(j+1,e))&&""===e.trim()?e.length:0}function L(e){return y||(void 0===e&&(e=o.substring(p)),k.push(e),p=v,D(k),_&&U()),q()}function F(e){p=e,D(k),k=[],R=o.indexOf(r,p)}function q(n){if(e.header&&!m&&C.length&&!c){var i=C[0],a=Object.create(null),s=new Set(i);let t=!1;for(let r=0;r<i.length;r++){let n=l(i[r]);if(a[n=E(e.transformHeader)?e.transformHeader(n,r):n]){let e,o=a[n];for(;e=n+"_"+o,o++,s.has(e););s.add(e),i[r]=e,a[n]++,t=!0,(u=null===u?{}:u)[e]=n}else a[n]=1,i[r]=n;s.add(n)}t&&console.warn("Duplicate headers found and renamed."),c=!0}return{data:C,errors:O,meta:{delimiter:t,linebreak:r,aborted:h,truncated:!!n,cursor:I+(m||0),renamedHeaders:u}}}function U(){i(q()),C=[],O=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return p}}function y(e){var t=e.data,r=a[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){n=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(E(r.userStep)){for(var s=0;s<t.results.data.length&&(r.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},i),!n);s++);delete t.results}else E(r.userChunk)&&(r.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!n&&v(t.workerId,t.results)}function v(e,t){var r=a[e];E(r.userComplete)&&r.userComplete(t),r.terminate(),delete a[e]}function b(){throw Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t,r=Array.isArray(e)?[]:{};for(t in e)r[t]=w(e[t]);return r}function S(e,t){return function(){e.apply(t,arguments)}}function E(e){return"function"==typeof e}return o.parse=function(t,n){var i,u,h,g=(n=n||{}).dynamicTyping||!1;if(E(g)&&(n.dynamicTypingFunction=g,g={}),n.dynamicTyping=g,n.transform=!!E(n.transform)&&n.transform,!n.worker||!o.WORKERS_SUPPORTED)return g=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=l(t),g=new(n.download?c:f)(n)):!0===t.readable&&E(t.read)&&E(t.on)?g=new p(n):(r.File&&t instanceof File||t instanceof Object)&&(g=new d(n)),g.stream(t);(g=!!o.WORKERS_SUPPORTED&&(u=r.URL||r.webkitURL||null,h=e.toString(),i=o.BLOB_URL||(o.BLOB_URL=u.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",h,")();"],{type:"text/javascript"}))),(i=new r.Worker(i)).onmessage=y,i.id=s++,a[i.id]=i)).userStep=n.step,g.userChunk=n.chunk,g.userComplete=n.complete,g.userError=n.error,n.step=E(n.step),n.chunk=E(n.chunk),n.complete=E(n.complete),n.error=E(n.error),delete n.worker,g.postMessage({input:t,config:n,workerId:g.id})},o.unparse=function(e,t){var r=!1,n=!0,i=",",a="\r\n",s='"',l=s+s,u=!1,c=null,d=!1,f=((()=>
37{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(a=t.newline),"string"==typeof t.quoteChar&&(l=(s=t.quoteChar)+s),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),RegExp(g(s),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||c),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],u);throw Error("Unable to serialize unrecognized input");function p(e,t,r){var s="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),l=!Array.isArray(t[0]);if(o&&n){for(var u=0;u<e.length;u++)0<u&&(s+=i),s+=h(e[u],u);0<t.length&&(s+=a)}for(var c=0;c<t.length;c++){var d=(o?e:t[c]).length,f=!1,p=o?0===Object.keys(t[c]).length:0===t[c].length;if(r&&!o&&(f="greedy"===r?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===r&&o){for(var g=[],m=0;m<d;m++){var y=l?e[m]:m;g.push(t[c][y])}f=""===g.join("").trim()}if(!f){for(var v=0;v<d;v++){0<v&&!p&&(s+=i);var b=o&&l?e[v]:v;s+=h(t[c][b],v)}c<t.length-1&&(!r||0<d&&!p)&&(s+=a)}}return s}function h(e,t){var n,a,u;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(u=!1,d&&"string"==typeof e&&d.test(e)&&(e="'"+e,u=!0),a=(n=e.toString()).replace(f,l),(u=u||!0===r||"function"==typeof r&&r(e,t)||Array.isArray(r)&&r[t]||((e,t)=>{for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1})(a,o.BAD_DELIMITERS)||-1<a.indexOf(i)||-1<n.indexOf(s)||" "===a.charAt(0)||" "===a.charAt(a.length-1))?s+a+s:a)}},o.RECORD_SEP="\x1e",o.UNIT_SEP="\x1f",o.BYTE_ORDER_MARK="\uFEFF",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!n&&!!r.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=0xa00000,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=m,o.ParserHandle=h,o.NetworkStreamer=c,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=p,r.jQuery&&((t=r.jQuery).fn.parse=function(e){var n=e.config||{},i=[];return this.each(function(e){if(!("INPUT"===t(this).prop("tagName").toUpperCase()&&"file"===t(this).attr("type").toLowerCase()&&r.FileReader)||!this.files||0===this.files.length)return!0;for(var a=0;a<this.files.length;a++)i.push({file:this.files[a],inputElem:this,instanceConfig:t.extend({},n)})}),a(),this;function a(){if(0===i.length)E(e.complete)&&e.complete();else{var r,n,a,l=i[0];if(E(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return r=l.file,n=l.inputElem,a=u.reason,void(E(e.error)&&e.error({name:"AbortError"},r,n,a));if("skip"===u.action)return void s();"object"==typeof u.config&&(l.instanceConfig=t.extend(l.instanceConfig,u.config))}else if("skip"===u)return void s()}var c=l.instanceConfig.complete;l.instanceConfig.complete=function(e){E(c)&&c(e,l.file,l.inputElem),s()},o.parse(l.file,l.instanceConfig)}}function s(){i.splice(0,1),a()}}),i&&(r.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?r.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(r.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&r.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(c.prototype=Object.create(u.prototype)).constructor=c,(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(p.prototype=Object.create(u.prototype)).constructor=p,o})?r.apply(t,[]):r)||(e.exports=n)},7273:(e,t,r)=>{"use strict";r.d(t,{_:()=>d});var n=r(4953),i=r(4232),a=r(6056),s=r(8741),o=r(3561),l=r(3282),u=r(3813),c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let d=(0,s.O)((0,o.N)(e=>{var{imageParams:t,field:r,mediaUrlPrefix:s}=e,o=c(e,["imageParams","field","mediaUrlPrefix"]);if((0,u.JE)(r))return null;delete o.editable;let l=r.src?r:r.value;if(!l)return null;l.metadata&&delete l.metadata;let d=((e,t,r)=>{var{src:i,srcSet:s}=e,o=c(e,["src","srcSet"]);if(!i)return null;(0,a.B)(o);let l=Object.assign({},o),u=n.k6(i,t,r);return s&&(l.srcSet=n.tS(u,s,t,r)),l.src=u,l})(Object.assign(Object.assign({},l),o),t,s);return d?i.createElement("img",Object.assign({},d)):null},{defaultEmptyFieldEditingComponent:l.n}));d.displayName="Image"},7274:(e,t,r)=>{let n=r(8311),i=r(9955),a={};
37Object.keys(n).forEach(e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:n[e].channels}),Object.defineProperty(a[e],"labels",{value:n[e].labels});let t=i(e);Object.keys(t).forEach(r=>{let n,i,s=t[r];a[e][r]=(n=function(...e){let t=e[0];if(null==t)return t;t.length>1&&(e=t);let r=s(e);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r},"conversion"in s&&(n.conversion=s.conversion),n),a[e][r].raw=(i=function(...e){let t=e[0];return null==t?t:(t.length>1&&(e=t),s(e))},"conversion"in s&&(i.conversion=s.conversion),i)})}),e.exports=a},7436:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={UnrecognizedActionError:function(){return i},unstable_isUnrecognizedActionError:function(){return a}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});class i extends Error{constructor(...e){super(...e),this.name="UnrecognizedActionError"}}function a(e){return!!(e&&"object"==typeof e&&e instanceof i)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7486:(e,t,r)=>{"use strict";r.d(t,{I:()=>eo});var n,i,a=r(7804),s=r(2770),o=r(8890),l=r(2850),u=r(1187);let c=Object.freeze({cacheTimeout:60,cacheEnabled:!0});class d{constructor(e){var t;this.options=e,this.cache=new u.Cache,this.options.cacheTimeout=(null!=(t=this.options.cacheTimeout)?t:c.cacheTimeout)*1e3,void 0===this.options.cacheEnabled&&(this.options.cacheEnabled=c.cacheEnabled)}getCacheValue(e){return this.options.cacheEnabled?this.cache.get(e):null}setCacheValue(e,t){return this.options.cacheEnabled?this.cache.put(e,t,this.options.cacheTimeout):t}}var f=r(5984);let{UU:p}=a,h=`
38  query DictionarySiteQuery(
39    $siteName: String!
40    $language: String!
41    $pageSize: Int = 500
42    $after: String
43  ) {
44    site {
45      siteInfo(site: $siteName) {
46        dictionary(language: $language, first: $pageSize, after: $after) {
47          pageInfo {
48            endCursor
49            hasNext
50          }
51          results {
52            key
53            value
54          }
55        }
56      }
57    }
58  }
59`;class g{constructor(e){this.options=e,this.cache=this.getCacheClient(),this.graphQLClient=this.getGraphQLClient()}async fetchDictionaryData(e,t,r){var n,i;let a=t+e,s=this.getCacheValue(a);if(s)return f.A.dictionary("using cached dictionary data for %s %s",e,t),s;let o={};f.A.dictionary("fetching dictionary data for %s %s",e,t);let l=[],u=!0,c="";if(!t)throw RangeError(p.MV_002);if(!e)throw RangeError(p.MV_009);for(;u;){let a=await this.graphQLClient.request(h,{siteName:t,language:e,pageSize:this.options.pageSize,after:c},r);(null==(i=null==(n=null==a?void 0:a.site)?void 0:n.siteInfo)?void 0:i.dictionary)?(l=l.concat(a.site.siteInfo.dictionary.results),c=a.site.siteInfo.dictionary.pageInfo.endCursor,u=a.site.siteInfo.dictionary.pageInfo.hasNext):u=!1}return l.forEach(e=>o[e.key]=e.value),this.setCacheValue(a,o),o}setCacheValue(e,t){return this.cache.setCacheValue(e,t)}getCacheValue(e){return this.cache.getCacheValue(e)}getCacheClient(){return new d(this.options)}getGraphQLClient(){var e,t;if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:f.A.dictionary,retries:null==(e=this.options.retries)?void 0:e.count,retryStrategy:null==(t=this.options.retries)?void 0:t.retryStrategy})}}var m=r(2130),y=r(1282);let v=/class=".*(\bck-content\b).*"/g,b=(e,t)=>{e&&"object"==typeof e&&!t.loadStyles&&("value"in e&&"string"==typeof e.value?t.loadStyles=v.test(e.value):"fields"in e?Object.values(e.fields).forEach(e=>{b(e,t)}):Array.isArray(e)&&e.forEach(e=>{b(e,t)}))},w=(e,t)=>{if(t.loadStyles)return;"fields"in e&&e.fields&&Object.values(e.fields).forEach(e=>{b(e,t)});let r=e.placeholders||{};Object.keys(r).forEach(e=>{var n;n=r[e],t.loadStyles||n.forEach(e=>{w(e,t)})})};var S=r(3813);let E=/-library--([^\s]+)/,_=(e,t)=>
59{var r,n,i,a,s,o;let l;"params"in e&&e.params&&(l=(null==(n=null==(r=e.params.CSSStyles)?void 0:r.match(E))?void 0:n[1])||(null==(a=null==(i=e.params.Styles)?void 0:i.match(E))?void 0:a[1])||e.params.LibraryId||void 0),!l&&"fields"in e&&e.fields&&(l=(null==(s=(0,S.GR)(e.fields,"CSSStyles","").match(E))?void 0:s[1])||(null==(o=(0,S.GR)(e.fields,"Styles","").match(E))?void 0:o[1])||(0,S.GR)(e.fields,"LibraryId","")||void 0),l&&t.add(l);let u=e.placeholders||{};Object.keys(u).forEach(e=>{var r;r=u[e],r.map(e=>_(e,t))})},C=new URL(a.Cn).hostname;function O(e){try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase()!==C}catch(e){return!1}}let k=RegExp(`https?://${C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"gi");function I(e,t){let r=(0,y.l)(t);return O(r)?function e(t,r){if(null==t)return t;if("string"==typeof t)return A(t,r);if(Array.isArray(t))return t.map(t=>e(t,r));if("object"==typeof t){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(e,r):e}function A(e,t){return k.lastIndex=0,e.replace(k,t)}class T{constructor(e){this.serviceConfig=e,this.graphQLClient=this.getGraphQLClient()}getGraphQLClient(){var e,t;if(!this.serviceConfig.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.serviceConfig.clientFactory({debugger:this.serviceConfig.debugger||s.Ay.http,retries:null==(e=this.serviceConfig.retries)?void 0:e.count,retryStrategy:null==(t=this.serviceConfig.retries)?void 0:t.retryStrategy})}}class x extends T{constructor(e){super(e),this.serviceConfig=e}async fetchLayoutData(e,t,r){var n,i;let a=t.site,s=this.getLayoutQuery(e,a,null==t?void 0:t.locale);f.A.layout("fetching layout data for %s %s %s",e,null==t?void 0:t.locale,a);let o=await this.graphQLClient.request(s,{},r);return(null==(i=null==(n=null==o?void 0:o.layout)?void 0:n.item)?void 0:i.rendered)||{sitecore:{context:{pageEditing:!1,language:null==t?void 0:t.locale},route:null}}}getLayoutQuery(e,t,r){let n=r?`, language:"${r}"`:"",i=this.serviceConfig.formatLayoutQuery?this.serviceConfig.formatLayoutQuery(t,e,r):`layout(site:"${t}", routePath:"${e}"${n})`;return`query ContentSdkLayoutQuery {
60      ${i}{
61        item {
62          rendered
63        }
64      }
65    }`}}var R=r(2479),N=r(3802);let j=e=>Object.assign(Object.assign({},e),{componentName:N.Y,experiences:{}});function P(e,t,r){var n;e.sitecore.context.variantId=t;let i=(null==(n=e.sitecore.route)?void 0:n.placeholders)||{};if(0===Object.keys(i).length)return;let a=e.sitecore.context.pageEditing;
65return i&&Object.keys(i).forEach(e=>{i[e]=function e(t,r,n){return t.map(t=>{if(void 0!==t.experiences){var i=t,a=r,s=n;let o=Object.keys(i.experiences).find(e=>a.includes(e)),l=o&&i.experiences[o];if(l||i.componentName)if(l&&null===l.componentName&&null===l.dataSource)if(!s)return null;else i=j(i);else l&&(i=l);else{if(!s)return null;i=j(i)}return i.experiences&&(i.experiences={}),i.placeholders&&Object.keys(null==i?void 0:i.placeholders).forEach(t=>{i.placeholders&&(i.placeholders[t]=e(i.placeholders[t],a))}),i}if(t.placeholders){let i=t.placeholders;Object.keys(i).forEach(t=>{i[t]=e(i[t],r,n)})}return t}).filter(Boolean)}(i[e],[t,...r||[]],a)}),i}let{UU:D}=a,M="sitemap",L=`
66  query SitemapQuery($siteName: String!) {
67    site {
68      siteInfo(site: $siteName) {
69        sitemap
70      }
71    }
72  }
73`;class F{constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return L}async fetchSitemaps(e){let t=this.options.siteName;if(!t)throw Error(D.MV_002);let r=this.graphQLClient.request(this.query,{siteName:t},e);try{return r.then(e=>e.site.siteInfo.sitemap)}catch(e){return Promise.reject(e)}}async getSitemap(e){let t;if(void 0!==e){if(""===e)t=`${M}.xml`;else{let r=e.startsWith("-")?e.slice(1):e;t=`${M}-${r}.xml`}return(await this.fetchSitemaps()).find(e=>e.includes(t))}}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:f.A.sitemap})}}let{UU:q}=a,U=`
74  query ErrorPagesQuery($siteName: String!, $language: String!) {
75    site {
76      siteInfo(site: $siteName) {
77        errorHandling(language: $language) {
78          notFoundPage {
79            rendered
80          }
81          notFoundPagePath
82          serverErrorPage {
83            rendered
84          }
85          serverErrorPagePath
86        }
87      }
88    }
89  }
90`;class ${constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return U}async fetchErrorPages(e,t,r){let n=t||this.options.language;if(!e)throw Error(q.MV_002);return this.graphQLClient.request(this.query,{siteName:e,language:n},r).then(e=>{var t,r;if(!e.site.siteInfo)return null;let n=e.site.siteInfo.errorHandling,i=(null==(t=n.notFoundPage)?void 0:t.rendered)?{rendered:n.notFoundPage.rendered}:null,a=(null==(r=n.serverErrorPage)?void 0:r.rendered)?{rendered:n.serverErrorPage.rendered}:null;return Object.assign(Object.assign({},n),{notFoundPage:i,serverErrorPage:a})}).catch(e=>Promise.reject(e))}getGraphQLClient(){var e,t;if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:f.A.errorpages,retries:null==(e=this.options.retries)?void 0:e.count,retryStrategy:null==(t=this.options.retries)?void 0:t.retryStrategy})}}let V="_site_";function z(e){let t=e.match(`${V}.*?(?:\\/|$)`);return null===t?e:e.replace(t[0],"")}let{UU:B}=a;class G{constructor(e){this.options=e,this._graphQLClient=this.getGraphQLClient()}get graphQLClient(){return this._graphQLClient}get query(){let e;return e=this.options.includePersonalizedRoutes,`
91query ${e?"PersonalizeSitemapQuery":"DefaultSitemapQuery"}(
92  $siteName: String!
93  $language: String!
94  $includedPaths: [String]
95  $excludedPaths: [String]
96  $pageSize: Int = 100
97  $after: String
98) {
99  site {
100    siteInfo(site: $siteName) {
101      routes(
102        language: $language
103        includedPaths: $includedPaths
104        excludedPaths: $excludedPaths
105        first: $pageSize
106        after: $after
107      ){
108        total
109        pageInfo {
110          endCursor
111          hasNext
112        }
113        results {
114          path: routePath
115          ${e?`
116              route {
117                personalization {
118                  variantIds
119                }
120              }`:""}
121        }
122      }
123    }
124  }
125}
126`}async fetchSiteRoutes(e,t,r){let n=(e,t)=>({params:{path:e},locale:t}),i=[];if(!t.length)throw RangeError(B.MV_009);if(!e||!e.length)throw RangeError("The list of sites cannot be empty");for(let a=0;a<e.length;a++)for(let s of t){let t=await this.fetchLanguageSitePaths(s,e[a],r),o=await this.transformLanguageSitePaths(t,n,s);i.push(...o)}return[].concat(...i)}async transformLanguageSitePaths(e,t,r){let n=e=>decodeURI(e).replace(/^\/|\/$/g,"").split("/"),i=[];
126return e.forEach(e=>{var a,s,o;if(!e)return;i.push(t(n(e.path),r));let l=null==(o=null==(s=null==(a=e.route)?void 0:a.personalization)?void 0:s.variantIds)?void 0:o.filter(e=>!e.includes("_"));(null==l?void 0:l.length)&&i.push(...l.map(i=>t(n((0,R.F3)(e.path,[i])),r)))}),i}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:f.A.sitemap})}async fetchLanguageSitePaths(e,t,r){var n,i,a,s;let o={siteName:t,language:e,pageSize:this.options.pageSize,includedPaths:this.options.includedPaths,excludedPaths:this.options.excludedPaths},l=[],u=!0,c="";for(f.A.sitemap("fetching sitemap data for %s %s",e,t);u;){let e=await this.graphQLClient.request(this.query,Object.assign(Object.assign({},o),{after:c}),r);if(null==(n=null==e?void 0:e.site)?void 0:n.siteInfo)l=l.concat(null==(i=e.site.siteInfo.routes)?void 0:i.results),u=null==(a=e.site.siteInfo.routes)?void 0:a.pageInfo.hasNext,c=null==(s=e.site.siteInfo.routes)?void 0:s.pageInfo.endCursor;else throw RangeError(B.IV_007(t))}return l.forEach(e=>{var r;let n;e&&(r=e.path,n=r.startsWith("/")?r:"/"+r,e.path=`/${V}${({siteName:t}).siteName}${n}`)}),l}}var H=r(6652);let{UU:Q}=a,Y=`
127  query RobotsQuery($siteName: String!) {
128    site {
129      siteInfo(site: $siteName) {
130        robots
131      }
132    }
133  }
134`;class W{constructor(e){this.options=e,this.graphQLClient=this.getGraphQLClient()}get query(){return Y}async fetchRobots(e){let t=this.options.siteName;if(!t)throw Error(Q.MV_002);let r=this.graphQLClient.request(this.query,{siteName:t},e);try{return r.then(e=>{var t,r;return null==(r=null==(t=null==e?void 0:e.site)?void 0:t.siteInfo)?void 0:r.robots})}catch(e){return Promise.reject(e)}}getGraphQLClient(){if(!this.options.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.options.clientFactory({debugger:f.A.robots})}}var K=r(5122);let Z=`
135  query EditingQuery($itemId: String!, $language: String!, $version: String) {
136    item(path: $itemId, language: $language, version: $version) {
137      rendered
138    }
139  }
140`;class J{constructor(e){this.serviceConfig=e,this.graphQLClient=this.getGraphQLClient()}async fetchEditingData({itemId:e,language:t,version:r,layoutKind:n=K.dQ.Final,mode:i},a){var s;if(f.A.editing("fetching editing data for %s %s %s %s",e,t,r,n),!t)throw RangeError("The language must be a non-empty string");let o=await this.graphQLClient.request(Z,{itemId:e,version:r,language:t},Object.assign(Object.assign({},a),{headers:{sc_layoutKind:n,sc_editMode:"edit"===i?"true":"false"}}));return{layoutData:(null==(s=null==o?void 0:o.item)?void 0:s.rendered)||{sitecore:{context:{pageEditing:!0,language:t},route:null}}}}getGraphQLClient(){if(!this.serviceConfig.clientFactory)throw Error("clientFactory needs to be provided when initializing GraphQL client.");return this.serviceConfig.clientFactory({debugger:f.A.editing})}}var X=r(8217);r(9742);let{UU:ee}=a;class et{constructor(e){this.config=e}fetchComponentData(e,t){let r=this.config.contextId||this.config.clientContextId;if(!r)throw Error(ee.MV_001);let n=new o.j({debugger:f.A.layout});return f.A.layout("fetching component with uid %s for %s %s %s %s",e.componentUid,e.itemId,e.language,e.siteName,e.dataSourceId),n.get(this.getFetchUrl(e),Object.assign(Object.assign({},t),{headers:Object.assign(Object.assign({},null==t?void 0:t.headers),{"x-sitecore-contextid":r,sc_editMode:`${e.mode===K.lq.Metadata}`})})).then(e=>e.data).catch(e=>{var t;if((null==(t=e.response)?void 0:t.status)===404)return e.response.data;throw e})}getComponentFetchParams(e){return JSON.parse(JSON.stringify({item:e.itemId,uid:e.componentUid,dataSourceId:e.dataSourceId,renderingItemId:e.renderingId,version:e.version,sc_site:e.siteName,sc_lang:e.language||"en"}))}getFetchUrl(e){var t;let r=(0,y.l)(null!=(t=this.config.edgeUrl)?t:a.Ty);return function(e,t={}){if(!e)throw RangeError("url must be a non-empty string");if((0,X.A)()){let r=new URL(e);for(let e in t)({}).hasOwnProperty.call(t,e)&&r.searchParams.append(e,String(t[e]));return r.toString()}let r=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t[e]))}`).join("&");return -1!==e.indexOf("?")?`${e}&${r}`:`${e}?${r}`}(`${r}/layout/component`,this.getComponentFetchParams(e))}}let{UU:er}=a;(n=i||(i={})).NotFound="404",n.InternalServerError="500";class en{constructor(e){var t,r,n,i,a,o,l,u,c,d;this.initOptions=e,this.clientFactory=this.getClientFactory(),this.graphQLClient=this.clientFactory({debugger:s.Ay.http});const f=this.getBaseServiceOptions();this.layoutService=null!=(r=null==(t=e.custom)?void 0:t.layoutService)?r:this.getLayoutService(f),this.dictionaryService=null!=(i=null==(n=e.custom)?void 0:n.dictionaryService)?i:this.getDictionaryService(f),this.editingService=null!=(o=null==(a=e.custom)?void 0:a.editingService)?o:this.getEditingService(),this.errorPagesService=null!=(u=null==(l=e.custom)?void 0:l.errorPagesService)?u:this.getErrorPagesService(),this.sitePathService=null!=(d=null==(c=e.custom)?void 0:c.sitePathService)?d:this.getSitePathService(),this.componentService=this.getComponentService()}parsePath(e){return"string"==typeof e?e.startsWith("/")?e:`/${e}`:`/${e.filter(e=>"/"!==e).map(e=>e.replace(/^\/+/,"").replace(/\/+$/,"")).join("/")}`}getData(e,t,r){return this.graphQLClient.request(e,t,r)}async getPage(e,t,r){var n,i,a,s;let o=this.parsePath(e),l=null!=(n=null==t?void 0:t.locale)?n:this.initOptions.defaultLanguage,u=null!=(i=null==t?void 0:t.site)?i:this.initOptions.defaultSite,c=await this.layoutService.fetchLayoutData(o,{locale:l,site:u},r);return c.sitecore.route?((null==(a=null==t?void 0:t.personalize)?void 0:a.variantId)&&P(c,t.personalize.variantId,t.personalize.componentVariantIds),{layout:c=this.applyContentRewrite(c),siteName:(null==(s=c.sitecore.context.site)?void 0:s.name)||u,locale:l,mode:this.getPageMode(m.IY.Normal)}):null}getHeadLinks(e,t={}){let{enableStyles:r=!0,enableThemes:n=!0}=t,{contextId:i,clientContextId:s}=this.initOptions.api.edge,o=[],u=i||s,c=(0,l.Ly)();if(r){let t=((e,t,r=a.Ty)=>{if(!e.sitecore.route)return null;let n={loadStyles:!1};return(w(e.sitecore.route,n),n.loadStyles)?{href:((e,t=a.Ty)=>`${(0,y.l)(t)}/v1/files/pages/styles/content-styles.css?sitecoreContextId=${e}`)(t,r),rel:"stylesheet"}:null})(e,u,c);t&&o.push(t)}return n&&o.push(...function(e,t,r=a.Ty){let n=new Set;return e.sitecore.route?(_(e.sitecore.route,n),[...n].map(e=>({href:((e,t,r=a.Ty)=>`${(0,y.l)(r)}/v1/files/components/styles/${e}
140.css?sitecoreContextId=${t}`)(e,t,r),rel:"stylesheet"}))):[]}(e,u,c)),o}async getDictionary(e,t){let r=(null==e?void 0:e.locale)||this.initOptions.defaultLanguage,n=(null==e?void 0:e.site)||this.initOptions.defaultSite;return await this.dictionaryService.fetchDictionaryData(r,n,t)}async getErrorPages(e,t){let r=(null==e?void 0:e.locale)||this.initOptions.defaultLanguage,n=(null==e?void 0:e.site)||this.initOptions.defaultSite;return await this.errorPagesService.fetchErrorPages(n,r,t)}async getPreview(e,t){var r;if(!e)return console.error("Preview data missing"),null;let{site:n,itemId:i,language:a,version:s,layoutKind:o,mode:l}=e,u=Array.isArray(e.variantIds)?e.variantIds:e.variantIds.split(","),c=await this.editingService.fetchEditingData({itemId:i,language:a,version:s,layoutKind:o,mode:l},t);if(!c)throw Error(`Unable to fetch editing data for preview ${JSON.stringify(e)}. ${er.CONTACT_SUPPORT}`);let d=c.layoutData,f=(0,R.Hg)(u);return P(d,f.variantId,f.componentVariantIds),{locale:a,layout:d=this.applyContentRewrite(d),siteName:(null==(r=d.sitecore.context.site)?void 0:r.name)||n,mode:this.getPageMode(l)}}async getDesignLibraryData(e,t){var r;let{itemId:n,componentUid:i,site:a,language:s,renderingId:o,dataSourceId:l,version:u,mode:c,generation:d}=e,f=await this.componentService.fetchComponentData(Object.assign({siteName:a,itemId:n,language:s,componentUid:i,renderingId:o,dataSourceId:l,version:u,mode:c},d?{generation:d}:{}),t);if(!f)throw Error(`Unable to fetch editing data for preview ${JSON.stringify(e)}. ${er.CONTACT_SUPPORT}`);let p=this.applyContentRewrite(f);return{locale:e.language,layout:p,siteName:(null==(r=p.sitecore.context.site)?void 0:r.name)||a,mode:this.getPageMode(c,d)}}async getErrorPage(e,t,r){var n,a;let s=(null==t?void 0:t.locale)||this.initOptions.defaultLanguage,o=(null==t?void 0:t.site)||this.initOptions.defaultSite,l=await this.getErrorPages({site:o,locale:s},r),u=null;switch(e){case i.NotFound:u=(null==(n=null==l?void 0:l.notFoundPage)?void 0:n.rendered)||null;break;case i.InternalServerError:u=(null==(a=null==l?void 0:l.serverErrorPage)?void 0:a.rendered)||null;break;default:return null}return u?{layout:u=this.applyContentRewrite(u),locale:s,mode:this.getPageMode(m.IY.Normal),siteName:o}:null}async getPagePaths(e,t,r){return this.sitePathService.fetchSiteRoutes(e,t||[],r)}async getSiteMap(e,t){let{reqHost:r,reqProtocol:n,id:i,siteName:a}=e,s=this.getGraphqlSitemapXMLService(a||this.initOptions.defaultSite),u=await s.getSitemap(i);if(u)try{let e=(0,l.NP)(),t=I(u,e),r=new o.j,n=await r.fetch(t);if(!n.data)throw Error("REDIRECT_404");return I(n.data,e)}catch(e){throw Error("REDIRECT_404")}let c=await s.fetchSitemaps(t);if(!c.length)throw Error("REDIRECT_404");return`<?xml version="1.0" encoding="UTF-8"?>
141      <sitemapindex xmlns="http://sitemaps.org/schemas/sitemap/0.9">
142      ${c.map(e=>{let t=e.split("/"),i=t[t.length-1],a=`${n}://${r}/${i}`.replace(/&/g,"&amp;");return`<sitemap><loc>${a}</loc></sitemap>`}).join("")}
143      </sitemapindex>`}async getRobots(e,t){let r=this.getRobotsService(e||this.initOptions.defaultSite);return await r.fetchRobots(t)||null}getGraphqlSitemapXMLService(e){return new F({clientFactory:this.clientFactory,siteName:e})}getRobotsService(e){return new W({clientFactory:this.clientFactory,siteName:e})}getBaseServiceOptions(){return{defaultSite:this.initOptions.defaultSite,clientFactory:this.clientFactory,retries:this.initOptions.retries}}applyContentRewrite(e){let t,r=this.initOptions.rewriteMediaUrls;if(!r)return e;let n=(0,l.NP)();return function e(t,r){if(null==t)return t;if("string"==typeof t)return r(t);if(Array.isArray(t))return t.map(t=>e(t,r));if("object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){let n={};for(let i of Object.keys(t))n[i]=e(t[i],r);return n}return t}(e,!0===r?O(t=(0,y.l)(n))?e=>A(e,t):e=>e:r)}getPageMode(e,t){let r={name:e,isNormal:!1,isPreview:!1,isEditing:!1,isDesignLibrary:!1,designLibrary:{isVariantGeneration:!1}};switch(e){case m.IY.Normal:r.isNormal=!0;break;case m.IY.Preview:r.isPreview=!0;break;case m.IY.Edit:r.isEditing=!0;break;case K.lq.Normal:r.isDesignLibrary=!0;break;case K.lq.Metadata:r.isDesignLibrary=!0,r.isEditing=!0}return r.isDesignLibrary&&t===K.pM.Variant&&(r.designLibrary.isVariantGeneration=!0,r.isEditing=!0),r}getClientFactory(){let e={api:this.initOptions.api,retries:this.initOptions.retries.count,retryStrategy:this.initOptions.retries.retryStrategy};return(0,H.V)(e)}getLayoutService(e){return new x(Object.assign(Object.assign({},e),{formatLayoutQuery:this.initOptions.layout.formatLayoutQuery}))}getDictionaryService(e){return new g(Object.assign(Object.assign({},e),{cacheEnabled:this.initOptions.dictionary.caching.enabled,cacheTimeout:this.initOptions.dictionary.caching.timeout}))}
143getEditingService(){return new J({clientFactory:this.clientFactory})}getErrorPagesService(){return new $(Object.assign(Object.assign({},this.initOptions),{language:this.initOptions.defaultLanguage,clientFactory:this.clientFactory}))}getComponentService(){return new et(this.initOptions.api.edge)}getSitePathService(){return new G({clientFactory:this.clientFactory})}}var ei=r(3774),ea=r.n(ei);class es{async fetchComponentProps(e){var t;let{layoutData:r,context:n,components:i}=e,a=await this.collectRequests({placeholders:null==(t=r.sitecore.route)?void 0:t.placeholders,components:i,layoutData:r,context:n});return await this.execRequests(a)}async collectRequests(e){let{placeholders:t={},components:r,layoutData:n,context:i}=e;e.requests||(e.requests=[]);let a=this.flatRenderings(t).map(async t=>{var a;let s=null==(a=await this.getModule(r,t.componentName))?void 0:a.getComponentServerProps;s&&e.requests&&e.requests.push({fetch:s,rendering:t,layoutData:n,context:i}),t.placeholders&&await this.collectRequests(Object.assign(Object.assign({},e),{placeholders:t.placeholders}))});return await Promise.all(a),e.requests}async execRequests(e){let t={},r=e.map(e=>{let{uid:r}=e.rendering;return r?e.fetch(e.rendering,e.layoutData,e.context).then(e=>{t[r]=e}).catch(n=>{let i=`Error during preload data for component ${e.rendering.componentName} (${r}): ${n.message||n}`;console.error(ea().red(i)),t[r]={error:n.message||i,componentName:e.rendering.componentName}}):void console.log(`Component ${e.rendering.componentName} doesn't have uid, can't store data for this component`)});return await Promise.all(r),t}flatRenderings(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e)}),t}async getModule(e,t){var r;let n=e.get(t);return n?n.dynamicModule?await (null==(r=null==n?void 0:n.dynamicModule)?void 0:r.call(n)):n:null}}class eo extends en{constructor(e){super(e),this.initOptions=e,this.componentPropsService=this.getComponentPropsService()}getSiteNameFromPath(e){var t;let r,n;return(t=super.parsePath(e),r={siteName:this.initOptions.defaultSite},(n=(t.endsWith("/")?t:t+"/").match(`${V}(.*?)\\/`))&&""!==n[1]&&(r.siteName=n[1]),r).siteName}parsePath(e){let t=super.parsePath(e);return z((0,R.SH)(t))}async getPage(e,t,r){let n=this.parsePath(e),i=t.personalize||(0,R.XG)(super.parsePath(e)),a=t.site||this.getSiteNameFromPath(e);return await super.getPage(n,{locale:t.locale,site:a,personalize:i},r)}async getDesignLibraryData(e,t){return super.getDesignLibraryData(e,t)}async getPreview(e,t){return super.getPreview(e,t)}async getAppRouterStaticParams(e,t,r){let n=await super.getPagePaths(e,t,r),i=[];return n.map(e=>{var t;let r=z(e.params.path.join("/")).split("/");i.push({locale:null!=(t=e.locale)?t:this.initOptions.defaultLanguage,site:this.getSiteNameFromPath(e.params.path),path:r})}),i}async getPagePaths(e,t,r){var n;let i=await super.getPagePaths(e,t,r);return(null==(n=this.initOptions.multisite)?void 0:n.enabled)||i.map(e=>{e.params.path=z(e.params.path.join("/")).split("/")}),i}async getComponentData(e,t,r){let n={};if(!e.sitecore.route)return n;let i=Object.keys(n=await this.componentPropsService.fetchComponentProps({layoutData:e,context:t,components:r})).map(e=>{let t=n[e];return t.error?`
144Unable to get component props for ${t.componentName} (${e}): ${t.error}`:""}).join("");if(i.length)throw Error(i);return n}getComponentPropsService(){return new es}}},7711:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e*=1))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},7749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return c},getImageProps:function(){return u}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(4252),s=r(5119),o=r(2843),l=a._(r(969));function u(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=o.Image},7782:(e,t,r)=>{"use strict";r.d(t,{N:()=>m});
144var n=r(4232),i=r(8230),a=r.n(i),s=r(3813),o=r(8741),l=r(3561),u=r(3282),c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let d=(0,o.O)((0,l.N)(e=>{var{field:t,showLinkTextWithChildrenPresent:r,ref:i}=e,a=c(e,["field","showLinkTextWithChildrenPresent","ref"]);let o=a.children;if(delete a.editable,(0,s.JE)(t))return null;let l=t.href?t:t.value;if(!l)return null;let u="anchor"!==l.linktype&&l.anchor?`#${l.anchor}`:"",d=l.querystring?`?${l.querystring}`:"",f={href:`${l.href}${d}${u}`,className:l.class,title:l.title,target:l.target};"_blank"!==f.target||f.rel||(f.rel="noopener noreferrer");let p=r||!o?l.text||l.href:null;return n.createElement("a",Object.assign({},f,a,{key:"link",ref:i}),p,o)},{defaultEmptyFieldEditingComponent:u.G}));d.displayName="Link";var f=r(9742),p=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let h=["as","onNavigate","passHref","prefetch","replace","scroll","shallow"],g=/^\/.*\.\w+$/,m=(0,n.forwardRef)((e,t)=>{let{field:r,editable:i=!0,children:s,internalLinkMatcher:o=/^\//g,showLinkTextWithChildrenPresent:l}=e,u=p(e,["field","editable","children","internalLinkMatcher","showLinkTextWithChildrenPresent"]);if(!r||!r.value&&!r.href&&!r.metadata)return null;let c=r.href?r:r.value,{href:m,querystring:y,anchor:v}=c||{},b=i&&r.metadata;if(m&&!b){let r=l||!s?c.text||c.href:null,i=o.test(m),d=g.test(m);if(i&&!d)return n.createElement(a(),Object.assign({href:{pathname:m,query:y,hash:v},key:"link",title:c.title,target:c.target,className:c.class},u,{locale:!1,ref:t},f.env.TEST?{"data-nextjs-link":!0,"data-nextjs-prefetch":e.prefetch}:{}),r,s)}let w=function(e){let t=Object.assign({},e);for(let e of[...h,"internalLinkMatcher"])delete t[e];return t}(e);return n.createElement(d,Object.assign({},w,{ref:t},f.env.TEST?{"data-react-link":!0}:{}))});m.displayName="NextLink"},7829:(e,t,r)=>{"use strict";var n=r(9742);r(2552);var i=r(4232),a=i&&"object"==typeof i&&"default"in i?i:{default:i},s=void 0!==n&&n.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,a=void 0===i?s:i;u(o(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",u("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l=document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(u(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(s||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}
144,r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(u(o(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return s||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed){var r=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){s||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];u(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];u(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEac
144h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},r.cssRules=function(){var e=this;return this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&u(o(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return r?i.insertBefore(n,r):i.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function u(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},d={};function f(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+c(e+"-"+r)),d[n]}function p(e,t){var r=e+t;return d[r]||(d[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[r]}var h=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,a=void 0!==i&&i;this._sheet=n||new l({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=f(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return p(i,e)}):[p(i,t)]}}return{styleId:f(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),g=i.createContext(null);g.displayName="StyleSheetContext";var m=a.default.useInsertionEffect||a.default.useLayoutEffect,y=new h;function v(e){var t=y||i.useContext(g);return t&&m(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}v.dynamic=function(e){return e.map(function(e){return f(e[0],e[1])}).join(" ")},t.style=v},8135:(e,t,r)=>{"use strict";let n;e=r.nmd(e);let i=(e,t)=>(...r)=>{let n=e(...r);return`\u001B[${n+t}m`},a=(e,t)=>(...r)=>{let n=e(...r);return`\u001B[${38+t};5;${n}m`},s=(e,t)=>(...r)=>{let n=e(...r);return`\u001B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},o=e=>e,l=(e,t,r)=>[e,t,r],u=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},c=(e,t,i,a)=>
144{void 0===n&&(n=r(7274));let s=10*!!a,o={};for(let[r,a]of Object.entries(n)){let n="ansi16"===r?"ansi":r;r===t?o[n]=e(i,s):"object"==typeof a&&(o[n]=e(a[t],s))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};for(let[r,n]of(t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright,Object.entries(t))){for(let[r,i]of Object.entries(n))t[r]={open:`\u001B[${i[0]}m`,close:`\u001B[${i[1]}m`},n[r]=t[r],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1b[39m",t.bgColor.close="\x1b[49m",u(t.color,"ansi",()=>c(i,"ansi16",o,!1)),u(t.color,"ansi256",()=>c(a,"ansi256",o,!1)),u(t.color,"ansi16m",()=>c(s,"rgb",l,!1)),u(t.bgColor,"ansi",()=>c(i,"ansi16",o,!0)),u(t.bgColor,"ansi256",()=>c(a,"ansi256",o,!0)),u(t.bgColor,"ansi16m",()=>c(s,"rgb",l,!0)),t}})},8230:(e,t,r)=>{e.exports=r(440)},8311:(e,t,r)=>{let n=r(894),i={};for(let e of Object.keys(n))i[n[e]]=e;let a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(let t of(e.exports=a,Object.keys(a))){if(!("channels"in a[t]))throw Error("missing channels property: "+t);if(!("labels"in a[t]))throw Error("missing channel labels property: "+t);if(a[t].labels.length!==a[t].channels)throw Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=a[t];delete a[t].channels,delete a[t].labels,Object.defineProperty(a[t],"channels",{value:e}),Object.defineProperty(a[t],"labels",{value:r})}a.rgb.hsl=function(e){let t,r=e[0]/255,n=e[1]/255,i=e[2]/255,a=Math.min(r,n,i),s=Math.max(r,n,i),o=s-a;s===a?t=0:r===s?t=(n-i)/o:n===s?t=2+(i-r)/o:i===s&&(t=4+(r-n)/o),(t=Math.min(60*t,360))<0&&(t+=360);let l=(a+s)/2;return[t,100*(s===a?0:l<=.5?o/(s+a):o/(2-s-a)),100*l]},a.rgb.hsv=function(e){let t,r,n,i,a,s=e[0]/255,o=e[1]/255,l=e[2]/255,u=Math.max(s,o,l),c=u-Math.min(s,o,l),d=function(e){return(u-e)/6/c+.5};return 0===c?(i=0,a=0):(a=c/u,t=d(s),r=d(o),n=d(l),s===u?i=n-r:o===u?i=1/3+t-n:l===u&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*u]},a.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2];return[a.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(r,n))*100,100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},a.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t,r=i[e];if(r)return r;let a=1/0;for(let r of Object.keys(n)){let i=n[r],s=(e[0]-i[0])**2+(e[1]-i[1])**2+(e[2]-i[2])**2;s<a&&(a=s,t=r)}return t},a.keyword.rgb=function(e){return n[e]},a.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?((t+.055)/1.055)**2.4:t/12.92)+.3576*(r=r>.04045?((r+.055)/1.055)**2.4:r/12.92)+.1805*(n=n>.04045?((n+.055)/1.055)**2.4:n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),r=t[0],n=t[1],i=t[2];return r/=95.047,n/=100,i/=108.883,[116*(n=n>.008856?n**(1/3):7.787*n+16/116)-16,500*((r=r>.008856?r**(1/3):7.787*r+16/116)-n),200*(n-(i=i>.008856?i**(1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){let t,r,n,i=e[0]/360,a=e[1]/100,s=e[2]/100;if(0===a)return[n=255*s,n,n];t=s<.5?s*(1+a):s+a-s*a;let o=2*s-t,l=[0,0,0];for(let e=0;e<3;e++)(r=i+-(1/3*(e-1)))<0&&r++,r>1&&r--,n=6*r<1?o+(t-o)*6*r:2*r<1?t:3*r<2?o+(t-o)*(2/3-r)*6:o,l[e]=255*n;return l},a.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=r,a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;let s=(n+r)/2;return[t,100*(0===n?2*i/(a+i):2*r/(n+r)),100*s]},a.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),s=255*n*(1-r),o=255*n*(1-r*a),l=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,l,s];case 1:return[o,n,s];case 2:return[s,n,l];case 3:return[s,o,n];case 4:return[l,s,n];case 5:return[n,s,o]}},a.hsv.hsl=function(e){let t,r,n=e[0],i=e[1]/100,a=e[2]/100,s=Math.max(a,.01);r=(2-i)*a;let o=(2-i)*s;return[n,100*(t=(t=i*s/(o<=1?o:2-o))||0),100*(r/=2)]},a.hwb.rgb=function(e){let t,r,n,i,a=e[0]/360,s=e[1]/100,o=e[2]/100,l=s+o;l>1&&(s/=l,o/=l);let u=Math.floor(6*a),c=1-o;t=6*a-u,(1&u)!=0&&(t=1-t);let d=s+t*(c-s);switch(u){default:case 6:case 0:r=c,n=d,i=s;break;case 1:r=d,n=c,i=s;break;case 2:r=s,n=c,i=d;break;case 3:r=s,n=d,i=c;break;case 4:r=d,n=s,i=c;break;case 5:r=c,n=s,i=d}return[255*r,255*n,255*i]},a.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},a.xyz.rgb=function(e){let t,r,n,i=e[0]/100,a=e[1]/100,s=e[2]/100;return t=(t=3.2406*i+-1.5372*a+-.4986*s)>.0031308?1.055*t**(1/2.4)-.055:12.92*t,r=(r=-.9689*i+1.8758*a+.0415*s)>.0031308?1.055*r**(1/2.4)-.055:12.92*r,n=(n=.0557*i+-.204*a+1.057*s)>.0031308?1.055*n**(1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},a.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];return t/=95.047,r/=100,n/=108.883,[116*(r=r>.008856?r**(1/3):7.787*r+16/116)-16,500*((t=t>.008856?t**(1/3):7.787*t+16/116)-r),200*(r-(n=n>.008856?n**(1/3):7.787*n+16/116))]},a.lab.xyz=function(e){let t,r,n,i=e[0],a=e[1],s=e[2];t=a/500+(r=(i+16)/116),n=r-s/200;let o=r**3,l=t**3,u=n**3;return r=(o>.008856?o:(r-16/116)/7.787)*100,[t=(l>.008856?l:(t-16/116)/7.787)*95.047,r,n=(u>.008856?u:(n-16/116)/7.787)*108.883]},a.lab.lch=function(e){let t,r=e[0],n=e[1],i=e[2];return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]},a.lch.lab=function(e){let t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},a.rgb.ansi16=function(e,t=null){let[r,n,i]=e,s=null===t?a.rgb.hsv(e)[2]:t;
144if(0===(s=Math.round(s/50)))return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===s&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];let r=(~~(e>50)+1)*.5;return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},a.ansi256.rgb=function(e){let t;if(e>=232){let t=(e-232)*10+8;return[t,t,t]}return[Math.floor((e-=16)/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));let n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},a.rgb.hcg=function(e){let t,r=e[0]/255,n=e[1]/255,i=e[2]/255,a=Math.max(Math.max(r,n),i),s=Math.min(Math.min(r,n),i),o=a-s;return t=o<1?s/(1-o):0,[360*((o<=0?0:a===r?(n-i)/o%6:a===n?2+(i-r)/o:4+(r-n)/o)/6%1),100*o,100*t]},a.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];let i=[0,0,0],a=t%1*6,s=a%1,o=1-s,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return l=(1-r)*n,[(r*i[0]+l)*255,(r*i[1]+l)*255,(r*i[2]+l)*255]},a.hcg.hsv=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},a.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},a.hcg.hwb=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],(r-t)*100,(1-r)*100]},a.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},8313:(e,t,r)=>{"use strict";r.d(t,{l:()=>b});var n={};r.r(n),r.d(n,{mZ:()=>d,dX:()=>c,u2:()=>f});var i=r(4232),a=r(7574),s=r(7804),o=r(1228),l=r(5984);let{UU:u}=s,c=async(e,t,r)=>{if(!e)return l.A.form(`${u.MV_001}. Form was not able to render.`),"";let n=(0,o.k)(e,t,r);try{l.A.form(`Fetching form data from ${n}`);let e=await fetch(n,{method:"GET",cache:"no-cache"});if(200!==e.status)throw Error(`Failed to fetch form data. ${u.CONTACT_SUPPORT}`);let t=await e.text();return l.A.form(`Form data fetch response: ${t}`),t}catch(e){throw l.A.form(`Form '${t}' was not able to render. ${u.CONTACT_SUPPORT}`,e),e}},d=e=>{let t=e.querySelectorAll("script");t&&Array.from(t).forEach(e=>{var t;let r=document.createElement("script");Array.from(e.attributes).forEach(e=>{r.setAttribute(e.name,e.value)}),r.text=e.text,null==(t=null==e?void 0:e.parentNode)||t.replaceChild(r,e)})},f=(e,t)=>{e.addEventListener("form:engage",e=>{let{formId:r,name:n}=e.detail;r&&n&&(l.A.form("Sending form event",r,n),(0,a.Zd)(r,n,(null==t?void 0:t.replace(/-/g,""))||""))})};var p=r(4825),h=r(9764);let{UU:g}=s,{mZ:m,dX:y,u2:v}=n,b=({params:e,rendering:t})=>{var r,n,a,s,o;let l=null==e?void 0:e.RenderingIdentifier,[u,c]=(0,i.useState)(!1),[d,f]=(0,i.useState)(""),b=(0,p.M5)(),w=(0,i.useRef)(null),S=b.page.mode.isEditing;return((0,i.useEffect)(()=>{var r,n,i,a;if(d){if(!w.current)return;S||v(w.current,t.uid),m(w.current)}else{let t=null==(n=null==(r=b.api)?void 0:r.edge)?void 0:n.clientContextId;if(!t)return void console.warn(`${g.MV_006}. Form cannot be loaded properly on the client`);y(t,e.FormId,null==(a=null==(i=b.api)?void 0:i.edge)?void 0:a.edgeUrl).then(f).catch(()=>{S&&console.error(`Failed to load form with id ${e.FormId}. Check debug logs for content-sdk:form for more details. ${g.CONTACT_SUPPORT}`),c(!0)})}},[d,S,e.FormId,t.uid,null==(n=null==(r=b.api)?void 0:r.edge)?void 0:n.clientContextId,null==(s=null==(a=b.a
144pi)?void 0:a.edge)?void 0:s.edgeUrl]),S&&u)?i.createElement(h.A,{message:"There was a problem loading this section"}):i.createElement("div",{ref:w,dangerouslySetInnerHTML:{__html:d},className:null==(o=e.styles)?void 0:o.trimEnd(),id:l||void 0})}},8321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0}},8361:e=>{"use strict";e.exports={stdout:!1,stderr:!1}},8398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useRouter",{enumerable:!0,get:function(){return a}});let n=r(4232),i=r(2925);function a(){return(0,n.useContext)(i.RouterContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fullJitter=function(e){return Math.round(Math.random()*e)}},8741:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(4232),i=r(5122);let a=e=>{let t=JSON.stringify(e.metadata),r={type:"text/sitecore",chrometype:"field",className:"scpm"},a=Object.assign(Object.assign({},r),{kind:i.mV.Open}),s=Object.assign(Object.assign({},r),{kind:i.mV.Close});return n.createElement(n.Fragment,null,n.createElement("code",Object.assign({},a),t),e.children,n.createElement("code",Object.assign({},s)))};function s(e,t=!1){return t?t=>{var r;let{editable:i=!0}=t,s=null==(r=t.field)?void 0:r.metadata;return s&&i?n.createElement(a,{metadata:s},n.createElement(e,Object.assign({},t))):n.createElement(e,Object.assign({},t))}:t=>{var r;let{editable:i=!0}=t,s=null==(r=t.field)?void 0:r.metadata;return s&&i?n.createElement(a,{metadata:s},n.createElement(e,Object.assign({},t))):n.createElement(e,Object.assign({},t))}}a.displayName="FieldMetadata"},8806:(e,t,r)=>{"use strict";e.exports=r(9429)},8932:e=>{e.exports=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()}},8954:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AlwaysDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(3770).Delay)},8955:(e,t)=>{"use strict";function r(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findClosestQuality",{enumerable:!0,get:function(){return r}})},8965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8578),i=r(3902);t.JitterFactory=function(e){return"full"===e.jitter?n.fullJitter:i.noJitter}},8992:(e,t,r)=>{"use strict";r.d(t,{Gb:()=>T,Jt:()=>f,hZ:()=>h,mN:()=>ei});var n=r(4232),i=e=>e instanceof Date,a=e=>null==e,s=e=>!a(e)&&!Array.isArray(e)&&"object"==typeof e&&!i(e),o="u">typeof window&&void 0!==window.HTMLElement&&"u">typeof document;function l(e){let t;if(e instanceof Date)return new Date(e);let r="u">typeof FileList&&e instanceof FileList;if(o&&(e instanceof Blob||r))return e;let n=Array.isArray(e);if(!n&&!(s(e)&&s(t=e.constructor&&e.constructor.prototype)&&t.hasOwnProperty("isPrototypeOf")))return e;let i=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=l(e[t]));return i}var u=e=>void 0===e,c=e=>Array.isArray(e)?e.filter(Boolean):[],d=e=>c(e.replace(/["|']|\]/g,"").split(/\.|\[/)),f=(e,t,r)=>{if(!t||!s(e))return r;let n=(/^\w*$/.test(t)?[t]:d(t)).reduce((e,t)=>
144a(e)?void 0:e[t],e);return u(n)||n===e?u(e[t])?r:e[t]:n},p=e=>"function"==typeof e,h=(e,t,r)=>{let n=-1,i=/^\w*$/.test(t)?[t]:d(t),a=i.length,o=a-1;for(;++n<a;){let t=i[n],a=r;if(n!==o){let r=e[t];a=s(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}};let g="trigger",m="onChange",y="onSubmit",v="maxLength",b="minLength",w="pattern",S="required",E="validate",_="form",C="root";n.createContext(null).displayName="HookFormControlContext";let O="u">typeof window?n.useLayoutEffect:n.useEffect;var k=e=>"string"==typeof e,I=e=>a(e)||"object"!=typeof e;function A(e,t,r=new WeakSet){if(e===t)return!0;if(I(e)||I(t))return Object.is(e,t);if(i(e)&&i(t))return Object.is(e.getTime(),t.getTime());let n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;for(let a of(r.add(e),r.add(t),n)){let n=e[a];if(!(a in t))return!1;if("ref"!==a){let e=t[a];if(i(n)&&i(e)||(s(n)||Array.isArray(n))&&(s(e)||Array.isArray(e))?!A(n,e,r):!Object.is(n,e))return!1}}return!0}n.createContext(null).displayName="HookFormContext";var T=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},x=e=>Array.isArray(e)?e:[e],R=()=>{let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},N=e=>s(e)&&!Object.keys(e).length,j=e=>{if(!o)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},P=e=>j(e)&&e.isConnected;function D(e,t){if(k(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let r=Array.isArray(t)?t:/^\w*$/.test(t)?[t]:d(t),n=1===r.length?e:function(e,t){let r=t.slice(0,-1).length,n=0;for(;n<r;){if(a(e)){e=void 0;break}e=e[t[n]],n++}return e}(e,r),i=r.length-1,o=r[i];return n&&delete n[o],0!==i&&(s(n)&&N(n)||Array.isArray(n)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!u(e[t]))return!1;return!0}(n))&&D(e,r.slice(0,-1)),e}function M(e){return Array.isArray(e)||s(e)&&!(e=>{for(let t in e)if(p(e[t]))return!0;return!1})(e)}function L(e,t={}){for(let r in e){let n=e[r];M(n)?(t[r]=Array.isArray(n)?[]:{},L(n,t[r])):u(n)||(t[r]=!0)}return t}function F(e,t,r){for(let n in r||(r=L(t)),e){let i=e[n];if(M(i))u(t)||I(r[n])?r[n]=L(i,Array.isArray(i)?[]:{}):F(i,a(t)?{}:t[n],r[n]);else{let e=t[n];r[n]=!A(i,e)}}return r}let q={value:!1,isValid:!1},U={value:!0,isValid:!0};var $=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!u(e[0].attributes.value)?u(e[0].value)||""===e[0].value?U:{value:e[0].value,isValid:!0}:U:q}return q},V=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>u(e)?e:t?""===e?NaN:e?+e:e:r&&k(e)?new Date(e):n?n(e):e;let z={isValid:!1,value:null};var B=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,z):z;function G(e){let t=e.ref;return"file"===t.type?t.files:"radio"===t.type?B(e.refs).value:"select-multiple"===t.type?[...t.selectedOptions].map(({value:e})=>e):"checkbox"===t.type?$(e.refs).value:V(u(t.value)?e.ref.value:t.value,e)}var H=e=>u(e)?e:e instanceof RegExp?e.source:s(e)?e.value instanceof RegExp?e.value.source:e.value:e,Q=e=>({isOnSubmit:!e||e===y,isOnBlur:"onBlur"===e,isOnChange:e===m,isOnAll:"all"===e,isOnTouch:"onTouched"===e});let Y="AsyncFunction";var W=e=>!!e&&!!e.validate&&!!(p(e.validate)&&e.validate.constructor.name===Y||s(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===Y)),K=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let Z=(e,t,r,n)=>{for(let i of r||Object.keys(e)){let r=f(e,i);if(r){let{_f:e,...a}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n)return!0;else if(e.ref&&t(e.ref,e.name)&&!n)return!0;else if(Z(a,t))break}else if(s(a)&&Z(a,t))break}}};function J(e,t,r){let n=f(e,r);if(n||/^\w*$/.test(r))return{error:n,name:r};let i=r.split(".");for(;i.length;){let n=i.join("."),a=f(t,n),s=f(e,n);if(a&&!Array.isArray(a)&&r!==n)break;if(s&&s.type)return{name:n,error:s};if(s&&s.root&&s.root.type)return{name:`${n}.root`,error:s.root};i.pop()}return{name:r}}var X=(e,t,r)=>{let n=x(f(e,r));return h(n,C,t[r]),h(e,r,n),e};function ee(e,t,r="validate"){if(k(e)||Array.isArray(e)&&e.every(k)||"boolean"==typeof e&&!e)return{type:r,message:k(e)?e:"",ref:t}}var et=e=>!s(e)||e instanceof RegExp?{value:e,message:""}:e,er=async(e,t,r,n,i,o)=>{let{ref:l,refs:c,required:d,maxLength:h,minLength:g,min:m,max:y,pattern:_,validate:C,name:O,valueAsNumber:I,mount:A}=e._f,x=f(r,O);
144if(!A||t.has(O))return{};let R=c?c[0]:l,P=e=>{i&&R.reportValidity&&(R.setCustomValidity("boolean"==typeof e?"":e||""),R.reportValidity())},D={},M="radio"===l.type,L="checkbox"===l.type,F=(I||"file"===l.type)&&u(l.value)&&u(x)||j(l)&&""===l.value||""===x||Array.isArray(x)&&!x.length||I&&"number"==typeof x&&isNaN(x),q=T.bind(null,O,n,D),U=(e,t,r,n=v,i=b)=>{let a=e?t:r;D[O]={type:e?n:i,message:a,ref:l,...q(e?n:i,a)}};if(o?!Array.isArray(x)||!x.length:d&&(!(M||L)&&(F||a(x))||"boolean"==typeof x&&!x||L&&!$(c).isValid||M&&!B(c).isValid)){let{value:e,message:t}=k(d)?{value:!!d,message:d}:et(d);if(e&&(D[O]={type:S,message:t,ref:R,...q(S,t)},!n))return P(t),D}if(!F&&(!a(m)||!a(y))){let e,t,r=et(y),i=et(m);if(a(x)||isNaN(x)){let n=l.valueAsDate||new Date(x),a=e=>new Date(new Date().toDateString()+" "+e),s="time"==l.type,o="week"==l.type;k(r.value)&&x&&(e=s?a(x)>a(r.value):o?x>r.value:n>new Date(r.value)),k(i.value)&&x&&(t=s?a(x)<a(i.value):o?x<i.value:n<new Date(i.value))}else{let n=l.valueAsNumber||(x?+x:x);a(r.value)||(e=n>r.value),a(i.value)||(t=n<i.value)}if((e||t)&&(U(!!e,r.message,i.message,"max","min"),!n))return P(D[O].message),D}if((h||g)&&!F&&(k(x)||o&&Array.isArray(x))){let e=et(h),t=et(g),r=!a(e.value)&&x.length>+e.value,i=!a(t.value)&&x.length<+t.value;if((r||i)&&(U(r,e.message,t.message),!n))return P(D[O].message),D}if(_&&!F&&k(x)){let{value:e,message:t}=et(_);if(e instanceof RegExp&&!x.match(e)&&(D[O]={type:w,message:t,ref:l,...q(w,t)},!n))return P(t),D}if(C){if(p(C)){let e=ee(await C(x,r),R);if(e&&(D[O]={...e,...q(E,e.message)},!n))return P(e.message),D}else if(s(C)){let e={};for(let t in C){if(!N(e)&&!n)break;let i=ee(await C[t](x,r),R,t);i&&(e={...i,...q(t,i.message)},P(i.message),n&&(D[O]=e))}if(!N(e)&&(D[O]={ref:R,...e},!n))return D}}return P(!0),D};let en={mode:y,reValidateMode:m,shouldFocusError:!0};function ei(e={}){let t=n.useRef(void 0),r=n.useRef(void 0),[d,m]=n.useState({isDirty:!1,isValidating:!1,isLoading:p(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:p(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:d},e.defaultValues&&!p(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:r,...n}=function(e={}){let t,r={...en,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:p(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},d={},m=(s(r.defaultValues)||s(r.values))&&l(r.defaultValues||r.values)||{},y=r.shouldUnregister?{}:l(m),v={action:!1,mount:!1,watch:!1,keepIsValid:!1},b={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},w=0,S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},O={...S},I={...O},T={array:R(),state:R()},M="all"===r.criteriaMode,L=async e=>{if(!v.keepIsValid&&!r.disabled&&(O.isValid||I.isValid||e)){let e;r.resolver?(e=N((await B()).errors),q()):e=await et({fields:d,onlyCheckValid:!0,eventType:"valid"}),e!==n.isValid&&T.state.next({isValid:e})}},q=(e,t)=>{!r.disabled&&(O.isValidating||O.validatingFields||I.isValidating||I.validatingFields)&&((e||Array.from(b.mount)).forEach(e=>{e&&(t?h(n.validatingFields,e,t):D(n.validatingFields,e))}),T.state.next({validatingFields:n.validatingFields,isValidating:!N(n.validatingFields)}))},U=e=>{let t=F(m,y),r=e.substring(0,e.search(/\.\d+(\.|$)/))||e;h(n.dirtyFields,r,f(t,r))},$=(e,t,r,n)=>{let i=f(d,e);if(i){let a=f(y,e,u(r)?f(m,e):r);u(a)||n&&n.defaultChecked||t?h(y,e,t?a:G(i._f)):es(e,a),v.mount&&!v.action&&L()}},z=(e,t,i,a,s)=>{let o=!1,l=!1,u={name:e};if(!r.disabled){if(!i||a){(O.isDirty||I.isDirty)&&(l=n.isDirty,n.isDirty=u.isDirty=ei(),o=l!==u.isDirty);let r=A(f(m,e),t);l=!!f(n.dirtyFields,e),r?D(n.dirtyFields,e):h(n.dirtyFields,e,!0),u.dirtyFields=n.dirtyFields,o=o||(O.dirtyFields||I.dirtyFields)&&!r!==l}if(i){let t=f(n.touchedFields,e);t||(h(n.touchedFields,e,i),u.touchedFields=n.touchedFields,o=o||(O.touchedFields||I.touchedFields)&&t!==i)}o&&s&&T.state.next(u)}return o?u:{}},B=async e=>(q(e,!0),await r.resolver(y,r.context,((e,t,r,n)=>{let i={};for(let r of e){let e=f(t,r);e&&h(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}})(e||b.mount,d,r.criteriaMode,r.shouldUseNativeValidation))),Y=async e=>{let{errors:t}=await B(e);if(q(e),e)for(let r of e){let e=f(t,r);e?h(n.errors,r,e):D(n.errors,r)}else n.errors=t;return t},ee=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:y,formState:n,name:t,eventType:r});if(s(i))for(let e in i)i[e]&&eg(`${_}.${e}`,{message:k(i.message)?i.message:"",type:E});else k(i)||!i?eg(_,{message:i||"",type:E}):eh(_);return i}return!0},et=async({fields:t,onlyCheckValid:i,name:a,eventType:s,context:o={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(o.runRootValidation=!0,!await ee({name:a,eventType:s}))&&(o.valid=!1,i))return o.valid;for(let a in t){let l=t[a];if(l){let{_f:t,...u}=l;if(t){let a=b.array.has(t.name),s=l._f&&W(l._f);s&&O.validatingFields&&q([t.name],!0);let u=await er(l,b.disabled,y,M,r.shouldUseNativeValidation&&!i,a);if(s&&O.validatingFields&&q([t.name]),u[t.name]&&(o.valid=!1,i)||(i||(f(u,t.name)?a?X(n.errors,u,t.name):h(n.errors,t.name,u[t.name]):D(n.errors,t.name)),e.shouldUseNativeValidation&&u[t.name]))break}N(u)||await et({context:o,onlyCheckValid:i,fields:u,name:a,eventType:s})}}return o.valid},ei=(e,t)=>!r.disabled&&(e&&t&&h(y,e,t),!A(ef(),m)),ea=(e,t,r)=>{var n,i;return n=b,i={...v.mount?y:u(t)?m:k(e)?{[e]:t}:t},k(e)?(r&&n.watch.add(e),f(i,e,t)):Array.isArray(e)?e.map(e=>(r&&n.watch.add(e),f(i,e))):(r&&(n.watchAll=!0),i)},es=(e,t,r={})=>{let n=f(d,e),i=t;if(n){let r=n._f;r&&(r.disabled||h(y,e,V(t,r)),i=j(r.ref)&&a(t)?"":t,"select-multiple"===r.ref.type?[...r.ref.options].forEac
144h(e=>e.selected=i.includes(e.value)):r.refs?"checkbox"===r.ref.type?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(i)?e.checked=!!i.find(t=>t===e.value):e.checked=i===e.value||!!i)}):r.refs.forEach(e=>e.checked=e.value===i):"file"===r.ref.type?r.ref.value="":(r.ref.value=i,r.ref.type||T.state.next({name:e,values:l(y)})))}(r.shouldDirty||r.shouldTouch)&&z(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ed(e)},eo=(e,t,r)=>{for(let n in t){if(!t.hasOwnProperty(n))return;let a=t[n],o=e+"."+n,l=f(d,o);(b.array.has(e)||s(a)||l&&!l._f)&&!i(a)?eo(o,a,r):es(o,a,r)}},el=(e,t,r={})=>{let i=f(d,e),s=b.array.has(e),o=l(t),u=A(f(y,e),o);if(h(y,e,o),s)T.array.next({name:e,values:l(y)}),r.shouldDirty&&(U(e),T.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:ei(e,o)}));else{let t=Array.isArray(o)&&!o.length||N(o);!i||i._f||a(o)||t?es(e,o,r):eo(e,o,r)}u||(K(e,b)?T.state.next({...n,name:e,values:l(y)}):T.state.next({name:v.mount?e:void 0,values:l(y)}))},eu=async a=>{v.mount=!0;let o=a.target,u=o.name,c=!0,p=f(d,u),g=e=>{c=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||A(e,f(y,u,e))},m=Q(r.mode),S=Q(r.reValidateMode);if(p){let i,v,F,U,$=o.type?G(p._f):s(i=a)&&i.target?"checkbox"===i.target.type?i.target.checked:i.target.value:i,V="blur"===a.type||"focusout"===a.type,H=!((U=p._f).mount&&(U.required||U.min||U.max||U.maxLength||U.minLength||U.pattern||U.validate))&&!e.validate&&!r.resolver&&!f(n.errors,u)&&!p._f.deps||(E=V,_=f(n.touchedFields,u),C=n.isSubmitted,k=S,!(x=m).isOnAll&&(!C&&x.isOnTouch?!(_||E):(C?k.isOnBlur:x.isOnBlur)?!E:(C?!k.isOnChange:!x.isOnChange)||E)),Q=K(u,b,V);h(y,u,$),V?o&&o.readOnly||(p._f.onBlur&&p._f.onBlur(a),t&&t(0)):p._f.onChange&&p._f.onChange(a);let Y=z(u,$,V),W=!N(Y)||Q;if(V||T.state.next({name:u,type:a.type,values:l(y)}),H)return(O.isValid||I.isValid)&&("onBlur"===r.mode?V&&L():V||L()),W&&T.state.next({name:u,...Q?{}:Y});if(!r.resolver&&e.validate&&await ee({name:u,eventType:a.type}),!V&&Q&&T.state.next({...n}),r.resolver){let{errors:e}=await B([u]);if(q([u]),g($),c){let t=J(n.errors,d,u),r=J(e,d,t.name||u);v=r.error,u=r.name,F=N(e)}}else q([u],!0),v=(await er(p,b.disabled,y,M,r.shouldUseNativeValidation))[u],q([u]),g($),c&&(v?F=!1:(O.isValid||I.isValid)&&(F=await et({fields:d,onlyCheckValid:!0,name:u,eventType:a.type})));if(c){p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&ed(p._f.deps);var E,_,C,k,x,R=u,j=F,P=v;let e=f(n.errors,R),i=(O.isValid||I.isValid)&&"boolean"==typeof j&&n.isValid!==j;if(r.delayError&&P){let e;e=()=>{h(n.errors,R,P),T.state.next({errors:n.errors})},(t=t=>{clearTimeout(w),w=setTimeout(e,t)})(r.delayError)}else clearTimeout(w),t=null,P?h(n.errors,R,P):D(n.errors,R);if((P?!A(e,P):e)||!N(Y)||i){let e={...Y,...i&&"boolean"==typeof j?{isValid:j}:{},errors:n.errors,name:R};n={...n,...e},T.state.next(e)}}}},ec=(e,t)=>{if(f(n.errors,t)&&e.focus)return e.focus(),1},ed=async(e,t={})=>{let i,a,s=x(e);if(r.resolver){let t=await Y(u(e)?e:s);i=N(t),a=e?!s.some(e=>f(t,e)):i}else e?((a=(await Promise.all(s.map(async e=>{let t=f(d,e);return await et({fields:t&&t._f?{[e]:t}:t,eventType:g})}))).every(Boolean))||n.isValid)&&L():a=i=await et({fields:d,name:e,eventType:g});return T.state.next({...!k(e)||(O.isValid||I.isValid)&&i!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:i}:{},errors:n.errors}),t.shouldFocus&&!a&&Z(d,ec,e?s:b.mount),a},ef=(e,t)=>{let r={...v.mount?y:m};return t&&(r=function e(t,r){let n={};for(let i in t)if(t.hasOwnProperty(i)){let a=t[i],o=r[i];if(a&&s(a)&&o){let t=e(a,o);s(t)&&(n[i]=t)}else t[i]&&(n[i]=o)}return n}(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),u(e)?r:k(e)?f(r,e):e.map(e=>f(r,e))},ep=(e,t)=>({invalid:!!f((t||n).errors,e),isDirty:!!f((t||n).dirtyFields,e),error:f((t||n).errors,e),isValidating:!!f(n.validatingFields,e),isTouched:!!f((t||n).touchedFields,e)}),eh=e=>{let t=e?x(e):void 0;null==t||t.forEach(e=>D(n.errors,e)),t?t.forEach(e=>{T.state.next({name:e,errors:n.errors})}):T.state.next({errors:{}})},eg=(e,t,r)=>{let i=(f(d,e,{_f:{}})._f||{}).ref,{ref:a,message:s,type:o,...l}=f(n.errors,e)||{};h(n.errors,e,{...l,...t,ref:i}),T.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&i&&i.focus&&i.focus()},em=e=>T.state.subscribe({next:t=>{let r,i,a;if(r=e.name,i=t.name,a=e.exact,(!r||!i||r===i||x(r).some(e=>e&&(a?e===i:e.startsWith(i)||i.startsWith(e))))&&((e,t,r,n)=>{r(e);let{name:i,...a}=e;return N(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!n||"all"))})(t,e.formState||O,eC,e.reRenderRoot)){let r={...y};e.callback({values:r,...n,...t,defaultValues:m})}}}).unsubscribe,ey=(e,t={})=>{for(let i of e?x(e):b.mount)b.mount.delete(i),b.array.delete(i),t.keepValue||(D(d,i),D(y,i)),t.keepError||D(n.errors,i),t.keepDirty||D(n.dirtyFields,i),t.keepTouched||D(n.touchedFields,i),t.keepIsValidating||D(n.validatingFields,i),r.shouldUnregister||t.keepDefaultValue||D(m,i);T.state.next({values:l(y)}),T.state.next({...n,...!t.keepDirty?{}:{isDirty:ei()}}),t.keepIsValid||L()},ev=({disabled:e,name:t})=>{if("boolean"==typeof e&&v.mount||e||b.disabled.has(t)){let r=b.disabled.has(t);e?b.disabled.add(t):b.disabled.delete(t),!!e!==r&&v.mount&&!v.action&&L()}},eb=(e,t={})=>{let n=f(d,e),i="boolean"==typeof t.disabled||"boolean"==typeof r.disabled,a=!b.registerName.has(e)&&n&&n._f&&!n._f.mount;return(h(d,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),b.mount.add(e),n&&!a)?ev({disabled:"boolean"==typeof t.disabled?t.disabled:r.disabled,name:e}):$(e,!0,t.value),{...i?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:H(t.min),max:H(t.max),minLength:H(t.minLength),maxLength:H(t.maxLength),pattern:H(t.pattern)}:{}
144,name:e,onChange:eu,onBlur:eu,ref:i=>{if(i){let r;b.registerName.add(e),eb(e,t),b.registerName.delete(e),n=f(d,e);let a=u(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s="radio"===(r=a).type||"checkbox"===r.type,o=n._f.refs||[];(s?o.find(e=>e===a):a===n._f.ref)||(h(d,e,{_f:{...n._f,...s?{refs:[...o.filter(P),a,...Array.isArray(f(m,e))?[{}]:[]],ref:{type:a.type,name:e}}:{ref:a}}}),$(e,!1,void 0,a))}else{let i;(n=f(d,e,{}))._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(i=b.array,!e.split(".").some((e,t,r)=>!isNaN(Number(e))&&i.has(r.slice(0,t).join(".")))||!v.action)&&b.unMount.add(e)}}}},ew=()=>r.shouldFocusError&&Z(d,ec,b.mount),eS=(e,t)=>async i=>{let a;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let s=l(y);if(T.state.next({isSubmitting:!0}),r.resolver){let{errors:e,values:t}=await B();q(),n.errors=e,s=l(t)}else await et({fields:d,eventType:"submit"});if(b.disabled.size)for(let e of b.disabled)D(s,e);if(D(n.errors,C),N(n.errors)){T.state.next({errors:{}});try{await e(s,i)}catch(e){a=e}}else t&&await t({...n.errors},i),ew(),setTimeout(ew);if(T.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:N(n.errors)&&!a,submitCount:n.submitCount+1,errors:n.errors}),a)throw a},eE=(e,t={})=>{let i=e?l(e):m,a=l(i),s=N(e),c=s?m:a;if(t.keepDefaultValues||(m=i),!t.keepValues){if(t.keepDirtyValues)for(let e of Array.from(new Set([...b.mount,...Object.keys(F(m,y))]))){let t=f(n.dirtyFields,e),r=f(y,e),i=f(c,e);t&&!u(r)?h(c,e,r):t||u(i)||el(e,i)}else{if(o&&u(e))for(let e of b.mount){let t=f(d,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(j(e)){let t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(let e of b.mount)el(e,f(c,e));else d={}}y=r.shouldUnregister?t.keepDefaultValues?l(m):{}:l(c),T.array.next({values:{...c}}),T.state.next({values:{...c}})}b={mount:t.keepDirtyValues?b.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},v.mount=!O.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!r.shouldUnregister&&!N(c),v.watch=!!r.shouldUnregister,v.keepIsValid=!!t.keepIsValid,v.action=!1,t.keepErrors||(n.errors={}),T.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!s&&(t.keepDirty?n.isDirty:!!(t.keepDefaultValues&&!A(e,m))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:s?{}:t.keepDirtyValues?t.keepDefaultValues&&y?F(m,y):n.dirtyFields:t.keepDefaultValues&&e?F(m,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1,defaultValues:m})},e_=(e,t)=>eE(p(e)?e(y):e,{...r.resetOptions,...t}),eC=e=>{n={...n,...e}},eO={control:{register:eb,unregister:ey,getFieldState:ep,handleSubmit:eS,setError:eg,_subscribe:em,_runSchema:B,_updateIsValidating:q,_focusError:ew,_getWatch:ea,_getDirty:ei,_setValid:L,_setFieldArray:(e,t=[],i,a,s=!0,o=!0)=>{if(a&&i&&!r.disabled){if(v.action=!0,o&&Array.isArray(f(d,e))){let t=i(f(d,e),a.argA,a.argB);s&&h(d,e,t)}if(o&&Array.isArray(f(n.errors,e))){let t,r=i(f(n.errors,e),a.argA,a.argB);s&&h(n.errors,e,r),c(f(t=n.errors,e)).length||D(t,e)}if((O.touchedFields||I.touchedFields)&&o&&Array.isArray(f(n.touchedFields,e))){let t=i(f(n.touchedFields,e),a.argA,a.argB);s&&h(n.touchedFields,e,t)}(O.dirtyFields||I.dirtyFields)&&U(e),T.state.next({name:e,isDirty:ei(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else h(y,e,t)},_setDisabledField:ev,_setErrors:e=>{n.errors=e,T.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>c(f(v.mount?y:m,e,r.shouldUnregister?f(m,e,[]):[])),_reset:eE,_resetDefaultValues:()=>p(r.defaultValues)&&r.defaultValues().then(e=>{e_(e,r.resetOptions),T.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of b.unMount){let t=f(d,e);t&&(t._f.refs?t._f.refs.every(e=>!P(e)):!P(t._f.ref))&&ey(e)}b.unMount=new Set},_disableForm:e=>{"boolean"==typeof e&&(T.state.next({disabled:e}),Z(d,(t,r)=>{let n=f(d,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEac
144h(t=>{t.disabled=n._f.disabled||e}))},0,!1))},_subjects:T,_proxyFormState:O,get _fields(){return d},get _formValues(){return y},get _state(){return v},set _state(value){v=value},get _defaultValues(){return m},get _names(){return b},set _names(value){b=value},get _formState(){return n},get _options(){return r},set _options(value){r={...r,...value}}},subscribe:e=>(v.mount=!0,I={...I,...e.formState},em({...e,formState:{...S,...e.formState}})),trigger:ed,register:eb,handleSubmit:eS,watch:(e,t)=>p(e)?T.state.subscribe({next:r=>"values"in r&&e(r.values||ea(void 0,t),r)}):ea(e,t,!0),setValue:el,setValues:e=>{let t=p(e)?e(y):e;A(y,t)||(y={...y,...t},T.state.next({...n,values:y}))},getValues:ef,reset:e_,resetField:(e,t={})=>{f(d,e)&&(u(t.defaultValue)?el(e,l(f(m,e))):(el(e,t.defaultValue),h(m,e,l(t.defaultValue))),t.keepTouched||D(n.touchedFields,e),t.keepDirty||(D(n.dirtyFields,e),n.isDirty=t.defaultValue?ei(e,l(f(m,e))):ei()),!t.keepError&&(D(n.errors,e),O.isValid&&L()),T.state.next({...n}))},clearErrors:eh,unregister:ey,setError:eg,setFocus:(e,t={})=>{let r=f(d,e),n=r&&r._f;if(n){let e=n.refs?n.refs[0]:n.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&p(e.select)&&e.select()})}},getFieldState:ep};return{...eO,formControl:eO}}(e);t.current={...n,formState:d}}let y=t.current.control;return y._options=e,O(()=>{let e=y._subscribe({formState:y._proxyFormState,callback:()=>m({...y._formState}),reRenderRoot:!0});return m(e=>({...e,isReady:!0})),y._formState.isReady=!0,e},[y]),n.useEffect(()=>y._disableForm(e.disabled),[y,e.disabled]),n.useEffect(()=>{e.mode&&(y._options.mode=e.mode),e.reValidateMode&&(y._options.reValidateMode=e.reValidateMode)},[y,e.mode,e.reValidateMode]),n.useEffect(()=>{e.errors&&(y._setErrors(e.errors),y._focusError())},[y,e.errors]),n.useEffect(()=>{e.shouldUnregister&&y._subjects.state.next({values:y._getWatch()})},[y,e.shouldUnregister]),n.useEffect(()=>{if(y._proxyFormState.isDirty){let e=y._getDirty();e!==d.isDirty&&y._subjects.state.next({isDirty:e})}},[y,d.isDirty]),n.useEffect(()=>{var t;e.values&&!A(e.values,r.current)?(y._reset(e.values,{keepFieldsRef:!0,...y._options.resetOptions}),(null==(t=y._options.resetOptions)?void 0:t.keepIsValid)||y._setValid(),r.current=e.values,m(e=>({...e}))):y._resetDefaultValues()},[y,e.values]),n.useEffect(()=>{y._state.mount||(y._setValid(),y._state.mount=!0),y._state.watch&&(y._state.watch=!1,y._subjects.state.next({...y._formState})),y._removeUnmounted()}),t.current.formState=n.useMemo(()=>((e,t,r,n=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>("all"!==t._proxyFormState[a]&&(t._proxyFormState[a]=!n||"all"),r&&(r[a]=!0),e[a])});return i})(d,y),[y,d]),t.current}},9002:(e,t,r)=>{"use strict";let n;r.d(t,{Ay:()=>J});var i=r(4232),a=r(8806),s=Object.prototype.hasOwnProperty;let o=new WeakMap,l=()=>{},u=l(),c=Object,d=e=>e===u,f=(e,t)=>({...e,...t}),p={},h={},g="undefined",m=typeof window!=g,y=typeof document!=g,v=m&&"Deno"in window,b=(e,t)=>{let r=o.get(e);return[()=>!d(t)&&e.get(t)||p,n=>{if(!d(t)){let i=e.get(t);t in h||(h[t]=i),r[5](t,f(i,n),i||p)}},r[6],()=>!d(t)&&t in h?h[t]:!d(t)&&e.get(t)||p]},w=!0,[S,E]=m&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[l,l],_={initFocus:e=>(y&&document.addEventListener("visibilitychange",e),S("focus",e),()=>{y&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{let t=()=>{w=!0,e()},r=()=>{w=!1};return S("online",t),S("offline",r),()=>{E("online",t),E("offline",r)}}},C=!i.useId,O=!m||v,k=O?i.useEffect:i.useLayoutEffect,I="u">typeof navigator&&navigator.connection,A=!O&&I&&(["slow-2g","2g"].includes(I.effectiveType)||I.saveData),T=new WeakMap,x=(e,t)=>e===`[object ${t}]`,R=0,N=e=>{let t,r,n=typeof e,i=c.prototype.toString.call(e),a=x(i,"Date"),s=x(i,"RegExp"),o=x(i,"Object");if(c(e)!==e||a||s)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=T.get(e))return t;if(t=++R+"~",T.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=N(e[r])+",";T.set(e,t)}if(o){t="#";let n=c.keys(e).sort();for(;!d(r=n.pop());)d(e[r])||(t+=r+":"+N(e[r])+",");T.set(e,t)}}return t},j=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?N(e):"",t]},P=0,D=()=>++P;async function M(...e){let[t,r,n,i]=e,a=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=a.populateCache,l=a.rollbackOnError,c=a.optimisticData,p=a.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(h))}return h(r);async function h(r){let i,[f]=j(r);if(!f)return;let[h,g]=b(t,f),[m,y,v,w]=o.get(t),S=()=>{let e=m[f];return("function"==typeof a.revalidate?a.revalidate(h().data,r):!1!==a.revalidate)&&(delete v[f],delete w[f],e&&e[0])?e[0](2).then(()=>h().data):h().data};if(e.length<3)return S();let E=n,_=!1,C=D();y[f]=[C,0];let O=!d(c),k=h(),I=k.data,A=k._c,T=d(A)?I:A;if(O&&g({data:c="function"==typeof c?c(T,I):c,_c:T}),"function"==typeof E)try{E=E(T)}catch(e){i=e,_=!0}if(E&&"function"==typeof E.then){let e;if(E=await E.catch(e=>{i=e,_=!0}
144),C!==y[f][0]){if(_)throw i;return E}_&&O&&(e=i,"function"==typeof l?l(e):!1!==l)&&(s=!0,g({data:T,_c:u}))}if(s&&!_&&("function"==typeof s?g({data:s(E,T),error:u,_c:u}):g({data:E,error:u,_c:u})),y[f][1]=D(),Promise.resolve(S()).then(()=>{g({_c:u})}),_){if(p)throw i;return}return E}}let L=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},F=(e,t)=>{if(!o.has(e)){let r=f(_,t),n=Object.create(null),i=M.bind(u,e),a=l,s=Object.create(null),c=(e,t)=>{let r=s[e]||[];return s[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let i=s[t];if(i)for(let e of i)e(r,n)},p=()=>{if(!o.has(e)&&(o.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,d,c]),!O)){let t=r.initFocus(setTimeout.bind(u,L.bind(u,n,0))),i=r.initReconnect(setTimeout.bind(u,L.bind(u,n,1)));a=()=>{t&&t(),i&&i(),o.delete(e)}}};return p(),[e,i,p,a]}return[e,o.get(e)[4]]},[q,U]=F(new Map),$=f({onLoadingSlow:l,onSuccess:l,onError:l,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,s=i.retryCount,o=~~((Math.random()+.5)*(1<<(s<8?s:8)))*r.errorRetryInterval;(d(a)||!(s>a))&&setTimeout(n,o,i)},onDiscarded:l,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:A?5e3:3e3,compare:function e(t,r){var n,i;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(s.call(t,n)&&++i&&!s.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},isPaused:()=>!1,cache:q,mutate:U,fallback:{}},{isOnline:()=>w,isVisible:()=>{let e=y&&document.visibilityState;return d(e)||"hidden"!==e}}),V=(e,t)=>{let r=f(e,t);if(t){let{use:n,fallback:i}=e,{use:a,fallback:s}=t;n&&a&&(r.use=n.concat(a)),i&&s&&(r.fallback=f(i,s))}return r},z=(0,i.createContext)({}),B=m&&window.__SWR_DEVTOOLS_USE__,G=(B?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=j(t),[,,,i]=o.get(q);if(n.startsWith("$inf$"))return r(...e);let a=i[n];return d(a)?r(...e):(delete i[n],a)});return e(t,i,n)});B&&(window.__SWR_DEVTOOLS_REACT__=i);let H=()=>{},Q=H(),Y=(new WeakMap,i.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),W={dedupe:!0},K=Promise.resolve(u),Z=()=>l;c.defineProperty(e=>{let{value:t}=e,r=(0,i.useContext)(z),n="function"==typeof t,a=(0,i.useMemo)(()=>n?t(r):t,[n,r,t]),s=(0,i.useMemo)(()=>n?a:V(r,a),[n,r,a]),o=a&&a.provider,l=(0,i.useRef)(u);o&&!l.current&&(l.current=F(o(s.cache||q),a));let c=l.current;return c&&(s.cache=c[0],s.mutate=c[1]),k(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,i.createElement)(z.Provider,f(e,{value:s}))},"defaultValue",{value:$});let J=(n=(e,t,r)=>{let{cache:n,compare:s,suspense:l,fallbackData:c,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:y,refreshWhenHidden:v,refreshWhenOffline:w,keepPreviousData:S,strictServerPrefetchWarning:E}=r,[_,I,A,T]=o.get(n),[x,R]=j(e),N=(0,i.useRef)(!1),P=(0,i.useRef)(!1),L=(0,i.useRef)(x),F=(0,i.useRef)(t),q=(0,i.useRef)(r),U=()=>q.current.isVisible()&&q.current.isOnline(),[$,V,z,B]=b(n,x),G=(0,i.useRef)({}).current,H=d(c)?d(r.fallback)?u:r.fallback[x]:c,Q=(e,t)=>{for(let r in G)if("data"===r){if(!s(e[r],t[r])&&(!d(e[r])||!s(es,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},J=!N.current,X=(0,i.useMemo)(()=>{let e=$(),r=B(),n=e=>{let r=f(e);return(delete r._k,(()=>{if(!x||!t||q.current.isPaused())return!1;if(J&&!d(p))return p;let e=d(H)?r.data:H;return d(e)||h})())?{isValidating:!0,isLoading:!0,...r}:r},i=n(e),a=e===r?i:n(r),s=i;return[()=>{let e=n($());return Q(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>a]},[n,x]),ee=(0,a.useSyncExternalStore)((0,i.useCallback)(e=>z(x,(t,r)=>{Q(r,t)||e()}),[n,x]),X[0],X[1]),et=_[x]&&_[x].length>0,er=ee.data,en=d(er)?H&&"function"==typeof H.then?Y(H):H:er,ei=ee.error,ea=(0,i.useRef)(en),es=S?d(er)?d(ea.current)?en:ea.current:er:en,eo=x&&d(en),el=(0,i.useRef)(null);O||(0,a.useSyncExternalStore)(Z,()=>(el.current=!1,el),()=>(el.current=!0,el));let eu=el.current;E&&eu&&!l&&eo&&console.warn(`Missing pre-initiated data for serialized key "${x}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ec=!(!x||!t||q.current.isPaused())&&(!et||!!d(ei))&&(J&&!d(p)?p:l?!d(en)&&h:d(en)||h),ed=J&&ec,ef=d(ee.isValidating)?ed:ee.isValidating,ep=d(ee.isLoading)?ed:ee.isLoading,eh=(0,i.useCallback)(async e=>{let t,n,i=F.current;if(!x||!i||P.current||q.current.isPaused())return!1;let a=!0,o=e||{},l=!A[x]||!o.dedupe,c=()=>C?!P.current&&x===L.current&&N.current:x===L.current,f={isValidating:!1,isLoading:!1},p=()=>{V(f)},h=()=>{let e=A[x];e&&e[1]===n&&delete A[x]},g={isValidating:!0};d($().data)&&(g.isLoading=!0);try{if(l&&(V(g),r.loadingTimeout&&d($().data)&&setTimeout(()=>{a&&c()&&q.current.onLoadingSlow(x,r)},r.loadingTimeout),A[x]=[i(R),D()]),[t,n]=A[x],t=await t,l&&setTimeout(h,r.dedupingInterval),!A[x]||A[x][1]!==n)return l&&c()&&q.current.onDiscarded(x),!1;f.error=u;let e=I[x];if(!d(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return p(),l&&c()&&q.current.onDiscarded(x),!1;let o=$().data;f.data=s(o,t)?o:t,l&&c()&&q.current.onSuccess(t,x,r)}catch(r){h();let e=q.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(f.error=r,l&&c())&&(e.onError(r,x,e),(!0===t||"function"==typeof t&&t(r))&&(!q.current.revalidateOnFocus||!q.current.revalidateOnReconnect||U())&&e.onErrorRetry(r,x,e,e=>{let t=_[x];t&&t[0]&&t[0](3,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return a=!1,p(),!0},[x,n]),eg=(0,i.useCallback)((...e)=>M(n,L.current,...e),[]);if(k(()=>{F.current=t,q.current=r,d(er)||(ea.current=er)}),k(()=>{var e;let t;if(!x)return;let r=eh.bind(u,W),n=0;q.current.revalidateOnFocus&&(n=Date.now()+q.current.focusThrottleInterval);let i=(e=(e,t={})=>
144{if(0==e){let e=Date.now();q.current.revalidateOnFocus&&e>n&&U()&&(n=e+q.current.focusThrottleInterval,r())}else if(1==e)q.current.revalidateOnReconnect&&U()&&r();else if(2==e)return eh();else if(3==e)return eh(t)},(t=_[x]||(_[x]=[])).push(e),()=>{let r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.pop())});if(P.current=!1,L.current=x,N.current=!0,V({_k:R}),ec&&!A[x])if(d(en)||O)r();else m&&typeof window.requestAnimationFrame!=g?window.requestAnimationFrame(r):setTimeout(r,1);return()=>{P.current=!0,i()}},[x]),k(()=>{let e;function t(){let t="function"==typeof y?y($().data):y;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!$().error&&(v||q.current.isVisible())&&(w||q.current.isOnline())?eh(W).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[y,v,w,x]),(0,i.useDebugValue)(es),l){if(!C&&O&&eo)throw Error("Fallback data is required when using Suspense in SSR.");eo&&(F.current=t,q.current=r,P.current=!1);let e=T[x];if(Y(!d(e)&&eo?eg(e):K),!d(ei)&&eo)throw ei;let n=eo?eh(W):K;!d(es)&&eo&&(n.status="fulfilled",n.value=!0),Y(n)}return{mutate:eg,get data(){return G.data=!0,es},get error(){return G.error=!0,ei},get isValidating(){return G.isValidating=!0,ef},get isLoading(){return G.isLoading=!0,ep}}},function(...e){let t,r=(t=(0,i.useContext)(z),(0,i.useMemo)(()=>f($,t),[t])),[a,s,o]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],l=V(r,o),u=n,{use:c}=l,d=(c||[]).concat(G);for(let e=d.length;e--;)u=d[e](u);return u(a,s||l.fetcher||null,l)})},9052:e=>{!function(){"use strict";var t={114:function(e){function t(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,a=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else if(47===r)break;else r=47;if(47===r){if(a===o-1||1===s);else if(a!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2)){if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=o,s=0;continue}}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n,i="",a=!1,s=arguments.length-1;s>=-1&&!a;s--)s>=0?n=arguments[s]:(void 0===e&&(e=""),n=e),t(n),0!==n.length&&(i=n+"/"+i,a=47===n.charCodeAt(0));if(i=r(i,!a),a)if(i.length>0)return"/"+i;else return"/";return i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return(0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n)?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0==arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r||(e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,s=a-i,o=1;o<r.length&&47===r.charCodeAt(o);++o);for(var l=r.length-o,u=s<l?s:l,c=-1,d=0;d<=u;++d){if(d===u){if(l>u){if(47===r.charCodeAt(o+d))return r.slice(o+d+1);else if(0===d)return r.slice(o+d)}else s>u&&(47===e.charCodeAt(i+d)?c=d:0===d&&(c=0));break}var f=e.charCodeAt(i+d);if(f!==r.charCodeAt(o+d))break;47===f&&(c=d)}var p="";for(d=i+c+1;d<=a;++d)(d===a||47===e.charCodeAt(d))&&(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(o+c):(o+=c,47===r.charCodeAt(o)&&++o,r.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,a=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return -1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw TypeError('"ext" argument must be a string');t(e);var n,i=0,a=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!s){i=n+1;break}}else -1===l&&(s=!1,l=n+1),o>=0&&(u===r.charCodeAt(o)?-1==--o&&(a=n):(o=-1,a=l))}return i===a?a=l:-1===a&&(a=e.length),e.slice(i,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else -1===a&&(s=!1,a=n+1);return -1===a?"":e.slice(i,a)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,a=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47===l){if(!a){n=o+1;break}continue}-1===i&&(a=!1,i=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1)}return -1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){var t,r;if(null===e||"object"!=typeof e)throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||""),t?t===e.root?t+r:t+"/"+r:r},parse:function(e){t(e);var r,n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var i=e.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var s=-1,o=0,l=-1,u=!0,c=e.length-1,d=0;c>=r;
144--c){if(47===(i=e.charCodeAt(c))){if(!u){o=c+1;break}continue}-1===l&&(u=!1,l=c+1),46===i?-1===s?s=c:1!==d&&(d=1):-1!==s&&(d=-1)}return -1===s||-1===l||0===d||1===d&&s===l-1&&s===o+1?-1!==l&&(0===o&&a?n.base=n.name=e.slice(1,l):n.base=n.name=e.slice(o,l)):(0===o&&a?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(o,s),n.base=e.slice(o,l)),n.ext=e.slice(s,l)),o>0?n.dir=e.slice(0,o-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}},s=!0;try{t[e](a,a.exports,n),s=!1}finally{s&&delete r[e]}return a.exports}n.ab="//",e.exports=n(114)}()},9149:(e,t,r)=>{var n=0/0,i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,u="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),f=Object.prototype.toString,p=Math.max,h=Math.min,g=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==f.call(t))return n;if(m(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=m(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var u=s.test(e);return u||o.test(e)?l(e.slice(2),u?2:8):a.test(e)?n:+e}e.exports=function(e,t,r){var n,i,a,s,o,l,u=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var r=n,a=i;return n=i=void 0,u=t,s=e.apply(a,r)}function b(e){var r=e-l,n=e-u;return void 0===l||r>=t||r<0||d&&n>=a}function w(){var e,r,n,i=g();if(b(i))return S(i);o=setTimeout(w,(e=i-l,r=i-u,n=t-e,d?h(n,a-r):n))}function S(e){return(o=void 0,f&&n)?v(e):(n=i=void 0,s)}function E(){var e,r=g(),a=b(r);if(n=arguments,i=this,l=r,a){if(void 0===o)return u=e=l,o=setTimeout(w,t),c?v(e):s;if(d)return o=setTimeout(w,t),v(l)}return void 0===o&&(o=setTimeout(w,t)),s}return t=y(t)||0,m(r)&&(c=!!r.leading,a=(d="maxWait"in r)?p(y(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),E.cancel=function(){void 0!==o&&clearTimeout(o),u=0,n=l=i=o=void 0},E.flush=function(){return void 0===o?s:S(g())},E}},9228:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(4232),i=r(1958),a=r(4699);let s=e=>{let t=(0,n.useContext)(a.sL);return n.createElement(i.O,Object.assign({},e,{modifyComponentProps:e=>{if(!e.rendering.uid)return e;let r=t[e.rendering.uid];return Object.assign(Object.assign({},e),r)}}))}},9230:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"forbidden",{enumerable:!0,get:function(){return n}}),r(4494).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9239:(e,t,r)=>{"use strict";r.d(t,{s:()=>h});var n=r(4232),i=r(4824),a=r(4e3),s=r(3813),o=r(8741),l=r(3561),u=r(3282),c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let d=(0,o.O)((0,l.N)(e=>{var{field:t,tag:r="div",ref:i}=e,a=c(e,["field","tag","ref"]);if((0,s.JE)(t))return null;delete a.editable;let o=Object.assign({dangerouslySetInnerHTML:{__html:t.value},ref:i,suppressHydrationWarning:!!t.metadata||void 0},a);return n.createElement(r||"div",Object.assign({},o))},{defaultEmptyFieldEditingComponent:u.G}));d.displayName="RichText";var f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let p={},h=e=>{let{internalLinksSelector:t='a[href^="/"]',prefetchLinks:r=!0,editable:s=!0}=e,o=f(e,["internalLinksSelector","prefetchLinks","editable"]),l=e.field&&e.field.value,u=s&&e.field&&e.field.metadata,{pageRouter:c,appRouter:h}={pageRouter:(0,i.useRouter)(),appRouter:(()=>{try{return(0,a.useRouter)()}catch(e){return null}})()},g=(0,n.useRef)(null);(0,n.useEffect)(()=>{l&&!u&&y()},[l]);let m=e=>{if(!e.currentTarget)return;e.preventDefault();let t=e.currentTarget.href;c?c.push(t,t,{locale:!1}):h&&h.push(t)},y=()=>{let e=g.current,n=e&&e.querySelectorAll(t);
144n&&n.length&&n.forEach(e=>{if("_blank"===e.target)return;let t=()=>{c?c.prefetch(e.pathname,void 0,{locale:!1}):h&&h.prefetch(e.pathname),p[e.pathname]=!0};if(!p[e.pathname]&&!1!==r&&(!0===r&&t(),"hover"===r)){let r=()=>{t(),e.removeEventListener("mouseover",r)};e.addEventListener("mouseover",r,!1)}e.addEventListener("click",m,!1)})};return n.createElement(d,Object.assign({ref:g,editable:s},o))};h.displayName="NextRichText"},9357:(e,t,r)=>{"use strict";var n;t.A=void 0,t.A=((n=r(2542))&&n.__esModule?n:{default:n}).default},9407:(e,t,r)=>{"use strict";r.d(t,{J1:()=>n}),r(9742);let n=(e,...t)=>e.reduce((e,r,n)=>`${e}${r}${n in t?String(t[n]):""}`,"")},9429:(e,t,r)=>{"use strict";var n=r(4232),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,s=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return o(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},9457:()=>{},9499:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var a=r.length+1;if(1===a)return e;var s=Array(a);s[0]=i(e);for(var o=1;o<a;o++)s[o]=i(r[o]);return s.join(" ")}if("string"!=typeof e)return e;var l=r.length;if(0===l)return e;for(var u="",c=0,d=-1,f=e&&e.length||0,p=0;p<f;){if(37===e.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(c>=l||null==r[c])break;d<p&&(u+=e.slice(d,p)),u+=Number(r[c]),d=p+2,p++;break;case 105:if(c>=l||null==r[c])break;d<p&&(u+=e.slice(d,p)),u+=Math.floor(Number(r[c])),d=p+2,p++;break;case 79:case 111:case 106:if(c>=l||void 0===r[c])break;d<p&&(u+=e.slice(d,p));var h=typeof r[c];if("string"===h){u+="'"+r[c]+"'",d=p+2,p++;break}if("function"===h){u+=r[c].name||"<anonymous>",d=p+2,p++;break}u+=i(r[c]),d=p+2,p++;break;case 115:if(c>=l)break;d<p&&(u+=e.slice(d,p)),u+=String(r[c]),d=p+2,p++;break;case 37:d<p&&(u+=e.slice(d,p)),u+="%",d=p+2,p++,c--}++c}++p}return -1===d?e:(d<f&&(u+=e.slice(d)),u)}},9514:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var n=r(4232),i=r(3813),a=r(5122),s=r(5333);let o=({rendering:e,placeholderName:t,children:r,componentRuntime:o})=>{let l=({kind:t,id:r,placeholderName:n})=>{var l;let u=n?"placeholder":"rendering",c={type:"text/sitecore",chrometype:u,className:"scpm",kind:t};if(t===a.mV.Open){if("placeholder"===u&&n){let t="";for(let a of Object.keys(null!=(l=e.placeholders)?l:{})){if(n===a){t=r?`${n}_${r}`:`${n}_${s.fF}`;break}if((0,i.Np)(a)&&(0,i.jz)(a).test(n)){t=r?`${a}_${r}`:`${a}_${s.fF}`;break}}c.id=t}else c.id=r;"rendering"===u&&o&&(c["data-csdk-component-runtime"]=o)}return c};return n.createElement(n.Fragment,null,n.createElement("code",Object.assign({},l({kind:a.mV.Open,id:e.uid,placeholderName:t}))),r,n.createElement("code",Object.assign({},l({kind:a.mV.Close,placeholderName:t}))))}},9584:(e,t,r)=>{"use strict";r.d(t,{M:()=>I});var n,i,a={};r.r(a),r.d(a,{rC:()=>f,vv:()=>h,RL:()=>g,hO:()=>m});var s={};r.r(s),r.d(s,{$u:()=>u.$u});var o=r(4232),l=r(2130),u=r(6580);let{Ty:c,UU:d}=r(7804);(n=i||(i={})).Render="render",n.RenderInit="render-init",n.ImportMapMissing="import-map-missing",n.ImportMapLoad="import-map-load-error",n.GeneratedComponentFetch="generated-component-fetch-error";let f=(e,t)=>{if(!window)return;let r=r=>{let n=r.data;try{var a;let i,s,o;if(!(0,u.$r)(r,"component:generation:component-preview"))return;console.debug("Component Library: message received",n);let l=p(e,n.message);a=n.message.styles.content,i="content-sdk-style-preview",(s=document.getElementById(i))&&s.remove(),(o=document.createElement("style")).setAttribute("id",i),o.innerHTML=a,document.head.appendChild(o),t(null,l)}catch(e){m(n.message.uid,e,i.RenderInit),t(e,null)}};return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}},p=(e,t)=>{var r;let n,i,a=(r=t.imports,n=[],i={modules:[],exports:[]},r.forEach(t=>{let r=e.find(e=>e.module===t.module);if(!r)return void i.modules.push({module:t.module,alias:t.alias}
144);let a=r.exports.find(e=>e.name===t.export);return a?n.push({name:t.alias,value:a.value}):void i.exports.push({alias:t.alias,export:t.export,module:t.module})}),{successful:n,missing:i});if(a.missing.modules.length>0||a.missing.exports.length>0){let e="";throw a.missing.modules.forEach(t=>{e+=`Missing module: '${t.module}' with alias: '${t.alias}'
145`}),a.missing.exports.forEach(t=>{let r=t.export!==t.alias?` with alias: '${t.alias}'`:"";e+=`Missing export: '${t.export}' from module: '${t.module}'${r}
146`}),e}let s=a.successful.map(e=>e.name),o=a.successful.map(e=>e.value),l={Component:null};return Function("exports",t.styles.styleImport.name,...s,t.code.content)(l,t.styles.styleImport.content,...o),l.Component};function h(e,t={},r={}){return{name:"component:generation:component-props",message:{uid:e,fields:t,parameters:r}}}function g(e,t){var r;return{name:"component:generation:import-map",message:{uid:e,importMap:Array.isArray(r=t)&&r.length>0&&"string"==typeof r[0].module&&Array.isArray(r[0].exports)&&"string"==typeof r[0].exports[0]?t:t.map(e=>({module:e.module,exports:e.exports.map(e=>e.name)}))}}}let m=(e,t,r)=>{let n=function(e,t,r){switch(r){case i.Render:case i.RenderInit:return{name:"component:generation:component-preview-error",message:{uid:e,error:t,type:r}};default:return{name:"component:generation:error",message:{uid:e,error:t,type:r}}}}(e,t,r);console.error(`Component Library: sending error event. ${d.CONTACT_SUPPORT}`,n),"u">typeof window&&(window.parent&&window.parent!==window?window.parent:window).postMessage(n,"*")};var y=r(4825),v=r(9514),b=r(1958);class w extends o.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidUpdate(e){e.renderKey!==this.props.renderKey&&this.setState({hasError:!1})}componentDidCatch(e){m(this.props.uid,e,i.Render)}render(){return this.state.hasError?o.createElement("div",null,"Error during component rendering"):o.createElement(o.Suspense,null,this.props.children)}}var S=r(9764);let{RL:E,vv:_,rC:C,hO:O}=a,{$u:k}=s,I=()=>{var e,t;let{page:r,loadImportMap:n}=(0,y.M5)(),a=r.layout.sitecore.route,s=null==(e=null==a?void 0:a.placeholders[l.TB])?void 0:e[0],c=null==s?void 0:s.uid,{isDesignLibrary:d}=r.mode,f=null==(t=r.mode.designLibrary)?void 0:t.isVariantGeneration,[p,h]=(0,o.useState)({fields:null==s?void 0:s.fields,params:null==s?void 0:s.params}),[g,m]=(0,o.useState)(0),[I,A]=(0,o.useState)(null),T=!!I;return d?c?((0,o.useEffect)(()=>{k((0,u.mv)(u.gn.READY,c)),f||requestAnimationFrame(()=>{m(e=>0===e?e+1:e)});let e=(0,u.sI)(s,e=>{h({fields:e.fields,params:e.params}),m(e=>e+1)});return()=>e&&e()},[f,s,c]),(0,o.useEffect)(()=>{0!==g&&k((0,u.mv)(u.gn.RENDERED,c))},[g,c]),(0,o.useEffect)(()=>{let e;if(!d||!f)return;let t=!1;return(async()=>{let r;if(!n)return O(c,"No loadImportMap provided",i.ImportMapMissing);try{r=(await n()).default}catch(e){O(c,`Error loading import map: ${e}`,i.ImportMapLoad);return}t||(e=C(r,(e,t)=>{e||(A(()=>t),m(e=>e+1))}),k(E(c,r)),k(_(c,p.fields,p.params)))})(),()=>{t=!0,e&&e()}},[d,f,c,n,p]),o.createElement("main",null,T?o.createElement(w,{uid:c,renderKey:g},o.createElement(v.f,{rendering:s},o.createElement(I,{fields:p.fields,params:p.params,key:g}))):o.createElement("div",{id:l.BQ},a&&o.createElement(b.O,{name:l.TB,rendering:a,key:g})))):o.createElement(S.A,{message:"Rendering UID is missing in the rendering data"}):null}},9753:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return p},getRedirectTypeFromError:function(){return f},getURLFromRedirectError:function(){return d},permanentRedirect:function(){return c},redirect:function(){return u}};for(var i in n)Object.defineProperty(t,i,{enumerable:!0,get:n[i]});let a=r(1528),s=r(2602),o;function l(e,t,r=a.RedirectStatusCode.TemporaryRedirect){let n=Object.defineProperty(Error(s.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n.digest=`${s.REDIRECT_ERROR_CODE};${t};${e};${r};`,n}function u(e,t){throw l(e,t??=o?.getStore()?.isAction?"push":"replace",a.RedirectStatusCode.TemporaryRedirect)}function c(e,t="replace"){throw l(e,t,a.RedirectStatusCode.PermanentRedirect)}function d(e){return(0,s.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function f(e){if(!(0,s.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,
146configurable:!0});return e.digest.split(";",2)[1]}function p(e){if(!(0,s.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9764:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,h:()=>o});var n=r(4232),i=r(4825);let a=e=>n.createElement("div",{className:"sc-content-sdk-placeholder-error"},e.message?e.message:e.children);class s extends n.Component{constructor(e){super(e),this.defaultErrorMessage="There was a problem loading this section.",this.defaultLoadingMessage="Loading component...",this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){var r,n;this.showErrorDetails()&&console.error(`An error occurred in component ${null==(r=this.props.rendering)?void 0:r.componentName} (${null==(n=this.props.rendering)?void 0:n.uid}): `),console.error({error:e,errorInfo:t})}isInDevMode(){return!1}showErrorDetails(){return this.isInDevMode()||this.props.page.mode.isEditing||this.props.page.mode.isPreview}render(){var e,t;if(this.state.error)if(this.props.errorComponent)return n.createElement(this.props.errorComponent,{error:this.state.error});else if(this.showErrorDetails())return n.createElement("div",null,n.createElement(a,null,"A rendering error occurred in component"," ",n.createElement("em",null,null==(e=this.props.rendering)?void 0:e.componentName),n.createElement("br",null),"Error: ",n.createElement("em",null,this.state.error.message||JSON.stringify(this.state.error))));else return n.createElement("div",null,n.createElement(a,{message:this.defaultErrorMessage}));return null==(t=this.props.disableSuspense)||t||this.props.isDynamic?this.props.children:n.createElement(n.Suspense,{fallback:n.createElement("h4",null,this.props.componentLoadingMessage||this.defaultLoadingMessage)},this.props.children)}}let o=e=>{let{page:t}=(0,i.M5)(),r=Object.assign(Object.assign({},e),{page:t});return n.createElement(s,Object.assign({},r))}},9794:(e,t)=>{"use strict";var r,n=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){var i,s,o=[];for(s in"string"!=typeof(t=t||"")&&(t="?"),e)if(n.call(e,s)){if(!(i=e[s])&&(null===i||i===r||isNaN(i))&&(i=""),s=a(s),i=a(i),null===s||null===i)continue;o.push(s+"="+i)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var a=i(t[1]),s=i(t[2]);null===a||null===s||a in n||(n[a]=s)}return n}},9863:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=r(4232);let i=e=>{let t=e.rendering&&e.rendering.componentName?e.rendering.componentName:"Unnamed Component";e.errorOverride||console.log(`Component props for unimplemented '${t}' component`,e);let r=e.errorOverride||"Content SDK component is missing React implementation. See the developer console for more information.";return n.createElement("div",{style:{background:"darkorange",outline:"5px solid orange",padding:"10px",color:"white",maxWidth:"500px"}},n.createElement("h2",null,t),n.createElement("p",null,r))};i.displayName="MissingComponent"},9955:(e,t,r)=>{let n=r(8311);e.exports=function(e){let t=function(e){let t=function(){let e={},t=Object.keys(n);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){let e=r.pop(),i=Object.keys(n[e]);for(let n=i.length,a=0;a<n;a++){let n=i[a],s=t[n];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(n))}}return t}(e),r={},i=Object.keys(t);for(let e=i.length,a=0;a<e;a++){let e=i[a];null!==t[e].parent&&(r[e]=function(e,t){let r=[t[e].parent,e],i=n[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)r.unshift(t[a].parent),i=function(e,t){return function(r){return t(e(r))}}(n[t[a].parent][a],i),a=t[a].parent;return i.conversion=r,i}(e,t))}return r}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.