PageSourceSearch

https://docs.ardent.africa/_next/static/immutable/chunks/04eokba6m7qq4.js

js ardent.africa collected 2026-09-25 23:07:03 UTC 60,902 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,177102,e=>{"use strict";var t,r,n=e.i(632165),s=e.i(205729),i=e.i(726386),o=e.i(58291);let a="ardent_chat_sounds_enabled",l="/sounds/chat-incoming.mp3",h=(0,s.createContext)(null);function u({children:e}){let[t,r]=(0,s.useState)(!0);(0,s.useEffect)(()=>{r(function(){try{let e=window.localStorage.getItem(a);if("false"===e)return!1}catch{}return!0}())},[]);let i=(0,s.useCallback)(e=>{r(e);try{window.localStorage.setItem(a,String(e))}catch{}},[]),o=(0,s.useCallback)(()=>{r(e=>{let t=!e;try{window.localStorage.setItem(a,String(t))}catch{}return t})},[]),l=(0,s.useMemo)(()=>({enabled:t,toggleEnabled:o,setEnabled:i}),[t,o,i]);return(0,n.jsx)(h.Provider,{value:l,children:e})}function c(){let e=(0,s.useContext)(h);if(!e)throw Error("useChatSoundPreferences must be used within ChatSoundProvider");return e}function d(){return(d=Object.assign.bind()).apply(null,arguments)}var f=["id","volume","playbackRate","soundEnabled","interrupt","onload"];let m=function(t,r){var n=void 0===r?{}:r,i=n.volume,o=void 0===i?1:i,a=n.playbackRate,l=void 0===a?1:a,h=n.soundEnabled,u=void 0===h||h,c=n.interrupt,m=void 0!==c&&c,p=n.onload,g=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(n,f),b=s.default.useRef(null),y=s.default.useRef(!1),E=s.default.useState(null),H=E[0],v=E[1],B=s.default.useState(null),x=B[0],S=B[1],T=function(){"function"==typeof p&&p.call(this),y.current&&v(1e3*this.duration()),S(this)};(0,s.useEffect)(function(){return e.A(636480).then(function(e){if(!y.current){var r;b.current=null!=(r=e.Howl)?r:e.default.Howl,y.current=!0,new b.current(d({src:Array.isArray(t)?t:[t],volume:o,rate:l,onload:T},g))}}),function(){y.current=!1}},[]),s.default.useEffect(function(){b.current&&x&&S(new b.current(d({src:Array.isArray(t)?t:[t],volume:o,onload:T},g)))},[JSON.stringify(t)]),s.default.useEffect(function(){x&&(x.volume(o),g.sprite||x.rate(l))},[x,o,l]);var N=s.default.useCallback(function(e){void 0===e&&(e={}),x&&(u||e.forceSoundEnabled)&&(m&&x.stop(),e.playbackRate&&x.rate(e.playbackRate),x.play(e.id))},[x,u,m]),w=s.default.useCallback(function(e){x&&x.stop(e)},[x]),A=s.default.useCallback(function(e){x&&x.pause(e)},[x]);return[N,{sound:x,stop:w,pause:A,duration:H}]};function p(e,t){let r=t&&t.cache?t.cache:H,n=t&&t.serializer?t.serializer:y;return(t&&t.strategy?t.strategy:function(e,t){var r,n;let s=1===e.length?g:b;return r=t.cache.create(),n=t.serializer,s.bind(this,e,r,n)})(e,{cache:r,serializer:n})}function g(e,t,r,n){let s=null==n||"number"==typeof n||"boolean"==typeof n?n:r(n),i=t.get(s);return void 0===i&&(i=e.call(this,n),t.set(s,i)),i}function b(e,t,r){let n=Array.prototype.slice.call(arguments,3),s=r(n),i=t.get(s);return void 0===i&&(i=e.apply(this,n),t.set(s,i)),i}let y=function(){return JSON.stringify(arguments)};var E=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};let H={create:function(){return new E}},v={variadic:function(e,t){var r,n;return r=t.cache.create(),n=t.serializer,b.bind(this,e,r,n)},monadic:function(e,t){var r,n;return r=t.cache.create(),n=t.serializer,g.bind(this,e,r,n)}};class B extends Error{constructor(e,t){let r=e;t&&(r+=": "+t),super(r),this.code=e,t&&(this.originalMessage=t)}}var x=((t=x||{}).MISSING_MESSAGE="MISSING_MESSAGE",t.MISSING_FORMAT="MISSING_FORMAT",t.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",t.INSUFFICIENT_PATH="INSUFFICIENT_PATH",t.INVALID_MESSAGE="INVALID_MESSAGE",t.INVALID_KEY="INVALID_KEY",t.FORMATTING_ERROR="FORMATTING_ERROR",t);function S(e,t){return p(e,{cache:{create:()=>({get:e=>t[e],set(e,r){t[e]=r}})},strategy:v.variadic})}function T(e,t){return S((...t)=>new e(...t),t)}let N=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,w=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,A=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,I=/^(@+)?(\+|#+)?[rs]?$/g,_=/(\*)(0+)|(#+)(0+)|(0+)/g,P=/^(0+)$/;function C(e){let t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(I,function(e,r,n){return"string"!=typeof n?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):"+"===n?t.minimumSignificantDigits=r.length:"#"===r[0]?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+("string"==typeof n?n.length:0)),""}),t}function L(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function M(e){let t=L(e);return t||{}}let R=((r={})[r.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",r[r.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",r[r.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",r[r.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",r[r.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",r[r.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",r[r.INVALID_
1NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",r[r.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",r[r.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",r[r.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",r[r.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",r[r.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",r[r.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",r[r.INVALID_TAG=23]="INVALID_TAG",r[r.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",r[r.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",r[r.UNCLOSED_TAG=27]="UNCLOSED_TAG",r);function k(e){return!!(e&&"object"==typeof e&&0===e.type)}function O(e){return!!(e&&"object"==typeof e&&1===e.type)}let D=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,j={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA
1:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},F=RegExp(`^${D.source}*`),G=RegExp(`${D.source}*$`);function U(e,t){return{start:e,end:t}}let V=!!Object.fromEntries,K=!!String.prototype.trimStart,z=!!String.prototype.trimEnd,Z=V?Object.fromEntries:function(e){let t={};for(let[r,n]of e)t[r]=n;return t},$=K?function(e){return e.trimStart()}:function(e){return e.replace(F,"")},Y=z?function(e){return e.trimEnd()}:function(e){return e.replace(G,"")},X=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");var W=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");if(this.message.length>0){let e=this.message.charCodeAt(0);if(35!==e&&39!==e&&60!==e&&123!==e&&125!==e){let e=function(e){if(0===e.length)return null;let t=1,r=1;for(let n=0;n<e.length;){let s=e.charCodeAt(n);switch(s){case 35:case 39:case 60:case 123:case 125:return null}if(10===s)t++,r=1,n++;else if(r++,s>=55296&&s<=56319&&n+1<e.length){let t=e.charCodeAt(n+1);n+=t>=56320&&t<=57343?2:1}else n++}return{offset:e.length,line:t,column:r}}(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:U(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(e,t,r){let n=[];for(;!this.isEOF();){let s=this.char();if(123===s){let t=this.parseArgument(e,r);if(t.err)return t;n.push(t.val)}else if(125===s&&e>0)break;else if(35===s&&("plural"===t||"selectordinal"===t)){let e=this.clonePosition();this.bump(),n.push({type:7,location:U(e,this.clonePosition())})}else if(60!==s||this.ignoreTag||47!==this.peek())if(60===s&&!this.ignoreTag&&J(this.peek()||0)){let r=this.parseTag(e,t);if(r.err)return r;n.push(r.val)}else{let r=this.parseLiteral(e,t);if(r.err)return r;n.push(r.val)}else if(!r)return this.error(26,U(this.clonePosition(),this.clonePosition()));else break}return{val:n,err:null}}parseTag(e,t){let r=this.clonePosition();this.bump();let n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${n}/>`,location:U(r,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(23,U(r,this.clonePosition()));{let s=this.parseMessage(e+1,t,!0);if(s.err)return s;let i=s.val,o=this.clonePosition();if(!this.bumpIf("</"))return this.error(27,U(r,this.clonePosition()));{if(this.isEOF()||!J(this.char()))return this.error(23,U(o,this.clonePosition()));let e=this.clonePosition();return n!==this.parseTagName()?this.error(26,U(e,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:8,value:n,children:i,location:U(r,this.clonePosition())},err:null}:this.error(23,U(o,this.clonePosition()))}}}parseTagName(){var e;let t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())}parseLiteral(e,t){let r=this.clonePosition(),n="";for(;;){let r=this.tryParseQuote(t);if(r){n+=r;
1continue}let s=this.tryParseUnquoted(e,t);if(s){n+=s;continue}let i=this.tryParseLeftAngleBracket();if(i){n+=i;continue}break}return{val:{type:0,value:n,location:U(r,this.clonePosition())},err:null}}tryParseLeftAngleBracket(){var e;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(J(e=this.peek()||0)||47===e)?null:(this.bump(),"<")}tryParseQuote(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(39===e)if(39===this.peek())t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let r=this.char();return 60===r||123===r||35===r&&("plural"===t||"selectordinal"===t)||125===r&&e>0?null:(this.bump(),String.fromCodePoint(r))}parseArgument(e,t){let r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,U(r,this.clonePosition()));if(125===this.char())return this.bump(),this.error(2,U(r,this.clonePosition()));let n=this.parseIdentifierIfPossible().value;if(!n)return this.error(3,U(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,U(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:n,location:U(r,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,U(r,this.clonePosition()));return this.parseArgumentOptions(e,t,n,r);default:return this.error(3,U(r,this.clonePosition()))}}parseIdentifierIfPossible(){var e;let t=this.clonePosition(),r=this.offset(),n=(e=this.message,X.lastIndex=r,X.exec(e)[1]??""),s=r+n.length;return this.bumpTo(s),{value:n,location:U(t,this.clonePosition())}}parseArgumentOptions(e,t,r,n){let s=this.clonePosition(),i=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(i){case"":return this.error(4,U(s,o));case"number":case"date":case"time":{this.bumpSpace();let e=null;if(this.bumpIf(",")){this.bumpSpace();let t=this.clonePosition(),r=this.parseSimpleArgStyleIfPossible();if(r.err)return r;let n=Y(r.val);if(0===n.length)return this.error(6,U(this.clonePosition(),this.clonePosition()));e={style:n,styleLocation:U(t,this.clonePosition())}}let t=this.tryParseArgumentClose(n);if(t.err)return t;let s=U(n,this.clonePosition());if(e&&e.style.startsWith("::")){let t=$(e.style.slice(2));if("number"===i){let n=this.parseNumberSkeletonFromString(t,e.styleLocation);if(n.err)return n;return{val:{type:2,value:r,location:s,style:n.val},err:null}}{let n;if(0===t.length)return this.error(10,s);let o=t;return this.locale&&(o=function(e,t){let r="";for(let n=0;n<e.length;n++){let s=e.charAt(n);if("j"===s){let i=0;for(;n+1<e.length&&e.charAt(n+1)===s;)i++,n++;let o=1+(1&i),a=i<2?1:3+(i>>1),l=function(e){let t,r=e.hourCycle;if(void 0===r&&e.hourCycles&&e.hourCycles.length&&(r=e.hourCycles[0]),r)switch(r){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let n=e.language;return"root"!==n&&(t=e.maximize().region),(j[t||""]||j[n||""]||j[`${n}-001`]||j["001"])[0]}(t);for(("H"==l||"k"==l)&&(a=0);a-- >0;)r+="a";for(;o-- >0;)r=l+r}else"J"===s?r+="H":r+=s}return r}(t,this.locale)),{val:{type:"date"===i?3:4,value:r,location:s,style:{type:1,pattern:o,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?(n={},o.replace(N,e=>{let t=e.length;switch(e[0]){case"G":n.era=4===t?"long":5===t?"narrow":"short";break;case"y":n.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":n.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":n.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":n.weekday=4===t?"long":5===t?"narrow":"short";break;case"e":if(t<4)throw RangeError("`e..eee` (weekday) patterns are not supported");n.weekday=["short","long","narrow","short"][t-3];break;case"c":if(t<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");n.weekday=["short","long","narrow","short"][t-3];break;case"a":n.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":n.hourCycle="h12",n.hour=["numeric","2-digit"][t-1];break;case"H":n.hourCycle="h23",n.hour=["numeric","2-digit"][t-1];break;case"K":n.hourCycle="h11",n.hour=["numeric","2-digit"][t-1];break;case"k":n.hourCycle="h24",n.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":n.minute=["numeric","2-digit"][t-1];break;case"s":n.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":n.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),n):{}}},err:null}}}return{val:{type:"number"===i?2:"date"===i?3:4,value:r,location:s,style:e?.style??null},err:null}}
1case"plural":case"selectordinal":case"select":{let s=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,U(s,{...s}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),a=0;if("select"!==i&&"offset"===o.value){if(!this.bumpIf(":"))return this.error(13,U(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),a=e.val}let l=this.tryParsePluralOrSelectOptions(e,i,t,o);if(l.err)return l;let h=this.tryParseArgumentClose(n);if(h.err)return h;let u=U(n,this.clonePosition());if("select"===i)return{val:{type:5,value:r,options:Z(l.val),location:u},err:null};return{val:{type:6,value:r,options:Z(l.val),offset:a,pluralType:"plural"===i?"cardinal":"ordinal",location:u},err:null}}default:return this.error(5,U(s,o))}}tryParseArgumentClose(e){return this.isEOF()||125!==this.char()?this.error(1,U(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,U(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let r=[];try{r=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");let t=e.split(w).filter(e=>e.length>0),r=[];for(let e of t){let t=e.split("/");if(0===t.length)throw Error("Invalid number skeleton");let[n,...s]=t;for(let e of s)if(0===e.length)throw Error("Invalid number skeleton");r.push({stem:n,options:s})}return r}(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:r,location:t,parsedOptions:this.shouldParseSkeletons?function(e){let t={};for(let r of e){switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=r.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t={...t,notation:"scientific",...r.options.reduce((e,t)=>({...e,...M(t)}),{})};continue;case"engineering":t={...t,notation:"engineering",...r.options.reduce((e,t)=>({...e,...M(t)}),{})};continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(r.options.length>1)throw RangeError("integer-width stems only accept a single optional option");r.options[0].replace(_,function(e,r,n,s,i,o){if(r)t.minimumIntegerDigits=n.length;else if(s&&i)throw Error("We currently do not support maximum integer digits");else if(o)throw Error("We currently do not support exact integer digits");return""});continue}if(P.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(A.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(A,function(e,r,n,s,i,o){return"*"===n?t.minimumFractionDigits=r.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:i&&o?(t.minimumFractionDigits=i.length,t.maximumFractionDigits=i.length+o.length):(t.minimumFractionDigits=r.length,t.maximumFractionDigits=r.length),""});let e=r.options[0];
1"w"===e?t={...t,trailingZeroDisplay:"stripIfInteger"}:e&&(t={...t,...C(e)});continue}if(I.test(r.stem)){t={...t,...C(r.stem)};continue}let e=L(r.stem);e&&(t={...t,...e});let n=function(e){let t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){let r=e.slice(0,2);if("+!"===r?(t.signDisplay="always",e=e.slice(2)):"+?"===r&&(t.signDisplay="exceptZero",e=e.slice(2)),!P.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}(r.stem);n&&(t={...t,...n})}return t}(r):{}},err:null}}tryParsePluralOrSelectOptions(e,t,r,n){let s=!1,i=[],o=new Set,{value:a,location:l}=n;for(;;){if(0===a.length){let e=this.clonePosition();if("select"!==t&&this.bumpIf("=")){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;l=U(e,this.clonePosition()),a=this.message.slice(e.offset,this.offset())}else break}if(o.has(a))return this.error("select"===t?21:20,l);"other"===a&&(s=!0),this.bumpSpace();let n=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?17:18,U(this.clonePosition(),this.clonePosition()));let h=this.parseMessage(e+1,t,r);if(h.err)return h;let u=this.tryParseArgumentClose(n);if(u.err)return u;i.push([a,{value:h.val,location:U(n,this.clonePosition())}]),o.add(a),this.bumpSpace(),{value:a,location:l}=this.parseIdentifierIfPossible()}return 0===i.length?this.error("select"===t?15:16,U(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(22,U(this.clonePosition(),this.clonePosition())):{val:i,err:null}}tryParseDecimalInteger(e,t){let r=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);let s=!1,i=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)s=!0,i=10*i+(e-48),this.bump();else break}let o=U(n,this.clonePosition());return s?Number.isSafeInteger(i*=r)?{val:i,err:null}:this.error(t,o):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");let t=this.message.codePointAt(e);if(void 0===t)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),r=this.message.indexOf(e,t);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var e;!this.isEOF()&&((e=this.char())>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e);)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function J(e){return e>=97&&e<=122||e>=65&&e<=90}function q(e,t={}){let r=new W(e,t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t}).parse();if(r.err){let e=SyntaxError(R[r.err.kind]);throw e.location=r.err.location,e.originalMessage=r.err.message,e}return t?.captureLocation||function e(t){t.forEach(t=>{if(delete t.location,5===t.type||6===t.type)for(let r in t.options)delete t.options[r].location,e(t.options[r].value);else 2===t.type&&k(t.style)||(3===t.type||4===t.type)&&O(t.style)?delete t.style.location:8===t.type&&e(t.children)})}(r.val),r.val}var Q=class extends Error{constructor(e,t,r){super(e),this.code=t,this.originalMessage=r}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},ee=class extends Q{constructor(e,t,r,n){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(r).join('", "')}"`,"INVALID_VALUE",n)}},et=class extends Q{constructor(e,t,r){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",r)}}
1,er=class extends Q{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function en(e){return{create:()=>({get:t=>e[t],set(t,r){e[t]=r}})}}var es=class e{constructor(t,r=e.defaultLocale,n,s){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(1===t.length)return t[0].value;let r=t.reduce((e,t)=>(e.length&&0===t.type&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e),[]);return r.length<=1?r[0]||"":r},this.formatToParts=e=>(function e(t,r,n,s,i,o,a){if(1===t.length&&0===t[0].type)return[{type:0,value:t[0].value}];let l=[];for(let h of t){if(0===h.type){l.push({type:0,value:h.value});continue}if(7===h.type){"number"==typeof o&&l.push({type:0,value:n.getNumberFormat(r).format(o)});continue}let{value:t}=h;if(!(i&&t in i))throw new er(t,a);let u=i[t];if(1===h.type){u&&"string"!=typeof u&&"number"!=typeof u&&"bigint"!=typeof u||(u="string"==typeof u||"number"==typeof u||"bigint"==typeof u?String(u):""),l.push({type:+("string"!=typeof u),value:u});continue}if(3===h.type){let e="string"==typeof h.style?s.date[h.style]:O(h.style)?h.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(r,e).format(u)});continue}if(4===h.type){let e="string"==typeof h.style?s.time[h.style]:O(h.style)?h.style.parsedOptions:s.time.medium;l.push({type:0,value:n.getDateTimeFormat(r,e).format(u)});continue}if(2===h.type){let e="string"==typeof h.style?s.number[h.style]:k(h.style)?h.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if("bigint"==typeof u){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);u*=BigInt(t)}else u*=t}l.push({type:0,value:n.getNumberFormat(r,e).format(u)});continue}if(8===h.type){let{children:t,value:u}=h,c=i[u];if("function"!=typeof c)throw new et(u,"function",a);let d=c(e(t,r,n,s,i,o).map(e=>e.value));Array.isArray(d)||(d=[d]),l.push(...d.map(e=>({type:+("string"!=typeof e),value:e})))}if(5===h.type){let t=u,o=(Object.prototype.hasOwnProperty.call(h.options,t)?h.options[t]:void 0)||h.options.other;if(!o)throw new ee(h.value,u,Object.keys(h.options),a);l.push(...e(o.value,r,n,s,i));continue}if(6===h.type){let t=`=${u}`,o=Object.prototype.hasOwnProperty.call(h.options,t)?h.options[t]:void 0;if(!o){if(!Intl.PluralRules)throw new Q(`Intl.PluralRules is not available in this environment.
2Try polyfilling it using "@formatjs/intl-pluralrules"
3`,"MISSING_INTL_API",a);let e="bigint"==typeof u?Number(u):u,t=n.getPluralRules(r,{type:h.pluralType}).select(e-(h.offset||0));o=(Object.prototype.hasOwnProperty.call(h.options,t)?h.options[t]:void 0)||h.options.other}if(!o)throw new ee(h.value,u,Object.keys(h.options),a);let c="bigint"==typeof u?Number(u):u;l.push(...e(o.value,r,n,s,i,c-(h.offset||0)));continue}}return l.length<2?l:l.reduce((e,t)=>{let r=e[e.length-1];return r&&0===r.type&&0===t.type?r.value+=t.value:e.push(t),e},[])})(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=r,this.resolvedLocale=e.resolveLocale(r),"string"==typeof t){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...r}=s||{};this.ast=e.__parse(t,{...r,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(e,t){return t?Object.keys(e).reduce((r,n)=>{var s,i;return r[n]=(s=e[n],(i=t[n])?{...s,...i,...Object.keys(s).reduce((e,t)=>(e[t]={...s[t],...i[t]},e),{})}:s),r},{...e}):e}(e.formats,n),this.formatters=s&&s.formatters||function(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:p((...e)=>new Intl.NumberFormat(...e),{cache:en(e.number),strategy:v.variadic}),getDateTimeFormat:p((...e)=>new Intl.DateTimeFormat(...e),{cache:en(e.dateTime),strategy:v.variadic}),getPluralRules:p((...e)=>new Intl.PluralRules(...e),{cache:en(e.pluralRules),strategy:v.variadic})}}(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(void 0===Intl.Locale)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return new Intl.Locale(t.length>0?t[0]:"string"==typeof e?e:e[0])}}static{this.__parse=q}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}};function ei(...[e,t,r,n]){let i;if(Array.isArray(t))throw new B(x.INVALID_MESSAGE,void 0);if("object"==typeof t)throw new B(x.INSUFFICIENT_PATH,void 0);if("string"==typeof t){let e=r||/'[{}<#|']/.test(t)?void 0:t;if(e)return e}let{cache:o,formats:a,formatters:l,globalFormats:h,locale:u,timeZone:c}=n;l.getMessageFormat||(l.getMessageFormat=S((...e)=>new es(e[0],e[1],e[2],{formatters:l,...e[3]}),o.message));try{let e,r,n,s;i=l.getMessageFormat(t,u,(e=es.formats.date,r=es.formats.time,n={...h?.dateTime,...a?.dateTime},s={date:{...e,...n},time:{...r,...n},number:{...h?.number,...a?.number}}
3,c&&["date","time"].forEach(e=>{let t=s[e];for(let[e,r]of Object.entries(t))t[e]={timeZone:c,...r}}),s),{formatters:{...l,getDateTimeFormat:(e,t)=>l.getDateTimeFormat(e,{...t,timeZone:t?.timeZone??c})}})}catch(e){throw new B(x.INVALID_MESSAGE,void 0)}let d=i.format(r);return(0,s.isValidElement)(d)||Array.isArray(d)||"string"==typeof d?d:String(d)}function eo(...e){return e.filter(Boolean).join(".")}function ea(e){console.error(e)}function el(e,t,r,n){let s=eo(n,r);if(!t)throw Error(s);let i=t;return r.split(".").forEach(t=>{let r=i[t];if(null==t||null==r)throw Error(s+` (${e})`);i=r}),i}ei.raw=!0;let eh={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2628e3,months:2628e3,quarter:7884e3,quarters:7884e3,year:31536e3,years:31536e3},eu=(0,s.createContext)(void 0);function ec(){let e=(0,s.useContext)(eu);if(!e)throw Error(void 0);return e}let ed=!1,ef="u"<typeof window;function em(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let ep=em(0,function(e){return function(e,t){let{cache:r,formats:n,formatters:i,getMessageFallback:o,locale:a,onError:l,timeZone:h}=ec(),u=e["!"],c="!"===t?void 0:t.slice(2);return h||ed||!ef||(ed=!0,l(new B(x.ENVIRONMENT_FALLBACK,void 0))),(0,s.useMemo)(()=>{var e;let t;return t=function(e,t,r){try{if(!t)throw Error(void 0);let n=r?el(e,t,r):t;if(!n)throw Error(r);return n}catch(e){return new B(x.MISSING_MESSAGE,e.message)}}((e={cache:r,formatters:i,getMessageFallback:o,messages:u,namespace:c,onError:l,formats:n,locale:a,timeZone:h}).locale,e.messages,e.namespace),function({cache:e,formats:t,formatters:r,getMessageFallback:n=function(e){return eo(e.namespace,e.key)},locale:i,messagesOrError:o,namespace:a,onError:l,timeZone:h}){let u=o instanceof B;function c(e,t,r,s){let i=new B(t,r);return l(i),s??n({error:i,key:e,namespace:a})}function d(d,f,m,p){let g;if(u){if(!p)return l(o),n({error:o,key:d,namespace:a});g=p}
3else try{g=el(i,o,d,a)}catch(e){if(!p)return c(d,x.MISSING_MESSAGE,e.message,p);g=p}try{let n,o=eo(a,d);return ei(o,g,f?(n={},Object.keys(f).forEach(e=>{let t,r=0,i=f[e];t="function"==typeof i?t=>{let n=i(t);return(0,s.isValidElement)(n)?(0,s.cloneElement)(n,{key:e+r++}):n}:i,n[e]=t}),n):f,{cache:e,formatters:r,globalFormats:t,formats:m,locale:i,timeZone:h})}catch(r){let e,t;return r instanceof B?(e=r.code,t=r.originalMessage):(e=x.FORMATTING_ERROR,t=r.message),c(d,e,t,p)}}function f(e,t,r,n){let s=d(e,t,r,n);return"string"!=typeof s?c(e,x.INVALID_MESSAGE,void 0):s}return f.rich=d,f.markup=(e,t,r,n)=>d(e,t,r,n),f.raw=e=>{if(u)return l(o),n({error:o,key:e,namespace:a});try{return el(i,o,e,a)}catch(t){return c(e,x.MISSING_MESSAGE,t.message)}},f.has=e=>{if(u)return!1;try{return el(i,o,e,a),!0}catch{return!1}},f}({...e,messagesOrError:t})},[r,i,o,u,c,l,n,a,h])}({"!":ec().messages},e?`!.${e}`:"!")});function eg(){let e=ep("nav"),{enabled:t,toggleEnabled:r}=c(),[s]=m(l,{volume:.45,interrupt:!0});return(0,n.jsx)("button",{type:"button",onClick:()=>{let e=!t;r(),e&&s({forceSoundEnabled:!0})},"aria-label":e(t?"muteChatSounds":"unmuteChatSounds"),"aria-pressed":t,className:"rounded-md p-1.5 text-fd-muted-foreground transition hover:bg-fd-accent hover:text-fd-foreground",children:t?(0,n.jsx)(eb,{}):(0,n.jsx)(ey,{})})}function eb(){return(0,n.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"size-4",fill:"
3currentColor",children:(0,n.jsx)("path",{d:"M3 10v4h4l5 5V5L7 10H3zm13.5 2c0-1.77-1.02-3.29-2.5-4.03v8.06c1.48-.74 2.5-2.26 2.5-4.03zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z"})})}function ey(){return(0,n.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"size-4",fill:"currentColor",children:(0,n.jsx)("path",{d:"M3.63 3.63a.996.996 0 0 0 0 1.41L7.29 8.7 7 9H3v6h4l5 5v-6.59l4.18 4.18c-.49.37-1.02.68-1.6.91v2.06c.98-.25 1.88-.66 2.67-1.2l2.08 2.08a.996.996 0 1 0 1.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM12 4l-1.88 1.88L12 7.76V4zm6.36 7.05-1.41-1.41-1.06 1.06.71.71c-.3.53-.48 1.14-.48 1.79 0 .53.12 1.03.33 1.48l1.41-1.41c-.14-.32-.24-.68-.24-1.07 0-.39.1-.75.24-1.07l1.06 1.06zm-2.12 2.12-1.41-1.41-.71.71c.3.53.48 1.14.48 1.79 0 .39-.1.75-.24 1.07l1.41 1.41c.14-.32.24-.68.24-1.07 0-.65-.18-1.26-.48-1.79l.71-.71z"})})}em(0,function(){let{formats:e,formatters:t,locale:r,now:n,onError:i,timeZone:o}=ec();return(0,s.useMemo)(()=>(function(e){let{_cache:t={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}},_formatters:r={getDateTimeFormat:T(Intl.DateTimeFormat,t.dateTime),getNumberFormat:T(Intl.NumberFormat,t.number),getPluralRules:T(Intl.PluralRules,t.pluralRules),getRelativeTimeFormat:T(Intl.RelativeTimeFormat,t.relativeTime),getListFormat:T(Intl.ListFormat,t.list),getDisplayNames:T(Intl.DisplayNames,t.displayNames)},formats:n,locale:s,onError:i=ea,timeZone:o}=e;function a(e){return e?.timeZone||(o?e={...e,timeZone:o}:i(new B(x.ENVIRONMENT_FALLBACK,void 0))),e}function l(e,t,r,n,s){let o;try{o=function(e,t,r){let n;if("string"==typeof t){if(!(n=e?.[t])){let e=new B(x.MISSING_FORMAT,void 0);throw i(e),e}}else n=t;return r&&(n={...n,...r}),n}(r,e,t)}catch{return s()}try{return n(o)}catch(e){return i(new B(x.FORMATTING_ERROR,e.message)),s()}}function h(e,t,i){return l(t,i,n?.dateTime,t=>(t=a(t),r.getDateTimeFormat(s,t).format(e)),()=>String(e))}function u(){return e.now?e.now:(i(new B(x.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:h,number:function(e,t,i){return l(t,i,n?.number,t=>r.getNumberFormat(s,t).format(e),()=>String(e))},relativeTime:function(e,t){try{var n;let i,o,a,l={};t instanceof Date||"number"==typeof t?i=new Date(t):t&&(i=null!=t.now?new Date(t.now):u(),o=t.unit,l.style=t.style,l.numberingSystem=t.numberingSystem),i||(i=u());let h=(new Date(e).getTime()-i.getTime())/1e3;o||(o=(a=Math.abs(h))<60?"second":a<3600?"minute":a<86400?"hour":a<604800?"day":a<2628e3?"week":a<31536e3?"month":"year"),l.numeric="second"===o?"auto":"always";let c=(n=o,Math.round(h/eh[n]));return r.getRelativeTimeFormat(s,l).format(c,o)}catch(t){return i(new B(x.FORMATTING_ERROR,t.message)),String(e)}},list:function(e,t,i){let o=[],a=new Map,h=0;for(let t of e){let e;"object"==typeof t?(e=String(h),a.set(e,t)):e=String(t),o.push(e),h++}return l(t,i,n?.list,e=>{let t=r.getListFormat(s,e).formatToParts(o).map(e=>"literal"===e.type?e.value:a.get(e.value)||e.value);return a.size>0?t:t.join("")},()=>String(e))},dateTimeRange:function(e,t,i,o){return l(i,o,n?.dateTime,n=>(n=a(n),r.getDateTimeFormat(s,n).formatRange(e,t)),()=>[h(e),h(t)].join(" – "))},displayName:function(e,t,i){return l(t,i,n?.displayName,t=>r.getDisplayNames(s,t).of(e),()=>e)}}})({formats:e,locale:r,now:n,onError:i,timeZone:o,_formatters:t}),[e,t,n,r,i,o])});var eE=e.i(807643);function eH(){return"u"<typeof document||!document.hidden}async function ev(e){let t=await e.json().catch(()=>null);if(!e.ok||!t)throw Error(t?.error?.message??"Something went wrong.");return t}async function eB(e){let t={name:e.name,email:e.email,...e.phone?{phone:e.phone}:{}},r=await fetch("/api/support",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({guest_info:t,metadata:{source_instance:"docs"}})});return(await ev(r)).conversation}async function ex(e){let t=await fetch(`/api/support/${e}`,{cache:"no-store"});return(await ev(t)).conversation}async function eS(e){let t=await fetch(`/api/support/${e}/messages`,{cache:"no-store"});return(await ev(t)).messages??[]}async function eT(e,t){return ev(await fetch(`/api/support/${e}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({content:t})}))}async function eN(e){await fetch(`/api/support/${e}/request-human`,{method:"POST"})}let ew=/https?:\/\/[^\s<]+[^\s<.,;:!?'")\]}>]/g;function eA({text:e,className:t,linkClassName:r}){let s=function(e){let t;if(!e)return[];let r=[],n=0,s=new RegExp(ew.source,ew.flags);for(;null!==(t=s.exec(e));)t.index>n&&r.push({type:"text",value:e.slice(n,t.index)}),r.push({type:"link",value:t[0]}),n=t.index+t[0].length;return n<e.length&&r.push({type:"text",value:e.slice(n)}),r.length>0?r:[{type:"text",value:e}]}(e);return(0,n.jsx)("span",{className:t,children:s.map((e,t)=>"link"===e.type?(0,n.jsx)("a",{href:e.value,target:"_blank",rel:"noopener noreferrer",className:r,children:e.value},`${e.value}-${t}`):(0,n.jsx)("span",{children:e.value},`text-${t}`))})}let eI="ardent_docs_support_id",e_="ardent_docs_support_seen",eP=["How do donations work?","How do I sign a petition?","How do I get an API key?"];function eC(e,t){let r=e.filter(e=>!e.id.startsWith("temp-")||!t.some(t=>t.sender_type===e.sender_type&&t.content===e.content)),n=new Map;for(let e of[...r,...t])n.set(e.id,e);return[...n.values()].sort((e,t)=>
3new Date(e.created_at)-new Date(t.created_at))}let eL={ai:{label:"AI assistant",dot:"var(--ardent-gold)"},waiting:{label:"Connecting you to our team",dot:"#e0a23a",pulse:!0},live:{label:"Live with our team",dot:"#3fb27f"},closed:{label:"Chat ended",dot:"var(--color-fd-muted-foreground)"}},eM=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function eR(){let e=(0,o.usePathname)(),[t,r]=(0,s.useState)(!1),[a,h]=(0,s.useState)(null),[u,d]=(0,s.useState)("ai"),[f,p]=(0,s.useState)([]),[g,b]=(0,s.useState)(""),[y,E]=(0,s.useState)(!1),[H,v]=(0,s.useState)(!1),[B,x]=(0,s.useState)(null),[S,T]=(0,s.useState)(""),[N,w]=(0,s.useState)(""),[A,I]=(0,s.useState)(""),[_,P]=(0,s.useState)(null),[C,L]=(0,s.useState)(0),M=(0,s.useRef)(null),R=(0,s.useRef)(!0),k=(0,s.useRef)(null),[O,D]=(0,s.useState)(!1),{notifyIncoming:j,primeOnUserGesture:F}=function(){let{enabled:e}=c(),[t]=m(l,{volume:.45,interrupt:!0,soundEnabled:e}),[r]=m("/sounds/chat-queue.mp3",{volume:.55,interrupt:!0,soundEnabled:e}),n=(0,s.useCallback)(()=>{try{eE.Howler.ctx&&"suspended"===eE.Howler.ctx.state&&eE.Howler.ctx.resume()}catch{}},[]);return{enabled:e,notifyIncoming:(0,s.useCallback)(()=>{eH()&&t()},[t]),notifyQueue:(0,s.useCallback)(()=>{eH()&&r()},[r]),primeOnUserGesture:n}}(),G=(0,s.useRef)(j);(0,s.useEffect)(()=>{G.current=j},[j]);let U=(0,s.useCallback)((e,t)=>{t.some(t=>t.id===e.id)||("admin"===e.sender_type||"ai"===e.sender_type)&&G.current()},[]);(0,s.useEffect)(()=>{let e=window.localStorage.getItem(eI);e&&h(e)},[]);let V=(0,s.useCallback)(async e=>{try{let[t,r]=await Promise.all([eS(e),ex(e)]);p(e=>eC(e,t)),d(r.status)}catch{window.localStorage.removeItem(eI),h(null),p([]),d("ai")}},[]);(0,s.useEffect)(()=>{let e=window.localStorage.getItem(e_);L(e?Number(e):Date.now())},[]),(0,s.useEffect)(()=>{if(!t)return;let e=Date.now();L(e),window.localStorage.setItem(e_,String(e))},[t,f]);let K="closed"===u;(0,s.useEffect)(()=>{if(!t||!a||K)return;V(a);let e=setInterval(()=>{document.hidden||V(a)},4e3);return()=>clearInterval(e)},[t,a,K,V]),(0,s.useEffect)(()=>{if(!t||!a||K)return;let e=null;try{(e=new EventSource(`/api/support/${a}/events`)).addEventListener("message",e=>{try{let t=JSON.parse(e.data);p(e=>(U(t,e),eC(e,[t])))}catch{}}),e.addEventListener("conversation",e=>{try{let t=JSON.parse(e.data);t.status&&d(t.status)}catch{}}),e.onerror=()=>{}}catch{}return()=>e?.close()},[t,a,K,U]),(0,s.useEffect)(()=>{if(t||!a||K)return;V(a);let e=setInterval(()=>{document.hidden||V(a)},2e4);return()=>clearInterval(e)},[t,a,K,V]);let z=(0,s.useMemo)(()=>f.filter(e=>"user"!==e.sender_type&&+new Date(e.created_at)>C).length,[f,C]),Z=(0,s.useCallback)((e="auto")=>{let t=M.current;t&&t.scrollTo({top:t.scrollHeight,behavior:e})},[]),$=(0,s.useCallback)(()=>{let e=M.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<=64;R.current=t,D(!t)},[]);(0,s.useEffect)(()=>{if(!R.current){f.length>0&&D(!0);return}Z(f.length<=1?"auto":"smooth"),D(!1)},[f,Z]),(0,s.useEffect)(()=>{R.current&&Z("auto")},[y,Z]),(0,s.useEffect)(()=>{t&&(R.current=!0,D(!1),requestAnimationFrame(()=>Z("auto")))},[t,a,Z]),(0,s.useEffect)(()=>{t&&setTimeout(()=>k.current?.focus(),80)},[t,a]),(0,s.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&r(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let Y=(0,s.useCallback)(async e=>{e.preventDefault();let t=S.trim(),r=N.trim(),n=A.trim();if(!t)return P("Please enter your name.");if(!eM.test(r))return P("Please enter a valid email.");if(n.replace(/\D/g,"").length<7)return P("Please enter a valid phone number.");P(null),v(!0);try{let e=await eB({name:t,email:r,phone:n});window.localStorage.setItem(eI,e.id),h(e.id),d(e.status)}catch(e){P(e instanceof Error?e.message:"Could not start the chat.")}finally{v(!1)}},[S,N,A]),X=(0,s.useCallback)(async e=>{let t=e.trim();if(!t||H||!a)return;x(null),v(!0),b(""),R.current=!0,D(!1);let r=`temp-${Date.now()}`;p(e=>eC(e,[{id:r,sender_type:"user",content:t,created_at:new Date().toISOString()}]));try{"ai"===u&&E(!0);let e=await eT(a,t);p(t=>{let r=[e.userMessage,e.aiMessage].filter(Boolean);for(let e of r)U(e,t);return eC(t,r)}
3),e.shouldHandover&&d("waiting")}catch(e){p(e=>e.filter(e=>e.id!==r)),x(e instanceof Error?e.message:"Could not send. Try again."),b(t)}finally{v(!1),E(!1)}},[H,a,u,U]),W=(0,s.useCallback)(async()=>{if(a){v(!0);try{await eN(a),d("waiting")}catch(e){x(e instanceof Error?e.message:"Could not reach our team.")}finally{v(!1)}}},[a]),J=(0,s.useCallback)(()=>{window.localStorage.removeItem(eI),h(null),p([]),d("ai"),x(null)},[]);if(e?.startsWith("/embed"))return null;let q=eL[u],Q=!a,ee=0===f.length;return t?(0,n.jsxs)("div",{role:"dialog","aria-label":"Ardent support chat",className:"fixed bottom-5 right-5 z-50 flex h-[720px] max-h-[calc(100vh-2.5rem)] w-[440px] max-w-[calc(100vw-2.5rem)] flex-col overflow-hidden rounded-2xl border border-fd-border bg-fd-popover shadow-2xl",children:[(0,n.jsxs)("header",{className:"flex items-center gap-3 border-b border-fd-border px-4 py-3",children:[(0,n.jsx)(i.default,{src:"/ardent_africa_favicon_.png",alt:"",width:32,height:32,className:"size-8 shrink-0 rounded-lg",priority:!0}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"font-[var(--font-sora)] text-sm font-semibold text-fd-foreground",children:"Ardent Support"}),(0,n.jsxs)("p",{className:"flex items-center gap-1.5 text-xs text-fd-muted-foreground",children:[(0,n.jsx)("span",{className:`inline-block size-2 rounded-full ${q.pulse?"animate-pulse":""}`,style:{backgroundColor:q.dot}}),Q?"AI and human support":q.label]})]}),(0,n.jsx)(eg,{}),(0,n.jsx)("button",{type:"button",onClick:()=>r(!1),"aria-label":"Minimize chat",className:"rounded-md p-1.5 text-fd-muted-foreground transition hover:bg-fd-accent hover:text-fd-foreground",children:(0,n.jsx)(eK,{className:"size-4"})})]}),(0,n.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,n.jsxs)("div",{ref:M,onScroll:$,className:"h-full space-y-3 overflow-y-auto px-4 py-4",children:[Q?(0,n.jsx)(ek,{name:S,email:N,phone:A,error:_,busy:H,onName:T,onEmail:w,onPhone:I,onSubmit:Y}):ee?(0,n.jsx)(eO,{onPick:e=>void X(e)}):f.map(e=>(0,n.jsx)(eD,{message:e},e.id)),y&&(0,n.jsx)(ej,{}),B&&(0,n.jsx)("p",{className:"rounded-lg bg-[rgba(214,80,90,0.12)] px-3 py-2 text-xs text-[#d65a64]",children:B})]}),O&&(0,n.jsx)("button",{type:"button",onClick:()=>{R.current=!0,Z("smooth"),D(!1)},className:"absolute bottom-3 left-1/2 z-10 -translate-x-1/2 rounded-full border border-fd-border bg-fd-popover px-3 py-1 text-xs font-medium text-fd-foreground shadow-md transition hover:bg-fd-accent",children:"Jump to latest"})]}),!Q&&"ai"===u&&!ee&&(0,n.jsx)("div",{className:"border-t border-fd-border px-4 py-2",children:(0,n.jsx)("button",{type:"button",onClick:()=>void W(),disabled:H,className:"text-xs font-medium text-[var(--color-fd-primary)] underline-offset-2 hover:underline disabled:opacity-60",children:"Talk to a human instead"})}),!Q&&"waiting"===u&&(0,n.jsx)("p",{className:"border-t border-fd-border px-4 py-2 text-xs text-fd-muted-foreground",children:"We have asked our team to join. You can keep typing in the meantime."}),!Q&&("closed"===u?(0,n.jsx)("div",{className:"border-t border-fd-border p-3",children:(0,n.jsx)("button",{type:"button",onClick:J,className:"w-full rounded-lg px-4 py-2 text-sm font-semibold",style:{backgroundColor:"var(--ardent-gold)",color:"#1b1505"},children:"Start a new chat"})}):(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),X(g)},className:"flex items-end gap-2 border-t border-fd-border p-3",children:[(0,n.jsx)("textarea",{ref:k,value:g,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),X(g))},rows:1,placeholder:"Ask a question...",className:"max-h-28 min-h-[2.5rem] flex-1 resize-none rounded-lg border border-fd-border bg-fd-background px-3 py-2 text-sm text-fd-foreground outline-none focus:border-[var(--ardent-gold)]"}),(0,n.jsx)("button",{type:"submit",disabled:H||!g.trim(),"aria-label":"Send message",className:"flex size-10 shrink-0 items-center justify-center rounded-lg transition hover:brightness-95 disabled:opacity-50",style:{backgroundColor:"var(--ardent-gold)",color:"#1b1505"},children:(0,n.jsx)(eV,{className:"size-4"})})]}))]}):(0,n.jsxs)("button",{type:"button",onClick:()=>{F(),r(!0)},"aria-label":z>0?`Open support chat, ${z} new ${1===z?"reply":"replies"}`:"Open support chat",className:"fixed bottom-5 right-5 z-50 flex items-center gap-2 rounded-full px-4 py-3 font-[var(--font-sora)] text-sm font-semibold shadow-lg transition hover:brightness-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",style:{backgroundColor:"var(--ardent-gold)",color:"#1b1505"},children:[(0,n.jsx)(eG,{className:"size-5"}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"Ask Arde
3nt"}),z>0&&(0,n.jsx)("span",{"aria-hidden":!0,className:"absolute -right-1 -top-1 flex min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-bold text-white ring-2 ring-fd-background",style:{backgroundColor:"#d65a64"},children:z>9?"9+":z})]})}function ek({name:e,email:t,phone:r,error:s,busy:i,onName:o,onEmail:a,onPhone:l,onSubmit:h}){return(0,n.jsxs)("form",{onSubmit:h,className:"py-2",children:[(0,n.jsx)("h3",{className:"font-[var(--font-sora)] text-base font-semibold text-fd-foreground",children:"Hi, how can we help?"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-fd-muted-foreground",children:"Chat with our assistant about donating, petitions, the Foundation, or the developer API. Tell us who you are and you can reach a human any time."}),(0,n.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,n.jsx)("input",{value:e,onChange:e=>o(e.target.value),placeholder:"Your name",autoComplete:"name",className:"w-full rounded-lg border border-fd-border bg-fd-background px-3 py-2 text-sm text-fd-foreground outline-none focus:border-[var(--ardent-gold)]"}),(0,n.jsx)("input",{type:"email",inputMode:"email",value:t,onChange:e=>a(e.target.value),placeholder:"Your email",autoComplete:"email",className:"w-full rounded-lg border border-fd-border bg-fd-background px-3 py-2 text-sm text-fd-foreground outline-none focus:border-[var(--ardent-gold)]"}),(0,n.jsx)("input",{type:"tel",inputMode:"tel",value:r,onChange:e=>l(e.target.value),placeholder:"Your phone",autoComplete:"tel",maxLength:50,required:!0,className:"w-full rounded-lg border border-fd-border bg-fd-background px-3 py-2 text-sm text-fd-foreground outline-none focus:border-[var(--ardent-gold)]"}),s&&(0,n.jsx)("p",{className:"text-xs text-[#d65a64]",children:s}),(0,n.jsx)("button",{type:"submit",disabled:i,className:"w-full rounded-lg px-4 py-2 text-sm font-semibold disabled:opacity-60",style:{backgroundColor:"var(--ardent-gold)",color:"#1b1505"},children:i?"Starting...":"Start chat"}),(0,n.jsx)("p",{className:"text-center text-[11px] text-fd-muted-foreground",children:"We use your details only to follow up on this conversation."})]})]})}function eO({onPick:e}){return(0,n.jsxs)("div",{className:"py-2",children:[(0,n.jsx)("p",{className:"text-sm text-fd-muted-foreground",children:"Ask anything, or start with one of these:"}),(0,n.jsx)("div",{className:"mt-3 flex flex-col gap-2",children:eP.map(t=>(0,n.jsx)("button",{type:"button",onClick:()=>e(t),className:"rounded-lg border border-fd-border bg-fd-card px-3 py-2 text-left text-sm text-fd-foreground transition hover:border-[var(--ardent-gold)]",children:t},t))})]})}function eD({message:e}){let{sender_type:t,content:r}=e;if("system"===t)return(0,n.jsx)("p",{className:"mx-auto max-w-[90%] text-center text-xs text-fd-muted-foreground",children:r});if("user"===t)return(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("div",{className:"max-w-[82%] whitespace-pre-wrap break-words rounded-2xl rounded-br-sm px-3 py-2 text-sm",style:{backgroundColor:"var(--ardent-gold)",color:"#1b1505"},children:r})});let s="admin"===t;return(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex size-6 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold",style:s?{backgroundColor:"#3fb27f",color:"#04231a"}:{backgroundColor:"var(--color-fd-secondary)",color:"var(--ardent-gold)"},children:s?"A":(0,n.jsx)(eU,{className:"size-3"})}),(0,n.jsxs)("div",{className:"max-w-[82%]",children:[(0,n.jsx)("span",{className:"mb-0.5 block text-[11px] font-medium text-fd-muted-foreground",children:s?"Support agent":"Assistant"}),(0,n.jsx)("div",{className:"whitespace-pre-wrap break-words rounded-2xl rounded-tl-sm bg-fd-secondary px-3 py-2 text-sm text-fd-foreground [&_a]:font-medium [&_a]:text-[var(--ardent-gold)] [&_a]:underline [&_a]:underline-offset-2",children:(0,n.jsx)(eA,{text:r})})]})]})}function ej(){return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"inline-flex size-6 items-center justify-center rounded-full",style:{backgroundColor:"var(--color-fd-secondary)",color:"var(--ardent-gold)"},children:(0,n.jsx)(eU,{className:"size-3"})}),(0,n.jsxs)("div",{className:"flex gap-1 rounded-2xl rounded-tl-sm bg-fd-secondary px-3 py-3",children:[(0,n.jsx)(eF,{})," ",(0,n.jsx)(eF,{delay:"150ms"})," ",(0,n.jsx)(eF,{delay:"300ms"})]})]})}function eF({delay:e="0ms"}){return(0,n.jsx)("span",{className:"inline-block size-1.5 animate-bounce rounded-full bg-fd-muted-foreground",style:{animationDelay:e}})}function eG({className:e}){return(0,n.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,
3children:(0,n.jsx)("path",{d:"M21 12a8 8 0 0 1-11.6 7.1L3 21l1.9-6.4A8 8 0 1 1 21 12Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function eU({className:e}){return(0,n.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M12 2l1.8 5.2L19 9l-5.2 1.8L12 16l-1.8-5.2L5 9l5.2-1.8L12 2Z"})})}function eV({className:e}){return(0,n.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M4 12l16-8-6 16-3-6-7-2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function eK({className:e}){return(0,n.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}e.s(["SupportChat",0,function(){return(0,n.jsx)(u,{children:(0,n.jsx)(eR,{})})}],177102)},80024,e=>{"use strict";var t=e.i(479895),r=e.i(293596),n=e.i(632165),s=e.i(205729),i=e.i(848317),o=e.i(794303),a=e.i(128461);function l({hotKey:e}){let{setTheme:t,resolvedTheme:r}=(0,i.useTheme)(),n=(0,s.useEffectEvent)(n=>{var s;if(n.defaultPrevented||n.isComposing||(s=n.target)instanceof HTMLElement&&(s.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(s.tagName)||null!==s.closest('[role="dialog"]'))||!("string"==typeof e?!n.metaKey&&!n.ctrlKey&&!n.altKey&&n.key.toLowerCase()===e.toLowerCase():e(n)))return;n.preventDefault();let i="dark"===r?"light":"dark";document?.startViewTransition?document.startViewTransition(()=>(0,o.flushSync)(()=>t(i))):t(i)});return(0,s.useEffect)(()=>(window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}),[]),null}function h({children:e,dir:s="ltr",theme:o={},search:u,i18n:c}){let d=e;if(u?.enabled!==!1&&(d=(0,n.jsx)(r.SearchProvider,{...u,children:d})),o?.enabled!==!1){let{enabled:e,hotKey:t="d",...r}=o;d=(0,n.jsxs)(i.ThemeProvider,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,...r,children:[!1!==t&&(0,n.jsx)(l,{hotKey:t}),d]})}return c&&(d=(0,n.jsx)(t.I18nProvider,{...c,children:d})),(0,n.jsx)(a.DirectionProvider,{dir:s,children:d})}var u=e.i(856365),c=e.i(58291),d=e.i(207008),f=e.i(726386);function m({children:e,Link:t,Image:r}){return(0,n.jsx)(u.FrameworkProvider,{usePathname:c.usePathname,useRouter:c.useRouter,useParams:c.useParams,Link:t??d.default,Image:r??f.default,children:e})}e.s(["RootProvider",0,function({components:e,...t}){return(0,n.jsx)(m,{Link:e?.Link,Image:e?.Image,children:(0,n.jsx)(h,{...t,children:t.children})})}],80024)},58291,(e,t,r)=>{t.exports=e.r(371448)}]);

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.