@integrativedesigndevelopment/dashboard-core 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/components/CancelActionButton/index.d.ts +3 -0
  2. package/dist/components/CancelActionButton/index.d.ts.map +1 -1
  3. package/dist/components/Card/index.d.ts +18 -0
  4. package/dist/components/Card/index.d.ts.map +1 -0
  5. package/dist/components/ConfirmActionButton/index.d.ts +2 -0
  6. package/dist/components/ConfirmActionButton/index.d.ts.map +1 -1
  7. package/dist/components/IDDLink/index.d.ts +3 -1
  8. package/dist/components/IDDLink/index.d.ts.map +1 -1
  9. package/dist/components/Loader/index.d.ts +16 -0
  10. package/dist/components/Loader/index.d.ts.map +1 -0
  11. package/dist/components/LoginBackground/index.d.ts +29 -0
  12. package/dist/components/LoginBackground/index.d.ts.map +1 -0
  13. package/dist/components/LoginBackground/index.improved.d.ts +16 -0
  14. package/dist/components/LoginBackground/index.improved.d.ts.map +1 -0
  15. package/dist/components/LoginBackground/types.d.ts +27 -0
  16. package/dist/components/LoginBackground/types.d.ts.map +1 -0
  17. package/dist/components/LoginBackground/utils.d.ts +30 -0
  18. package/dist/components/LoginBackground/utils.d.ts.map +1 -0
  19. package/dist/components/Modal/index.d.ts +18 -0
  20. package/dist/components/Modal/index.d.ts.map +1 -0
  21. package/dist/components/PasswordStrengthIndicator/index.d.ts +47 -0
  22. package/dist/components/PasswordStrengthIndicator/index.d.ts.map +1 -0
  23. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts +47 -0
  24. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts.map +1 -0
  25. package/dist/components/SimpleButton/index.d.ts +11 -5
  26. package/dist/components/SimpleButton/index.d.ts.map +1 -1
  27. package/dist/components/forms/FormField/index.d.ts +19 -0
  28. package/dist/components/forms/FormField/index.d.ts.map +1 -0
  29. package/dist/components/forms/FormField/index.improved.d.ts +27 -0
  30. package/dist/components/forms/FormField/index.improved.d.ts.map +1 -0
  31. package/dist/components/forms/SubmitButton/index.d.ts +11 -0
  32. package/dist/components/forms/SubmitButton/index.d.ts.map +1 -0
  33. package/dist/components/forms/SubmitButton/index.improved.d.ts +17 -0
  34. package/dist/components/forms/SubmitButton/index.improved.d.ts.map +1 -0
  35. package/dist/components/forms/TermsCheckbox/index.d.ts +13 -0
  36. package/dist/components/forms/TermsCheckbox/index.d.ts.map +1 -0
  37. package/dist/components/forms/TermsCheckbox/index.improved.d.ts +23 -0
  38. package/dist/components/forms/TermsCheckbox/index.improved.d.ts.map +1 -0
  39. package/dist/components/index.d.ts +9 -0
  40. package/dist/components/index.d.ts.map +1 -1
  41. package/dist/components/utils/componentTemplate.d.ts +40 -0
  42. package/dist/components/utils/componentTemplate.d.ts.map +1 -0
  43. package/dist/components/utils/componentWrapper.d.ts +87 -0
  44. package/dist/components/utils/componentWrapper.d.ts.map +1 -0
  45. package/dist/index.d.ts +11 -0
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.esm.js +2 -2
  48. package/dist/index.esm.js.map +1 -1
  49. package/dist/index.js +2 -2
  50. package/dist/index.js.map +1 -1
  51. package/dist/types/index.d.ts +10 -0
  52. package/dist/types/index.d.ts.map +1 -1
  53. package/dist/utils/assetValidation.d.ts +54 -0
  54. package/dist/utils/assetValidation.d.ts.map +1 -0
  55. package/dist/utils/helpers.d.ts.map +1 -1
  56. package/dist/utils/validation.d.ts +93 -0
  57. package/dist/utils/validation.d.ts.map +1 -0
  58. package/package.json +21 -20
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@integrativedesigndevelopment/idd-common"),n=require("react"),r=require("@integrativedesigndevelopment/idd-icons");const i={SET_PLUGINS:"set_plugins",SET_CURRENT_PLUGIN:"set_current_plugin",SET_CURRENT_TAB:"set_current_tab",SET_CURRENT_STATE:"set_current_state",SET_CURRENT_VIEW:"set_current_view",SET_CURRENT_ITEM:"set_current_item",COLLAPSED_TOGGLE:"toggle_collapsed",SET_COLOR_MODE:"set_color_mode",TOGGLE_NOTIFICATIONS:"toggle_notifications",SET_SETTING:"set_setting",SET_JWT:"SET_JWT",SET_USER:"SET_USER",RESET:"reset"},s=e=>({type:i.SET_CURRENT_PLUGIN,payload:e}),o=e=>({type:i.SET_CURRENT_TAB,payload:e}),a=e=>({type:i.SET_CURRENT_STATE,payload:e});class c extends n.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback||e.jsx("div",{className:"flex items-center justify-center h-full w-full p-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Something went wrong"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"An error occurred while loading this component."}),e.jsx("button",{onClick:()=>this.setState({hasError:!1,error:void 0}),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Try again"})]})}):this.props.children}}const l={title:"IDD Dashboard",pages:[],plugins:["Dashboard"],categories:[],sub_categories:{},style:{colors:{"idd-red":"#DD3150","idd-red-20":"#F6CBD3","idd-orange":"#D1823B","idd-orange-20":"#F3DFCE","idd-yellow":"#D9C982","idd-yellow-20":"#F4EFDA","idd-green":"#98BD83","idd-green-20":"#E5EEE0","idd-blue":"#00A89D","idd-blue-20":"#6F6F5","idd-purple":"#4040D8","idd-purple-20":"#CFCFF5","idd-brown":"#7A6C53","idd-brown-20":"#F2F0EE","idd-black":"#19191c","idd-black-20":"#C5C5C6","idd-grey":"#6D6E81","idd-grey-20":"#DCDCE1","idd-white":"#fff","idd-transparent":"transparent","idd-primary-color":"#292929","idd-secondary-color":"#5f696d","idd-tertiary-color":"#d8dfe7","idd-tertiary-color-20":"#ECECEC","idd-active-color":"#ad0000","idd-inactive-color":"#DCDCE1","idd-primary-background":"#ad0000","idd-secondary-background":"#f2f0ee","idd-tertiary-background":"#F6F6F9","idd-active-background":"#7a6c53","idd-inactive-background":"#7a6c531a","idd-shadow-color":"rgba(50,69,71,0.17)"},fontFamily:{"idd-primary-font":"Gotham-Book","idd-primary-font-light":"Gotham-Light","idd-primary-font-regular":"Gotham-Book","idd-primary-font-medium":"Gotham-Medium","idd-primary-font-bold":"Gotham-Bold","idd-secondary-font":"Rubik-Regular","idd-secondary-font-light":"Rubik-Light","idd-secondary-font-regular":"Rubik-Regular","idd-secondary-font-medium":"Rubik-Medium","idd-secondary-font-bold":"Rubik-Bold"},fontStyle:{"idd-font-style":"normal"},fontWeight:{"idd-light-font-weight":"300","idd-regular-font-weight":"normal","idd-medium-font-weight":"medium","idd-bold-font-weight":"bold"},fontSize:{"idd-primary-font-size":"1rem","idd-xtrasmall-font-size":"0.25rem","idd-small-font-size":"0.5rem","idd-medium-font-size":"1.125rem","idd-large-font-size":"1.25rem","idd-xtralarge-font-size":"1.5rem"},letterSpacing:{"idd-character-spacing":"0","idd-body-character-spacing":"0.05"},lineHeight:{"idd-primary-line-spacing":"1.5"},backgroundImage:{"gradient-radial":"radial-gradient(var(--tw-gradient-stops))","gradient-conic":"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))","signup-theme":"linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/signup-theme.png')"},borderRadius:{"idd-border-radius":"0.3125rem"}}};let u=l;const d=()=>u,p=()=>d();var h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},h(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var m=function(){return m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)};function E(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function g(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var y="Invariant Violation",v=Object.setPrototypeOf,T=void 0===v?function(e,t){return e.__proto__=t,e}:v,x=function(e){function t(n){void 0===n&&(n=y);var r=e.call(this,"number"==typeof n?y+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=y,T(r,t.prototype),r}return f(t,e),t}(Error);function N(e,t){if(!e)throw new x(t)}var b=["debug","log","warn","error","silent"],I=b.indexOf("log");function _(e){return function(){if(b.indexOf(e)>=I)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=_("debug"),e.log=_("log"),e.warn=_("warn"),e.error=_("error")}(N||(N={}));var D="3.13.8";function C(e){try{return e()}catch(e){}}var O=C((function(){return globalThis}))||C((function(){return window}))||C((function(){return self}))||C((function(){return global}))||C((function(){return C.constructor("return this")()})),k=new Map;function A(e,t){var n,r,i=(n="stringifyForDisplay",r=k.get(n)||1,k.set(n,r+1),"".concat(n,":").concat(r,":").concat(Math.random().toString(36).slice(2)));return JSON.stringify(e,(function(e,t){return void 0===t?i:t}),t).split(JSON.stringify(i)).join("<undefined>")}function S(e){return function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if("number"==typeof t){var i=t;(t=F(i))||(t=j(i,n),n=[])}e.apply(void 0,[t].concat(n))}}var w=Object.assign((function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];e||N(e,F(t,n)||j(t,n))}),{debug:S(N.debug),log:S(N.log),warn:S(N.warn),error:S(N.error)}),R=Symbol.for("ApolloErrorMessageHandler_"+D);function L(e){if("string"==typeof e)return e;try{return A(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function F(e,t){if(void 0===t&&(t=[]),e)return O[R]&&O[R](e,t.map(L))}function j(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:D,message:e,args:t.map(L)})))}function P(e,t){if(!Boolean(e))throw new Error(t)}function M(e,t){if(!Boolean(e))throw new Error("Unexpected invariant triggered.")}const U=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(const i of e.body.matchAll(U)){if("number"==typeof i.index||M(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function V(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=1===t.line?n:0,c=t.column+a,l=`${e.name}:${o}:${c}\n`,u=r.split(/\r\n|[\n\r]/g),d=u[i];if(d.length>120){const e=Math.floor(c/80),t=c%80,n=[];for(let e=0;e<d.length;e+=80)n.push(d.slice(e,e+80));return l+G([[`${o} |`,n[0]],...n.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",n[e+1]]])}return l+G([[o-1+" |",u[i-1]],[`${o} |`,d],["|","^".padStart(c)],[`${o+1} |`,u[i+1]]])}function G(e){const t=e.filter((([e,t])=>void 0!==t)),n=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(n)+(t?" "+t:""))).join("\n")}class z extends Error{constructor(e,...t){var n,r,i;const{nodes:s,source:o,positions:a,path:c,originalError:l,extensions:u}=function(e){const 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!=c?c:void 0,this.originalError=null!=l?l:void 0,this.nodes=$(Array.isArray(s)?s:s?[s]:void 0);const d=$(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=o?o:null==d||null===(r=d[0])||void 0===r?void 0:r.source,this.positions=null!=a?a:null==d?void 0:d.map((e=>e.start)),this.locations=a&&o?a.map((e=>B(o,e))):null==d?void 0:d.map((e=>B(e.source,e.start)));const p="object"==typeof(h=null==l?void 0:l.extensions)&&null!==h?null==l?void 0:l.extensions:void 0;var h;this.extensions=null!==(i=null!=u?u:p)&&void 0!==i?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!=l&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,z):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(const n of this.nodes)n.loc&&(e+="\n\n"+V((t=n.loc).source,B(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+V(this.source,t);var t;return e}toJSON(){const 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 $(e){return void 0===e||0===e.length?void 0:e}function K(e,t,n){return new z(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Y{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class J{constructor(e,t,n,r,i,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,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}}}var q,Q,W,X;function H(e){return e>=48&&e<=57}function Z(e){return e>=97&&e<=122||e>=65&&e<=90}function ee(e){return Z(e)||95===e}function te(e){return Z(e)||H(e)||95===e}function ne(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let t=0;t<e.length;++t){var s;const o=e[t],a=re(o);a!==o.length&&(r=null!==(s=r)&&void 0!==s?s:t,i=t,0!==t&&a<n&&(n=a))}return e.map(((e,t)=>0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function re(e){let t=0;for(;t<e.length&&(9===(n=e.charCodeAt(t))||32===n);)++t;var n;return t}new Set(Object.keys({Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["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:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],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","locations"],SchemaExtension:["directives","operationTypes"],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"]})),function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(q||(q={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Q||(Q={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(W||(W={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(X||(X={}));class ie{constructor(e){const t=new J(X.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(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==X.EOF)do{if(e.next)e=e.next;else{const t=de(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===X.COMMENT);return e}}function se(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function oe(e,t){return ae(e.charCodeAt(t))&&ce(e.charCodeAt(t+1))}function ae(e){return e>=55296&&e<=56319}function ce(e){return e>=56320&&e<=57343}function le(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return X.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ue(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new J(t,n,r,s,o,i)}function de(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const t=n.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===n.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return pe(e,i);case 33:return ue(e,X.BANG,i,i+1);case 36:return ue(e,X.DOLLAR,i,i+1);case 38:return ue(e,X.AMP,i,i+1);case 40:return ue(e,X.PAREN_L,i,i+1);case 41:return ue(e,X.PAREN_R,i,i+1);case 46:if(46===n.charCodeAt(i+1)&&46===n.charCodeAt(i+2))return ue(e,X.SPREAD,i,i+3);break;case 58:return ue(e,X.COLON,i,i+1);case 61:return ue(e,X.EQUALS,i,i+1);case 64:return ue(e,X.AT,i,i+1);case 91:return ue(e,X.BRACKET_L,i,i+1);case 93:return ue(e,X.BRACKET_R,i,i+1);case 123:return ue(e,X.BRACE_L,i,i+1);case 124:return ue(e,X.PIPE,i,i+1);case 125:return ue(e,X.BRACE_R,i,i+1);case 34:return 34===n.charCodeAt(i+1)&&34===n.charCodeAt(i+2)?xe(e,i):me(e,i)}if(H(t)||45===t)return he(e,i,t);if(ee(t))return Ne(e,i);throw K(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":se(t)||oe(n,i)?`Unexpected character: ${le(e,i)}.`:`Invalid character: ${le(e,i)}.`)}return ue(e,X.EOF,r,r)}function pe(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(se(e))++i;else{if(!oe(n,i))break;i+=2}}return ue(e,X.COMMENT,t,i,n.slice(t+1,i))}function he(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(45===s&&(s=r.charCodeAt(++i)),48===s){if(s=r.charCodeAt(++i),H(s))throw K(e.source,i,`Invalid number, unexpected digit after 0: ${le(e,i)}.`)}else i=fe(e,i,s),s=r.charCodeAt(i);if(46===s&&(o=!0,s=r.charCodeAt(++i),i=fe(e,i,s),s=r.charCodeAt(i)),69!==s&&101!==s||(o=!0,s=r.charCodeAt(++i),43!==s&&45!==s||(s=r.charCodeAt(++i)),i=fe(e,i,s),s=r.charCodeAt(i)),46===s||ee(s))throw K(e.source,i,`Invalid number, expected digit but got: ${le(e,i)}.`);return ue(e,o?X.FLOAT:X.INT,t,i,r.slice(t,i))}function fe(e,t,n){if(!H(n))throw K(e.source,t,`Invalid number, expected digit but got: ${le(e,t)}.`);const r=e.source.body;let i=t+1;for(;H(r.charCodeAt(i));)++i;return i}function me(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const r=n.charCodeAt(i);if(34===r)return o+=n.slice(s,i),ue(e,X.STRING,t,i+1,o);if(92!==r){if(10===r||13===r)break;if(se(r))++i;else{if(!oe(n,i))throw K(e.source,i,`Invalid character within String: ${le(e,i)}.`);i+=2}}else{o+=n.slice(s,i);const t=117===n.charCodeAt(i+1)?123===n.charCodeAt(i+2)?Ee(e,i):ge(e,i):Te(e,i);o+=t.value,i+=t.size,s=i}}throw K(e.source,i,"Unterminated string.")}function Ee(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const e=n.charCodeAt(t+i++);if(125===e){if(i<5||!se(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|ve(e),r<0)break}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function ge(e,t){const n=e.source.body,r=ye(n,t+2);if(se(r))return{value:String.fromCodePoint(r),size:6};if(ae(r)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=ye(n,t+8);if(ce(e))return{value:String.fromCodePoint(r,e),size:12}}throw K(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ye(e,t){return ve(e.charCodeAt(t))<<12|ve(e.charCodeAt(t+1))<<8|ve(e.charCodeAt(t+2))<<4|ve(e.charCodeAt(t+3))}function ve(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Te(e,t){const n=e.source.body;switch(n.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:"\t",size:2}}throw K(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function xe(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const c=[];for(;s<r;){const r=n.charCodeAt(s);if(34===r&&34===n.charCodeAt(s+1)&&34===n.charCodeAt(s+2)){a+=n.slice(o,s),c.push(a);const r=ue(e,X.BLOCK_STRING,t,s+3,ne(c).join("\n"));return e.line+=c.length-1,e.lineStart=i,r}if(92!==r||34!==n.charCodeAt(s+1)||34!==n.charCodeAt(s+2)||34!==n.charCodeAt(s+3))if(10!==r&&13!==r)if(se(r))++s;else{if(!oe(n,s))throw K(e.source,s,`Invalid character within String: ${le(e,s)}.`);s+=2}else a+=n.slice(o,s),c.push(a),13===r&&10===n.charCodeAt(s+1)?s+=2:++s,a="",o=s,i=s;else a+=n.slice(o,s),o=s+1,s+=4}throw K(e.source,s,"Unterminated string.")}function Ne(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){if(!te(n.charCodeAt(i)))break;++i}return ue(e,X.NAME,t,i,n.slice(t,i))}function be(e){return Ie(e,[])}function Ie(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){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Ie(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,i=[];for(let r=0;r<n;++r)i.push(Ie(e[r],t));1===r?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`);return"["+i.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const r=n.map((([e,n])=>e+": "+Ie(n,t)));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}const _e=globalThis.process&&"production"===process.env.NODE_ENV?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;const r=t.prototype[Symbol.toStringTag];if(r===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name)){const t=be(e);throw new Error(`Cannot use ${r} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1};class De{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||P(!1,`Body must be a string. Received: ${be(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||P(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||P(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class Ce{constructor(e,t={}){const n=function(e){return _e(e,De)}(e)?e:new De(e);this._lexer=new ie(n),this._options=t,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(X.NAME);return this.node(e,{kind:W.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:W.DOCUMENT,definitions:this.many(X.SOF,this.parseDefinition,X.EOF)})}parseDefinition(){if(this.peek(X.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===X.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()}if(e)throw K(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(X.BRACE_L))return this.node(e,{kind:W.OPERATION_DEFINITION,operation:q.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(X.NAME)&&(n=this.parseName()),this.node(e,{kind:W.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(X.NAME);switch(e.value){case"query":return q.QUERY;case"mutation":return q.MUTATION;case"subscription":return q.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(X.PAREN_L,this.parseVariableDefinition,X.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:W.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(X.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(X.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(X.DOLLAR),this.node(e,{kind:W.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:W.SELECTION_SET,selections:this.many(X.BRACE_L,this.parseSelection,X.BRACE_R)})}parseSelection(){return this.peek(X.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(X.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:W.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(X.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(X.PAREN_L,t,X.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(X.COLON),this.node(t,{kind:W.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(X.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(X.NAME)?this.node(e,{kind:W.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:W.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:W.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:W.FRAGMENT_DEFINITION,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){const t=this._lexer.token;switch(t.kind){case X.BRACKET_L:return this.parseList(e);case X.BRACE_L:return this.parseObject(e);case X.INT:return this.advanceLexer(),this.node(t,{kind:W.INT,value:t.value});case X.FLOAT:return this.advanceLexer(),this.node(t,{kind:W.FLOAT,value:t.value});case X.STRING:case X.BLOCK_STRING:return this.parseStringLiteral();case X.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:W.BOOLEAN,value:!0});case"false":return this.node(t,{kind:W.BOOLEAN,value:!1});case"null":return this.node(t,{kind:W.NULL});default:return this.node(t,{kind:W.ENUM,value:t.value})}case X.DOLLAR:if(e){if(this.expectToken(X.DOLLAR),this._lexer.token.kind===X.NAME){const e=this._lexer.token.value;throw K(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(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:W.STRING,value:e.value,block:e.kind===X.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:W.LIST,values:this.any(X.BRACKET_L,(()=>this.parseValueLiteral(e)),X.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:W.OBJECT,fields:this.any(X.BRACE_L,(()=>this.parseObjectField(e)),X.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(X.COLON),this.node(t,{kind:W.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(X.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(X.AT),this.node(t,{kind:W.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(X.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(X.BRACKET_R),t=this.node(e,{kind:W.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(X.BANG)?this.node(e,{kind:W.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:W.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(X.STRING)||this.peek(X.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(X.BRACE_L,this.parseOperationTypeDefinition,X.BRACE_R);return this.node(e,{kind:W.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(X.COLON);const n=this.parseNamedType();return this.node(e,{kind:W.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:W.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:W.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(X.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(X.BRACE_L,this.parseFieldDefinition,X.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(X.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:W.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(X.PAREN_L,this.parseInputValueDef,X.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(X.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(X.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:W.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:W.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:W.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(X.EQUALS)?this.delimitedMany(X.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:W.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(X.BRACE_L,this.parseEnumValueDefinition,X.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:W.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw K(this._lexer.source,this._lexer.token.start,`${Oe(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:W.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(X.BRACE_L,this.parseInputValueDef,X.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===X.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()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(X.BRACE_L,this.parseOperationTypeDefinition,X.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:W.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:W.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:W.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:W.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:W.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:W.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:W.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(X.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:W.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(X.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Q,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new Y(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw K(this._lexer.source,t.start,`Expected ${ke(e)}, found ${Oe(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==X.NAME||t.value!==e)throw K(this._lexer.source,t.start,`Expected "${e}", found ${Oe(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===X.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return K(this._lexer.source,t.start,`Unexpected ${Oe(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==X.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw K(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Oe(e){const t=e.value;return ke(e.kind)+(null!=t?` "${t}"`:"")}function ke(e){return function(e){return e===X.BANG||e===X.DOLLAR||e===X.AMP||e===X.PAREN_L||e===X.PAREN_R||e===X.SPREAD||e===X.COLON||e===X.EQUALS||e===X.AT||e===X.BRACKET_L||e===X.BRACKET_R||e===X.BRACE_L||e===X.PIPE||e===X.BRACE_R}(e)?`"${e}"`:e}C((function(){return navigator.product}));var Ae="function"==typeof Symbol&&"function"==typeof Symbol.for,Se="function"==typeof C((function(){return window.document.createElement}));function we(){}C((function(){return navigator.userAgent.indexOf("jsdom")>=0}));const Re=we,Le="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},Fe="undefined"!=typeof WeakMap?WeakMap:Map,je="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:we,unregister:we}};class Pe{constructor(e=1/0,t=Re){this.max=e,this.dispose=t,this.map=new Fe,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const n=t.key;delete t.key,t.keyRef=new Le(n),this.registry.register(n,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new je(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:n}=t;n&&(n.older=e),e&&(e.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var Me=new WeakSet;var Ue=function(e,t){var n=new Pe(e,t);return n.set=function(e,t){var n=Pe.prototype.set.call(this,e,t);return function(e){e.size<=(e.max||-1)||Me.has(e)||(Me.add(e),setTimeout((function(){e.clean(),Me.delete(e)}),100))}(this),n},n},Be=Symbol.for("apollo.cacheSize"),Ve=m({},O[Be]);function Ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var r=e[t];void 0!==r&&(n[t]=r)}))})),n}var ze=function(e){function t(n){var r,i,s=n.graphQLErrors,o=n.protocolErrors,a=n.clientErrors,c=n.networkError,l=n.errorMessage,u=n.extraInfo,d=e.call(this,l)||this;return d.name="ApolloError",d.graphQLErrors=s||[],d.protocolErrors=o||[],d.clientErrors=a||[],d.networkError=c||null,d.message=l||(i=g(g(g([],(r=d).graphQLErrors,!0),r.clientErrors,!0),r.protocolErrors,!0),r.networkError&&i.push(r.networkError),i.map((function(e){return null!==(t=e)&&"object"==typeof t&&e.message||"Error message not found.";var t})).join("\n")),d.extraInfo=u,d.cause=g(g(g([c],s||[],!0),o||[],!0),a||[],!0).find((function(e){return!!e}))||null,d.__proto__=t.prototype,d}return f(t,e),t}(Error);const{toString:$e,hasOwnProperty:Ke}=Object.prototype,Ye=Function.prototype.toString,Je=new Map;function qe(e,t){try{return Qe(e,t)}finally{Je.clear()}}function Qe(e,t){if(e===t)return!0;const n=$e.call(e);if(n!==$e.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Ze(e,t))return!0;const n=We(e),r=We(t),i=n.length;if(i!==r.length)return!1;for(let e=0;e<i;++e)if(!Ke.call(t,n[e]))return!1;for(let r=0;r<i;++r){const i=n[r];if(!Qe(e[i],t[i]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Ze(e,t))return!0;const r=e.entries(),i="[object Map]"===n;for(;;){const e=r.next();if(e.done)break;const[n,s]=e.value;if(!t.has(n))return!1;if(i&&!Qe(s,t.get(n)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let n=e.byteLength;if(n===t.byteLength)for(;n--&&e[n]===t[n];);return-1===n}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const n=Ye.call(e);return n===Ye.call(t)&&!function(e,t){const n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}(n,He)}}return!1}function We(e){return Object.keys(e).filter(Xe,e)}function Xe(e){return void 0!==this[e]}const He="{ [native code] }";function Ze(e,t){let n=Je.get(e);if(n){if(n.has(t))return!0}else Je.set(e,n=new Set);return n.add(t),!1}var et=new Map,tt=new Map,nt=!0,rt=!1;function it(e){return e.replace(/[\s,]+/g," ").trim()}function st(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=it((o=e.loc).source.body.substring(o.start,o.end)),s=tt.get(r);s&&!s.has(i)?nt&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||tt.set(r,s=new Set),s.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e);var o})),m(m({},e),{definitions:n})}function ot(e){var t=it(e);if(!et.has(t)){var n=function(e,t){const n=new Ce(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}(e,{experimentalFragmentVariables:rt,allowLegacyFragmentVariables:rt});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");et.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(st(n)))}return et.get(t)}function at(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,n){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[n+1]})),ot(r)}var ct,lt=at,ut=function(){et.clear(),tt.clear()},dt=function(){nt=!1},pt=function(){rt=!0},ht=function(){rt=!1};(ct=at||(at={})).gql=lt,ct.resetCaches=ut,ct.disableFragmentWarnings=dt,ct.enableExperimentalFragmentVariables=pt,ct.disableExperimentalFragmentVariables=ht,at.default=at;var ft,mt={exports:{}};var Et,gt,yt,vt=(ft||(ft=1,(Et=mt).exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,Et.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Et.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(Et.exports,n)),mt.exports),Tt=Ae?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function xt(e){var t=vt.useContext(function(){w(!0,54);var e=vt.createContext[Tt];return e||(Object.defineProperty(vt.createContext,Tt,{value:e=vt.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}()).client;return w(!!t,58),t}function Nt(e){var t;switch(e){case gt.Query:t="Query";break;case gt.Mutation:t="Mutation";break;case gt.Subscription:t="Subscription"}return t}function bt(e){yt||(yt=new Ue(Ve.parser||1e3));var t,n,r=yt.get(e);if(r)return r;w(!!e&&!!e.kind,70,e);for(var i=[],s=[],o=[],a=[],c=0,l=e.definitions;c<l.length;c++){var u=l[c];if("FragmentDefinition"!==u.kind){if("OperationDefinition"===u.kind)switch(u.operation){case"query":s.push(u);break;case"mutation":o.push(u);break;case"subscription":a.push(u)}}else i.push(u)}w(!i.length||s.length||o.length||a.length,71),w(s.length+o.length+a.length<=1,72,e,s.length,a.length,o.length),n=s.length?gt.Query:gt.Mutation,s.length||o.length||(n=gt.Subscription);var d=s.length?s:o.length?o:a;w(1===d.length,73,e,d.length);var p=d[0];t=p.variableDefinitions||[];var h={name:p.name&&"Name"===p.name.kind?p.name.value:"data",type:n,variables:t};return yt.set(e,h),h}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(gt||(gt={})),bt.resetCache=function(){yt=void 0};var It=Se?vt.useLayoutEffect:vt.useEffect;function _t(e,t){var n,r,i,s,o,a=xt();n=e,r=gt.Mutation,i=bt(n),s=Nt(r),o=Nt(i.type),w(i.type===r,74,s,s,o);var c=vt.useState({called:!1,loading:!1,client:a}),l=c[0],u=c[1],d=vt.useRef({result:l,mutationId:0,isMounted:!0,client:a,mutation:e,options:t});It((function(){Object.assign(d.current,{client:a,options:t,mutation:e})}));var p=vt.useCallback((function(e){void 0===e&&(e={});var t=d.current,n=t.options,r=t.mutation,i=m(m({},n),{mutation:r}),s=e.client||d.current.client;d.current.result.loading||i.ignoreResults||!d.current.isMounted||u(d.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:s});var o=++d.current.mutationId,a=function(e,t){return Ge(e,t,t.variables&&{variables:Ge(m(m({},e&&e.variables),t.variables))})}(i,e);return s.mutate(a).then((function(t){var n,r,i=t.data,c=t.errors,l=c&&c.length>0?new ze({graphQLErrors:c}):void 0,p=e.onError||(null===(n=d.current.options)||void 0===n?void 0:n.onError);if(l&&p&&p(l,a),o===d.current.mutationId&&!a.ignoreResults){var h={called:!0,loading:!1,data:i,error:l,client:s};d.current.isMounted&&!qe(d.current.result,h)&&u(d.current.result=h)}var f=e.onCompleted||(null===(r=d.current.options)||void 0===r?void 0:r.onCompleted);return l||null==f||f(t.data,a),t}),(function(t){var n;if(o===d.current.mutationId&&d.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:s};qe(d.current.result,r)||u(d.current.result=r)}var i=e.onError||(null===(n=d.current.options)||void 0===n?void 0:n.onError);if(i)return i(t,a),{data:void 0,errors:t};throw t}))}),[]),h=vt.useCallback((function(){if(d.current.isMounted){var e={called:!1,loading:!1,client:d.current.client};Object.assign(d.current,{mutationId:0,result:e}),u(e)}}),[]);return vt.useEffect((function(){var e=d.current;return e.isMounted=!0,function(){e.isMounted=!1}}),[]),[p,m({reset:h},l)]}const Dt=at`
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("@integrativedesigndevelopment/idd-common"),n=require("@integrativedesigndevelopment/idd-icons");function i(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var s=function(e,t){return s=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])},s(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=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},a.apply(this,arguments)};function l(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}l((n=n.apply(e,t||[])).next())}))}function c(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;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"==typeof SuppressedError&&SuppressedError;class d extends t.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback||e.jsx("div",{className:"flex items-center justify-center h-full w-full p-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Something went wrong"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"An error occurred while loading this component."}),e.jsx("button",{onClick:()=>this.setState({hasError:!1,error:void 0}),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Try again"})]})}):this.props.children}}const u={loginBackground:{type:"color",value:"#f3f4f6",fallback:"#ffffff",borderRadius:"0px",backgroundSize:"cover",backgroundPosition:"center",additionalStyles:{}}},p=e=>{const t=(new Option).style;return t.color=e,""!==t.color},h=e=>{try{return new URL(e,window.location.origin),!0}catch(e){return!1}},f=e=>{const t=[];return e.type&&["image","color","gradient"].includes(e.type)||t.push('Invalid background type. Must be "image", "color", or "gradient".'),e.value||t.push("Background value is required."),e.fallback&&p(e.fallback)||t.push("Valid fallback color is required."),"image"!==e.type||h(e.value)||t.push("Invalid image URL provided."),"color"!==e.type||p(e.value)||t.push("Invalid color value provided."),t},m=()=>({type:u.loginBackground.type,value:u.loginBackground.value,fallback:u.loginBackground.fallback,borderRadius:u.loginBackground.borderRadius,backgroundSize:u.loginBackground.backgroundSize,backgroundPosition:u.loginBackground.backgroundPosition,additionalStyles:u.loginBackground.additionalStyles}),g=e=>new Promise(((t,r)=>{const n=new Image;n.onload=()=>t(n),n.onerror=r,n.src=e}));var y;exports.PasswordStrength=void 0,(y=exports.PasswordStrength||(exports.PasswordStrength={}))[y.VERY_WEAK=0]="VERY_WEAK",y[y.WEAK=1]="WEAK",y[y.FAIR=2]="FAIR",y[y.GOOD=3]="GOOD",y[y.STRONG=4]="STRONG";const x=e=>e/4*100,b=t.memo((({analysis:t,showDetails:r=!0,className:n=""})=>{const i=x(t.score);return e.jsxs("div",{className:`password-strength-indicator ${n}`,role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2",role:"progressbar","aria-valuenow":t.score,"aria-valuemin":0,"aria-valuemax":4,children:e.jsx("div",{className:"h-2 rounded-full transition-all duration-300",style:{width:`${i}%`}})}),e.jsx("span",{className:"text-sm font-medium",children:t.label})]}),r&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-xs text-gray-600",children:[e.jsxs("span",{children:["Entropy: ",t.entropy," bits"]}),e.jsxs("span",{children:["Crack time: ",t.crackTime]})]}),t.warnings.length>0&&e.jsx("div",{className:"space-y-1",children:t.warnings.map(((t,r)=>e.jsxs("div",{className:"flex items-start gap-2 text-xs text-amber-600",children:[e.jsx("span",{className:"text-amber-500 mt-0.5",children:"⚠"}),e.jsx("span",{children:t})]},r)))}),t.suggestions.length>0&&e.jsx("div",{className:"space-y-1",children:t.suggestions.map(((t,r)=>e.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-600",children:[e.jsx("span",{className:"text-blue-500 mt-0.5",children:"💡"}),e.jsx("span",{children:t})]},r)))}),e.jsx("div",{className:"text-xs font-medium "+(t.isAcceptable?"text-green-600":"text-red-600"),children:t.isAcceptable?"✓ Password meets security requirements":"✗ Password does not meet security requirements"})]})]})})),E=t.memo((({score:t,className:r=""})=>{const n=x(t);return e.jsx("div",{className:`w-full bg-gray-200 rounded-full h-1 ${r}`,children:e.jsx("div",{className:`h-1 rounded-full transition-all duration-300 ${(e=>{switch(e){case exports.PasswordStrength.VERY_WEAK:return"bg-red-500";case exports.PasswordStrength.WEAK:return"bg-orange-500";case exports.PasswordStrength.FAIR:return"bg-yellow-500";case exports.PasswordStrength.GOOD:return"bg-lime-500";case exports.PasswordStrength.STRONG:return"bg-green-500";default:return"bg-gray-300"}})(t)}`,style:{width:`${n}%`}})})})),v={title:"IDD Dashboard",pages:[],plugins:["Dashboard"],categories:[],sub_categories:{},style:{colors:{"idd-red":"#DD3150","idd-red-20":"#F6CBD3","idd-orange":"#D1823B","idd-orange-20":"#F3DFCE","idd-yellow":"#D9C982","idd-yellow-20":"#F4EFDA","idd-green":"#98BD83","idd-green-20":"#E5EEE0","idd-blue":"#00A89D","idd-blue-20":"#6F6F5","idd-purple":"#4040D8","idd-purple-20":"#CFCFF5","idd-brown":"#7A6C53","idd-brown-20":"#F2F0EE","idd-black":"#19191c","idd-black-20":"#C5C5C6","idd-grey":"#6D6E81","idd-grey-20":"#DCDCE1","idd-white":"#fff","idd-transparent":"transparent","idd-primary-color":"#292929","idd-secondary-color":"#5f696d","idd-tertiary-color":"#d8dfe7","idd-tertiary-color-20":"#ECECEC","idd-active-color":"#ad0000","idd-inactive-color":"#DCDCE1","idd-primary-background":"#ad0000","idd-secondary-background":"#f2f0ee","idd-tertiary-background":"#F6F6F9","idd-active-background":"#7a6c53","idd-inactive-background":"#7a6c531a","idd-shadow-color":"rgba(50,69,71,0.17)"},fontFamily:{"idd-primary-font":"Gotham-Book","idd-primary-font-light":"Gotham-Light","idd-primary-font-regular":"Gotham-Book","idd-primary-font-medium":"Gotham-Medium","idd-primary-font-bold":"Gotham-Bold","idd-secondary-font":"Rubik-Regular","idd-secondary-font-light":"Rubik-Light","idd-secondary-font-regular":"Rubik-Regular","idd-secondary-font-medium":"Rubik-Medium","idd-secondary-font-bold":"Rubik-Bold"},fontStyle:{"idd-font-style":"normal"},fontWeight:{"idd-light-font-weight":"300","idd-regular-font-weight":"normal","idd-medium-font-weight":"medium","idd-bold-font-weight":"bold"},fontSize:{"idd-primary-font-size":"1rem","idd-xtrasmall-font-size":"0.25rem","idd-small-font-size":"0.5rem","idd-medium-font-size":"1.125rem","idd-large-font-size":"1.25rem","idd-xtralarge-font-size":"1.5rem"},letterSpacing:{"idd-character-spacing":"0","idd-body-character-spacing":"0.05"},lineHeight:{"idd-primary-line-spacing":"1.5"},backgroundImage:{"gradient-radial":"radial-gradient(var(--tw-gradient-stops))","gradient-conic":"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))","signup-theme":"linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/signup-theme.png')"},borderRadius:{"idd-border-radius":"0.3125rem"}}};let N=v;const T=()=>N,_=()=>T(),k={primary:{base:"text-idd-white bg-idd-active-color hover:bg-idd-primary-color focus:bg-idd-primary-color",disabled:"opacity-50 cursor-not-allowed"},secondary:{base:"text-idd-active-color bg-idd-tertiary-background border border-idd-active-color hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white",disabled:"opacity-50 cursor-not-allowed"},tertiary:{base:"text-idd-black bg-idd-tertiary-background hover:bg-idd-grey-20 focus:bg-idd-grey-20",disabled:"opacity-50 cursor-not-allowed"},outline:{base:"text-idd-active-color bg-transparent border border-idd-active-color hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white",disabled:"opacity-50 cursor-not-allowed"},ghost:{base:"text-idd-grey bg-transparent hover:bg-idd-grey-20 hover:text-idd-black focus:bg-idd-grey-20 focus:text-idd-black",disabled:"opacity-50 cursor-not-allowed"},danger:{base:"text-idd-white bg-idd-red hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"},success:{base:"text-idd-white bg-idd-green hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"}},I={button:"font-idd-primary-font-medium text-idd-primary-font-size text-center py-2 px-4 rounded-sm focus:outline-none focus-visible:outline-none transition-colors duration-200",input:"w-full h-[3.125rem] rounded-sm",error:"font-idd-primary-font text-idd-primary-font-size !mb-0",label:"font-idd-primary-font-medium text-idd-primary-font-size"},w=(e="primary",t=!1,r="")=>{const n=k[e];return`${I.button} ${t?n.disabled:n.base} ${r}`.trim()},C=({children:t,onPress:n,onClick:i,disabled:s=!1,type:o="button",className:a="",variant:l="primary","data-testid":c})=>{const d=n||i||(()=>{});return e.jsx(r.IDDButton,{type:o,onPress:d,disabled:s,buttonClass:w(l,s,a),"data-testid":c,children:t})},D=t.memo((({label:t,type:r,value:n,onChange:i,errors:s=[],required:o=!1,autoComplete:a,placeholder:l,disabled:c=!1,showErrors:d=!1,showPasswordToggle:u=!1,onTogglePassword:p,showPassword:h=!1})=>{const f=d&&s.length>0,m=`field-${t.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("div",{className:"form-field "+(f?"form-field--error":""),children:[e.jsxs("label",{htmlFor:m,className:"form-field__label",children:[t,o&&e.jsx("span",{className:"form-field__required","aria-label":"required",children:"*"})]}),e.jsxs("div",{className:"form-field__input-wrapper",children:[e.jsx("input",{id:m,type:r,value:n,onChange:e=>i(e.target.value),autoComplete:a,placeholder:l,disabled:c,required:o,className:"form-field__input "+(f?"form-field__input--error":""),"aria-invalid":f,"aria-required":o,"aria-describedby":f?`${m}-errors`:void 0}),u&&e.jsx(C,{type:"button",onPress:p,variant:"ghost",className:"form-field__password-toggle",disabled:c,"data-testid":"password-toggle",children:h?"👁️":"👁️‍🗨️"})]}),f&&e.jsx("div",{id:`${m}-errors`,className:"form-field__errors",role:"alert",children:s.map(((t,r)=>e.jsx("div",{className:"form-field__error",children:t},r)))})]})})),O=({size:t="medium",message:n="Loading...",show:i=!0,color:s,className:o="","data-testid":a})=>{var l,c;const d=_();return i?(s||null===(c=null===(l=d.style)||void 0===l?void 0:l.colors)||void 0===c||c["idd-active-color"],e.jsxs("div",{className:`flex flex-col items-center justify-center space-y-4 ${o}`,"data-testid":a,children:[e.jsx(r.IDDLoader,{}),n&&e.jsx("p",{className:"text-sm text-gray-600 font-medium",children:n})]})):null},S=t.memo((({isLoading:t,disabled:r=!1,text:n,loadingText:i,className:s=""})=>e.jsxs(C,{type:"submit",disabled:r||t,variant:"primary",className:s,"aria-busy":t,"aria-disabled":r||t,children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[t&&e.jsx("div",{className:"inline-block",children:e.jsx(O,{show:!0,size:"small"})}),e.jsx("span",{className:"submit-button__text",children:t?i:n})]}),t&&e.jsx("span",{id:"submit-loading-text",className:"sr-only",children:"Please wait while we process your request"})]}))),A=t.memo((({checked:t,onChange:r,errors:n=[],disabled:i=!1,showErrors:s=!1,termsUrl:o="/terms",privacyUrl:a="/privacy"})=>{const l=s&&n.length>0,c="terms-checkbox";return e.jsxs("div",{className:"terms-checkbox "+(l?"terms-checkbox--error":""),children:[e.jsxs("div",{className:"terms-checkbox__wrapper",children:[e.jsx("input",{id:c,type:"checkbox",checked:t,onChange:e=>r(e.target.checked),disabled:i,className:"terms-checkbox__input "+(l?"terms-checkbox__input--error":""),"aria-invalid":l,"aria-describedby":l?`${c}-errors`:void 0,required:!0}),e.jsxs("label",{htmlFor:c,className:"terms-checkbox__label",children:[e.jsx("span",{className:"terms-checkbox__checkmark","aria-hidden":"true",children:t?"✓":""}),e.jsxs("span",{className:"terms-checkbox__text",children:["I agree to the"," ",e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Privacy Policy"}),e.jsx("span",{className:"terms-checkbox__required","aria-label":"required",children:"*"})]})]})]}),l&&e.jsx("div",{id:`${c}-errors`,className:"terms-checkbox__errors",role:"alert",children:n.map(((t,r)=>e.jsx("div",{className:"terms-checkbox__error",children:t},r)))})]})})),R={SET_PLUGINS:"set_plugins",SET_CURRENT_PLUGIN:"set_current_plugin",SET_CURRENT_TAB:"set_current_tab",SET_CURRENT_STATE:"set_current_state",SET_CURRENT_VIEW:"set_current_view",SET_CURRENT_ITEM:"set_current_item",COLLAPSED_TOGGLE:"toggle_collapsed",SET_COLOR_MODE:"set_color_mode",TOGGLE_NOTIFICATIONS:"toggle_notifications",SET_SETTING:"set_setting",SET_JWT:"SET_JWT",SET_USER:"SET_USER",RESET:"reset"},j=e=>({type:R.SET_CURRENT_PLUGIN,payload:e}),L=e=>({type:R.SET_CURRENT_TAB,payload:e}),P=e=>({type:R.SET_CURRENT_STATE,payload:e});var F="Invariant Violation",U=Object.setPrototypeOf,M=void 0===U?function(e,t){return e.__proto__=t,e}:U,B=function(e){function t(r){void 0===r&&(r=F);var n=e.call(this,"number"==typeof r?F+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=F,M(n,t.prototype),n}return o(t,e),t}(Error);function V(e,t){if(!e)throw new B(t)}var z=["debug","log","warn","error","silent"],$=z.indexOf("log");function G(e){return function(){if(z.indexOf(e)>=$)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=G("debug"),e.log=G("log"),e.warn=G("warn"),e.error=G("error")}(V||(V={}));var K="3.14.0";function Y(e){try{return e()}catch(e){}}var q=Y((function(){return globalThis}))||Y((function(){return window}))||Y((function(){return self}))||Y((function(){return global}))||Y((function(){return Y.constructor("return this")()})),W=new Map;function J(e,t){var r,n,i=(r="stringifyForDisplay",n=W.get(r)||1,W.set(r,n+1),"".concat(r,":").concat(n,":").concat(Math.random().toString(36).slice(2)));return JSON.stringify(e,(function(e,t){return void 0===t?i:t}),t).split(JSON.stringify(i)).join("<undefined>")}function Q(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if("number"==typeof t){var i=t;(t=ee(i))||(t=te(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var H=Object.assign((function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];e||V(e,ee(t,r)||te(t,r))}),{debug:Q(V.debug),log:Q(V.log),warn:Q(V.warn),error:Q(V.error)}),X=Symbol.for("ApolloErrorMessageHandler_"+K);function Z(e){if("string"==typeof e)return e;try{return J(e,2).slice(0,1e3)}catch(e){return"<non-serializable>"}}function ee(e,t){if(void 0===t&&(t=[]),e)return q[X]&&q[X](e,t.map(Z))}function te(e,t){if(void 0===t&&(t=[]),e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:K,message:e,args:t.map(Z)})))}function re(e,t){if(!Boolean(e))throw new Error(t)}function ne(e,t){if(!Boolean(e))throw new Error("Unexpected invariant triggered.")}const ie=/\r\n|[\n\r]/g;function se(e,t){let r=0,n=1;for(const i of e.body.matchAll(ie)){if("number"==typeof i.index||ne(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function oe(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=1===t.line?r:0,l=t.column+a,c=`${e.name}:${o}:${l}\n`,d=n.split(/\r\n|[\n\r]/g),u=d[i];if(u.length>120){const e=Math.floor(l/80),t=l%80,r=[];for(let e=0;e<u.length;e+=80)r.push(u.slice(e,e+80));return c+ae([[`${o} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+ae([[o-1+" |",d[i-1]],[`${o} |`,u],["|","^".padStart(l)],[`${o+1} |`,d[i+1]]])}function ae(e){const 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 le extends Error{constructor(e,...t){var r,n,i;const{nodes:s,source:o,positions:a,path:l,originalError:c,extensions:d}=function(e){const 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!=l?l:void 0,this.originalError=null!=c?c:void 0,this.nodes=ce(Array.isArray(s)?s:s?[s]:void 0);const u=ce(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=o?o:null==u||null===(n=u[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==u?void 0:u.map((e=>e.start)),this.locations=a&&o?a.map((e=>se(o,e))):null==u?void 0:u.map((e=>se(e.source,e.start)));const p="object"==typeof(h=null==c?void 0:c.extensions)&&null!==h?null==c?void 0:c.extensions:void 0;var h;this.extensions=null!==(i=null!=d?d:p)&&void 0!==i?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!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,le):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(const r of this.nodes)r.loc&&(e+="\n\n"+oe((t=r.loc).source,se(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+oe(this.source,t);var t;return e}toJSON(){const 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 ce(e){return void 0===e||0===e.length?void 0:e}function de(e,t,r){return new le(`Syntax Error: ${r}`,{source:e,positions:[t]})}class ue{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 pe{constructor(e,t,r,n,i,s){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=s,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}}}var he,fe,me,ge;function ye(e){return e>=48&&e<=57}function xe(e){return e>=97&&e<=122||e>=65&&e<=90}function be(e){return xe(e)||95===e}function Ee(e){return xe(e)||ye(e)||95===e}function ve(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var s;const o=e[t],a=Ne(o);a!==o.length&&(n=null!==(s=n)&&void 0!==s?s:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function Ne(e){let t=0;for(;t<e.length&&(9===(r=e.charCodeAt(t))||32===r);)++t;var r;return t}new Set(Object.keys({Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["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:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],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","locations"],SchemaExtension:["directives","operationTypes"],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"]})),function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(he||(he={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(fe||(fe={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(me||(me={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(ge||(ge={}));class Te{constructor(e){const t=new pe(ge.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(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==ge.EOF)do{if(e.next)e=e.next;else{const t=Oe(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===ge.COMMENT);return e}}function _e(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ke(e,t){return Ie(e.charCodeAt(t))&&we(e.charCodeAt(t+1))}function Ie(e){return e>=55296&&e<=56319}function we(e){return e>=56320&&e<=57343}function Ce(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return ge.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function De(e,t,r,n,i){const s=e.line,o=1+r-e.lineStart;return new pe(t,r,n,s,o,i)}function Oe(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const 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 Se(e,i);case 33:return De(e,ge.BANG,i,i+1);case 36:return De(e,ge.DOLLAR,i,i+1);case 38:return De(e,ge.AMP,i,i+1);case 40:return De(e,ge.PAREN_L,i,i+1);case 41:return De(e,ge.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return De(e,ge.SPREAD,i,i+3);break;case 58:return De(e,ge.COLON,i,i+1);case 61:return De(e,ge.EQUALS,i,i+1);case 64:return De(e,ge.AT,i,i+1);case 91:return De(e,ge.BRACKET_L,i,i+1);case 93:return De(e,ge.BRACKET_R,i,i+1);case 123:return De(e,ge.BRACE_L,i,i+1);case 124:return De(e,ge.PIPE,i,i+1);case 125:return De(e,ge.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?Be(e,i):je(e,i)}if(ye(t)||45===t)return Ae(e,i,t);if(be(t))return Ve(e,i);throw de(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":_e(t)||ke(r,i)?`Unexpected character: ${Ce(e,i)}.`:`Invalid character: ${Ce(e,i)}.`)}return De(e,ge.EOF,n,n)}function Se(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(_e(e))++i;else{if(!ke(r,i))break;i+=2}}return De(e,ge.COMMENT,t,i,r.slice(t+1,i))}function Ae(e,t,r){const n=e.source.body;let i=t,s=r,o=!1;if(45===s&&(s=n.charCodeAt(++i)),48===s){if(s=n.charCodeAt(++i),ye(s))throw de(e.source,i,`Invalid number, unexpected digit after 0: ${Ce(e,i)}.`)}else i=Re(e,i,s),s=n.charCodeAt(i);if(46===s&&(o=!0,s=n.charCodeAt(++i),i=Re(e,i,s),s=n.charCodeAt(i)),69!==s&&101!==s||(o=!0,s=n.charCodeAt(++i),43!==s&&45!==s||(s=n.charCodeAt(++i)),i=Re(e,i,s),s=n.charCodeAt(i)),46===s||be(s))throw de(e.source,i,`Invalid number, expected digit but got: ${Ce(e,i)}.`);return De(e,o?ge.FLOAT:ge.INT,t,i,n.slice(t,i))}function Re(e,t,r){if(!ye(r))throw de(e.source,t,`Invalid number, expected digit but got: ${Ce(e,t)}.`);const n=e.source.body;let i=t+1;for(;ye(n.charCodeAt(i));)++i;return i}function je(e,t){const r=e.source.body,n=r.length;let i=t+1,s=i,o="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return o+=r.slice(s,i),De(e,ge.STRING,t,i+1,o);if(92!==n){if(10===n||13===n)break;if(_e(n))++i;else{if(!ke(r,i))throw de(e.source,i,`Invalid character within String: ${Ce(e,i)}.`);i+=2}}else{o+=r.slice(s,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?Le(e,i):Pe(e,i):Me(e,i);o+=t.value,i+=t.size,s=i}}throw de(e.source,i,"Unterminated string.")}function Le(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!_e(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|Ue(e),n<0)break}throw de(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function Pe(e,t){const r=e.source.body,n=Fe(r,t+2);if(_e(n))return{value:String.fromCodePoint(n),size:6};if(Ie(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=Fe(r,t+8);if(we(e))return{value:String.fromCodePoint(n,e),size:12}}throw de(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Fe(e,t){return Ue(e.charCodeAt(t))<<12|Ue(e.charCodeAt(t+1))<<8|Ue(e.charCodeAt(t+2))<<4|Ue(e.charCodeAt(t+3))}function Ue(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Me(e,t){const 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:"\t",size:2}}throw de(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function Be(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,s=t+3,o=s,a="";const l=[];for(;s<n;){const n=r.charCodeAt(s);if(34===n&&34===r.charCodeAt(s+1)&&34===r.charCodeAt(s+2)){a+=r.slice(o,s),l.push(a);const n=De(e,ge.BLOCK_STRING,t,s+3,ve(l).join("\n"));return e.line+=l.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(s+1)||34!==r.charCodeAt(s+2)||34!==r.charCodeAt(s+3))if(10!==n&&13!==n)if(_e(n))++s;else{if(!ke(r,s))throw de(e.source,s,`Invalid character within String: ${Ce(e,s)}.`);s+=2}else a+=r.slice(o,s),l.push(a),13===n&&10===r.charCodeAt(s+1)?s+=2:++s,a="",o=s,i=s;else a+=r.slice(o,s),o=s+1,s+=4}throw de(e.source,s,"Unterminated string.")}function Ve(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){if(!Ee(r.charCodeAt(i)))break;++i}return De(e,ge.NAME,t,i,r.slice(t,i))}function ze(e){return $e(e,[])}function $e(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){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:$e(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push($e(e[n],t));1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`);return"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+$e(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}const Ge=globalThis.process&&"production"===process.env.NODE_ENV?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var r;const n=t.prototype[Symbol.toStringTag];if(n===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(r=e.constructor)||void 0===r?void 0:r.name)){const t=ze(e);throw new Error(`Cannot use ${n} "${t}" from another module or realm.\n\nEnsure that there is only one instance of "graphql" in the node_modules\ndirectory. If different versions of "graphql" are the dependencies of other\nrelied on modules, use "resolutions" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate "graphql" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`)}}return!1};class Ke{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||re(!1,`Body must be a string. Received: ${ze(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||re(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||re(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class Ye{constructor(e,t={}){const r=function(e){return Ge(e,Ke)}(e)?e:new Ke(e);this._lexer=new Te(r),this._options=t,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(ge.NAME);return this.node(e,{kind:me.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:me.DOCUMENT,definitions:this.many(ge.SOF,this.parseDefinition,ge.EOF)})}parseDefinition(){if(this.peek(ge.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===ge.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()}if(e)throw de(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(ge.BRACE_L))return this.node(e,{kind:me.OPERATION_DEFINITION,operation:he.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(ge.NAME)&&(r=this.parseName()),this.node(e,{kind:me.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(ge.NAME);switch(e.value){case"query":return he.QUERY;case"mutation":return he.MUTATION;case"subscription":return he.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(ge.PAREN_L,this.parseVariableDefinition,ge.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:me.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ge.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ge.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(ge.DOLLAR),this.node(e,{kind:me.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:me.SELECTION_SET,selections:this.many(ge.BRACE_L,this.parseSelection,ge.BRACE_R)})}parseSelection(){return this.peek(ge.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(ge.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:me.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ge.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ge.PAREN_L,t,ge.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(ge.COLON),this.node(t,{kind:me.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(ge.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(ge.NAME)?this.node(e,{kind:me.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:me.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:me.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:me.FRAGMENT_DEFINITION,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){const t=this._lexer.token;switch(t.kind){case ge.BRACKET_L:return this.parseList(e);case ge.BRACE_L:return this.parseObject(e);case ge.INT:return this.advanceLexer(),this.node(t,{kind:me.INT,value:t.value});case ge.FLOAT:return this.advanceLexer(),this.node(t,{kind:me.FLOAT,value:t.value});case ge.STRING:case ge.BLOCK_STRING:return this.parseStringLiteral();case ge.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:me.BOOLEAN,value:!0});case"false":return this.node(t,{kind:me.BOOLEAN,value:!1});case"null":return this.node(t,{kind:me.NULL});default:return this.node(t,{kind:me.ENUM,value:t.value})}case ge.DOLLAR:if(e){if(this.expectToken(ge.DOLLAR),this._lexer.token.kind===ge.NAME){const e=this._lexer.token.value;throw de(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(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:me.STRING,value:e.value,block:e.kind===ge.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:me.LIST,values:this.any(ge.BRACKET_L,(()=>this.parseValueLiteral(e)),ge.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:me.OBJECT,fields:this.any(ge.BRACE_L,(()=>this.parseObjectField(e)),ge.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(ge.COLON),this.node(t,{kind:me.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(ge.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(ge.AT),this.node(t,{kind:me.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(ge.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(ge.BRACKET_R),t=this.node(e,{kind:me.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(ge.BANG)?this.node(e,{kind:me.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:me.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ge.STRING)||this.peek(ge.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(ge.BRACE_L,this.parseOperationTypeDefinition,ge.BRACE_R);return this.node(e,{kind:me.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(ge.COLON);const r=this.parseNamedType();return this.node(e,{kind:me.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:me.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:me.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ge.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ge.BRACE_L,this.parseFieldDefinition,ge.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(ge.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:me.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(ge.PAREN_L,this.parseInputValueDef,ge.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(ge.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(ge.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:me.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:me.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:me.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ge.EQUALS)?this.delimitedMany(ge.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:me.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ge.BRACE_L,this.parseEnumValueDefinition,ge.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:me.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 de(this._lexer.source,this._lexer.token.start,`${qe(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:me.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ge.BRACE_L,this.parseInputValueDef,ge.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===ge.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()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(ge.BRACE_L,this.parseOperationTypeDefinition,ge.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:me.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:me.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const 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:me.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const 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:me.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:me.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:me.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:me.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ge.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:me.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(ge.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(fe,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new ue(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw de(this._lexer.source,t.start,`Expected ${We(e)}, found ${qe(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==ge.NAME||t.value!==e)throw de(this._lexer.source,t.start,`Expected "${e}", found ${qe(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===ge.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return de(this._lexer.source,t.start,`Unexpected ${qe(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==ge.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw de(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function qe(e){const t=e.value;return We(e.kind)+(null!=t?` "${t}"`:"")}function We(e){return function(e){return e===ge.BANG||e===ge.DOLLAR||e===ge.AMP||e===ge.PAREN_L||e===ge.PAREN_R||e===ge.SPREAD||e===ge.COLON||e===ge.EQUALS||e===ge.AT||e===ge.BRACKET_L||e===ge.BRACKET_R||e===ge.BRACE_L||e===ge.PIPE||e===ge.BRACE_R}(e)?`"${e}"`:e}Y((function(){return navigator.product}));var Je="function"==typeof Symbol&&"function"==typeof Symbol.for,Qe="function"==typeof Y((function(){return window.document.createElement}));function He(){}Y((function(){return navigator.userAgent.indexOf("jsdom")>=0}));const Xe=He,Ze="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},et="undefined"!=typeof WeakMap?WeakMap:Map,tt="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:He,unregister:He}};class rt{constructor(e=1/0,t=Xe){this.max=e,this.dispose=t,this.map=new et,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){const t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);const r=t.key;delete t.key,t.keyRef=new Ze(r),this.registry.register(r,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new tt(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var nt=new WeakSet;var it=function(e,t){var r=new rt(e,t);return r.set=function(e,t){var r=rt.prototype.set.call(this,e,t);return function(e){e.size<=(e.max||-1)||nt.has(e)||(nt.add(e),setTimeout((function(){e.clean(),nt.delete(e)}),100))}(this),r},r},st=Symbol.for("apollo.cacheSize"),ot=a({},q[st]);let at=null;const lt={};let ct=1;function dt(e){try{return e()}catch(e){}}const ut="@wry/context:Slot",pt=dt((()=>globalThis))||dt((()=>global))||Object.create(null),ht=pt[ut]||Array[ut]||function(e){try{Object.defineProperty(pt,ut,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",ct++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=at;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===lt)break;return e!==at&&(at.slots[this.id]=t),!0}return at&&(at.slots[this.id]=lt),!1}getValue(){if(this.hasValue())return at.slots[this.id]}withValue(e,t,r,n){const i={__proto__:null,[this.id]:e},s=at;at={parent:s,slots:i};try{return t.apply(n,r)}finally{at=s}}static bind(e){const t=at;return function(){const r=at;try{return at=t,e.apply(this,arguments)}finally{at=r}}}static noContext(e,t,r){if(!at)return e.apply(r,t);{const n=at;try{return at=null,e.apply(r,t)}finally{at=n}}}}),{bind:ft,noContext:mt}=ht;function gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}new ht;var yt=Symbol.for("apollo.deprecations"),xt=q,bt=new ht;function Et(e,t){(function(e){return xt[yt]||(bt.getValue()||[]).includes(e)})(e)||t()}var vt=function(e){function t(r){var n,i,s=r.graphQLErrors,o=r.protocolErrors,a=r.clientErrors,l=r.networkError,d=r.errorMessage,u=r.extraInfo,p=e.call(this,d)||this;return p.name="ApolloError",p.graphQLErrors=s||[],p.protocolErrors=o||[],p.clientErrors=a||[],p.networkError=l||null,p.message=d||(i=c(c(c([],(n=p).graphQLErrors,!0),n.clientErrors,!0),n.protocolErrors,!0),n.networkError&&i.push(n.networkError),i.map((function(e){return null!==(t=e)&&"object"==typeof t&&e.message||"Error message not found.";var t})).join("\n")),p.extraInfo=u,p.cause=c(c(c([l],s||[],!0),o||[],!0),a||[],!0).find((function(e){return!!e}))||null,p.__proto__=t.prototype,p}return o(t,e),t}(Error);const{toString:Nt,hasOwnProperty:Tt}=Object.prototype,_t=Function.prototype.toString,kt=new Map;function It(e,t){try{return wt(e,t)}finally{kt.clear()}}function wt(e,t){if(e===t)return!0;const r=Nt.call(e);if(r!==Nt.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(St(e,t))return!0;const r=Ct(e),n=Ct(t),i=r.length;if(i!==n.length)return!1;for(let e=0;e<i;++e)if(!Tt.call(t,r[e]))return!1;for(let n=0;n<i;++n){const i=r[n];if(!wt(e[i],t[i]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e===+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(St(e,t))return!0;const n=e.entries(),i="[object Map]"===r;for(;;){const e=n.next();if(e.done)break;const[r,s]=e.value;if(!t.has(r))return!1;if(i&&!wt(s,t.get(r)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let r=e.byteLength;if(r===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const r=_t.call(e);return r===_t.call(t)&&!function(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}(r,Ot)}}return!1}function Ct(e){return Object.keys(e).filter(Dt,e)}function Dt(e){return void 0!==this[e]}const Ot="{ [native code] }";function St(e,t){let r=kt.get(e);if(r){if(r.has(t))return!0}else kt.set(e,r=new Set);return r.add(t),!1}function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rt=new Map,jt=new Map,Lt=!0,Pt=!1;function Ft(e){return e.replace(/[\s,]+/g," ").trim()}function Ut(e){var t=new Set,r=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=Ft((o=e.loc).source.body.substring(o.start,o.end)),s=jt.get(n);s&&!s.has(i)?Lt&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):s||jt.set(n,s=new Set),s.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e);var o})),a(a({},e),{definitions:r})}function Mt(e){var t=Ft(e);if(!Rt.has(t)){var r=function(e,t){const r=new Ye(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}(e,{experimentalFragmentVariables:Pt,allowLegacyFragmentVariables:Pt});if(!r||"Document"!==r.kind)throw new Error("Not a valid GraphQL document.");Rt.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}(Ut(r)))}return Rt.get(t)}function Bt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),Mt(n)}var Vt,zt=Bt,$t=function(){Rt.clear(),jt.clear()},Gt=function(){Lt=!1},Kt=function(){Pt=!0},Yt=function(){Pt=!1};(Vt=Bt||(Bt={})).gql=zt,Vt.resetCaches=$t,Vt.disableFragmentWarnings=Gt,Vt.enableExperimentalFragmentVariables=Kt,Vt.disableExperimentalFragmentVariables=Yt,Bt.default=Bt;var qt,Wt={exports:{}};var Jt,Qt,Ht,Xt=(qt||(qt=1,(Jt=Wt).exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,Jt.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Jt.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(Jt.exports,t)),Wt.exports),Zt=i({__proto__:null,default:At(Xt)},[Xt]),er=Je?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function tr(e){var t=Xt.useContext(function(){H("createContext"in Zt,69);var e=Xt.createContext[er];return e||(Object.defineProperty(Xt.createContext,er,{value:e=Xt.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}()).client;return H(!!t,79),t}function rr(e){var t;switch(e){case Qt.Query:t="Query";break;case Qt.Mutation:t="Mutation";break;case Qt.Subscription:t="Subscription"}return t}function nr(e){Et("parser",(function(){!1!==globalThis.__DEV__&&H.warn(94)})),Ht||(Ht=new it(ot.parser||1e3));var t,r,n=Ht.get(e);if(n)return n;H(!!e&&!!e.kind,95,e);for(var i=[],s=[],o=[],a=[],l=0,c=e.definitions;l<c.length;l++){var d=c[l];if("FragmentDefinition"!==d.kind){if("OperationDefinition"===d.kind)switch(d.operation){case"query":s.push(d);break;case"mutation":o.push(d);break;case"subscription":a.push(d)}}else i.push(d)}H(!i.length||s.length||o.length||a.length,96),H(s.length+o.length+a.length<=1,97,e,s.length,a.length,o.length),r=s.length?Qt.Query:Qt.Mutation,s.length||o.length||(r=Qt.Subscription);var u=s.length?s:o.length?o:a;H(1===u.length,98,e,u.length);var p=u[0];t=p.variableDefinitions||[];var h={name:p.name&&"Name"===p.name.kind?p.name.value:"data",type:r,variables:t};return Ht.set(e,h),h}function ir(e,t){var r=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return bt.withValue.apply(bt,c([Array.isArray(e)?e:[e]],t,!1))}("parser",nr,[e]),n=rr(t),i=rr(r.type);H(r.type===t,99,n,n,i)}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(Qt||(Qt={})),nr.resetCache=function(){Ht=void 0};var sr=Qe?Xt.useLayoutEffect:Xt.useEffect;function or(e,t){!1!==globalThis.__DEV__&&function(e,t,r,n){var i=Xt.useRef(!1);t in e&&!i.current&&(!1!==globalThis.__DEV__&&H.warn(78,r,t,n),i.current=!0)}({},"ignoreResults","useMutation","If you don't want to synchronize component state with the mutation, please use the `useApolloClient` hook to get the client instance and call `client.mutate` directly.");var r=tr();ir(e,Qt.Mutation);var n=Xt.useState({called:!1,loading:!1,client:r}),i=n[0],s=n[1],o=Xt.useRef({result:i,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});sr((function(){Object.assign(o.current,{client:r,options:t,mutation:e})}));var l=Xt.useCallback((function(e){void 0===e&&(e={});var t=o.current,r=t.options,n=t.mutation,i=a(a({},r),{mutation:n}),l=e.client||o.current.client;o.current.result.loading||i.ignoreResults||!o.current.isMounted||s(o.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:l});var c=++o.current.mutationId,d=function(e,t){return gt(e,t,t.variables&&{variables:gt(a(a({},e&&e.variables),t.variables))})}(i,e);return l.mutate(d).then((function(t){var r,n,i=t.data,a=t.errors,u=a&&a.length>0?new vt({graphQLErrors:a}):void 0,p=e.onError||(null===(r=o.current.options)||void 0===r?void 0:r.onError);if(u&&p&&p(u,d),c===o.current.mutationId&&!d.ignoreResults){var h={called:!0,loading:!1,data:i,error:u,client:l};o.current.isMounted&&!It(o.current.result,h)&&s(o.current.result=h)}var f=e.onCompleted||(null===(n=o.current.options)||void 0===n?void 0:n.onCompleted);return u||null==f||f(t.data,d),t}),(function(t){var r;if(c===o.current.mutationId&&o.current.isMounted){var n={loading:!1,error:t,data:void 0,called:!0,client:l};It(o.current.result,n)||s(o.current.result=n)}var i=e.onError||(null===(r=o.current.options)||void 0===r?void 0:r.onError);if(i)return i(t,d),{data:void 0,errors:t};throw t}))}),[]),c=Xt.useCallback((function(){if(o.current.isMounted){var e={called:!1,loading:!1,client:o.current.client};Object.assign(o.current,{mutationId:0,result:e}),s(e)}}),[]);return Xt.useEffect((function(){var e=o.current;return e.isMounted=!0,function(){e.isMounted=!1}}),[]),[l,a({reset:c},i)]}const ar=Bt`
2
2
  mutation UpdateUser($input: Update_Auth_Input!) {
3
3
  update_auth(input: $input) {
4
4
  _id
@@ -10,5 +10,5 @@
10
10
  projects
11
11
  }
12
12
  }
13
- `,Ct=[],Ot=n.createContext(void 0);function kt(e){return Array.isArray(e)?e:[]}function At(e){return/<[a-z][\s\S]*>/i.test(e)}function St(e,t){for(let n=0;n<e.length;n++){let r=!1;if(r=At(e[n]),r){const r={text:e[n],hasLinks:!0};t.push(r)}else{const r={text:e[n],hasLinks:!1};t.push(r)}}}const wt=n.createContext(null),Rt=()=>{const e=n.useContext(wt);if(!e)throw new Error("useError must be used within an ErrorProvider");return e},Lt=({error:n,onClose:i})=>e.jsxs("div",{className:`text-white p-4 rounded-lg shadow-lg ring-2 ${(()=>{switch(n.type){case"success":return"ring-idd-green";case"warning":return"ring-idd-yellow";case"info":return"ring-idd-purple";default:return"ring-idd-active-color"}})()} flex items-start gap-3 max-w-md`,children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:(()=>{switch(n.type){case"success":return e.jsx(r.IDDOutlineCheckmarkIcon,{});case"warning":default:return e.jsx(r.IDDOutlineWarningIcon,{});case"info":return e.jsx(r.IDDInfoIcon,{})}})()}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"font-idd-primary-font-regular text-lg leading-relaxed",children:[e.jsx("span",{className:"font-idd-primary-font-bold text-lg",children:(()=>{switch(n.type){case"success":return"Success: ";case"warning":return"Warning: ";case"info":return"Info: ";default:return"Error: "}})()})," ",n.message]})}),e.jsx(t.IDDButton,{buttonClass:"border-0 bg-idd-transparent ms-auto",onPress:()=>i(n.id),"aria-label":"Close",children:e.jsx(r.IDDXIcon,{})})]});exports.ActionTypes=i,exports.CancelActionButton=({children:n,onPress:r=()=>{},disabled:i=!1,className:s="w-auto"})=>e.jsx(t.IDDButton,{type:"button",onPress:r,disabled:i,buttonClass:`font-idd-primary-font-medium text-idd-primary-font-size text-idd-active-color text-center py-2 px-5 bg-idd-tertiary-background hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white focus-visible:bg-idd-active-color focus-visible:text-idd-white focus:outline-none focus-visible:outline-none rounded-sm ${s}`,children:n}),exports.ConfirmActionButton=({children:n,onPress:r=()=>{},disabled:i=!1,type:s="submit",className:o="w-full"})=>e.jsx(t.IDDButton,{type:s,buttonClass:`font-idd-primary-font-medium text-idd-primary-font-size text-idd-black text-center py-2 px-5 bg-idd-tertiary-background hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white focus-visible:bg-idd-active-color focus-visible:text-idd-white focus:outline-none focus-visible:outline-none rounded-sm ${o}`,onPress:r,disabled:i,children:n}),exports.ContentItem=({type:t,style:n,text:r,items:i,orderedListStyle:s="",unorderedListStyle:o="",paragraphStyle:a=""})=>{if("list"===t){if("ordered"===n){const t=[];return i&&St(i,t),e.jsx("ol",{className:s,children:t.map(((t,n)=>t.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:t.text}},n):e.jsx("li",{children:t.text},n)))})}{const t=[];return i&&St(i,t),e.jsx("ul",{className:o,children:t.map(((t,n)=>t.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:t.text}},n):e.jsx("li",{children:t.text},n)))})}}{let t;return r?(t=At(r),t?e.jsx("p",{className:a,dangerouslySetInnerHTML:{__html:r}}):e.jsx("p",{className:a,children:r})):e.jsx("p",{className:a,children:r})}},exports.DashboardProvider=({config:t,children:r})=>{const[i,s]=n.useState(t),o={config:i,updateConfig:e=>{s((t=>Object.assign(Object.assign({},t),e)))}};return e.jsx(Ot.Provider,{value:o,children:r})},exports.ErrorBoundary=c,exports.ErrorProvider=({children:t})=>{const[r,i]=n.useState([]),s=n.useRef(new Map),o=n.useCallback((e=>{const t=s.current.get(e);t&&(clearTimeout(t),s.current.delete(e)),i((t=>t.filter((t=>t.id!==e))))}),[]),a=n.useCallback(((e,t="error",n=!0,r=1e4)=>{const a=`error_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,c={id:a,type:t,message:e,timestamp:Date.now(),autoHide:n,duration:r};if(i((n=>n.some((n=>n.message===e&&n.type===t))?n:[...n,c])),n&&r){const e=setTimeout((()=>{o(a)}),r);s.current.set(a,e)}return a}),[o]),c=n.useCallback((()=>{s.current.forEach((e=>{clearTimeout(e)})),s.current.clear(),i([])}),[]),l=n.useCallback(((e,t=!0)=>a(e,"error",t)),[a]),u=n.useCallback(((e,t=!0)=>a(e,"success",t)),[a]),d=n.useCallback(((e,t=!0)=>a(e,"warning",t)),[a]),p=n.useCallback(((e,t=!0)=>a(e,"info",t)),[a]);n.useEffect((()=>()=>{s.current.forEach((e=>{clearTimeout(e)})),s.current.clear()}),[]);const h={errors:r,addError:a,removeError:o,clearErrors:c,showError:l,showSuccess:u,showWarning:d,showInfo:p};return e.jsx(wt.Provider,{value:h,children:t})},exports.ErrorToast=Lt,exports.ErrorToastContainer=()=>{const{errors:t,removeError:n}=Rt();return 0===t.length?null:e.jsx("div",{className:"fixed bottom-10 right-10 flex flex-col gap-3",style:{zIndex:1e3},children:t.map((t=>e.jsx("div",{className:"bg-idd-white mt-3",children:e.jsx(Lt,{error:t,onClose:n})},t.id)))})},exports.IDDLinkInputItem=({id:i,idsArray:s,onDelete:o=()=>{},onBlur:a=()=>{},link:c,className:l=""})=>{const u=p(),d=t.useTailwindConfig(u.style),[h,f]=n.useState(d.colors["idd-black"]),[m,E]=n.useState({id:"",text:"",url:""});return n.useEffect((()=>{c&&(c.path&&c.path.length>0?E({id:c.id,text:c.text,url:c.path}):E(c))}),[c]),e.jsxs("div",{className:`flex justify-between items-center ${l}`,onBlur:e=>{e.stopPropagation(),a(m)},children:[e.jsx(t.IDDInput,{id:`link-${i}`,componentClass:"w-[45%]",type:"text",label:"Link Text",labelClass:"text-capitalize",showLabel:!!(m&&m.text&&m.text.length>0),placeholder:"Link Text",value:m.text,inputClass:"ps-3 active-primary-black",onChange:e=>{E(Object.assign(Object.assign({},m),{text:e.target.value}))}}),e.jsx(t.IDDInput,{id:`url-${i}`,componentClass:"w-45",type:"url",label:"URL",showLabel:!!(m&&m.url&&m.url.length>0),placeholder:"URL",value:m.url,inputClass:"ps-3 active-primary-black",onChange:e=>{E(Object.assign(Object.assign({},m),{url:e.target.value}))}}),e.jsx(t.IDDButton,{id:`removeLink-${i}`,onPress:()=>{if(s){let e=[...s];e=e.filter((e=>e!==i)),E({id:"",text:"",url:""}),o(e)}},onMouseEnter:()=>f("var(--idd-red)"),onFocus:()=>f("var(--idd-red)"),onMouseLeave:()=>f("var(--idd-primary-black)"),onBlur:()=>f("var(--idd-primary-black)"),isSecondary:!0,buttonClass:"flex items-center justify-center border-0 rounded-sm w-[1.5625rem] h-[1.5625rem] p-0",children:e.jsxs(n.Fragment,{children:[e.jsx("span",{className:"sr-only",children:"remove link"}),e.jsx(r.IDDXIcon,{wrapperClass:"flex justify-center items-center",color:h})]})})]})},exports.Layout=({children:t,className:n="flex items-center justify-center min-h-screen w-full p-5"})=>e.jsx(c,{children:e.jsx("div",{className:`bg-signup-theme bg-cover bg-center bg-no-repeat ${n}`,children:t})}),exports.Password=({onChange:i=()=>{},label:s="Password",value:o,componentClass:a="",appendToInputClass:c="",error:l="",errorColor:u="",isErrorOnlyColor:d=!0})=>{const[h,f]=n.useState(!1),[m,E]=n.useState(!1),g=p(),y=t.useTailwindConfig(g.style);return e.jsx(t.IDDInput,{label:s,value:o,type:h?"text":"password",componentClass:a,appendToInputClass:`me-4 ${c}`,activeTextColor:y.colors["idd-black"],inactiveTextColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],activeColor:y.colors["idd-black"],inactiveColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],activeLabelColor:y.colors["idd-black"],inactiveLabelColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],errors:l,errorColor:d?!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"]:u,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:d?{color:y.colors["idd-active-color"]}:{},onFocus:()=>E(!0),onBlur:()=>E(!1),appendToInput:e.jsx(t.IDDButton,{buttonClass:"p-1 rounded-sm focus:outline focus-visible:outline focus:outline-1 focus-visible:outline-1offset-1 focus:outline-idd-black focus-visible:outline-idd-black",onPress:()=>f(!h),children:e.jsxs(n.Fragment,{children:[e.jsx("span",{className:"sr-only",children:h?"password shown":"password hidden"}),h?e.jsx(r.IDDShowPasswordIcon,{color:m?y.colors["idd-black"]:y.colors["idd-grey"]}):e.jsx(r.IDDHidePasswordIcon,{color:m?y.colors["idd-black"]:y.colors["idd-grey"]})]})}),onChange:e=>{i&&i(e)}})},exports.PluginManager=({plugins:t,children:r})=>{const[i,s]=n.useState(t.length>0?t[0].id:null),[o,a]=n.useState(0);return e.jsxs("div",{className:"plugin-manager",children:[r,0===t.length?null:e.jsxs("div",{className:"plugin-list mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Available Plugins:"}),e.jsx("div",{className:"space-x-2",children:t.map((t=>e.jsx("button",{onClick:()=>{s(t.id),a(0)},className:"px-3 py-1 rounded "+(i===t.id?"bg-blue-500 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),children:t.name},t.id)))})]}),e.jsx("div",{className:"plugin-content",children:(()=>{if(!i||0===t.length)return null;const e=t.find((e=>e.id===i));if(!e||!e.tabs||0===e.tabs.length)return null;return(e.tabs[o]||e.tabs[0]).content})()})]})},exports.SimpleButton=({children:t,onClick:n,className:r="",disabled:i=!1})=>e.jsx("button",{onClick:n,disabled:i,className:`px-4 py-2 rounded bg-blue-500 text-white hover:bg-blue-600 disabled:opacity-50 ${r}`,children:t}),exports.TextInput=({label:n,onChange:r=()=>{},value:i,placeholder:s,type:o="text",readOnly:a=!1,error:c="",errorColor:l="",isErrorOnlyColor:u=!0})=>{const d=p(),h=t.useTailwindConfig(d.style);return e.jsx(t.IDDInput,{label:n,value:i,onChange:r,placeholder:s,type:o,readOnly:a,activeColor:a?h.colors["idd-grey"]:h.colors["idd-black"],inactiveColor:!i||"string"==typeof i&&0===i.length?h.colors["idd-grey"]:h.colors["idd-black"],activeLabelColor:a?h.colors["idd-grey"]:h.colors["idd-black"],inactiveLabelColor:!i||"string"==typeof i&&0===i.length?h.colors["idd-grey"]:h.colors["idd-black"],activeTextColor:a?h.colors["idd-grey"]:h.colors["idd-black"],inactiveTextColor:!i||"string"==typeof i&&0===i.length?h.colors["idd-grey"]:h.colors["idd-black"],inputWrapperClass:"w-full h-[3.125rem] rounded-sm",inputClass:a?"pointer-events-none":"",errors:c,errorColor:u?!i||"string"==typeof i&&0===i.length?h.colors["idd-grey"]:h.colors["idd-black"]:l,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:u?{color:h.colors["idd-active-color"]}:{}})},exports.defaultConfig=l,exports.ensureArray=kt,exports.flatten=function e(t){return(t||[]).reduce(((t,n)=>t.concat(Array.isArray(n)?e(n):n)),[])},exports.getArraysDiff=function(e,t){const n=t||[];return(e||[]).filter((e=>!n.includes(e)))},exports.getConfig=d,exports.getLocationString=e=>{let t="";return e&&(t=e.address_1&&e.address_1.length>0?e.address_1+", ":"",e.address_2&&e.address_2.length>0?t+=e.address_2+", ":t+="",e.city&&e.city.length>0?t+=e.city+", ":t+="",e.state&&e.state.length>0?t+=e.state:t+="",e.zip&&e.zip.length>0&&(t+=" "+e.zip)),t},exports.get_all_plugins=e=>Ct.flatMap((e=>Array.isArray(e)?e:[e])),exports.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},exports.isURL=function(e){return/^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(e)},exports.mapUserRole=e=>"EVALUATOR"===e?"MODERATOR":e,exports.resetReducer=()=>({type:i.RESET}),exports.safeFilter=function(e,t){return kt(e).filter(t)},exports.safeFind=function(e,t){return kt(e).find(t)},exports.safeLength=function(e){return kt(e).length},exports.safeMap=function(e,t){return kt(e).map(t)},exports.safeSome=function(e,t){return kt(e).some(t)},exports.setConfig=e=>{u=Object.assign(Object.assign({},l),e)},exports.setCurrentItem=e=>({type:i.SET_CURRENT_ITEM,payload:e}),exports.setCurrentPlugin=s,exports.setCurrentPluginAndTab=(e,t)=>(n,r)=>{n(s(e)),n(o(0));const{session:i}=r(),c=[...i.currentState||[]],l=c.findIndex((t=>t.pluginID===e));-1!==l?c[l]={pluginID:e,tabID:t}:c.push({pluginID:e,tabID:t}),n(a(c))},exports.setCurrentState=a,exports.setCurrentTab=o,exports.setCurrentTabAndState=(e,t)=>(n,r)=>{n(o(e));const{session:i}=r(),s=i.current.id,c=[...i.currentState||[]],l=c.findIndex((e=>e.pluginID===s));-1!==l?c[l]={pluginID:s,tabID:t}:c.push({pluginID:s,tabID:t}),n(a(c))},exports.setCurrentView=e=>({type:i.SET_CURRENT_VIEW,payload:e}),exports.setPlugins=e=>({type:i.SET_PLUGINS,payload:e}),exports.setSetting=(e,t)=>({type:i.SET_SETTING,payload:{key:e,value:t}}),exports.toggleCollapsed=()=>({type:i.COLLAPSED_TOGGLE}),exports.toggleNotifications=()=>({type:i.TOGGLE_NOTIFICATIONS}),exports.truncate=(e,t)=>e&&e.length>t?e.slice(0,t)+"...":e,exports.useConfig=p,exports.useDashboard=()=>{const e=n.useContext(Ot);if(!e)throw new Error("useDashboard must be used within a DashboardProvider");return e},exports.useError=Rt,exports.useErrorBoundary=()=>{const{showError:e}=Rt();return{handleError:n.useCallback(((t,n)=>{console.error("Error caught by boundary:",t,n),e("An unexpected error occurred. Please try again.")}),[e])}},exports.useUpdateUser=()=>{const[e,{loading:t,error:n}]=_t(Dt);return{updateUser:t=>E(void 0,void 0,void 0,(function*(){try{const{data:n}=yield e({variables:{input:t}});return(null==n?void 0:n.update_auth)||null}catch(e){throw console.log("Error updating user:",e),e}})),loading:t,error:n}},exports.useWindowDimensions=()=>{const[e,t]=n.useState({width:0,height:0});return n.useEffect((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e};
13
+ `,lr=[],cr=t.createContext(void 0);function dr(e){return Array.isArray(e)?e:[]}const ur=(e,...t)=>l(void 0,[e,...t],void 0,(function*(e,t=5e3){return e.startsWith("data:")||e.startsWith("url(")?{exists:!0,fallbackUsed:!1}:new Promise((r=>{const n=new Image,i=setTimeout((()=>{r({exists:!1,error:"Asset loading timeout",fallbackUsed:!0})}),t);n.onload=()=>{clearTimeout(i),r({exists:!0,fallbackUsed:!1})},n.onerror=()=>{clearTimeout(i),r({exists:!1,error:"Asset failed to load",fallbackUsed:!0})},n.src=e}))})),pr=(e,t)=>l(void 0,void 0,void 0,(function*(){const r=e.map((e=>l(void 0,void 0,void 0,(function*(){return{path:e,result:yield ur(e,t)}}))));return(yield Promise.all(r)).reduce(((e,{path:t,result:r})=>(e[t]=r,e)),{})})),hr={SIGNUP_THEME:"/signup-theme.png",LOGO_ENVIROME:"/logo-envirome.png",BVOC:"/bvoc.png",LOGO:"/logo.png"};function fr(e){if(!e)return e;if("undefined"!=typeof window){const t=document.createElement("div");t.textContent=e;return t.innerHTML.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").replace(/style\s*=/gi,"").replace(/<iframe/gi,"&lt;iframe").replace(/<object/gi,"&lt;object").replace(/<embed/gi,"&lt;embed").replace(/<form/gi,"&lt;form")}return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function mr(e){return/<[a-z][\s\S]*>/i.test(e)}function gr(e,t){for(let r=0;r<e.length;r++){let n=!1;if(n=mr(e[r]),n){const n={text:e[r],hasLinks:!0};t.push(n)}else{const n={text:e[r],hasLinks:!1};t.push(n)}}}const yr=t.createContext(null),xr=()=>{const e=t.useContext(yr);if(!e)throw new Error("useError must be used within an ErrorProvider");return e},br=({error:t,onClose:i})=>e.jsxs("div",{className:`text-white p-4 rounded-lg shadow-lg ring-2 ${(()=>{switch(t.type){case"success":return"ring-idd-green";case"warning":return"ring-idd-yellow";case"info":return"ring-idd-purple";default:return"ring-idd-active-color"}})()} flex items-start gap-3 max-w-md`,children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:(()=>{switch(t.type){case"success":return e.jsx(n.IDDOutlineCheckmarkIcon,{});case"warning":default:return e.jsx(n.IDDOutlineWarningIcon,{});case"info":return e.jsx(n.IDDInfoIcon,{})}})()}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"font-idd-primary-font-regular text-lg leading-relaxed",children:[e.jsx("span",{className:"font-idd-primary-font-bold text-lg",children:(()=>{switch(t.type){case"success":return"Success: ";case"warning":return"Warning: ";case"info":return"Info: ";default:return"Error: "}})()})," ",t.message]})}),e.jsx(r.IDDButton,{buttonClass:"border-0 bg-idd-transparent ms-auto",onPress:()=>i(t.id),"aria-label":"Close",children:e.jsx(n.IDDXIcon,{})})]});exports.ActionTypes=R,exports.CancelActionButton=({children:t,onPress:n,disabled:i=!1,type:s="button",className:o="",variant:a="outline","data-testid":l})=>e.jsx(r.IDDButton,{type:s,onPress:n||(()=>{}),disabled:i,buttonClass:w(a,i,`px-5 ${o}`),"data-testid":l,children:t}),exports.Card=({children:t,title:n,subtitle:i,className:s="",padding:o="medium",shadow:a="medium",border:l=!0,"data-testid":c})=>{const d=["bg-white rounded-lg",{none:"",small:"shadow-sm",medium:"shadow-md",large:"shadow-lg"}[a],l?"border border-gray-200":"",s].filter(Boolean).join(" "),u={none:"",small:"p-3",medium:"p-6",large:"p-8"}[o];return e.jsx(r.IDDCard,{"data-testid":c,children:e.jsx("div",{className:d,children:e.jsxs("div",{className:u,children:[(n||i)&&e.jsxs("div",{className:"mb-4",children:[n&&e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-1",children:n}),i&&e.jsx("p",{className:"text-sm text-gray-600",children:i})]}),t]})})})},exports.ConfirmActionButton=({children:t,onPress:n,disabled:i=!1,type:s="submit",className:o="",variant:a="primary","data-testid":l})=>e.jsx(r.IDDButton,{type:s,onPress:n||(()=>{}),disabled:i,buttonClass:w(a,i,`px-5 ${o}`),"data-testid":l,children:t}),exports.ContentItem=({type:t,style:r,text:n,items:i,orderedListStyle:s="",unorderedListStyle:o="",paragraphStyle:a=""})=>{if("list"===t){if("ordered"===r){const t=[];return i&&gr(i,t),e.jsx("ol",{className:s,children:t.map(((t,r)=>t.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:fr(t.text)}},r):e.jsx("li",{children:t.text},r)))})}{const t=[];return i&&gr(i,t),e.jsx("ul",{className:o,children:t.map(((t,r)=>t.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:fr(t.text)}},r):e.jsx("li",{children:t.text},r)))})}}{let t;return n?(t=mr(n),t?e.jsx("p",{className:a,dangerouslySetInnerHTML:{__html:fr(n)}}):e.jsx("p",{className:a,children:n})):e.jsx("p",{className:a,children:n})}},exports.DEFAULT_ASSET_PATHS=hr,exports.DEFAULT_FALLBACK_COLORS={PRIMARY:"#ad0000",SECONDARY:"#0066cc",NEUTRAL:"#666666",SUCCESS:"#00A89D",WARNING:"#DD3150"},exports.DashboardProvider=({config:r,children:n})=>{const[i,s]=t.useState(r),o={config:i,updateConfig:e=>{s((t=>Object.assign(Object.assign({},t),e)))}};return e.jsx(cr.Provider,{value:o,children:n})},exports.ErrorBoundary=d,exports.ErrorProvider=({children:r})=>{const[n,i]=t.useState([]),s=t.useRef(new Map),o=t.useCallback((e=>{const t=s.current.get(e);t&&(clearTimeout(t),s.current.delete(e)),i((t=>t.filter((t=>t.id!==e))))}),[]),a=t.useCallback(((e,t="error",r=!0,n=1e4)=>{const a=`error_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,l={id:a,type:t,message:e,timestamp:Date.now(),autoHide:r,duration:n};if(i((r=>r.some((r=>r.message===e&&r.type===t))?r:[...r,l])),r&&n){const e=setTimeout((()=>{o(a)}),n);s.current.set(a,e)}return a}),[o]),l=t.useCallback((()=>{s.current.forEach((e=>{clearTimeout(e)})),s.current.clear(),i([])}),[]),c=t.useCallback(((e,t=!0)=>a(e,"error",t)),[a]),d=t.useCallback(((e,t=!0)=>a(e,"success",t)),[a]),u=t.useCallback(((e,t=!0)=>a(e,"warning",t)),[a]),p=t.useCallback(((e,t=!0)=>a(e,"info",t)),[a]);t.useEffect((()=>()=>{s.current.forEach((e=>{clearTimeout(e)})),s.current.clear()}),[]);const h={errors:n,addError:a,removeError:o,clearErrors:l,showError:c,showSuccess:d,showWarning:u,showInfo:p};return e.jsx(yr.Provider,{value:h,children:r})},exports.ErrorToast=br,exports.ErrorToastContainer=()=>{const{errors:t,removeError:r}=xr();return 0===t.length?null:e.jsx("div",{className:"fixed bottom-10 right-10 flex flex-col gap-3",style:{zIndex:1e3},children:t.map((t=>e.jsx("div",{className:"bg-idd-white mt-3",children:e.jsx(br,{error:t,onClose:r})},t.id)))})},exports.FormField=D,exports.IDDLinkInputItem=({id:i,idsArray:s,onDelete:o=()=>{},onBlur:a=()=>{},link:l,className:c=""})=>{const d=_(),u=r.useTailwindConfig(d.style),[p,h]=t.useState(u.colors["idd-black"]),[f,m]=t.useState({id:"",text:"",url:""});return t.useEffect((()=>{l&&(l.path&&l.path.length>0?m({id:l.id,text:l.text,url:l.path}):m(l))}),[l]),e.jsxs("div",{className:`flex justify-between items-center ${c}`,onBlur:e=>{e.stopPropagation(),a(f)},children:[e.jsx(r.IDDInput,{id:`link-${i}`,componentClass:"w-[45%]",type:"text",label:"Link Text",labelClass:"text-capitalize",showLabel:!!(f&&f.text&&f.text.length>0),placeholder:"Link Text",value:f.text,inputClass:"ps-3 active-primary-black",onChange:e=>{m(Object.assign(Object.assign({},f),{text:e.target.value}))}}),e.jsx(r.IDDInput,{id:`url-${i}`,componentClass:"w-45",type:"url",label:"URL",showLabel:!!(f&&f.url&&f.url.length>0),placeholder:"URL",value:f.url,inputClass:"ps-3 active-primary-black",onChange:e=>{m(Object.assign(Object.assign({},f),{url:e.target.value}))}}),e.jsx(r.IDDButton,{id:`removeLink-${i}`,onPress:()=>{if(s){let e=[...s];e=e.filter((e=>e!==i)),m({id:"",text:"",url:""}),o(e)}},onMouseEnter:()=>h("var(--idd-red)"),onFocus:()=>h("var(--idd-red)"),onMouseLeave:()=>h("var(--idd-primary-black)"),onBlur:()=>h("var(--idd-primary-black)"),isSecondary:!0,buttonClass:"flex items-center justify-center border-0 rounded-sm w-[1.5625rem] h-[1.5625rem] p-0",children:e.jsxs(t.Fragment,{children:[e.jsx("span",{className:"sr-only",children:"remove link"}),e.jsx(n.IDDXIcon,{wrapperClass:"flex justify-center items-center",color:p})]})})]})},exports.Layout=({children:t,className:r="flex items-center justify-center min-h-screen w-full p-5"})=>e.jsx(d,{children:e.jsx("div",{className:`bg-signup-theme bg-cover bg-center bg-no-repeat ${r}`,children:t})}),exports.Loader=O,exports.LoginBackground=({config:r,className:n="",children:i,onImageError:s,onImageLoad:o,"data-testid":a="login-background"})=>{const[c,u]=t.useState(!1),[p,h]=t.useState(!1),[y,x]=t.useState(!1),b=r||m(),E=f(b);E.length>0&&console.warn("LoginBackground configuration errors:",E);const v=t.useCallback((()=>l(void 0,void 0,void 0,(function*(){if("image"===b.type){x(!0),h(!1);try{yield g(b.value),u(!0),h(!1),null==o||o(new Event("load"))}catch(e){h(!0),u(!1),null==s||s(new Event("error")),console.warn("Failed to load background image:",b.value)}finally{x(!1)}}}))),[b.type,b.value,s,o]);t.useEffect((()=>{v()}),[v]),t.useEffect((()=>{const e=document.documentElement;"image"===b.type?e.style.setProperty("--login-bg-image",`url('${b.value}')`):"color"===b.type?(e.style.setProperty("--login-bg-image","none"),e.style.setProperty("--login-bg-color",b.value)):"gradient"===b.type&&e.style.setProperty("--login-bg-image",b.value),e.style.setProperty("--login-bg-fallback",b.fallback),b.backgroundSize&&e.style.setProperty("--login-bg-size",b.backgroundSize),b.backgroundPosition&&e.style.setProperty("--login-bg-position",b.backgroundPosition),"image"===b.type&&(p||y)&&(e.style.setProperty("--login-bg-image","none"),e.style.setProperty("--login-bg-color",b.fallback))}),[b,p,y]);const N=b.additionalStyles||{},T=["bg-login","transition-all duration-300 ease-in-out","min-h-full w-full",n].filter(Boolean).join(" "),_=d;return e.jsx(_,{fallback:e.jsx("div",{children:"Something went wrong with the background"}),children:e.jsx("div",{className:T,style:N,"data-testid":a,"data-background-type":b.type,"data-image-loaded":"image"===b.type?c:void 0,"aria-label":"image"===b.type?`Background image: ${b.value}`:"Background styling",children:i})})},exports.Modal=({children:t,isOpen:r,onClose:n,title:i,showCloseButton:s=!0,size:o="medium",className:a="","data-testid":l})=>{if(!r)return null;return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center min-h-screen p-4 z-50",onClick:e=>{e.target===e.currentTarget&&n()},onKeyDown:e=>{"Escape"===e.key&&n()},"data-testid":l,role:"dialog","aria-modal":"true",tabIndex:-1,children:e.jsxs("div",{className:`bg-white rounded-lg shadow-xl ${{small:"max-w-md",medium:"max-w-lg",large:"max-w-2xl",full:"max-w-full mx-4"}[o]} w-full ${a}`,children:[i&&e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:i}),s&&e.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600","aria-label":"Close modal",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"p-6",children:t})]})})},exports.Password=({onChange:i=()=>{},label:s="Password",value:o,componentClass:a="",appendToInputClass:l="",error:c="",errorColor:d="",isErrorOnlyColor:u=!0})=>{const[p,h]=t.useState(!1),[f,m]=t.useState(!1),g=_(),y=r.useTailwindConfig(g.style);return e.jsx(r.IDDInput,{label:s,value:o,type:p?"text":"password",componentClass:a,appendToInputClass:`me-4 ${l}`,activeTextColor:y.colors["idd-black"],inactiveTextColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],activeColor:y.colors["idd-black"],inactiveColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],activeLabelColor:y.colors["idd-black"],inactiveLabelColor:!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"],errors:c,errorColor:u?!o||"string"==typeof o&&0===o.length?y.colors["idd-grey"]:y.colors["idd-black"]:d,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:u?{color:y.colors["idd-active-color"]}:{},onFocus:()=>m(!0),onBlur:()=>m(!1),appendToInput:e.jsx(r.IDDButton,{buttonClass:"p-1 rounded-sm focus:outline focus-visible:outline focus:outline-1 focus-visible:outline-1offset-1 focus:outline-idd-black focus-visible:outline-idd-black",onPress:()=>h(!p),children:e.jsxs(t.Fragment,{children:[e.jsx("span",{className:"sr-only",children:p?"password shown":"password hidden"}),p?e.jsx(n.IDDShowPasswordIcon,{color:f?y.colors["idd-black"]:y.colors["idd-grey"]}):e.jsx(n.IDDHidePasswordIcon,{color:f?y.colors["idd-black"]:y.colors["idd-grey"]})]})}),onChange:e=>{i&&i(e)}})},exports.PasswordRequirements=({requirements:t,password:r,className:n=""})=>e.jsxs("div",{className:`password-requirements ${n}`,children:[e.jsx("div",{className:"text-sm font-medium text-gray-700 mb-2",children:"Password Requirements:"}),e.jsx("ul",{className:"space-y-1",children:t.map(((t,n)=>{const i=!!r&&(e=>{if(e.includes("lowercase"))return/[a-z]/.test(r);if(e.includes("uppercase"))return/[A-Z]/.test(r);if(e.includes("number"))return/[0-9]/.test(r);if(e.includes("special character"))return/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(r);if(e.includes("characters long")){const t=e.match(/(\d+)-(\d+) characters/);if(t){const e=parseInt(t[1]),n=parseInt(t[2]);return r.length>=e&&r.length<=n}}return!1})(t);return e.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[e.jsx("span",{className:"mt-0.5 "+(i?"text-green-500":"text-gray-400"),children:i?"✓":"○"}),e.jsx("span",{className:i?"text-green-600":"text-gray-600",children:t})]},n)}))})]}),exports.PasswordStrengthBar=E,exports.PasswordStrengthIndicator=b,exports.PluginManager=({plugins:r,children:n})=>{const[i,s]=t.useState(r.length>0?r[0].id:null),[o,a]=t.useState(0);return e.jsxs("div",{className:"plugin-manager",children:[n,0===r.length?null:e.jsxs("div",{className:"plugin-list mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Available Plugins:"}),e.jsx("div",{className:"space-x-2",children:r.map((t=>e.jsx("button",{onClick:()=>{s(t.id),a(0)},className:"px-3 py-1 rounded "+(i===t.id?"bg-blue-500 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),children:t.name},t.id)))})]}),e.jsx("div",{className:"plugin-content",children:(()=>{if(!i||0===r.length)return null;const e=r.find((e=>e.id===i));if(!e||!e.tabs||0===e.tabs.length)return null;return(e.tabs[o]||e.tabs[0]).content})()})]})},exports.SimpleButton=C,exports.SubmitButton=S,exports.TermsCheckbox=A,exports.TextInput=({label:t,onChange:n=()=>{},value:i,placeholder:s,type:o="text",readOnly:a=!1,error:l="",errorColor:c="",isErrorOnlyColor:d=!0})=>{const u=_(),p=r.useTailwindConfig(u.style);return e.jsx(r.IDDInput,{label:t,value:i,onChange:n,placeholder:s,type:o,readOnly:a,activeColor:a?p.colors["idd-grey"]:p.colors["idd-black"],inactiveColor:!i||"string"==typeof i&&0===i.length?p.colors["idd-grey"]:p.colors["idd-black"],activeLabelColor:a?p.colors["idd-grey"]:p.colors["idd-black"],inactiveLabelColor:!i||"string"==typeof i&&0===i.length?p.colors["idd-grey"]:p.colors["idd-black"],activeTextColor:a?p.colors["idd-grey"]:p.colors["idd-black"],inactiveTextColor:!i||"string"==typeof i&&0===i.length?p.colors["idd-grey"]:p.colors["idd-black"],inputWrapperClass:"w-full h-[3.125rem] rounded-sm",inputClass:a?"pointer-events-none":"",errors:l,errorColor:d?!i||"string"==typeof i&&0===i.length?p.colors["idd-grey"]:p.colors["idd-black"]:c,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:d?{color:p.colors["idd-active-color"]}:{}})},exports.buttonVariants=k,exports.commonStyles=I,exports.createDefaultConfig=m,exports.createValidationResult=(e,t=[])=>({isValid:e,errors:t}),exports.debounce=(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout((()=>e(...n)),t)}},exports.defaultConfig=v,exports.ensureArray=dr,exports.flatten=function e(t){return(t||[]).reduce(((t,r)=>t.concat(Array.isArray(r)?e(r):r)),[])},exports.generateBackgroundStyles=e=>{const t={backgroundRepeat:"no-repeat"};switch(e.borderRadius&&(t.borderRadius=e.borderRadius),"image"===e.type&&(t.backgroundSize=e.backgroundSize||"cover",t.backgroundPosition=e.backgroundPosition||"center"),e.type){case"image":t.backgroundImage=`url('${e.value}')`,t.backgroundColor=e.fallback;break;case"color":t.backgroundColor=e.value;break;case"gradient":t.backgroundImage=e.value,t.backgroundColor=e.fallback;break;default:t.backgroundColor=e.fallback}return t},exports.getArraysDiff=function(e,t){const r=t||[];return(e||[]).filter((e=>!r.includes(e)))},exports.getBackgroundStyle=(e,t)=>{if(((null==t?void 0:t.fallbackUsed)||!1===(null==t?void 0:t.exists))&&e.fallback)return{backgroundColor:e.fallback,backgroundImage:"none"};return{backgroundImage:e.path.startsWith("url(")||e.path.startsWith("data:")?e.path:`url('${e.path}')`}},exports.getButtonStyles=w,exports.getConfig=T,exports.getLocationString=e=>{let t="";return e&&(t=e.address_1&&e.address_1.length>0?e.address_1+", ":"",e.address_2&&e.address_2.length>0?t+=e.address_2+", ":t+="",e.city&&e.city.length>0?t+=e.city+", ":t+="",e.state&&e.state.length>0?t+=e.state:t+="",e.zip&&e.zip.length>0&&(t+=" "+e.zip)),t},exports.get_all_plugins=e=>lr.flatMap((e=>Array.isArray(e)?e:[e])),exports.isAlpha=e=>/^[a-zA-Z]+$/.test(e),exports.isAlphanumeric=e=>/^[a-zA-Z0-9]+$/.test(e),exports.isEmpty=e=>!e||0===e.trim().length,exports.isLengthValid=(e,t,r)=>{const n=e?e.length:0;return n>=t&&n<=r},exports.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},exports.isNumeric=e=>/^\d+$/.test(e),exports.isURL=function(e){return/^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(e)},exports.isValidColor=p,exports.isValidDate=e=>{const t=new Date(e);return!isNaN(t.getTime())},exports.isValidEmail=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),exports.isValidImageUrl=h,exports.isValidPhone=e=>/^[\d\s\-\(\)\+]+$/.test(e)&&e.replace(/\D/g,"").length>=10,exports.isValidUrl=e=>{try{return new URL(e),!0}catch(e){return!1}},exports.mapUserRole=e=>"EVALUATOR"===e?"MODERATOR":e,exports.matchesPattern=(e,t)=>t.test(e),exports.normalizeWhitespace=e=>e.replace(/\s+/g," ").trim(),exports.preloadImage=g,exports.resetReducer=()=>({type:R.RESET}),exports.safeFilter=function(e,t){return dr(e).filter(t)},exports.safeFind=function(e,t){return dr(e).find(t)},exports.safeLength=function(e){return dr(e).length},exports.safeMap=function(e,t){return dr(e).map(t)},exports.safeSome=function(e,t){return dr(e).some(t)},exports.sanitizeInput=e=>e&&"string"==typeof e?e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<[^>]+>/g,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").trim():"",exports.setConfig=e=>{N=Object.assign(Object.assign({},v),e)},exports.setCurrentItem=e=>({type:R.SET_CURRENT_ITEM,payload:e}),exports.setCurrentPlugin=j,exports.setCurrentPluginAndTab=(e,t)=>(r,n)=>{r(j(e)),r(L(0));const{session:i}=n(),s=[...i.currentState||[]],o=s.findIndex((t=>t.pluginID===e));-1!==o?s[o]={pluginID:e,tabID:t}:s.push({pluginID:e,tabID:t}),r(P(s))},exports.setCurrentState=P,exports.setCurrentTab=L,exports.setCurrentTabAndState=(e,t)=>(r,n)=>{r(L(e));const{session:i}=n(),s=i.current.id,o=[...i.currentState||[]],a=o.findIndex((e=>e.pluginID===s));-1!==a?o[a]={pluginID:s,tabID:t}:o.push({pluginID:s,tabID:t}),r(P(o))},exports.setCurrentView=e=>({type:R.SET_CURRENT_VIEW,payload:e}),exports.setPlugins=e=>({type:R.SET_PLUGINS,payload:e}),exports.setSetting=(e,t)=>({type:R.SET_SETTING,payload:{key:e,value:t}}),exports.toggleCollapsed=()=>({type:R.COLLAPSED_TOGGLE}),exports.toggleNotifications=()=>({type:R.TOGGLE_NOTIFICATIONS}),exports.truncate=(e,t)=>e&&e.length>t?e.slice(0,t)+"...":e,exports.useAssetValidation=(e,r)=>{const[n,i]=t.useState({exists:!0,fallbackUsed:!1}),[s,o]=t.useState(!0);return t.useEffect((()=>{let t=!0;return l(void 0,void 0,void 0,(function*(){o(!0);const n=yield ur(e,r);t&&(i(n),o(!1))})),()=>{t=!1}}),[e,r]),{result:n,isLoading:s}},exports.useConfig=_,exports.useDashboard=()=>{const e=t.useContext(cr);if(!e)throw new Error("useDashboard must be used within a DashboardProvider");return e},exports.useError=xr,exports.useErrorBoundary=()=>{const{showError:e}=xr();return{handleError:t.useCallback(((t,r)=>{console.error("Error caught by boundary:",t,r),e("An unexpected error occurred. Please try again.")}),[e])}},exports.useIDDTheme=()=>{const e=_(),t=r.useTailwindConfig(e.style);return{config:e,tailwindConfig:t,colors:t.colors}},exports.useLoginBackground=()=>t.useCallback((e=>{if("undefined"==typeof window||"undefined"==typeof document)return;const t=document.documentElement;try{if("image"===e.type&&e.value){const r=e.value.replace(/[<>"']/g,"");t.style.setProperty("--login-bg-image",`url('${r}')`)}else if("color"===e.type&&e.value){/^(#[0-9A-F]{6}|#[0-9A-F]{3}|rgb\(|rgba\(|hsl\(|hsla\()/i.test(e.value)&&(t.style.setProperty("--login-bg-image","none"),t.style.setProperty("--login-bg-color",e.value))}else"gradient"===e.type&&e.value&&e.value.includes("gradient(")&&t.style.setProperty("--login-bg-image",e.value);if(e.fallback){const r=e.fallback.replace(/[<>"']/g,"");t.style.setProperty("--login-bg-fallback",r)}if(e.backgroundSize){(["cover","contain","auto","100%"].includes(e.backgroundSize)||/^\d+(px|%|em|rem)$/.test(e.backgroundSize))&&t.style.setProperty("--login-bg-size",e.backgroundSize)}if(e.backgroundPosition){/^(center|left|right|top|bottom|\d+(px|%|em|rem)|\s)+$/.test(e.backgroundPosition)&&t.style.setProperty("--login-bg-position",e.backgroundPosition)}}catch(e){console.warn("Failed to set login background styles:",e)}}),[]),exports.useUpdateUser=()=>{const[e,{loading:t,error:r}]=or(ar);return{updateUser:t=>l(void 0,void 0,void 0,(function*(){try{const{data:r}=yield e({variables:{input:t}});return(null==r?void 0:r.update_auth)||null}catch(e){throw console.log("Error updating user:",e),e}})),loading:t,error:r}},exports.useWindowDimensions=()=>{const[e,r]=t.useState({width:0,height:0});return t.useEffect((()=>{function e(){r({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e},exports.validateAsset=ur,exports.validateAssets=pr,exports.validateCommonAssets=()=>l(void 0,void 0,void 0,(function*(){return pr(Object.values(hr))})),exports.validateConfig=f,exports.warnMissingAssets=e=>{if("development"!==process.env.NODE_ENV)return;const t=Object.entries(e).filter((([,e])=>!e.exists)).map((([e])=>e));t.length>0&&console.warn("⚠️ IDD Dashboard: Missing optional assets detected:",t,"\nSee https://github.com/integrativedesigndevelopment/idd-dashboard/blob/main/docs/guides/required-assets.md for details.")};
14
14
  //# sourceMappingURL=index.js.map