@confidencesystemsinc/sdk 1.8.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +5 -4
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ object-assign
|
|
|
18
18
|
@license MIT
|
|
19
19
|
*/var dc,Sh;function F1(){if(Sh)return dc;Sh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return dc=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},dc}var hc,Th;function Hf(){if(Th)return hc;Th=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return hc=e,hc}var pc,Nh;function a0(){return Nh||(Nh=1,pc=Function.call.bind(Object.prototype.hasOwnProperty)),pc}var mc,Oh;function j1(){if(Oh)return mc;Oh=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Hf(),n={},r=a0();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=i[u](s,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mc=o,mc}var gc,Ph;function z1(){if(Ph)return gc;Ph=1;var e=s0(),t=F1(),n=Hf(),r=a0(),o=j1(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(L){var F=L&&(c&&L[c]||L[u]);if(typeof F=="function")return F}var d="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:v,element:w(),elementType:A(),instanceOf:C,node:P(),objectOf:E,oneOf:_,oneOfType:N,shape:W,exact:j};function p(L,F){return L===F?L!==0||1/L===1/F:L!==L&&F!==F}function g(L,F){this.message=L,this.data=F&&typeof F=="object"?F:{},this.stack=""}g.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var F={},K=0;function B(V,ee,te,pe,ye,me,ze){if(pe=pe||d,me=me||te,ze!==n){if(l){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var qe=pe+":"+te;!F[qe]&&K<3&&(i("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+pe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),F[qe]=!0,K++)}}return ee[te]==null?V?ee[te]===null?new g("The "+ye+" `"+me+"` is marked as required "+("in `"+pe+"`, but its value is `null`.")):new g("The "+ye+" `"+me+"` is marked as required in "+("`"+pe+"`, but its value is `undefined`.")):null:L(ee,te,pe,ye,me)}var J=B.bind(null,!1);return J.isRequired=B.bind(null,!0),J}function y(L){function F(K,B,J,V,ee,te){var pe=K[B],ye=Q(pe);if(ye!==L){var me=oe(pe);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+me+"` supplied to `"+J+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(F)}function b(){return m(s)}function v(L){function F(K,B,J,V,ee){if(typeof L!="function")return new g("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var te=K[B];if(!Array.isArray(te)){var pe=Q(te);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+J+"`, expected an array."))}for(var ye=0;ye<te.length;ye++){var me=L(te,ye,J,V,ee+"["+ye+"]",n);if(me instanceof Error)return me}return null}return m(F)}function w(){function L(F,K,B,J,V){var ee=F[K];if(!a(ee)){var te=Q(ee);return new g("Invalid "+J+" `"+V+"` of type "+("`"+te+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return m(L)}function A(){function L(F,K,B,J,V){var ee=F[K];if(!e.isValidElementType(ee)){var te=Q(ee);return new g("Invalid "+J+" `"+V+"` of type "+("`"+te+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return m(L)}function C(L){function F(K,B,J,V,ee){if(!(K[B]instanceof L)){var te=L.name||d,pe=re(K[B]);return new g("Invalid "+V+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+J+"`, expected ")+("instance of `"+te+"`."))}return null}return m(F)}function _(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function F(K,B,J,V,ee){for(var te=K[B],pe=0;pe<L.length;pe++)if(p(te,L[pe]))return null;var ye=JSON.stringify(L,function(ze,G){var qe=oe(G);return qe==="symbol"?String(G):G});return new g("Invalid "+V+" `"+ee+"` of value `"+String(te)+"` "+("supplied to `"+J+"`, expected one of "+ye+"."))}return m(F)}function E(L){function F(K,B,J,V,ee){if(typeof L!="function")return new g("Property `"+ee+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var te=K[B],pe=Q(te);if(pe!=="object")return new g("Invalid "+V+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+J+"`, expected an object."));for(var ye in te)if(r(te,ye)){var me=L(te,ye,J,V,ee+"."+ye,n);if(me instanceof Error)return me}return null}return m(F)}function N(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<L.length;F++){var K=L[F];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+M(K)+" at index "+F+"."),s}function B(J,V,ee,te,pe){for(var ye=[],me=0;me<L.length;me++){var ze=L[me],G=ze(J,V,ee,te,pe,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&ye.push(G.data.expectedType)}var qe=ye.length>0?", expected one of type ["+ye.join(", ")+"]":"";return new g("Invalid "+te+" `"+pe+"` supplied to "+("`"+ee+"`"+qe+"."))}return m(B)}function P(){function L(F,K,B,J,V){return z(F[K])?null:new g("Invalid "+J+" `"+V+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return m(L)}function I(L,F,K,B,J){return new g((L||"React class")+": "+F+" type `"+K+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function W(L){function F(K,B,J,V,ee){var te=K[B],pe=Q(te);if(pe!=="object")return new g("Invalid "+V+" `"+ee+"` of type `"+pe+"` "+("supplied to `"+J+"`, expected `object`."));for(var ye in L){var me=L[ye];if(typeof me!="function")return I(J,V,ee,ye,oe(me));var ze=me(te,ye,J,V,ee+"."+ye,n);if(ze)return ze}return null}return m(F)}function j(L){function F(K,B,J,V,ee){var te=K[B],pe=Q(te);if(pe!=="object")return new g("Invalid "+V+" `"+ee+"` of type `"+pe+"` "+("supplied to `"+J+"`, expected `object`."));var ye=t({},K[B],L);for(var me in ye){var ze=L[me];if(r(L,me)&&typeof ze!="function")return I(J,V,ee,me,oe(ze));if(!ze)return new g("Invalid "+V+" `"+ee+"` key `"+me+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(K[B],null," ")+`
|
|
20
20
|
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var G=ze(te,me,J,V,ee+"."+me,n);if(G)return G}return null}return m(F)}function z(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(z);if(L===null||a(L))return!0;var F=f(L);if(F){var K=F.call(L),B;if(F!==L.entries){for(;!(B=K.next()).done;)if(!z(B.value))return!1}else for(;!(B=K.next()).done;){var J=B.value;if(J&&!z(J[1]))return!1}}else return!1;return!0;default:return!1}}function Y(L,F){return L==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function Q(L){var F=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":Y(F,L)?"symbol":F}function oe(L){if(typeof L>"u"||L===null)return""+L;var F=Q(L);if(F==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return F}function M(L){var F=oe(L);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function re(L){return!L.constructor||!L.constructor.name?d:L.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},gc}var yc,Mh;function $1(){if(Mh)return yc;Mh=1;var e=Hf();function t(){}function n(){}return n.resetWarningCache=t,yc=function(){function r(s,a,l,c,u,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yc}var Ih;function U1(){if(Ih)return ua.exports;if(Ih=1,process.env.NODE_ENV!=="production"){var e=s0(),t=!0;ua.exports=z1()(e.isElement,t)}else ua.exports=$1()();return ua.exports}var B1=U1();const ge=L1(B1);var W1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l0(e,t){return e(t={exports:{}},t.exports),t.exports}var K1=l0((function(e){(function(t){var n=function(m,y,b){if(!l(y)||u(y)||f(y)||d(y)||a(y))return y;var v,w=0,A=0;if(c(y))for(v=[],A=y.length;w<A;w++)v.push(n(m,y[w],b));else for(var C in v={},y)Object.prototype.hasOwnProperty.call(y,C)&&(v[m(C,b)]=n(m,y[C],b));return v},r=function(m){return h(m)?m:(m=m.replace(/[\-_\s]+(.)?/g,(function(y,b){return b?b.toUpperCase():""}))).substr(0,1).toLowerCase()+m.substr(1)},o=function(m){var y=r(m);return y.substr(0,1).toUpperCase()+y.substr(1)},i=function(m,y){return(function(b,v){var w=(v=v||{}).separator||"_",A=v.split||/(?=[A-Z])/;return b.split(A).join(w)})(m,y).toLowerCase()},s=Object.prototype.toString,a=function(m){return typeof m=="function"},l=function(m){return m===Object(m)},c=function(m){return s.call(m)=="[object Array]"},u=function(m){return s.call(m)=="[object Date]"},f=function(m){return s.call(m)=="[object RegExp]"},d=function(m){return s.call(m)=="[object Boolean]"},h=function(m){return(m-=0)==m},p=function(m,y){var b=y&&"process"in y?y.process:y;return typeof b!="function"?m:function(v,w){return b(v,m,w)}},g={camelize:r,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(m,y){return n(p(r,y),m)},decamelizeKeys:function(m,y){return n(p(i,y),m,y)},pascalizeKeys:function(m,y){return n(p(o,y),m)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=g:t.humps=g})(W1)})).decamelize,H1=function(e){if(Array.isArray(e))return e},q1=function(e,t){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{r||a.return==null||a.return()}finally{if(o)throw i}}return n}},Lh=function(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},V1=function(e,t){if(e){if(typeof e=="string")return Lh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lh(e,t):void 0}},Y1=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},Q1=function(e,t){return H1(e)||q1(e,t)||V1(e,t)||Y1()},c0=l0((function(e){function t(){return e.exports=t=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},t.apply(this,arguments)}e.exports=t})),G1=function(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},u0=function(e,t){if(e==null)return{};var n,r,o=G1(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},Z1=T.createContext(null);function f0(e){var t=e.children,n=t===void 0?"":t,r=u0(e,["children"]);return typeof n!="string"&&(n=M1.renderToString(n)),T.createElement("template",c0({},r,{dangerouslySetInnerHTML:{__html:n}}))}function d0(e){var t=e.root,n=e.children;return Nn.createPortal(n===void 0?null:n,t)}function J1(e){var t=T.forwardRef((function(n,r){var o,i,s=n.mode,a=s===void 0?"open":s,l=n.delegatesFocus,c=l!==void 0&&l,u=n.styleSheets,f=u===void 0?[]:u,d=n.ssr,h=d!==void 0&&d,p=n.children,g=u0(n,["mode","delegatesFocus","styleSheets","ssr","children"]),m=(i=T.useRef((o=r)&&o.current),T.useEffect((function(){o&&(o.current=i.current)}),[o]),i),y=T.useState(null),b=Q1(y,2),v=b[0],w=b[1],A="node_".concat(a).concat(c);return T.useLayoutEffect((function(){if(m.current)try{if(typeof r=="function"&&r(m.current),h){var C=m.current.shadowRoot;return void w(C)}var _=m.current.attachShadow({mode:a,delegatesFocus:c});f.length>0&&(_.adoptedStyleSheets=f),w(_)}catch(E){(function(N){var P=N.error,I=N.styleSheets,W=N.root;switch(P.name){case"NotSupportedError":I.length>0&&(W.adoptedStyleSheets=I);break;default:throw P}})({error:E,styleSheets:f,root:v})}}),[r,m,f]),T.createElement(T.Fragment,null,T.createElement(e.tag,c0({key:A,ref:m},g),(v||h)&&T.createElement(Z1.Provider,{value:v},h?T.createElement(f0,{shadowroot:a,shadowrootmode:a},e.render({root:v,ssr:h,children:p})):T.createElement(d0,{root:v},e.render({root:v,ssr:h,children:p})))))}));return t.propTypes={mode:ge.oneOf(["open","closed"]),delegatesFocus:ge.bool,styleSheets:ge.arrayOf(ge.instanceOf(globalThis.CSSStyleSheet)),ssr:ge.bool,children:ge.node},t}f0.propTypes={children:ge.oneOfType([ge.string,ge.node])},d0.propTypes={root:ge.object.isRequired,children:ge.node};var bc=new Map;function X1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=K1(o,{separator:"-"}),s="".concat(t,"-").concat(i);return bc.has(s)||bc.set(s,J1({tag:i,render:n})),bc.get(s)}})}var Al=X1();const h0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==";var Ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ew={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gn,ao,Yg,tw=(Yg=class{constructor(){fe(this,gn,ew);fe(this,ao,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&S(this,ao)&&e!==S(this,gn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:S(this,gn),provider:e}),ne(this,gn,e),process.env.NODE_ENV!=="production"&&ne(this,ao,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),S(this,gn).setTimeout(e,t)}clearTimeout(e){S(this,gn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),S(this,gn).setInterval(e,t)}clearInterval(e){S(this,gn).clearInterval(e)}},gn=new WeakMap,ao=new WeakMap,Yg),ro=new tw;function nw(e){setTimeout(e,0)}var Co=typeof window>"u"||"Deno"in globalThis;function St(){}function rw(e,t){return typeof e=="function"?e(t):e}function uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function p0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function qt(e,t){return typeof e=="function"?e(t):e}function Rh(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==qf(s,t.options))return!1}else if(!_s(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Dh(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(_o(t.options.mutationKey)!==_o(i))return!1}else if(!_s(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qf(e,t){return((t==null?void 0:t.queryKeyHashFn)||_o)(e)}function _o(e){return JSON.stringify(e,(t,n)=>du(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function _s(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_s(e[n],t[n])):!1}var ow=Object.prototype.hasOwnProperty;function fu(e,t){if(e===t)return e;const n=Fh(e)&&Fh(t);if(!n&&!(du(e)&&du(t)))return t;const o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,a=n?new Array(s):{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c],f=e[u],d=t[u];if(f===d){a[u]=f,(n?c<o:ow.call(e,u))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[u]=d;continue}const h=fu(f,d);a[u]=h,h===f&&l++}return o===s&&l===o?e:a}function Va(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e){if(!jh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jh(e){return Object.prototype.toString.call(e)==="[object Object]"}function iw(e){return new Promise(t=>{ro.setTimeout(t,e)})}function hu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return fu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return fu(e,t)}return t}function sw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function aw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ya=Symbol();function m0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Ya&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ya?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vf(e,t){return typeof e=="function"?e(...t):!!e}function lw(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var lo,br,xi,Qg,cw=(Qg=class extends Ui{constructor(){super();fe(this,lo);fe(this,br);fe(this,xi);ne(this,xi,t=>{if(!Co&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,br)||this.setEventListener(S(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,br))==null||t.call(this),ne(this,br,void 0))}setEventListener(t){var n;ne(this,xi,t),(n=S(this,br))==null||n.call(this),ne(this,br,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,lo)!==t&&(ne(this,lo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,lo)=="boolean"?S(this,lo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lo=new WeakMap,br=new WeakMap,xi=new WeakMap,Qg),Yf=new cw;function pu(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var uw=nw;function fw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=uw;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ze=fw(),wi,vr,Ai,Gg,dw=(Gg=class extends Ui{constructor(){super();fe(this,wi,!0);fe(this,vr);fe(this,Ai);ne(this,Ai,t=>{if(!Co&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,vr)||this.setEventListener(S(this,Ai))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,vr))==null||t.call(this),ne(this,vr,void 0))}setEventListener(t){var n;ne(this,Ai,t),(n=S(this,vr))==null||n.call(this),ne(this,vr,t(this.setOnline.bind(this)))}setOnline(t){S(this,wi)!==t&&(ne(this,wi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,wi)}},wi=new WeakMap,vr=new WeakMap,Ai=new WeakMap,Gg),Qa=new dw;function hw(e){return Math.min(1e3*2**e,3e4)}function g0(e){return(e??"online")==="online"?Qa.isOnline():!0}var mu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function y0(e){let t=!1,n=0,r;const o=pu(),i=()=>o.status!=="pending",s=g=>{var m;if(!i()){const y=new mu(g);d(y),(m=e.onCancel)==null||m.call(e,y)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>Yf.isFocused()&&(e.networkMode==="always"||Qa.isOnline())&&e.canRun(),u=()=>g0(e.networkMode)&&e.canRun(),f=g=>{i()||(r==null||r(),o.resolve(g))},d=g=>{i()||(r==null||r(),o.reject(g))},h=()=>new Promise(g=>{var m;r=y=>{(i()||c())&&g(y)},(m=e.onPause)==null||m.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(i())return;let g;const m=n===0?e.initialPromise:void 0;try{g=m??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var C;if(i())return;const b=e.retry??(Co?0:3),v=e.retryDelay??hw,w=typeof v=="function"?v(n,y):v,A=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!A){d(y);return}n++,(C=e.onFail)==null||C.call(e,n,y),iw(w).then(()=>c()?void 0:h()).then(()=>{t?d(y):p()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():h().then(p),o)}}var co,Zg,b0=(Zg=class{constructor(){fe(this,co)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uu(this.gcTime)&&ne(this,co,ro.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co?1/0:300*1e3))}clearGcTimeout(){S(this,co)&&(ro.clearTimeout(S(this,co)),ne(this,co,void 0))}},co=new WeakMap,Zg),uo,ki,Ht,fo,tt,Us,ho,rn,$n,Jg,pw=(Jg=class extends b0{constructor(t){super();fe(this,rn);fe(this,uo);fe(this,ki);fe(this,Ht);fe(this,fo);fe(this,tt);fe(this,Us);fe(this,ho);ne(this,ho,!1),ne(this,Us,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,fo,t.client),ne(this,Ht,S(this,fo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,uo,$h(this.options)),this.state=t.state??S(this,uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,tt))==null?void 0:t.promise}setOptions(t){if(this.options={...S(this,Us),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=$h(this.options);n.data!==void 0&&(this.setState(zh(n.data,n.dataUpdatedAt)),ne(this,uo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ht).remove(this)}setData(t,n){const r=hu(this.state.data,t,this.options);return be(this,rn,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,rn,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=S(this,tt))==null?void 0:r.promise;return(o=S(this,tt))==null||o.cancel(t),n?n.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,uo))}isActive(){return this.observers.some(t=>qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ya||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!p0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,tt)&&(S(this,ho)?S(this,tt).cancel({revert:!0}):S(this,tt).cancelRetry()),this.scheduleGc()),S(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,rn,$n).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,f,d,h,p,g,m,y,b,v;if(this.state.fetchStatus!=="idle"&&((l=S(this,tt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,tt))return S(this,tt).continueRetry(),S(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(A=>A.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ne(this,ho,!0),r.signal)})},i=()=>{const w=m0(this.options,n),C=(()=>{const _={client:S(this,fo),queryKey:this.queryKey,meta:this.meta};return o(_),_})();return ne(this,ho,!1),this.options.persister?this.options.persister(w,C,this):w(C)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,fo),state:this.state,fetchFn:i};return o(w),w})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,ki,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&be(this,rn,$n).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),ne(this,tt,y0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof mu&&w.revert&&this.setState({...S(this,ki),fetchStatus:"idle"}),r.abort()},onFail:(w,A)=>{be(this,rn,$n).call(this,{type:"failed",failureCount:w,error:A})},onPause:()=>{be(this,rn,$n).call(this,{type:"pause"})},onContinue:()=>{be(this,rn,$n).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await S(this,tt).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(d=S(this,Ht).config).onSuccess)==null||h.call(d,w,this),(g=(p=S(this,Ht).config).onSettled)==null||g.call(p,w,this.state.error,this),w}catch(w){if(w instanceof mu){if(w.silent)return S(this,tt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw be(this,rn,$n).call(this,{type:"error",error:w}),(y=(m=S(this,Ht).config).onError)==null||y.call(m,w,this),(v=(b=S(this,Ht).config).onSettled)==null||v.call(b,this.state.data,w,this),w}finally{this.scheduleGc()}}},uo=new WeakMap,ki=new WeakMap,Ht=new WeakMap,fo=new WeakMap,tt=new WeakMap,Us=new WeakMap,ho=new WeakMap,rn=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...v0(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...zh(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,ki,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Ht).notify({query:this,type:"updated",action:t})})},Jg);function v0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $h(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Lt,Ce,Bs,_t,po,Ci,Hn,xr,Ws,_i,Ei,mo,go,wr,Si,Me,hs,gu,yu,bu,vu,xu,wu,Au,x0,Xg,mw=(Xg=class extends Ui{constructor(t,n){super();fe(this,Me);fe(this,Lt);fe(this,Ce);fe(this,Bs);fe(this,_t);fe(this,po);fe(this,Ci);fe(this,Hn);fe(this,xr);fe(this,Ws);fe(this,_i);fe(this,Ei);fe(this,mo);fe(this,go);fe(this,wr);fe(this,Si,new Set);this.options=n,ne(this,Lt,t),ne(this,xr,null),ne(this,Hn,pu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Ce).addObserver(this),Uh(S(this,Ce),this.options)?be(this,Me,hs).call(this):this.updateResult(),be(this,Me,vu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ku(S(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ku(S(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Me,xu).call(this),be(this,Me,wu).call(this),S(this,Ce).removeObserver(this)}setOptions(t){const n=this.options,r=S(this,Ce);if(this.options=S(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,S(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Me,Au).call(this),S(this,Ce).setOptions(this.options),n._defaulted&&!Va(this.options,n)&&S(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Ce),observer:this});const o=this.hasListeners();o&&Bh(S(this,Ce),r,this.options,n)&&be(this,Me,hs).call(this),this.updateResult(),o&&(S(this,Ce)!==r||qt(this.options.enabled,S(this,Ce))!==qt(n.enabled,S(this,Ce))||Nr(this.options.staleTime,S(this,Ce))!==Nr(n.staleTime,S(this,Ce)))&&be(this,Me,gu).call(this);const i=be(this,Me,yu).call(this);o&&(S(this,Ce)!==r||qt(this.options.enabled,S(this,Ce))!==qt(n.enabled,S(this,Ce))||i!==S(this,wr))&&be(this,Me,bu).call(this,i)}getOptimisticResult(t){const n=S(this,Lt).getQueryCache().build(S(this,Lt),t),r=this.createResult(n,t);return yw(this,r)&&(ne(this,_t,r),ne(this,Ci,this.options),ne(this,po,S(this,Ce).state)),r}getCurrentResult(){return S(this,_t)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,Hn).status==="pending"&&S(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){S(this,Si).add(t)}getCurrentQuery(){return S(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Lt).defaultQueryOptions(t),r=S(this,Lt).getQueryCache().build(S(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Me,hs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,_t)))}createResult(t,n){var N;const r=S(this,Ce),o=this.options,i=S(this,_t),s=S(this,po),a=S(this,Ci),c=t!==r?t.state:S(this,Bs),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const P=this.hasListeners(),I=!P&&Uh(t,n),W=P&&Bh(t,r,n,o);(I||W)&&(f={...f,...v0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:m}=f;h=f.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&m==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,y=!0):P=typeof n.placeholderData=="function"?n.placeholderData((N=S(this,Ei))==null?void 0:N.state.data,S(this,Ei)):n.placeholderData,P!==void 0&&(m="success",h=hu(i==null?void 0:i.data,P,n),d=!0)}if(n.select&&h!==void 0&&!y)if(i&&h===(s==null?void 0:s.data)&&n.select===S(this,Ws))h=S(this,_i);else try{ne(this,Ws,n.select),h=n.select(h),h=hu(i==null?void 0:i.data,h,n),ne(this,_i,h),ne(this,xr,null)}catch(P){ne(this,xr,P)}S(this,xr)&&(p=S(this,xr),h=S(this,_i),g=Date.now(),m="error");const b=f.fetchStatus==="fetching",v=m==="pending",w=m==="error",A=v&&b,C=h!==void 0,E={status:m,fetchStatus:f.fetchStatus,isPending:v,isSuccess:m==="success",isError:w,isInitialLoading:A,isLoading:A,data:h,dataUpdatedAt:f.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!v,isLoadingError:w&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&C,isStale:Qf(t,n),refetch:this.refetch,promise:S(this,Hn),isEnabled:qt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=j=>{E.status==="error"?j.reject(E.error):E.data!==void 0&&j.resolve(E.data)},I=()=>{const j=ne(this,Hn,E.promise=pu());P(j)},W=S(this,Hn);switch(W.status){case"pending":t.queryHash===r.queryHash&&P(W);break;case"fulfilled":(E.status==="error"||E.data!==W.value)&&I();break;case"rejected":(E.status!=="error"||E.error!==W.reason)&&I();break}}return E}updateResult(){const t=S(this,_t),n=this.createResult(S(this,Ce),this.options);if(ne(this,po,S(this,Ce).state),ne(this,Ci,this.options),S(this,po).data!==void 0&&ne(this,Ei,S(this,Ce)),Va(n,t))return;ne(this,_t,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!S(this,Si).size)return!0;const s=new Set(i??S(this,Si));return this.options.throwOnError&&s.add("error"),Object.keys(S(this,_t)).some(a=>{const l=a;return S(this,_t)[l]!==t[l]&&s.has(l)})};be(this,Me,x0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Me,vu).call(this)}},Lt=new WeakMap,Ce=new WeakMap,Bs=new WeakMap,_t=new WeakMap,po=new WeakMap,Ci=new WeakMap,Hn=new WeakMap,xr=new WeakMap,Ws=new WeakMap,_i=new WeakMap,Ei=new WeakMap,mo=new WeakMap,go=new WeakMap,wr=new WeakMap,Si=new WeakMap,Me=new WeakSet,hs=function(t){be(this,Me,Au).call(this);let n=S(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(St)),n},gu=function(){be(this,Me,xu).call(this);const t=Nr(this.options.staleTime,S(this,Ce));if(Co||S(this,_t).isStale||!uu(t))return;const r=p0(S(this,_t).dataUpdatedAt,t)+1;ne(this,mo,ro.setTimeout(()=>{S(this,_t).isStale||this.updateResult()},r))},yu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Ce)):this.options.refetchInterval)??!1},bu=function(t){be(this,Me,wu).call(this),ne(this,wr,t),!(Co||qt(this.options.enabled,S(this,Ce))===!1||!uu(S(this,wr))||S(this,wr)===0)&&ne(this,go,ro.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&be(this,Me,hs).call(this)},S(this,wr)))},vu=function(){be(this,Me,gu).call(this),be(this,Me,bu).call(this,be(this,Me,yu).call(this))},xu=function(){S(this,mo)&&(ro.clearTimeout(S(this,mo)),ne(this,mo,void 0))},wu=function(){S(this,go)&&(ro.clearInterval(S(this,go)),ne(this,go,void 0))},Au=function(){const t=S(this,Lt).getQueryCache().build(S(this,Lt),this.options);if(t===S(this,Ce))return;const n=S(this,Ce);ne(this,Ce,t),ne(this,Bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},x0=function(t){Ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,_t))}),S(this,Lt).getQueryCache().notify({query:S(this,Ce),type:"observerResultsUpdated"})})},Xg);function gw(e,t){return qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Uh(e,t){return gw(e,t)||e.state.data!==void 0&&ku(e,t,t.refetchOnMount)}function ku(e,t,n){if(qt(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qf(e,t)}return!1}function Bh(e,t,n,r){return(e!==t||qt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qf(e,n)}function Qf(e,t){return qt(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function yw(e,t){return!Va(e.getCurrentResult(),t)}function Wh(e){return{onFetch:(t,n)=>{var u,f,d,h,p;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const m=v=>{lw(v,()=>t.signal,()=>g=!0)},y=m0(t.options,t.fetchOptions),b=async(v,w,A)=>{if(g)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const _=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:A?"backward":"forward",meta:t.options.meta};return m(I),I})(),E=await y(_),{maxPages:N}=t.options,P=A?aw:sw;return{pages:P(v.pages,E,N),pageParams:P(v.pageParams,w,N)}};if(o&&i.length){const v=o==="backward",w=v?bw:Kh,A={pages:i,pageParams:s},C=w(r,A);a=await b(A,C,v)}else{const v=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:Kh(r,a);if(l>0&&w==null)break;a=await b(a,w),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var g,m;return(m=(g=t.options).persister)==null?void 0:m.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function bw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ks,yn,Et,yo,bn,mr,e0,vw=(e0=class extends b0{constructor(t){super();fe(this,bn);fe(this,Ks);fe(this,yn);fe(this,Et);fe(this,yo);ne(this,Ks,t.client),this.mutationId=t.mutationId,ne(this,Et,t.mutationCache),ne(this,yn,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,yn).includes(t)||(S(this,yn).push(t),this.clearGcTimeout(),S(this,Et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,yn,S(this,yn).filter(n=>n!==t)),this.scheduleGc(),S(this,Et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,yn).length||(this.state.status==="pending"?this.scheduleGc():S(this,Et).remove(this))}continue(){var t;return((t=S(this,yo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,c,u,f,d,h,p,g,m,y,b,v,w,A,C,_,E,N;const n=()=>{be(this,bn,mr).call(this,{type:"continue"})},r={client:S(this,Ks),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,yo,y0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{be(this,bn,mr).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{be(this,bn,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Et).canRun(this)}));const o=this.state.status==="pending",i=!S(this,yo).canStart();try{if(o)n();else{be(this,bn,mr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=S(this,Et).config).onMutate)==null?void 0:a.call(s,t,this,r));const I=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));I!==this.state.context&&be(this,bn,mr).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const P=await S(this,yo).start();return await((f=(u=S(this,Et).config).onSuccess)==null?void 0:f.call(u,P,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,P,t,this.state.context,r)),await((g=(p=S(this,Et).config).onSettled)==null?void 0:g.call(p,P,null,this.state.variables,this.state.context,this,r)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,P,null,t,this.state.context,r)),be(this,bn,mr).call(this,{type:"success",data:P}),P}catch(P){try{await((v=(b=S(this,Et).config).onError)==null?void 0:v.call(b,P,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((A=(w=this.options).onError)==null?void 0:A.call(w,P,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((_=(C=S(this,Et).config).onSettled)==null?void 0:_.call(C,void 0,P,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((N=(E=this.options).onSettled)==null?void 0:N.call(E,void 0,P,t,this.state.context,r))}catch(I){Promise.reject(I)}throw be(this,bn,mr).call(this,{type:"error",error:P}),P}finally{S(this,Et).runNext(this)}}},Ks=new WeakMap,yn=new WeakMap,Et=new WeakMap,yo=new WeakMap,bn=new WeakSet,mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ze.batch(()=>{S(this,yn).forEach(r=>{r.onMutationUpdate(t)}),S(this,Et).notify({mutation:this,type:"updated",action:t})})},e0);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,on,Hs,t0,xw=(t0=class extends Ui{constructor(t={}){super();fe(this,qn);fe(this,on);fe(this,Hs);this.config=t,ne(this,qn,new Set),ne(this,on,new Map),ne(this,Hs,0)}build(t,n,r){const o=new vw({client:t,mutationCache:this,mutationId:++ca(this,Hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){S(this,qn).add(t);const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n);r?r.push(t):S(this,on).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,qn).delete(t)){const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&S(this,on).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=da(t);if(typeof n=="string"){const o=(r=S(this,on).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{S(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,qn).clear(),S(this,on).clear()})}getAll(){return Array.from(S(this,qn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dh(n,r))}findAll(t={}){return this.getAll().filter(n=>Dh(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(St))))}},qn=new WeakMap,on=new WeakMap,Hs=new WeakMap,t0);function da(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vn,Ar,Rt,Yn,Jn,Ma,Cu,n0,ww=(n0=class extends Ui{constructor(n,r){super();fe(this,Jn);fe(this,Vn);fe(this,Ar);fe(this,Rt);fe(this,Yn);ne(this,Vn,n),this.setOptions(r),this.bindMethods(),be(this,Jn,Ma).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=S(this,Vn).defaultMutationOptions(n),Va(this.options,r)||S(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&_o(r.mutationKey)!==_o(this.options.mutationKey)?this.reset():((o=S(this,Rt))==null?void 0:o.state.status)==="pending"&&S(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=S(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,Jn,Ma).call(this),be(this,Jn,Cu).call(this,n)}getCurrentResult(){return S(this,Ar)}reset(){var n;(n=S(this,Rt))==null||n.removeObserver(this),ne(this,Rt,void 0),be(this,Jn,Ma).call(this),be(this,Jn,Cu).call(this)}mutate(n,r){var o;return ne(this,Yn,r),(o=S(this,Rt))==null||o.removeObserver(this),ne(this,Rt,S(this,Vn).getMutationCache().build(S(this,Vn),this.options)),S(this,Rt).addObserver(this),S(this,Rt).execute(n)}},Vn=new WeakMap,Ar=new WeakMap,Rt=new WeakMap,Yn=new WeakMap,Jn=new WeakSet,Ma=function(){var r;const n=((r=S(this,Rt))==null?void 0:r.state)??w0();ne(this,Ar,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Cu=function(n){Ze.batch(()=>{var r,o,i,s,a,l,c,u;if(S(this,Yn)&&this.hasListeners()){const f=S(this,Ar).variables,d=S(this,Ar).context,h={client:S(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=S(this,Yn)).onSuccess)==null||o.call(r,n.data,f,d,h)}catch(p){Promise.reject(p)}try{(s=(i=S(this,Yn)).onSettled)==null||s.call(i,n.data,null,f,d,h)}catch(p){Promise.reject(p)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=S(this,Yn)).onError)==null||l.call(a,n.error,f,d,h)}catch(p){Promise.reject(p)}try{(u=(c=S(this,Yn)).onSettled)==null||u.call(c,void 0,n.error,f,d,h)}catch(p){Promise.reject(p)}}}this.listeners.forEach(f=>{f(S(this,Ar))})})},n0),vn,r0,Aw=(r0=class extends Ui{constructor(t={}){super();fe(this,vn);this.config=t,ne(this,vn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??qf(o,n);let s=this.get(i);return s||(s=new pw({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){S(this,vn).has(t.queryHash)||(S(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,vn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,vn).get(t)}getAll(){return[...S(this,vn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rh(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,r0),Ke,kr,Cr,Ti,Ni,_r,Oi,Pi,o0,A0=(o0=class{constructor(e={}){fe(this,Ke);fe(this,kr);fe(this,Cr);fe(this,Ti);fe(this,Ni);fe(this,_r);fe(this,Oi);fe(this,Pi);ne(this,Ke,e.queryCache||new Aw),ne(this,kr,e.mutationCache||new xw),ne(this,Cr,e.defaultOptions||{}),ne(this,Ti,new Map),ne(this,Ni,new Map),ne(this,_r,0)}mount(){ca(this,_r)._++,S(this,_r)===1&&(ne(this,Oi,Yf.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ke).onFocus())})),ne(this,Pi,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ke).onOnline())})))}unmount(){var e,t;ca(this,_r)._--,S(this,_r)===0&&((e=S(this,Oi))==null||e.call(this),ne(this,Oi,void 0),(t=S(this,Pi))==null||t.call(this),ne(this,Pi,void 0))}isFetching(e){return S(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,kr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return S(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=S(this,Ke).get(r.queryHash),i=o==null?void 0:o.state.data,s=rw(t,i);if(s!==void 0)return S(this,Ke).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>S(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Ke);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Ke);return Ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ze.batch(()=>S(this,Ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(St).catch(St)}invalidateQueries(e,t={}){return Ze.batch(()=>(S(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ze.batch(()=>S(this,Ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(St)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Ke).build(this,t);return n.isStaleByTime(Nr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}fetchInfiniteQuery(e){return e.behavior=Wh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(St).catch(St)}ensureInfiniteQueryData(e){return e.behavior=Wh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qa.isOnline()?S(this,kr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ke)}getMutationCache(){return S(this,kr)}getDefaultOptions(){return S(this,Cr)}setDefaultOptions(e){ne(this,Cr,e)}setQueryDefaults(e,t){S(this,Ti).set(_o(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ti).values()],n={};return t.forEach(r=>{_s(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ni).set(_o(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ni).values()],n={};return t.forEach(r=>{_s(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Cr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ya&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ke).clear(),S(this,kr).clear()}},Ke=new WeakMap,kr=new WeakMap,Cr=new WeakMap,Ti=new WeakMap,Ni=new WeakMap,_r=new WeakMap,Oi=new WeakMap,Pi=new WeakMap,o0),k0=k.createContext(void 0),C0=e=>{const t=k.useContext(k0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kw=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(k0.Provider,{value:e,children:t})),_0=k.createContext(!1),Cw=()=>k.useContext(_0);_0.Provider;function _w(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ew=k.createContext(_w()),Sw=()=>k.useContext(Ew),Tw=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Vf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Nw=e=>{k.useEffect(()=>{e.clearReset()},[e])},Ow=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Vf(n,[e.error,r])),Pw=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mw=(e,t)=>e.isLoading&&e.isFetching&&!t,Iw=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lw(e,t,n){var d,h,p,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Cw(),o=Sw(),i=C0(n),s=i.defaultQueryOptions(e);(h=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,s);const a=i.getQueryCache().get(s.queryHash);process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=r?"isRestoring":"optimistic",Pw(s),Tw(s,o,a),Nw(o);const l=!i.getQueryCache().get(s.queryHash),[c]=k.useState(()=>new t(i,s)),u=c.getOptimisticResult(s),f=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(m=>{const y=f?c.subscribe(Ze.batchCalls(m)):St;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),k.useEffect(()=>{c.setOptions(s)},[s,c]),Iw(s,u))throw Hh(s,c,o);if(Ow({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw u.error;if((g=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,s,u),s.experimental_prefetchInRender&&!Co&&Mw(u,r)){const m=l?Hh(s,c,o):a==null?void 0:a.promise;m==null||m.catch(St).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function kl(e,t){return Lw(e,mw,t)}function Gf(e,t){const n=C0(t),[r]=k.useState(()=>new ww(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(s=>r.subscribe(Ze.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=k.useCallback((s,a)=>{r.mutate(s,a).catch(St)},[r]);if(o.error&&Vf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const Zf=T.createContext({queryClient:new A0});Zf.Provider;const jr=()=>{const e=T.useContext(Zf);if(!e)throw new Error("useConfidenceContext must be used within a ConfidenceContext");return e},E0=({children:e})=>{const[t]=T.useState(new A0);return x.jsx(Zf.Provider,{value:{queryClient:t},children:x.jsx(kw,{client:t,children:e})})},Be={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},S0="https://marketplace.confidence.com/api",rr=S0+"/confidence",qh=S0+"/dropbox/prod",Rw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Dw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>Rw(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},Fw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},jw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>await Fw(r)},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},T0=(e,t)=>{const{queryClient:n}=jr(),r=kl({initialData:{},queryFn:()=>n.getQueryData(["PLAYBOOK_EXPANDED_TASKS",+e]),queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),o=a=>{var l;return((l=r.data)==null?void 0:l[a.toString()])??!1},i=(a,l)=>{var c;n.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[a]:l!==void 0?l:!o(a)})),(c=t==null?void 0:t.onTaskExpanded)==null||c.call(t,a,o(a))},s=T.useMemo(()=>Object.values(r.data??{}).some(a=>a),[r.data]);return{isTaskExpanded:o,toggleTaskExpanded:i,isAtLeastOneTaskExpanded:s}},zw=(e,t)=>{const{queryClient:n}=jr(),{completeTask:r}=Dw(),{startTask:o}=jw(),{toggleTaskExpanded:i}=T0(e);return{completeTask:async(l,c)=>{const{status:u}=await r(l.toString());u&&(i(l,!1),n.setQueryData(["playbook",+e],f=>{if(!f)return f;const d=f.tasks.map(h=>h.sequenceOrder===c+1&&t.quickComplete?{...h,workflowStatus:Be.IN_PROGRESS}:h.taskInstanceId===l?{...h,workflowStatus:u}:h);return{...f,tasks:d}}))},startTask:async l=>{const{status:c}=await o(l.toString());c&&(i(l,!0),n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(d=>d.taskInstanceId===l?{...d,workflowStatus:c}:d);return{...u,tasks:f}}))}}},$w=e=>{var o;const{queryClient:t}=jr(),n=kl({queryFn:async()=>{const i=new Headers,s=await fetch(`${rr}/playbook-details`,{method:"POST",cache:"no-store",headers:i,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]},t),r=zw(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},ui={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE",ADD_COMMENT:"ADD_COMMENT"},Uw={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},Bw=e=>{const{taskStatus:t,canStart:n}=e;return{buttons:T.useMemo(()=>t===Be.OPEN&&n?[ui.START]:t===Be.IN_PROGRESS?[ui.PAUSE,ui.COMPLETE]:t===Be.COMPLETED?[]:[],[e.taskStatus,e.canStart])}},N0=async e=>{const t=new Headers;return t.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()},Cl='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{:root,:host{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-regular:normal 400 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-light:normal 300 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-thin:normal 100 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-regular:normal 400 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-light:normal 300 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-thin:normal 100 1em/1 "Font Awesome 6 Sharp Duotone"}svg.svg-inline--fa:not(:root),svg.svg-inline--fa:not(:host){box-sizing:content-box;overflow:visible}.svg-inline--fa{display:var(--fa-display,inline-block);vertical-align:-.125em;height:1em;overflow:visible}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.07143em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fa-layers-counter,.fa-layers-text{text-align:center;display:inline-block;position:absolute}.fa-layers{text-align:center;vertical-align:-.125em;width:1em;height:1em;display:inline-block;position:relative}.fa-layers svg.svg-inline--fa{transform-origin:50%}.fa-layers-text{transform-origin:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:100% 0;overflow:hidden}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 100%;top:auto}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 100%;top:auto;right:auto}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 0}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 0}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{vertical-align:.225em;font-size:.625em;line-height:.1em}.fa-xs{vertical-align:.125em;font-size:.75em;line-height:.08333em}.fa-sm{vertical-align:.05357em;font-size:.875em;line-height:.07143em}.fa-lg{vertical-align:-.075em;font-size:1.25em;line-height:.05em}.fa-xl{vertical-align:-.125em;font-size:1.5em;line-height:.04167em}.fa-2xl{vertical-align:-.1875em;font-size:2em;line-height:.03125em}.fa-fw{text-align:center;width:1.25em}.fa-ul{margin-left:var(--fa-li-margin,2.5em);padding-left:0;list-style-type:none}.fa-ul>li{position:relative}.fa-li{left:calc(-1*var(--fa-li-width,2em));text-align:center;width:var(--fa-li-width,2em);line-height:inherit;position:absolute}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media(prefers-reduced-motion:reduce){.fa-beat,.fa-bounce,.fa-fade,.fa-beat-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-iteration-count:1;animation-delay:-1ms}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1)translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9))translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1))translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95))translateY(0)}57%{transform:scale(1)translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1)translateY(0)}to{transform:scale(1)translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,to{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}8%,24%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}40%,to{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{vertical-align:middle;width:2.5em;height:2em;display:inline-block;position:relative}.fa-stack-1x,.fa-stack-2x{z-index:var(--fa-stack-z-index,auto);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.svg-inline--fa.fa-stack-1x{width:1.25em;height:1em}.svg-inline--fa.fa-stack-2x{width:2.5em;height:2em}.fa-inverse{color:var(--fa-inverse,#fff)}.sr-only,.fa-sr-only,.sr-only-focusable:not(:focus),.fa-sr-only-focusable:not(:focus){clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer base{.confidence-playbook,.confidence-playbook *,.confidence-playbook :after,.confidence-playbook :before,.confidence-playbook ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.confidence-playbook hr{height:0;color:inherit;border-top-width:1px}.confidence-playbook abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.confidence-playbook h1,.confidence-playbook h2,.confidence-playbook h3,.confidence-playbook h4,.confidence-playbook h5,.confidence-playbook h6{font-size:inherit;font-weight:inherit}.confidence-playbook a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.confidence-playbook b,.confidence-playbook strong{font-weight:bolder}.confidence-playbook code,.confidence-playbook kbd,.confidence-playbook samp,.confidence-playbook pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.confidence-playbook small{font-size:80%}.confidence-playbook sub,.confidence-playbook sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.confidence-playbook sub{bottom:-.25em}.confidence-playbook sup{top:-.5em}.confidence-playbook table{text-indent:0;border-color:inherit;border-collapse:collapse}.confidence-playbook :-moz-focusring{outline:auto}.confidence-playbook progress{vertical-align:baseline}.confidence-playbook summary{display:list-item}.confidence-playbook ol,.confidence-playbook ul,.confidence-playbook menu{list-style:none}.confidence-playbook img,.confidence-playbook svg,.confidence-playbook video,.confidence-playbook canvas,.confidence-playbook audio,.confidence-playbook iframe,.confidence-playbook embed,.confidence-playbook object{vertical-align:middle;display:block}.confidence-playbook img,.confidence-playbook video{max-width:100%;height:auto}.confidence-playbook button,.confidence-playbook input,.confidence-playbook select,.confidence-playbook optgroup,.confidence-playbook textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.confidence-playbook :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.confidence-playbook ::file-selector-button{margin-inline-end:4px}.confidence-playbook ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.confidence-playbook ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.confidence-playbook ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.confidence-playbook textarea{resize:vertical}.confidence-playbook ::-webkit-search-decoration{-webkit-appearance:none}.confidence-playbook ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.confidence-playbook ::-webkit-datetime-edit{display:inline-flex}.confidence-playbook ::-webkit-datetime-edit-fields-wrapper{padding:0}.confidence-playbook ::-webkit-datetime-edit{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-year-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-month-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-day-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-hour-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-minute-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-second-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-millisecond-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-meridiem-field{padding-block:0}.confidence-playbook ::-webkit-calendar-picker-indicator{line-height:1}.confidence-playbook :-moz-ui-invalid{box-shadow:none}.confidence-playbook button,.confidence-playbook input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::-webkit-inner-spin-button{height:auto}.confidence-playbook ::-webkit-outer-spin-button{height:auto}.confidence-playbook [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.confidence-playbook .pointer-events-none{pointer-events:none}.confidence-playbook .absolute{position:absolute}.confidence-playbook .fixed{position:fixed}.confidence-playbook .relative{position:relative}.confidence-playbook .sticky{position:sticky}.confidence-playbook .inset-0{inset:calc(var(--spacing)*0)}.confidence-playbook .top-0{top:calc(var(--spacing)*0)}.confidence-playbook .top-0\\.5{top:calc(var(--spacing)*.5)}.confidence-playbook .top-1{top:calc(var(--spacing)*1)}.confidence-playbook .top-3{top:calc(var(--spacing)*3)}.confidence-playbook .-right-0,.confidence-playbook .right-0{right:calc(var(--spacing)*0)}.confidence-playbook .bottom-0{bottom:calc(var(--spacing)*0)}.confidence-playbook .bottom-2{bottom:calc(var(--spacing)*2)}.confidence-playbook .-left-9{left:calc(var(--spacing)*-9)}.confidence-playbook .left-0{left:calc(var(--spacing)*0)}.confidence-playbook .left-1{left:calc(var(--spacing)*1)}.confidence-playbook .left-1\\/2{left:50%}.confidence-playbook .left-4{left:calc(var(--spacing)*4)}.confidence-playbook .z-2{z-index:2}.confidence-playbook .z-10{z-index:10}.confidence-playbook .z-50{z-index:50}.confidence-playbook .z-\\[9999999997\\],.confidence-playbook .z-\\[9999999998\\],.confidence-playbook .z-\\[9999999999\\]{z-index:2147483647}.confidence-playbook .container{width:100%}@media(min-width:40rem){.confidence-playbook .container{max-width:40rem}}@media(min-width:48rem){.confidence-playbook .container{max-width:48rem}}@media(min-width:64rem){.confidence-playbook .container{max-width:64rem}}@media(min-width:80rem){.confidence-playbook .container{max-width:80rem}}@media(min-width:96rem){.confidence-playbook .container{max-width:96rem}}.confidence-playbook .m-0{margin:calc(var(--spacing)*0)}.confidence-playbook .mx-1{margin-inline:calc(var(--spacing)*1)}.confidence-playbook .mx-2{margin-inline:calc(var(--spacing)*2)}.confidence-playbook .mx-4{margin-inline:calc(var(--spacing)*4)}.confidence-playbook .mx-auto{margin-inline:auto}.confidence-playbook .my-1{margin-block:calc(var(--spacing)*1)}.confidence-playbook .my-2{margin-block:calc(var(--spacing)*2)}.confidence-playbook .-mt-\\[1px\\]{margin-top:-1px}.confidence-playbook .mt-0{margin-top:calc(var(--spacing)*0)}.confidence-playbook .mt-3{margin-top:calc(var(--spacing)*3)}.confidence-playbook .mr-2{margin-right:calc(var(--spacing)*2)}.confidence-playbook .-mb-3{margin-bottom:calc(var(--spacing)*-3)}.confidence-playbook .mb-1{margin-bottom:calc(var(--spacing)*1)}.confidence-playbook .mb-2{margin-bottom:calc(var(--spacing)*2)}.confidence-playbook .mb-4{margin-bottom:calc(var(--spacing)*4)}.confidence-playbook .ml-2{margin-left:calc(var(--spacing)*2)}.confidence-playbook .block{display:block}.confidence-playbook .flex{display:flex}.confidence-playbook .hidden{display:none}.confidence-playbook .inline-flex{display:inline-flex}.confidence-playbook .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.confidence-playbook .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.confidence-playbook .h-2{height:calc(var(--spacing)*2)}.confidence-playbook .h-3{height:calc(var(--spacing)*3)}.confidence-playbook .h-4{height:calc(var(--spacing)*4)}.confidence-playbook .h-16{height:calc(var(--spacing)*16)}.confidence-playbook .h-\\[18px\\]{height:18px}.confidence-playbook .h-\\[20px\\]{height:20px}.confidence-playbook .h-\\[22px\\]{height:22px}.confidence-playbook .h-\\[24px\\]{height:24px}.confidence-playbook .h-\\[30px\\]{height:30px}.confidence-playbook .h-\\[38px\\]{height:38px}.confidence-playbook .h-\\[40px\\]{height:40px}.confidence-playbook .h-\\[75px\\]{height:75px}.confidence-playbook .h-\\[100vh\\]{height:100vh}.confidence-playbook .h-\\[110px\\]{height:110px}.confidence-playbook .h-full{height:100%}.confidence-playbook .min-h-16{min-height:calc(var(--spacing)*16)}.confidence-playbook .min-h-screen{min-height:100vh}.confidence-playbook .w-1\\/3{width:33.3333%}.confidence-playbook .w-3{width:calc(var(--spacing)*3)}.confidence-playbook .w-4{width:calc(var(--spacing)*4)}.confidence-playbook .w-\\[20px\\]{width:20px}.confidence-playbook .w-\\[27px\\]{width:27px}.confidence-playbook .w-\\[38px\\]{width:38px}.confidence-playbook .w-\\[75px\\]{width:75px}.confidence-playbook .w-\\[400px\\]{width:400px}.confidence-playbook .w-\\[calc\\(100vw-1rem\\)\\]{width:calc(100vw - 1rem)}.confidence-playbook .w-full{width:100%}.confidence-playbook .w-screen{width:100vw}.confidence-playbook .max-w-400{max-width:calc(var(--spacing)*400)}.confidence-playbook .max-w-\\[300px\\]{max-width:300px}.confidence-playbook .max-w-\\[420px\\]{max-width:420px}.confidence-playbook .max-w-lg{max-width:var(--container-lg)}.confidence-playbook .max-w-md{max-width:var(--container-md)}.confidence-playbook .min-w-0{min-width:calc(var(--spacing)*0)}.confidence-playbook .min-w-\\[106px\\]{min-width:106px}.confidence-playbook .min-w-\\[140px\\]{min-width:140px}.confidence-playbook .min-w-\\[160px\\]{min-width:160px}.confidence-playbook .min-w-\\[172px\\]{min-width:172px}.confidence-playbook .min-w-\\[270px\\]{min-width:270px}.confidence-playbook .min-w-fit{min-width:fit-content}.confidence-playbook .flex-1{flex:1}.confidence-playbook .flex-shrink-0{flex-shrink:0}.confidence-playbook .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .rotate-180{rotate:180deg}.confidence-playbook .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.confidence-playbook .animate-progress{animation:1.5s ease-in-out infinite progress}.confidence-playbook .animate-pulse{animation:var(--animate-pulse)}.confidence-playbook .animate-spin{animation:var(--animate-spin)}.confidence-playbook .cursor-not-allowed{cursor:not-allowed}.confidence-playbook .cursor-pointer{cursor:pointer}.confidence-playbook .cursor-zoom-in{cursor:zoom-in}.confidence-playbook .resize{resize:both}.confidence-playbook .list-decimal{list-style-type:decimal}.confidence-playbook .list-disc{list-style-type:disc}.confidence-playbook .flex-col{flex-direction:column}.confidence-playbook .flex-wrap{flex-wrap:wrap}.confidence-playbook .items-center{align-items:center}.confidence-playbook .items-start{align-items:flex-start}.confidence-playbook .items-stretch{align-items:stretch}.confidence-playbook .justify-between{justify-content:space-between}.confidence-playbook .justify-center{justify-content:center}.confidence-playbook .justify-end{justify-content:flex-end}.confidence-playbook .justify-start{justify-content:flex-start}.confidence-playbook .gap-1{gap:calc(var(--spacing)*1)}.confidence-playbook .gap-2{gap:calc(var(--spacing)*2)}.confidence-playbook .gap-3{gap:calc(var(--spacing)*3)}.confidence-playbook .gap-4{gap:calc(var(--spacing)*4)}:where(.confidence-playbook .space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.confidence-playbook .space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.confidence-playbook .space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.confidence-playbook .divide-black\\/10>:not(:last-child)){border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)}:where(.confidence-playbook .divide-gray-100>:not(:last-child)){border-color:#ebedef}.confidence-playbook .self-end{align-self:flex-end}.confidence-playbook .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.confidence-playbook .overflow-hidden{overflow:hidden}.confidence-playbook .overflow-x-hidden{overflow-x:hidden}.confidence-playbook .overflow-y-auto{overflow-y:auto}.confidence-playbook .rounded{border-radius:.25rem}.confidence-playbook .rounded-full{border-radius:3.40282e38px}.confidence-playbook .rounded-lg{border-radius:var(--radius-lg)}.confidence-playbook .rounded-md{border-radius:var(--radius-md)}.confidence-playbook .rounded-none{border-radius:0}.confidence-playbook .rounded-sm{border-radius:var(--radius-sm)}.confidence-playbook .rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.confidence-playbook .rounded-l-sm{border-top-left-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.confidence-playbook .rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.confidence-playbook .border{border-style:var(--tw-border-style);border-width:1px}.confidence-playbook .border-0{border-style:var(--tw-border-style);border-width:0}.confidence-playbook .border-2{border-style:var(--tw-border-style);border-width:2px}.confidence-playbook .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.confidence-playbook .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.confidence-playbook .border-l-1{border-left-style:var(--tw-border-style);border-left-width:1px}.confidence-playbook .border-l-3{border-left-style:var(--tw-border-style);border-left-width:3px}.confidence-playbook .border-none{--tw-border-style:none;border-style:none}.confidence-playbook .border-\\[\\#94C8FF\\]{border-color:#94c8ff}.confidence-playbook .border-\\[\\#A5DAB1\\]{border-color:#a5dab1}.confidence-playbook .border-\\[\\#C1C5C8\\]{border-color:#c1c5c8}.confidence-playbook .border-black\\/10{border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)}.confidence-playbook .border-danger-200{border-color:#f0aab1}.confidence-playbook .border-danger-500{border-color:#dc3545}.confidence-playbook .border-gray-50{border-color:#f5f6f7}.confidence-playbook .border-gray-100{border-color:#ebedef}.confidence-playbook .border-gray-200{border-color:#ced1d6}.confidence-playbook .border-gray-300{border-color:#b0b5bd}.confidence-playbook .border-gray-400{border-color:#757e8c}.confidence-playbook .border-gray-700{border-color:#2c3544}.confidence-playbook .border-gray-800{border-color:#232b37}.confidence-playbook .border-info-500{border-color:#17a2b8}.confidence-playbook .border-orange-500{border-color:#ff7800}.confidence-playbook .border-primary-200{border-color:#94c8ff}.confidence-playbook .border-primary-600{border-color:#0069d9}.confidence-playbook .border-purple-500{border-color:#a855f7}.confidence-playbook .border-red-500{border-color:var(--color-red-500)}.confidence-playbook .border-secondary-500{border-color:#6c757d}.confidence-playbook .border-secondary-600{border-color:#5a6268}.confidence-playbook .border-steel-500{border-color:#556987}.confidence-playbook .border-success-200{border-color:#a5dab1}.confidence-playbook .border-success-600{border-color:#218838}.confidence-playbook .border-warning-200{border-color:#ffe597}.confidence-playbook .border-warning-500{border-color:#ffc107}.confidence-playbook .border-white{border-color:#fff}.confidence-playbook .border-t-blue-500{border-top-color:var(--color-blue-500)}.confidence-playbook .border-l-danger-500{border-left-color:#dc3545}.confidence-playbook .border-l-primary-500{border-left-color:#007bff}.confidence-playbook .border-l-success-500{border-left-color:#28a745}.confidence-playbook .border-l-warning-500{border-left-color:#ffc107}.confidence-playbook .bg-\\[\\#E6F2FF\\]{background-color:#e6f2ff}.confidence-playbook .bg-\\[\\#EAF6EC\\]{background-color:#eaf6ec}.confidence-playbook .bg-\\[\\#F0F1F2\\]{background-color:#f0f1f2}.confidence-playbook .bg-\\[\\#FFE600\\]{background-color:#ffe600}.confidence-playbook .bg-black\\/30{background-color:oklab(0% none none/.3)}.confidence-playbook .bg-blue-500{background-color:var(--color-blue-500)}.confidence-playbook .bg-danger-100{background-color:#f6ccd0}.confidence-playbook .bg-danger-500{background-color:#dc3545}.confidence-playbook .bg-dark{background-color:#1c232d}.confidence-playbook .bg-fiserv-orange-500{background-color:#f60}.confidence-playbook .bg-gray-50{background-color:#f5f6f7}.confidence-playbook .bg-gray-100{background-color:#ebedef}.confidence-playbook .bg-gray-200{background-color:#ced1d6}.confidence-playbook .bg-gray-400{background-color:#757e8c}.confidence-playbook .bg-gray-500{background-color:#3a475b}.confidence-playbook .bg-gray-800{background-color:#232b37}.confidence-playbook .bg-gray-900{background-color:#1c232d}.confidence-playbook .bg-info-500{background-color:#17a2b8}.confidence-playbook .bg-orange-500{background-color:#ff7800}.confidence-playbook .bg-primary-100{background-color:#bfdeff}.confidence-playbook .bg-primary-600{background-color:#0069d9}.confidence-playbook .bg-primary-800{background-color:#0054af}.confidence-playbook .bg-purple-500{background-color:#a855f7}.confidence-playbook .bg-secondary-500{background-color:#6c757d}.confidence-playbook .bg-steel-500{background-color:#556987}.confidence-playbook .bg-success-100{background-color:#c9e9d0}.confidence-playbook .bg-success-500{background-color:#28a745}.confidence-playbook .bg-success-600{background-color:#218838}.confidence-playbook .bg-warning-100{background-color:#ffefc1}.confidence-playbook .bg-warning-500{background-color:#ffc107}.confidence-playbook .bg-white{background-color:#fff}.confidence-playbook .bg-yellow{background-color:#ffe600}.confidence-playbook .object-contain{object-fit:contain}.confidence-playbook .object-cover{object-fit:cover}.confidence-playbook .object-center{object-position:center}.confidence-playbook .p-1{padding:calc(var(--spacing)*1)}.confidence-playbook .p-2{padding:calc(var(--spacing)*2)}.confidence-playbook .p-3{padding:calc(var(--spacing)*3)}.confidence-playbook .p-4{padding:calc(var(--spacing)*4)}.confidence-playbook .px-0{padding-inline:calc(var(--spacing)*0)}.confidence-playbook .px-1{padding-inline:calc(var(--spacing)*1)}.confidence-playbook .px-2{padding-inline:calc(var(--spacing)*2)}.confidence-playbook .px-3{padding-inline:calc(var(--spacing)*3)}.confidence-playbook .px-4{padding-inline:calc(var(--spacing)*4)}.confidence-playbook .px-\\[2px\\]{padding-inline:2px}.confidence-playbook .py-1{padding-block:calc(var(--spacing)*1)}.confidence-playbook .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.confidence-playbook .py-2{padding-block:calc(var(--spacing)*2)}.confidence-playbook .py-4{padding-block:calc(var(--spacing)*4)}.confidence-playbook .pt-2{padding-top:calc(var(--spacing)*2)}.confidence-playbook .pr-2{padding-right:calc(var(--spacing)*2)}.confidence-playbook .pb-1{padding-bottom:calc(var(--spacing)*1)}.confidence-playbook .pb-2{padding-bottom:calc(var(--spacing)*2)}.confidence-playbook .pb-\\[102px\\]{padding-bottom:102px}.confidence-playbook .pl-4{padding-left:calc(var(--spacing)*4)}.confidence-playbook .text-center{text-align:center}.confidence-playbook .text-left{text-align:left}.confidence-playbook .font-mono{font-family:var(--font-mono)}.confidence-playbook .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.confidence-playbook .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.confidence-playbook .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.confidence-playbook .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.confidence-playbook .text-sm\\/6{font-size:var(--text-sm);line-height:calc(var(--spacing)*6)}.confidence-playbook .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.confidence-playbook .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.confidence-playbook .text-\\[10px\\]{font-size:10px}.confidence-playbook .leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.confidence-playbook .leading-\\[22px\\]{--tw-leading:22px;line-height:22px}.confidence-playbook .leading-\\[24px\\]{--tw-leading:24px;line-height:24px}.confidence-playbook .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.confidence-playbook .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.confidence-playbook .font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.confidence-playbook .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.confidence-playbook .whitespace-nowrap{white-space:nowrap}.confidence-playbook .text-\\[\\#0069D9\\]{color:#0069d9}.confidence-playbook .text-black{color:#000}.confidence-playbook .text-blue-600{color:var(--color-blue-600)}.confidence-playbook .text-danger-500{color:#dc3545}.confidence-playbook .text-danger-600{color:#c82333}.confidence-playbook .text-danger-900{color:#721c24}.confidence-playbook .text-dark{color:#1c232d}.confidence-playbook .text-dark-300{color:#343a40}.confidence-playbook .text-fiserv-orange-500{color:#f60}.confidence-playbook .text-gray-50{color:#f5f6f7}.confidence-playbook .text-gray-200{color:#ced1d6}.confidence-playbook .text-gray-300{color:#b0b5bd}.confidence-playbook .text-gray-400{color:#757e8c}.confidence-playbook .text-gray-500{color:#3a475b}.confidence-playbook .text-gray-700{color:#2c3544}.confidence-playbook .text-gray-800{color:#232b37}.confidence-playbook .text-gray-900{color:#1c232d}.confidence-playbook .text-info-500{color:#17a2b8}.confidence-playbook .text-orange-500{color:#ff7800}.confidence-playbook .text-primary-600{color:#0069d9}.confidence-playbook .text-primary-900{color:#004085}.confidence-playbook .text-purple-500{color:#a855f7}.confidence-playbook .text-secondary{color:#6c757d}.confidence-playbook .text-secondary-400{color:#899197}.confidence-playbook .text-secondary-500{color:#6c757d}.confidence-playbook .text-secondary-600{color:#5a6268}.confidence-playbook .text-steel-500{color:#556987}.confidence-playbook .text-success-500{color:#28a745}.confidence-playbook .text-success-600{color:#218838}.confidence-playbook .text-success-900{color:#155724}.confidence-playbook .text-warning-500{color:#ffc107}.confidence-playbook .text-warning-600{color:#f59e0b}.confidence-playbook .text-warning-900{color:#935f07}.confidence-playbook .text-white{color:#fff}.confidence-playbook .text-yellow{color:#ffe600}.confidence-playbook .uppercase{text-transform:uppercase}.confidence-playbook .italic{font-style:italic}.confidence-playbook .line-through{text-decoration-line:line-through}.confidence-playbook .underline{text-decoration-line:underline}.confidence-playbook .opacity-0{opacity:0}.confidence-playbook .opacity-50{opacity:.5}.confidence-playbook .opacity-60{opacity:.6}.confidence-playbook .opacity-70{opacity:.7}.confidence-playbook .opacity-100{opacity:1}.confidence-playbook .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-dark\\/50{--tw-shadow-color:#1c232d80}@supports (color:color-mix(in lab,red,red)){.confidence-playbook .shadow-dark\\/50{--tw-shadow-color:color-mix(in oklab,oklab(25.3864% -.0047446 -.0210213/.5) var(--tw-shadow-alpha),transparent)}}.confidence-playbook .outline{outline-style:var(--tw-outline-style);outline-width:1px}.confidence-playbook .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.confidence-playbook .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.confidence-playbook .duration-300{--tw-duration:.3s;transition-duration:.3s}.confidence-playbook .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.confidence-playbook .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.confidence-playbook .outline-none{--tw-outline-style:none;outline-style:none}.confidence-playbook .\\[writing-mode\\:vertical-lr\\]{writing-mode:vertical-lr}@media(hover:hover){.confidence-playbook .hover\\:border-primary-500:hover{border-color:#007bff}.confidence-playbook .hover\\:bg-danger-500:hover{background-color:#dc3545}.confidence-playbook .hover\\:bg-dark:hover{background-color:#1c232d}.confidence-playbook .hover\\:bg-fiserv-orange-500:hover{background-color:#f60}.confidence-playbook .hover\\:bg-gray-50:hover{background-color:#f5f6f7}.confidence-playbook .hover\\:bg-gray-100:hover{background-color:#ebedef}.confidence-playbook .hover\\:bg-gray-400:hover{background-color:#757e8c}.confidence-playbook .hover\\:bg-gray-500:hover{background-color:#3a475b}.confidence-playbook .hover\\:bg-gray-800:hover{background-color:#232b37}.confidence-playbook .hover\\:bg-gray-900:hover{background-color:#1c232d}.confidence-playbook .hover\\:bg-info-500:hover{background-color:#17a2b8}.confidence-playbook .hover\\:bg-orange-500:hover{background-color:#ff7800}.confidence-playbook .hover\\:bg-primary-700:hover{background-color:#0062cc}.confidence-playbook .hover\\:bg-primary-800:hover{background-color:#0054af}.confidence-playbook .hover\\:bg-purple-500:hover{background-color:#a855f7}.confidence-playbook .hover\\:bg-secondary-500:hover{background-color:#6c757d}.confidence-playbook .hover\\:bg-steel-500:hover{background-color:#556987}.confidence-playbook .hover\\:bg-success-500:hover{background-color:#28a745}.confidence-playbook .hover\\:bg-transparent:hover{background-color:#0000}.confidence-playbook .hover\\:bg-warning-500:hover{background-color:#ffc107}.confidence-playbook .hover\\:bg-yellow:hover{background-color:#ffe600}.confidence-playbook .hover\\:text-black:hover{color:#000}.confidence-playbook .hover\\:text-blue-600:hover{color:var(--color-blue-600)}.confidence-playbook .hover\\:text-danger-600:hover{color:#c82333}.confidence-playbook .hover\\:text-danger-700:hover{color:#bd2130}.confidence-playbook .hover\\:text-danger-800:hover{color:#aa1927}.confidence-playbook .hover\\:text-dark:hover{color:#1c232d}.confidence-playbook .hover\\:text-fiserv-orange-800:hover{color:#bf4c00}.confidence-playbook .hover\\:text-gray-400:hover{color:#757e8c}.confidence-playbook .hover\\:text-gray-700:hover{color:#2c3544}.confidence-playbook .hover\\:text-gray-800:hover{color:#232b37}.confidence-playbook .hover\\:text-gray-900:hover{color:#1c232d}.confidence-playbook .hover\\:text-info-800:hover{color:#026777}.confidence-playbook .hover\\:text-orange-800:hover{color:#c75d00}.confidence-playbook .hover\\:text-primary-600:hover{color:#0069d9}.confidence-playbook .hover\\:text-primary-700:hover{color:#0062cc}.confidence-playbook .hover\\:text-primary-800:hover{color:#0054af}.confidence-playbook .hover\\:text-purple-800:hover{color:#6f33a7}.confidence-playbook .hover\\:text-secondary-800:hover{color:#444a50}.confidence-playbook .hover\\:text-steel-800:hover{color:#333f51}.confidence-playbook .hover\\:text-success-600:hover{color:#218838}.confidence-playbook .hover\\:text-success-700:hover{color:#1e7e34}.confidence-playbook .hover\\:text-success-800:hover{color:#106c25}.confidence-playbook .hover\\:text-warning-600:hover{color:#f59e0b}.confidence-playbook .hover\\:text-warning-700:hover{color:#dd8e0a}.confidence-playbook .hover\\:text-warning-800:hover{color:#b87708}.confidence-playbook .hover\\:text-white:hover{color:#fff}.confidence-playbook .hover\\:text-yellow:hover{color:#ffe600}}.confidence-playbook .focus\\:border-red-500:focus{border-color:var(--color-red-500)}.confidence-playbook .focus\\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.confidence-playbook .focus\\:outline-3:focus{outline-style:var(--tw-outline-style);outline-width:3px}.confidence-playbook .focus\\:outline-primary-500\\/\\[\\.3\\]:focus{outline-color:#007bff4d}.confidence-playbook .active\\:bg-gray-50:active{background-color:#f5f6f7}.confidence-playbook .active\\:bg-gray-800:active{background-color:#232b37}.confidence-playbook .active\\:text-black:active{color:#000}.confidence-playbook .active\\:text-white:active{color:#fff}.confidence-playbook .disabled\\:pointer-events-none:disabled{pointer-events:none}.confidence-playbook .disabled\\:opacity-15:disabled{opacity:.15}.confidence-playbook .data-closed\\:opacity-0[data-closed]{opacity:0}.confidence-playbook .data-focus\\:-outline-offset-2[data-focus]{outline-offset:-2px}.confidence-playbook .data-focus\\:outline-primary-500[data-focus]{outline-color:#007bff}@media(min-width:48rem){.confidence-playbook .md\\:min-w-fit{min-width:fit-content}}}.confidence-playbook *{--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}.confidence-playbook{display:unset!important;color:#1c232d!important}@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme,base,components,utilities;.lexical-view-mode{word-break:break-word!important;color:#1c232d!important;width:100%!important}.lexical-view-mode ul{list-style:revert!important}.editable .lexical-view-mode:hover{cursor:text!important;background-color:#00000012!important;border-radius:1px!important;outline:4px solid #00000012!important}.lexical-view-mode .Collapsible__container{width:fit-content!important}.lexical-view-mode .Collapsible__title{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;align-items:center!important;margin-bottom:4px!important;padding:0!important;list-style:none!important;display:flex!important}.lexical-view-mode .Collapsible__title:hover{color:#0069d9!important}.lexical-view-mode .Collapsible__title:hover .editor-paragraph{text-decoration:underline!important}.lexical-view-mode .Collapsible__title::marker{display:none!important}.lexical-view-mode .Collapsible__title::-webkit-details-marker{display:none!important}.lexical-view-mode .Collapsible__title:before{content:""!important;-moz-osx-font-smoothing:grayscale!important;-webkit-font-smoothing:antialiased!important;display:var(--fa-display,inline-block)!important;font-variant:normal!important;text-rendering:auto!important;background:#fff!important;border-radius:30px!important;margin-right:4px!important;font-family:"Font Awesome 5 Pro"!important;font-style:normal!important;font-weight:900!important;line-height:1!important}.lexical-view-mode .Collapsible__title:hover:before{color:#0069d9!important;border:3px solid #fff!important;margin-left:-3px!important;margin-right:1px!important}.lexical-view-mode hr{border:none!important;margin:5px 0!important;padding:3px 0!important}.lexical-view-mode hr:after{content:""!important;background-color:#0000001a!important;height:2px!important;line-height:2px!important;display:block!important}.lexical-view-mode .editor-line-spacer{background:0 0!important;border:1px dashed #0000!important;line-height:6px!important}.lexical-view-mode .other h2{margin-bottom:7px;color:#444!important;font-size:18px!important}.lexical-view-mode .other a{font-size:14px;color:#777!important;text-decoration:underline!important}.lexical-view-mode .other ul{list-style-type:none;margin:0!important;padding:0!important}.lexical-view-mode .ltr{text-align:left}.lexical-view-mode .rtl{text-align:right}.lexical-view-mode .editor-shell{color:#1c232d!important;border-radius:4px!important;width:100%!important;font-weight:400!important;position:relative!important}.lexical-view-mode .editor{position:relative;background:#fff!important}.lexical-view-mode .editor-input{caret-color:#444;resize:none!important;-moz-tab-size:1!important;tab-size:1!important;outline:0!important;min-height:150px!important;padding:12px!important;position:relative!important}.lexical-view-mode .editor-placeholder{pointer-events:none;color:#999!important;text-overflow:ellipsis!important;-webkit-user-select:none!important;user-select:none!important;font-size:15px!important;display:inline-block!important;position:absolute!important;top:15px!important;left:10px!important;overflow:hidden!important}.lexical-view-mode .editor-text-bold,.lexical-view-mode strong{font-weight:700!important}.lexical-view-mode .editor-text-italic{font-style:italic}.lexical-view-mode .editor-text-code{color:#d70c69;background-color:#0000001a!important;border-radius:4px!important;padding:1px .25rem!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:85%!important}.lexical-view-mode .editor-link{word-break:break-word;color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode .editor-link:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .editor-code,.lexical-view-mode pre{word-break:break-word;-moz-tab-size:2!important;tab-size:2!important;background-color:#f0f2f5!important;border-radius:4px!important;margin:8px 0!important;padding:8px 8px 8px 52px!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:13px!important;line-height:1.53!important;display:block!important;position:relative!important;overflow-x:auto!important}.lexical-view-mode .editor-code:before{min-width:25px;content:attr(data-gutter)!important;color:#777!important;white-space:pre-wrap!important;text-align:right!important;background-color:#eee!important;border-right:1px solid #ccc!important;padding:8px!important;position:absolute!important;top:0!important;left:0!important}.lexical-view-mode pre{white-space:pre-wrap!important;padding-left:8px!important}.lexical-view-mode pre:before{border-right:0!important;width:100%!important;height:23px!important}.lexical-view-mode .editor-code:after,.lexical-view-mode pre:after{color:#00000080;content:attr(data-highlight-language)!important;text-transform:uppercase!important;padding:3px!important;font-size:10px!important;position:absolute!important;top:0!important;right:3px!important}.lexical-view-mode .editor-tokenComment{color:#708090}.lexical-view-mode .editor-tokenPunctuation{color:#999}.lexical-view-mode .editor-tokenProperty{color:#905}.lexical-view-mode .editor-tokenSelector{color:#690}.lexical-view-mode .editor-tokenOperator{color:#9a6e3a}.lexical-view-mode .editor-tokenAttr{color:#07a}.lexical-view-mode .editor-tokenVariable{color:#e90}.lexical-view-mode .editor-tokenFunction{color:#dd4a68}.lexical-view-mode .editor-paragraph,.lexical-view-mode p{word-break:break-word;margin:0 0 .3rem!important;padding:0!important}.lexical-view-mode .editor-paragraph:last-child{margin-bottom:0}.lexical-view-mode .editor-heading-h1,.lexical-view-mode h1{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:24px!important}.lexical-view-mode .editor-heading-h2:first-child,.lexical-view-mode .editor-heading-h1:first-child,.lexical-view-mode h2:first-child,.lexical-view-mode h1:first-child{margin-top:0}.lexical-view-mode .editor-heading-h2,.lexical-view-mode h2{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:20px!important}.lexical-view-mode .editor-list-ol,.lexical-view-mode ol{margin:0 0 .3rem 15px!important;padding:0 0 0 15px!important;list-style-type:decimal!important;list-style-position:outside!important}.lexical-view-mode li ol{margin:0 0 0 20px!important}.lexical-view-mode .editor-list-ol2,.lexical-view-mode .editor-list-ol3,.lexical-view-mode .editor-list-ol4,.lexical-view-mode .editor-list-ol5,.lexical-view-mode .editor-list-ol6,.lexical-view-mode .editor-list-ol7{list-style-position:outside;padding:0!important}.lexical-view-mode .editor-list-ol2{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol3{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol4{list-style-type:decimal}.lexical-view-mode .editor-list-ol5{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol6{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol7{list-style-type:decimal}.lexical-view-mode .editor-list-ul,.lexical-view-mode ul{margin-bottom:.3rem;margin:0 0 0 15px!important;padding:0 0 0 5px!important;list-style-position:outside!important}.lexical-view-mode li ul{margin:0 0 0 15px!important;padding:0 0 0 3px!important}.lexical-view-mode .editor-list-item{padding-left:0;vertical-align:top!important;margin-bottom:12px!important;line-height:1.3!important}.lexical-view-mode .editor-nested-list-item{list-style-type:none}.lexical-view-mode code{color:inherit!important;word-wrap:break-word!important;white-space:break-spaces!important}.lexical-view-mode a>code{color:inherit}.lexical-view-mode pre::-webkit-scrollbar{width:10px;background:0 0!important}.lexical-view-mode pre::-webkit-scrollbar-thumb{background:#999}.lexical-view-mode img{cursor:zoom-in!important;border:1px solid #ccc!important;border-radius:4px!important;width:auto!important;max-width:250px!important;height:auto!important;max-height:250px!important;display:block!important}.lexical-view-mode img:hover,.lexical-view-mode img:focus{outline:3px solid #007bff4d}.lexical-view-mode iframe{background:#000!important;border:1px solid #ccc!important;width:fit-content!important;max-width:100%!important;height:fit-content!important}.lexical-view-mode .ql-align-left{text-align:left!important}.lexical-view-mode .ql-align-right{text-align:right!important}.lexical-view-mode .ql-align-center{text-align:center!important}.lexical-view-mode .ql-align-justify{text-align:justify!important}.lexical-view-mode .ql-size-small{font-size:.75em!important}.lexical-view-mode p>a,.lexical-view-mode li>a{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode p>a:hover,.lexical-view-mode li>a:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .ql-size-large{font-size:1.25rem!important}.lexical-view-mode .ql-indent-1{margin-left:20px!important}.lexical-view-mode .ql-indent-2{margin-left:40px!important}.lexical-view-mode .ql-indent-3{margin-left:60px!important}.lexical-view-mode .ql-indent-4{margin-left:80px!important}.lexical-view-mode .ql-indent-5{margin-left:100px!important}.lexical-view-mode .ql-indent-6{margin-left:120px!important}.lexical-view-mode .ql-indent-7{margin-left:140px!important}.lexical-view-mode .ql-indent-8{margin-left:160px!important}.lexical-view-mode ol li.ql-indent-1,.lexical-view-mode ol li.ql-indent-2,.lexical-view-mode ol li.ql-indent-3,.lexical-view-mode ol li.ql-indent-4,.lexical-view-mode ol li.ql-indent-5,.lexical-view-mode ol li.ql-indent-6,.lexical-view-mode ol li.ql-indent-7,.lexical-view-mode ol li.ql-indent-8,.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-6,.lexical-view-mode ul li.ql-indent-7,.lexical-view-mode ul li.ql-indent-8{margin-bottom:.3em!important}.lexical-view-mode ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-1!important;margin-left:0!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-1::marker{display:none}.lexical-view-mode ol li.ql-indent-1:before{content:counter(list-1,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-2!important;margin-left:20px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-2::marker{display:none}.lexical-view-mode ol li.ql-indent-2:before{content:counter(list-2,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-3!important;margin-left:40px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-3::marker{display:none}.lexical-view-mode ol li.ql-indent-3:before{content:counter(list-3,decimal)". "!important}.lexical-view-mode ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-4!important;margin-left:60px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-4::marker{display:none}.lexical-view-mode ol li.ql-indent-4:before{content:counter(list-4,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9!important;counter-increment:list-5!important;margin-left:80px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-5::marker{display:none}.lexical-view-mode ol li.ql-indent-5:before{content:counter(list-5,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-6{counter-reset:list-7 list-8 list-9!important;counter-increment:list-6!important;margin-left:100px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-6::marker{display:none}.lexical-view-mode ol li.ql-indent-6:before{content:counter(list-6,decimal)". "!important}.lexical-view-mode ol li.ql-indent-7{counter-reset:list-8 list-9!important;counter-increment:list-7!important;margin-left:120px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-7::marker{display:none}.lexical-view-mode ol li.ql-indent-7:before{content:counter(list-7,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-8{counter-reset:list-9!important;counter-increment:list-8!important;margin-left:140px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-8::marker{display:none}.lexical-view-mode ol li.ql-indent-8:before{content:counter(list-8,lower-roman)". "!important}.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-6{list-style-type:disc}.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-7{list-style-type:circle}.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-8{list-style-type:square}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes progress{0%{transform:translate(-100%)}to{transform:translate(300%)}}',Ww=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Kw=(e,t)=>({classGroupId:e,validator:t}),O0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ga="-",Vh=[],Hw="arbitrary..",qw=e=>{const t=Yw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Vw(s);const a=s.split(Ga),l=a[0]===""&&a.length>1?1:0;return P0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Ww(c,l):l:c||Vh}return n[s]||Vh}}},P0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=P0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Ga):e.slice(t).join(Ga),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Vw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Hw+r:void 0})(),Yw=e=>{const{theme:t,classGroups:n}=e;return Qw(n,t)},Qw=(e,t)=>{const n=O0();for(const r in e){const o=e[r];Jf(o,n,r,t)}return n},Jf=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Gw(s,t,n,r)}},Gw=(e,t,n,r)=>{if(typeof e=="string"){Zw(e,t,n);return}if(typeof e=="function"){Jw(e,t,n,r);return}Xw(e,t,n,r)},Zw=(e,t,n)=>{const r=e===""?t:M0(t,e);r.classGroupId=n},Jw=(e,t,n,r)=>{if(e2(e)){Jf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kw(n,e))},Xw=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Jf(l,M0(t,a),n,r)}},M0=(e,t)=>{let n=e;const r=t.split(Ga),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=O0(),n.nextPart.set(s,a)),n=a}return n},e2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,t2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},_u="!",Yh=":",n2=[],Qh=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),r2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const m=o[g];if(s===0&&a===0){if(m===Yh){i.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){c=g;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const f=i.length===0?o:o.slice(l);let d=f,h=!1;f.endsWith(_u)?(d=f.slice(0,-1),h=!0):f.startsWith(_u)&&(d=f.slice(1),h=!0);const p=c&&c>l?c-l:void 0;return Qh(i,h,d,p)};if(t){const o=t+Yh,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qh(n2,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},o2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},i2=e=>({cache:t2(e.cacheSize),parseClassName:r2(e),sortModifiers:o2(e),...qw(e)}),s2=/\s+/,a2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(s2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?p.substring(0,g):p);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(p),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=d.length===0?"":d.length===1?d[0]:i(d).join(":"),v=h?b+_u:b,w=v+y;if(s.indexOf(w)>-1)continue;s.push(w);const A=o(y,m);for(let C=0;C<A.length;++C){const _=A[C];s.push(v+_)}l=u+(l.length>0?" "+l:l)}return l},l2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=I0(n))&&(o&&(o+=" "),o+=r);return o},I0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=I0(e[r]))&&(n&&(n+=" "),n+=t);return n},c2=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,f)=>f(u),e());return n=i2(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=a2(l,n);return o(l,u),u};return i=s,(...l)=>i(l2(...l))},u2=[],Ge=e=>{const t=n=>n[e]||u2;return t.isThemeGetter=!0,t},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f2=/^\d+\/\d+$/,d2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,m2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jo=e=>f2.test(e),xe=e=>!!e&&!Number.isNaN(Number(e)),hr=e=>!!e&&Number.isInteger(Number(e)),vc=e=>e.endsWith("%")&&xe(e.slice(0,-1)),Fn=e=>d2.test(e),y2=()=>!0,b2=e=>h2.test(e)&&!p2.test(e),D0=()=>!1,v2=e=>m2.test(e),x2=e=>g2.test(e),w2=e=>!ae(e)&&!le(e),A2=e=>Bi(e,z0,D0),ae=e=>L0.test(e),Gr=e=>Bi(e,$0,b2),xc=e=>Bi(e,S2,xe),Gh=e=>Bi(e,F0,D0),k2=e=>Bi(e,j0,x2),ha=e=>Bi(e,U0,v2),le=e=>R0.test(e),os=e=>Wi(e,$0),C2=e=>Wi(e,T2),Zh=e=>Wi(e,F0),_2=e=>Wi(e,z0),E2=e=>Wi(e,j0),pa=e=>Wi(e,U0,!0),Bi=(e,t,n)=>{const r=L0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wi=(e,t,n=!1)=>{const r=R0.exec(e);return r?r[1]?t(r[1]):n:!1},F0=e=>e==="position"||e==="percentage",j0=e=>e==="image"||e==="url",z0=e=>e==="length"||e==="size"||e==="bg-size",$0=e=>e==="length",S2=e=>e==="number",T2=e=>e==="family-name",U0=e=>e==="shadow",N2=()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),o=Ge("tracking"),i=Ge("leading"),s=Ge("breakpoint"),a=Ge("container"),l=Ge("spacing"),c=Ge("radius"),u=Ge("shadow"),f=Ge("inset-shadow"),d=Ge("text-shadow"),h=Ge("drop-shadow"),p=Ge("blur"),g=Ge("perspective"),m=Ge("aspect"),y=Ge("ease"),b=Ge("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...w(),le,ae],C=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],E=()=>[le,ae,l],N=()=>[Jo,"full","auto",...E()],P=()=>[hr,"none","subgrid",le,ae],I=()=>["auto",{span:["full",hr,le,ae]},hr,le,ae],W=()=>[hr,"auto",le,ae],j=()=>["auto","min","max","fr",le,ae],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...E()],oe=()=>[Jo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],M=()=>[e,le,ae],re=()=>[...w(),Zh,Gh,{position:[le,ae]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",_2,A2,{size:[le,ae]}],K=()=>[vc,os,Gr],B=()=>["","none","full",c,le,ae],J=()=>["",xe,os,Gr],V=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[xe,vc,Zh,Gh],pe=()=>["","none",p,le,ae],ye=()=>["none",xe,le,ae],me=()=>["none",xe,le,ae],ze=()=>[xe,le,ae],G=()=>[Jo,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[y2],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[w2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",xe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jo,ae,le,m]}],container:["container"],columns:[{columns:[xe,ae,le,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",le,ae]}],basis:[{basis:[Jo,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xe,Jo,"auto","initial","none",ae]}],grow:[{grow:["",xe,le,ae]}],shrink:[{shrink:["",xe,le,ae]}],order:[{order:[hr,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[a,"screen",...oe()]}],"min-w":[{"min-w":[a,"screen","none",...oe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,os,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vc,ae]}],"font-family":[{font:[C2,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ae]}],"line-clamp":[{"line-clamp":[xe,"none",le,xc]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[xe,"from-font","auto",le,Gr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[xe,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,le,ae],radial:["",le,ae],conic:[hr,le,ae]},E2,k2]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xe,le,ae]}],"outline-w":[{outline:["",xe,os,Gr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,pa,ha]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,pa,ha]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[xe,Gr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",d,pa,ha]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[xe,le,ae]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:pe()}],brightness:[{brightness:[xe,le,ae]}],contrast:[{contrast:[xe,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",h,pa,ha]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",xe,le,ae]}],"hue-rotate":[{"hue-rotate":[xe,le,ae]}],invert:[{invert:["",xe,le,ae]}],saturate:[{saturate:[xe,le,ae]}],sepia:[{sepia:["",xe,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[xe,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[xe,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xe,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xe,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",xe,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[xe,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[xe,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",xe,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xe,"initial",le,ae]}],ease:[{ease:["linear","initial",y,le,ae]}],delay:[{delay:[xe,le,ae]}],animate:[{animate:["none",b,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,le,ae]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[xe,os,Gr,xc]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fi=c2(N2);function B0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=B0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Es(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=B0(e))&&(r&&(r+=" "),r+=t);return r}function _e(...e){return fi(Es(e))}const Jh="confidence_playbook_",O2="confidence_playbook_expanded_",W0=30;function K0(e,t){return t?`${Jh}${e}_${t}`:`${Jh}${e}`}function H0(e,t,n,r){const o={playbookInstanceId:t,email:n},i=K0(e,r),s=new Date;s.setDate(s.getDate()+W0),document.cookie=`${i}=${encodeURIComponent(JSON.stringify(o))}; expires=${s.toUTCString()}; path=/; SameSite=Lax`}function q0(e,t){const n=K0(e,t),r=document.cookie.split(";");for(const o of r){const[i,s]=o.trim().split("=");if(i===n&&s)try{return JSON.parse(decodeURIComponent(s))}catch{return null}}return null}function V0(e){return`${O2}${e}`}function P2(e,t){const n=V0(e),r=new Date;r.setDate(r.getDate()+W0),document.cookie=`${n}=${t?"1":"0"}; expires=${r.toUTCString()}; path=/; SameSite=Lax`}function M2(e){const t=V0(e),n=document.cookie.split(";");for(const r of n){const[o,i]=r.trim().split("=");if(o===t&&i!==void 0)return i==="1"}return null}const I2=typeof document<"u"?T.useLayoutEffect:()=>{},zr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},oo=e=>e&&"window"in e&&e.window===e?e:zr(e).defaultView||window;function L2(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function R2(e){return L2(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let D2=!1;function Xf(){return D2}function Y0(e,t){if(!Xf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:R2(n)?n=n.host:n=n.parentNode}return!1}const Eu=(e=document)=>{var t;if(!Xf())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Q0(e){return Xf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function F2(e){if(j2())e.focus({preventScroll:!0});else{let t=z2(e);e.focus(),$2(t)}}let ma=null;function j2(){if(ma==null){ma=!1;try{document.createElement("div").focus({get preventScroll(){return ma=!0,!0}})}catch{}}return ma}function z2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function _l(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function ed(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function or(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ss=or(function(){return ed(/^Mac/i)}),U2=or(function(){return ed(/^iPhone/i)}),G0=or(function(){return ed(/^iPad/i)||Ss()&&navigator.maxTouchPoints>1}),B2=or(function(){return U2()||G0()});or(function(){return Ss()||B2()});const W2=or(function(){return _l(/AppleWebKit/i)&&!K2()}),K2=or(function(){return _l(/Chrome/i)}),H2=or(function(){return _l(/Android/i)}),q2=or(function(){return _l(/Firefox/i)});function Ts(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}=t;q2()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ss()?i=!0:s=!0);let c=W2()&&Ss()&&!G0()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ts.isOpening=n,F2(e),e.dispatchEvent(c),Ts.isOpening=!1}Ts.isOpening=!1;function Z0(){let e=T.useRef(new Map),t=T.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),n=T.useCallback((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),r=T.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return T.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function V2(e){return e.pointerType===""&&e.isTrusted?!0:H2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function J0(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Y2(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function X0(e){let t=T.useRef({isFocused:!1,observer:null});return I2(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),T.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,o=i=>{if(t.current.isFocused=!1,r.disabled){let s=J0(i);e==null||e(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let s=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Q2=!1,qs=null,Su=new Set,ys=new Map,Eo=!1,Tu=!1;const G2={Tab:!0,Escape:!0};function td(e,t){for(let n of Su)n(e,t)}function Z2(e){return!(e.metaKey||!Ss()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Za(e){Eo=!0,!Ts.isOpening&&Z2(e)&&(qs="keyboard",td("keyboard",e))}function Vt(e){qs="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Eo=!0,td("pointer",e))}function ey(e){!Ts.isOpening&&V2(e)&&(Eo=!0,qs="virtual")}function ty(e){e.target===window||e.target===document||Q2||!e.isTrusted||(!Eo&&!Tu&&(qs="virtual",td("virtual",e)),Eo=!1,Tu=!1)}function ny(){Eo=!1,Tu=!0}function Nu(e){if(typeof window>"u"||typeof document>"u"||ys.get(oo(e)))return;const t=oo(e),n=zr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Eo=!0,r.apply(this,arguments)},n.addEventListener("keydown",Za,!0),n.addEventListener("keyup",Za,!0),n.addEventListener("click",ey,!0),t.addEventListener("focus",ty,!0),t.addEventListener("blur",ny,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Vt,!0),n.addEventListener("pointermove",Vt,!0),n.addEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Vt,!0),n.addEventListener("mousemove",Vt,!0),n.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{ry(e)},{once:!0}),ys.set(t,{focus:r})}const ry=(e,t)=>{const n=oo(e),r=zr(e);t&&r.removeEventListener("DOMContentLoaded",t),ys.has(n)&&(n.HTMLElement.prototype.focus=ys.get(n).focus,r.removeEventListener("keydown",Za,!0),r.removeEventListener("keyup",Za,!0),r.removeEventListener("click",ey,!0),n.removeEventListener("focus",ty,!0),n.removeEventListener("blur",ny,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Vt,!0),r.removeEventListener("pointermove",Vt,!0),r.removeEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Vt,!0),r.removeEventListener("mousemove",Vt,!0),r.removeEventListener("mouseup",Vt,!0)),ys.delete(n))};function J2(e){const t=zr(e);let n;return t.readyState!=="loading"?Nu(e):(n=()=>{Nu(e)},t.addEventListener("DOMContentLoaded",n)),()=>ry(e,n)}typeof document<"u"&&J2();function oy(){return qs!=="pointer"}const X2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function eA(e,t,n){let r=zr(n==null?void 0:n.target);const o=typeof window<"u"?oo(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?oo(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?oo(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?oo(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!X2.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!G2[n.key])}function tA(e,t,n){Nu(),T.useEffect(()=>{let r=(o,i)=>{eA(!!(n!=null&&n.isTextInput),o,i)&&e(oy())};return Su.add(r),()=>{Su.delete(r)}},t)}function nA(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=T.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=X0(i),a=T.useCallback(l=>{const c=zr(l.target),u=c?Eu(c):Eu();l.target===l.currentTarget&&u===Q0(l.nativeEvent)&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function rA(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=T.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Z0(),l=T.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=X0(l),u=T.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const d=zr(f.target),h=Eu(d);if(!i.current.isFocusWithin&&h===Q0(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let p=f.currentTarget;s(d,"focus",g=>{if(i.current.isFocusWithin&&!Y0(p,g.target)){let m=new d.defaultView.FocusEvent("blur",{relatedTarget:g.target});Y2(m,p);let y=J0(m);l(y)}},{capture:!0})}},[r,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Ja=!1,ga=0;function Ou(){Ja=!0,setTimeout(()=>{Ja=!1},50)}function Xh(e){e.pointerType==="touch"&&Ou()}function oA(){if(!(typeof document>"u"))return ga===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Xh):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ou)),ga++,()=>{ga--,!(ga>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Xh):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ou))}}function iA(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=T.useState(!1),a=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(oA,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Z0(),{hoverProps:u,triggerHoverEnd:f}=T.useMemo(()=>{let d=(g,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!g.currentTarget.contains(g.target))return;a.isHovered=!0;let y=g.currentTarget;a.target=y,l(zr(g.target),"pointerover",b=>{a.isHovered&&a.target&&!Y0(a.target,b.target)&&h(b,b.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:y,pointerType:m}),n&&n(!0),s(!0)},h=(g,m)=>{let y=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!y)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:y,pointerType:m}),n&&n(!1),s(!1))},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Ja&&g.pointerType==="mouse"||d(g,g.pointerType)},p.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(p.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!a.ignoreEmulatedMouseEvents&&!Ja&&d(g,"mouse"),a.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:p,triggerHoverEnd:h}},[t,n,r,o,a,l,c]);return T.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}function sA(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=T.useRef({isFocused:!1,isFocusVisible:t||oy()}),[i,s]=T.useState(!1),[a,l]=T.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=T.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=T.useCallback(h=>{o.current.isFocused=h,s(h),c()},[c]);tA(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=nA({isDisabled:r,onFocusChange:u}),{focusWithinProps:d}=rA({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:a,focusProps:r?d:f}}var aA=Object.defineProperty,lA=(e,t,n)=>t in e?aA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wc=(e,t,n)=>(lA(e,typeof t!="symbol"?t+"":t,n),n);let cA=class{constructor(){wc(this,"current",this.detect()),wc(this,"handoffState","pending"),wc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},uA=new cA,nd=(e,t)=>{uA.isServer?T.useEffect(e,t):T.useLayoutEffect(e,t)};function fA(e){let t=T.useRef(e);return nd(()=>{t.current=e},[e]),t}let El=function(e){let t=fA(e);return T.useCallback((...n)=>t.current(...n),[t])};function Sl(e){return T.useMemo(()=>e,Object.values(e))}let iy=T.createContext(void 0);function Tl(){return T.useContext(iy)}function dA({value:e,children:t}){return T.createElement(iy.Provider,{value:e},t)}function ep(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function sy(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sy),r}var hA=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(hA||{}),pA=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pA||{});function Vs(){let e=gA();return T.useCallback(t=>mA({mergeRefs:e,...t}),[e])}function mA({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??yA;let l=ay(t,e);if(i)return ya(l,n,r,s,a);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return ya(f,n,r,s,a)}if(c&1){let{unmount:u=!0,...f}=l;return sy(u?0:1,{0(){return null},1(){return ya({...f,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return ya(l,n,r,s,a)}function ya(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...l}=Ac(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let d=!1,h=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&h.push(p.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(d){f["data-headlessui-state"]=h.join(" ");for(let p of h)f[`data-${p}`]=""}}if(Ia(i)&&(Object.keys(Xo(l)).length>0||Object.keys(Xo(f)).length>0))if(!T.isValidElement(u)||Array.isArray(u)&&u.length>1||xA(u)){if(Object.keys(Xo(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xo(l)).concat(Object.keys(Xo(f))).map(d=>` - ${d}`).join(`
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},Q1=function(e,t){return H1(e)||q1(e,t)||V1(e,t)||Y1()},c0=l0((function(e){function t(){return e.exports=t=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},t.apply(this,arguments)}e.exports=t})),G1=function(e,t){if(e==null)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},u0=function(e,t){if(e==null)return{};var n,r,o=G1(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},Z1=T.createContext(null);function f0(e){var t=e.children,n=t===void 0?"":t,r=u0(e,["children"]);return typeof n!="string"&&(n=M1.renderToString(n)),T.createElement("template",c0({},r,{dangerouslySetInnerHTML:{__html:n}}))}function d0(e){var t=e.root,n=e.children;return Nn.createPortal(n===void 0?null:n,t)}function J1(e){var t=T.forwardRef((function(n,r){var o,i,s=n.mode,a=s===void 0?"open":s,l=n.delegatesFocus,c=l!==void 0&&l,u=n.styleSheets,f=u===void 0?[]:u,d=n.ssr,h=d!==void 0&&d,p=n.children,g=u0(n,["mode","delegatesFocus","styleSheets","ssr","children"]),m=(i=T.useRef((o=r)&&o.current),T.useEffect((function(){o&&(o.current=i.current)}),[o]),i),y=T.useState(null),b=Q1(y,2),v=b[0],w=b[1],A="node_".concat(a).concat(c);return T.useLayoutEffect((function(){if(m.current)try{if(typeof r=="function"&&r(m.current),h){var C=m.current.shadowRoot;return void w(C)}var _=m.current.attachShadow({mode:a,delegatesFocus:c});f.length>0&&(_.adoptedStyleSheets=f),w(_)}catch(E){(function(N){var P=N.error,I=N.styleSheets,W=N.root;switch(P.name){case"NotSupportedError":I.length>0&&(W.adoptedStyleSheets=I);break;default:throw P}})({error:E,styleSheets:f,root:v})}}),[r,m,f]),T.createElement(T.Fragment,null,T.createElement(e.tag,c0({key:A,ref:m},g),(v||h)&&T.createElement(Z1.Provider,{value:v},h?T.createElement(f0,{shadowroot:a,shadowrootmode:a},e.render({root:v,ssr:h,children:p})):T.createElement(d0,{root:v},e.render({root:v,ssr:h,children:p})))))}));return t.propTypes={mode:ge.oneOf(["open","closed"]),delegatesFocus:ge.bool,styleSheets:ge.arrayOf(ge.instanceOf(globalThis.CSSStyleSheet)),ssr:ge.bool,children:ge.node},t}f0.propTypes={children:ge.oneOfType([ge.string,ge.node])},d0.propTypes={root:ge.object.isRequired,children:ge.node};var bc=new Map;function X1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=K1(o,{separator:"-"}),s="".concat(t,"-").concat(i);return bc.has(s)||bc.set(s,J1({tag:i,render:n})),bc.get(s)}})}var Al=X1();const h0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==";var Ui=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ew={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gn,ao,Yg,tw=(Yg=class{constructor(){fe(this,gn,ew);fe(this,ao,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&S(this,ao)&&e!==S(this,gn)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:S(this,gn),provider:e}),ne(this,gn,e),process.env.NODE_ENV!=="production"&&ne(this,ao,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),S(this,gn).setTimeout(e,t)}clearTimeout(e){S(this,gn).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ne(this,ao,!0),S(this,gn).setInterval(e,t)}clearInterval(e){S(this,gn).clearInterval(e)}},gn=new WeakMap,ao=new WeakMap,Yg),ro=new tw;function nw(e){setTimeout(e,0)}var Co=typeof window>"u"||"Deno"in globalThis;function St(){}function rw(e,t){return typeof e=="function"?e(t):e}function uu(e){return typeof e=="number"&&e>=0&&e!==1/0}function p0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function qt(e,t){return typeof e=="function"?e(t):e}function Rh(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==qf(s,t.options))return!1}else if(!_s(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Dh(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(_o(t.options.mutationKey)!==_o(i))return!1}else if(!_s(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qf(e,t){return((t==null?void 0:t.queryKeyHashFn)||_o)(e)}function _o(e){return JSON.stringify(e,(t,n)=>du(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function _s(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_s(e[n],t[n])):!1}var ow=Object.prototype.hasOwnProperty;function fu(e,t){if(e===t)return e;const n=Fh(e)&&Fh(t);if(!n&&!(du(e)&&du(t)))return t;const o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,a=n?new Array(s):{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c],f=e[u],d=t[u];if(f===d){a[u]=f,(n?c<o:ow.call(e,u))&&l++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[u]=d;continue}const h=fu(f,d);a[u]=h,h===f&&l++}return o===s&&l===o?e:a}function Va(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function du(e){if(!jh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jh(e){return Object.prototype.toString.call(e)==="[object Object]"}function iw(e){return new Promise(t=>{ro.setTimeout(t,e)})}function hu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return fu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return fu(e,t)}return t}function sw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function aw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ya=Symbol();function m0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Ya&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ya?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vf(e,t){return typeof e=="function"?e(...t):!!e}function lw(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var lo,br,xi,Qg,cw=(Qg=class extends Ui{constructor(){super();fe(this,lo);fe(this,br);fe(this,xi);ne(this,xi,t=>{if(!Co&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,br)||this.setEventListener(S(this,xi))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,br))==null||t.call(this),ne(this,br,void 0))}setEventListener(t){var n;ne(this,xi,t),(n=S(this,br))==null||n.call(this),ne(this,br,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,lo)!==t&&(ne(this,lo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,lo)=="boolean"?S(this,lo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lo=new WeakMap,br=new WeakMap,xi=new WeakMap,Qg),Yf=new cw;function pu(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var uw=nw;function fw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=uw;const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Ze=fw(),wi,vr,Ai,Gg,dw=(Gg=class extends Ui{constructor(){super();fe(this,wi,!0);fe(this,vr);fe(this,Ai);ne(this,Ai,t=>{if(!Co&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,vr)||this.setEventListener(S(this,Ai))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,vr))==null||t.call(this),ne(this,vr,void 0))}setEventListener(t){var n;ne(this,Ai,t),(n=S(this,vr))==null||n.call(this),ne(this,vr,t(this.setOnline.bind(this)))}setOnline(t){S(this,wi)!==t&&(ne(this,wi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,wi)}},wi=new WeakMap,vr=new WeakMap,Ai=new WeakMap,Gg),Qa=new dw;function hw(e){return Math.min(1e3*2**e,3e4)}function g0(e){return(e??"online")==="online"?Qa.isOnline():!0}var mu=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function y0(e){let t=!1,n=0,r;const o=pu(),i=()=>o.status!=="pending",s=g=>{var m;if(!i()){const y=new mu(g);d(y),(m=e.onCancel)==null||m.call(e,y)}},a=()=>{t=!0},l=()=>{t=!1},c=()=>Yf.isFocused()&&(e.networkMode==="always"||Qa.isOnline())&&e.canRun(),u=()=>g0(e.networkMode)&&e.canRun(),f=g=>{i()||(r==null||r(),o.resolve(g))},d=g=>{i()||(r==null||r(),o.reject(g))},h=()=>new Promise(g=>{var m;r=y=>{(i()||c())&&g(y)},(m=e.onPause)==null||m.call(e)}).then(()=>{var g;r=void 0,i()||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(i())return;let g;const m=n===0?e.initialPromise:void 0;try{g=m??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(f).catch(y=>{var C;if(i())return;const b=e.retry??(Co?0:3),v=e.retryDelay??hw,w=typeof v=="function"?v(n,y):v,A=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!A){d(y);return}n++,(C=e.onFail)==null||C.call(e,n,y),iw(w).then(()=>c()?void 0:h()).then(()=>{t?d(y):p()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():h().then(p),o)}}var co,Zg,b0=(Zg=class{constructor(){fe(this,co)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uu(this.gcTime)&&ne(this,co,ro.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co?1/0:300*1e3))}clearGcTimeout(){S(this,co)&&(ro.clearTimeout(S(this,co)),ne(this,co,void 0))}},co=new WeakMap,Zg),uo,ki,Ht,fo,tt,Us,ho,rn,$n,Jg,pw=(Jg=class extends b0{constructor(t){super();fe(this,rn);fe(this,uo);fe(this,ki);fe(this,Ht);fe(this,fo);fe(this,tt);fe(this,Us);fe(this,ho);ne(this,ho,!1),ne(this,Us,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,fo,t.client),ne(this,Ht,S(this,fo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,uo,$h(this.options)),this.state=t.state??S(this,uo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,tt))==null?void 0:t.promise}setOptions(t){if(this.options={...S(this,Us),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=$h(this.options);n.data!==void 0&&(this.setState(zh(n.data,n.dataUpdatedAt)),ne(this,uo,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Ht).remove(this)}setData(t,n){const r=hu(this.state.data,t,this.options);return be(this,rn,$n).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,rn,$n).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=S(this,tt))==null?void 0:r.promise;return(o=S(this,tt))==null||o.cancel(t),n?n.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,uo))}isActive(){return this.observers.some(t=>qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ya||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!p0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,tt)&&(S(this,ho)?S(this,tt).cancel({revert:!0}):S(this,tt).cancelRetry()),this.scheduleGc()),S(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,rn,$n).call(this,{type:"invalidate"})}async fetch(t,n){var l,c,u,f,d,h,p,g,m,y,b,v;if(this.state.fetchStatus!=="idle"&&((l=S(this,tt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,tt))return S(this,tt).continueRetry(),S(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(A=>A.options.queryFn);w&&this.setOptions(w.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ne(this,ho,!0),r.signal)})},i=()=>{const w=m0(this.options,n),C=(()=>{const _={client:S(this,fo),queryKey:this.queryKey,meta:this.meta};return o(_),_})();return ne(this,ho,!1),this.options.persister?this.options.persister(w,C,this):w(C)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,fo),state:this.state,fetchFn:i};return o(w),w})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,ki,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&be(this,rn,$n).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),ne(this,tt,y0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof mu&&w.revert&&this.setState({...S(this,ki),fetchStatus:"idle"}),r.abort()},onFail:(w,A)=>{be(this,rn,$n).call(this,{type:"failed",failureCount:w,error:A})},onPause:()=>{be(this,rn,$n).call(this,{type:"pause"})},onContinue:()=>{be(this,rn,$n).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await S(this,tt).start();if(w===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(d=S(this,Ht).config).onSuccess)==null||h.call(d,w,this),(g=(p=S(this,Ht).config).onSettled)==null||g.call(p,w,this.state.error,this),w}catch(w){if(w instanceof mu){if(w.silent)return S(this,tt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw be(this,rn,$n).call(this,{type:"error",error:w}),(y=(m=S(this,Ht).config).onError)==null||y.call(m,w,this),(v=(b=S(this,Ht).config).onSettled)==null||v.call(b,this.state.data,w,this),w}finally{this.scheduleGc()}}},uo=new WeakMap,ki=new WeakMap,Ht=new WeakMap,fo=new WeakMap,tt=new WeakMap,Us=new WeakMap,ho=new WeakMap,rn=new WeakSet,$n=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...v0(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...zh(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,ki,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Ht).notify({query:this,type:"updated",action:t})})},Jg);function v0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $h(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Lt,Ce,Bs,_t,po,Ci,Hn,xr,Ws,_i,Ei,mo,go,wr,Si,Me,hs,gu,yu,bu,vu,xu,wu,Au,x0,Xg,mw=(Xg=class extends Ui{constructor(t,n){super();fe(this,Me);fe(this,Lt);fe(this,Ce);fe(this,Bs);fe(this,_t);fe(this,po);fe(this,Ci);fe(this,Hn);fe(this,xr);fe(this,Ws);fe(this,_i);fe(this,Ei);fe(this,mo);fe(this,go);fe(this,wr);fe(this,Si,new Set);this.options=n,ne(this,Lt,t),ne(this,xr,null),ne(this,Hn,pu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Ce).addObserver(this),Uh(S(this,Ce),this.options)?be(this,Me,hs).call(this):this.updateResult(),be(this,Me,vu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ku(S(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ku(S(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Me,xu).call(this),be(this,Me,wu).call(this),S(this,Ce).removeObserver(this)}setOptions(t){const n=this.options,r=S(this,Ce);if(this.options=S(this,Lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qt(this.options.enabled,S(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Me,Au).call(this),S(this,Ce).setOptions(this.options),n._defaulted&&!Va(this.options,n)&&S(this,Lt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Ce),observer:this});const o=this.hasListeners();o&&Bh(S(this,Ce),r,this.options,n)&&be(this,Me,hs).call(this),this.updateResult(),o&&(S(this,Ce)!==r||qt(this.options.enabled,S(this,Ce))!==qt(n.enabled,S(this,Ce))||Nr(this.options.staleTime,S(this,Ce))!==Nr(n.staleTime,S(this,Ce)))&&be(this,Me,gu).call(this);const i=be(this,Me,yu).call(this);o&&(S(this,Ce)!==r||qt(this.options.enabled,S(this,Ce))!==qt(n.enabled,S(this,Ce))||i!==S(this,wr))&&be(this,Me,bu).call(this,i)}getOptimisticResult(t){const n=S(this,Lt).getQueryCache().build(S(this,Lt),t),r=this.createResult(n,t);return yw(this,r)&&(ne(this,_t,r),ne(this,Ci,this.options),ne(this,po,S(this,Ce).state)),r}getCurrentResult(){return S(this,_t)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,Hn).status==="pending"&&S(this,Hn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(t){S(this,Si).add(t)}getCurrentQuery(){return S(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,Lt).defaultQueryOptions(t),r=S(this,Lt).getQueryCache().build(S(this,Lt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Me,hs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,_t)))}createResult(t,n){var N;const r=S(this,Ce),o=this.options,i=S(this,_t),s=S(this,po),a=S(this,Ci),c=t!==r?t.state:S(this,Bs),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const P=this.hasListeners(),I=!P&&Uh(t,n),W=P&&Bh(t,r,n,o);(I||W)&&(f={...f,...v0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:m}=f;h=f.data;let y=!1;if(n.placeholderData!==void 0&&h===void 0&&m==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=i.data,y=!0):P=typeof n.placeholderData=="function"?n.placeholderData((N=S(this,Ei))==null?void 0:N.state.data,S(this,Ei)):n.placeholderData,P!==void 0&&(m="success",h=hu(i==null?void 0:i.data,P,n),d=!0)}if(n.select&&h!==void 0&&!y)if(i&&h===(s==null?void 0:s.data)&&n.select===S(this,Ws))h=S(this,_i);else try{ne(this,Ws,n.select),h=n.select(h),h=hu(i==null?void 0:i.data,h,n),ne(this,_i,h),ne(this,xr,null)}catch(P){ne(this,xr,P)}S(this,xr)&&(p=S(this,xr),h=S(this,_i),g=Date.now(),m="error");const b=f.fetchStatus==="fetching",v=m==="pending",w=m==="error",A=v&&b,C=h!==void 0,E={status:m,fetchStatus:f.fetchStatus,isPending:v,isSuccess:m==="success",isError:w,isInitialLoading:A,isLoading:A,data:h,dataUpdatedAt:f.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!v,isLoadingError:w&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&C,isStale:Qf(t,n),refetch:this.refetch,promise:S(this,Hn),isEnabled:qt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=j=>{E.status==="error"?j.reject(E.error):E.data!==void 0&&j.resolve(E.data)},I=()=>{const j=ne(this,Hn,E.promise=pu());P(j)},W=S(this,Hn);switch(W.status){case"pending":t.queryHash===r.queryHash&&P(W);break;case"fulfilled":(E.status==="error"||E.data!==W.value)&&I();break;case"rejected":(E.status!=="error"||E.error!==W.reason)&&I();break}}return E}updateResult(){const t=S(this,_t),n=this.createResult(S(this,Ce),this.options);if(ne(this,po,S(this,Ce).state),ne(this,Ci,this.options),S(this,po).data!==void 0&&ne(this,Ei,S(this,Ce)),Va(n,t))return;ne(this,_t,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!S(this,Si).size)return!0;const s=new Set(i??S(this,Si));return this.options.throwOnError&&s.add("error"),Object.keys(S(this,_t)).some(a=>{const l=a;return S(this,_t)[l]!==t[l]&&s.has(l)})};be(this,Me,x0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Me,vu).call(this)}},Lt=new WeakMap,Ce=new WeakMap,Bs=new WeakMap,_t=new WeakMap,po=new WeakMap,Ci=new WeakMap,Hn=new WeakMap,xr=new WeakMap,Ws=new WeakMap,_i=new WeakMap,Ei=new WeakMap,mo=new WeakMap,go=new WeakMap,wr=new WeakMap,Si=new WeakMap,Me=new WeakSet,hs=function(t){be(this,Me,Au).call(this);let n=S(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(St)),n},gu=function(){be(this,Me,xu).call(this);const t=Nr(this.options.staleTime,S(this,Ce));if(Co||S(this,_t).isStale||!uu(t))return;const r=p0(S(this,_t).dataUpdatedAt,t)+1;ne(this,mo,ro.setTimeout(()=>{S(this,_t).isStale||this.updateResult()},r))},yu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Ce)):this.options.refetchInterval)??!1},bu=function(t){be(this,Me,wu).call(this),ne(this,wr,t),!(Co||qt(this.options.enabled,S(this,Ce))===!1||!uu(S(this,wr))||S(this,wr)===0)&&ne(this,go,ro.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&be(this,Me,hs).call(this)},S(this,wr)))},vu=function(){be(this,Me,gu).call(this),be(this,Me,bu).call(this,be(this,Me,yu).call(this))},xu=function(){S(this,mo)&&(ro.clearTimeout(S(this,mo)),ne(this,mo,void 0))},wu=function(){S(this,go)&&(ro.clearInterval(S(this,go)),ne(this,go,void 0))},Au=function(){const t=S(this,Lt).getQueryCache().build(S(this,Lt),this.options);if(t===S(this,Ce))return;const n=S(this,Ce);ne(this,Ce,t),ne(this,Bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},x0=function(t){Ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,_t))}),S(this,Lt).getQueryCache().notify({query:S(this,Ce),type:"observerResultsUpdated"})})},Xg);function gw(e,t){return qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Uh(e,t){return gw(e,t)||e.state.data!==void 0&&ku(e,t,t.refetchOnMount)}function ku(e,t,n){if(qt(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Qf(e,t)}return!1}function Bh(e,t,n,r){return(e!==t||qt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Qf(e,n)}function Qf(e,t){return qt(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function yw(e,t){return!Va(e.getCurrentResult(),t)}function Wh(e){return{onFetch:(t,n)=>{var u,f,d,h,p;const r=t.options,o=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const m=v=>{lw(v,()=>t.signal,()=>g=!0)},y=m0(t.options,t.fetchOptions),b=async(v,w,A)=>{if(g)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const _=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:A?"backward":"forward",meta:t.options.meta};return m(I),I})(),E=await y(_),{maxPages:N}=t.options,P=A?aw:sw;return{pages:P(v.pages,E,N),pageParams:P(v.pageParams,w,N)}};if(o&&i.length){const v=o==="backward",w=v?bw:Kh,A={pages:i,pageParams:s},C=w(r,A);a=await b(A,C,v)}else{const v=e??i.length;do{const w=l===0?s[0]??r.initialPageParam:Kh(r,a);if(l>0&&w==null)break;a=await b(a,w),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var g,m;return(m=(g=t.options).persister)==null?void 0:m.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function bw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ks,yn,Et,yo,bn,mr,e0,vw=(e0=class extends b0{constructor(t){super();fe(this,bn);fe(this,Ks);fe(this,yn);fe(this,Et);fe(this,yo);ne(this,Ks,t.client),this.mutationId=t.mutationId,ne(this,Et,t.mutationCache),ne(this,yn,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,yn).includes(t)||(S(this,yn).push(t),this.clearGcTimeout(),S(this,Et).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,yn,S(this,yn).filter(n=>n!==t)),this.scheduleGc(),S(this,Et).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,yn).length||(this.state.status==="pending"?this.scheduleGc():S(this,Et).remove(this))}continue(){var t;return((t=S(this,yo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,c,u,f,d,h,p,g,m,y,b,v,w,A,C,_,E,N;const n=()=>{be(this,bn,mr).call(this,{type:"continue"})},r={client:S(this,Ks),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,yo,y0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{be(this,bn,mr).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{be(this,bn,mr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,Et).canRun(this)}));const o=this.state.status==="pending",i=!S(this,yo).canStart();try{if(o)n();else{be(this,bn,mr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=S(this,Et).config).onMutate)==null?void 0:a.call(s,t,this,r));const I=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));I!==this.state.context&&be(this,bn,mr).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const P=await S(this,yo).start();return await((f=(u=S(this,Et).config).onSuccess)==null?void 0:f.call(u,P,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,P,t,this.state.context,r)),await((g=(p=S(this,Et).config).onSettled)==null?void 0:g.call(p,P,null,this.state.variables,this.state.context,this,r)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,P,null,t,this.state.context,r)),be(this,bn,mr).call(this,{type:"success",data:P}),P}catch(P){try{await((v=(b=S(this,Et).config).onError)==null?void 0:v.call(b,P,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((A=(w=this.options).onError)==null?void 0:A.call(w,P,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((_=(C=S(this,Et).config).onSettled)==null?void 0:_.call(C,void 0,P,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((N=(E=this.options).onSettled)==null?void 0:N.call(E,void 0,P,t,this.state.context,r))}catch(I){Promise.reject(I)}throw be(this,bn,mr).call(this,{type:"error",error:P}),P}finally{S(this,Et).runNext(this)}}},Ks=new WeakMap,yn=new WeakMap,Et=new WeakMap,yo=new WeakMap,bn=new WeakSet,mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ze.batch(()=>{S(this,yn).forEach(r=>{r.onMutationUpdate(t)}),S(this,Et).notify({mutation:this,type:"updated",action:t})})},e0);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qn,on,Hs,t0,xw=(t0=class extends Ui{constructor(t={}){super();fe(this,qn);fe(this,on);fe(this,Hs);this.config=t,ne(this,qn,new Set),ne(this,on,new Map),ne(this,Hs,0)}build(t,n,r){const o=new vw({client:t,mutationCache:this,mutationId:++ca(this,Hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){S(this,qn).add(t);const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n);r?r.push(t):S(this,on).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,qn).delete(t)){const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&S(this,on).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=da(t);if(typeof n=="string"){const r=S(this,on).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=da(t);if(typeof n=="string"){const o=(r=S(this,on).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{S(this,qn).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,qn).clear(),S(this,on).clear()})}getAll(){return Array.from(S(this,qn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dh(n,r))}findAll(t={}){return this.getAll().filter(n=>Dh(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(St))))}},qn=new WeakMap,on=new WeakMap,Hs=new WeakMap,t0);function da(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vn,Ar,Rt,Yn,Jn,Ma,Cu,n0,ww=(n0=class extends Ui{constructor(n,r){super();fe(this,Jn);fe(this,Vn);fe(this,Ar);fe(this,Rt);fe(this,Yn);ne(this,Vn,n),this.setOptions(r),this.bindMethods(),be(this,Jn,Ma).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=S(this,Vn).defaultMutationOptions(n),Va(this.options,r)||S(this,Vn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Rt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&_o(r.mutationKey)!==_o(this.options.mutationKey)?this.reset():((o=S(this,Rt))==null?void 0:o.state.status)==="pending"&&S(this,Rt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=S(this,Rt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,Jn,Ma).call(this),be(this,Jn,Cu).call(this,n)}getCurrentResult(){return S(this,Ar)}reset(){var n;(n=S(this,Rt))==null||n.removeObserver(this),ne(this,Rt,void 0),be(this,Jn,Ma).call(this),be(this,Jn,Cu).call(this)}mutate(n,r){var o;return ne(this,Yn,r),(o=S(this,Rt))==null||o.removeObserver(this),ne(this,Rt,S(this,Vn).getMutationCache().build(S(this,Vn),this.options)),S(this,Rt).addObserver(this),S(this,Rt).execute(n)}},Vn=new WeakMap,Ar=new WeakMap,Rt=new WeakMap,Yn=new WeakMap,Jn=new WeakSet,Ma=function(){var r;const n=((r=S(this,Rt))==null?void 0:r.state)??w0();ne(this,Ar,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Cu=function(n){Ze.batch(()=>{var r,o,i,s,a,l,c,u;if(S(this,Yn)&&this.hasListeners()){const f=S(this,Ar).variables,d=S(this,Ar).context,h={client:S(this,Vn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(o=(r=S(this,Yn)).onSuccess)==null||o.call(r,n.data,f,d,h)}catch(p){Promise.reject(p)}try{(s=(i=S(this,Yn)).onSettled)==null||s.call(i,n.data,null,f,d,h)}catch(p){Promise.reject(p)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=S(this,Yn)).onError)==null||l.call(a,n.error,f,d,h)}catch(p){Promise.reject(p)}try{(u=(c=S(this,Yn)).onSettled)==null||u.call(c,void 0,n.error,f,d,h)}catch(p){Promise.reject(p)}}}this.listeners.forEach(f=>{f(S(this,Ar))})})},n0),vn,r0,Aw=(r0=class extends Ui{constructor(t={}){super();fe(this,vn);this.config=t,ne(this,vn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??qf(o,n);let s=this.get(i);return s||(s=new pw({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){S(this,vn).has(t.queryHash)||(S(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,vn).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,vn).get(t)}getAll(){return[...S(this,vn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rh(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,r0),Ke,kr,Cr,Ti,Ni,_r,Oi,Pi,o0,A0=(o0=class{constructor(e={}){fe(this,Ke);fe(this,kr);fe(this,Cr);fe(this,Ti);fe(this,Ni);fe(this,_r);fe(this,Oi);fe(this,Pi);ne(this,Ke,e.queryCache||new Aw),ne(this,kr,e.mutationCache||new xw),ne(this,Cr,e.defaultOptions||{}),ne(this,Ti,new Map),ne(this,Ni,new Map),ne(this,_r,0)}mount(){ca(this,_r)._++,S(this,_r)===1&&(ne(this,Oi,Yf.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ke).onFocus())})),ne(this,Pi,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ke).onOnline())})))}unmount(){var e,t;ca(this,_r)._--,S(this,_r)===0&&((e=S(this,Oi))==null||e.call(this),ne(this,Oi,void 0),(t=S(this,Pi))==null||t.call(this),ne(this,Pi,void 0))}isFetching(e){return S(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,kr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return S(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=S(this,Ke).get(r.queryHash),i=o==null?void 0:o.state.data,s=rw(t,i);if(s!==void 0)return S(this,Ke).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>S(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,Ke);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,Ke);return Ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ze.batch(()=>S(this,Ke).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(St).catch(St)}invalidateQueries(e,t={}){return Ze.batch(()=>(S(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ze.batch(()=>S(this,Ke).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(St)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,Ke).build(this,t);return n.isStaleByTime(Nr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}fetchInfiniteQuery(e){return e.behavior=Wh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(St).catch(St)}ensureInfiniteQueryData(e){return e.behavior=Wh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qa.isOnline()?S(this,kr).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ke)}getMutationCache(){return S(this,kr)}getDefaultOptions(){return S(this,Cr)}setDefaultOptions(e){ne(this,Cr,e)}setQueryDefaults(e,t){S(this,Ti).set(_o(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Ti).values()],n={};return t.forEach(r=>{_s(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ni).set(_o(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ni).values()],n={};return t.forEach(r=>{_s(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Cr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ya&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Cr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ke).clear(),S(this,kr).clear()}},Ke=new WeakMap,kr=new WeakMap,Cr=new WeakMap,Ti=new WeakMap,Ni=new WeakMap,_r=new WeakMap,Oi=new WeakMap,Pi=new WeakMap,o0),k0=k.createContext(void 0),C0=e=>{const t=k.useContext(k0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kw=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(k0.Provider,{value:e,children:t})),_0=k.createContext(!1),Cw=()=>k.useContext(_0);_0.Provider;function _w(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ew=k.createContext(_w()),Sw=()=>k.useContext(Ew),Tw=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Vf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Nw=e=>{k.useEffect(()=>{e.clearReset()},[e])},Ow=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Vf(n,[e.error,r])),Pw=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mw=(e,t)=>e.isLoading&&e.isFetching&&!t,Iw=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lw(e,t,n){var d,h,p,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Cw(),o=Sw(),i=C0(n),s=i.defaultQueryOptions(e);(h=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,s);const a=i.getQueryCache().get(s.queryHash);process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=r?"isRestoring":"optimistic",Pw(s),Tw(s,o,a),Nw(o);const l=!i.getQueryCache().get(s.queryHash),[c]=k.useState(()=>new t(i,s)),u=c.getOptimisticResult(s),f=!r&&e.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(m=>{const y=f?c.subscribe(Ze.batchCalls(m)):St;return c.updateResult(),y},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),k.useEffect(()=>{c.setOptions(s)},[s,c]),Iw(s,u))throw Hh(s,c,o);if(Ow({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw u.error;if((g=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,s,u),s.experimental_prefetchInRender&&!Co&&Mw(u,r)){const m=l?Hh(s,c,o):a==null?void 0:a.promise;m==null||m.catch(St).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?u:c.trackResult(u)}function kl(e,t){return Lw(e,mw,t)}function Gf(e,t){const n=C0(t),[r]=k.useState(()=>new ww(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const o=k.useSyncExternalStore(k.useCallback(s=>r.subscribe(Ze.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=k.useCallback((s,a)=>{r.mutate(s,a).catch(St)},[r]);if(o.error&&Vf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const Zf=T.createContext({queryClient:new A0});Zf.Provider;const jr=()=>{const e=T.useContext(Zf);if(!e)throw new Error("useConfidenceContext must be used within a ConfidenceContext");return e},E0=({children:e})=>{const[t]=T.useState(new A0);return x.jsx(Zf.Provider,{value:{queryClient:t},children:x.jsx(kw,{client:t,children:e})})},Be={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},S0="https://marketplace.confidence.com/api",rr=S0+"/confidence",qh=S0+"/dropbox/prod",Rw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},Dw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>Rw(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},Fw=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},jw=()=>{const{queryClient:e}=jr(),t=Gf({mutationFn:async r=>await Fw(r)},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},T0=(e,t)=>{const{queryClient:n}=jr(),r=kl({initialData:{},queryFn:()=>n.getQueryData(["PLAYBOOK_EXPANDED_TASKS",+e]),queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),o=a=>{var l;return((l=r.data)==null?void 0:l[a.toString()])??!1},i=(a,l)=>{var c;n.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[a]:l!==void 0?l:!o(a)})),(c=t==null?void 0:t.onTaskExpanded)==null||c.call(t,a,o(a))},s=T.useMemo(()=>Object.values(r.data??{}).some(a=>a),[r.data]);return{isTaskExpanded:o,toggleTaskExpanded:i,isAtLeastOneTaskExpanded:s}},zw=(e,t)=>{const{queryClient:n}=jr(),{completeTask:r}=Dw(),{startTask:o}=jw(),{toggleTaskExpanded:i}=T0(e);return{completeTask:async(l,c)=>{const{status:u}=await r(l.toString());u&&(i(l,!1),n.setQueryData(["playbook",+e],f=>{if(!f)return f;const d=f.tasks.map(h=>h.sequenceOrder===c+1&&t.quickComplete?{...h,workflowStatus:Be.IN_PROGRESS}:h.taskInstanceId===l?{...h,workflowStatus:u}:h);return{...f,tasks:d}}))},startTask:async l=>{const{status:c}=await o(l.toString());c&&(i(l,!0),n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(d=>d.taskInstanceId===l?{...d,workflowStatus:c}:d);return{...u,tasks:f}}))}}},$w=e=>{var o;const{queryClient:t}=jr(),n=kl({queryFn:async()=>{const i=new Headers,s=await fetch(`${rr}/playbook-details`,{method:"POST",cache:"no-store",headers:i,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]},t),r=zw(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},ui={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE",ADD_COMMENT:"ADD_COMMENT"},Uw={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},Bw=e=>{const{taskStatus:t,canStart:n}=e;return{buttons:T.useMemo(()=>t===Be.OPEN&&n?[ui.START]:t===Be.IN_PROGRESS?[ui.PAUSE,ui.COMPLETE]:t===Be.COMPLETED?[]:[],[e.taskStatus,e.canStart])}},N0=async e=>{const t=new Headers;return t.append("Content-Type","application/json"),await(await fetch(`${rr}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json()},Cl='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{:root,:host{--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro";--fa-font-duotone:normal 900 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-regular:normal 400 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-light:normal 300 1em/1 "Font Awesome 6 Duotone";--fa-font-duotone-thin:normal 100 1em/1 "Font Awesome 6 Duotone";--fa-font-brands:normal 400 1em/1 "Font Awesome 6 Brands";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-regular:normal 400 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-light:normal 300 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-thin:normal 100 1em/1 "Font Awesome 6 Sharp";--fa-font-sharp-duotone-solid:normal 900 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-regular:normal 400 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-light:normal 300 1em/1 "Font Awesome 6 Sharp Duotone";--fa-font-sharp-duotone-thin:normal 100 1em/1 "Font Awesome 6 Sharp Duotone"}svg.svg-inline--fa:not(:root),svg.svg-inline--fa:not(:host){box-sizing:content-box;overflow:visible}.svg-inline--fa{display:var(--fa-display,inline-block);vertical-align:-.125em;height:1em;overflow:visible}.svg-inline--fa.fa-2xs{vertical-align:.1em}.svg-inline--fa.fa-xs{vertical-align:0}.svg-inline--fa.fa-sm{vertical-align:-.07143em}.svg-inline--fa.fa-lg{vertical-align:-.2em}.svg-inline--fa.fa-xl{vertical-align:-.25em}.svg-inline--fa.fa-2xl{vertical-align:-.3125em}.svg-inline--fa.fa-pull-left{margin-right:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-pull-right{margin-left:var(--fa-pull-margin,.3em);width:auto}.svg-inline--fa.fa-li{width:var(--fa-li-width,2em);top:.25em}.svg-inline--fa.fa-fw{width:var(--fa-fw-width,1.25em)}.fa-layers svg.svg-inline--fa{margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.fa-layers-counter,.fa-layers-text{text-align:center;display:inline-block;position:absolute}.fa-layers{text-align:center;vertical-align:-.125em;width:1em;height:1em;display:inline-block;position:relative}.fa-layers svg.svg-inline--fa{transform-origin:50%}.fa-layers-text{transform-origin:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.fa-layers-counter{background-color:var(--fa-counter-background-color,#ff253a);border-radius:var(--fa-counter-border-radius,1em);box-sizing:border-box;color:var(--fa-inverse,#fff);line-height:var(--fa-counter-line-height,1);max-width:var(--fa-counter-max-width,5em);min-width:var(--fa-counter-min-width,1.5em);padding:var(--fa-counter-padding,.25em .5em);right:var(--fa-right,0);text-overflow:ellipsis;top:var(--fa-top,0);transform:scale(var(--fa-counter-scale,.25));transform-origin:100% 0;overflow:hidden}.fa-layers-bottom-right{bottom:var(--fa-bottom,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 100%;top:auto}.fa-layers-bottom-left{bottom:var(--fa-bottom,0);left:var(--fa-left,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 100%;top:auto;right:auto}.fa-layers-top-right{top:var(--fa-top,0);right:var(--fa-right,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:100% 0}.fa-layers-top-left{left:var(--fa-left,0);right:auto;top:var(--fa-top,0);transform:scale(var(--fa-layers-scale,.25));transform-origin:0 0}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-2xs{vertical-align:.225em;font-size:.625em;line-height:.1em}.fa-xs{vertical-align:.125em;font-size:.75em;line-height:.08333em}.fa-sm{vertical-align:.05357em;font-size:.875em;line-height:.07143em}.fa-lg{vertical-align:-.075em;font-size:1.25em;line-height:.05em}.fa-xl{vertical-align:-.125em;font-size:1.5em;line-height:.04167em}.fa-2xl{vertical-align:-.1875em;font-size:2em;line-height:.03125em}.fa-fw{text-align:center;width:1.25em}.fa-ul{margin-left:var(--fa-li-margin,2.5em);padding-left:0;list-style-type:none}.fa-ul>li{position:relative}.fa-li{left:calc(-1*var(--fa-li-width,2em));text-align:center;width:var(--fa-li-width,2em);line-height:inherit;position:absolute}.fa-border{border-color:var(--fa-border-color,#eee);border-radius:var(--fa-border-radius,.1em);border-style:var(--fa-border-style,solid);border-width:var(--fa-border-width,.08em);padding:var(--fa-border-padding,.2em .25em .15em)}.fa-pull-left{float:left;margin-right:var(--fa-pull-margin,.3em)}.fa-pull-right{float:right;margin-left:var(--fa-pull-margin,.3em)}.fa-beat{animation-name:fa-beat;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-bounce{animation-name:fa-bounce;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.28,.84,.42,1))}.fa-fade{animation-name:fa-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-beat-fade{animation-name:fa-beat-fade;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,cubic-bezier(.4,0,.6,1))}.fa-flip{animation-name:fa-flip;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,ease-in-out)}.fa-shake{animation-name:fa-shake;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin{animation-name:fa-spin;animation-delay:var(--fa-animation-delay,0s);animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,2s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,linear)}.fa-spin-reverse{--fa-animation-direction:reverse}.fa-pulse,.fa-spin-pulse{animation-name:fa-spin;animation-direction:var(--fa-animation-direction,normal);animation-duration:var(--fa-animation-duration,1s);animation-iteration-count:var(--fa-animation-iteration-count,infinite);animation-timing-function:var(--fa-animation-timing,steps(8))}@media(prefers-reduced-motion:reduce){.fa-beat,.fa-bounce,.fa-fade,.fa-beat-fade,.fa-flip,.fa-pulse,.fa-shake,.fa-spin,.fa-spin-pulse{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-iteration-count:1;animation-delay:-1ms}}@keyframes fa-beat{0%,90%{transform:scale(1)}45%{transform:scale(var(--fa-beat-scale,1.25))}}@keyframes fa-bounce{0%{transform:scale(1)translateY(0)}10%{transform:scale(var(--fa-bounce-start-scale-x,1.1),var(--fa-bounce-start-scale-y,.9))translateY(0)}30%{transform:scale(var(--fa-bounce-jump-scale-x,.9),var(--fa-bounce-jump-scale-y,1.1))translateY(var(--fa-bounce-height,-.5em))}50%{transform:scale(var(--fa-bounce-land-scale-x,1.05),var(--fa-bounce-land-scale-y,.95))translateY(0)}57%{transform:scale(1)translateY(var(--fa-bounce-rebound,-.125em))}64%{transform:scale(1)translateY(0)}to{transform:scale(1)translateY(0)}}@keyframes fa-fade{50%{opacity:var(--fa-fade-opacity,.4)}}@keyframes fa-beat-fade{0%,to{opacity:var(--fa-beat-fade-opacity,.4);transform:scale(1)}50%{opacity:1;transform:scale(var(--fa-beat-fade-scale,1.125))}}@keyframes fa-flip{50%{transform:rotate3d(var(--fa-flip-x,0),var(--fa-flip-y,1),var(--fa-flip-z,0),var(--fa-flip-angle,-180deg))}}@keyframes fa-shake{0%{transform:rotate(-15deg)}4%{transform:rotate(15deg)}8%,24%{transform:rotate(-18deg)}12%,28%{transform:rotate(18deg)}16%{transform:rotate(-22deg)}20%{transform:rotate(22deg)}32%{transform:rotate(-12deg)}36%{transform:rotate(12deg)}40%,to{transform:rotate(0)}}@keyframes fa-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-rotate-90{transform:rotate(90deg)}.fa-rotate-180{transform:rotate(180deg)}.fa-rotate-270{transform:rotate(270deg)}.fa-flip-horizontal{transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}.fa-rotate-by{transform:rotate(var(--fa-rotate-angle,0))}.fa-stack{vertical-align:middle;width:2.5em;height:2em;display:inline-block;position:relative}.fa-stack-1x,.fa-stack-2x{z-index:var(--fa-stack-z-index,auto);margin:auto;position:absolute;top:0;right:0;bottom:0;left:0}.svg-inline--fa.fa-stack-1x{width:1.25em;height:1em}.svg-inline--fa.fa-stack-2x{width:2.5em;height:2em}.fa-inverse{color:var(--fa-inverse,#fff)}.sr-only,.fa-sr-only,.sr-only-focusable:not(:focus),.fa-sr-only-focusable:not(:focus){clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.svg-inline--fa .fa-primary{fill:var(--fa-primary-color,currentColor);opacity:var(--fa-primary-opacity,1)}.svg-inline--fa .fa-secondary{fill:var(--fa-secondary-color,currentColor);opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-primary{opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity .fa-secondary{opacity:var(--fa-primary-opacity,1)}.svg-inline--fa mask .fa-primary,.svg-inline--fa mask .fa-secondary{fill:#000}@layer theme{:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1)}}@layer base{.confidence-playbook{all:unset;display:block}.confidence-playbook,.confidence-playbook *,.confidence-playbook :after,.confidence-playbook :before,.confidence-playbook ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.confidence-playbook{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.confidence-playbook hr{height:0;color:inherit;border-top-width:1px}.confidence-playbook abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.confidence-playbook h1,.confidence-playbook h2,.confidence-playbook h3,.confidence-playbook h4,.confidence-playbook h5,.confidence-playbook h6{font-size:inherit;font-weight:inherit}.confidence-playbook a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.confidence-playbook b,.confidence-playbook strong{font-weight:bolder}.confidence-playbook code,.confidence-playbook kbd,.confidence-playbook samp,.confidence-playbook pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.confidence-playbook small{font-size:80%}.confidence-playbook sub,.confidence-playbook sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.confidence-playbook sub{bottom:-.25em}.confidence-playbook sup{top:-.5em}.confidence-playbook table{text-indent:0;border-color:inherit;border-collapse:collapse}.confidence-playbook :-moz-focusring{outline:auto}.confidence-playbook progress{vertical-align:baseline}.confidence-playbook summary{display:list-item}.confidence-playbook ol,.confidence-playbook ul,.confidence-playbook menu{list-style:none}.confidence-playbook img,.confidence-playbook svg,.confidence-playbook video,.confidence-playbook canvas,.confidence-playbook audio,.confidence-playbook iframe,.confidence-playbook embed,.confidence-playbook object{vertical-align:middle;display:block}.confidence-playbook img,.confidence-playbook video{max-width:100%;height:auto}.confidence-playbook button,.confidence-playbook input,.confidence-playbook select,.confidence-playbook optgroup,.confidence-playbook textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.confidence-playbook :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.confidence-playbook :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.confidence-playbook ::file-selector-button{margin-inline-end:4px}.confidence-playbook ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.confidence-playbook ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.confidence-playbook ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.confidence-playbook textarea{resize:vertical}.confidence-playbook ::-webkit-search-decoration{-webkit-appearance:none}.confidence-playbook ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.confidence-playbook ::-webkit-datetime-edit{display:inline-flex}.confidence-playbook ::-webkit-datetime-edit-fields-wrapper{padding:0}.confidence-playbook ::-webkit-datetime-edit{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-year-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-month-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-day-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-hour-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-minute-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-second-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-millisecond-field{padding-block:0}.confidence-playbook ::-webkit-datetime-edit-meridiem-field{padding-block:0}.confidence-playbook ::-webkit-calendar-picker-indicator{line-height:1}.confidence-playbook :-moz-ui-invalid{box-shadow:none}.confidence-playbook button,.confidence-playbook input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.confidence-playbook ::-webkit-inner-spin-button{height:auto}.confidence-playbook ::-webkit-outer-spin-button{height:auto}.confidence-playbook [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.confidence-playbook .pointer-events-none{pointer-events:none}.confidence-playbook .absolute{position:absolute}.confidence-playbook .fixed{position:fixed}.confidence-playbook .relative{position:relative}.confidence-playbook .sticky{position:sticky}.confidence-playbook .inset-0{inset:calc(var(--spacing)*0)}.confidence-playbook .top-0{top:calc(var(--spacing)*0)}.confidence-playbook .top-0\\.5{top:calc(var(--spacing)*.5)}.confidence-playbook .top-1{top:calc(var(--spacing)*1)}.confidence-playbook .top-3{top:calc(var(--spacing)*3)}.confidence-playbook .-right-0,.confidence-playbook .right-0{right:calc(var(--spacing)*0)}.confidence-playbook .bottom-0{bottom:calc(var(--spacing)*0)}.confidence-playbook .bottom-2{bottom:calc(var(--spacing)*2)}.confidence-playbook .left-0{left:calc(var(--spacing)*0)}.confidence-playbook .left-1{left:calc(var(--spacing)*1)}.confidence-playbook .left-1\\/2{left:50%}.confidence-playbook .left-4{left:calc(var(--spacing)*4)}.confidence-playbook .z-2{z-index:2}.confidence-playbook .z-10{z-index:10}.confidence-playbook .z-50{z-index:50}.confidence-playbook .z-\\[9999999997\\],.confidence-playbook .z-\\[9999999998\\],.confidence-playbook .z-\\[9999999999\\]{z-index:2147483647}.confidence-playbook .container{width:100%}@media(min-width:40rem){.confidence-playbook .container{max-width:40rem}}@media(min-width:48rem){.confidence-playbook .container{max-width:48rem}}@media(min-width:64rem){.confidence-playbook .container{max-width:64rem}}@media(min-width:80rem){.confidence-playbook .container{max-width:80rem}}@media(min-width:96rem){.confidence-playbook .container{max-width:96rem}}.confidence-playbook .m-0{margin:calc(var(--spacing)*0)}.confidence-playbook .mx-1{margin-inline:calc(var(--spacing)*1)}.confidence-playbook .mx-2{margin-inline:calc(var(--spacing)*2)}.confidence-playbook .mx-4{margin-inline:calc(var(--spacing)*4)}.confidence-playbook .mx-auto{margin-inline:auto}.confidence-playbook .my-1{margin-block:calc(var(--spacing)*1)}.confidence-playbook .my-2{margin-block:calc(var(--spacing)*2)}.confidence-playbook .-mt-\\[1px\\]{margin-top:-1px}.confidence-playbook .mt-0{margin-top:calc(var(--spacing)*0)}.confidence-playbook .mt-3{margin-top:calc(var(--spacing)*3)}.confidence-playbook .mr-2{margin-right:calc(var(--spacing)*2)}.confidence-playbook .-mb-3{margin-bottom:calc(var(--spacing)*-3)}.confidence-playbook .mb-1{margin-bottom:calc(var(--spacing)*1)}.confidence-playbook .mb-2{margin-bottom:calc(var(--spacing)*2)}.confidence-playbook .mb-4{margin-bottom:calc(var(--spacing)*4)}.confidence-playbook .ml-2{margin-left:calc(var(--spacing)*2)}.confidence-playbook .block{display:block}.confidence-playbook .flex{display:flex}.confidence-playbook .hidden{display:none}.confidence-playbook .inline-flex{display:inline-flex}.confidence-playbook .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.confidence-playbook .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.confidence-playbook .h-2{height:calc(var(--spacing)*2)}.confidence-playbook .h-3{height:calc(var(--spacing)*3)}.confidence-playbook .h-4{height:calc(var(--spacing)*4)}.confidence-playbook .h-16{height:calc(var(--spacing)*16)}.confidence-playbook .h-\\[18px\\]{height:18px}.confidence-playbook .h-\\[20px\\]{height:20px}.confidence-playbook .h-\\[22px\\]{height:22px}.confidence-playbook .h-\\[24px\\]{height:24px}.confidence-playbook .h-\\[30px\\]{height:30px}.confidence-playbook .h-\\[38px\\]{height:38px}.confidence-playbook .h-\\[40px\\]{height:40px}.confidence-playbook .h-\\[75px\\]{height:75px}.confidence-playbook .h-\\[100vh\\]{height:100vh}.confidence-playbook .h-\\[110px\\]{height:110px}.confidence-playbook .h-full{height:100%}.confidence-playbook .min-h-16{min-height:calc(var(--spacing)*16)}.confidence-playbook .min-h-screen{min-height:100vh}.confidence-playbook .w-1\\/3{width:33.3333%}.confidence-playbook .w-3{width:calc(var(--spacing)*3)}.confidence-playbook .w-4{width:calc(var(--spacing)*4)}.confidence-playbook .w-\\[20px\\]{width:20px}.confidence-playbook .w-\\[27px\\]{width:27px}.confidence-playbook .w-\\[38px\\]{width:38px}.confidence-playbook .w-\\[75px\\]{width:75px}.confidence-playbook .w-\\[400px\\]{width:400px}.confidence-playbook .w-\\[calc\\(100vw-1rem\\)\\]{width:calc(100vw - 1rem)}.confidence-playbook .w-full{width:100%}.confidence-playbook .w-screen{width:100vw}.confidence-playbook .max-w-400{max-width:calc(var(--spacing)*400)}.confidence-playbook .max-w-\\[300px\\]{max-width:300px}.confidence-playbook .max-w-\\[420px\\]{max-width:420px}.confidence-playbook .max-w-lg{max-width:var(--container-lg)}.confidence-playbook .max-w-md{max-width:var(--container-md)}.confidence-playbook .min-w-0{min-width:calc(var(--spacing)*0)}.confidence-playbook .min-w-\\[106px\\]{min-width:106px}.confidence-playbook .min-w-\\[140px\\]{min-width:140px}.confidence-playbook .min-w-\\[160px\\]{min-width:160px}.confidence-playbook .min-w-\\[172px\\]{min-width:172px}.confidence-playbook .min-w-\\[270px\\]{min-width:270px}.confidence-playbook .min-w-fit{min-width:fit-content}.confidence-playbook .flex-1{flex:1}.confidence-playbook .flex-shrink-0{flex-shrink:0}.confidence-playbook .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.confidence-playbook .rotate-180{rotate:180deg}.confidence-playbook .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.confidence-playbook .animate-progress{animation:1.5s ease-in-out infinite progress}.confidence-playbook .animate-pulse{animation:var(--animate-pulse)}.confidence-playbook .animate-spin{animation:var(--animate-spin)}.confidence-playbook .cursor-not-allowed{cursor:not-allowed}.confidence-playbook .cursor-pointer{cursor:pointer}.confidence-playbook .cursor-zoom-in{cursor:zoom-in}.confidence-playbook .resize{resize:both}.confidence-playbook .list-decimal{list-style-type:decimal}.confidence-playbook .list-disc{list-style-type:disc}.confidence-playbook .flex-col{flex-direction:column}.confidence-playbook .flex-wrap{flex-wrap:wrap}.confidence-playbook .items-center{align-items:center}.confidence-playbook .items-start{align-items:flex-start}.confidence-playbook .items-stretch{align-items:stretch}.confidence-playbook .justify-between{justify-content:space-between}.confidence-playbook .justify-center{justify-content:center}.confidence-playbook .justify-end{justify-content:flex-end}.confidence-playbook .justify-start{justify-content:flex-start}.confidence-playbook .gap-1{gap:calc(var(--spacing)*1)}.confidence-playbook .gap-2{gap:calc(var(--spacing)*2)}.confidence-playbook .gap-3{gap:calc(var(--spacing)*3)}.confidence-playbook .gap-4{gap:calc(var(--spacing)*4)}:where(.confidence-playbook .space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.confidence-playbook .space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.confidence-playbook .space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.confidence-playbook .divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.confidence-playbook .divide-black\\/10>:not(:last-child)){border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)}:where(.confidence-playbook .divide-gray-100>:not(:last-child)){border-color:#ebedef}.confidence-playbook .self-end{align-self:flex-end}.confidence-playbook .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.confidence-playbook .overflow-hidden{overflow:hidden}.confidence-playbook .overflow-x-hidden{overflow-x:hidden}.confidence-playbook .overflow-y-auto{overflow-y:auto}.confidence-playbook .rounded{border-radius:.25rem}.confidence-playbook .rounded-full{border-radius:3.40282e38px}.confidence-playbook .rounded-lg{border-radius:var(--radius-lg)}.confidence-playbook .rounded-md{border-radius:var(--radius-md)}.confidence-playbook .rounded-none{border-radius:0}.confidence-playbook .rounded-sm{border-radius:var(--radius-sm)}.confidence-playbook .rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.confidence-playbook .rounded-l-sm{border-top-left-radius:var(--radius-sm);border-bottom-left-radius:var(--radius-sm)}.confidence-playbook .rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.confidence-playbook .border{border-style:var(--tw-border-style);border-width:1px}.confidence-playbook .border-0{border-style:var(--tw-border-style);border-width:0}.confidence-playbook .border-2{border-style:var(--tw-border-style);border-width:2px}.confidence-playbook .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.confidence-playbook .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.confidence-playbook .border-l-1{border-left-style:var(--tw-border-style);border-left-width:1px}.confidence-playbook .border-l-3{border-left-style:var(--tw-border-style);border-left-width:3px}.confidence-playbook .border-none{--tw-border-style:none;border-style:none}.confidence-playbook .border-\\[\\#94C8FF\\]{border-color:#94c8ff}.confidence-playbook .border-\\[\\#A5DAB1\\]{border-color:#a5dab1}.confidence-playbook .border-\\[\\#C1C5C8\\]{border-color:#c1c5c8}.confidence-playbook .border-black\\/10{border-color:oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1) oklab(0% none none/.1)}.confidence-playbook .border-danger-200{border-color:#f0aab1}.confidence-playbook .border-danger-500{border-color:#dc3545}.confidence-playbook .border-gray-50{border-color:#f5f6f7}.confidence-playbook .border-gray-100{border-color:#ebedef}.confidence-playbook .border-gray-200{border-color:#ced1d6}.confidence-playbook .border-gray-300{border-color:#b0b5bd}.confidence-playbook .border-gray-400{border-color:#757e8c}.confidence-playbook .border-gray-700{border-color:#2c3544}.confidence-playbook .border-gray-800{border-color:#232b37}.confidence-playbook .border-info-500{border-color:#17a2b8}.confidence-playbook .border-orange-500{border-color:#ff7800}.confidence-playbook .border-primary-200{border-color:#94c8ff}.confidence-playbook .border-primary-600{border-color:#0069d9}.confidence-playbook .border-purple-500{border-color:#a855f7}.confidence-playbook .border-red-500{border-color:var(--color-red-500)}.confidence-playbook .border-secondary-500{border-color:#6c757d}.confidence-playbook .border-secondary-600{border-color:#5a6268}.confidence-playbook .border-steel-500{border-color:#556987}.confidence-playbook .border-success-200{border-color:#a5dab1}.confidence-playbook .border-success-600{border-color:#218838}.confidence-playbook .border-warning-200{border-color:#ffe597}.confidence-playbook .border-warning-500{border-color:#ffc107}.confidence-playbook .border-white{border-color:#fff}.confidence-playbook .border-t-blue-500{border-top-color:var(--color-blue-500)}.confidence-playbook .border-l-danger-500{border-left-color:#dc3545}.confidence-playbook .border-l-primary-500{border-left-color:#007bff}.confidence-playbook .border-l-success-500{border-left-color:#28a745}.confidence-playbook .border-l-warning-500{border-left-color:#ffc107}.confidence-playbook .bg-\\[\\#E6F2FF\\]{background-color:#e6f2ff}.confidence-playbook .bg-\\[\\#EAF6EC\\]{background-color:#eaf6ec}.confidence-playbook .bg-\\[\\#F0F1F2\\]{background-color:#f0f1f2}.confidence-playbook .bg-\\[\\#FFE600\\]{background-color:#ffe600}.confidence-playbook .bg-black\\/30{background-color:oklab(0% none none/.3)}.confidence-playbook .bg-blue-500{background-color:var(--color-blue-500)}.confidence-playbook .bg-danger-100{background-color:#f6ccd0}.confidence-playbook .bg-danger-500{background-color:#dc3545}.confidence-playbook .bg-dark{background-color:#1c232d}.confidence-playbook .bg-fiserv-orange-500{background-color:#f60}.confidence-playbook .bg-gray-50{background-color:#f5f6f7}.confidence-playbook .bg-gray-100{background-color:#ebedef}.confidence-playbook .bg-gray-200{background-color:#ced1d6}.confidence-playbook .bg-gray-400{background-color:#757e8c}.confidence-playbook .bg-gray-500{background-color:#3a475b}.confidence-playbook .bg-gray-800{background-color:#232b37}.confidence-playbook .bg-gray-900{background-color:#1c232d}.confidence-playbook .bg-info-500{background-color:#17a2b8}.confidence-playbook .bg-orange-500{background-color:#ff7800}.confidence-playbook .bg-primary-100{background-color:#bfdeff}.confidence-playbook .bg-primary-600{background-color:#0069d9}.confidence-playbook .bg-primary-800{background-color:#0054af}.confidence-playbook .bg-purple-500{background-color:#a855f7}.confidence-playbook .bg-secondary-500{background-color:#6c757d}.confidence-playbook .bg-steel-500{background-color:#556987}.confidence-playbook .bg-success-100{background-color:#c9e9d0}.confidence-playbook .bg-success-500{background-color:#28a745}.confidence-playbook .bg-success-600{background-color:#218838}.confidence-playbook .bg-warning-100{background-color:#ffefc1}.confidence-playbook .bg-warning-500{background-color:#ffc107}.confidence-playbook .bg-white{background-color:#fff}.confidence-playbook .bg-yellow{background-color:#ffe600}.confidence-playbook .object-contain{object-fit:contain}.confidence-playbook .object-cover{object-fit:cover}.confidence-playbook .object-center{object-position:center}.confidence-playbook .p-1{padding:calc(var(--spacing)*1)}.confidence-playbook .p-2{padding:calc(var(--spacing)*2)}.confidence-playbook .p-3{padding:calc(var(--spacing)*3)}.confidence-playbook .p-4{padding:calc(var(--spacing)*4)}.confidence-playbook .px-0{padding-inline:calc(var(--spacing)*0)}.confidence-playbook .px-1{padding-inline:calc(var(--spacing)*1)}.confidence-playbook .px-2{padding-inline:calc(var(--spacing)*2)}.confidence-playbook .px-3{padding-inline:calc(var(--spacing)*3)}.confidence-playbook .px-4{padding-inline:calc(var(--spacing)*4)}.confidence-playbook .px-\\[2px\\]{padding-inline:2px}.confidence-playbook .py-1{padding-block:calc(var(--spacing)*1)}.confidence-playbook .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.confidence-playbook .py-2{padding-block:calc(var(--spacing)*2)}.confidence-playbook .py-4{padding-block:calc(var(--spacing)*4)}.confidence-playbook .pt-2{padding-top:calc(var(--spacing)*2)}.confidence-playbook .pr-2{padding-right:calc(var(--spacing)*2)}.confidence-playbook .pb-1{padding-bottom:calc(var(--spacing)*1)}.confidence-playbook .pb-2{padding-bottom:calc(var(--spacing)*2)}.confidence-playbook .pb-\\[102px\\]{padding-bottom:102px}.confidence-playbook .pl-4{padding-left:calc(var(--spacing)*4)}.confidence-playbook .text-center{text-align:center}.confidence-playbook .text-left{text-align:left}.confidence-playbook .font-mono{font-family:var(--font-mono)}.confidence-playbook .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.confidence-playbook .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.confidence-playbook .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.confidence-playbook .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.confidence-playbook .text-sm\\/6{font-size:var(--text-sm);line-height:calc(var(--spacing)*6)}.confidence-playbook .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.confidence-playbook .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.confidence-playbook .text-\\[10px\\]{font-size:10px}.confidence-playbook .leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.confidence-playbook .leading-\\[22px\\]{--tw-leading:22px;line-height:22px}.confidence-playbook .leading-\\[24px\\]{--tw-leading:24px;line-height:24px}.confidence-playbook .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.confidence-playbook .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.confidence-playbook .font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.confidence-playbook .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.confidence-playbook .whitespace-nowrap{white-space:nowrap}.confidence-playbook .text-\\[\\#0069D9\\]{color:#0069d9}.confidence-playbook .text-black{color:#000}.confidence-playbook .text-blue-600{color:var(--color-blue-600)}.confidence-playbook .text-danger-500{color:#dc3545}.confidence-playbook .text-danger-600{color:#c82333}.confidence-playbook .text-danger-900{color:#721c24}.confidence-playbook .text-dark{color:#1c232d}.confidence-playbook .text-dark-300{color:#343a40}.confidence-playbook .text-fiserv-orange-500{color:#f60}.confidence-playbook .text-gray-50{color:#f5f6f7}.confidence-playbook .text-gray-200{color:#ced1d6}.confidence-playbook .text-gray-300{color:#b0b5bd}.confidence-playbook .text-gray-400{color:#757e8c}.confidence-playbook .text-gray-500{color:#3a475b}.confidence-playbook .text-gray-700{color:#2c3544}.confidence-playbook .text-gray-800{color:#232b37}.confidence-playbook .text-gray-900{color:#1c232d}.confidence-playbook .text-info-500{color:#17a2b8}.confidence-playbook .text-orange-500{color:#ff7800}.confidence-playbook .text-primary-600{color:#0069d9}.confidence-playbook .text-primary-900{color:#004085}.confidence-playbook .text-purple-500{color:#a855f7}.confidence-playbook .text-secondary{color:#6c757d}.confidence-playbook .text-secondary-400{color:#899197}.confidence-playbook .text-secondary-500{color:#6c757d}.confidence-playbook .text-secondary-600{color:#5a6268}.confidence-playbook .text-steel-500{color:#556987}.confidence-playbook .text-success-500{color:#28a745}.confidence-playbook .text-success-600{color:#218838}.confidence-playbook .text-success-900{color:#155724}.confidence-playbook .text-warning-500{color:#ffc107}.confidence-playbook .text-warning-600{color:#f59e0b}.confidence-playbook .text-warning-900{color:#935f07}.confidence-playbook .text-white{color:#fff}.confidence-playbook .text-yellow{color:#ffe600}.confidence-playbook .uppercase{text-transform:uppercase}.confidence-playbook .italic{font-style:italic}.confidence-playbook .line-through{text-decoration-line:line-through}.confidence-playbook .underline{text-decoration-line:underline}.confidence-playbook .opacity-0{opacity:0}.confidence-playbook .opacity-50{opacity:.5}.confidence-playbook .opacity-60{opacity:.6}.confidence-playbook .opacity-70{opacity:.7}.confidence-playbook .opacity-100{opacity:1}.confidence-playbook .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.confidence-playbook .shadow-dark\\/50{--tw-shadow-color:#1c232d80}@supports (color:color-mix(in lab,red,red)){.confidence-playbook .shadow-dark\\/50{--tw-shadow-color:color-mix(in oklab,oklab(25.3864% -.0047446 -.0210213/.5) var(--tw-shadow-alpha),transparent)}}.confidence-playbook .outline{outline-style:var(--tw-outline-style);outline-width:1px}.confidence-playbook .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.confidence-playbook .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.confidence-playbook .duration-300{--tw-duration:.3s;transition-duration:.3s}.confidence-playbook .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.confidence-playbook .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.confidence-playbook .outline-none{--tw-outline-style:none;outline-style:none}.confidence-playbook .\\[writing-mode\\:vertical-lr\\]{writing-mode:vertical-lr}@media(hover:hover){.confidence-playbook .hover\\:border-primary-500:hover{border-color:#007bff}.confidence-playbook .hover\\:bg-danger-500:hover{background-color:#dc3545}.confidence-playbook .hover\\:bg-dark:hover{background-color:#1c232d}.confidence-playbook .hover\\:bg-fiserv-orange-500:hover{background-color:#f60}.confidence-playbook .hover\\:bg-gray-50:hover{background-color:#f5f6f7}.confidence-playbook .hover\\:bg-gray-100:hover{background-color:#ebedef}.confidence-playbook .hover\\:bg-gray-400:hover{background-color:#757e8c}.confidence-playbook .hover\\:bg-gray-500:hover{background-color:#3a475b}.confidence-playbook .hover\\:bg-gray-800:hover{background-color:#232b37}.confidence-playbook .hover\\:bg-gray-900:hover{background-color:#1c232d}.confidence-playbook .hover\\:bg-info-500:hover{background-color:#17a2b8}.confidence-playbook .hover\\:bg-orange-500:hover{background-color:#ff7800}.confidence-playbook .hover\\:bg-primary-700:hover{background-color:#0062cc}.confidence-playbook .hover\\:bg-primary-800:hover{background-color:#0054af}.confidence-playbook .hover\\:bg-purple-500:hover{background-color:#a855f7}.confidence-playbook .hover\\:bg-secondary-500:hover{background-color:#6c757d}.confidence-playbook .hover\\:bg-steel-500:hover{background-color:#556987}.confidence-playbook .hover\\:bg-success-500:hover{background-color:#28a745}.confidence-playbook .hover\\:bg-transparent:hover{background-color:#0000}.confidence-playbook .hover\\:bg-warning-500:hover{background-color:#ffc107}.confidence-playbook .hover\\:bg-yellow:hover{background-color:#ffe600}.confidence-playbook .hover\\:text-black:hover{color:#000}.confidence-playbook .hover\\:text-blue-600:hover{color:var(--color-blue-600)}.confidence-playbook .hover\\:text-danger-600:hover{color:#c82333}.confidence-playbook .hover\\:text-danger-700:hover{color:#bd2130}.confidence-playbook .hover\\:text-danger-800:hover{color:#aa1927}.confidence-playbook .hover\\:text-dark:hover{color:#1c232d}.confidence-playbook .hover\\:text-fiserv-orange-800:hover{color:#bf4c00}.confidence-playbook .hover\\:text-gray-400:hover{color:#757e8c}.confidence-playbook .hover\\:text-gray-700:hover{color:#2c3544}.confidence-playbook .hover\\:text-gray-800:hover{color:#232b37}.confidence-playbook .hover\\:text-gray-900:hover{color:#1c232d}.confidence-playbook .hover\\:text-info-800:hover{color:#026777}.confidence-playbook .hover\\:text-orange-800:hover{color:#c75d00}.confidence-playbook .hover\\:text-primary-600:hover{color:#0069d9}.confidence-playbook .hover\\:text-primary-700:hover{color:#0062cc}.confidence-playbook .hover\\:text-primary-800:hover{color:#0054af}.confidence-playbook .hover\\:text-purple-800:hover{color:#6f33a7}.confidence-playbook .hover\\:text-secondary-800:hover{color:#444a50}.confidence-playbook .hover\\:text-steel-800:hover{color:#333f51}.confidence-playbook .hover\\:text-success-600:hover{color:#218838}.confidence-playbook .hover\\:text-success-700:hover{color:#1e7e34}.confidence-playbook .hover\\:text-success-800:hover{color:#106c25}.confidence-playbook .hover\\:text-warning-600:hover{color:#f59e0b}.confidence-playbook .hover\\:text-warning-700:hover{color:#dd8e0a}.confidence-playbook .hover\\:text-warning-800:hover{color:#b87708}.confidence-playbook .hover\\:text-white:hover{color:#fff}.confidence-playbook .hover\\:text-yellow:hover{color:#ffe600}}.confidence-playbook .focus\\:border-red-500:focus{border-color:var(--color-red-500)}.confidence-playbook .focus\\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.confidence-playbook .focus\\:outline-3:focus{outline-style:var(--tw-outline-style);outline-width:3px}.confidence-playbook .focus\\:outline-primary-500\\/\\[\\.3\\]:focus{outline-color:#007bff4d}.confidence-playbook .active\\:bg-gray-50:active{background-color:#f5f6f7}.confidence-playbook .active\\:bg-gray-800:active{background-color:#232b37}.confidence-playbook .active\\:text-black:active{color:#000}.confidence-playbook .active\\:text-white:active{color:#fff}.confidence-playbook .disabled\\:pointer-events-none:disabled{pointer-events:none}.confidence-playbook .disabled\\:opacity-15:disabled{opacity:.15}.confidence-playbook .data-closed\\:opacity-0[data-closed]{opacity:0}.confidence-playbook .data-focus\\:-outline-offset-2[data-focus]{outline-offset:-2px}.confidence-playbook .data-focus\\:outline-primary-500[data-focus]{outline-color:#007bff}@media(min-width:48rem){.confidence-playbook .md\\:min-w-fit{min-width:fit-content}}}.confidence-playbook *{--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}.confidence-playbook{display:unset!important;color:#1c232d!important}@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme,base,components,utilities;.lexical-view-mode{word-break:break-word!important;color:#1c232d!important;width:100%!important}.lexical-view-mode ul{list-style:revert!important}.editable .lexical-view-mode:hover{cursor:text!important;background-color:#00000012!important;border-radius:1px!important;outline:4px solid #00000012!important}.lexical-view-mode .Collapsible__container{width:fit-content!important}.lexical-view-mode .Collapsible__title{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;align-items:center!important;margin-bottom:4px!important;padding:0!important;list-style:none!important;display:flex!important}.lexical-view-mode .Collapsible__title:hover{color:#0069d9!important}.lexical-view-mode .Collapsible__title:hover .editor-paragraph{text-decoration:underline!important}.lexical-view-mode .Collapsible__title::marker{display:none!important}.lexical-view-mode .Collapsible__title::-webkit-details-marker{display:none!important}.lexical-view-mode .Collapsible__title:before{content:""!important;-moz-osx-font-smoothing:grayscale!important;-webkit-font-smoothing:antialiased!important;display:var(--fa-display,inline-block)!important;font-variant:normal!important;text-rendering:auto!important;background:#fff!important;border-radius:30px!important;margin-right:4px!important;font-family:"Font Awesome 5 Pro"!important;font-style:normal!important;font-weight:900!important;line-height:1!important}.lexical-view-mode .Collapsible__title:hover:before{color:#0069d9!important;border:3px solid #fff!important;margin-left:-3px!important;margin-right:1px!important}.lexical-view-mode hr{border:none!important;margin:5px 0!important;padding:3px 0!important}.lexical-view-mode hr:after{content:""!important;background-color:#0000001a!important;height:2px!important;line-height:2px!important;display:block!important}.lexical-view-mode .editor-line-spacer{background:0 0!important;border:1px dashed #0000!important;line-height:6px!important}.lexical-view-mode .other h2{margin-bottom:7px;color:#444!important;font-size:18px!important}.lexical-view-mode .other a{font-size:14px;color:#777!important;text-decoration:underline!important}.lexical-view-mode .other ul{list-style-type:none;margin:0!important;padding:0!important}.lexical-view-mode .ltr{text-align:left}.lexical-view-mode .rtl{text-align:right}.lexical-view-mode .editor-shell{color:#1c232d!important;border-radius:4px!important;width:100%!important;font-weight:400!important;position:relative!important}.lexical-view-mode .editor{position:relative;background:#fff!important}.lexical-view-mode .editor-input{caret-color:#444;resize:none!important;-moz-tab-size:1!important;tab-size:1!important;outline:0!important;min-height:150px!important;padding:12px!important;position:relative!important}.lexical-view-mode .editor-placeholder{pointer-events:none;color:#999!important;text-overflow:ellipsis!important;-webkit-user-select:none!important;user-select:none!important;font-size:15px!important;display:inline-block!important;position:absolute!important;top:15px!important;left:10px!important;overflow:hidden!important}.lexical-view-mode .editor-text-bold,.lexical-view-mode strong{font-weight:700!important}.lexical-view-mode .editor-text-italic{font-style:italic}.lexical-view-mode .editor-text-code{color:#d70c69;background-color:#0000001a!important;border-radius:4px!important;padding:1px .25rem!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:85%!important}.lexical-view-mode .editor-link{word-break:break-word;color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode .editor-link:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .editor-code,.lexical-view-mode pre{word-break:break-word;-moz-tab-size:2!important;tab-size:2!important;background-color:#f0f2f5!important;border-radius:4px!important;margin:8px 0!important;padding:8px 8px 8px 52px!important;font-family:Menlo,Consolas,Monaco,monospace!important;font-size:13px!important;line-height:1.53!important;display:block!important;position:relative!important;overflow-x:auto!important}.lexical-view-mode .editor-code:before{min-width:25px;content:attr(data-gutter)!important;color:#777!important;white-space:pre-wrap!important;text-align:right!important;background-color:#eee!important;border-right:1px solid #ccc!important;padding:8px!important;position:absolute!important;top:0!important;left:0!important}.lexical-view-mode pre{white-space:pre-wrap!important;padding-left:8px!important}.lexical-view-mode pre:before{border-right:0!important;width:100%!important;height:23px!important}.lexical-view-mode .editor-code:after,.lexical-view-mode pre:after{color:#00000080;content:attr(data-highlight-language)!important;text-transform:uppercase!important;padding:3px!important;font-size:10px!important;position:absolute!important;top:0!important;right:3px!important}.lexical-view-mode .editor-tokenComment{color:#708090}.lexical-view-mode .editor-tokenPunctuation{color:#999}.lexical-view-mode .editor-tokenProperty{color:#905}.lexical-view-mode .editor-tokenSelector{color:#690}.lexical-view-mode .editor-tokenOperator{color:#9a6e3a}.lexical-view-mode .editor-tokenAttr{color:#07a}.lexical-view-mode .editor-tokenVariable{color:#e90}.lexical-view-mode .editor-tokenFunction{color:#dd4a68}.lexical-view-mode .editor-paragraph,.lexical-view-mode p{word-break:break-word;margin:0 0 .3rem!important;padding:0!important}.lexical-view-mode .editor-paragraph:last-child{margin-bottom:0}.lexical-view-mode .editor-heading-h1,.lexical-view-mode h1{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:24px!important}.lexical-view-mode .editor-heading-h2:first-child,.lexical-view-mode .editor-heading-h1:first-child,.lexical-view-mode h2:first-child,.lexical-view-mode h1:first-child{margin-top:0}.lexical-view-mode .editor-heading-h2,.lexical-view-mode h2{line-height:100%;border-bottom:thin solid #0000001a!important;margin-top:1.2em!important;margin-bottom:.6em!important;padding-bottom:6px!important;font-size:20px!important}.lexical-view-mode .editor-list-ol,.lexical-view-mode ol{margin:0 0 .3rem 15px!important;padding:0 0 0 15px!important;list-style-type:decimal!important;list-style-position:outside!important}.lexical-view-mode li ol{margin:0 0 0 20px!important}.lexical-view-mode .editor-list-ol2,.lexical-view-mode .editor-list-ol3,.lexical-view-mode .editor-list-ol4,.lexical-view-mode .editor-list-ol5,.lexical-view-mode .editor-list-ol6,.lexical-view-mode .editor-list-ol7{list-style-position:outside;padding:0!important}.lexical-view-mode .editor-list-ol2{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol3{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol4{list-style-type:decimal}.lexical-view-mode .editor-list-ol5{list-style-type:lower-alpha}.lexical-view-mode .editor-list-ol6{list-style-type:lower-roman}.lexical-view-mode .editor-list-ol7{list-style-type:decimal}.lexical-view-mode .editor-list-ul,.lexical-view-mode ul{margin-bottom:.3rem;margin:0 0 0 15px!important;padding:0 0 0 5px!important;list-style-position:outside!important}.lexical-view-mode li ul{margin:0 0 0 15px!important;padding:0 0 0 3px!important}.lexical-view-mode .editor-list-item{padding-left:0;vertical-align:top!important;margin-bottom:12px!important;line-height:1.3!important}.lexical-view-mode .editor-nested-list-item{list-style-type:none}.lexical-view-mode code{color:inherit!important;word-wrap:break-word!important;white-space:break-spaces!important}.lexical-view-mode a>code{color:inherit}.lexical-view-mode pre::-webkit-scrollbar{width:10px;background:0 0!important}.lexical-view-mode pre::-webkit-scrollbar-thumb{background:#999}.lexical-view-mode img{cursor:zoom-in!important;border:1px solid #ccc!important;border-radius:4px!important;width:auto!important;max-width:250px!important;height:auto!important;max-height:250px!important;display:block!important}.lexical-view-mode img:hover,.lexical-view-mode img:focus{outline:3px solid #007bff4d}.lexical-view-mode iframe{background:#000!important;border:1px solid #ccc!important;width:fit-content!important;max-width:100%!important;height:fit-content!important}.lexical-view-mode .ql-align-left{text-align:left!important}.lexical-view-mode .ql-align-right{text-align:right!important}.lexical-view-mode .ql-align-center{text-align:center!important}.lexical-view-mode .ql-align-justify{text-align:justify!important}.lexical-view-mode .ql-size-small{font-size:.75em!important}.lexical-view-mode p>a,.lexical-view-mode li>a{color:#007bff!important;cursor:pointer!important;background-color:#0000!important;text-decoration:underline!important}.lexical-view-mode p>a:hover,.lexical-view-mode li>a:hover{color:#0062cc!important;text-decoration:underline!important}.lexical-view-mode .ql-size-large{font-size:1.25rem!important}.lexical-view-mode .ql-indent-1{margin-left:20px!important}.lexical-view-mode .ql-indent-2{margin-left:40px!important}.lexical-view-mode .ql-indent-3{margin-left:60px!important}.lexical-view-mode .ql-indent-4{margin-left:80px!important}.lexical-view-mode .ql-indent-5{margin-left:100px!important}.lexical-view-mode .ql-indent-6{margin-left:120px!important}.lexical-view-mode .ql-indent-7{margin-left:140px!important}.lexical-view-mode .ql-indent-8{margin-left:160px!important}.lexical-view-mode ol li.ql-indent-1,.lexical-view-mode ol li.ql-indent-2,.lexical-view-mode ol li.ql-indent-3,.lexical-view-mode ol li.ql-indent-4,.lexical-view-mode ol li.ql-indent-5,.lexical-view-mode ol li.ql-indent-6,.lexical-view-mode ol li.ql-indent-7,.lexical-view-mode ol li.ql-indent-8,.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-6,.lexical-view-mode ul li.ql-indent-7,.lexical-view-mode ul li.ql-indent-8{margin-bottom:.3em!important}.lexical-view-mode ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-1!important;margin-left:0!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-1::marker{display:none}.lexical-view-mode ol li.ql-indent-1:before{content:counter(list-1,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-2!important;margin-left:20px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-2::marker{display:none}.lexical-view-mode ol li.ql-indent-2:before{content:counter(list-2,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-3!important;margin-left:40px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-3::marker{display:none}.lexical-view-mode ol li.ql-indent-3:before{content:counter(list-3,decimal)". "!important}.lexical-view-mode ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9!important;counter-increment:list-4!important;margin-left:60px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-4::marker{display:none}.lexical-view-mode ol li.ql-indent-4:before{content:counter(list-4,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9!important;counter-increment:list-5!important;margin-left:80px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-5::marker{display:none}.lexical-view-mode ol li.ql-indent-5:before{content:counter(list-5,lower-roman)". "!important}.lexical-view-mode ol li.ql-indent-6{counter-reset:list-7 list-8 list-9!important;counter-increment:list-6!important;margin-left:100px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-6::marker{display:none}.lexical-view-mode ol li.ql-indent-6:before{content:counter(list-6,decimal)". "!important}.lexical-view-mode ol li.ql-indent-7{counter-reset:list-8 list-9!important;counter-increment:list-7!important;margin-left:120px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-7::marker{display:none}.lexical-view-mode ol li.ql-indent-7:before{content:counter(list-7,lower-alpha)". "!important}.lexical-view-mode ol li.ql-indent-8{counter-reset:list-9!important;counter-increment:list-8!important;margin-left:140px!important;list-style-type:none!important}.lexical-view-mode ol li.ql-indent-8::marker{display:none}.lexical-view-mode ol li.ql-indent-8:before{content:counter(list-8,lower-roman)". "!important}.lexical-view-mode ul li.ql-indent-3,.lexical-view-mode ul li.ql-indent-6{list-style-type:disc}.lexical-view-mode ul li.ql-indent-1,.lexical-view-mode ul li.ql-indent-4,.lexical-view-mode ul li.ql-indent-7{list-style-type:circle}.lexical-view-mode ul li.ql-indent-2,.lexical-view-mode ul li.ql-indent-5,.lexical-view-mode ul li.ql-indent-8{list-style-type:square}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes progress{0%{transform:translate(-100%)}to{transform:translate(300%)}}',Ww=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Kw=(e,t)=>({classGroupId:e,validator:t}),O0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ga="-",Vh=[],Hw="arbitrary..",qw=e=>{const t=Yw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Vw(s);const a=s.split(Ga),l=a[0]===""&&a.length>1?1:0;return P0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?Ww(c,l):l:c||Vh}return n[s]||Vh}}},P0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=P0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Ga):e.slice(t).join(Ga),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Vw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Hw+r:void 0})(),Yw=e=>{const{theme:t,classGroups:n}=e;return Qw(n,t)},Qw=(e,t)=>{const n=O0();for(const r in e){const o=e[r];Jf(o,n,r,t)}return n},Jf=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Gw(s,t,n,r)}},Gw=(e,t,n,r)=>{if(typeof e=="string"){Zw(e,t,n);return}if(typeof e=="function"){Jw(e,t,n,r);return}Xw(e,t,n,r)},Zw=(e,t,n)=>{const r=e===""?t:M0(t,e);r.classGroupId=n},Jw=(e,t,n,r)=>{if(e2(e)){Jf(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kw(n,e))},Xw=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Jf(l,M0(t,a),n,r)}},M0=(e,t)=>{let n=e;const r=t.split(Ga),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=O0(),n.nextPart.set(s,a)),n=a}return n},e2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,t2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},_u="!",Yh=":",n2=[],Qh=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),r2=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let g=0;g<u;g++){const m=o[g];if(s===0&&a===0){if(m===Yh){i.push(o.slice(l,g)),l=g+1;continue}if(m==="/"){c=g;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const f=i.length===0?o:o.slice(l);let d=f,h=!1;f.endsWith(_u)?(d=f.slice(0,-1),h=!0):f.startsWith(_u)&&(d=f.slice(1),h=!0);const p=c&&c>l?c-l:void 0;return Qh(i,h,d,p)};if(t){const o=t+Yh,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Qh(n2,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},o2=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},i2=e=>({cache:t2(e.cacheSize),parseClassName:r2(e),sortModifiers:o2(e),...qw(e)}),s2=/\s+/,a2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(s2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let m=!!g,y=r(m?p.substring(0,g):p);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(p),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=d.length===0?"":d.length===1?d[0]:i(d).join(":"),v=h?b+_u:b,w=v+y;if(s.indexOf(w)>-1)continue;s.push(w);const A=o(y,m);for(let C=0;C<A.length;++C){const _=A[C];s.push(v+_)}l=u+(l.length>0?" "+l:l)}return l},l2=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=I0(n))&&(o&&(o+=" "),o+=r);return o},I0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=I0(e[r]))&&(n&&(n+=" "),n+=t);return n},c2=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,f)=>f(u),e());return n=i2(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=a2(l,n);return o(l,u),u};return i=s,(...l)=>i(l2(...l))},u2=[],Ge=e=>{const t=n=>n[e]||u2;return t.isThemeGetter=!0,t},L0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f2=/^\d+\/\d+$/,d2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,p2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,m2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jo=e=>f2.test(e),xe=e=>!!e&&!Number.isNaN(Number(e)),hr=e=>!!e&&Number.isInteger(Number(e)),vc=e=>e.endsWith("%")&&xe(e.slice(0,-1)),Fn=e=>d2.test(e),y2=()=>!0,b2=e=>h2.test(e)&&!p2.test(e),D0=()=>!1,v2=e=>m2.test(e),x2=e=>g2.test(e),w2=e=>!ae(e)&&!le(e),A2=e=>Bi(e,z0,D0),ae=e=>L0.test(e),Gr=e=>Bi(e,$0,b2),xc=e=>Bi(e,S2,xe),Gh=e=>Bi(e,F0,D0),k2=e=>Bi(e,j0,x2),ha=e=>Bi(e,U0,v2),le=e=>R0.test(e),os=e=>Wi(e,$0),C2=e=>Wi(e,T2),Zh=e=>Wi(e,F0),_2=e=>Wi(e,z0),E2=e=>Wi(e,j0),pa=e=>Wi(e,U0,!0),Bi=(e,t,n)=>{const r=L0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wi=(e,t,n=!1)=>{const r=R0.exec(e);return r?r[1]?t(r[1]):n:!1},F0=e=>e==="position"||e==="percentage",j0=e=>e==="image"||e==="url",z0=e=>e==="length"||e==="size"||e==="bg-size",$0=e=>e==="length",S2=e=>e==="number",T2=e=>e==="family-name",U0=e=>e==="shadow",N2=()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),o=Ge("tracking"),i=Ge("leading"),s=Ge("breakpoint"),a=Ge("container"),l=Ge("spacing"),c=Ge("radius"),u=Ge("shadow"),f=Ge("inset-shadow"),d=Ge("text-shadow"),h=Ge("drop-shadow"),p=Ge("blur"),g=Ge("perspective"),m=Ge("aspect"),y=Ge("ease"),b=Ge("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...w(),le,ae],C=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],E=()=>[le,ae,l],N=()=>[Jo,"full","auto",...E()],P=()=>[hr,"none","subgrid",le,ae],I=()=>["auto",{span:["full",hr,le,ae]},hr,le,ae],W=()=>[hr,"auto",le,ae],j=()=>["auto","min","max","fr",le,ae],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...E()],oe=()=>[Jo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],M=()=>[e,le,ae],re=()=>[...w(),Zh,Gh,{position:[le,ae]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",_2,A2,{size:[le,ae]}],K=()=>[vc,os,Gr],B=()=>["","none","full",c,le,ae],J=()=>["",xe,os,Gr],V=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[xe,vc,Zh,Gh],pe=()=>["","none",p,le,ae],ye=()=>["none",xe,le,ae],me=()=>["none",xe,le,ae],ze=()=>[xe,le,ae],G=()=>[Jo,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[y2],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[w2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",xe],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jo,ae,le,m]}],container:["container"],columns:[{columns:[xe,ae,le,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",le,ae]}],basis:[{basis:[Jo,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xe,Jo,"auto","initial","none",ae]}],grow:[{grow:["",xe,le,ae]}],shrink:[{shrink:["",xe,le,ae]}],order:[{order:[hr,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[a,"screen",...oe()]}],"min-w":[{"min-w":[a,"screen","none",...oe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",n,os,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,xc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vc,ae]}],"font-family":[{font:[C2,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ae]}],"line-clamp":[{"line-clamp":[xe,"none",le,xc]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[xe,"from-font","auto",le,Gr]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[xe,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,le,ae],radial:["",le,ae],conic:[hr,le,ae]},E2,k2]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xe,le,ae]}],"outline-w":[{outline:["",xe,os,Gr]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,pa,ha]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,pa,ha]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[xe,Gr]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",d,pa,ha]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[xe,le,ae]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:pe()}],brightness:[{brightness:[xe,le,ae]}],contrast:[{contrast:[xe,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",h,pa,ha]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",xe,le,ae]}],"hue-rotate":[{"hue-rotate":[xe,le,ae]}],invert:[{invert:["",xe,le,ae]}],saturate:[{saturate:[xe,le,ae]}],sepia:[{sepia:["",xe,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[xe,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[xe,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xe,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xe,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",xe,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[xe,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[xe,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",xe,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xe,"initial",le,ae]}],ease:[{ease:["linear","initial",y,le,ae]}],delay:[{delay:[xe,le,ae]}],animate:[{animate:["none",b,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,le,ae]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[xe,os,Gr,xc]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fi=c2(N2);function B0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=B0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Es(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=B0(e))&&(r&&(r+=" "),r+=t);return r}function _e(...e){return fi(Es(e))}const Jh="confidence_playbook_",O2="confidence_playbook_expanded_",W0=30;function K0(e,t){return t?`${Jh}${e}_${t}`:`${Jh}${e}`}function H0(e,t,n,r){const o={playbookInstanceId:t,email:n},i=K0(e,r),s=new Date;s.setDate(s.getDate()+W0),document.cookie=`${i}=${encodeURIComponent(JSON.stringify(o))}; expires=${s.toUTCString()}; path=/; SameSite=Lax`}function q0(e,t){const n=K0(e,t),r=document.cookie.split(";");for(const o of r){const[i,s]=o.trim().split("=");if(i===n&&s)try{return JSON.parse(decodeURIComponent(s))}catch{return null}}return null}function V0(e){return`${O2}${e}`}function P2(e,t){const n=V0(e),r=new Date;r.setDate(r.getDate()+W0),document.cookie=`${n}=${t?"1":"0"}; expires=${r.toUTCString()}; path=/; SameSite=Lax`}function M2(e){const t=V0(e),n=document.cookie.split(";");for(const r of n){const[o,i]=r.trim().split("=");if(o===t&&i!==void 0)return i==="1"}return null}const I2=typeof document<"u"?T.useLayoutEffect:()=>{},zr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},oo=e=>e&&"window"in e&&e.window===e?e:zr(e).defaultView||window;function L2(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function R2(e){return L2(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let D2=!1;function Xf(){return D2}function Y0(e,t){if(!Xf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:R2(n)?n=n.host:n=n.parentNode}return!1}const Eu=(e=document)=>{var t;if(!Xf())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Q0(e){return Xf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function F2(e){if(j2())e.focus({preventScroll:!0});else{let t=z2(e);e.focus(),$2(t)}}let ma=null;function j2(){if(ma==null){ma=!1;try{document.createElement("div").focus({get preventScroll(){return ma=!0,!0}})}catch{}}return ma}function z2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function _l(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function ed(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function or(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ss=or(function(){return ed(/^Mac/i)}),U2=or(function(){return ed(/^iPhone/i)}),G0=or(function(){return ed(/^iPad/i)||Ss()&&navigator.maxTouchPoints>1}),B2=or(function(){return U2()||G0()});or(function(){return Ss()||B2()});const W2=or(function(){return _l(/AppleWebKit/i)&&!K2()}),K2=or(function(){return _l(/Chrome/i)}),H2=or(function(){return _l(/Android/i)}),q2=or(function(){return _l(/Firefox/i)});function Ts(e,t,n=!0){var r,o;let{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}=t;q2()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ss()?i=!0:s=!0);let c=W2()&&Ss()&&!G0()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:a,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Ts.isOpening=n,F2(e),e.dispatchEvent(c),Ts.isOpening=!1}Ts.isOpening=!1;function Z0(){let e=T.useRef(new Map),t=T.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),n=T.useCallback((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),r=T.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return T.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function V2(e){return e.pointerType===""&&e.isTrusted?!0:H2()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function J0(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Y2(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function X0(e){let t=T.useRef({isFocused:!1,observer:null});return I2(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),T.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target,o=i=>{if(t.current.isFocused=!1,r.disabled){let s=J0(i);e==null||e(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let s=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Q2=!1,qs=null,Su=new Set,ys=new Map,Eo=!1,Tu=!1;const G2={Tab:!0,Escape:!0};function td(e,t){for(let n of Su)n(e,t)}function Z2(e){return!(e.metaKey||!Ss()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Za(e){Eo=!0,!Ts.isOpening&&Z2(e)&&(qs="keyboard",td("keyboard",e))}function Vt(e){qs="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Eo=!0,td("pointer",e))}function ey(e){!Ts.isOpening&&V2(e)&&(Eo=!0,qs="virtual")}function ty(e){e.target===window||e.target===document||Q2||!e.isTrusted||(!Eo&&!Tu&&(qs="virtual",td("virtual",e)),Eo=!1,Tu=!1)}function ny(){Eo=!1,Tu=!0}function Nu(e){if(typeof window>"u"||typeof document>"u"||ys.get(oo(e)))return;const t=oo(e),n=zr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Eo=!0,r.apply(this,arguments)},n.addEventListener("keydown",Za,!0),n.addEventListener("keyup",Za,!0),n.addEventListener("click",ey,!0),t.addEventListener("focus",ty,!0),t.addEventListener("blur",ny,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Vt,!0),n.addEventListener("pointermove",Vt,!0),n.addEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Vt,!0),n.addEventListener("mousemove",Vt,!0),n.addEventListener("mouseup",Vt,!0)),t.addEventListener("beforeunload",()=>{ry(e)},{once:!0}),ys.set(t,{focus:r})}const ry=(e,t)=>{const n=oo(e),r=zr(e);t&&r.removeEventListener("DOMContentLoaded",t),ys.has(n)&&(n.HTMLElement.prototype.focus=ys.get(n).focus,r.removeEventListener("keydown",Za,!0),r.removeEventListener("keyup",Za,!0),r.removeEventListener("click",ey,!0),n.removeEventListener("focus",ty,!0),n.removeEventListener("blur",ny,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Vt,!0),r.removeEventListener("pointermove",Vt,!0),r.removeEventListener("pointerup",Vt,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Vt,!0),r.removeEventListener("mousemove",Vt,!0),r.removeEventListener("mouseup",Vt,!0)),ys.delete(n))};function J2(e){const t=zr(e);let n;return t.readyState!=="loading"?Nu(e):(n=()=>{Nu(e)},t.addEventListener("DOMContentLoaded",n)),()=>ry(e,n)}typeof document<"u"&&J2();function oy(){return qs!=="pointer"}const X2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function eA(e,t,n){let r=zr(n==null?void 0:n.target);const o=typeof window<"u"?oo(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?oo(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?oo(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?oo(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!X2.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof s&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!G2[n.key])}function tA(e,t,n){Nu(),T.useEffect(()=>{let r=(o,i)=>{eA(!!(n!=null&&n.isTextInput),o,i)&&e(oy())};return Su.add(r),()=>{Su.delete(r)}},t)}function nA(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=T.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=X0(i),a=T.useCallback(l=>{const c=zr(l.target),u=c?Eu(c):Eu();l.target===l.currentTarget&&u===Q0(l.nativeEvent)&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function rA(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=T.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Z0(),l=T.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=X0(l),u=T.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const d=zr(f.target),h=Eu(d);if(!i.current.isFocusWithin&&h===Q0(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let p=f.currentTarget;s(d,"focus",g=>{if(i.current.isFocusWithin&&!Y0(p,g.target)){let m=new d.defaultView.FocusEvent("blur",{relatedTarget:g.target});Y2(m,p);let y=J0(m);l(y)}},{capture:!0})}},[r,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Ja=!1,ga=0;function Ou(){Ja=!0,setTimeout(()=>{Ja=!1},50)}function Xh(e){e.pointerType==="touch"&&Ou()}function oA(){if(!(typeof document>"u"))return ga===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Xh):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ou)),ga++,()=>{ga--,!(ga>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Xh):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ou))}}function iA(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=T.useState(!1),a=T.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;T.useEffect(oA,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Z0(),{hoverProps:u,triggerHoverEnd:f}=T.useMemo(()=>{let d=(g,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!g.currentTarget.contains(g.target))return;a.isHovered=!0;let y=g.currentTarget;a.target=y,l(zr(g.target),"pointerover",b=>{a.isHovered&&a.target&&!Y0(a.target,b.target)&&h(b,b.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:y,pointerType:m}),n&&n(!0),s(!0)},h=(g,m)=>{let y=a.target;a.pointerType="",a.target=null,!(m==="touch"||!a.isHovered||!y)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:y,pointerType:m}),n&&n(!1),s(!1))},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=g=>{Ja&&g.pointerType==="mouse"||d(g,g.pointerType)},p.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(p.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=g=>{!a.ignoreEmulatedMouseEvents&&!Ja&&d(g,"mouse"),a.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:p,triggerHoverEnd:h}},[t,n,r,o,a,l,c]);return T.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}function sA(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=T.useRef({isFocused:!1,isFocusVisible:t||oy()}),[i,s]=T.useState(!1),[a,l]=T.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=T.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=T.useCallback(h=>{o.current.isFocused=h,s(h),c()},[c]);tA(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=nA({isDisabled:r,onFocusChange:u}),{focusWithinProps:d}=rA({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:a,focusProps:r?d:f}}var aA=Object.defineProperty,lA=(e,t,n)=>t in e?aA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wc=(e,t,n)=>(lA(e,typeof t!="symbol"?t+"":t,n),n);let cA=class{constructor(){wc(this,"current",this.detect()),wc(this,"handoffState","pending"),wc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},uA=new cA,nd=(e,t)=>{uA.isServer?T.useEffect(e,t):T.useLayoutEffect(e,t)};function fA(e){let t=T.useRef(e);return nd(()=>{t.current=e},[e]),t}let El=function(e){let t=fA(e);return T.useCallback((...n)=>t.current(...n),[t])};function Sl(e){return T.useMemo(()=>e,Object.values(e))}let iy=T.createContext(void 0);function Tl(){return T.useContext(iy)}function dA({value:e,children:t}){return T.createElement(iy.Provider,{value:e},t)}function ep(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function sy(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,sy),r}var hA=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(hA||{}),pA=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(pA||{});function Vs(){let e=gA();return T.useCallback(t=>mA({mergeRefs:e,...t}),[e])}function mA({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??yA;let l=ay(t,e);if(i)return ya(l,n,r,s,a);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return ya(f,n,r,s,a)}if(c&1){let{unmount:u=!0,...f}=l;return sy(u?0:1,{0(){return null},1(){return ya({...f,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return ya(l,n,r,s,a)}function ya(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...l}=Ac(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let d=!1,h=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&h.push(p.replace(/([A-Z])/g,m=>`-${m.toLowerCase()}`));if(d){f["data-headlessui-state"]=h.join(" ");for(let p of h)f[`data-${p}`]=""}}if(Ia(i)&&(Object.keys(Xo(l)).length>0||Object.keys(Xo(f)).length>0))if(!T.isValidElement(u)||Array.isArray(u)&&u.length>1||xA(u)){if(Object.keys(Xo(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Xo(l)).concat(Object.keys(Xo(f))).map(d=>` - ${d}`).join(`
|
|
22
22
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
|
|
23
23
|
`)].join(`
|
|
24
24
|
`))}else{let d=u.props,h=d==null?void 0:d.className,p=typeof h=="function"?(...y)=>ep(h(...y),l.className):ep(h,l.className),g=p?{className:p}:{},m=ay(u.props,Xo(Ac(l,["ref"])));for(let y in f)y in m&&delete f[y];return T.cloneElement(u,Object.assign({},m,f,c,{ref:o(vA(u),c.ref)},g))}return T.createElement(i,Object.assign({},Ac(l,["ref"]),!Ia(i)&&c,!Ia(i)&&f),u)}function gA(){let e=T.useRef([]),t=T.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function yA(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ay(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function bA(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function Ys(e){var t;return Object.assign(T.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Xo(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ac(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function vA(e){return T.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ia(e){return e===T.Fragment||e===Symbol.for("react.fragment")}function xA(e){return Ia(e.type)}let wA="span";var ly=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ly||{});function AA(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Vs()({ourProps:i,theirProps:o,slot:{},defaultTag:wA,name:"Hidden"})}let kA=Ys(AA),CA=T.createContext(null);function _A(e){let[t,n]=T.useState(null);return T.createElement(CA.Provider,{value:{target:t}},e.children,T.createElement(kA,{features:ly.Hidden,ref:n}))}let cy=T.createContext(void 0);function uy(){return T.useContext(cy)}function EA({id:e,children:t}){return T.createElement(cy.Provider,{value:e},t)}function SA(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function fy(e){return SA(e)&&"tagName"in e}function dy(e){return fy(e)&&"accessKey"in e}function TA(e){return dy(e)&&e.nodeName==="INPUT"}function tp(e){return dy(e)&&e.nodeName==="LABEL"}function NA(e){return fy(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}let OA=Symbol();function hy(...e){let t=T.useRef(e);T.useEffect(()=>{t.current=e},[e]);let n=El(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[OA]))?void 0:n}let Nl=T.createContext(null);Nl.displayName="DescriptionContext";function py(){let e=T.useContext(Nl);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,py),t}return e}function PA(){var e,t;return(t=(e=T.useContext(Nl))==null?void 0:e.value)!=null?t:void 0}function MA(){let[e,t]=T.useState([]);return[e.length>0?e.join(" "):void 0,T.useMemo(()=>function(n){let r=El(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}))),o=T.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return T.createElement(Nl.Provider,{value:o},n.children)},[t])]}let IA="p";function LA(e,t){let n=T.useId(),r=Tl(),{id:o=`headlessui-description-${n}`,...i}=e,s=py(),a=hy(t);nd(()=>s.register(o),[o,s.register]);let l=Sl({...s.slot,disabled:r||!1}),c={ref:a,...s.props,id:o};return Vs()({ourProps:c,theirProps:i,slot:l,defaultTag:IA,name:s.name||"Description"})}let RA=Ys(LA),DA=Object.assign(RA,{}),Ol=T.createContext(null);Ol.displayName="LabelContext";function my(){let e=T.useContext(Ol);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,my),t}return e}function gy(e){var t,n,r;let o=(n=(t=T.useContext(Ol))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function FA({inherit:e=!1}={}){let t=gy(),[n,r]=T.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,T.useMemo(()=>function(i){let s=El(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),f=u.indexOf(l);return f!==-1&&u.splice(f,1),u}))),a=T.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return T.createElement(Ol.Provider,{value:a},i.children)},[r])]}let jA="label";function zA(e,t){var n;let r=T.useId(),o=my(),i=uy(),s=Tl(),{id:a=`headlessui-label-${r}`,htmlFor:l=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=hy(t);nd(()=>o.register(a),[a,o.register]);let d=El(g=>{let m=g.currentTarget;if(!(g.target!==g.currentTarget&&NA(g.target))&&(tp(m)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),tp(m))){let y=document.getElementById(m.htmlFor);if(y){let b=y.getAttribute("disabled");if(b==="true"||b==="")return;let v=y.getAttribute("aria-disabled");if(v==="true"||v==="")return;(TA(y)&&(y.type==="file"||y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),h=Sl({...o.slot,disabled:s||!1}),p={ref:f,...o.props,id:a,htmlFor:l,onClick:d};return c&&("onClick"in p&&(delete p.htmlFor,delete p.onClick),"onClick"in u&&delete u.onClick),Vs()({ourProps:p,theirProps:u,slot:h,defaultTag:l?jA:"div",name:o.name||"Label"})}let $A=Ys(zA),UA=Object.assign($A,{});function Pl(){return typeof window<"u"}function Ki(e){return yy(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(yy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yy(e){return Pl()?e instanceof Node||e instanceof Ut(e).Node:!1}function He(e){return Pl()?e instanceof Element||e instanceof Ut(e).Element:!1}function cn(e){return Pl()?e instanceof HTMLElement||e instanceof Ut(e).HTMLElement:!1}function Pu(e){return!Pl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot}const BA=new Set(["inline","contents"]);function Qs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!BA.has(o)}const WA=new Set(["table","td","th"]);function KA(e){return WA.has(Ki(e))}const HA=[":popover-open",":modal"];function Ml(e){return HA.some(t=>{try{return e.matches(t)}catch{return!1}})}const qA=["transform","translate","scale","rotate","perspective"],VA=["transform","translate","scale","rotate","perspective","filter"],YA=["paint","layout","strict","content"];function rd(e){const t=Il(),n=He(e)?Qt(e):e;return qA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||VA.some(r=>(n.willChange||"").includes(r))||YA.some(r=>(n.contain||"").includes(r))}function QA(e){let t=Xn(e);for(;cn(t)&&!Zn(t);){if(rd(t))return t;if(Ml(t))return null;t=Xn(t)}return null}function Il(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const GA=new Set(["html","body","#document"]);function Zn(e){return GA.has(Ki(e))}function Qt(e){return Ut(e).getComputedStyle(e)}function Ll(e){return He(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xn(e){if(Ki(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pu(e)&&e.host||ir(e);return Pu(t)?t.host:t}function by(e){const t=Xn(e);return Zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&Qs(t)?t:by(t)}function di(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=by(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ut(o);if(i){const a=Mu(s);return t.concat(s,s.visualViewport||[],Qs(o)?o:[],a&&n?di(a):[])}return t.concat(o,di(o,[],n))}function Mu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const np=Math.min,bs=Math.max,Xa=Math.round,_n=e=>({x:e,y:e});function vy(e){return e.split("-")[0]}function ZA(e){return e.split("-")[1]}function JA(e){return e==="x"?"y":"x"}function XA(e){return e==="y"?"height":"width"}const ek=new Set(["top","bottom"]);function xy(e){return ek.has(vy(e))?"y":"x"}function tk(e){return JA(xy(e))}function wy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function rp(e,t,n){let{reference:r,floating:o}=e;const i=xy(t),s=tk(t),a=XA(s),l=vy(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ZA(t)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}const nk=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rp(c,r,l),d=r,h={},p=0;for(let g=0;g<a.length;g++){const{name:m,fn:y}=a[g],{x:b,y:v,data:w,reset:A}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=b??u,f=v??f,h={...h,[m]:{...h[m],...w}},A&&p<=50&&(p++,typeof A=="object"&&(A.placement&&(d=A.placement),A.rects&&(c=A.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:u,y:f}=rp(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};function Ay(e){const t=Qt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Xa(n)!==i||Xa(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ky(e){return He(e)?e:e.contextElement}function hi(e){const t=ky(e);if(!cn(t))return _n(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ay(t);let s=(i?Xa(n.width):n.width)/r,a=(i?Xa(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const rk=_n(0);function Cy(e){const t=Ut(e);return!Il()||!t.visualViewport?rk:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ok(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ut(e)?!1:t}function Ns(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ky(e);let s=_n(1);t&&(r?He(r)&&(s=hi(r)):s=hi(e));const a=ok(i,n,r)?Cy(i):_n(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const d=Ut(i),h=r&&He(r)?Ut(r):r;let p=d,g=Mu(p);for(;g&&r&&h!==p;){const m=hi(g),y=g.getBoundingClientRect(),b=Qt(g),v=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*m.x,w=y.top+(g.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=v,c+=w,p=Ut(g),g=Mu(p)}}return wy({width:u,height:f,x:l,y:c})}function Rl(e,t){const n=Ll(e).scrollLeft;return t?t.left+n:Ns(ir(e)).left+n}function _y(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Rl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ik(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ir(r),a=t?Ml(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=_n(1);const u=_n(0),f=cn(r);if((f||!f&&!i)&&((Ki(r)!=="body"||Qs(s))&&(l=Ll(r)),cn(r))){const h=Ns(r);c=hi(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const d=s&&!f&&!i?_y(s,l):_n(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function sk(e){return Array.from(e.getClientRects())}function ak(e){const t=ir(e),n=Ll(e),r=e.ownerDocument.body,o=bs(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=bs(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rl(e);const a=-n.scrollTop;return Qt(r).direction==="rtl"&&(s+=bs(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const op=25;function lk(e,t){const n=Ut(e),r=ir(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Il();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Rl(r);if(c<=0){const u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-h);p<=op&&(i-=p)}else c<=op&&(i+=c);return{width:i,height:s,x:a,y:l}}const ck=new Set(["absolute","fixed"]);function uk(e,t){const n=Ns(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?hi(e):_n(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function ip(e,t,n){let r;if(t==="viewport")r=lk(e,n);else if(t==="document")r=ak(ir(e));else if(He(t))r=uk(t,n);else{const o=Cy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wy(r)}function Ey(e,t){const n=Xn(e);return n===t||!He(n)||Zn(n)?!1:Qt(n).position==="fixed"||Ey(n,t)}function fk(e,t){const n=t.get(e);if(n)return n;let r=di(e,[],!1).filter(a=>He(a)&&Ki(a)!=="body"),o=null;const i=Qt(e).position==="fixed";let s=i?Xn(e):e;for(;He(s)&&!Zn(s);){const a=Qt(s),l=rd(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&ck.has(o.position)||Qs(s)&&!l&&Ey(e,s))?r=r.filter(u=>u!==s):o=a,s=Xn(s)}return t.set(e,r),r}function dk(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ml(t)?[]:fk(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=ip(t,u,o);return c.top=bs(f.top,c.top),c.right=np(f.right,c.right),c.bottom=np(f.bottom,c.bottom),c.left=bs(f.left,c.left),c},ip(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hk(e){const{width:t,height:n}=Ay(e);return{width:t,height:n}}function pk(e,t,n){const r=cn(t),o=ir(t),i=n==="fixed",s=Ns(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=_n(0);function c(){l.x=Rl(o)}if(r||!r&&!i)if((Ki(t)!=="body"||Qs(o))&&(a=Ll(t)),r){const h=Ns(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?_y(o,a):_n(0),f=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function kc(e){return Qt(e).position==="static"}function sp(e,t){if(!cn(e)||Qt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ir(e)===n&&(n=n.ownerDocument.body),n}function Sy(e,t){const n=Ut(e);if(Ml(e))return n;if(!cn(e)){let o=Xn(e);for(;o&&!Zn(o);){if(He(o)&&!kc(o))return o;o=Xn(o)}return n}let r=sp(e,t);for(;r&&KA(r)&&kc(r);)r=sp(r,t);return r&&Zn(r)&&kc(r)&&!rd(r)?n:r||QA(e)||n}const mk=async function(e){const t=this.getOffsetParent||Sy,n=this.getDimensions,r=await n(e.floating);return{reference:pk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gk(e){return Qt(e).direction==="rtl"}const yk={convertOffsetParentRelativeRectToViewportRelativeRect:ik,getDocumentElement:ir,getClippingRect:dk,getOffsetParent:Sy,getElementRects:mk,getClientRects:sk,getDimensions:hk,getScale:hi,isElement:He,isRTL:gk},bk=(e,t,n)=>{const r=new Map,o={platform:yk,...n},i={...o.platform,_c:r};return nk(e,t,{...o,platform:i})};var vk=typeof document<"u",xk=function(){},La=vk?T.useLayoutEffect:xk;function el(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!el(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!el(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ty(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ap(e,t){const n=Ty(e);return Math.round(t*n)/n}function Cc(e){const t=k.useRef(e);return La(()=>{t.current=e}),t}function wk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=k.useState(r);el(d,r)||h(r);const[p,g]=k.useState(null),[m,y]=k.useState(null),b=k.useCallback(M=>{M!==C.current&&(C.current=M,g(M))},[]),v=k.useCallback(M=>{M!==_.current&&(_.current=M,y(M))},[]),w=i||p,A=s||m,C=k.useRef(null),_=k.useRef(null),E=k.useRef(u),N=l!=null,P=Cc(l),I=Cc(o),W=Cc(c),j=k.useCallback(()=>{if(!C.current||!_.current)return;const M={placement:t,strategy:n,middleware:d};I.current&&(M.platform=I.current),bk(C.current,_.current,M).then(re=>{const L={...re,isPositioned:W.current!==!1};z.current&&!el(E.current,L)&&(E.current=L,I1.flushSync(()=>{f(L)}))})},[d,t,n,I,W]);La(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[c]);const z=k.useRef(!1);La(()=>(z.current=!0,()=>{z.current=!1}),[]),La(()=>{if(w&&(C.current=w),A&&(_.current=A),w&&A){if(P.current)return P.current(w,A,j);j()}},[w,A,j,P,N]);const Y=k.useMemo(()=>({reference:C,floating:_,setReference:b,setFloating:v}),[b,v]),Q=k.useMemo(()=>({reference:w,floating:A}),[w,A]),oe=k.useMemo(()=>{const M={position:n,left:0,top:0};if(!Q.floating)return M;const re=ap(Q.floating,u.x),L=ap(Q.floating,u.y);return a?{...M,transform:"translate("+re+"px, "+L+"px)",...Ty(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:L}},[n,a,Q.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:j,refs:Y,elements:Q,floatingStyles:oe}),[u,j,Y,Q,oe])}let Ak="div";function kk(e,t){let n=`headlessui-control-${T.useId()}`,[r,o]=FA(),[i,s]=MA(),a=Tl(),{disabled:l=a||!1,...c}=e,u=Sl({disabled:l}),f={ref:t,disabled:l||void 0,"aria-disabled":l||void 0},d=Vs();return T.createElement(dA,{value:l},T.createElement(o,{value:r},T.createElement(s,{value:i},T.createElement(EA,{id:n},d({ourProps:f,theirProps:{...c,children:T.createElement(_A,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:Ak,name:"Field"})))))}let Ck=Ys(kk),_k="input";function Ek(e,t){let n=T.useId(),r=uy(),o=Tl(),{id:i=r||`headlessui-input-${n}`,disabled:s=o||!1,autoFocus:a=!1,invalid:l=!1,...c}=e,u=gy(),f=PA(),{isFocused:d,focusProps:h}=sA({autoFocus:a}),{isHovered:p,hoverProps:g}=iA({isDisabled:s}),m=bA({ref:t,id:i,"aria-labelledby":u,"aria-describedby":f,"aria-invalid":l?"true":void 0,disabled:s||void 0,autoFocus:a},h,g),y=Sl({disabled:s,invalid:l,hover:p,focus:d,autofocus:a});return Vs()({ourProps:m,theirProps:c,slot:y,defaultTag:_k,name:"Input"})}let Sk=Ys(Ek);const Ny=({type:e="text",className:t,label:n,description:r,error:o,containerClassName:i,...s})=>x.jsx("div",{className:_e("w-full max-w-md px-4",i),children:x.jsxs(Ck,{children:[n&&x.jsx(UA,{className:"font-medium text-gray-900",children:n}),r&&x.jsx(DA,{className:"text-sm text-secondary",children:r}),x.jsx(Sk,{type:e,className:_e("mt-3 block w-full rounded-lg border border-gray-200 px-3 py-1.5 text-sm/6 text-gray-800","data-focus:-outline-offset-2 data-focus:outline-primary-500",t,o&&"border-red-500 focus:border-red-500"),...s})]})}),Tk="whitespace-nowrap font-normal flex items-center justify-center",Nk="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",Ok="disabled:opacity-15 disabled:pointer-events-none",Oy=e=>e==="grayLight"||e==="warning",Py=(e,t)=>!t||t==="none"?"":e(),Pk=(e,t)=>Py(()=>{const n=e==="gray400"?"gray":e,r=Oy(n)?"active:text-black":"active:text-white";return e==="primary"?t?`bg-${n}-800 text-white`:`hover:bg-${n}-800 active:bg-${n}-800 hover:text-white ${r}`:n==="grayDark"?t?"bg-gray-800 text-white":`hover:bg-gray-800 active:bg-gray-800 hover:text-white ${r}`:n==="grayLight"?t?"bg-gray-50 text-black":`hover:bg-gray-50 active:bg-gray-50 hover:text-black ${r}`:e==="gray400"?t?`bg-${n}-500 text-white`:`hover:bg-${n}-500 active:bg-${n}-500 hover:text-white ${r}`:t?`bg-${n}-700 text-white`:`hover:bg-${n}-600 active:bg-${n}-700 hover:text-white ${r}`},e),Mk=e=>Py(()=>{const t=Oy(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),Ik=e=>e&&{dark:"text-dark hover:text-dark",yellow:"text-yellow hover:text-yellow",gray:"text-gray-500 hover:text-gray-800",primary:"text-primary-600 hover:text-primary-800",secondary:"text-secondary-500 hover:text-secondary-800",success:"text-success-500 hover:text-success-800",info:"text-info-500 hover:text-info-800",warning:"text-warning-500 hover:text-warning-800",danger:"text-danger-500 hover:text-danger-800",steel:"text-steel-500 hover:text-steel-800",orange:"text-orange-500 hover:text-orange-800",purple:"text-purple-500 hover:text-purple-800","fiserv-orange":"text-fiserv-orange-500 hover:text-fiserv-orange-800",grayDark:"text-gray-800 hover:text-gray-900",grayLight:"text-gray-50 hover:text-gray-400",gray400:"text-gray-400 hover:text-gray-700"}[e]||"",Lk=(e,t)=>e&&{dark:t?"bg-dark text-white":"text-dark hover:bg-dark hover:text-white",yellow:t?"bg-yellow text-white":"text-yellow hover:bg-yellow hover:text-white",gray:t?"bg-gray-500 text-white":"text-gray-500 hover:bg-gray-500 hover:text-white",primary:t?"bg-primary-800 text-white":"text-primary-600 hover:bg-primary-800 hover:text-white",secondary:t?"bg-secondary-500 text-white":"text-secondary-500 hover:bg-secondary-500 hover:text-white",success:t?"bg-success-500 text-white":"text-success-500 hover:bg-success-500 hover:text-white",info:t?"bg-info-500 text-white":"text-info-500 hover:bg-info-500 hover:text-white",warning:t?"bg-warning-500 text-white":"text-warning-500 hover:bg-warning-500 hover:text-white",danger:t?"bg-danger-500 text-white":"text-danger-500 hover:bg-danger-500 hover:text-white",steel:t?"bg-steel-500 text-white":"text-steel-500 hover:bg-steel-500 hover:text-white",orange:t?"bg-orange-500 text-white":"text-orange-500 hover:bg-orange-500 hover:text-white",purple:t?"bg-purple-500 text-white":"text-purple-500 hover:bg-purple-500 hover:text-white","fiserv-orange":t?"bg-fiserv-orange-500 text-white":"text-fiserv-orange-500 hover:bg-fiserv-orange-500 hover:text-white",grayDark:t?"bg-gray-900 text-white":"text-gray-800 hover:bg-gray-900 hover:text-white",grayLight:t?"bg-gray-400 text-white":"text-gray-50 hover:bg-gray-400 hover:text-white",gray400:t?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-500 hover:text-white"}[e]||"",Rk=(e,t)=>!e||e==="none"?"":e==="primary"?`border border-primary-600 ${t?"":"text-primary-600"}`:e==="grayDark"?`border border-gray-800 ${t?"":"text-gray-800"}`:e==="grayLight"?`border border-gray-50 ${t?"":"text-gray-400"}`:e==="gray400"?`border border-gray-400 ${t?"":"text-gray-400"}`:`border border-${e}-500 ${t?"":`text-${e}-500`}`,Dk=(e,t)=>({solid:Mk(e),link:Ik(e),linkHoverSolid:Lk(e,t),outline:Rk(e,t)}),Fk={none:"",default:"min-w-fit h-[40px] text-base px-3",base:"w-full md:min-w-fit h-[40px] text-base px-3",small:"min-w-[106px] h-[30px] text-sm px-2",normal:"min-w-[140px] h-[38px] text-base px-3",large:"min-w-[160px] h-[40px] text-lg px-3",NormalBlock:"w-full h-[40px] text-lg px-3",box:"w-[38px] h-[38px]",smallCollapse:"h-[30px] text-sm px-2",normalCollapse:"h-[38px] text-base px-3"},jk={none:"",default:"rounded",pill:"rounded-pill"},zk=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:i,type:s="button",rounded:a="default",style:l={},primaryColor:c,...u},f)=>{var v;const d=Ok,h=/link/.test(o)?null:Pk(n,e),p=Nk,g=Fk[r],m=(v=Dk(n,e))==null?void 0:v[o],y=fi(h,m),b=jk[a];return x.jsx("button",{...u,style:{...l,transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",backgroundColor:c?c+"!important":void 0},type:s,ref:f,className:fi(Tk,p,d,g,y,b,i,"cursor-pointer"),children:t})},je=T.forwardRef(zk),$k=Cl.replace(/:root,\s*:host/g,":host"),Uk=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:i,className:s})=>x.jsx(x.Fragment,{children:e&&Nn.createPortal(x.jsxs(Al.div,{className:_e("relative z-50 transition duration-300 ease-out data-closed:opacity-0",s),children:[x.jsx("div",{className:"fixed inset-0 bg-black/30"}),x.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:x.jsxs("div",{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[n&&x.jsx("div",{className:" text-gray-900 p-4",children:n}),x.jsx("div",{className:"p-4",children:i}),r||o?x.jsxs("div",{className:"flex gap-4 p-4",children:[r?x.jsx(je,{className:"flex-1",onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):x.jsx(x.Fragment,{}),o?x.jsx(je,{className:"flex-1",disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):x.jsx(x.Fragment,{})]}):x.jsx(x.Fragment,{})]})}),x.jsx("style",{type:"text/css",children:$k})]}),document.body,"confidence-modal")}),Bk=({onConfirm:e,onClose:t,isOpen:n,title:r})=>{const[o,i]=T.useState(""),[s,a]=T.useState(!1),[l,c]=T.useState(!1),u=async()=>{if(o)try{a(!0),await e(o),i("")}catch{c(!0)}finally{a(!1)}else alert("Please enter a valid email address.")};return x.jsx(Uk,{isOpen:n,close:t,dismissOptions:{label:"Cancel",onClick:t},confirmOptions:{label:"Initiate",onClick:u,disabled:s||!o||l},children:x.jsxs("div",{className:"flex flex-col items-center gap-4 w-[400px]",children:[x.jsxs("div",{children:[x.jsx("div",{className:"text-center text-2xl font-medium",children:l?"User already has access":r||"Access Playbook"}),x.jsx("div",{className:"text-center",children:l?x.jsxs(x.Fragment,{children:[x.jsx("b",{children:o})," has already accessed a playbook. Contact Confidence to speak to representative."]}):x.jsx(x.Fragment,{children:"Please enter your company email address to access this playbook."})})]}),x.jsx(Ny,{disabled:s||l,placeholder:"Enter company email address",onChange:f=>i(f.target.value)})]})})},Wk=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o,disabled:i,btnLabel:s="Run Playbook",btnColor:a="primary"})=>{const[l,c]=T.useState(!1),[u,f]=T.useState(!1);function d(){c(!0)}function h(){c(!1)}const p=async g=>{try{f(!0);const{playbookInstanceId:m,errorCode:y,details:b,message:v}=await N0({bank:"public-sdk",email:g,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(y)throw new Error(`Error initiating playbook: ${v} (Code: ${y}) - Details: ${b}`);o(m,g)}finally{f(!1)}};return x.jsxs(x.Fragment,{children:[t?{buttonNode:t}:x.jsxs(je,{onClick:d,className:_e(e,"flex items-center gap-1"),color:a,size:n,disabled:i||u,children:[x.jsx("img",{src:h0,alt:"Confidence Logo",className:"size-4 object-contain text-white"}),s]}),x.jsx(Bk,{isOpen:l,onClose:h,onConfirm:async g=>{await p(g),h()}})]})};/*!
|
|
@@ -603,4 +603,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
603
603
|
`||s===`\r
|
|
604
604
|
`?r.push(Lo()):s===" "?r.push(ta()):r.push(rt(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,o=this.format,i=this.style;let s=n,a=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,a=n),s.type==="element"&&(function(m,y,b,v){const w=m.getNode(),A=w.getChildAtIndex(m.offset),C=rt();if(C.setFormat(b),C.setStyle(v),Bd(A))A.splice(0,0,[C]);else{const _=Ye(w)?Tt().append(C):C;A===null?w.append(_):A.insertBefore(_)}m.is(y)&&y.set(C.__key,0,"text"),m.set(C.__key,0,"text")})(s,a,o,i),a.type==="element"&&$o(a,Yt(nr(a,"next")));const l=s.offset;let c=a.offset;const u=this.getNodes(),f=u.length;let d=u[0];X(d)||U(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let g=u[f-1];if(f===1&&a.type==="element"&&(c=h,a.set(s.key,c,"text")),this.isCollapsed()&&l===h&&(Wn(d)||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&d.getNextSibling()===null)){let m=d.getNextSibling();if(X(m)&&m.canInsertTextBefore()&&!Wn(m)||(m=rt(),m.setFormat(o),m.setStyle(i),p.canInsertTextAfter()?d.insertAfter(m):p.insertAfter(m)),m.select(0,0),d=m,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Wn(d)||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&d.getPreviousSibling()===null)){let m=d.getPreviousSibling();if(X(m)&&!Wn(m)||(m=rt(),m.setFormat(o),p.canInsertTextBefore()?d.insertBefore(m):p.insertBefore(m)),m.select(),d=m,t!=="")return void this.insertText(t)}else if(d.isSegmented()&&l!==h){const m=rt(d.getTextContent());m.setFormat(o),d.replace(m),d=m}else if(!this.isCollapsed()&&t!==""){const m=g.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||R(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),ex(this.anchor,this.focus,null),void this.insertText(t)}if(f===1){if(wo(d)){const v=rt(t);return v.select(),void d.replace(v)}const m=d.getFormat(),y=d.getStyle();if(l!==c||m===o&&y===i){if(Xv(d)){const v=rt(t);return v.setFormat(o),v.setStyle(i),v.select(),void d.replace(v)}}else{if(d.getTextContent()!==""){const v=rt(t);if(v.setFormat(o),v.setStyle(i),v.select(),l===0)d.insertBefore(v,!1);else{const[w]=d.splitText(l);w.insertAfter(v,!1)}return void(v.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}d.setFormat(o),d.setStyle(i)}const b=c-l;d=d.spliceText(l,b,t,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=t.length:(this.format=m,this.style=y))}else{const m=new Set([...d.getParentKeys(),...g.getParentKeys()]),y=R(d)?d:d.getParentOrThrow();let b=R(g)?g:g.getParentOrThrow(),v=g;if(!y.is(b)&&b.isInline())do v=b,b=b.getParentOrThrow();while(b.isInline());if(a.type==="text"&&(c!==0||g.getTextContent()==="")||a.type==="element"&&g.getIndexWithinParent()<c)if(X(g)&&!wo(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const E=rt(g.getTextContent());g.replace(E),g=E}Ye(a.getNode())||a.type!=="text"||(g=g.spliceText(0,c,"")),m.add(g.__key)}else{const E=g.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?g.remove():E.remove()}else m.add(g.__key);const w=b.getChildren(),A=new Set(u),C=y.is(b),_=y.isInline()&&d.getNextSibling()===null?y:d;for(let E=w.length-1;E>=0;E--){const N=w[E];if(N.is(d)||R(N)&&N.isParentOf(d))break;N.isAttached()&&(!A.has(N)||N.is(v)?C||_.insertAfter(N,!1):N.remove())}if(!C){let E=b,N=null;for(;E!==null;){const P=E.getChildren(),I=P.length;(I===0||P[I-1].is(N))&&(m.delete(E.__key),N=E),E=E.getParent()}}if(wo(d))if(l===h)d.select();else{const E=rt(t);E.select(),d.replace(E)}else d=d.spliceText(l,h-l,t,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let E=1;E<f;E++){const N=u[E],P=N.__key;m.has(P)||N.remove()}}}removeText(){const t=Z()===this;Ha(this,N6(dg(this))),t&&Z()!==this&&Pt(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void ft(null);const r=this.getNodes(),o=[];for(const w of r)X(w)&&o.push(w);const i=w=>{r.forEach(A=>{if(R(A)){const C=A.getFormatFlags(t,w);A.setTextFormat(C)}})},s=o.length;if(s===0)return this.toggleFormat(t),ft(null),void i(n);const a=this.anchor,l=this.focus,c=this.isBackward(),u=c?l:a,f=c?a:l;let d=0,h=o[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===h.getTextContentSize()&&(d=1,h=o[1],p=0),h==null)return;const g=h.getFormatFlags(t,n);i(g);const m=s-1;let y=o[m];const b=f.type==="text"?f.offset:y.getTextContentSize();if(h.is(y)){if(p===b)return;if(Wn(h)||p===0&&b===h.getTextContentSize())h.setFormat(g);else{const w=h.splitText(p,b),A=p===0?w[0]:w[1];A.setFormat(g),u.type==="text"&&u.set(A.__key,0,"text"),f.type==="text"&&f.set(A.__key,b-p,"text")}return void(this.format=g)}p===0||Wn(h)||([,h]=h.splitText(p),p=0),h.setFormat(g);const v=y.getFormatFlags(t,g);b>0&&(b===y.getTextContentSize()||Wn(y)||([y]=y.splitText(b)),y.setFormat(v));for(let w=d+1;w<m;w++){const A=o[w],C=A.getFormatFlags(t,v);A.setFormat(C)}u.type==="text"&&u.set(h.__key,p,"text"),f.type==="text"&&f.set(y.__key,b,"text"),this.format=g|v}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=Z();return $(p)||U(134),p.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=at(n,yr),o=t[t.length-1];if(R(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=Zc(this);r.splice(p,0,t),o.selectEnd()}return}if(!t.some(p=>(R(p)||Te(p))&&!p.isInline())){R(r)||U(211,n.constructor.name,n.getType());const p=Zc(this);return r.splice(p,0,t),void o.selectEnd()}const i=(function(p){const g=Tt();let m=null;for(let y=0;y<p.length;y++){const b=p[y],v=xo(b);if(v||Te(b)&&b.isInline()||R(b)&&b.isInline()||X(b)||b.isParentRequired()){if(m===null&&(m=b.createParentElementNode(),g.append(m),v))continue;m!==null&&m.append(b)}else g.append(b),m=null}return g})(t),s=i.getLastDescendant(),a=i.getChildren(),l=!R(r)||!r.isEmpty()?this.insertParagraph():null,c=a[a.length-1];let u=a[0];var f;R(f=u)&&yr(f)&&!f.isEmpty()&&R(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(R(r)||U(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=a[1]),u&&(r===null&&U(212,n.constructor.name,n.getType()),(function(p,g){const m=g.getParentOrThrow().getLastChild();let y=g;const b=[g];for(;y!==m;)y.getNextSibling()||U(140),y=y.getNextSibling(),b.push(y);let v=p;for(const w of b)v=v.insertAfter(w)})(r,u));const d=at(s,yr);l&&R(d)&&(l.canMergeWhenEmpty()||yr(c))&&(d.append(...l.getChildren()),l.remove()),R(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const h=R(r)?r.getLastChild():null;xo(h)&&d!==r&&h.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=Tt();return We().splice(this.anchor.offset,0,[s]),s.select(),s}const t=Zc(this),n=at(this.anchor.getNode(),yr);R(n)||U(213);const r=n.getChildAtIndex(t),o=r?[r,...r.getNextSiblings()]:[],i=n.insertNewAfter(this,!1);return i?(i.append(...o),i.selectStart(),i):null}insertLineBreak(t){const n=Lo();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),o=n.getIndexWithinParent();r.select(o,o)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],o=t[n-1];const[i,s]=Of(this),a=this.isBackward(),[l,c]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[u,f]=a?[s,i]:[i,s];if(n===0)return[];if(n===1){if(X(r)&&!this.isCollapsed()){const d=r.splitText(u,f),h=u===0?d[0]:d[1];return h?(l.set(h.getKey(),0,"text"),c.set(h.getKey(),h.getTextContentSize(),"text"),[h]):[]}return[r]}if(X(r)&&(u===r.getTextContentSize()?t.shift():u!==0&&([,r]=r.splitText(u),t[0]=r,l.set(r.getKey(),0,"text"))),X(o)){const d=o.getTextContent().length;f===0?t.pop():f!==d&&([o]=o.splitText(f),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,n,r){if(Ym(this,t,n,r))return;const o=t==="move",i=Re(),s=en(Xt(i));if(!s)return;const a=i._blockCursorElement,l=i._rootElement,c=this.focus.getNode();if(l===null||a===null||!R(c)||c.isInline()||c.canBeEmpty()||Rf(a,i,l),this.dirty){let u=Do(i,this.anchor.key),f=Do(i,this.focus.key);this.anchor.type==="text"&&(u=Di(u)),this.focus.type==="text"&&(f=Di(f)),u&&f&&ix(s,u,this.anchor.offset,f,this.focus.offset)}if((function(u,f,d,h){u.modify(f,d,h)})(s,t,n?"backward":"forward",r),s.rangeCount>0){const u=s.getRangeAt(0),f=this.anchor.getNode(),d=Ye(f)?f:h6(f);if(this.applyDOMRange(u),this.dirty=!0,!o){const h=this.getNodes(),p=[];let g=!1;for(let m=0;m<h.length;m++){const y=h[m];Lf(y,d)?p.push(y):g=!0}if(g&&p.length>0)if(n){const m=p[0];R(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{const m=p[p.length-1];R(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}s.anchorNode===u.startContainer&&s.anchorOffset===u.startOffset||(function(m){const y=m.focus,b=m.anchor,v=b.key,w=b.offset,A=b.type;b.set(y.key,y.offset,y.type,!0),y.set(v,w,A,!0)})(this)}}r==="lineboundary"&&Ym(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&R(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const o=n.getParent(),i=n.getNextSibling()||(o===null?null:o.getNextSibling());if(R(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let o=r.getNode();if(this.forwardDeletion(r,o,t))return;const i=rh(nr(r,t?"previous":"next"));if(i.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of i.iterNodeCarets("shadowRoot"))if(Tn(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(R(i.anchor.origin)&&i.anchor.origin.isEmpty()){const c=Yt(l);Ha(this,Fr(c,c)),i.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(ji(l)){if(R(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(i.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(Te(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&R(i.anchor.origin)&&i.anchor.origin.isEmpty()){i.anchor.origin.remove();const c=ox();c.add(l.origin.getKey()),Pt(c)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:c}=a;return Ha(this,Fr(!l.origin.isEmpty()&&c.isEmpty()?oh(xt(c,l.direction)):i.anchor,l)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&Bm(this,r.getNode()))return}else{const a=s.type==="text"?s.getNode():null;if(o=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=s.offset,c=a.getTextContentSize();if(a.is(o)||t&&l!==c||!t&&l!==0)return void Wm(a,t,l)}else if(o!==null&&o.isSegmented()){const l=r.offset,c=o.getTextContentSize();if(o.is(a)||t&&l!==0||!t&&l!==c)return void Wm(o,t,l)}(function(l,c){const u=l.anchor,f=l.focus,d=u.getNode(),h=f.getNode();if(d===h&&u.type==="text"&&f.type==="text"){const p=u.offset,g=f.offset,m=p<g,y=m?p:g,b=m?g:p,v=b-1;y!==v&&(function(w){return!(Cx(w)||Z3(w))})(d.getTextContent().slice(y,b))&&(c?f.set(f.key,v,f.type):u.set(u.key,v,u.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&Ye(r.getParent())&&r.getPreviousSibling()===null&&Bm(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function ot(e){return e instanceof Jl}function Um(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Of(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[Um(n),Um(r)]}function Bm(e,t){for(let n=t;n;n=n.getParent()){if(R(n)){if(n.collapseAtStart(e))return!0;if(jt(n))break}if(n.getPreviousSibling())break}return!1}const Z3=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function Wm(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let s=0,a=0;for(let c=0;c<i;c++){const u=c===i-1;if(a=s,s+=o[c].length,t&&s===n||s>n||u){o.splice(c,1),u&&(a=void 0);break}}const l=o.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function Km(e,t,n,r){let o,i=t;if(pt(e)){let s=!1;const a=e.childNodes,l=a.length,c=r._blockCursorElement;i===l&&(s=!0,i=l-1);let u=a[i],f=!1;if(u===c)u=a[i+1],f=!0;else if(c!==null){const d=c.parentNode;e===d&&t>Array.prototype.indexOf.call(d.children,c)&&i--}if(o=ci(u),X(o))i=Pr(o,s?"next":"previous");else{let d=ci(e);if(d===null)return null;if(R(d)){const h=r.getElementByKey(d.getKey());h===null&&U(214),[d,i]=d.getDOMSlot(h).resolveChildIndex(d,h,e,t),R(d)||U(215),s&&i>=d.getChildrenSize()&&(i=Math.max(0,d.getChildrenSize()-1));let g=d.getChildAtIndex(i);if(R(g)&&(function(m,y,b){const v=m.getParent();return b===null||v===null||!v.canBeEmpty()||v!==b.getNode()})(g,0,n)){const m=s?g.getLastDescendant():g.getFirstDescendant();m===null?d=g:(g=m,d=R(g)?g:g.getParentOrThrow()),i=0}X(g)?(o=g,d=null,i=Pr(g,s?"next":"previous")):g!==d&&s&&!f&&(R(d)||U(216),i=Math.min(d.getChildrenSize(),i+1))}else{const h=d.getIndexWithinParent();i=t===0&&Te(d)&&ci(e)===d?h:h+1,d=d.getParentOrThrow()}if(R(d))return Pn(d.__key,i,"element")}}else o=ci(e);return X(o)?Pn(o.__key,Pr(o,i,"clamp"),"text"):null}function Hm(e,t,n){const r=e.offset,o=e.getNode();if(r===0){const i=o.getPreviousSibling(),s=o.getParent();if(t){if((n||!t)&&i===null&&R(s)&&s.isInline()){const a=s.getPreviousSibling();X(a)&&e.set(a.__key,a.getTextContent().length,"text")}}else R(i)&&!n&&i.isInline()?e.set(i.__key,i.getChildrenSize(),"element"):X(i)&&e.set(i.__key,i.getTextContent().length,"text")}else if(r===o.getTextContent().length){const i=o.getNextSibling(),s=o.getParent();if(t&&R(i)&&i.isInline())e.set(i.__key,0,"element");else if((n||t)&&i===null&&R(s)&&s.isInline()&&!s.canInsertTextAfter()){const a=s.getNextSibling();X(a)&&e.set(a.__key,0,"text")}}}function ex(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),o=e.is(t);Hm(e,r,o),Hm(t,!r,o),o&&t.set(e.key,e.offset,e.type);const i=Re();if(i.isComposing()&&i._compositionKey!==e.key&&$(n)){const s=n.anchor,a=n.focus;e.set(s.key,s.offset,s.type,!0),t.set(a.key,a.offset,a.type,!0)}}}function tx(e,t,n,r,o,i){if(e===null||n===null||!oa(o,e,n))return null;const s=Km(e,t,$(i)?i.anchor:null,o);if(s===null)return null;const a=Km(n,r,$(i)?i.focus:null,o);if(a===null)return null;if(s.type==="element"&&a.type==="element"){const l=ci(e),c=ci(n);if(Te(l)&&Te(c))return null}return ex(s,a,i),[s,a]}function Pf(e){return R(e)&&!e.isInline()}function nx(e,t,n,r,o,i){const s=Wr(),a=new Wo(Pn(e,t,o),Pn(n,r,i),0,"");return a.dirty=!0,s._selection=a,a}function rx(){const e=Pn("root",0,"element"),t=Pn("root",0,"element");return new Wo(e,t,0,"")}function ox(){return new Jl(new Set)}function jd(e,t,n,r){const o=n._window;if(o===null)return null;const i=r||o.event,s=i?i.type:void 0,a=s==="selectionchange",l=!df&&(a||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&i&&i.detail===3||s==="drop"||s===void 0);let c,u,f,d;if($(e)&&!l)return e.clone();if(t===null)return null;if(c=t.anchorNode,u=t.focusNode,f=t.anchorOffset,d=t.focusOffset,(a||s===void 0)&&$(e)&&!oa(n,c,u))return e.clone();const h=tx(c,f,u,d,n,e);if(h===null)return null;const[p,g]=h;return new Wo(p,g,$(e)?e.format:0,$(e)?e.style:"")}function Z(){return Wr()._selection}function Gi(){return Re()._editorState._selection}function pl(e,t,n,r=1){const o=e.anchor,i=e.focus,s=o.getNode(),a=i.getNode();if(!t.is(s)&&!t.is(a))return;const l=t.__key;if(e.isCollapsed()){const c=o.offset;if(n<=c&&r>0||n<c&&r<0){const u=Math.max(0,c+r);o.set(l,u,"element"),i.set(l,u,"element"),qm(e)}}else{const c=e.isBackward(),u=c?i:o,f=u.getNode(),d=c?o:i,h=d.getNode();if(t.is(f)){const p=u.offset;(n<=p&&r>0||n<p&&r<0)&&u.set(l,Math.max(0,p+r),"element")}if(t.is(h)){const p=d.offset;(n<=p&&r>0||n<p&&r<0)&&d.set(l,Math.max(0,p+r),"element")}}qm(e)}function qm(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!R(i))return;const a=i.getChildrenSize(),l=n>=a,c=l?i.getChildAtIndex(a-1):i.getChildAtIndex(n);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text"),r.set(c.__key,u,"text")}return}if(R(i)){const a=i.getChildrenSize(),l=n>=a,c=l?i.getChildAtIndex(a-1):i.getChildAtIndex(n);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),t.set(c.__key,u,"text")}}if(R(s)){const a=s.getChildrenSize(),l=o>=a,c=l?s.getChildAtIndex(a-1):s.getChildAtIndex(o);if(X(c)){let u=0;l&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}function ml(e,t,n,r,o){let i=null,s=0,a=null;r!==null?(i=r.__key,X(r)?(s=r.getTextContentSize(),a="text"):R(r)&&(s=r.getChildrenSize(),a="element")):o!==null&&(i=o.__key,X(o)?a="text":R(o)&&(a="element")),i!==null&&a!==null?e.set(i,s,a):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function Vm(e,t,n,r,o){e.type==="text"?e.set(n,e.offset+(t?0:o),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function ix(e,t,n,r,o){try{e.setBaseAndExtent(t,n,r,o)}catch{}}function J3(e,t,n,r,o,i,s){const a=r.anchorNode,l=r.focusNode,c=r.anchorOffset,u=r.focusOffset,f=document.activeElement;if(o.has($3)&&f!==i||f!==null&&Hd(f))return;if(!$(t))return void(e!==null&&oa(n,a,l)&&r.removeAllRanges());const d=t.anchor,h=t.focus,p=d.key,g=h.key,m=Do(n,p),y=Do(n,g),b=d.offset,v=h.offset,w=t.format,A=t.style,C=t.isCollapsed();let _=m,E=y,N=!1;if(d.type==="text"){_=Di(m);const Y=d.getNode();N=Y.getFormat()!==w||Y.getStyle()!==A}else $(e)&&e.anchor.type==="text"&&(N=!0);var P,I,W,j,z;if(h.type==="text"&&(E=Di(y)),_!==null&&E!==null&&(C&&(e===null||N||$(e)&&(e.format!==w||e.style!==A))&&(P=w,I=A,W=b,j=p,z=performance.now(),Kv=[P,I,W,j,z]),c!==b||u!==v||a!==_||l!==E||r.type==="Range"&&C||(f!==null&&i.contains(f)||o.has(W3)||i.focus({preventScroll:!0}),d.type==="element"))){if(ix(r,_,b,E,v),!o.has(U3)&&t.isCollapsed()&&i!==null&&i===document.activeElement){const Y=$(t)&&t.anchor.type==="element"?_.childNodes[b]||null:r.rangeCount>0?r.getRangeAt(0):null;if(Y!==null){let Q;if(Y instanceof Text){const oe=document.createRange();oe.selectNode(Y),Q=oe.getBoundingClientRect()}else Q=Y.getBoundingClientRect();(function(oe,M,re){const L=Tx(re),F=Zd(L);if(L===null||F===null)return;let{top:K,bottom:B}=M,J=0,V=0,ee=re;for(;ee!==null;){const te=ee===L.body;if(te)J=0,V=Xt(oe).innerHeight;else{const ye=ee.getBoundingClientRect();J=ye.top,V=ye.bottom}let pe=0;if(K<J?pe=-(J-K):B>V&&(pe=B-V),pe!==0)if(te)F.scrollBy(0,pe);else{const ye=ee.scrollTop;ee.scrollTop+=pe;const me=ee.scrollTop-ye;K-=me,B-=me}if(te)break;ee=ia(ee)}})(n,Q,i)}}Cf=!0}}function sx(e){let t=Z()||Gi();t===null&&(t=We().selectEnd()),t.insertNodes(e)}function Zc(e){let t=e;e.isCollapsed()||t.removeText();const n=Z();$(n)&&(t=n),$(t)||U(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!yr(o);){const s=o;if([o,i]=X3(o,i),s.is(o))break}return i}function X3(e,t){const n=e.getParent();if(!n){const o=Tt();return We().append(o),o.select(),[We(),0]}if(X(e)){const o=e.splitText(t);if(o.length===0)return[n,e.getIndexWithinParent()];const i=t===0?0:1;return[n,o[0].getIndexWithinParent()+i]}if(!R(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const o=new Wo(Pn(e.__key,t,"element"),Pn(e.__key,t,"element"),0,""),i=e.insertNewAfter(o);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function Ym(e,t,n,r,o="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[u,f]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(u.key,u.offset,u.type),!0}const i=nr(e.focus,n?"previous":"next"),s=r==="lineboundary",a=t==="move";let l=i,c=o==="decorators-and-blocks";if(!Lx(l)){for(const u of l){c=!1;const{origin:f}=u;if(!Te(f)||f.isIsolated()||(l=u,!s||!f.isInline()))break}if(c)for(const u of rh(i).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(Tn(u))u.origin.isInline()||(l=u);else{if(R(u.origin))continue;Te(u.origin)&&!u.origin.isInline()&&(l=u)}break}}if(l===i)return!1;if(a&&!s&&Te(l.origin)&&l.origin.isKeyboardSelectable()){const u=ox();return u.add(l.origin.getKey()),Pt(u),!0}return l=Yt(l),a&&$o(e.anchor,l),$o(e.focus,l),c||!s}let it=null,st=null,Ft=!1,Jc=!1,Wa=0;const Qm={characterData:!0,childList:!0,subtree:!0};function na(){return Ft||it!==null&&it._readOnly}function bt(){Ft&&U(13)}function ax(){Wa>99&&U(14)}function Wr(){return it===null&&U(195,lx()),it}function Re(){return st===null&&U(196,lx()),st}function lx(){let e=0;const t=new Set,n=Ro.version;if(typeof window<"u")for(const o of document.querySelectorAll("[contenteditable]")){const i=ec(o);if(qd(i))e++;else if(i){let s=String(i.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function e6(){return st}function Gm(e,t,n){const r=t.__type,o=gx(e,r);let i=n.get(r);i===void 0&&(i=Array.from(o.transforms),n.set(r,i));const s=i.length;for(let a=0;a<s&&(i[a](t),t.isAttached());a++);}function Zm(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function cx(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const o of r)n.add(o)}function t6(e){return zd(e,Re()._nodes)}function zd(e,t){const n=e.type,r=t.get(n);r===void 0&&U(17,n);const o=r.klass;e.type!==o.getType()&&U(18,o.name);const i=o.importJSON(e),s=e.children;if(R(i)&&Array.isArray(s))for(let a=0;a<s.length;a++){const l=zd(s[a],t);i.append(l)}return i}function Jm(e,t,n){const r=it,o=Ft,i=st;it=t,Ft=!0,st=e;try{return n()}finally{it=r,Ft=o,st=i}}function Qn(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n===null)return;const i=e._editorState,s=i._selection,a=n._selection,l=e._dirtyType!==0,c=it,u=Ft,f=st,d=e._updating,h=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&h!==null){st=e,it=n,Ft=!1,e._updating=!0;try{const C=e._dirtyType,_=e._dirtyElements,E=e._dirtyLeaves;h.disconnect(),p=v3(i,n,e,C,_,E)}catch(C){if(C instanceof Error&&e._onError(C),Jc)throw C;return px(e,null,r,n),vv(e),e._dirtyType=2,Jc=!0,Qn(e,i),void(Jc=!1)}finally{h.observe(r,Qm),e._updating=d,it=c,Ft=u,st=f}}n._readOnly||(n._readOnly=!0);const g=e._dirtyLeaves,m=e._dirtyElements,y=e._normalizedNodes,b=e._updateTags,v=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),(function(C,_){const E=C._decorators;let N=C._pendingDecorators||E;const P=_._nodeMap;let I;for(I in N)P.has(I)||(N===E&&(N=Ax(C)),delete N[I])})(e,n);const w=o?null:en(Xt(e));if(e._editable&&w!==null&&(l||a===null||a.dirty||!a.is(s))&&r!==null&&!b.has(B3)){st=e,it=n;try{if(h!==null&&h.disconnect(),l||a===null||a.dirty){const C=e._blockCursorElement;C!==null&&Rf(C,e,r),J3(s,a,e,w,b,r)}(function(C,_,E){let N=C._blockCursorElement;if($(E)&&E.isCollapsed()&&E.anchor.type==="element"&&_.contains(document.activeElement)){const P=E.anchor,I=P.getNode(),W=P.offset;let j=!1,z=null;if(W===I.getChildrenSize())eu(I.getChildAtIndex(W-1))&&(j=!0);else{const Y=I.getChildAtIndex(W);if(Y!==null&&eu(Y)){const Q=Y.getPreviousSibling();(Q===null||eu(Q))&&(j=!0,z=C.getElementByKey(Y.__key))}}if(j){const Y=C.getElementByKey(I.__key);return N===null&&(C._blockCursorElement=N=(function(Q){const oe=Q.theme,M=document.createElement("div");M.contentEditable="false",M.setAttribute("data-lexical-cursor","true");let re=oe.blockCursor;if(re!==void 0){if(typeof re=="string"){const L=pv(re);re=oe.blockCursor=L}re!==void 0&&M.classList.add(...re)}return M})(C._config)),_.style.caretColor="transparent",void(z===null?Y.appendChild(N):Y.insertBefore(N,z))}}N!==null&&Rf(N,C,_)})(e,r,a)}finally{h!==null&&h.observe(r,Qm),st=f,it=c}}p!==null&&(function(C,_,E,N,P){const I=Array.from(C._listeners.mutation),W=I.length;for(let j=0;j<W;j++){const[z,Y]=I[j];for(const Q of Y){const oe=_.get(Q);oe!==void 0&&z(oe,{dirtyLeaves:N,prevEditorState:P,updateTags:E})}}})(e,p,b,g,i),$(a)||a===null||s!==null&&s.is(a)||e.dispatchCommand(Ql,void 0);const A=e._pendingDecorators;A!==null&&(e._decorators=A,e._pendingDecorators=null,As("decorator",e,!0,A)),(function(C,_,E){const N=ng(_),P=ng(E);N!==P&&As("textcontent",C,!0,P)})(e,t||i,n),As("update",e,!0,{dirtyElements:m,dirtyLeaves:g,editorState:n,mutatedNodes:p,normalizedNodes:y,prevEditorState:t||i,tags:b}),(function(C,_){if(C._deferred=[],_.length!==0){const E=C._updating;C._updating=!0;try{for(let N=0;N<_.length;N++)_[N]()}finally{C._updating=E}}})(e,v),(function(C){const _=C._updates;if(_.length!==0){const E=_.shift();if(E){const[N,P]=E;Xl(C,N,P)}}})(e)}function As(e,t,n,...r){const o=t._updating;t._updating=n;try{const i=Array.from(t._listeners[e]);for(let s=0;s<i.length;s++)i[s].apply(null,r)}finally{t._updating=o}}function Xm(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const o=n.shift();if(o){const[i,s]=o,a=e._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(a===null&&U(191),a._flushSync=!0),l&&e._deferred.push(l),cx(e,s.tag)),a==null?Xl(e,i,s):i()}}return r}function Xl(e,t,n){const r=e._updateTags;let o,i=!1,s=!1;n!==void 0&&(o=n.onUpdate,cx(e,n.tag),i=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const a=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=fx(l||a),c=!0),l._flushSync=s;const u=it,f=Ft,d=st,h=e._updating;it=l,Ft=!1,e._updating=!0,st=e;const p=e._headless||e.getRootElement()===null;Wd(null);try{c&&(p?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=(function(b,v){const w=b.getEditorState()._selection,A=en(Xt(b));return $(w)||w==null?jd(w,A,b,v):w.clone()})(e,n&&n.event||null));const m=e._compositionKey;t(),i=Xm(e,i),(function(b,v){const w=v.getEditorState()._selection,A=b._selection;if($(A)){const C=A.anchor,_=A.focus;let E;if(C.type==="text"&&(E=C.getNode(),E.selectionTransform(w,A)),_.type==="text"){const N=_.getNode();E!==N&&N.selectionTransform(w,A)}}})(l,e),e._dirtyType!==0&&(i?(function(b,v){const w=v._dirtyLeaves,A=b._nodeMap;for(const C of w){const _=A.get(C);X(_)&&_.isAttached()&&_.isSimpleText()&&!_.isUnmergeable()&&Nm(_)}})(l,e):(function(b,v){const w=v._dirtyLeaves,A=v._dirtyElements,C=b._nodeMap,_=Er(),E=new Map;let N=w,P=N.size,I=A,W=I.size;for(;P>0||W>0;){if(P>0){v._dirtyLeaves=new Set;for(const j of N){const z=C.get(j);X(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&Nm(z),z!==void 0&&Zm(z,_)&&Gm(v,z,E),w.add(j)}if(N=v._dirtyLeaves,P=N.size,P>0){Wa++;continue}}v._dirtyLeaves=new Set,v._dirtyElements=new Map,I.delete("root")&&I.set("root",!0);for(const j of I){const z=j[0],Y=j[1];if(A.set(z,Y),!Y)continue;const Q=C.get(z);Q!==void 0&&Zm(Q,_)&&Gm(v,Q,E)}N=v._dirtyLeaves,P=N.size,I=v._dirtyElements,W=I.size,Wa++}v._dirtyLeaves=w,v._dirtyElements=A})(l,e),Xm(e),(function(b,v,w,A){const C=b._nodeMap,_=v._nodeMap,E=[];for(const[N]of A){const P=_.get(N);P!==void 0&&(P.isAttached()||(R(P)&&gv(P,N,C,_,E,A),C.has(N)||A.delete(N),E.push(N)))}for(const N of E)_.delete(N);for(const N of w){const P=_.get(N);P===void 0||P.isAttached()||(C.has(N)||w.delete(N),_.delete(N))}})(a,l,e._dirtyLeaves,e._dirtyElements)),m!==e._compositionKey&&(l._flushSync=!0);const y=l._selection;if($(y)){const b=l._nodeMap,v=y.anchor.key,w=y.focus.key;b.get(v)!==void 0&&b.get(w)!==void 0||U(19)}else ot(y)&&y._nodes.size===0&&(l._selection=null)}catch(m){return m instanceof Error&&e._onError(m),e._pendingEditorState=a,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Qn(e)}finally{it=u,Ft=f,st=d,e._updating=h,Wa=0}e._dirtyType!==0||e._deferred.length>0||(function(m,y){const b=y.getEditorState()._selection,v=m._selection;if(v!==null){if(v.dirty||!v.is(b))return!0}else if(b!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,Qn(e)):c&&a6(()=>{Qn(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Sn(e,t,n){st===e&&n===void 0?t():Xl(e,t,n)}class ks{constructor(t,n,r){D(this,"element");D(this,"before");D(this,"after");this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new ks(this.element,t,this.after)}withAfter(t){return new ks(this.element,this.before,t)}withElement(t){return this.element===t?this:new ks(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&U(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&U(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&U(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(ea||Vi||Xs);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,o=this.before,i=document.createElement("br");if(r.insertBefore(i,o),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,o){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,o))]}const i=eg(n,r);i.push(o);const s=eg(n,this.element);let a=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const c=i[l],u=s[l];if(c===void 0||c<u)break;if(c>u){a+=1;break}}return[t.getParentOrThrow(),a]}}function eg(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;n.push(o)}return r!==e&&U(225),n.reverse()}class Mn extends ln{constructor(n){super(n);D(this,"__first");D(this,"__last");D(this,"__size");D(this,"__format");D(this,"__style");D(this,"__indent");D(this,"__dir");D(this,"__textFormat");D(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return a3[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r),r=r.getNextSibling();return n}getChildrenKeys(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r.__key),r=r.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=Re()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(n)}getAllTextNodes(){const n=[];let r=this.getFirstChild();for(;r!==null;){if(X(r)&&n.push(r),R(r)){const o=r.getAllTextNodes();n.push(...o)}r=r.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;R(n);){const r=n.getFirstChild();if(r===null)break;n=r}return n}getLastDescendant(){let n=this.getLastChild();for(;R(n);){const r=n.getLastChild();if(r===null)break;n=r}return n}getDescendantByIndex(n){const r=this.getChildren(),o=r.length;if(n>=o){const s=r[o-1];return R(s)&&s.getLastDescendant()||s||null}const i=r[n];return R(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:Xe(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&U(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:Xe(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&U(96,this.__key),n}getChildAtIndex(n){const r=this.getChildrenSize();let o,i;if(n<r/2){for(o=this.getFirstChild(),i=0;o!==null&&i<=n;){if(i===n)return o;o=o.getNextSibling(),i++}return null}for(o=this.getLastChild(),i=r-1;o!==null&&i>=n;){if(i===n)return o;o=o.getPreviousSibling(),i--}return null}getTextContent(){let n="";const r=this.getChildren(),o=r.length;for(let i=0;i<o;i++){const s=r[i];n+=s.getTextContent(),R(s)&&i!==o-1&&!s.isInline()&&(n+=Dr)}return n}getTextContentSize(){let n=0;const r=this.getChildren(),o=r.length;for(let i=0;i<o;i++){const s=r[i];n+=s.getTextContentSize(),R(s)&&i!==o-1&&!s.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const r=wm[n];return(this.getFormat()&r)!==0}return!1}hasTextFormat(n){const r=Po[n];return(this.getTextFormat()&r)!==0}getFormatFlags(n,r){return gl(this.getLatest().__textFormat,n,r)}getTextStyle(){return this.getLatest().__textStyle}select(n,r){bt();const o=Z();let i=n,s=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&r===0){const c=this.getFirstChild();if(X(c)||R(c))return c.select(0,0)}else if(!(n!==void 0&&n!==a||r!==void 0&&r!==a)){const c=this.getLastChild();if(X(c)||R(c))return c.select()}}i===void 0&&(i=a),s===void 0&&(s=a);const l=this.__key;return $(o)?(o.anchor.set(l,i,"element"),o.focus.set(l,s,"element"),o.dirty=!0,o):nx(l,i,l,s,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(r=>r.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const r=this.getWritable();return r.__dir=n,r}setFormat(n){return this.getWritable().__format=n!==""?wm[n]:0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const r=this.getWritable();return r.__textFormat=n,r}setTextStyle(n){const r=this.getWritable();return r.__textStyle=n,r}setIndent(n){return this.getWritable().__indent=n,this}splice(n,r,o){hl(this)&&U(324,this.__key,this.__type);const i=this.getChildrenSize(),s=this.getWritable();n+r<=i||U(226,String(n),String(r),String(i));const a=s.__key,l=[],c=[],u=this.getChildAtIndex(n+r);let f=null,d=i-r+o.length;if(n!==0)if(n===i)f=this.getLastChild();else{const p=this.getChildAtIndex(n);p!==null&&(f=p.getPreviousSibling())}if(r>0){let p=f===null?this.getFirstChild():f.getNextSibling();for(let g=0;g<r;g++){p===null&&U(100);const m=p.getNextSibling(),y=p.__key;Ao(p.getWritable()),c.push(y),p=m}}let h=f;for(const p of o){h!==null&&p.is(h)&&(f=h=h.getPreviousSibling());const g=p.getWritable();g.__parent===a&&d--,Ao(g);const m=p.__key;if(h===null)s.__first=m,g.__prev=null;else{const y=h.getWritable();y.__next=m,g.__prev=y.__key}p.__key===a&&U(76),g.__parent=a,l.push(m),h=p}if(n+r===i)h!==null&&(h.getWritable().__next=null,s.__last=h.__key);else if(u!==null){const p=u.getWritable();if(h!==null){const g=h.getWritable();p.__prev=h.__key,g.__next=u.__key}else p.__prev=null}if(s.__size=d,c.length){const p=Z();if($(p)){const g=new Set(c),m=new Set(l),{anchor:y,focus:b}=p;tg(y,g,m)&&ml(y,y.getNode(),this,f,u),tg(b,g,m)&&ml(b,b.getNode(),this,f,u),d!==0||this.canBeEmpty()||jt(this)||this.remove()}}return s}getDOMSlot(n){return new ks(n)}exportDOM(n){const{element:r}=super.exportDOM(n);if(pt(r)){const o=this.getIndent();o>0&&(r.style.paddingInlineStart=40*o+"px");const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),o=this.getTextStyle();return r===0&&o===""||jt(this)||this.getChildren().some(X)||(r!==0&&(n.textFormat=r),o!==""&&(n.textStyle=o)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,r){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,r,o){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,r){const o=this.getDOMSlot(n);let i=o.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const a=r.getElementByKey(s.getKey());a!==null&&(i==null?(o.insertChild(a),i=a):i!==a&&o.replaceChild(a,i),i=i.nextSibling)}}}function R(e){return e instanceof Mn}function tg(e,t,n){let r=e.getNode();for(;r;){const o=r.__key;if(t.has(o)&&!n.has(o))return!0;r=r.getParent()}return!1}class ux extends ln{decorate(t,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Te(e){return e instanceof ux}class Zi extends Mn{constructor(){super("root");D(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Zi}getTopLevelElementOrThrow(){U(51)}getTextContent(){const n=this.__cachedText;return!na()&&Re()._dirtyType!==0||n===null?super.getTextContent():n}remove(){U(52)}replace(n){U(53)}insertBefore(n){U(54)}insertAfter(n){U(55)}updateDOM(n,r){return!1}splice(n,r,o){for(const i of o)R(i)||Te(i)||U(282);return super.splice(n,r,o)}static importJSON(n){return We().updateFromJSON(n)}collapseAtStart(){return!0}}function Ye(e){return e instanceof Zi}function fx(e){return new ra(new Map(e._nodeMap))}function $d(){return new ra(new Map([["root",new Zi]]))}function dx(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&U(130,n.name),R(e)){const r=t.children;Array.isArray(r)||U(59,n.name);const o=e.getChildren();for(let i=0;i<o.length;i++){const s=dx(o[i]);r.push(s)}}return t}function n6(e){return e instanceof ra}class ra{constructor(t,n){D(this,"_nodeMap");D(this,"_selection");D(this,"_flushSync");D(this,"_readOnly");this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Jm(n&&n.editor||null,this,t)}clone(t){const n=new ra(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Jm(null,this,()=>({root:dx(We())}))}}class Ud extends Mn{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Ji extends Mn{static getType(){return"paragraph"}static clone(t){return new Ji(t.__key)}createDOM(t){const n=document.createElement("p"),r=bi(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:r6,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(pt(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return Tt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(X);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=Tt();r.setTextFormat(t.format),r.setTextStyle(t.style);const o=this.getDirection();return r.setDirection(o),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||X(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function r6(e){const t=Tt();return e.style&&(t.setFormat(e.style.textAlign),b6(e,t)),{node:t}}function Tt(){return Kr(new Ji)}function Bd(e){return e instanceof Ji}const we=0,Gn=1,o6=3,hx=4;function px(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=$d(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;i!==null&&(i.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function i6(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:o}=rc(r),i=r.transform;if(!n.has(i)){n.add(i);const s=r.transform();s&&t.add(s)}if(o){const s=o.$transform;s&&t.add(s),r=o.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof ln&&s!==ln?s:void 0}}return t}function mx(e){const t=e||{},n=e6(),r=t.theme||{},o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,s=$d(),a=t.namespace||(o!==null?o._config.namespace:_x()),l=t.editorState,c=[Zi,Br,Yi,Qi,Ji,Ud,...t.nodes||[]],{onError:u,html:f}=t,d=t.editable===void 0||t.editable;let h;if(e===void 0&&n!==null)h=n._nodes;else{h=new Map;for(let g=0;g<c.length;g++){let m=c[g],y=null,b=null;if(typeof m!="function"){const A=m;m=A.replace,y=A.with,b=A.withKlass||null}rc(m);const v=m.getType(),w=i6(m);h.set(v,{exportDOM:f&&f.export?f.export.get(m):void 0,klass:m,replace:y,replaceWithKlass:b,sharedNodeState:p3(c[g]),transforms:w})}}const p=new Ro(s,o,h,{disableEvents:i,namespace:a,theme:r},u||console.error,(function(g,m){const y=new Map,b=new Set,v=w=>{Object.keys(w).forEach(A=>{let C=y.get(A);C===void 0&&(C=[],y.set(A,C)),C.push(w[A])})};return g.forEach(w=>{const A=w.klass.importDOM;if(A==null||b.has(A))return;b.add(A);const C=A.call(w.klass);C!==null&&v(C)}),m&&v(m),y})(h,f?f.import:void 0),d,e);return l!==void 0&&(p._pendingEditorState=l,p._dirtyType=2),(function(g){g.registerCommand(Ev,M3,we),g.registerCommand(Sv,I3,we),g.registerCommand(Tv,L3,we),g.registerCommand(Nv,R3,we),g.registerCommand(Ov,D3,we)})(p),p}class Ro{constructor(t,n,r,o,i,s,a,l){D(this,"_headless");D(this,"_parentEditor");D(this,"_rootElement");D(this,"_editorState");D(this,"_pendingEditorState");D(this,"_compositionKey");D(this,"_deferred");D(this,"_keyToDOMMap");D(this,"_updates");D(this,"_updating");D(this,"_listeners");D(this,"_commands");D(this,"_nodes");D(this,"_decorators");D(this,"_pendingDecorators");D(this,"_config");D(this,"_dirtyType");D(this,"_cloneNotNeeded");D(this,"_dirtyLeaves");D(this,"_dirtyElements");D(this,"_normalizedNodes");D(this,"_updateTags");D(this,"_observer");D(this,"_key");D(this,"_onError");D(this,"_htmlConversions");D(this,"_window");D(this,"_editable");D(this,"_blockCursorElement");D(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=_x(),this._onError=i,this._htmlConversions=s,this._editable=a,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&U(35);const o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);const i=o.get(t);i===void 0&&U(36,String(t));const s=i[r];return s.add(n),()=>{s.delete(n),i.every(a=>a.size===0)&&o.delete(t)}}registerMutationListener(t,n,r){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,i=this._listeners.mutation;let s=i.get(n);s===void 0&&(s=new Set,i.set(n,s)),s.add(o);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(n,o),()=>{s.delete(o),s.size===0&&i.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&U(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,o=cg(r).get(n.getType());if(!o)return;const i=new Map;for(const s of o.keys())i.set(s,"created");i.size>0&&t(i,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),o=[r],i=r.replaceWithKlass;if(i!=null){const s=this.registerNodeTransformToKlass(i,n);o.push(s)}return(function(s,a){const l=cg(s.getEditorState()),c=[];for(const u of a){const f=l.get(u);f&&c.push(f)}c.length!==0&&s.update(()=>{for(const u of c)for(const f of u.keys()){const d=Xe(f);d&&d.markDirty()}},s._pendingEditorState===null?{tag:vo}:void 0)})(this,o.map(s=>s.klass.getType())),()=>{o.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return ie(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=bi(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,px(this,n,t,o),n!==null&&(this._config.disableEvents||F3(n),r!=null&&n.classList.remove(...r)),t!==null){const i=Zd(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=i,this._dirtyType=2,vv(this),this._updateTags.add(vo),Qn(this),this._config.disableEvents||(function(a,l){const c=a.ownerDocument;kf.set(a,c);const u=fl.get(c)??0;u<1&&c.addEventListener("selectionchange",Qv),fl.set(c,u+1),a.__lexicalEditor=l;const f=Yv(a);for(let d=0;d<Af.length;d++){const[h,p]=Af[d],g=typeof p=="function"?m=>{Dm(m)||(Rm(m),(l.isEditable()||h==="click")&&p(m,l))}:m=>{if(Dm(m))return;Rm(m);const y=l.isEditable();switch(h){case"cut":return y&&ie(l,Dd,m);case"copy":return ie(l,Zl,m);case"paste":return y&&ie(l,Gl,m);case"dragstart":return y&&ie(l,$v,m);case"dragover":return y&&ie(l,Uv,m);case"dragend":return y&&ie(l,E3,m);case"focus":return y&&ie(l,N3,m);case"blur":return y&&ie(l,O3,m);case"drop":return y&&ie(l,zv,m)}};a.addEventListener(h,g),f.push(()=>{a.removeEventListener(h,g)})}})(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(vo),Qn(this);As("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&U(38);let r=t;r._readOnly&&(r=fx(t),r._selection=t._selection?t._selection.clone():null),bv(this);const o=this._pendingEditorState,i=this._updateTags,s=n!==void 0?n.tag:null;o===null||o.isEmpty()||(s!=null&&i.add(s),Qn(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&i.add(s),this._updating||Qn(this)}parseEditorState(t,n){return(function(r,o,i){const s=$d(),a=it,l=Ft,c=st,u=o._dirtyElements,f=o._dirtyLeaves,d=o._cloneNotNeeded,h=o._dirtyType;o._dirtyElements=new Map,o._dirtyLeaves=new Set,o._cloneNotNeeded=new Set,o._dirtyType=0,it=s,Ft=!1,st=o,Wd(null);try{const p=o._nodes;zd(r.root,p),i&&i(),s._readOnly=!0}catch(p){p instanceof Error&&o._onError(p)}finally{o._dirtyElements=u,o._dirtyLeaves=f,o._cloneNotNeeded=d,o._dirtyType=h,it=a,Ft=l,st=c}return s})(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return Qn(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,o,i){r._updating?r._updates.push([o,i]):Xl(r,o,i)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Sn(this,()=>{const o=Z(),i=We();o!==null?o.dirty||Pt(o.clone()):i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd()),f6("focus"),d6(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=en(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,As("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}D(Ro,"version");Ro.version="0.39.0+prod.esm";let Mf=null;function Wd(e){Mf=e}let s6=1;function gx(e,t){const n=Kd(e,t);return n===void 0&&U(30,t),n}function Kd(e,t){return e._nodes.get(t)}const a6=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function yx(e){return Te(Fi(e))}function Hd(e){const t=document.activeElement;if(!pt(t))return!1;const n=t.nodeName;return Te(Fi(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&ec(t)==null)}function oa(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Hd(t)&&bx(t)===e}catch{return!1}}function qd(e){return e instanceof Ro}function bx(e){let t=e;for(;t!=null;){const n=ec(t);if(qd(n))return n;t=ia(t)}return null}function ec(e){return e?e.__lexicalEditor:null}function wo(e){return Xv(e)||e.isToken()}function Wn(e){return wo(e)||e.isSegmented()}function cr(e){return Xi(e)&&e.nodeType===3}function vx(e){return Xi(e)&&e.nodeType===9}function Di(e){let t=e;for(;t!=null;){if(cr(t))return t;t=t.firstChild}return null}function gl(e,t,n){const r=Po[t];if(n!==null&&(e&r)===(n&r))return e;let o=e^r;return t==="subscript"?o&=-65:t==="superscript"?o&=-33:t==="lowercase"?(o&=-513,o&=-1025):t==="uppercase"?(o&=-257,o&=-1025):t==="capitalize"&&(o&=-257,o&=-513),o}function xx(e){return X(e)||xo(e)||Te(e)}function l6(e,t){const n=(function(){const s=Mf;return Mf=null,s})();if((t=t||n&&n.__key)!=null)return void(e.__key=t);bt(),ax();const r=Re(),o=Wr(),i=""+s6++;o._nodeMap.set(i,e),R(e)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType=1,e.__key=i}function Ao(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling(),s=i!==null?i.__key:null,a=o!==null?o.__key:null,l=o!==null?o.getWritable():null,c=i!==null?i.getWritable():null;o===null&&(r.__first=s),i===null&&(r.__last=a),l!==null&&(l.__next=s),c!==null&&(c.__prev=a),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function yl(e){ax(),hl(e)&&U(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent,r=Wr(),o=Re(),i=r._nodeMap,s=o._dirtyElements;n!==null&&(function(l,c,u){let f=l;for(;f!==null;){if(u.has(f))return;const d=c.get(f);if(d===void 0)break;u.set(f,!1),f=d.__parent}})(n,i,s);const a=t.__key;o._dirtyType=1,R(e)?s.set(a,!0):o._dirtyLeaves.add(a)}function ft(e){bt();const t=Re(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=Xe(n);r!==null&&r.getWritable()}if(e!==null){const r=Xe(e);r!==null&&r.getWritable()}}}function Er(){return na()?null:Re()._compositionKey}function Xe(e,t){const n=(t||Wr())._nodeMap.get(e);return n===void 0?null:n}function wx(e,t){const n=tc(e,Re());return n!==void 0?Xe(n,t):null}function tc(e,t){return e[`__lexicalKey_${t._key}`]}function Fi(e,t){let n=e;for(;n!=null;){const r=wx(n,t);if(r!==null)return r;n=ia(n)}return null}function Ax(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function ng(e){return e.read(()=>We().getTextContent())}function We(){return kx(Wr())}function kx(e){return e._nodeMap.get("root")}function Pt(e){bt();const t=Wr();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function ci(e){const t=Re(),n=(function(r,o){let i=r;for(;i!=null;){const s=tc(i,o);if(s!==void 0)return s;i=ia(i)}return null})(e,t);return n===null?e===t.getRootElement()?Xe("root"):null:Xe(n)}function Cx(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Vd(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function _x(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Ex(e){return cr(e)?e.nodeValue:null}function Yd(e,t,n){const r=en(Xt(t));if(r===null)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:s}=r;if(o!==null){let a=Ex(o);const l=Fi(o);if(a!==null&&X(l)){if(a===Vl&&n){const c=n.length;a=n,i=c,s=c}a!==null&&Qd(l,a,i,s,e)}}}function Qd(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const s=i.isComposing();let a=t;(s||o)&&t[t.length-1]===Vl&&(a=t.slice(0,-1));const l=i.getTextContent();if(o||a!==l){if(a===""){if(ft(null),Xs||Vi||ea)i.remove();else{const g=Re();setTimeout(()=>{g.update(()=>{i.isAttached()&&i.remove()})},20)}return}const c=i.getParent(),u=Gi(),f=i.getTextContentSize(),d=Er(),h=i.getKey();if(i.isToken()||d!==null&&h===d&&!s||$(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===e.__key&&u.anchor.offset===0&&!i.canInsertTextBefore()&&!s||u.focus.key===e.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();const p=Z();if(!$(p)||n===null||r===null)return void rg(i,a,p);if(p.setTextNodeRange(i,n,i,r),i.isSegmented()){const g=rt(i.getTextContent());i.replace(g),i=g}rg(i,a,p)}}}function rg(e,t,n){if(e.setTextContent(t),$(n)){const r=e.getKey();for(const o of["anchor","focus"]){const i=n[o];i.type==="text"&&i.key===r&&(i.offset=Pr(e,i.offset,"clamp"))}}}function Ea(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function c6(e,t){return Ea(e,t,"altKey")&&Ea(e,t,"ctrlKey")&&Ea(e,t,"shiftKey")&&Ea(e,t,"metaKey")}function Ie(e,t,n){return c6(e,n)&&e.key.toLowerCase()===t.toLowerCase()}const Un={ctrlKey:!sn,metaKey:sn},og={altKey:sn,ctrlKey:!sn};function ig(e){return e.key==="Backspace"}function sg(e){return Ie(e,"a",Un)}function u6(e){const t=We();if($(e)){const n=e.anchor,r=e.focus,o=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(o.getKey(),0,"element"),r.set(o.getKey(),o.getChildrenSize(),"element"),Ri(e),e}{const n=t.select(0,t.getChildrenSize());return Pt(Ri(n)),n}}function bi(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const o=e[t];if(typeof o=="string"){const i=pv(o);return n[t]=i,i}return o}function Gd(e,t,n,r,o){if(n.size===0)return;const i=r.__type,s=r.__key,a=t.get(i);a===void 0&&U(33,i);const l=a.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const u=c.get(s),f=u==="destroyed"&&o==="created";(u===void 0||f)&&c.set(s,f?"updated":o)}function ag(e,t,n){const r=e.getParent();let o=n,i=e;return r!==null&&(t&&n===0?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function If(e,t){const n=e.offset;if(e.type==="element")return ag(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const o=t?r.getPreviousSibling():r.getNextSibling();return o===null?ag(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):o}}return null}function Sx(e){const t=Xt(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function ie(e,t,n){return(function(r,o,i){const s=Vd(r);for(let a=4;a>=0;a--)for(let l=0;l<s.length;l++){const c=s[l],u=c._commands.get(o);if(u!==void 0){const f=u[a];if(f!==void 0){const d=Array.from(f),h=d.length;let p=!1;if(Sn(c,()=>{for(let g=0;g<h;g++)if(d[g](i,r))return void(p=!0)}),p)return p}}}return!1})(e,t,n)}function nc(e){return!Ye(e)&&!e.isLastChild()&&!e.isInline()}function Do(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&U(75,t),n}function ia(e){const t=e.assignedSlot||e.parentElement;return Df(t)?t.host:t}function Tx(e){return vx(e)?e:pt(e)?e.ownerDocument:null}function f6(e){bt(),Re()._updateTags.add(e)}function d6(e){bt(),Re()._deferred.push(e)}function Lf(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function Zd(e){const t=Tx(e);return t?t.defaultView:null}function Xt(e){const t=e._window;return t===null&&U(78),t}function h6(e){let t=e.getParentOrThrow();for(;t!==null;){if(jt(t))return t;t=t.getParentOrThrow()}return t}function jt(e){return Ye(e)||R(e)&&e.isShadowRoot()}function Kr(e){const t=Re(),n=e.getType(),r=Kd(t,n);r===void 0&&U(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(o!==null){const s=o(e),a=s.constructor;return i!==null?s instanceof i||U(201,i.name,i.getType(),a.name,a.getType(),e.constructor.name,n):s instanceof e.constructor&&a!==e.constructor||U(202,a.name,a.getType(),e.constructor.name,n),s.__key===e.__key&&U(203,e.constructor.name,n,a.name,a.getType()),s}return e}function Xc(e,t){!Ye(e.getParent())||R(t)||Te(t)||U(99)}function p6(e){const t=Xe(e);return t===null&&U(63,e),t}function eu(e){return(Te(e)||R(e)&&!e.canBeEmpty())&&!e.isInline()}function Rf(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function en(e){return dn?(e||window).getSelection():null}function m6(e){const t=Zd(e);return t?t.getSelection():null}function Nx(e){return pt(e)&&e.tagName==="A"}function pt(e){return Xi(e)&&e.nodeType===1}function Xi(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function Df(e){return Xi(e)&&e.nodeType===11}function Ff(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function bl(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function yr(e){if(Te(e)&&!e.isInline())return!0;if(!R(e)||jt(e))return!1;const t=e.getFirstChild(),n=t===null||xo(t)||X(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Jd(){return Re()}const lg=new WeakMap,g6=new Map;function cg(e){if(!e._readOnly&&e.isEmpty())return g6;e._readOnly||U(192);let t=lg.get(e);return t||(t=(function(n){const r=new Map;for(const[o,i]of n._nodeMap){const s=i.__type;let a=r.get(s);a||(a=new Map,r.set(s,a)),a.set(o,i)}return r})(e),lg.set(e,t)),t}function Ox(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function y6(e){return(t=Ox(e))[Gv]=!0,t;var t}function b6(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function v6(e){return e.__lexicalUnmanaged===!0}function fs(e,t){return(function(n,r){return Object.prototype.hasOwnProperty.call(n,r)})(e,t)&&e[t]!==ln[t]}function rc(e){const t=Am in e.prototype?e.prototype[Am]():void 0,n=(function(s){if(!(s===ln||s.prototype instanceof ln)){let a="<unknown>",l="<unknown>";try{a=s.getType()}catch{}try{Ro.version&&(l=JSON.parse(Ro.version))}catch{}U(290,s.name,a,l)}return s===ux||s===Mn||s===ln})(e),r=!n&&fs(e,"getType")?e.getType():void 0;let o,i=r;if(t)if(r)o=t[r];else for(const[s,a]of Object.entries(t))i=s,o=a;if(!n&&i&&(fs(e,"getType")||(e.getType=()=>i),fs(e,"clone")||(e.clone=s=>(Wd(s),new e)),fs(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(s=>new e().updateFromJSON(s))),!fs(e,"importDOM")&&o)){const{importDOM:s}=o;s&&(e.importDOM=()=>s)}return{ownNodeConfig:o,ownNodeType:i}}const at=(e,t)=>{let n=e;for(;n!=null&&!Ye(n);){if(t(n))return n;n=n.getParent()}return null},x6={next:"previous",previous:"next"};class Xd{constructor(t){D(this,"origin");this.origin=t}[Symbol.iterator](){return Px({hasNext:ji,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return xt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return xt(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const o=r===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),a=new Map;for(let l=i.getAdjacentCaret();l!==null&&a.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();a.set(c.getKey(),c)}for(const l of o){if(a.size>0){const c=i.getNodeAtCaret();if(c){if(a.delete(c.getKey()),a.delete(l.getKey()),!(c.is(l)||i.origin.is(l))){const u=l.getParent();u&&u.is(s)&&l.remove(),c.replace(l)}}else c===null&&U(263,Array.from(a).join(" "))}else i.insert(l);i=xt(l,this.direction)}for(const l of a.values())l.remove();return this}}class zs extends Xd{constructor(){super(...arguments);D(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:un(n,this.direction)}getParentCaret(n="root"){return xt(eh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=es(this.direction);return xt(this.getNodeAtCaret(),n)||un(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof zs&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const w6={root:Ye,shadowRoot:jt};function es(e){return x6[e]}function eh(e,t="root"){return w6[t](e)?null:e}class Fo extends Xd{constructor(){super(...arguments);D(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:xt(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return R(this.origin)?un(this.origin,this.direction):null}getParentCaret(n="root"){return xt(eh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=es(this.direction);return xt(this.getNodeAtCaret(),n)||un(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof Fo&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof Fo||n instanceof jo)&&this.direction===n.direction&&this.origin.is(n.origin)}}class jo extends Xd{constructor(n,r){super(n);D(this,"type","text");D(this,"offset");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:zo(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return xt(eh(this.getParentAtCaret(),n),this.direction)}getFlipped(){return zo(this.origin,es(this.direction),this.offset)}isSamePointCaret(n){return n instanceof jo&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof Fo||n instanceof jo)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return xt(this.origin,this.direction)}}function Or(e){return e instanceof jo}function ji(e){return e instanceof Fo}function Tn(e){return e instanceof zs}const A6={next:class extends jo{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends jo{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},k6={next:class extends Fo{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Fo{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},C6={next:class extends zs{constructor(){super(...arguments);D(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends zs{constructor(){super(...arguments);D(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function xt(e,t){return e?new k6[t](e):null}function zo(e,t,n){return e?new A6[t](e,Pr(e,n)):null}function Pr(e,t,n="error"){const r=e.getTextContentSize();let o=t==="next"?r:t==="previous"?0:t;return(o<0||o>r)&&(n!=="clamp"&&dv(284,String(t),String(r),e.getKey()),o=o<0?0:r),o}function ug(e,t){return new E6(e,t)}function un(e,t){return R(e)?new C6[t](e):null}function _6(e){return e&&e.getChildCaret()||e}function th(e){return e&&_6(e.getAdjacentCaret())}class nh{constructor(t,n,r){D(this,"type","node-caret-range");D(this,"direction");D(this,"anchor");D(this,"focus");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new nh(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=o=>{const i=this[o].getLatest();return Or(i)?(function(s,a){const{direction:l,origin:c}=s,u=Pr(c,a==="focus"?es(l):l);return ug(s,u-s.offset)})(i,o):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:o}=n,{caret:i}=r;if(o.isSameNodeCaret(i))return[ug(o,i.offset-o.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=Or(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),o=Or(r),i=s=>s.isSameNodeCaret(r)?null:th(s)||s.getParentCaret(t);return Px({hasNext:s=>s!==null&&!(o&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:i(n),map:s=>s,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class E6{constructor(t,n){D(this,"type","slice");D(this,"caret");D(this,"distance");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,o]=this.getSliceIndices(),i=t.getTextContent();return zo(t.setTextContent(i.slice(0,r)+i.slice(o)),n,r)}}function rh(e){return Fr(e,xt(We(),e.direction))}function S6(e){return Fr(e,e)}function Fr(e,t){return e.direction!==t.direction&&U(265),new nh(e,t,e.direction)}function Px(e){const{initial:t,hasNext:n,step:r,map:o}=e;let i=t;return{[Symbol.iterator](){return this},next(){if(!n(i))return{done:!0,value:void 0};const s={done:!1,value:o(i)};return i=r(i),s}}}function Mx(e,t){const n=Ka(e.origin,t.origin);switch(n===null&&U(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",o=t.type==="text";return r&&o?(function(i,s){return Math.sign(i-s)})(e.offset,t.offset):e.type===t.type?0:r?-1:o?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return Ix(n)}}function Ix(e){const{a:t,b:n}=e,r=t.__key,o=n.__key;let i=t,s=n;for(;i&&s;i=i.getNextSibling(),s=s.getNextSibling()){if(i.__key===o)return-1;if(s.__key===r)return 1}return i===null?1:-1}function Sa(e,t){return t.is(e)}function fg(e){return R(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Ka(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,o]=fg(e);r;o=r,r=r.getParent())n.set(r,o);for(let[r,o]=fg(t);r;o=r,r=r.getParent()){const i=n.get(r);if(i!==void 0)return i===null?(Sa(e,r)||U(276),{commonAncestor:r,type:"ancestor"}):o===null?(Sa(t,r)||U(277),{commonAncestor:r,type:"descendant"}):((R(i)||Sa(e,i))&&(R(o)||Sa(t,o))&&r.is(i.getParent())&&r.is(o.getParent())||U(278),{a:i,b:o,commonAncestor:r,type:"branch"})}return null}function nr(e,t){const{type:n,key:r,offset:o}=e,i=p6(e.key);return n==="text"?(X(i)||U(266,i.getType(),r),zo(i,t,o)):(R(i)||U(267,i.getType(),r),O6(i,e.offset,t))}function $o(e,t){const{origin:n,direction:r}=t,o=r==="next";Or(t)?e.set(n.getKey(),t.offset,"text"):ji(t)?X(n)?e.set(n.getKey(),Pr(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(o?1:0),"element"):(Tn(t)&&R(n)||U(268),e.set(n.getKey(),o?0:n.getChildrenSize(),"element"))}function T6(e){const t=Z(),n=$(t)?t:rx();return Ha(n,e),Pt(n),n}function Ha(e,t){$o(e.anchor,t.anchor),$o(e.focus,t.focus)}function dg(e){const{anchor:t,focus:n}=e,r=nr(t,"next"),o=nr(n,"next"),i=Mx(r,o)<=0?"next":"previous";return Fr(zi(r,i),zi(o,i))}function oh(e){const{direction:t,origin:n}=e,r=xt(n,es(t)).getNodeAtCaret();return r?xt(r,t):un(n.getParentOrThrow(),t)}function hg(e,t="root"){const n=[e];for(let r=Tn(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(oh(r));return n}function tu(e){return!!e&&e.origin.isAttached()}function N6(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let o=t;const i=Rx(e,r),s=hg(i.anchor,n),a=hg(i.focus.getFlipped(),n),l=new Set,c=[];for(const p of i.iterNodeCarets(n))if(Tn(p))l.add(p.origin.getKey());else if(ji(p)){const{origin:g}=p;R(g)&&!l.has(g.getKey())||c.push(g)}for(const p of c)p.remove();for(const p of i.getTextSlices()){if(!p)continue;const{origin:g}=p.caret,m=g.getTextContentSize(),y=oh(xt(g,r)),b=g.getMode();if(Math.abs(p.distance)===m&&o==="removeEmptySlices"||b==="token"&&p.distance!==0)y.remove();else if(p.distance!==0){o="removeEmptySlices";let v=p.removeTextSlice();const w=p.caret.origin;if(b==="segmented"){const A=v.origin,C=rt(A.getTextContent()).setStyle(A.getStyle()).setFormat(A.getFormat());y.replaceOrInsert(C),v=zo(C,r,v.offset)}w.is(s[0].origin)&&(s[0]=v),w.is(a[0].origin)&&(a[0]=v.getFlipped())}}let u,f;for(const p of s)if(tu(p)){u=Yt(p);break}for(const p of a)if(tu(p)){f=Yt(p);break}const d=(function(p,g,m){if(!p||!g)return null;const y=p.getParentAtCaret(),b=g.getParentAtCaret();if(!y||!b)return null;const v=y.getParents().reverse();v.push(y);const w=b.getParents().reverse();w.push(b);const A=Math.min(v.length,w.length);let C;for(C=0;C<A&&v[C]===w[C];C++);const _=(P,I)=>{let W;for(let j=C;j<P.length;j++){const z=P[j];if(jt(z))return;!W&&I(z)&&(W=z)}return W},E=_(v,yr),N=E&&_(w,P=>m.has(P.getKey())&&yr(P));return E&&N?[E,N]:null})(u,f,l);if(d){const[p,g]=d;un(p,"previous").splice(0,g.getChildren()),g.remove()}const h=[u,f,...s,...a].find(tu);if(h)return S6(zi(Yt(h),e.direction));U(269,JSON.stringify(s.map(p=>p.origin.__key)))}function Yt(e){const t=(function(o){let i=o;for(;Tn(i);){const s=th(i);if(!Tn(s))break;i=s}return i})(e.getLatest()),{direction:n}=t;if(X(t.origin))return Or(t)?t:zo(t.origin,n,n);const r=t.getAdjacentCaret();return ji(r)&&X(r.origin)?zo(r.origin,n,es(n)):t}function Lx(e){return Or(e)&&e.offset!==Pr(e.origin,e.direction)}function zi(e,t){return e.direction===t?e:e.getFlipped()}function Rx(e,t){return e.direction===t?e:Fr(zi(e.focus,t),zi(e.anchor,t))}function O6(e,t,n){let r=un(e,"next");for(let o=0;o<t;o++){const i=r.getAdjacentCaret();if(i===null)break;r=i}return zi(r,n)}function P6(...e){return e}function M6(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}const Dx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,I6=Dx?T.useLayoutEffect:T.useEffect,Ta={tag:vo};function L6({initialConfig:e,children:t}){const n=T.useMemo(()=>{const{theme:r,namespace:o,nodes:i,onError:s,editorState:a,html:l}=e,c=VT(null,r),u=mx({editable:e.editable,html:l,namespace:o,nodes:i,onError:f=>s(f,u),theme:r});return(function(f,d){if(d!==null){if(d===void 0)f.update(()=>{const h=We();if(h.isEmpty()){const p=Tt();h.append(p);const g=Dx?document.activeElement:null;(Z()!==null||g!==null&&g===f.getRootElement())&&p.select()}},Ta);else if(d!==null)switch(typeof d){case"string":{const h=f.parseEditorState(d);f.setEditorState(h,Ta);break}case"object":f.setEditorState(d,Ta);break;case"function":f.update(()=>{We().isEmpty()&&d(f)},Ta)}}})(u,a),[u,c]},[]);return I6(()=>{const r=e.editable,[o]=n;o.setEditable(r===void 0||r)},[]),x.jsx(fv.Provider,{value:n,children:t})}const R6=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function D6(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function F6(){return(function(e){const[t]=ht(),n=T.useMemo(()=>e(t),[t,e]),[r,o]=T.useState(()=>n.initialValueFn()),i=T.useRef(r);return R6(()=>{const{initialValueFn:s,subscribe:a}=n,l=s();return i.current!==l&&(i.current=l,o(l)),a(c=>{i.current=c,o(c)})},[n,e]),r})(D6)}function j6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const jf=new Map;function Fx(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[o,i]=r.split(/:([^]+)/);o&&i&&(t[o.trim()]=i.trim())}return t}function pg(e){let t=jf.get(e);return t===void 0&&(t=Fx(e),jf.set(e,t)),t}function jx(e){const t=Jd().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function zx(e){return jx(Ye(e)?e:e.getParentOrThrow())}function mg(e){const t=zx(e);return t!==null&&t.direction==="rtl"}function $x(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Wn(t)&&r!==null){const[o,i]=r,s=e.isBackward(),a=o.getNode(),l=i.getNode(),c=t.is(a),u=t.is(l);if(c||u){const[f,d]=Of(e),h=a.is(l),p=t.is(s?l:a),g=t.is(s?a:l);let m,y=0;h?(y=f>d?d:f,m=f>d?f:d):p?(y=s?d:f,m=void 0):g&&(y=0,m=s?f:d);const b=t.__text.slice(y,m);b!==t.__text&&(n==="clone"&&(t=y6(t)),t.__text=b)}}return t}function gg(e){if(e.type==="text")return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return R(t)||j6(177),e.offset===t.getChildrenSize()}function z6(e){const t=e.getStyle(),n=Fx(t);jf.set(t,n)}function Ux(e){const t=Bx(e);return t!==null&&t.writingMode==="vertical-rl"}function Bx(e){const t=e.anchor.getNode();return R(t)?jx(t):zx(t)}function yg(e,t){let n=Ux(e)?!t:t;Wx(e)&&(n=!n);const r=nr(e.focus,n?"previous":"next");if(Lx(r))return!1;for(const o of rh(r)){if(Tn(o))return!o.origin.isInline();if(!R(o.origin)){if(Te(o.origin))return!0;break}}return!1}function $6(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Wx(e){const t=Bx(e);return t!==null&&t.direction==="rtl"}function bg(e,t,n){const r=Wx(e);let o;o=Ux(e)||r?!n:n,$6(e,t,o,"character")}function U6(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Kx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,B6=Kx&&"documentMode"in document?document.documentMode:null;!(!Kx||!("InputEvent"in window)||B6)&&"getTargetRanges"in new window.InputEvent("input");function Hx(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function fn(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function ih(e,...t){const n=Hx(...t);n.length>0&&e.classList.add(...n)}function qx(e,...t){const n=Hx(...t);n.length>0&&e.classList.remove(...n)}function W6(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function K6(e){const t=at(e,n=>R(n)&&!n.isInline());return R(t)||U6(4,e.__key),t}function Sr(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}const H6=Symbol.for("preact-signals");function oc(){if(Mr>1)return void Mr--;let e,t=!1;for(;Cs!==void 0;){let n=Cs;for(Cs=void 0,zf++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Vx(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(zf=0,Mr--,t)throw e}function q6(e){if(Mr>0)return e();Mr++;try{return e()}finally{oc()}}let Pe,Cs;function vg(e){const t=Pe;Pe=void 0;try{return e()}finally{Pe=t}}let Mr=0,zf=0,qa=0;function xg(e){if(Pe===void 0)return;let t=e.n;return t===void 0||t.t!==Pe?(t={i:0,S:e,p:Pe.s,n:void 0,t:Pe,e:void 0,x:void 0,r:t},Pe.s!==void 0&&(Pe.s.n=t),Pe.s=t,e.n=t,32&Pe.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Pe.s,t.n=void 0,Pe.s.n=t,Pe.s=t),t):void 0}function Ct(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function V6(e,t){return new Ct(e,t)}function Vx(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function wg(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Yx(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}function ti(e,t){Ct.call(this,void 0),this.x=e,this.s=void 0,this.g=qa-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function Qx(e){const t=e.u;if(e.u=void 0,typeof t=="function"){Mr++;const n=Pe;Pe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,sh(e),r}finally{Pe=n,oc()}}}function sh(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Qx(e)}function Y6(e){if(Pe!==this)throw new Error("Out-of-order effect");Yx(this),Pe=e,this.f&=-2,8&this.f&&sh(this),oc()}function ai(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function $s(e,t){const n=new ai(e,t);try{n.c()}catch(o){throw n.d(),o}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Gx(e,t={}){const n={};for(const r in e){const o=t[r],i=V6(o===void 0?e[r]:o);n[r]=i}return n}Ct.prototype.brand=H6,Ct.prototype.h=function(){return!0},Ct.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:vg(()=>{var n;(n=this.W)==null||n.call(this)}))},Ct.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&vg(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Ct.prototype.subscribe=function(e){return $s(()=>{const t=this.value,n=Pe;Pe=void 0;try{e(t)}finally{Pe=n}},{name:"sub"})},Ct.prototype.valueOf=function(){return this.value},Ct.prototype.toString=function(){return this.value+""},Ct.prototype.toJSON=function(){return this.value},Ct.prototype.peek=function(){const e=Pe;Pe=void 0;try{return this.value}finally{Pe=e}},Object.defineProperty(Ct.prototype,"value",{get(){const e=xg(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(zf>100)throw new Error("Cycle detected");this.v=e,this.i++,qa++,Mr++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{oc()}}}}),ti.prototype=new Ct,ti.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===qa))return!0;if(this.g=qa,this.f|=1,this.i>0&&!Vx(this))return this.f&=-2,!0;const e=Pe;try{wg(this),Pe=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Pe=e,Yx(this),this.f&=-2,!0},ti.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}Ct.prototype.S.call(this,e)},ti.prototype.U=function(e){if(this.t!==void 0&&(Ct.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},ti.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(ti.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=xg(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),ai.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},ai.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Qx(this),wg(this),Mr++;const e=Pe;return Pe=this,Y6.bind(this,e)},ai.prototype.N=function(){2&this.f||(this.f|=2,this.o=Cs,Cs=this)},ai.prototype.d=function(){this.f|=8,1&this.f||sh(this)},ai.prototype.dispose=function(){this.d()};function Q6(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function Fe(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Zx(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const o in r)n[o]=Zx(n[o],r[o]);return e}return t}const ah=0,$f=1,Jx=2,nu=3,Na=4,ni=5,ru=6,ds=7;function ou(e){return e.id===ah}function Xx(e){return e.id===Jx}function G6(e){return(function(t){return t.id===$f})(e)||Fe(305,String(e.id),String($f)),Object.assign(e,{id:Jx})}const Z6=new Set;class J6{constructor(t,n){D(this,"builder");D(this,"configs");D(this,"_dependency");D(this,"_peerNameSet");D(this,"extension");D(this,"state");D(this,"_signal");this.builder=t,this.extension=n,this.configs=new Set,this.state={id:ah}}mergeConfigs(){let t=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):M6;for(const r of this.configs)t=n(t,r);return t}init(t){const n=this.state;Xx(n)||Fe(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},o={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=(function(a,l,c){return Object.assign(a,{config:l,id:nu,registerState:c})})(n,this.mergeConfigs(),r);let s;this.state=i,this.extension.init&&(s=this.extension.init(t,i.config,r)),this.state=(function(a,l,c){return Object.assign(a,{id:Na,initResult:l,registerState:c})})(i,s,o)}build(t){const n=this.state;let r;n.id!==Na&&Fe(307,String(n.id),String(ni)),this.extension.build&&(r=this.extension.build(t,n.config,n.registerState));const o={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=(function(i,s,a){return Object.assign(i,{id:ni,output:s,registerState:a})})(n,r,o)}register(t,n){this._signal=n;const r=this.state;r.id!==ni&&Fe(308,String(r.id),String(ni));const o=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=(function(i){return Object.assign(i,{id:ru})})(r),()=>{const i=this.state;i.id!==ds&&Fe(309,String(r.id),String(ds)),this.state=(function(s){return Object.assign(s,{id:ni})})(i),o&&o()}}afterRegistration(t){const n=this.state;let r;return n.id!==ru&&Fe(310,String(n.id),String(ru)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,n.config,n.registerState)),this.state=(function(o){return Object.assign(o,{id:ds})})(n),r}getSignal(){return this._signal===void 0&&Fe(311),this._signal}getInitResult(){this.extension.init===void 0&&Fe(312,this.extension.name);const t=this.state;return(function(n){return n.id>=Na})(t)||Fe(313,String(t.id),String(Na)),t.initResult}getInitPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(n){return n.id>=nu})(t)||Fe(314,String(t.id),String(nu)),{config:t.config}}getPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}getInitDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Fe(315,this.extension.name,t.name),n.getExtensionInitDependency()}getDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&Fe(315,this.extension.name,t.name),n.getExtensionDependency()}getState(){const t=this.state;return(function(n){return n.id>=ds})(t)||Fe(316,String(t.id),String(ds)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||Z6}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(n){return n.id>=ni})(t)||Fe(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const Ag={tag:vo};function X6(){const e=We();e.isEmpty()&&e.append(Tt())}const eN={config:{setOptions:Ag,updateOptions:Ag},init:({$initialEditorState:e=X6})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const o=r.getInitResult();if(!o.initialized){o.initialized=!0;const{$initialEditorState:i}=o;if(n6(i))e.setEditorState(i,n);else if(typeof i=="function")e.update(()=>{i(e)},t);else if(i&&(typeof i=="string"||typeof i=="object")){const s=e.parseEditorState(i);e.setEditorState(s,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Zi,Br,Yi,Qi,Ji]},kg=Symbol.for("@lexical/extension/LexicalBuilder");function Cg(){}function tN(e){throw e}function Oa(e){return Array.isArray(e)?e:[e]}const iu="0.39.0+prod.esm";class vi{constructor(t){D(this,"roots");D(this,"extensionNameMap");D(this,"outgoingConfigEdges");D(this,"incomingEdges");D(this,"conflicts");D(this,"_sortedExtensionReps");D(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=iu,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Oa(eN)];for(const r of t)n.push(Oa(r));return new vi(n)}static maybeFromEditor(t){const n=t[kg];return n&&(n.PACKAGE_VERSION!==iu&&Fe(292,n.PACKAGE_VERSION,iu),n instanceof vi||Fe(293)),n}static fromEditor(t){const n=vi.maybeFromEditor(t);return n===void 0&&Fe(294),n}constructEditor(){const{$initialEditorState:t,onError:n,...r}=this.buildCreateEditorArgs(),o=Object.assign(mx({...r,...n?{onError:i=>{n(i,o)}}:{}}),{[kg]:this});for(const i of this.sortedExtensionReps())i.build(o);return o}buildEditor(){let t=Cg;function n(){try{t()}finally{t=Cg}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=fn(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&Fe(295,t.name),n}addEdge(t,n,r){const o=this.outgoingConfigEdges.get(t);o?o.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const i=this.incomingEdges.get(n);i?i.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&Fe(296);const n=Oa(t),[r]=n;typeof r.name!="string"&&Fe(297,typeof r.name);let o=this.extensionNameMap.get(r.name);if(o!==void 0&&o.extension!==r&&Fe(298,r.name),!o){o=new J6(this,r),this.extensionNameMap.set(r.name,o);const i=this.conflicts.get(r.name);typeof i=="string"&&Fe(299,r.name,i);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&Fe(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const a=Oa(s);this.addEdge(r.name,a[0].name,a.slice(1)),this.addExtension(a)}for(const[s,a]of r.peerDependencies||[])this.addEdge(r.name,s,a?[a]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=(r,o)=>{let i=r.state;if(Xx(i))return;const s=r.extension.name;var a;ou(i)||Fe(300,s,o||"[unknown]"),ou(a=i)||Fe(304,String(a.id),String(ah)),i=Object.assign(a,{id:$f}),r.state=i;const l=this.outgoingConfigEdges.get(s);if(l)for(const c of l.keys()){const u=this.extensionNameMap.get(c);u&&n(u,s)}i=G6(i),r.state=i,t.push(r)};for(const r of this.extensionNameMap.values())ou(r.state)&&n(r);for(const r of t)for(const[o,i]of this.outgoingConfigEdges.get(r.extension.name)||[])if(i.length>0){const s=this.extensionNameMap.get(o);if(s)for(const a of i)s.configs.add(a)}for(const[r,...o]of this.roots)if(o.length>0){const i=this.extensionNameMap.get(r.name);i===void 0&&Fe(301,r.name);for(const s of o)i.configs.add(s)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,o=[()=>r.abort()],i=r.signal;for(const s of n){const a=s.register(t,i);a&&o.push(a)}for(const s of n){const a=s.afterRegistration(t);a&&o.push(a)}return fn(...o)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,o=new Map,i={},s={},a=this.sortedExtensionReps();for(const u of a){const{extension:f}=u;if(f.onError!==void 0&&(t.onError=f.onError),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const d of Q6(f)){if(typeof d!="function"){const h=r.get(d.replace);h&&Fe(302,f.name,d.replace.name,h.extension.name),r.set(d.replace,u)}n.add(d)}if(f.html){if(f.html.export)for(const[d,h]of f.html.export.entries())o.set(d,h);f.html.import&&Object.assign(i,f.html.import)}f.theme&&Zx(s,f.theme)}Object.keys(s).length>0&&(t.theme=s),n.size&&(t.nodes=[...n]);const l=Object.keys(i).length>0,c=o.size>0;(l||c)&&(t.html={},l&&(t.html.import=i),c&&(t.html.export=o));for(const u of a)u.init(t);return t.onError||(t.onError=tN),t}}function nN(e,t){const n=vi.fromEditor(e).extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}const rN={name:"@lexical/react/ReactProvider"};function oN(){return We().getTextContent()}function iN(e,t=!0){if(e)return!1;let n=oN();return t&&(n=n.trim()),n===""}function sN(e){if(!iN(e,!1))return!1;const t=We().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const o=t[r];if(Te(o))return!1;if(R(o)){if(!Bd(o)||o.__indent!==0)return!1;const i=o.getChildren(),s=i.length;for(let a=0;a<s;a++){const l=i[r];if(!X(l))return!1}}}return!0}function e1(e){return()=>sN(e)}function aN(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const o=e.getRootElement();if(document.activeElement!==o)return;const i=r.data;if(typeof i=="string"){let s;try{s=JSON.parse(i)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const a=s.payload;if(a&&a.functionId==="makeChanges"){const l=a.args;if(l){const[c,u,f,d,h]=l;e.update(()=>{const p=Z();if($(p)){const g=p.anchor;let m=g.getNode(),y=0,b=0;if(X(m)&&c>=0&&u>=0&&(y=c,b=c+u,p.setTextNodeRange(m,y,m,b)),y===b&&f===""||(p.insertRawText(f),m=g.getNode()),X(m)){y=d,b=d+h;const v=m.getTextContentSize();y=y>v?v:y,b=b>v?v:b,p.setTextNodeRange(m,y,m,b)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function t1(e,t){const n=vx(t)?t.body.childNodes:t.childNodes;let r=[];const o=[];for(const i of n)if(!o1.has(i.nodeName)){const s=i1(i,e,o,!1);s!==null&&(r=r.concat(s))}return(function(i){for(const s of i)s.getNextSibling()instanceof Ud&&s.insertAfter(Lo());for(const s of i){const a=s.getChildren();for(const l of a)s.insertBefore(l);s.remove()}})(o),r}function n1(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=We().getChildren();for(let o=0;o<r.length;o++)r1(e,r[o],n,t);return n.innerHTML}function r1(e,t,n,r=null){let o=r===null||t.isSelected(r);const i=R(t)&&t.excludeFromCopy("html");let s=t;r!==null&&X(t)&&(s=$x(r,t,"clone"));const a=R(s)?s.getChildren():[],l=Kd(e,s.getType());let c;c=l&&l.exportDOM!==void 0?l.exportDOM(e,s):s.exportDOM(e);const{element:u,after:f}=c;if(!u)return!1;const d=document.createDocumentFragment();for(let h=0;h<a.length;h++){const p=a[h],g=r1(e,p,d,r);!o&&R(t)&&g&&t.extractWithChild(p,r,"html")&&(o=!0)}if(o&&!i){if((pt(u)||Df(u))&&u.append(d),n.append(u),f){const h=f.call(s,u);h&&(Df(u)?u.replaceChildren(h):u.replaceWith(h))}}else n.append(d);return o}const o1=new Set(["STYLE","SCRIPT"]);function i1(e,t,n,r,o=new Map,i){let s=[];if(o1.has(e.nodeName))return s;let a=null;const l=(function(p,g){const{nodeName:m}=p,y=g._htmlConversions.get(m.toLowerCase());let b=null;if(y!==void 0)for(const v of y){const w=v(p);w!==null&&(b===null||(b.priority||0)<=(w.priority||0))&&(b=w)}return b!==null?b.conversion:null})(e,t),c=l?l(e):null;let u=null;if(c!==null){u=c.after;const p=c.node;if(a=Array.isArray(p)?p[p.length-1]:p,a!==null){for(const[,g]of o)if(a=g(a,i),!a)break;a&&s.push(...Array.isArray(p)?p:[a])}c.forChild!=null&&o.set(e.nodeName,c.forChild)}const f=e.childNodes;let d=[];const h=(a==null||!jt(a))&&(a!=null&&Pf(a)||r);for(let p=0;p<f.length;p++)d.push(...i1(f[p],t,n,h,new Map(o),a));return u!=null&&(d=u(d)),bl(e)&&(d=lN(e,d,h?()=>{const p=new Ud;return n.push(p),p}:Tt)),a==null?d.length>0?s=s.concat(d):bl(e)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:Ff(p.nextSibling)&&Ff(p.previousSibling)})(e)&&(s=s.concat(Lo())):R(a)&&a.append(...d),s}function lN(e,t,n){const r=e.style.textAlign,o=[];let i=[];for(let s=0;s<t.length;s++){const a=t[s];if(Pf(a))r&&!a.getFormat()&&a.setFormat(r),o.push(a);else if(i.push(a),s===t.length-1||s<t.length-1&&Pf(t[s+1])){const l=n();l.setFormat(r),l.append(...i),o.push(l),i=[]}}return o}function vl(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function cN(e,t=Z()){return t==null&&vl(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?"":n1(e,t)}function uN(e,t=Z()){return t==null&&vl(166),$(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(fN(e,t))}function _g(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const a=JSON.parse(r);if(a.namespace===n._config.namespace&&Array.isArray(a.nodes))return Eg(n,dN(a.nodes),t)}catch(a){console.error(a)}const o=e.getData("text/html"),i=e.getData("text/plain");if(o&&i!==o)try{const a=new DOMParser().parseFromString((function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(l):l})(o),"text/html");return Eg(n,t1(n,a),t)}catch(a){console.error(a)}const s=i||e.getData("text/uri-list");if(s!=null)if($(t)){const a=s.split(/(\r?\n|\t)/);a[a.length-1]===""&&a.pop();for(let l=0;l<a.length;l++){const c=Z();if($(c)){const u=a[l];u===`
|
|
605
605
|
`||u===`\r
|
|
606
|
-
`?c.insertParagraph():u===" "?c.insertNodes([ta()]):c.insertText(u)}}}else t.insertRawText(s)}function Eg(e,t,n){e.dispatchCommand(x3,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if($(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=nr(o,"previous");if(s)if(Or(s))i=s.origin;else{const a=Fr(s,un(We(),"next").getFlipped());for(const l of a){if(X(l.origin)){i=l.origin;break}if(R(l.origin)&&!l.origin.isInline())break}}if(i&&X(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(n))}function s1(e,t,n,r=[]){let o=t===null||n.isSelected(t);const i=R(n)&&n.excludeFromCopy("html");let s=n;t!==null&&X(s)&&(s=$x(t,s,"clone"));const a=R(s)?s.getChildren():[],l=(function(c){const u=c.exportJSON(),f=c.constructor;if(u.type!==f.getType()&&vl(58,f.name),R(c)){const d=u.children;Array.isArray(d)||vl(59,f.name)}return u})(s);X(s)&&s.getTextContentSize()===0&&(o=!1);for(let c=0;c<a.length;c++){const u=a[c],f=s1(e,t,u,l.children);!o&&R(n)&&f&&n.extractWithChild(u,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return o}function fN(e,t){const n=[],r=We().getChildren();for(let o=0;o<r.length;o++)s1(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function dN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=t6(r);X(o)&&z6(o),t.push(o)}return t}let ri=null;async function Sg(e,t,n){if(ri!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(Tg(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=en(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((c,u)=>{const f=e.registerCommand(Zl,d=>(Sr(d,ClipboardEvent)&&(f(),ri!==null&&(o.clearTimeout(ri),ri=null),c(Tg(e,d,n))),!0),hx);ri=o.setTimeout(()=>{f(),ri=null,c(!1)},50),i.execCommand("copy"),a.remove()})}function Tg(e,t,n){if(n===void 0){const o=en(e._window),i=Z();if(!i||i.isCollapsed()||!o)return!1;const s=o.anchorNode,a=o.focusNode;if(s!==null&&a!==null&&!oa(e,s,a))return!1;n=hN(i)}t.preventDefault();const r=t.clipboardData;return r!==null&&(pN(r,n),!0)}const a1=[["text/html",cN],["application/x-lexical-editor",uN]];function hN(e=Z()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Jd();for(const[r,o]of a1){const i=o(n,e);i!==null&&(t[r]=i)}}return t}function pN(e,t){for(const[n]of a1)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Ng(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Ko=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mN=Ko&&"documentMode"in document?document.documentMode:null,gN=Ko&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),yN=!(!Ko||!("InputEvent"in window)||mN)&&"getTargetRanges"in new window.InputEvent("input"),bN=Ko&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Og=Ko&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,vN=Ko&&/^(?=.*Chrome).*/i.test(navigator.userAgent),xN=Ko&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&gN&&!vN,Pg=he("DRAG_DROP_PASTE_FILE");function Pa(e){let t=null;if(Sr(e,DragEvent)?t=e.dataTransfer:Sr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function Mg(e){const t=Z();if(!$(t))return!1;const n=new Set,r=t.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(n.has(s))continue;const a=at(i,c=>R(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),e(a))}return n.size>0}function Ig(e){const t=Fi(e);return Te(t)}function su(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function wN(e){return fn(e.registerCommand(Md,t=>{const n=Z();return!!ot(n)&&(n.clear(),!0)},we),e.registerCommand(bo,t=>{const n=Z();return $(n)?(n.deleteCharacter(t),!0):!!ot(n)&&(n.deleteNodes(),!0)},we),e.registerCommand(Rs,t=>{const n=Z();return!!$(n)&&(n.deleteWord(t),!0)},we),e.registerCommand(Ds,t=>{const n=Z();return!!$(n)&&(n.deleteLine(t),!0)},we),e.registerCommand(gi,t=>{const n=Z();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)_g(r,n,e);else if($(n)){const o=t.data;return o&&n.insertText(o),!0}}return!0},we),e.registerCommand(xf,()=>{const t=Z();return!!$(t)&&(t.removeText(),!0)},we),e.registerCommand(Cn,t=>{const n=Z();return!!$(n)&&(n.formatText(t),!0)},we),e.registerCommand(_3,t=>{const n=Z();if(!$(n)&&!ot(n))return!1;const r=n.getNodes();for(const o of r){const i=at(o,s=>R(s)&&!s.isInline());i!==null&&i.setFormat(t)}return!0},we),e.registerCommand(mi,t=>{const n=Z();return!!$(n)&&(n.insertLineBreak(t),!0)},we),e.registerCommand(Ls,()=>{const t=Z();return!!$(t)&&(t.insertParagraph(),!0)},we),e.registerCommand(k3,()=>(sx([ta()]),!0),we),e.registerCommand(C3,()=>Mg(t=>{const n=t.getIndent();t.setIndent(n+1)}),we),e.registerCommand(Mm,()=>Mg(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),we),e.registerCommand(Iv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if($(n)){const r=If(n.focus,!0);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},we),e.registerCommand(Lv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if($(n)){if((function(o){const i=o.focus;return i.key==="root"&&i.offset===We().getChildrenSize()})(n))return t.preventDefault(),!0;const r=If(n.focus,!1);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},we),e.registerCommand(Mv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),mg(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!$(n))return!1;if(yg(n,!0)){const r=t.shiftKey;return t.preventDefault(),bg(n,r,!0),!0}return!1},we),e.registerCommand(Pv,t=>{const n=Z();if(ot(n)){const o=n.getNodes();if(o.length>0)return t.preventDefault(),mg(o[0])?o[0].selectPrevious():o[0].selectNext(0,0),!0}if(!$(n))return!1;const r=t.shiftKey;return!!yg(n,!1)&&(t.preventDefault(),bg(n,r,!1),!0)},we),e.registerCommand(Dv,t=>{if(Ig(t.target))return!1;const n=Z();if($(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;const i=o.getNode();if(Ye(i))return!1;const s=K6(i);return s.getIndent()>0&&(s.is(i)||i.is(s.getFirstDescendant()))})(n))return t.preventDefault(),e.dispatchCommand(Mm,void 0);if(Og&&navigator.language==="ko-KR")return!1}else if(!ot(n))return!1;return t.preventDefault(),e.dispatchCommand(bo,!0)},we),e.registerCommand(Fv,t=>{if(Ig(t.target))return!1;const n=Z();return!(!$(n)&&!ot(n))&&(t.preventDefault(),e.dispatchCommand(bo,!1))},we),e.registerCommand(Fs,t=>{const n=Z();if(!$(n))return!1;if(su(n),t!==null){if((Og||bN||xN)&&yN)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(mi,!1)}return e.dispatchCommand(Ls,void 0)},we),e.registerCommand(Rd,()=>{const t=Z();return!!$(t)&&(e.blur(),!0)},we),e.registerCommand(zv,t=>{const[,n]=Pa(t);if(n.length>0){const o=Ng(t.clientX,t.clientY);if(o!==null){const{offset:i,node:s}=o,a=Fi(s);if(a!==null){const l=rx();if(X(a))l.anchor.set(a.getKey(),i,"text"),l.focus.set(a.getKey(),i,"text");else{const u=a.getParentOrThrow().getKey(),f=a.getIndexWithinParent()+1;l.anchor.set(u,f,"element"),l.focus.set(u,f,"element")}const c=Ri(l);Pt(c)}e.dispatchCommand(Pg,n)}return t.preventDefault(),!0}const r=Z();return!!$(r)},we),e.registerCommand($v,t=>{const[n]=Pa(t),r=Z();return!(n&&!$(r))},we),e.registerCommand(Uv,t=>{const[n]=Pa(t),r=Z();if(n&&!$(r))return!1;const o=Ng(t.clientX,t.clientY);if(o!==null){const i=Fi(o.node);Te(i)&&t.preventDefault()}return!0},we),e.registerCommand(wf,()=>(u6(),!0),we),e.registerCommand(Zl,t=>(Sg(e,Sr(t,ClipboardEvent)?t:null),!0),we),e.registerCommand(Dd,t=>((async function(n,r){await Sg(r,Sr(n,ClipboardEvent)?n:null),r.update(()=>{const o=Z();$(o)?o.removeText():ot(o)&&o.getNodes().forEach(i=>i.remove())})})(t,e),!0),we),e.registerCommand(Gl,t=>{const[,n,r]=Pa(t);return n.length>0&&!r?(e.dispatchCommand(Pg,n),!0):Xi(t.target)&&Hd(t.target)?!1:Z()!==null&&((function(o,i){o.preventDefault(),i.update(()=>{const s=Z(),a=Sr(o,InputEvent)||Sr(o,KeyboardEvent)?null:o.clipboardData;a!=null&&s!==null&&_g(a,s,i)},{tag:z3})})(t,e),!0)},we),e.registerCommand(Rv,t=>{const n=Z();return $(n)&&su(n),!1},we),e.registerCommand(jv,t=>{const n=Z();return $(n)&&su(n),!1},we))}function AN(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const lh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function kN({editor:e,ErrorBoundary:t}){return(function(n,r){const[o,i]=T.useState(()=>n.getDecorators());return lh(()=>n.registerDecoratorListener(s=>{Nn.flushSync(()=>{i(s)})}),[n]),T.useEffect(()=>{i(n.getDecorators())},[n]),T.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const c=a[l],u=x.jsx(r,{onError:d=>n._onError(d),children:x.jsx(T.Suspense,{fallback:null,children:o[c]})}),f=n.getElementByKey(c);f!==null&&s.push(Nn.createPortal(u,f,c))}return s},[r,o,n])})(e,t)}function CN({editor:e,ErrorBoundary:t}){return(function(n){const r=vi.maybeFromEditor(n);if(r&&r.hasExtensionByName(rN.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&AN(320,o);return!0}return!1})(e)?null:x.jsx(kN,{editor:e,ErrorBoundary:t})}function Lg(e){return e.getEditorState().read(e1(e.isComposing()))}function _N({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=ht();return(function(o){lh(()=>fn(wN(o),aN(o)),[o])})(r),x.jsxs(x.Fragment,{children:[e,x.jsx(EN,{content:t}),x.jsx(CN,{editor:r,ErrorBoundary:n})]})}function EN({content:e}){const[t]=ht(),n=(function(o){const[i,s]=T.useState(()=>Lg(o));return lh(()=>{function a(){const l=Lg(o);s(l)}return a(),fn(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(t),r=F6();return n?typeof e=="function"?e(r):e:null}function SN(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!($(i)&&$(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,b,v){const w=y._nodeMap,A=[];for(const C of b){const _=w.get(C);_!==void 0&&A.push(_)}for(const[C,_]of v){if(!_)continue;const E=w.get(C);E===void 0||Ye(E)||A.push(E)}return A})(t,n,r);if(a.length===0)return 0;if(a.length>1){const y=t._nodeMap,b=y.get(i.anchor.key),v=y.get(s.anchor.key);return b&&v&&!e._nodeMap.has(b.__key)&&X(b)&&b.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!X(c)||!X(l)||c.__mode!==l.__mode)return 0;const u=c.__text,f=l.__text;if(u===f)return 0;const d=i.anchor,h=s.anchor;if(d.key!==h.key||d.type!=="text")return 0;const p=d.offset,g=h.offset,m=f.length-u.length;return m===1&&g===p-1?2:m===-1&&g===p+1?3:m===-1&&g===p?4:0}function TN(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(Nf))return r=0,n=u,2;const f=SN(o,i,a,l,e.isComposing()),d=(()=>{const h=s===null||s.editor===e,p=c.has(j3);if(!p&&h&&c.has(vo))return 0;if(o===null)return 1;const g=i._selection;if(!(a.size>0||l.size>0))return g!==null?0:2;const m=typeof t=="number"?t:t.peek();return p===!1&&f!==0&&f===r&&u<n+m&&h||a.size===1&&(function(y,b,v){const w=b._nodeMap.get(y),A=v._nodeMap.get(y),C=b._selection,_=v._selection;return!($(C)&&$(_)&&C.anchor.type==="element"&&C.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"||!X(w)||!X(A)||w.__parent!==A.__parent)&&JSON.stringify(b.read(()=>w.exportJSON()))===JSON.stringify(v.read(()=>A.exportJSON()))})(Array.from(a)[0],o,i)?0:1})();return n=u,r=f,d}}function Rg(e){e.undoStack=[],e.redoStack=[],e.current=null}function l1(e,t,n){const r=TN(e,n);return fn(e.registerCommand(Id,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(l.length!==0){const c=s.current,u=l.pop();c!==null&&(a.push(c),i.dispatchCommand(Aa,!0)),l.length===0&&i.dispatchCommand(ka,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(Ld,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(a.length!==0){const c=s.current;c!==null&&(l.push(c),i.dispatchCommand(ka,!0));const u=a.pop();a.length===0&&i.dispatchCommand(Aa,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(S3,()=>(Rg(t),!1),we),e.registerCommand(T3,()=>(Rg(t),e.dispatchCommand(Aa,!1),e.dispatchCommand(ka,!1),!0),we),e.registerUpdateListener(({editorState:i,prevEditorState:s,dirtyLeaves:a,dirtyElements:l,tags:c})=>{const u=t.current,f=t.redoStack,d=t.undoStack,h=u===null?null:u.editorState;if(u!==null&&i===h)return;const p=r(s,i,u,a,l,c);if(p===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(Aa,!1)),u!==null&&(d.push({...u}),e.dispatchCommand(ka,!0));else if(p===2)return;t.current={editor:e,editorState:i}}))}function c1(){return{current:null,redoStack:[],undoStack:[]}}const au={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Gx({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:c1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return $s(()=>r.disabled.value?void 0:l1(e,r.historyState.value,r.delay))}};P6(au,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function NN({delay:e,externalHistoryState:t}){const[n]=ht();return(function(r,o,i=1e3){const s=T.useMemo(()=>o||c1(),[o]);T.useEffect(()=>l1(r,s,i),[i,r,s])})(n,t,e),null}const u1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function ON({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:f,ariaRequired:d,autoCapitalize:h,className:p,id:g,role:m="textbox",spellCheck:y=!0,style:b,tabIndex:v,"data-testid":w,...A},C){const[_,E]=T.useState(e.isEditable()),N=T.useCallback(I=>{I&&I.ownerDocument&&I.ownerDocument.defaultView?e.setRootElement(I):e.setRootElement(null)},[e]),P=T.useMemo(()=>(function(...I){return W=>{for(const j of I)typeof j=="function"?j(W):j!=null&&(j.current=W)}})(C,N),[N,C]);return u1(()=>(E(e.isEditable()),e.registerEditableListener(I=>{E(I)})),[e]),x.jsx("div",{"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":_&&m==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":_?f:void 0,"aria-readonly":!_||void 0,"aria-required":d,autoCapitalize:h,className:p,contentEditable:_,"data-testid":w,id:g,ref:P,role:m,spellCheck:y,style:b,tabIndex:v,...A})}const PN=T.forwardRef(ON);function Dg(e){return e.getEditorState().read(e1(e.isComposing()))}const MN=T.forwardRef(IN);function IN(e,t){const{placeholder:n,...r}=e,[o]=ht();return x.jsxs(x.Fragment,{children:[x.jsx(PN,{editor:o,...r,ref:t}),n!=null&&x.jsx(LN,{editor:o,content:n})]})}function LN({content:e,editor:t}){const n=(function(s){const[a,l]=T.useState(()=>Dg(s));return u1(()=>{function c(){const u=Dg(s);l(u)}return c(),fn(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),a})(t),[r,o]=T.useState(t.isEditable());if(T.useLayoutEffect(()=>(o(t.isEditable()),t.registerEditableListener(s=>{o(s)})),[t]),!n)return null;let i=null;return typeof e=="function"?i=e(r):e!==null&&(i=e),i===null?null:x.jsx("div",{"aria-hidden":!0,children:i})}const RN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function DN({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=ht();return RN(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:s,prevEditorState:a,tags:l})=>{t&&i.size===0&&s.size===0||e&&l.has(vo)||a.isEmpty()||n(o,r,l)})},[r,e,t,n]),null}const FN=T.createContext(null),lu={didCatch:!1,error:null};class jN extends T.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lu}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,o;const{error:n}=this.state;n!==null&&((o=(r=this.props).onReset)==null||o.call(r,{args:t,reason:"imperative-api"}),this.setState(lu))}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}componentDidUpdate(t,n){var i,s;const{didCatch:r}=this.state,{resetKeys:o}=this.props;r&&n.error!==null&&zN(t.resetKeys,o)&&((s=(i=this.props).onReset)==null||s.call(i,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(lu))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=T.createElement(r,l);else if(o!==void 0)a=o;else throw s}return T.createElement(FN.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function zN(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function $N({children:e,onError:t}){return x.jsx(jN,{fallback:x.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const UN={paragraph:"m-0",list:{ol:"list-decimal pl-4",ul:"list-disc pl-4"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"font-mono"},link:"text-blue-600 hover:text-blue-600 underline cursor-pointer"};function Tr(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uf(e){let t=1,n=e.getParent();for(;n!=null;){if(Se(n)){const r=n.getParent();if(ve(r)){t++,n=r.getParent();continue}Tr(40)}return t}return t}function Bf(e){let t=e.getParent();ve(t)||Tr(40);let n=t;for(;n!==null;)n=n.getParent(),ve(n)&&(t=n);return t}function f1(e){let t=[];const n=e.getChildren().filter(Se);for(let r=0;r<n.length;r++){const o=n[r],i=o.getFirstChild();ve(i)?t=t.concat(f1(i)):t.push(o)}return t}function wn(e){return Se(e)&&ve(e.getFirstChild())}function Fg(e){return Zt().append(e)}function d1(e,t){return Se(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function jg(e){const t=Z();if(t!==null){let n=t.getNodes();if($(t)){const o=t.getStartEndPoints();o===null&&Tr(143);const[i]=o,s=i.getNode(),a=s.getParent();if(jt(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=Tt();s.append(c),n=c.select().getNodes()}}else if(d1(s,n)){const l=Bt(e);if(jt(a)){s.replace(l);const c=Zt();R(s)&&(c.setFormat(s.getFormatType()),c.setIndent(s.getIndent())),l.append(c)}else if(Se(s)){const c=s.getParentOrThrow();Uo(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let o=0;o<n.length;o++){const i=n[o];if(R(i)&&i.isEmpty()&&!Se(i)&&!r.has(i.getKey())){zg(i,e);continue}let s=xx(i)?i.getParent():Se(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(ve(s)){if(!r.has(a)){const l=Bt(e);Uo(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(jt(l)&&!r.has(a)){r.add(a),zg(s,e);break}s=l}}}}}function Uo(e,t){e.splice(e.getChildrenSize(),0,t)}function zg(e,t){if(ve(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=Zt();let i;if(Uo(o,e.getChildren()),ve(n)&&t===n.getListType())n.append(o),ve(r)&&t===r.getListType()&&(Uo(n,r.getChildren()),r.remove()),i=n;else if(ve(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const s=Bt(t);s.append(o),e.replace(s),i=s}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),i}function ch(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&wn(n)&&wn(r)&&(ch(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function BN(){const e=Z();if($(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(d1(r,n))t.add(Bf(r));else for(let o=0;o<n.length;o++){const i=n[o];if(xx(i)){const s=W6(i,ts);s!=null&&t.add(Bf(s))}}for(const o of t){let i=o;const s=f1(o);for(const a of s){const l=Tt().setTextStyle(e.style).setTextFormat(e.format);Uo(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===e.anchor.key&&$o(e.anchor,Yt(un(l,"next"))),a.__key===e.focus.key&&$o(e.focus,Yt(un(l,"next"))),a.remove()}o.remove()}}}function h1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Se(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),ve(r.getFirstChild())||n++)}function WN(e){const t=new Set;if(wn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(wn(r)&&wn(o)){const i=o.getFirstChild();if(ve(i)){i.append(e);const s=r.getFirstChild();ve(s)&&(Uo(i,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(wn(r)){const i=r.getFirstChild();if(ve(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(e)}}else if(wn(o)){const i=o.getFirstChild();ve(i)&&i.append(e)}else if(ve(n)){const i=Zt().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=Bt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());i.append(s),s.append(e),o?o.insertAfter(i):r?r.insertBefore(i):n.append(i)}}function KN(e){if(wn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(ve(n?n.getParent():void 0)&&Se(n)&&ve(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const i=t.getListType(),s=Zt(),a=Bt(i);s.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const l=Zt(),c=Bt(i);l.append(c),Uo(c,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function HN(){const e=Z();if(!$(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!Se(t)||t.getChildrenSize()!==0)return!1;const n=Bf(t),r=t.getParent();ve(r)||Tr(40);const o=r.getParent();let i;if(jt(o))i=Tt(),n.insertAfter(i);else{if(!Se(o))return!1;i=Zt(),o.insertAfter(i)}i.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const a=Bt(r.getListType());if(Se(i)){const l=Zt();l.append(a),i.insertAfter(l)}else i.insertAfter(a);a.append(...s)}return(function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const c=l.getParent();if(c==null||!Se(c)&&!ve(c))break;l=c}l.remove()})(t),!0}function xl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class ts extends Mn{constructor(n=1,r=void 0,o){super(o);D(this,"__value");D(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();ve(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:Mn,importDOM:{li:()=>({conversion:qN,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,o){(function(a,l,c){const u=l.getParent();!ve(u)||u.getListType()!=="check"||ve(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,(function(a,l,c){const u=[],f=[],d=l.list,h=d?d.listitem:void 0;let p;if(d&&d.nested&&(p=d.nested.listitem),h!==void 0&&u.push(...xl(h)),d){const g=c.getParent(),m=ve(g)&&g.getListType()==="check",y=c.getChecked();m&&!y||f.push(d.listitemUnchecked),m&&y||f.push(d.listitemChecked),m&&u.push(y?d.listitemChecked:d.listitemUnchecked)}if(p!==void 0){const g=xl(p);c.getChildren().some(m=>ve(m))?u.push(...g):f.push(...g)}f.length>0&&qx(a,...f),u.length>0&&ih(a,...u)})(r,o.theme,this);const i=n?n.__style:"",s=this.__style;i!==s&&(s===""?r.removeAttribute("style"):r.style.cssText=s),(function(a,l,c){const u=pg(l.__textStyle);for(const f in u)a.style.setProperty(`--listitem-marker-${f}`,u[f]);if(c)for(const f in pg(c.__textStyle))f in u||a.style.removeProperty(`--listitem-marker-${f}`)})(r,this,n)}updateDOM(n,r,o){const i=r;return this.updateListItemDOM(n,i,o),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),o=this.getFormatType();o&&(r.style.textAlign=o);const i=this.getDirection();return i&&(r.dir=i),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const o=n[r];if(R(o)&&this.canMergeWith(o)){const i=o.getChildren();this.append(...i),o.remove()}else super.append(o)}return this}replace(n,r){if(Se(n))return super.replace(n);this.setIndent(0);const o=this.getParentOrThrow();if(!ve(o))return n;if(o.__first===this.getKey())o.insertBefore(n);else if(o.__last===this.getKey())o.insertAfter(n);else{const i=Bt(o.getListType());let s=this.getNextSibling();for(;s;){const a=s;s=s.getNextSibling(),i.append(a)}o.insertAfter(n),n.insertAfter(i)}return r&&(R(n)||Tr(139),this.getChildren().forEach(i=>{n.append(i)})),this.remove(),o.getChildrenSize()===0&&o.remove(),n}insertAfter(n,r=!0){const o=this.getParentOrThrow();if(ve(o)||Tr(39),Se(n))return super.insertAfter(n,r);const i=this.getNextSiblings();if(o.insertAfter(n,r),i.length!==0){const s=Bt(o.getListType());i.forEach(a=>s.append(a)),n.insertAfter(s,r)}return n}remove(n){const r=this.getPreviousSibling(),o=this.getNextSibling();super.remove(n),r&&o&&wn(r)&&wn(o)&&(ch(r.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(n,r=!0){const o=Zt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,r),o}collapseAtStart(n){const r=Tt();this.getChildren().forEach(a=>r.append(a));const o=this.getParentOrThrow(),i=o.getParentOrThrow(),s=Se(i);if(o.getChildrenSize()===1)if(s)o.remove(),i.select();else{o.insertBefore(r),o.remove();const a=n.anchor,l=n.focus,c=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else o.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const o=this.getParent();return ve(o)&&(r=o.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),o=0;for(;Se(r);)r=r.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(n){typeof n!="number"&&Tr(117),(n=Math.floor(n))>=0||Tr(199);let r=this.getIndent();for(;r!==n;)r<n?(WN(this),r++):(KN(this),r--);return this}canInsertAfter(n){return Se(n)}canReplaceWith(n){return Se(n)}canMergeWith(n){return Se(n)||Bd(n)}extractWithChild(n,r){if(!$(r))return!1;const o=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(o)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Bt("bullet")}canMergeWhenEmpty(){return!0}}function qN(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return $g(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return $g(n.children[0])}const t=e.getAttribute("aria-checked");return{node:Zt(t==="true"||t!=="false"&&void 0)}}function $g(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Zt(e.hasAttribute("checked"))}}function Zt(e){return Kr(new ts(void 0,e))}function Se(e){return e instanceof ts}class sa extends Mn{constructor(n="number",r=1,o){super(o);D(this,"__tag");D(this,"__start");D(this,"__listType");const i=YN[n]||n;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const o=r.getNextSibling();ve(o)&&r.getListType()===o.getListType()&&ch(r,o)})(n),h1(n)},extends:Mn,importDOM:{ol:()=>({conversion:Bg,priority:0}),ul:()=>({conversion:Bg,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const o=this.__tag,i=document.createElement(o);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Ug(i,n.theme,this),i}updateDOM(n,r,o){return n.__tag!==this.__tag||n.__listType!==this.__listType||(Ug(r,o.theme,this),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return pt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,o){let i=o;for(let s=0;s<o.length;s++){const a=o[s];Se(a)||(i===o&&(i=[...o]),i[s]=Zt().append(!R(a)||ve(a)||a.isInline()?a:rt(a.getTextContent())))}return super.splice(n,r,i)}extractWithChild(n){return Se(n)}}function Ug(e,t,n){const r=[],o=[],i=t.list;if(i!==void 0){const s=i[`${n.__tag}Depth`]||[],a=Uf(n)-1,l=a%s.length,c=s[l],u=i[n.__tag];let f;const d=i.nested,h=i.checklist;if(d!==void 0&&d.list&&(f=d.list),u!==void 0&&r.push(u),h!==void 0&&n.__listType==="check"&&r.push(h),c!==void 0){r.push(...xl(c));for(let p=0;p<s.length;p++)p!==l&&o.push(n.__tag+p)}if(f!==void 0){const p=xl(f);a>1?r.push(...p):o.push(...p)}}o.length>0&&qx(e,...o),r.length>0&&ih(e,...r)}function VN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Se(r)){t.push(r);const o=r.getChildren();o.length>1&&o.forEach(i=>{ve(i)&&t.push(Fg(i))})}else t.push(Fg(r))}return t}function Bg(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Bt("number",e.start):t==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const o of r.childNodes)if(pt(o)&&o.hasAttribute("aria-checked"))return!0;return!1})(e)?Bt("check"):Bt("bullet")),{after:VN,node:n}}const YN={ol:"number",ul:"bullet"};function Bt(e="number",t=1){return Kr(new sa(e,t))}function ve(e){return e instanceof sa}const QN=he("UPDATE_LIST_START_COMMAND"),p1=he("INSERT_UNORDERED_LIST_COMMAND"),m1=he("INSERT_ORDERED_LIST_COMMAND"),Wf=he("REMOVE_LIST_COMMAND");function GN(e){return fn(e.registerCommand(m1,()=>(jg("number"),!0),Gn),e.registerCommand(QN,t=>{const{listNodeKey:n,newStart:r}=t,o=Xe(n);return!!ve(o)&&(o.getListType()==="number"&&(o.setStart(r),h1(o)),!0)},Gn),e.registerCommand(p1,()=>(jg("bullet"),!0),Gn),e.registerCommand(Wf,()=>(BN(),!0),Gn),e.registerCommand(Ls,()=>HN(),Gn),e.registerNodeTransform(ts,t=>{const n=t.getFirstChild();if(n){if(X(n)){const r=n.getStyle(),o=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==o&&t.setTextFormat(o)}}else{const r=Z();$(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Br,t=>{const n=t.getParent();if(Se(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),o=t.getFormat();r===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(r).setTextFormat(o)}}))}function ZN(e){const t=n=>{const r=n.getParent();if(ve(n.getFirstChild())||!ve(r))return;const o=at(n,i=>Se(i)&&ve(i.getParent())&&Se(i.getPreviousSibling()));if(o===null&&n.getIndent()>0)n.setIndent(0);else if(Se(o)){const i=o.getPreviousSibling();if(Se(i)){const s=(function(l){let c=l,u=c.getFirstChild();for(;ve(u);){const f=u.getLastChild();if(!Se(f))break;c=f,u=c.getFirstChild()}return c})(i),a=s.getParent();if(ve(a)){const l=Uf(a);l+1<Uf(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(sa,n=>{const r=[n];for(;r.length>0;){const o=r.shift();if(ve(o)){for(const i of o.getChildren())if(Se(i)){t(i);const s=i.getFirstChild();ve(s)&&r.push(s)}}}})}const JN=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ho extends Mn{constructor(n="",r={},o){super(o);D(this,"__url");D(this,"__target");D(this,"__rel");D(this,"__title");const{target:i=null,rel:s=null,title:a=null}=r;this.__url=n,this.__target=i,this.__rel=s,this.__title=a}static getType(){return"link"}static clone(n){return new Ho(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),ih(r,n.theme.link),r}updateLinkDOM(n,r,o){if(Nx(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,a=this[s];n&&n[s]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(n,r,o){return this.updateLinkDOM(n,r,o),!1}static importDOM(){return{a:n=>({conversion:XN,priority:1})}}static importJSON(n){return ko().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=Hg(n);try{const r=new URL(Hg(n));if(!JN.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const o=ko(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,r),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,o){if(!$(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function XN(e){let t=null;if(Nx(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=ko(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function ko(e="",t){return Kr(new Ho(e,t))}function ut(e){return e instanceof Ho}class ic extends Ho{constructor(n="",r={},o){super(n,r,o);D(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new ic(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,o){return super.updateDOM(n,r,o)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return Wg().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const o=this.getParentOrThrow().insertNewAfter(n,r);if(R(o)){const i=Wg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return o.append(i),i}return null}}function Wg(e="",t){return Kr(new ic(e,t))}function so(e){return e instanceof ic}const $i=he("TOGGLE_LINK_COMMAND");function Kg(e,t){if(e.type==="element"){const n=e.getNode();return R(n)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}function cu(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...f}=e;n=u,t={...f,...t}}else n=e;const{target:r,title:o}=t,i=t.rel===void 0?"noreferrer":t.rel,s=Z();if(s===null||!$(s)&&!ot(s))return;if(ot(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(f=>{if(n===null){const d=at(f,h=>!so(h)&&ut(h));d&&(d.insertBefore(f),d.getChildren().length===0&&d.remove())}else{const d=at(f,h=>!so(h)&&ut(h));if(d)d.setURL(n),r!==void 0&&d.setTarget(r),i!==void 0&&d.setRel(i);else{const h=ko(n,{rel:i,target:r});f.insertBefore(h),h.append(f)}}})}const a=s.extract();if(n===null){const u=new Set;return void a.forEach(f=>{const d=f.getParent();if(ut(d)&&!so(d)){const h=d.getKey();if(u.has(h))return;(function(p,g){const m=new Set(g.filter(_=>p.isParentOf(_)).map(_=>_.getKey())),y=p.getChildren(),b=y.filter(_=>m.has(_.getKey()));if(b.length===y.length)return y.forEach(_=>p.insertBefore(_)),void p.remove();const v=y.findIndex(_=>m.has(_.getKey())),w=y.findLastIndex(_=>m.has(_.getKey())),A=v===0,C=w===y.length-1;if(A)b.forEach(_=>p.insertBefore(_));else if(C)for(let _=b.length-1;_>=0;_--)p.insertAfter(b[_]);else{for(let E=b.length-1;E>=0;E--)p.insertAfter(b[E]);const _=y.slice(w+1);if(_.length>0){const E=ko(p.getURL(),{rel:p.getRel(),target:p.getTarget(),title:p.getTitle()});b[b.length-1].insertAfter(E),_.forEach(N=>E.append(N))}}})(d,a),u.add(h)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),i!==void 0&&u.setRel(i),o!==void 0&&u.setTitle(o))};if(a.length===1){const u=a[0],f=at(u,ut);if(f!==null)return c(f)}(function(u){const f=Z();if(!$(f))return u();const d=Ri(f),h=d.isBackward(),p=Kg(d.anchor,h?-1:0),g=Kg(d.focus,h?0:-1);if(u(),p||g){const m=Z();if($(m)){const y=m.clone();if(p){const b=p.getParent();b&&y.anchor.set(b.getKey(),p.getIndexWithinParent()+(h?1:0),"element")}if(g){const b=g.getParent();b&&y.focus.set(b.getKey(),g.getIndexWithinParent()+(h?0:1),"element")}Pt(Ri(y))}}})(()=>{let u=null;for(const f of a){if(!f.isAttached())continue;const d=at(f,ut);if(d){c(d);continue}if(R(f)){if(!f.isInline())continue;if(ut(f)){if(!(so(f)||u!==null&&u.getParentOrThrow().isParentOf(f))){c(f),u=f;continue}for(const p of f.getChildren())f.insertBefore(p);f.remove();continue}}const h=f.getPreviousSibling();ut(h)&&h.is(u)?h.append(f):(u=ko(n,{rel:i,target:r,title:o}),f.insertAfter(u),u.append(f))}})}const e5=/^\+?[0-9\s()-]{5,}$/;function Hg(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:e5.test(e)?`tel:${e}`:`https://${e}`}function t5(e,t){return fn($s(()=>e.registerCommand($i,n=>{const r=t.validateUrl.peek(),o=t.attributes.peek();if(n===null)return cu(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(cu(n,o),!0);{const{url:i,target:s,rel:a,title:l}=n;return cu(i,{...o,rel:a,target:s,title:l}),!0}},Gn)),$s(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Gl,o=>{const i=Z();if(!$(i)||i.isCollapsed()||!Sr(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!n(s)&&!i.getNodes().some(a=>R(a))&&(e.dispatchCommand($i,{...r,url:s}),o.preventDefault(),!0)},Gn)}))}function n5({commentType:e,onCommentTypeChange:t,isCommentTypeEditable:n=!0,actions:r,setIsLinkEditMode:o,onAddAttachments:i}){const[s]=ht(),[a,l]=T.useState({bold:!1,italic:!1,underline:!1,strikethrough:!1,code:!1}),[c,u]=T.useState(null),f=T.useRef(null),d=T.useRef(null),h=uh[e];T.useLayoutEffect(()=>s.registerUpdateListener(({editorState:b})=>{b.read(()=>{const v=Z();if(!$(v))return;l({bold:v.hasFormat("bold"),italic:v.hasFormat("italic"),underline:v.hasFormat("underline"),strikethrough:v.hasFormat("strikethrough"),code:v.hasFormat("code")});let w=v.anchor.getNode(),A=null;for(;w;){if(ve(w)){const C=w.getListType();A=C==="bullet"||C==="number"?C:null;break}if(Se(w)){w=w.getParent();continue}w=w.getParent()}u(A)})}),[s]);const p=b=>{s.dispatchCommand(Cn,b)},g=()=>{c!=="bullet"?s.dispatchCommand(p1,void 0):s.dispatchCommand(Wf,void 0)},m=()=>{c!=="number"?s.dispatchCommand(m1,void 0):s.dispatchCommand(Wf,void 0)},y=()=>{s.update(()=>{const b=Z();if(!$(b))return;["bold","italic","underline","strikethrough","code"].forEach(w=>{b.hasFormat(w)&&s.dispatchCommand(Cn,w)})})};return x.jsxs("div",{className:_e("flex items-center w-full",r?"justify-between":"justify-end"),children:[x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(ff,{placement:"top-start",minWidth:"fit-content",title:"text formatting menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",children:x.jsx(ke,{icon:PS})}),children:x.jsxs("ul",{className:"flex items-start flex-col",children:[x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Bold",onClick:()=>p("bold"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.bold?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:kS,className:"mr-2"}),"Bold"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Italic",onClick:()=>p("italic"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.italic?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:ES,className:"mr-2"}),"Italic"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Underline",onClick:()=>p("underline"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.underline?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:AS,className:"mr-2"}),"Underline"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Strikethrough",onClick:()=>p("strikethrough"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.strikethrough?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:wS,className:"mr-2"}),"Strikethrough"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Monospace",onClick:()=>p("code"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.code?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:TS,className:"mr-2"}),"Monospace"]})}),x.jsx("hr",{className:"w-full border-gray-200"}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Clear formatting",onClick:y,className:"cursor-pointer w-full h-full justify-start text-left p-2 text-gray-400 hover:text-gray-400 hover:bg-gray-100",children:[x.jsx(ke,{icon:_S,className:"mr-2"}),"Clear formatting"]})})]})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format bullet list",onClick:g,children:x.jsx(ke,{icon:MS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format numbered list",onClick:m,children:x.jsx(ke,{icon:SS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format link",onClick:()=>{o(!0),s.dispatchCommand($i,"https://")},children:x.jsx(ke,{icon:OS})}),i&&x.jsxs(x.Fragment,{children:[x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add image",className:"border-l-1 border-gray-200 rounded-none",onClick:()=>{var b;(b=f.current)==null||b.click()},children:x.jsx(ke,{icon:CS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add file",onClick:()=>{var b;(b=d.current)==null||b.click()},children:x.jsx(ke,{icon:NS})})]}),n&&x.jsx(ff,{placement:"top-end",title:"comment type menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",className:`${h.iconColor} border-l-1 border-gray-200 rounded-none`,children:x.jsx(ke,{icon:h.icon})}),children:x.jsx("ul",{className:"flex items-center justify-between gap-2 p-3",children:y1.map(b=>x.jsx("li",{children:x.jsx(je,{category:"link",size:"none",title:b.title,className:_e(b.color,e===b.type?b.color:"text-gray-400"),onClick:()=>t==null?void 0:t(b.type),children:x.jsx(ke,{icon:b.icon})})},b.type))})})]}),r,x.jsx("input",{type:"file",hidden:!0,id:"image-input",multiple:!0,ref:f,accept:"image/*",onChange:b=>{const v=b.target.files;v&&(i==null||i(v))}}),x.jsx("input",{type:"file",hidden:!0,id:"file-input",multiple:!0,ref:d,accept:"*",onChange:b=>{const v=b.target.files;v&&(i==null||i(v))}})]})}function r5({hasStrictIndent:e=!1}){const[t]=ht();return T.useEffect(()=>{if(!t.hasNodes([sa,ts]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),T.useEffect(()=>{if(e)return ZN(t)},[t,e]),(function(n){T.useEffect(()=>GN(n),[n])})(t),null}function o5({validateUrl:e,attributes:t}){const[n]=ht();return T.useEffect(()=>{if(!n.hasNodes([Ho]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),T.useEffect(()=>t5(n,Gx({attributes:t,validateUrl:e})),[n,e,t]),null}const i5=new Set(["http:","https:","mailto:","sms:","tel:"]);function qg(e){try{const t=new URL(e);if(!i5.has(t.protocol))return"about:blank"}catch{return e}return e}function Vg(e,t,n,r=10,o=5){const i=n.parentElement;if(e===null||!i){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}const s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l=i.getBoundingClientRect();let c=e.top-r,u=e.left-o;c<l.top&&(c+=s.height+e.height+r*2),u+s.width>l.right&&(u=l.right-s.width-o),c-=a.top,u-=a.left,t.style.opacity="1",t.style.transform=`translate(${u}px, ${c}px)`}function wl(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?gg(n)?r:o:gg(t)?r:o}function s5({editor:e,isLink:t,setIsLink:n,anchorElem:r,isLinkEditMode:o,setIsLinkEditMode:i}){const s=T.useRef(null),[a,l]=T.useState(""),[c,u]=T.useState("https://"),[f,d]=T.useState(null),h=T.useCallback(()=>{var A,C;const m=Z();if($(m)){const _=wl(m),E=at(_,ut);E?l(E.getURL()):ut(_)?l(_.getURL()):l(""),o&&u(a)}else if(ot(m)){const _=m.getNodes();if(_.length>0){const E=_[0],N=E.getParent();ut(N)?l(N.getURL()):ut(E)?l(E.getURL()):l(""),o&&u(a)}}const y=s.current,b=en(e._window),v=document.activeElement;if(y===null)return;const w=e.getRootElement();if(m!==null&&w!==null&&e.isEditable()){let _;if(ot(m)){const E=m.getNodes();if(E.length>0){const N=e.getElementByKey(E[0].getKey());N&&(_=N.getBoundingClientRect())}}else b!==null&&w.contains(b.anchorNode)&&(_=(C=(A=b.focusNode)==null?void 0:A.parentElement)==null?void 0:C.getBoundingClientRect());_&&(_.y+=40,Vg(_,y,r)),d(m)}else(!v||v.className!=="link-input")&&(w!==null&&Vg(null,y,r),d(null),i(!1),l(""));return!0},[r,e,i,o,a]);T.useEffect(()=>{const m=r.parentElement,y=()=>{e.getEditorState().read(()=>{h()})};return window.addEventListener("resize",y),m&&m.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),m&&m.removeEventListener("scroll",y)}},[r.parentElement,e,h]),T.useEffect(()=>fn(e.registerUpdateListener(({editorState:m})=>{m.read(()=>{h()})}),e.registerCommand(Ql,()=>(h(),!0),Gn),e.registerCommand(Rd,()=>t?(n(!1),!0):!1,o6)),[e,h,n,t]),T.useEffect(()=>{e.getEditorState().read(()=>{h()})},[e,h]),T.useEffect(()=>{const m=s.current;if(m===null)return;const y=b=>{!m.contains(b.relatedTarget)&&t&&(n(!1),i(!1))};return m.addEventListener("focusout",y),()=>{m.removeEventListener("focusout",y)}},[n,i,t]);const p=m=>{m.key==="Enter"?g(m):m.key==="Escape"&&(m.preventDefault(),i(!1))},g=m=>{m.preventDefault(),f!==null&&(a!==""&&e.update(()=>{e.dispatchCommand($i,qg(c));const y=Z();if($(y)){const b=wl(y).getParent();if(so(b)){const v=ko(b.getURL(),{rel:b.__rel,target:b.__target,title:b.__title});b.replace(v,!0)}}}),u("https://"),i(!1))};return x.jsx("div",{ref:s,className:"absolute flex top-0 left-0 shadow-lg bg-white z-10 rounded-sm w-full max-w-400",children:t?o?x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx(Ny,{containerClassName:"px-0 mr-2",autoFocus:!0,className:"mt-0",value:c,onChange:m=>{u(m.target.value)},onKeyDown:m=>{p(m)}}),x.jsxs("div",{className:"flex justify-center items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{i(!1)},children:x.jsx(ke,{icon:Dl})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:g,children:x.jsx(ke,{icon:zy})})]})]}):x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx("a",{href:qg(a),target:"_blank",rel:"noopener noreferrer",children:a}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{u(a),i(!0)},children:x.jsx(ke,{icon:Qk})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>e.dispatchCommand($i,null),children:x.jsx(ke,{icon:sC})})]})]}):null})}function a5(e,t,n,r){const[o,i]=T.useState(e),[s,a]=T.useState(!1);return T.useEffect(()=>{function l(){const c=Z();if($(c)){const u=wl(c),f=at(u,ut),d=at(u,so);if(!(f||d)){a(!1);return}const h=c.getNodes().filter(p=>!xo(p)).find(p=>{const g=at(p,ut),m=at(p,so);return f&&!f.is(g)||g&&!g.is(f)||d&&!d.is(m)||m&&(!m.is(d)||m.getIsUnlinked())});a(!h)}else if(ot(c)){const u=c.getNodes();if(u.length===0){a(!1);return}const f=u[0],d=f.getParent();ut(d)||ut(f)?a(!0):a(!1)}}return fn(e.registerUpdateListener(({editorState:c})=>{c.read(()=>{l()})}),e.registerCommand(Ql,(c,u)=>(l(),i(u),!1),hx),e.registerCommand(Md,c=>{const u=Z();if($(u)){const f=wl(u),d=at(f,ut);if(ut(d)&&(c.metaKey||c.ctrlKey))return window.open(d.getURL(),"_blank"),!0}return!1},Gn))},[e]),Nn.createPortal(x.jsx(s5,{editor:o,isLink:s,anchorElem:t,setIsLink:a,isLinkEditMode:n,setIsLinkEditMode:r}),t)}function l5({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[r]=ht();return a5(r,e,t,n)}const c5=({url:e,onDelete:t})=>x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:e,alt:"Thumbnail",width:75,height:75,className:"w-[75px] h-[75px] object-cover rounded-lg border border-gray-200"}),x.jsx(je,{size:"smallCollapse",title:"Delete attachment",onClick:t,className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",color:"secondary",children:x.jsx(ke,{icon:jy})})]}),u5=({onRemoveFile:e,type:t,label:n})=>{const r=t.toLowerCase(),o=Ib(r);return x.jsxs("div",{className:"relative flex items-center justify-center rounded border border-gray-200",children:[x.jsx(je,{size:"smallCollapse",color:"secondary",className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",title:"Remove file",onClick:e,children:x.jsx(ke,{icon:jy})}),x.jsxs("div",{className:"flex items-center justify-center mx-2",children:[x.jsx("span",{className:"text-primary-600 my-2",children:x.jsx(ke,{icon:o,size:"3x",className:"text-primary-600"})}),x.jsx("span",{className:"font-bold p-2",children:n})]})]})},f5=({clearKey:e})=>{const[t]=ht(),n=T.useRef(e);return T.useEffect(()=>{n.current!==e&&(t.update(()=>{We().clear()}),n.current=e)},[e,t]),null},d5=({isOpen:e})=>{const[t]=ht(),n=T.useRef(!1);return T.useEffect(()=>{if(!e){n.current=!1;return}if(n.current)return;const r=()=>{const o=t.getRootElement();if(!o){requestAnimationFrame(r);return}n.current=!0;const i=window.scrollX,s=window.scrollY;try{o.focus({preventScroll:!0})}catch{o.focus()}requestAnimationFrame(()=>window.scrollTo(i,s)),setTimeout(()=>window.scrollTo(i,s),0)};r()},[t,e]),null},h5=({initialValue:e})=>{const[t]=ht(),n=T.useCallback((o,i)=>{const a=new DOMParser().parseFromString(i,"text/html");return t1(o,a)},[]),r=T.useRef(!1);return T.useEffect(()=>{!r.current&&e&&(t.update(()=>{We().clear(),sx(n(t,e))}),r.current=!0)},[t,e,n]),null},p5=({onChange:e})=>{const[t]=ht();return x.jsx(DN,{onChange:n=>{n.read(()=>{const r=n1(t,null);e(r)})}})},m5=({onAddAttachments:e})=>{const[t]=ht();return T.useEffect(()=>{if(!e)return;const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.clipboardData;if(!i)return;const s=i.items;let a=!1;for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){a=!0;break}}if(a){for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){const u=c.getAsFile();if(u){const f=Date.now(),d=u.type.split("/")[1]||"png",h=`image_${f}.${d}`,p=new File([u],h,{type:u.type});e==null||e([p])}}}o.preventDefault(),o.stopPropagation()}};return n.addEventListener("paste",r,!0),()=>{n.removeEventListener("paste",r,!0)}},[t,e]),null},g5=({onSubmit:e})=>{const[t]=ht();return T.useEffect(()=>{if(e)return t.registerCommand(Fs,n=>n&&!n.shiftKey?(n.preventDefault(),e(),!0):!1,1)},[t,e]),null},y5=({setIsLinkEditMode:e})=>{const[t]=ht();return T.useEffect(()=>{const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.metaKey||o.ctrlKey,s=o.key==="k"||o.key==="K";i&&s&&t.getEditorState().read(()=>{const a=Z();$(a)&&!a.isCollapsed()&&(o.preventDefault(),e(!0),t.dispatchCommand($i,"https://"))})};return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}},[t,e]),null};function g1({attachments:e,clearKey:t=0,inputFieldClassName:n="",containerClassName:r="",initialValue:o,onChange:i,commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l=!0,actions:c,onAddAttachments:u,onRemoveAttachment:f,onSubmit:d,isOpen:h}){const p={namespace:"comment-editor",theme:UN,nodes:[sa,ts,Ho],onError:A=>{console.error(A)}},[g,m]=T.useState(null),[y,b]=T.useState(!1),v=A=>{A!==null&&m(A)},w=uh[s];return x.jsx("div",{className:r,children:x.jsxs(L6,{initialConfig:p,children:[x.jsxs("div",{className:"relative",children:[x.jsx(_N,{contentEditable:x.jsx("div",{ref:v,children:x.jsx(MN,{className:_e("p-3 outline-none border-0 w-full border-t border-gray-200 rounded-none border-l-3",w.bg,w.border,w.fontColor,n)})}),placeholder:x.jsx("div",{className:"absolute top-3 left-4 text-gray-400 pointer-events-none",children:"Type comment…"}),ErrorBoundary:$N}),x.jsx(r5,{}),x.jsx(o5,{}),g&&x.jsx(l5,{anchorElem:g,isLinkEditMode:y,setIsLinkEditMode:b}),x.jsx(NN,{}),x.jsx(h5,{initialValue:o}),x.jsx(p5,{onChange:i}),x.jsx(g5,{onSubmit:d}),x.jsx(y5,{setIsLinkEditMode:b}),x.jsx(f5,{clearKey:t}),x.jsx(m5,{onAddAttachments:u}),x.jsx(d5,{isOpen:h})]}),e&&e.length>0&&x.jsx("div",{className:"flex flex-wrap justify-start gap-2 p-4",children:e.map(A=>md(A.type)?x.jsx(c5,{url:A.url,onDelete:()=>f==null?void 0:f(A.originFile)},A.originFile.name):x.jsx(u5,{type:A.type,label:A.name,onRemoveFile:()=>f==null?void 0:f(A.originFile)},A.originFile.name))}),x.jsx("div",{className:"border-t border-gray-200 p-2 flex justify-end",children:x.jsx(n5,{commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l,actions:c,setIsLinkEditMode:b,onAddAttachments:u})})]})})}const b5=({asset:e,onSetActiveSrc:t})=>x.jsxs("div",{className:"relative border border-gray-200 rounded-md h-[110px] w-full hover:border-primary-500",children:[x.jsx("img",{src:za(e),onClick:()=>t(za(e)),onKeyDown:n=>{n.key==="Enter"&&t(za(e))},alt:e.name,className:"w-full h-full object-cover rounded-md object-center cursor-zoom-in"}),(e==null?void 0:e.uploading)&&x.jsx("div",{className:"absolute bottom-2 w-full max-w-md mx-auto px-2",children:x.jsx("div",{className:"relative h-2 overflow-hidden rounded-full bg-gray-200",children:x.jsx("div",{className:"absolute left-0 top-0 h-full w-1/3 rounded-full bg-blue-500 animate-progress"})})})]}),v5=({asset:e})=>{var r,o;const t=((o=(r=e==null?void 0:e.mimeType)==null?void 0:r.split("/").pop())==null?void 0:o.toLowerCase())||"",n=Ib(t);return x.jsxs("div",{className:"flex gap-2",children:[(e==null?void 0:e.uploading)&&x.jsx("div",{className:"flex items-center justify-center",children:x.jsx("div",{className:"h-4 w-4 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin"})}),x.jsx(ke,{icon:n,size:"lg",className:"text-primary-600"}),x.jsx("a",{href:za(e),className:"text-sm text-blue-600 underline",download:!0,target:"_blank",rel:"noopener noreferrer",children:e.name})]})},x5=({commentType:e=dt.INFO,author:t,username:n,comment:r,createdDate:o,onDelete:i,onEdit:s,hasAssets:a,taskAssets:l,taskVerified:c})=>{const f={[dt.INFO]:{bg:"bg-primary-100",border:"border-primary-200",icon:Dy,iconColor:"text-primary-600 hover:text-primary-600",text:"text-primary-900"},[dt.WARNING]:{bg:"bg-warning-100",border:"border-warning-200",icon:My,iconColor:"text-warning-600 hover:text-warning-600",text:"text-warning-900"},[dt.DANGER]:{bg:"bg-danger-100",border:"border-danger-200",icon:$y,iconColor:"text-danger-600 hover:text-danger-600",text:"text-danger-900"},[dt.SUCCESS]:{bg:"bg-success-100",border:"border-success-200",icon:Ly,iconColor:"text-success-600 hover:text-success-600",text:"text-success-900"}}[e],d=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(o||"")).replace(",",""),[h,p]=T.useState(!1),[g,m]=T.useState(zc(r)),[y,b]=T.useState(e),[v,w]=T.useState(""),A=()=>{p(!0)},C=()=>{const N=of.sanitize(g);s(N,y),p(!1)},_=N=>{const P=of.sanitize(g);b(N),s(P,N),p(!1)},E=()=>{p(!1)};return x.jsxs("div",{className:"flex items-start space-x-4 w-full",children:[x.jsx(KT,{alt:t}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:`border ${f.border} rounded-sm ${f.bg} shadow-sm flex flex-col items-start justify-between w-full`,children:[x.jsx("div",{className:"p-3 flex flex-col items-start justify-between w-full",children:x.jsxs("div",{className:"w-full",children:[x.jsxs("div",{className:"flex items-center mb-2 justify-between",children:[x.jsxs("div",{children:[x.jsx(ke,{icon:f.icon,size:"lg",className:`mr-2 ${f.iconColor}`}),x.jsx("span",{className:`font-semibold text-sm ${f.text}`,children:t})]}),x.jsx(qT,{commentType:e,taskVerified:c,isUsernameAuthor:n.trim()===t.trim(),onEdit:A,onSaveCommentType:_,onDelete:i})]}),h?x.jsx(g1,{inputFieldClassName:"bg-white border-0 rounded-sm",containerClassName:"bg-white border-0 rounded-sm",onChange:m,commentType:e,isCommentTypeEditable:!1,initialValue:zc(r),actions:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(je,{category:"outline",size:"smallCollapse",color:"secondary",onClick:E,title:"Cancel edit",children:"Cancel"}),x.jsx(je,{category:"solid",size:"smallCollapse",color:"primary",onClick:C,title:"Save edit",disabled:$a(g),children:"Save"})]})}):x.jsx("div",{className:`text-sm ${f.text}`,dangerouslySetInnerHTML:{__html:zc(r)}})]})}),a&&l&&(l==null?void 0:l.length)>0&&x.jsx("div",{className:`${f.border} border-t w-full p-2 flex gap-2 flex-wrap`,children:l.map(N=>x.jsx(T.Fragment,{children:md(N.mimeType)?x.jsx(b5,{asset:N,onSetActiveSrc:w}):x.jsx(v5,{asset:N})},N.assetId))})]}),x.jsxs("div",{className:"flex gap-2 my-1",children:[o&&x.jsx("time",{dateTime:o,className:"text-xs text-gray-500 opacity-60",children:d}),c&&x.jsxs("span",{className:"text-xs text-success-600 font-semibold flex items-center gap-1",children:[x.jsx(ke,{icon:Ry}),"Comment Required"]})]})]}),x.jsx(_T,{plugins:[BT],open:!!v,zoom:{maxZoomPixelRatio:2},close:()=>w(""),styles:{root:{zIndex:9999999999}},carousel:{finite:!0,preload:0},controller:{closeOnBackdropClick:!0},slides:[{src:v}]})]})},uh={[dt.INFO]:{icon:cC,bg:"bg-primary-100",border:"border-l-primary-500",iconColor:"text-primary-600 hover:text-primary-700",fontColor:"text-primary-900"},[dt.WARNING]:{icon:Gk,bg:"bg-warning-100",border:"border-l-warning-500",iconColor:"text-warning-600 hover:text-warning-700",fontColor:"text-warning-900"},[dt.DANGER]:{icon:dC,bg:"bg-danger-100",border:"border-l-danger-500",iconColor:"text-danger-600 hover:text-danger-700",fontColor:"text-danger-900"},[dt.SUCCESS]:{icon:Ry,bg:"bg-success-100",border:"border-l-success-500",iconColor:"text-success-600 hover:text-success-700",fontColor:"text-success-900"}},y1=Object.entries(uh).map(([e,t])=>({type:e,icon:t.icon,color:t.iconColor,title:`Change comment type to ${e}`})),w5=({comments:e,onClose:t,isOpen:n,taskName:r,taskInstanceId:o,isLoading:i,playbookInstanceId:s,taskVerification:a})=>{const[l,c]=T.useState(""),[u,f]=T.useState(dt.INFO),[d,h]=T.useState(0),[p,g]=T.useState([]),m=T.useRef(null),{username:y}=b1(),{manageComment:b}=h4({playbookInstanceId:s}),v=()=>{const P=p.length,W=p.some(z=>!md(z.mimeType))?"Attachment":"Image",j=P>1?"s":"";return`<p class="m-0"><span style="white-space: pre-wrap;">${W}${j} added.</span></p>`},w=P=>{const I=Array.from(P).map((W,j)=>o4(W,p.length+j+1));g(W=>[...W,...I])},A=P=>{g(I=>I.filter(W=>W.originFile!==P))},C=P=>{f(P)},_=async()=>{if(!p.length&&$a(l)||!o)return;p.length>0&&g([]);const P=of.sanitize(l);c(""),h(I=>I+1),await b({action:"add",comment:p.length>0&&$a(l)?v():P,username:y||"",commentType:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hasAssets:p.length>0,taskInstanceId:o,taskVerified:a,attachments:p}),f(dt.INFO)},E=async P=>{o&&await b({username:y||"",action:"delete",taskVerified:!1,taskInstanceId:o,commentId:P})},N=async({commentId:P,comment:I,commentType:W,hasAssets:j,isAlreadyVerified:z})=>{o&&await b({action:"edit",username:y||"",...I&&{comment:I},taskInstanceId:o,commentId:P,hasAssets:j,taskVerified:z,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,commentType:W})};return T.useLayoutEffect(()=>{m.current&&n&&!i&&e.length>0&&(m.current.scrollTop=m.current.scrollHeight)},[n,i,e.length]),x.jsxs("div",{className:_e("transition-all duration-300 fixed bg-white right-0 bottom-0 h-[100vh] z-[9999999998] flex flex-col min-w-[270px] max-w-[420px] w-[calc(100vw-1rem)] border border-gray-200 rounded-t-sm overflow-hidden",n?"translate-y-0 opacity-100":"translate-y-full opacity-0 pointer-events-none"),children:[x.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-200 px-2 py-4 w-full",children:[x.jsx("h6",{className:"font-semibold text-gray-900 truncate max-w-[300px]",children:r}),x.jsx(je,{color:"grayLight",size:"smallCollapse",rounded:"none",title:"Close comment box",onClick:t,children:x.jsx(ke,{icon:Dl,className:"size-4 text-gray-300"})})]}),x.jsxs("div",{ref:m,className:"flex flex-col flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex flex-col justify-end flex-1 gap-4 p-4 pb-[102px]",children:[i&&x.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3].map(P=>x.jsx("div",{className:"h-16 animate-pulse rounded-lg bg-gray-100"},P))}),(e==null?void 0:e.length)>0&&!i&&e.map(P=>x.jsx(x5,{username:y||"",onDelete:()=>E(P.commentId),onEdit:(I,W)=>N({commentId:P.commentId,comment:I,commentType:W,hasAssets:P.hasAssets,isAlreadyVerified:P.taskVerified}),...P},P.commentId)),(e==null?void 0:e.length)===0&&!i&&x.jsxs("div",{className:"flex flex-1 flex-col items-center justify-end gap-3 text-center mb-1",children:[x.jsx("img",{src:n4,className:"opacity-70",alt:"Empty"}),x.jsx("p",{className:"text-gray-400",children:"There is no discussion in this Task."})]})]}),x.jsx(g1,{attachments:p,onChange:c,containerClassName:"fixed bottom-0 left-0 right-0 bg-white",clearKey:d,commentType:u,onCommentTypeChange:C,onAddAttachments:w,onRemoveAttachment:A,onSubmit:_,isOpen:n,actions:x.jsx(je,{category:"link",size:"normalCollapse",title:"Send comment",onClick:_,disabled:$a(l)&&p.length===0,children:x.jsx(ke,{icon:IS})})})]})]})},Kf=T.createContext({comments:[],openTaskDetails:null,username:void 0,setOpenTaskDetails:()=>{},prefetchQuery:e=>{}}),b1=()=>{if(!T.useContext(Kf))throw new Error("useCommentContext must be used within a CommentProvider");return T.useContext(Kf)},A5=({playbookInstanceId:e,children:t,username:n})=>{const[r,o]=T.useState({taskInstanceId:null,taskName:"",taskVerification:!1}),{taskInstanceId:i,taskName:s,taskVerification:a}=r||{taskInstanceId:null,taskName:"",taskVerification:!1},{comments:l,isLoading:c,prefetchQuery:u}=c4({taskInstanceId:i||0,enabled:i!==null,username:n});return x.jsxs(Kf.Provider,{value:{comments:l,openTaskDetails:r,setOpenTaskDetails:o,prefetchQuery:u,username:n},children:[t,Nn.createPortal(x.jsxs("div",{id:"cnfdnc-comment-box-root",children:[x.jsx("style",{children:Cl}),x.jsx("div",{className:"confidence-playbook",children:x.jsx(w5,{playbookInstanceId:e,comments:l,onClose:()=>o(null),isOpen:!!i,taskName:s,taskInstanceId:i,isLoading:c,taskVerification:a})})]}),LS)]})},k5={[Be.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[Be.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[Be.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[Be.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},Bn={PHOTO:"photo",SCREENSHOT:"screenshot",COMMENT:"comment",NO_VERIFICATION:null},C5=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:i=!1,isExpanded:s=!1,toggleExpanded:a,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,d]=T.useState(!1),{taskDetails:h,prefetchQuery:p}=DE({taskId:e.taskId,playbookId:l,enabled:s}),{setOpenTaskDetails:g,prefetchQuery:m}=b1(),{buttons:y}=Bw({taskStatus:e.workflowStatus,canStart:i}),b=T.useMemo(()=>e.imageRequired===0?Bn.NO_VERIFICATION:e.imageRequired===1?Bn.SCREENSHOT:e.imageRequired===2?Bn.PHOTO:e.imageRequired===4?Bn.COMMENT:null,[e.imageRequired]),v=async w=>{try{d(!0),await r(w)}finally{d(!1)}};if(o==="list"){const w=T.useMemo(()=>e.workflowStatus===Be.COMPLETED?"success":e.workflowStatus===Be.IN_PROGRESS?"primary":"default",[e.workflowStatus]),A=T.useMemo(()=>{const C=[];return y.forEach(_=>{_==="START"&&C.push({id:"START",color:"primary",action:"Start",to:Be.IN_PROGRESS}),_==="COMPLETE"&&(!e.taskVerified&&b===Bn.COMMENT&&C.push({id:"ADD_COMMENT",color:"danger",action:"Add Comment",to:"Required"}),C.push({id:"COMPLETE",color:"success",action:"Complete",to:Be.COMPLETED,disabled:!e.taskVerified&&b===Bn.COMMENT}))}),C},[y,b,e.taskVerified]);return x.jsxs("div",{className:_e("flex flex-col"),children:[x.jsxs("div",{className:_e("flex items-center gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",s&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:s?u:0},children:[x.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),x.jsx("div",{onClick:()=>{a==null||a(!s)},onMouseOver:p,className:_e("flex-1 truncate cursor-pointer",s&&"font-medium",e.workflowStatus===Be.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===Be.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),x.jsx(hS,{taskVerified:e.taskVerified,verificationType:b,title:e.workflowStatus,variant:w,transitions:A,onClick:C=>{if(C===ui.ADD_COMMENT){g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!0});return}r(C)}}),x.jsx(Yp,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})})]}),(h==null?void 0:h.description)&&x.jsx("div",{className:_e(!s&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-[1px] bg-gray-100 rounded-b-md"),children:x.jsx(Vp,{description:(h==null?void 0:h.description)||""})})]})}return x.jsxs("div",{className:Es("flex items-stretch rounded-sm overflow-hidden border",k5[e.workflowStatus]),children:[x.jsx(yS,{playbookType:n,status:e.workflowStatus,step:t}),x.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&x.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:x.jsx(vS,{status:e.workflowStatus})}),x.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[x.jsx("div",{className:_e("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),b?x.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[x.jsx(ke,{icon:Iy,className:"size-4"}),x.jsxs("div",{children:[x.jsx("span",{className:"font-medium",children:b===Bn.PHOTO?"Photo":b===Bn.SCREENSHOT?"Screenshot":"Comment"})," ","required"]})]}):x.jsx(x.Fragment,{})]}),(h==null?void 0:h.description)&&x.jsx("div",{className:_e(!s&&"hidden"),children:x.jsx(Vp,{description:(h==null?void 0:h.description)||""})}),(y.length>0||e.hasDescription)&&x.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[x.jsx("div",{className:"flex-1",children:x.jsx(FE,{buttons:y,onButtonClick:v,disabled:f})}),x.jsx(Yp,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})}),a&&x.jsx(je,{size:"smallCollapse",onMouseOver:p,category:"link",onClick:()=>{a()},title:s?"Hide task description":"Show task description",children:x.jsx(ke,{icon:Fy,className:Es("cursor-pointer text-[#0069D9]",s?"rotate-180":"")})})]})]})]})},v1=T.forwardRef(({title:e,className:t,playbookStyle:n,...r},o)=>{var i,s,a;return x.jsx("div",{ref:o,className:_e("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((i=n==null?void 0:n.whiteLabel)==null?void 0:i.titleBackgroundColor)||"#f8f9fa"},...r,children:x.jsx("div",{className:_e("text-xl min-h-16 p-4 font-medium flex-1",{"text-dark":!((s=n==null?void 0:n.whiteLabel)!=null&&s.titleTextColor)}),style:{color:(a=n==null?void 0:n.whiteLabel)==null?void 0:a.titleTextColor},children:e})})});v1.displayName="PlaybookHeader";const _5=Cl.replace(/:root,\s*:host/g,":host"),E5=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:r=!0})=>{const{playbook:o,actions:i}=$w(e);if(!o)return x.jsx("div",{});const s=async(a,l)=>{var c;if(a===ui.COMPLETE){const u=(c=o.tasks.find(f=>f.taskInstanceId===l))==null?void 0:c.sequenceOrder;if(u===void 0){console.error("Task not found in playbook");return}return i.completeTask(l,u)}if(a===ui.START)return i.startTask(l)};return x.jsx("div",{className:"confidence-playbook",children:x.jsx(x1,{playbook:o,playbookMode:t,onTaskButtonClick:s,playbookStyle:n,defaultExpanded:r})})},S5=({className:e,children:t,numberOfTasks:n,playbookMode:r})=>x.jsxs("div",{className:_e("w-full p-4",e),children:[n&&x.jsxs("div",{className:_e(r==="card"&&"mb-4"),children:[x.jsx("span",{className:"font-medium",children:"Tasks"})," (",n,")"]}),x.jsx("div",{className:_e(r==="card"&&"space-y-4"),children:t})]}),x1=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r,defaultExpanded:o=!0})=>{var y,b,v,w,A;const{playbookInstanceName:i,tasks:s}=e,a=T.useRef(null),[l,c]=T.useState(0),[u,f]=T.useState(()=>{const C=M2(e.playbookInstanceId);return C!==null?C:o}),d=()=>{f(C=>{const _=!C;return P2(e.playbookInstanceId,_),_})},{isTaskExpanded:h,toggleTaskExpanded:p,isAtLeastOneTaskExpanded:g}=T0(e.playbookInstanceId,{onTaskExpanded:()=>{var C;c(((C=a.current)==null?void 0:C.offsetHeight)||0)}});T.useEffect(()=>{if(g){if(!a.current)throw new Error("Playbook header ref is not set");new ResizeObserver(_=>{var E;for(const N of _)N.contentRect&&c(((E=a.current)==null?void 0:E.offsetHeight)||0)}).observe(a.current)}return()=>{a.current&&new ResizeObserver(()=>{}).unobserve(a.current)}},[g]);const m=T.useMemo(()=>{const C=s.filter(_=>_.workflowStatus===Be.COMPLETED).sort((_,E)=>E.sequenceOrder-_.sequenceOrder)[0];return C?C.sequenceOrder+1:0},[s]);return x.jsxs("div",{className:_e(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[9999999997] flex","transition-all duration-300 ease-in-out"),...(r==null?void 0:r.overlay)&&{style:{width:"100%",maxWidth:u?((y=r.overlay.size)==null?void 0:y.width)||450:"0rem",height:((b=r.overlay.size)==null?void 0:b.height)||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:((v=r.overlay.offset)==null?void 0:v.right)!==void 0?r.overlay.offset.right:r.overlay.position==="right"?32:void 0,left:((w=r.overlay.offset)==null?void 0:w.left)!==void 0?r.overlay.offset.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&x.jsx("div",{onClick:d,className:_e("size-9 absolute -left-9 p-1 top-3 z-[9999999997] border-none rounded-l-sm cursor-pointer"),style:{backgroundColor:((A=r==null?void 0:r.whiteLabel)==null?void 0:A.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:x.jsx("img",{src:h0,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),x.jsxs("div",{className:_e("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[x.jsx(v1,{title:i,className:_e("top-0 sticky z-2"),playbookStyle:r,ref:a}),x.jsx(S5,{playbookMode:t,numberOfTasks:e.numberofTasks,children:s.map((C,_)=>{var E;return x.jsx(C5,{task:C,step:_+1,viewMode:t,playbookId:e.playbookId,canStart:C.sequenceOrder===m,onButtonClick:N=>n(N,C.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(E=r==null?void 0:r.whiteLabel)==null?void 0:E.primaryColor},isExpanded:h(C.taskInstanceId),toggleExpanded:()=>p(C.taskInstanceId),listStickyTopBase:l||104},C.taskId)})})]})]})},T5=({email:e,playbookId:t,playbookMode:n,playbookStyle:r,bank:o="public-sdk",timezone:i="America/Los_Angeles",persistKey:s,defaultExpanded:a=!0})=>{const[l,c]=T.useState(null);return T.useEffect(()=>{(async()=>{const u=q0(t,s);if(u&&u.email===e){c(u.playbookInstanceId);return}const{playbookInstanceId:f,errorCode:d,details:h,message:p}=await N0({bank:o,email:e,timezone:i,playbookUid:t})||{};if(d)throw new Error(`Error initiating playbook: ${p} (Code: ${d}) - Details: ${h}`);if(!f)throw new Error("No playbook instance ID returned from initiation");H0(t,f,e,s),c(f)})()},[]),l?x.jsx(Hr,{playbookInstanceId:l,playbookMode:n,playbookStyle:r,username:e,defaultExpanded:a}):null},N5=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook",btnColor:o="primary",persistKey:i,defaultExpanded:s=!0})=>{const[a,l]=T.useState(null),[c,u]=T.useState(void 0);return T.useEffect(()=>{const f=q0(e,i);f&&(l(f.playbookInstanceId),u(f.email))},[e,i]),x.jsxs(x.Fragment,{children:[x.jsxs(Al.div,{children:[x.jsx(Wk,{playbookId:e,disabled:!!a,onInitiated:(f,d)=>{H0(e,f,d,i),l(f),u(d)},btnLabel:r,btnColor:o}),x.jsx("style",{type:"text/css",children:_5})]}),a&&x.jsx(Hr,{playbookInstanceId:a,playbookMode:t,playbookStyle:n,username:c,defaultExpanded:s})]})},Hr=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,username:r,defaultExpanded:o=!0})=>(console.log("Starting ConfidencePlaybook with instance ID:",e,r),x.jsx(E0,{children:x.jsx(A5,{playbookInstanceId:e,username:r,children:x.jsx(E5,{playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:o})})}));Hr.Context=E0;Hr.View=x1;Hr.AutoInstantiated=T5;Hr.WithInstantiateButton=N5;const w1=Cl.replace(/:root,\s*:host/g,":host"),A1=e=>Nn.createPortal(x.jsxs(Al.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:w1}),x.jsx(Hr,{...e})]}),document.body),O5=e=>Nn.createPortal(x.jsxs(Al.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:w1}),x.jsx(Hr.AutoInstantiated,{...e})]}),document.body);A1.AutoInstantiated=O5;exports.ConfidencePlaybook=A1;
|
|
606
|
+
`?c.insertParagraph():u===" "?c.insertNodes([ta()]):c.insertText(u)}}}else t.insertRawText(s)}function Eg(e,t,n){e.dispatchCommand(x3,{nodes:t,selection:n})||(n.insertNodes(t),(function(r){if($(r)&&r.isCollapsed()){const o=r.anchor;let i=null;const s=nr(o,"previous");if(s)if(Or(s))i=s.origin;else{const a=Fr(s,un(We(),"next").getFlipped());for(const l of a){if(X(l.origin)){i=l.origin;break}if(R(l.origin)&&!l.origin.isInline())break}}if(i&&X(i)){const a=i.getFormat(),l=i.getStyle();r.format===a&&r.style===l||(r.format=a,r.style=l,r.dirty=!0)}}})(n))}function s1(e,t,n,r=[]){let o=t===null||n.isSelected(t);const i=R(n)&&n.excludeFromCopy("html");let s=n;t!==null&&X(s)&&(s=$x(t,s,"clone"));const a=R(s)?s.getChildren():[],l=(function(c){const u=c.exportJSON(),f=c.constructor;if(u.type!==f.getType()&&vl(58,f.name),R(c)){const d=u.children;Array.isArray(d)||vl(59,f.name)}return u})(s);X(s)&&s.getTextContentSize()===0&&(o=!1);for(let c=0;c<a.length;c++){const u=a[c],f=s1(e,t,u,l.children);!o&&R(n)&&f&&n.extractWithChild(u,t,"clone")&&(o=!0)}if(o&&!i)r.push(l);else if(Array.isArray(l.children))for(let c=0;c<l.children.length;c++){const u=l.children[c];r.push(u)}return o}function fN(e,t){const n=[],r=We().getChildren();for(let o=0;o<r.length;o++)s1(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function dN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=t6(r);X(o)&&z6(o),t.push(o)}return t}let ri=null;async function Sg(e,t,n){if(ri!==null)return!1;if(t!==null)return new Promise((c,u)=>{e.update(()=>{c(Tg(e,t,n))})});const r=e.getRootElement(),o=e._window||window,i=o.document,s=en(o);if(r===null||s===null)return!1;const a=i.createElement("span");a.style.cssText="position: fixed; top: -1000px;",a.append(i.createTextNode("#")),r.append(a);const l=new Range;return l.setStart(a,0),l.setEnd(a,1),s.removeAllRanges(),s.addRange(l),new Promise((c,u)=>{const f=e.registerCommand(Zl,d=>(Sr(d,ClipboardEvent)&&(f(),ri!==null&&(o.clearTimeout(ri),ri=null),c(Tg(e,d,n))),!0),hx);ri=o.setTimeout(()=>{f(),ri=null,c(!1)},50),i.execCommand("copy"),a.remove()})}function Tg(e,t,n){if(n===void 0){const o=en(e._window),i=Z();if(!i||i.isCollapsed()||!o)return!1;const s=o.anchorNode,a=o.focusNode;if(s!==null&&a!==null&&!oa(e,s,a))return!1;n=hN(i)}t.preventDefault();const r=t.clipboardData;return r!==null&&(pN(r,n),!0)}const a1=[["text/html",cN],["application/x-lexical-editor",uN]];function hN(e=Z()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Jd();for(const[r,o]of a1){const i=o(n,e);i!==null&&(t[r]=i)}}return t}function pN(e,t){for(const[n]of a1)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function Ng(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const Ko=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mN=Ko&&"documentMode"in document?document.documentMode:null,gN=Ko&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),yN=!(!Ko||!("InputEvent"in window)||mN)&&"getTargetRanges"in new window.InputEvent("input"),bN=Ko&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Og=Ko&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,vN=Ko&&/^(?=.*Chrome).*/i.test(navigator.userAgent),xN=Ko&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&gN&&!vN,Pg=he("DRAG_DROP_PASTE_FILE");function Pa(e){let t=null;if(Sr(e,DragEvent)?t=e.dataTransfer:Sr(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),o=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),o]}function Mg(e){const t=Z();if(!$(t))return!1;const n=new Set,r=t.getNodes();for(let o=0;o<r.length;o++){const i=r[o],s=i.getKey();if(n.has(s))continue;const a=at(i,c=>R(c)&&!c.isInline());if(a===null)continue;const l=a.getKey();a.canIndent()&&!n.has(l)&&(n.add(l),e(a))}return n.size>0}function Ig(e){const t=Fi(e);return Te(t)}function su(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function wN(e){return fn(e.registerCommand(Md,t=>{const n=Z();return!!ot(n)&&(n.clear(),!0)},we),e.registerCommand(bo,t=>{const n=Z();return $(n)?(n.deleteCharacter(t),!0):!!ot(n)&&(n.deleteNodes(),!0)},we),e.registerCommand(Rs,t=>{const n=Z();return!!$(n)&&(n.deleteWord(t),!0)},we),e.registerCommand(Ds,t=>{const n=Z();return!!$(n)&&(n.deleteLine(t),!0)},we),e.registerCommand(gi,t=>{const n=Z();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)_g(r,n,e);else if($(n)){const o=t.data;return o&&n.insertText(o),!0}}return!0},we),e.registerCommand(xf,()=>{const t=Z();return!!$(t)&&(t.removeText(),!0)},we),e.registerCommand(Cn,t=>{const n=Z();return!!$(n)&&(n.formatText(t),!0)},we),e.registerCommand(_3,t=>{const n=Z();if(!$(n)&&!ot(n))return!1;const r=n.getNodes();for(const o of r){const i=at(o,s=>R(s)&&!s.isInline());i!==null&&i.setFormat(t)}return!0},we),e.registerCommand(mi,t=>{const n=Z();return!!$(n)&&(n.insertLineBreak(t),!0)},we),e.registerCommand(Ls,()=>{const t=Z();return!!$(t)&&(t.insertParagraph(),!0)},we),e.registerCommand(k3,()=>(sx([ta()]),!0),we),e.registerCommand(C3,()=>Mg(t=>{const n=t.getIndent();t.setIndent(n+1)}),we),e.registerCommand(Mm,()=>Mg(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),we),e.registerCommand(Iv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if($(n)){const r=If(n.focus,!0);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},we),e.registerCommand(Lv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if($(n)){if((function(o){const i=o.focus;return i.key==="root"&&i.offset===We().getChildrenSize()})(n))return t.preventDefault(),!0;const r=If(n.focus,!1);if(!t.shiftKey&&Te(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},we),e.registerCommand(Mv,t=>{const n=Z();if(ot(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),mg(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!$(n))return!1;if(yg(n,!0)){const r=t.shiftKey;return t.preventDefault(),bg(n,r,!0),!0}return!1},we),e.registerCommand(Pv,t=>{const n=Z();if(ot(n)){const o=n.getNodes();if(o.length>0)return t.preventDefault(),mg(o[0])?o[0].selectPrevious():o[0].selectNext(0,0),!0}if(!$(n))return!1;const r=t.shiftKey;return!!yg(n,!1)&&(t.preventDefault(),bg(n,r,!1),!0)},we),e.registerCommand(Dv,t=>{if(Ig(t.target))return!1;const n=Z();if($(n)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:o}=r;if(o.offset!==0)return!1;const i=o.getNode();if(Ye(i))return!1;const s=K6(i);return s.getIndent()>0&&(s.is(i)||i.is(s.getFirstDescendant()))})(n))return t.preventDefault(),e.dispatchCommand(Mm,void 0);if(Og&&navigator.language==="ko-KR")return!1}else if(!ot(n))return!1;return t.preventDefault(),e.dispatchCommand(bo,!0)},we),e.registerCommand(Fv,t=>{if(Ig(t.target))return!1;const n=Z();return!(!$(n)&&!ot(n))&&(t.preventDefault(),e.dispatchCommand(bo,!1))},we),e.registerCommand(Fs,t=>{const n=Z();if(!$(n))return!1;if(su(n),t!==null){if((Og||bN||xN)&&yN)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(mi,!1)}return e.dispatchCommand(Ls,void 0)},we),e.registerCommand(Rd,()=>{const t=Z();return!!$(t)&&(e.blur(),!0)},we),e.registerCommand(zv,t=>{const[,n]=Pa(t);if(n.length>0){const o=Ng(t.clientX,t.clientY);if(o!==null){const{offset:i,node:s}=o,a=Fi(s);if(a!==null){const l=rx();if(X(a))l.anchor.set(a.getKey(),i,"text"),l.focus.set(a.getKey(),i,"text");else{const u=a.getParentOrThrow().getKey(),f=a.getIndexWithinParent()+1;l.anchor.set(u,f,"element"),l.focus.set(u,f,"element")}const c=Ri(l);Pt(c)}e.dispatchCommand(Pg,n)}return t.preventDefault(),!0}const r=Z();return!!$(r)},we),e.registerCommand($v,t=>{const[n]=Pa(t),r=Z();return!(n&&!$(r))},we),e.registerCommand(Uv,t=>{const[n]=Pa(t),r=Z();if(n&&!$(r))return!1;const o=Ng(t.clientX,t.clientY);if(o!==null){const i=Fi(o.node);Te(i)&&t.preventDefault()}return!0},we),e.registerCommand(wf,()=>(u6(),!0),we),e.registerCommand(Zl,t=>(Sg(e,Sr(t,ClipboardEvent)?t:null),!0),we),e.registerCommand(Dd,t=>((async function(n,r){await Sg(r,Sr(n,ClipboardEvent)?n:null),r.update(()=>{const o=Z();$(o)?o.removeText():ot(o)&&o.getNodes().forEach(i=>i.remove())})})(t,e),!0),we),e.registerCommand(Gl,t=>{const[,n,r]=Pa(t);return n.length>0&&!r?(e.dispatchCommand(Pg,n),!0):Xi(t.target)&&Hd(t.target)?!1:Z()!==null&&((function(o,i){o.preventDefault(),i.update(()=>{const s=Z(),a=Sr(o,InputEvent)||Sr(o,KeyboardEvent)?null:o.clipboardData;a!=null&&s!==null&&_g(a,s,i)},{tag:z3})})(t,e),!0)},we),e.registerCommand(Rv,t=>{const n=Z();return $(n)&&su(n),!1},we),e.registerCommand(jv,t=>{const n=Z();return $(n)&&su(n),!1},we))}function AN(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const lh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function kN({editor:e,ErrorBoundary:t}){return(function(n,r){const[o,i]=T.useState(()=>n.getDecorators());return lh(()=>n.registerDecoratorListener(s=>{Nn.flushSync(()=>{i(s)})}),[n]),T.useEffect(()=>{i(n.getDecorators())},[n]),T.useMemo(()=>{const s=[],a=Object.keys(o);for(let l=0;l<a.length;l++){const c=a[l],u=x.jsx(r,{onError:d=>n._onError(d),children:x.jsx(T.Suspense,{fallback:null,children:o[c]})}),f=n.getElementByKey(c);f!==null&&s.push(Nn.createPortal(u,f,c))}return s},[r,o,n])})(e,t)}function CN({editor:e,ErrorBoundary:t}){return(function(n){const r=vi.maybeFromEditor(n);if(r&&r.hasExtensionByName(rN.name)){for(const o of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(o)&&AN(320,o);return!0}return!1})(e)?null:x.jsx(kN,{editor:e,ErrorBoundary:t})}function Lg(e){return e.getEditorState().read(e1(e.isComposing()))}function _N({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=ht();return(function(o){lh(()=>fn(wN(o),aN(o)),[o])})(r),x.jsxs(x.Fragment,{children:[e,x.jsx(EN,{content:t}),x.jsx(CN,{editor:r,ErrorBoundary:n})]})}function EN({content:e}){const[t]=ht(),n=(function(o){const[i,s]=T.useState(()=>Lg(o));return lh(()=>{function a(){const l=Lg(o);s(l)}return a(),fn(o.registerUpdateListener(()=>{a()}),o.registerEditableListener(()=>{a()}))},[o]),i})(t),r=F6();return n?typeof e=="function"?e(r):e:null}function SN(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;const i=t._selection,s=e._selection;if(o)return 1;if(!($(i)&&$(s)&&s.isCollapsed()&&i.isCollapsed()))return 0;const a=(function(y,b,v){const w=y._nodeMap,A=[];for(const C of b){const _=w.get(C);_!==void 0&&A.push(_)}for(const[C,_]of v){if(!_)continue;const E=w.get(C);E===void 0||Ye(E)||A.push(E)}return A})(t,n,r);if(a.length===0)return 0;if(a.length>1){const y=t._nodeMap,b=y.get(i.anchor.key),v=y.get(s.anchor.key);return b&&v&&!e._nodeMap.has(b.__key)&&X(b)&&b.__text.length===1&&i.anchor.offset===1?2:0}const l=a[0],c=e._nodeMap.get(l.__key);if(!X(c)||!X(l)||c.__mode!==l.__mode)return 0;const u=c.__text,f=l.__text;if(u===f)return 0;const d=i.anchor,h=s.anchor;if(d.key!==h.key||d.type!=="text")return 0;const p=d.offset,g=h.offset,m=f.length-u.length;return m===1&&g===p-1?2:m===-1&&g===p+1?3:m===-1&&g===p?4:0}function TN(e,t){let n=Date.now(),r=0;return(o,i,s,a,l,c)=>{const u=Date.now();if(c.has(Nf))return r=0,n=u,2;const f=SN(o,i,a,l,e.isComposing()),d=(()=>{const h=s===null||s.editor===e,p=c.has(j3);if(!p&&h&&c.has(vo))return 0;if(o===null)return 1;const g=i._selection;if(!(a.size>0||l.size>0))return g!==null?0:2;const m=typeof t=="number"?t:t.peek();return p===!1&&f!==0&&f===r&&u<n+m&&h||a.size===1&&(function(y,b,v){const w=b._nodeMap.get(y),A=v._nodeMap.get(y),C=b._selection,_=v._selection;return!($(C)&&$(_)&&C.anchor.type==="element"&&C.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"||!X(w)||!X(A)||w.__parent!==A.__parent)&&JSON.stringify(b.read(()=>w.exportJSON()))===JSON.stringify(v.read(()=>A.exportJSON()))})(Array.from(a)[0],o,i)?0:1})();return n=u,r=f,d}}function Rg(e){e.undoStack=[],e.redoStack=[],e.current=null}function l1(e,t,n){const r=TN(e,n);return fn(e.registerCommand(Id,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(l.length!==0){const c=s.current,u=l.pop();c!==null&&(a.push(c),i.dispatchCommand(Aa,!0)),l.length===0&&i.dispatchCommand(ka,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(Ld,()=>((function(i,s){const a=s.redoStack,l=s.undoStack;if(a.length!==0){const c=s.current;c!==null&&(l.push(c),i.dispatchCommand(ka,!0));const u=a.pop();a.length===0&&i.dispatchCommand(Aa,!1),s.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:Nf})}})(e,t),!0),we),e.registerCommand(S3,()=>(Rg(t),!1),we),e.registerCommand(T3,()=>(Rg(t),e.dispatchCommand(Aa,!1),e.dispatchCommand(ka,!1),!0),we),e.registerUpdateListener(({editorState:i,prevEditorState:s,dirtyLeaves:a,dirtyElements:l,tags:c})=>{const u=t.current,f=t.redoStack,d=t.undoStack,h=u===null?null:u.editorState;if(u!==null&&i===h)return;const p=r(s,i,u,a,l,c);if(p===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(Aa,!1)),u!==null&&(d.push({...u}),e.dispatchCommand(ka,!0));else if(p===2)return;t.current={editor:e,editorState:i}}))}function c1(){return{current:null,redoStack:[],undoStack:[]}}const au={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Gx({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:c1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return $s(()=>r.disabled.value?void 0:l1(e,r.historyState.value,r.delay))}};P6(au,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function NN({delay:e,externalHistoryState:t}){const[n]=ht();return(function(r,o,i=1e3){const s=T.useMemo(()=>o||c1(),[o]);T.useEffect(()=>l1(r,s,i),[i,r,s])})(n,t,e),null}const u1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function ON({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaErrorMessage:i,ariaExpanded:s,ariaInvalid:a,ariaLabel:l,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:f,ariaRequired:d,autoCapitalize:h,className:p,id:g,role:m="textbox",spellCheck:y=!0,style:b,tabIndex:v,"data-testid":w,...A},C){const[_,E]=T.useState(e.isEditable()),N=T.useCallback(I=>{I&&I.ownerDocument&&I.ownerDocument.defaultView?e.setRootElement(I):e.setRootElement(null)},[e]),P=T.useMemo(()=>(function(...I){return W=>{for(const j of I)typeof j=="function"?j(W):j!=null&&(j.current=W)}})(C,N),[N,C]);return u1(()=>(E(e.isEditable()),e.registerEditableListener(I=>{E(I)})),[e]),x.jsx("div",{"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":o,...i!=null?{"aria-errormessage":i}:{},"aria-expanded":_&&m==="combobox"?!!s:void 0,...a!=null?{"aria-invalid":a}:{},"aria-label":l,"aria-labelledby":c,"aria-multiline":u,"aria-owns":_?f:void 0,"aria-readonly":!_||void 0,"aria-required":d,autoCapitalize:h,className:p,contentEditable:_,"data-testid":w,id:g,ref:P,role:m,spellCheck:y,style:b,tabIndex:v,...A})}const PN=T.forwardRef(ON);function Dg(e){return e.getEditorState().read(e1(e.isComposing()))}const MN=T.forwardRef(IN);function IN(e,t){const{placeholder:n,...r}=e,[o]=ht();return x.jsxs(x.Fragment,{children:[x.jsx(PN,{editor:o,...r,ref:t}),n!=null&&x.jsx(LN,{editor:o,content:n})]})}function LN({content:e,editor:t}){const n=(function(s){const[a,l]=T.useState(()=>Dg(s));return u1(()=>{function c(){const u=Dg(s);l(u)}return c(),fn(s.registerUpdateListener(()=>{c()}),s.registerEditableListener(()=>{c()}))},[s]),a})(t),[r,o]=T.useState(t.isEditable());if(T.useLayoutEffect(()=>(o(t.isEditable()),t.registerEditableListener(s=>{o(s)})),[t]),!n)return null;let i=null;return typeof e=="function"?i=e(r):e!==null&&(i=e),i===null?null:x.jsx("div",{"aria-hidden":!0,children:i})}const RN=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?T.useLayoutEffect:T.useEffect;function DN({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=ht();return RN(()=>{if(n)return r.registerUpdateListener(({editorState:o,dirtyElements:i,dirtyLeaves:s,prevEditorState:a,tags:l})=>{t&&i.size===0&&s.size===0||e&&l.has(vo)||a.isEmpty()||n(o,r,l)})},[r,e,t,n]),null}const FN=T.createContext(null),lu={didCatch:!1,error:null};class jN extends T.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=lu}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,o;const{error:n}=this.state;n!==null&&((o=(r=this.props).onReset)==null||o.call(r,{args:t,reason:"imperative-api"}),this.setState(lu))}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,t,n)}componentDidUpdate(t,n){var i,s;const{didCatch:r}=this.state,{resetKeys:o}=this.props;r&&n.error!==null&&zN(t.resetKeys,o)&&((s=(i=this.props).onReset)==null||s.call(i,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(lu))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=T.createElement(r,l);else if(o!==void 0)a=o;else throw s}return T.createElement(FN.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function zN(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function $N({children:e,onError:t}){return x.jsx(jN,{fallback:x.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const UN={paragraph:"m-0",list:{ol:"list-decimal pl-4",ul:"list-disc pl-4"},text:{bold:"font-semibold",italic:"italic",underline:"underline",strikethrough:"line-through",code:"font-mono"},link:"text-blue-600 hover:text-blue-600 underline cursor-pointer"};function Tr(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const o of t)r.append("v",o);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uf(e){let t=1,n=e.getParent();for(;n!=null;){if(Se(n)){const r=n.getParent();if(ve(r)){t++,n=r.getParent();continue}Tr(40)}return t}return t}function Bf(e){let t=e.getParent();ve(t)||Tr(40);let n=t;for(;n!==null;)n=n.getParent(),ve(n)&&(t=n);return t}function f1(e){let t=[];const n=e.getChildren().filter(Se);for(let r=0;r<n.length;r++){const o=n[r],i=o.getFirstChild();ve(i)?t=t.concat(f1(i)):t.push(o)}return t}function wn(e){return Se(e)&&ve(e.getFirstChild())}function Fg(e){return Zt().append(e)}function d1(e,t){return Se(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function jg(e){const t=Z();if(t!==null){let n=t.getNodes();if($(t)){const o=t.getStartEndPoints();o===null&&Tr(143);const[i]=o,s=i.getNode(),a=s.getParent();if(jt(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const c=Tt();s.append(c),n=c.select().getNodes()}}else if(d1(s,n)){const l=Bt(e);if(jt(a)){s.replace(l);const c=Zt();R(s)&&(c.setFormat(s.getFormatType()),c.setIndent(s.getIndent())),l.append(c)}else if(Se(s)){const c=s.getParentOrThrow();Uo(l,c.getChildren()),c.replace(l)}return}}const r=new Set;for(let o=0;o<n.length;o++){const i=n[o];if(R(i)&&i.isEmpty()&&!Se(i)&&!r.has(i.getKey())){zg(i,e);continue}let s=xx(i)?i.getParent():Se(i)&&i.isEmpty()?i:null;for(;s!=null;){const a=s.getKey();if(ve(s)){if(!r.has(a)){const l=Bt(e);Uo(l,s.getChildren()),s.replace(l),r.add(a)}break}{const l=s.getParent();if(jt(l)&&!r.has(a)){r.add(a),zg(s,e);break}s=l}}}}}function Uo(e,t){e.splice(e.getChildrenSize(),0,t)}function zg(e,t){if(ve(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),o=Zt();let i;if(Uo(o,e.getChildren()),ve(n)&&t===n.getListType())n.append(o),ve(r)&&t===r.getListType()&&(Uo(n,r.getChildren()),r.remove()),i=n;else if(ve(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(o),i=r;else{const s=Bt(t);s.append(o),e.replace(s),i=s}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),i}function ch(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&wn(n)&&wn(r)&&(ch(n.getFirstChild(),r.getFirstChild()),r.remove());const o=t.getChildren();o.length>0&&e.append(...o),t.remove()}function BN(){const e=Z();if($(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(d1(r,n))t.add(Bf(r));else for(let o=0;o<n.length;o++){const i=n[o];if(xx(i)){const s=W6(i,ts);s!=null&&t.add(Bf(s))}}for(const o of t){let i=o;const s=f1(o);for(const a of s){const l=Tt().setTextStyle(e.style).setTextFormat(e.format);Uo(l,a.getChildren()),i.insertAfter(l),i=l,a.__key===e.anchor.key&&$o(e.anchor,Yt(un(l,"next"))),a.__key===e.focus.key&&$o(e.focus,Yt(un(l,"next"))),a.remove()}o.remove()}}}function h1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Se(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),ve(r.getFirstChild())||n++)}function WN(e){const t=new Set;if(wn(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),o=e.getPreviousSibling();if(wn(r)&&wn(o)){const i=o.getFirstChild();if(ve(i)){i.append(e);const s=r.getFirstChild();ve(s)&&(Uo(i,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(wn(r)){const i=r.getFirstChild();if(ve(i)){const s=i.getFirstChild();s!==null&&s.insertBefore(e)}}else if(wn(o)){const i=o.getFirstChild();ve(i)&&i.append(e)}else if(ve(n)){const i=Zt().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=Bt(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());i.append(s),s.append(e),o?o.insertAfter(i):r?r.insertBefore(i):n.append(i)}}function KN(e){if(wn(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(ve(n?n.getParent():void 0)&&Se(n)&&ve(t)){const r=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{const i=t.getListType(),s=Zt(),a=Bt(i);s.append(a),e.getPreviousSiblings().forEach(u=>a.append(u));const l=Zt(),c=Bt(i);l.append(c),Uo(c,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function HN(){const e=Z();if(!$(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!Se(t)||t.getChildrenSize()!==0)return!1;const n=Bf(t),r=t.getParent();ve(r)||Tr(40);const o=r.getParent();let i;if(jt(o))i=Tt(),n.insertAfter(i);else{if(!Se(o))return!1;i=Zt(),o.insertAfter(i)}i.setTextStyle(e.style).setTextFormat(e.format).select();const s=t.getNextSiblings();if(s.length>0){const a=Bt(r.getListType());if(Se(i)){const l=Zt();l.append(a),i.insertAfter(l)}else i.insertAfter(a);a.append(...s)}return(function(a){let l=a;for(;l.getNextSibling()==null&&l.getPreviousSibling()==null;){const c=l.getParent();if(c==null||!Se(c)&&!ve(c))break;l=c}l.remove()})(t),!0}function xl(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}class ts extends Mn{constructor(n=1,r=void 0,o){super(o);D(this,"__value");D(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();ve(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:Mn,importDOM:{li:()=>({conversion:qN,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,o){(function(a,l,c){const u=l.getParent();!ve(u)||u.getListType()!=="check"||ve(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),c&&l.__checked===c.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,(function(a,l,c){const u=[],f=[],d=l.list,h=d?d.listitem:void 0;let p;if(d&&d.nested&&(p=d.nested.listitem),h!==void 0&&u.push(...xl(h)),d){const g=c.getParent(),m=ve(g)&&g.getListType()==="check",y=c.getChecked();m&&!y||f.push(d.listitemUnchecked),m&&y||f.push(d.listitemChecked),m&&u.push(y?d.listitemChecked:d.listitemUnchecked)}if(p!==void 0){const g=xl(p);c.getChildren().some(m=>ve(m))?u.push(...g):f.push(...g)}f.length>0&&qx(a,...f),u.length>0&&ih(a,...u)})(r,o.theme,this);const i=n?n.__style:"",s=this.__style;i!==s&&(s===""?r.removeAttribute("style"):r.style.cssText=s),(function(a,l,c){const u=pg(l.__textStyle);for(const f in u)a.style.setProperty(`--listitem-marker-${f}`,u[f]);if(c)for(const f in pg(c.__textStyle))f in u||a.style.removeProperty(`--listitem-marker-${f}`)})(r,this,n)}updateDOM(n,r,o){const i=r;return this.updateListItemDOM(n,i,o),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),o=this.getFormatType();o&&(r.style.textAlign=o);const i=this.getDirection();return i&&(r.dir=i),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const o=n[r];if(R(o)&&this.canMergeWith(o)){const i=o.getChildren();this.append(...i),o.remove()}else super.append(o)}return this}replace(n,r){if(Se(n))return super.replace(n);this.setIndent(0);const o=this.getParentOrThrow();if(!ve(o))return n;if(o.__first===this.getKey())o.insertBefore(n);else if(o.__last===this.getKey())o.insertAfter(n);else{const i=Bt(o.getListType());let s=this.getNextSibling();for(;s;){const a=s;s=s.getNextSibling(),i.append(a)}o.insertAfter(n),n.insertAfter(i)}return r&&(R(n)||Tr(139),this.getChildren().forEach(i=>{n.append(i)})),this.remove(),o.getChildrenSize()===0&&o.remove(),n}insertAfter(n,r=!0){const o=this.getParentOrThrow();if(ve(o)||Tr(39),Se(n))return super.insertAfter(n,r);const i=this.getNextSiblings();if(o.insertAfter(n,r),i.length!==0){const s=Bt(o.getListType());i.forEach(a=>s.append(a)),n.insertAfter(s,r)}return n}remove(n){const r=this.getPreviousSibling(),o=this.getNextSibling();super.remove(n),r&&o&&wn(r)&&wn(o)&&(ch(r.getFirstChild(),o.getFirstChild()),o.remove())}insertNewAfter(n,r=!0){const o=Zt().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(o,r),o}collapseAtStart(n){const r=Tt();this.getChildren().forEach(a=>r.append(a));const o=this.getParentOrThrow(),i=o.getParentOrThrow(),s=Se(i);if(o.getChildrenSize()===1)if(s)o.remove(),i.select();else{o.insertBefore(r),o.remove();const a=n.anchor,l=n.focus,c=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(c,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(c,l.offset,"element")}else o.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const o=this.getParent();return ve(o)&&(r=o.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),o=0;for(;Se(r);)r=r.getParentOrThrow().getParentOrThrow(),o++;return o}setIndent(n){typeof n!="number"&&Tr(117),(n=Math.floor(n))>=0||Tr(199);let r=this.getIndent();for(;r!==n;)r<n?(WN(this),r++):(KN(this),r--);return this}canInsertAfter(n){return Se(n)}canReplaceWith(n){return Se(n)}canMergeWith(n){return Se(n)||Bd(n)}extractWithChild(n,r){if(!$(r))return!1;const o=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(o)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Bt("bullet")}canMergeWhenEmpty(){return!0}}function qN(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return $g(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return $g(n.children[0])}const t=e.getAttribute("aria-checked");return{node:Zt(t==="true"||t!=="false"&&void 0)}}function $g(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:Zt(e.hasAttribute("checked"))}}function Zt(e){return Kr(new ts(void 0,e))}function Se(e){return e instanceof ts}class sa extends Mn{constructor(n="number",r=1,o){super(o);D(this,"__tag");D(this,"__start");D(this,"__listType");const i=YN[n]||n;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const o=r.getNextSibling();ve(o)&&r.getListType()===o.getListType()&&ch(r,o)})(n),h1(n)},extends:Mn,importDOM:{ol:()=>({conversion:Bg,priority:0}),ul:()=>({conversion:Bg,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const o=this.__tag,i=document.createElement(o);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,Ug(i,n.theme,this),i}updateDOM(n,r,o){return n.__tag!==this.__tag||n.__listType!==this.__listType||(Ug(r,o.theme,this),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return pt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,o){let i=o;for(let s=0;s<o.length;s++){const a=o[s];Se(a)||(i===o&&(i=[...o]),i[s]=Zt().append(!R(a)||ve(a)||a.isInline()?a:rt(a.getTextContent())))}return super.splice(n,r,i)}extractWithChild(n){return Se(n)}}function Ug(e,t,n){const r=[],o=[],i=t.list;if(i!==void 0){const s=i[`${n.__tag}Depth`]||[],a=Uf(n)-1,l=a%s.length,c=s[l],u=i[n.__tag];let f;const d=i.nested,h=i.checklist;if(d!==void 0&&d.list&&(f=d.list),u!==void 0&&r.push(u),h!==void 0&&n.__listType==="check"&&r.push(h),c!==void 0){r.push(...xl(c));for(let p=0;p<s.length;p++)p!==l&&o.push(n.__tag+p)}if(f!==void 0){const p=xl(f);a>1?r.push(...p):o.push(...p)}}o.length>0&&qx(e,...o),r.length>0&&ih(e,...r)}function VN(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Se(r)){t.push(r);const o=r.getChildren();o.length>1&&o.forEach(i=>{ve(i)&&t.push(Fg(i))})}else t.push(Fg(r))}return t}function Bg(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Bt("number",e.start):t==="ul"&&(n=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const o of r.childNodes)if(pt(o)&&o.hasAttribute("aria-checked"))return!0;return!1})(e)?Bt("check"):Bt("bullet")),{after:VN,node:n}}const YN={ol:"number",ul:"bullet"};function Bt(e="number",t=1){return Kr(new sa(e,t))}function ve(e){return e instanceof sa}const QN=he("UPDATE_LIST_START_COMMAND"),p1=he("INSERT_UNORDERED_LIST_COMMAND"),m1=he("INSERT_ORDERED_LIST_COMMAND"),Wf=he("REMOVE_LIST_COMMAND");function GN(e){return fn(e.registerCommand(m1,()=>(jg("number"),!0),Gn),e.registerCommand(QN,t=>{const{listNodeKey:n,newStart:r}=t,o=Xe(n);return!!ve(o)&&(o.getListType()==="number"&&(o.setStart(r),h1(o)),!0)},Gn),e.registerCommand(p1,()=>(jg("bullet"),!0),Gn),e.registerCommand(Wf,()=>(BN(),!0),Gn),e.registerCommand(Ls,()=>HN(),Gn),e.registerNodeTransform(ts,t=>{const n=t.getFirstChild();if(n){if(X(n)){const r=n.getStyle(),o=n.getFormat();t.getTextStyle()!==r&&t.setTextStyle(r),t.getTextFormat()!==o&&t.setTextFormat(o)}}else{const r=Z();$(r)&&(r.style!==t.getTextStyle()||r.format!==t.getTextFormat())&&r.isCollapsed()&&t.is(r.anchor.getNode())&&t.setTextStyle(r.style).setTextFormat(r.format)}}),e.registerNodeTransform(Br,t=>{const n=t.getParent();if(Se(n)&&t.is(n.getFirstChild())){const r=t.getStyle(),o=t.getFormat();r===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(r).setTextFormat(o)}}))}function ZN(e){const t=n=>{const r=n.getParent();if(ve(n.getFirstChild())||!ve(r))return;const o=at(n,i=>Se(i)&&ve(i.getParent())&&Se(i.getPreviousSibling()));if(o===null&&n.getIndent()>0)n.setIndent(0);else if(Se(o)){const i=o.getPreviousSibling();if(Se(i)){const s=(function(l){let c=l,u=c.getFirstChild();for(;ve(u);){const f=u.getLastChild();if(!Se(f))break;c=f,u=c.getFirstChild()}return c})(i),a=s.getParent();if(ve(a)){const l=Uf(a);l+1<Uf(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(sa,n=>{const r=[n];for(;r.length>0;){const o=r.shift();if(ve(o)){for(const i of o.getChildren())if(Se(i)){t(i);const s=i.getFirstChild();ve(s)&&r.push(s)}}}})}const JN=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ho extends Mn{constructor(n="",r={},o){super(o);D(this,"__url");D(this,"__target");D(this,"__rel");D(this,"__title");const{target:i=null,rel:s=null,title:a=null}=r;this.__url=n,this.__target=i,this.__rel=s,this.__title=a}static getType(){return"link"}static clone(n){return new Ho(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),ih(r,n.theme.link),r}updateLinkDOM(n,r,o){if(Nx(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,a=this[s];n&&n[s]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(n,r,o){return this.updateLinkDOM(n,r,o),!1}static importDOM(){return{a:n=>({conversion:XN,priority:1})}}static importJSON(n){return ko().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=Hg(n);try{const r=new URL(Hg(n));if(!JN.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const o=ko(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(o,r),o}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,o){if(!$(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function XN(e){let t=null;if(Nx(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=ko(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function ko(e="",t){return Kr(new Ho(e,t))}function ut(e){return e instanceof Ho}class ic extends Ho{constructor(n="",r={},o){super(n,r,o);D(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new ic(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,o){return super.updateDOM(n,r,o)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return Wg().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const o=this.getParentOrThrow().insertNewAfter(n,r);if(R(o)){const i=Wg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return o.append(i),i}return null}}function Wg(e="",t){return Kr(new ic(e,t))}function so(e){return e instanceof ic}const $i=he("TOGGLE_LINK_COMMAND");function Kg(e,t){if(e.type==="element"){const n=e.getNode();return R(n)||(function(r,...o){const i=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const a of o)s.append("v",a);throw i.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),n.getChildren()[e.offset+t]||null}return null}function cu(e,t={}){let n;if(e&&typeof e=="object"){const{url:u,...f}=e;n=u,t={...f,...t}}else n=e;const{target:r,title:o}=t,i=t.rel===void 0?"noreferrer":t.rel,s=Z();if(s===null||!$(s)&&!ot(s))return;if(ot(s)){const u=s.getNodes();return u.length===0?void 0:void u.forEach(f=>{if(n===null){const d=at(f,h=>!so(h)&&ut(h));d&&(d.insertBefore(f),d.getChildren().length===0&&d.remove())}else{const d=at(f,h=>!so(h)&&ut(h));if(d)d.setURL(n),r!==void 0&&d.setTarget(r),i!==void 0&&d.setRel(i);else{const h=ko(n,{rel:i,target:r});f.insertBefore(h),h.append(f)}}})}const a=s.extract();if(n===null){const u=new Set;return void a.forEach(f=>{const d=f.getParent();if(ut(d)&&!so(d)){const h=d.getKey();if(u.has(h))return;(function(p,g){const m=new Set(g.filter(_=>p.isParentOf(_)).map(_=>_.getKey())),y=p.getChildren(),b=y.filter(_=>m.has(_.getKey()));if(b.length===y.length)return y.forEach(_=>p.insertBefore(_)),void p.remove();const v=y.findIndex(_=>m.has(_.getKey())),w=y.findLastIndex(_=>m.has(_.getKey())),A=v===0,C=w===y.length-1;if(A)b.forEach(_=>p.insertBefore(_));else if(C)for(let _=b.length-1;_>=0;_--)p.insertAfter(b[_]);else{for(let E=b.length-1;E>=0;E--)p.insertAfter(b[E]);const _=y.slice(w+1);if(_.length>0){const E=ko(p.getURL(),{rel:p.getRel(),target:p.getTarget(),title:p.getTitle()});b[b.length-1].insertAfter(E),_.forEach(N=>E.append(N))}}})(d,a),u.add(h)}})}const l=new Set,c=u=>{l.has(u.getKey())||(l.add(u.getKey()),u.setURL(n),r!==void 0&&u.setTarget(r),i!==void 0&&u.setRel(i),o!==void 0&&u.setTitle(o))};if(a.length===1){const u=a[0],f=at(u,ut);if(f!==null)return c(f)}(function(u){const f=Z();if(!$(f))return u();const d=Ri(f),h=d.isBackward(),p=Kg(d.anchor,h?-1:0),g=Kg(d.focus,h?0:-1);if(u(),p||g){const m=Z();if($(m)){const y=m.clone();if(p){const b=p.getParent();b&&y.anchor.set(b.getKey(),p.getIndexWithinParent()+(h?1:0),"element")}if(g){const b=g.getParent();b&&y.focus.set(b.getKey(),g.getIndexWithinParent()+(h?0:1),"element")}Pt(Ri(y))}}})(()=>{let u=null;for(const f of a){if(!f.isAttached())continue;const d=at(f,ut);if(d){c(d);continue}if(R(f)){if(!f.isInline())continue;if(ut(f)){if(!(so(f)||u!==null&&u.getParentOrThrow().isParentOf(f))){c(f),u=f;continue}for(const p of f.getChildren())f.insertBefore(p);f.remove();continue}}const h=f.getPreviousSibling();ut(h)&&h.is(u)?h.append(f):(u=ko(n,{rel:i,target:r,title:o}),f.insertAfter(u),u.append(f))}})}const e5=/^\+?[0-9\s()-]{5,}$/;function Hg(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:e5.test(e)?`tel:${e}`:`https://${e}`}function t5(e,t){return fn($s(()=>e.registerCommand($i,n=>{const r=t.validateUrl.peek(),o=t.attributes.peek();if(n===null)return cu(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(cu(n,o),!0);{const{url:i,target:s,rel:a,title:l}=n;return cu(i,{...o,rel:a,target:s,title:l}),!0}},Gn)),$s(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(Gl,o=>{const i=Z();if(!$(i)||i.isCollapsed()||!Sr(o,ClipboardEvent)||o.clipboardData===null)return!1;const s=o.clipboardData.getData("text");return!!n(s)&&!i.getNodes().some(a=>R(a))&&(e.dispatchCommand($i,{...r,url:s}),o.preventDefault(),!0)},Gn)}))}function n5({commentType:e,onCommentTypeChange:t,isCommentTypeEditable:n=!0,actions:r,setIsLinkEditMode:o,onAddAttachments:i}){const[s]=ht(),[a,l]=T.useState({bold:!1,italic:!1,underline:!1,strikethrough:!1,code:!1}),[c,u]=T.useState(null),f=T.useRef(null),d=T.useRef(null),h=uh[e];T.useLayoutEffect(()=>s.registerUpdateListener(({editorState:b})=>{b.read(()=>{const v=Z();if(!$(v))return;l({bold:v.hasFormat("bold"),italic:v.hasFormat("italic"),underline:v.hasFormat("underline"),strikethrough:v.hasFormat("strikethrough"),code:v.hasFormat("code")});let w=v.anchor.getNode(),A=null;for(;w;){if(ve(w)){const C=w.getListType();A=C==="bullet"||C==="number"?C:null;break}if(Se(w)){w=w.getParent();continue}w=w.getParent()}u(A)})}),[s]);const p=b=>{s.dispatchCommand(Cn,b)},g=()=>{c!=="bullet"?s.dispatchCommand(p1,void 0):s.dispatchCommand(Wf,void 0)},m=()=>{c!=="number"?s.dispatchCommand(m1,void 0):s.dispatchCommand(Wf,void 0)},y=()=>{s.update(()=>{const b=Z();if(!$(b))return;["bold","italic","underline","strikethrough","code"].forEach(w=>{b.hasFormat(w)&&s.dispatchCommand(Cn,w)})})};return x.jsxs("div",{className:_e("flex items-center w-full",r?"justify-between":"justify-end"),children:[x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(ff,{placement:"top-start",minWidth:"fit-content",title:"text formatting menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",children:x.jsx(ke,{icon:PS})}),children:x.jsxs("ul",{className:"flex items-start flex-col",children:[x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Bold",onClick:()=>p("bold"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.bold?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:kS,className:"mr-2"}),"Bold"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Italic",onClick:()=>p("italic"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.italic?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:ES,className:"mr-2"}),"Italic"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Underline",onClick:()=>p("underline"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.underline?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:AS,className:"mr-2"}),"Underline"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Strikethrough",onClick:()=>p("strikethrough"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.strikethrough?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:wS,className:"mr-2"}),"Strikethrough"]})}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Monospace",onClick:()=>p("code"),className:_e("cursor-pointer w-full h-full justify-start text-left p-2 hover:bg-gray-100",a.code?"text-white bg-primary-600 hover:bg-primary-700":"text-gray-400 hover:text-gray-400"),children:[x.jsx(ke,{icon:TS,className:"mr-2"}),"Monospace"]})}),x.jsx("hr",{className:"w-full border-gray-200"}),x.jsx("li",{className:"flex items-center w-full",children:x.jsxs("button",{type:"button",title:"Clear formatting",onClick:y,className:"cursor-pointer w-full h-full justify-start text-left p-2 text-gray-400 hover:text-gray-400 hover:bg-gray-100",children:[x.jsx(ke,{icon:_S,className:"mr-2"}),"Clear formatting"]})})]})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format bullet list",onClick:g,children:x.jsx(ke,{icon:MS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format numbered list",onClick:m,children:x.jsx(ke,{icon:SS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Format link",onClick:()=>{o(!0),s.dispatchCommand($i,"https://")},children:x.jsx(ke,{icon:OS})}),i&&x.jsxs(x.Fragment,{children:[x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add image",className:"border-l-1 border-gray-200 rounded-none",onClick:()=>{var b;(b=f.current)==null||b.click()},children:x.jsx(ke,{icon:CS})}),x.jsx(je,{category:"link",size:"smallCollapse",color:"gray400",title:"Add file",onClick:()=>{var b;(b=d.current)==null||b.click()},children:x.jsx(ke,{icon:NS})})]}),n&&x.jsx(ff,{placement:"top-end",title:"comment type menu",trigger:x.jsx(je,{category:"link",size:"smallCollapse",className:`${h.iconColor} border-l-1 border-gray-200 rounded-none`,children:x.jsx(ke,{icon:h.icon})}),children:x.jsx("ul",{className:"flex items-center justify-between gap-2 p-3",children:y1.map(b=>x.jsx("li",{children:x.jsx(je,{category:"link",size:"none",title:b.title,className:_e(b.color,e===b.type?b.color:"text-gray-400"),onClick:()=>t==null?void 0:t(b.type),children:x.jsx(ke,{icon:b.icon})})},b.type))})})]}),r,x.jsx("input",{type:"file",hidden:!0,id:"image-input",multiple:!0,ref:f,accept:"image/*",onChange:b=>{const v=b.target.files;v&&(i==null||i(v))}}),x.jsx("input",{type:"file",hidden:!0,id:"file-input",multiple:!0,ref:d,accept:"*",onChange:b=>{const v=b.target.files;v&&(i==null||i(v))}})]})}function r5({hasStrictIndent:e=!1}){const[t]=ht();return T.useEffect(()=>{if(!t.hasNodes([sa,ts]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),T.useEffect(()=>{if(e)return ZN(t)},[t,e]),(function(n){T.useEffect(()=>GN(n),[n])})(t),null}function o5({validateUrl:e,attributes:t}){const[n]=ht();return T.useEffect(()=>{if(!n.hasNodes([Ho]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),T.useEffect(()=>t5(n,Gx({attributes:t,validateUrl:e})),[n,e,t]),null}const i5=new Set(["http:","https:","mailto:","sms:","tel:"]);function qg(e){try{const t=new URL(e);if(!i5.has(t.protocol))return"about:blank"}catch{return e}return e}function Vg(e,t,n,r=10,o=5){const i=n.parentElement;if(e===null||!i){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}const s=t.getBoundingClientRect(),a=n.getBoundingClientRect(),l=i.getBoundingClientRect();let c=e.top-r,u=e.left-o;c<l.top&&(c+=s.height+e.height+r*2),u+s.width>l.right&&(u=l.right-s.width-o),c-=a.top,u-=a.left,t.style.opacity="1",t.style.transform=`translate(${u}px, ${c}px)`}function wl(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?gg(n)?r:o:gg(t)?r:o}function s5({editor:e,isLink:t,setIsLink:n,anchorElem:r,isLinkEditMode:o,setIsLinkEditMode:i}){const s=T.useRef(null),[a,l]=T.useState(""),[c,u]=T.useState("https://"),[f,d]=T.useState(null),h=T.useCallback(()=>{var A,C;const m=Z();if($(m)){const _=wl(m),E=at(_,ut);E?l(E.getURL()):ut(_)?l(_.getURL()):l(""),o&&u(a)}else if(ot(m)){const _=m.getNodes();if(_.length>0){const E=_[0],N=E.getParent();ut(N)?l(N.getURL()):ut(E)?l(E.getURL()):l(""),o&&u(a)}}const y=s.current,b=en(e._window),v=document.activeElement;if(y===null)return;const w=e.getRootElement();if(m!==null&&w!==null&&e.isEditable()){let _;if(ot(m)){const E=m.getNodes();if(E.length>0){const N=e.getElementByKey(E[0].getKey());N&&(_=N.getBoundingClientRect())}}else b!==null&&w.contains(b.anchorNode)&&(_=(C=(A=b.focusNode)==null?void 0:A.parentElement)==null?void 0:C.getBoundingClientRect());_&&(_.y+=40,Vg(_,y,r)),d(m)}else(!v||v.className!=="link-input")&&(w!==null&&Vg(null,y,r),d(null),i(!1),l(""));return!0},[r,e,i,o,a]);T.useEffect(()=>{const m=r.parentElement,y=()=>{e.getEditorState().read(()=>{h()})};return window.addEventListener("resize",y),m&&m.addEventListener("scroll",y),()=>{window.removeEventListener("resize",y),m&&m.removeEventListener("scroll",y)}},[r.parentElement,e,h]),T.useEffect(()=>fn(e.registerUpdateListener(({editorState:m})=>{m.read(()=>{h()})}),e.registerCommand(Ql,()=>(h(),!0),Gn),e.registerCommand(Rd,()=>t?(n(!1),!0):!1,o6)),[e,h,n,t]),T.useEffect(()=>{e.getEditorState().read(()=>{h()})},[e,h]),T.useEffect(()=>{const m=s.current;if(m===null)return;const y=b=>{!m.contains(b.relatedTarget)&&t&&(n(!1),i(!1))};return m.addEventListener("focusout",y),()=>{m.removeEventListener("focusout",y)}},[n,i,t]);const p=m=>{m.key==="Enter"?g(m):m.key==="Escape"&&(m.preventDefault(),i(!1))},g=m=>{m.preventDefault(),f!==null&&(a!==""&&e.update(()=>{e.dispatchCommand($i,qg(c));const y=Z();if($(y)){const b=wl(y).getParent();if(so(b)){const v=ko(b.getURL(),{rel:b.__rel,target:b.__target,title:b.__title});b.replace(v,!0)}}}),u("https://"),i(!1))};return x.jsx("div",{ref:s,className:"absolute flex top-0 left-0 shadow-lg bg-white z-10 rounded-sm w-full max-w-400",children:t?o?x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx(Ny,{containerClassName:"px-0 mr-2",autoFocus:!0,className:"mt-0",value:c,onChange:m=>{u(m.target.value)},onKeyDown:m=>{p(m)}}),x.jsxs("div",{className:"flex justify-center items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{i(!1)},children:x.jsx(ke,{icon:Dl})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:g,children:x.jsx(ke,{icon:zy})})]})]}):x.jsxs("div",{className:"flex justify-between w-full items-center p-2",children:[x.jsx("a",{href:qg(a),target:"_blank",rel:"noopener noreferrer",children:a}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>{u(a),i(!0)},children:x.jsx(ke,{icon:Qk})}),x.jsx(je,{size:"none",category:"link",color:"gray400",tabIndex:0,onMouseDown:m=>m.preventDefault(),onClick:()=>e.dispatchCommand($i,null),children:x.jsx(ke,{icon:sC})})]})]}):null})}function a5(e,t,n,r){const[o,i]=T.useState(e),[s,a]=T.useState(!1);return T.useEffect(()=>{function l(){const c=Z();if($(c)){const u=wl(c),f=at(u,ut),d=at(u,so);if(!(f||d)){a(!1);return}const h=c.getNodes().filter(p=>!xo(p)).find(p=>{const g=at(p,ut),m=at(p,so);return f&&!f.is(g)||g&&!g.is(f)||d&&!d.is(m)||m&&(!m.is(d)||m.getIsUnlinked())});a(!h)}else if(ot(c)){const u=c.getNodes();if(u.length===0){a(!1);return}const f=u[0],d=f.getParent();ut(d)||ut(f)?a(!0):a(!1)}}return fn(e.registerUpdateListener(({editorState:c})=>{c.read(()=>{l()})}),e.registerCommand(Ql,(c,u)=>(l(),i(u),!1),hx),e.registerCommand(Md,c=>{const u=Z();if($(u)){const f=wl(u),d=at(f,ut);if(ut(d)&&(c.metaKey||c.ctrlKey))return window.open(d.getURL(),"_blank"),!0}return!1},Gn))},[e]),Nn.createPortal(x.jsx(s5,{editor:o,isLink:s,anchorElem:t,setIsLink:a,isLinkEditMode:n,setIsLinkEditMode:r}),t)}function l5({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[r]=ht();return a5(r,e,t,n)}const c5=({url:e,onDelete:t})=>x.jsxs("div",{className:"relative",children:[x.jsx("img",{src:e,alt:"Thumbnail",width:75,height:75,className:"w-[75px] h-[75px] object-cover rounded-lg border border-gray-200"}),x.jsx(je,{size:"smallCollapse",title:"Delete attachment",onClick:t,className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",color:"secondary",children:x.jsx(ke,{icon:jy})})]}),u5=({onRemoveFile:e,type:t,label:n})=>{const r=t.toLowerCase(),o=Ib(r);return x.jsxs("div",{className:"relative flex items-center justify-center rounded border border-gray-200",children:[x.jsx(je,{size:"smallCollapse",color:"secondary",className:"absolute top-1 left-1 w-[20px] h-[20px] rounded-full",title:"Remove file",onClick:e,children:x.jsx(ke,{icon:jy})}),x.jsxs("div",{className:"flex items-center justify-center mx-2",children:[x.jsx("span",{className:"text-primary-600 my-2",children:x.jsx(ke,{icon:o,size:"3x",className:"text-primary-600"})}),x.jsx("span",{className:"font-bold p-2",children:n})]})]})},f5=({clearKey:e})=>{const[t]=ht(),n=T.useRef(e);return T.useEffect(()=>{n.current!==e&&(t.update(()=>{We().clear()}),n.current=e)},[e,t]),null},d5=({isOpen:e})=>{const[t]=ht(),n=T.useRef(!1);return T.useEffect(()=>{if(!e){n.current=!1;return}if(n.current)return;const r=()=>{const o=t.getRootElement();if(!o){requestAnimationFrame(r);return}n.current=!0;const i=window.scrollX,s=window.scrollY;try{o.focus({preventScroll:!0})}catch{o.focus()}requestAnimationFrame(()=>window.scrollTo(i,s)),setTimeout(()=>window.scrollTo(i,s),0)};r()},[t,e]),null},h5=({initialValue:e})=>{const[t]=ht(),n=T.useCallback((o,i)=>{const a=new DOMParser().parseFromString(i,"text/html");return t1(o,a)},[]),r=T.useRef(!1);return T.useEffect(()=>{!r.current&&e&&(t.update(()=>{We().clear(),sx(n(t,e))}),r.current=!0)},[t,e,n]),null},p5=({onChange:e})=>{const[t]=ht();return x.jsx(DN,{onChange:n=>{n.read(()=>{const r=n1(t,null);e(r)})}})},m5=({onAddAttachments:e})=>{const[t]=ht();return T.useEffect(()=>{if(!e)return;const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.clipboardData;if(!i)return;const s=i.items;let a=!1;for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){a=!0;break}}if(a){for(let l=0;l<s.length;l++){const c=s[l];if(c.kind==="file"&&c.type.startsWith("image/")){const u=c.getAsFile();if(u){const f=Date.now(),d=u.type.split("/")[1]||"png",h=`image_${f}.${d}`,p=new File([u],h,{type:u.type});e==null||e([p])}}}o.preventDefault(),o.stopPropagation()}};return n.addEventListener("paste",r,!0),()=>{n.removeEventListener("paste",r,!0)}},[t,e]),null},g5=({onSubmit:e})=>{const[t]=ht();return T.useEffect(()=>{if(e)return t.registerCommand(Fs,n=>n&&!n.shiftKey?(n.preventDefault(),e(),!0):!1,1)},[t,e]),null},y5=({setIsLinkEditMode:e})=>{const[t]=ht();return T.useEffect(()=>{const n=t.getRootElement();if(!n)return;const r=o=>{const i=o.metaKey||o.ctrlKey,s=o.key==="k"||o.key==="K";i&&s&&t.getEditorState().read(()=>{const a=Z();$(a)&&!a.isCollapsed()&&(o.preventDefault(),e(!0),t.dispatchCommand($i,"https://"))})};return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}},[t,e]),null};function g1({attachments:e,clearKey:t=0,inputFieldClassName:n="",containerClassName:r="",initialValue:o,onChange:i,commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l=!0,actions:c,onAddAttachments:u,onRemoveAttachment:f,onSubmit:d,isOpen:h}){const p={namespace:"comment-editor",theme:UN,nodes:[sa,ts,Ho],onError:A=>{console.error(A)}},[g,m]=T.useState(null),[y,b]=T.useState(!1),v=A=>{A!==null&&m(A)},w=uh[s];return x.jsx("div",{className:r,children:x.jsxs(L6,{initialConfig:p,children:[x.jsxs("div",{className:"relative",children:[x.jsx(_N,{contentEditable:x.jsx("div",{ref:v,children:x.jsx(MN,{className:_e("p-3 outline-none border-0 w-full border-t border-gray-200 rounded-none border-l-3",w.bg,w.border,w.fontColor,n)})}),placeholder:x.jsx("div",{className:"absolute top-3 left-4 text-gray-400 pointer-events-none",children:"Type comment…"}),ErrorBoundary:$N}),x.jsx(r5,{}),x.jsx(o5,{}),g&&x.jsx(l5,{anchorElem:g,isLinkEditMode:y,setIsLinkEditMode:b}),x.jsx(NN,{}),x.jsx(h5,{initialValue:o}),x.jsx(p5,{onChange:i}),x.jsx(g5,{onSubmit:d}),x.jsx(y5,{setIsLinkEditMode:b}),x.jsx(f5,{clearKey:t}),x.jsx(m5,{onAddAttachments:u}),x.jsx(d5,{isOpen:h})]}),e&&e.length>0&&x.jsx("div",{className:"flex flex-wrap justify-start gap-2 p-4",children:e.map(A=>md(A.type)?x.jsx(c5,{url:A.url,onDelete:()=>f==null?void 0:f(A.originFile)},A.originFile.name):x.jsx(u5,{type:A.type,label:A.name,onRemoveFile:()=>f==null?void 0:f(A.originFile)},A.originFile.name))}),x.jsx("div",{className:"border-t border-gray-200 p-2 flex justify-end",children:x.jsx(n5,{commentType:s,onCommentTypeChange:a,isCommentTypeEditable:l,actions:c,setIsLinkEditMode:b,onAddAttachments:u})})]})})}const b5=({asset:e,onSetActiveSrc:t})=>x.jsxs("div",{className:"relative border border-gray-200 rounded-md h-[110px] w-full hover:border-primary-500",children:[x.jsx("img",{src:za(e),onClick:()=>t(za(e)),onKeyDown:n=>{n.key==="Enter"&&t(za(e))},alt:e.name,className:"w-full h-full object-cover rounded-md object-center cursor-zoom-in"}),(e==null?void 0:e.uploading)&&x.jsx("div",{className:"absolute bottom-2 w-full max-w-md mx-auto px-2",children:x.jsx("div",{className:"relative h-2 overflow-hidden rounded-full bg-gray-200",children:x.jsx("div",{className:"absolute left-0 top-0 h-full w-1/3 rounded-full bg-blue-500 animate-progress"})})})]}),v5=({asset:e})=>{var r,o;const t=((o=(r=e==null?void 0:e.mimeType)==null?void 0:r.split("/").pop())==null?void 0:o.toLowerCase())||"",n=Ib(t);return x.jsxs("div",{className:"flex gap-2",children:[(e==null?void 0:e.uploading)&&x.jsx("div",{className:"flex items-center justify-center",children:x.jsx("div",{className:"h-4 w-4 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin"})}),x.jsx(ke,{icon:n,size:"lg",className:"text-primary-600"}),x.jsx("a",{href:za(e),className:"text-sm text-blue-600 underline",download:!0,target:"_blank",rel:"noopener noreferrer",children:e.name})]})},x5=({commentType:e=dt.INFO,author:t,username:n,comment:r,createdDate:o,onDelete:i,onEdit:s,hasAssets:a,taskAssets:l,taskVerified:c})=>{const f={[dt.INFO]:{bg:"bg-primary-100",border:"border-primary-200",icon:Dy,iconColor:"text-primary-600 hover:text-primary-600",text:"text-primary-900"},[dt.WARNING]:{bg:"bg-warning-100",border:"border-warning-200",icon:My,iconColor:"text-warning-600 hover:text-warning-600",text:"text-warning-900"},[dt.DANGER]:{bg:"bg-danger-100",border:"border-danger-200",icon:$y,iconColor:"text-danger-600 hover:text-danger-600",text:"text-danger-900"},[dt.SUCCESS]:{bg:"bg-success-100",border:"border-success-200",icon:Ly,iconColor:"text-success-600 hover:text-success-600",text:"text-success-900"}}[e],d=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(o||"")).replace(",",""),[h,p]=T.useState(!1),[g,m]=T.useState(zc(r)),[y,b]=T.useState(e),[v,w]=T.useState(""),A=()=>{p(!0)},C=()=>{const N=of.sanitize(g);s(N,y),p(!1)},_=N=>{const P=of.sanitize(g);b(N),s(P,N),p(!1)},E=()=>{p(!1)};return x.jsxs("div",{className:"flex items-start space-x-4 w-full",children:[x.jsx(KT,{alt:t}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:`border ${f.border} rounded-sm ${f.bg} shadow-sm flex flex-col items-start justify-between w-full`,children:[x.jsx("div",{className:"p-3 flex flex-col items-start justify-between w-full",children:x.jsxs("div",{className:"w-full",children:[x.jsxs("div",{className:"flex items-center mb-2 justify-between",children:[x.jsxs("div",{children:[x.jsx(ke,{icon:f.icon,size:"lg",className:`mr-2 ${f.iconColor}`}),x.jsx("span",{className:`font-semibold text-sm ${f.text}`,children:t})]}),x.jsx(qT,{commentType:e,taskVerified:c,isUsernameAuthor:n.trim()===t.trim(),onEdit:A,onSaveCommentType:_,onDelete:i})]}),h?x.jsx(g1,{inputFieldClassName:"bg-white border-0 rounded-sm",containerClassName:"bg-white border-0 rounded-sm",onChange:m,commentType:e,isCommentTypeEditable:!1,initialValue:zc(r),actions:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(je,{category:"outline",size:"smallCollapse",color:"secondary",onClick:E,title:"Cancel edit",children:"Cancel"}),x.jsx(je,{category:"solid",size:"smallCollapse",color:"primary",onClick:C,title:"Save edit",disabled:$a(g),children:"Save"})]})}):x.jsx("div",{className:`text-sm ${f.text}`,dangerouslySetInnerHTML:{__html:zc(r)}})]})}),a&&l&&(l==null?void 0:l.length)>0&&x.jsx("div",{className:`${f.border} border-t w-full p-2 flex gap-2 flex-wrap`,children:l.map(N=>x.jsx(T.Fragment,{children:md(N.mimeType)?x.jsx(b5,{asset:N,onSetActiveSrc:w}):x.jsx(v5,{asset:N})},N.assetId))})]}),x.jsxs("div",{className:"flex gap-2 my-1",children:[o&&x.jsx("time",{dateTime:o,className:"text-xs text-gray-500 opacity-60",children:d}),c&&x.jsxs("span",{className:"text-xs text-success-600 font-semibold flex items-center gap-1",children:[x.jsx(ke,{icon:Ry}),"Comment Required"]})]})]}),x.jsx(_T,{plugins:[BT],open:!!v,zoom:{maxZoomPixelRatio:2},close:()=>w(""),styles:{root:{zIndex:9999999999}},carousel:{finite:!0,preload:0},controller:{closeOnBackdropClick:!0},slides:[{src:v}]})]})},uh={[dt.INFO]:{icon:cC,bg:"bg-primary-100",border:"border-l-primary-500",iconColor:"text-primary-600 hover:text-primary-700",fontColor:"text-primary-900"},[dt.WARNING]:{icon:Gk,bg:"bg-warning-100",border:"border-l-warning-500",iconColor:"text-warning-600 hover:text-warning-700",fontColor:"text-warning-900"},[dt.DANGER]:{icon:dC,bg:"bg-danger-100",border:"border-l-danger-500",iconColor:"text-danger-600 hover:text-danger-700",fontColor:"text-danger-900"},[dt.SUCCESS]:{icon:Ry,bg:"bg-success-100",border:"border-l-success-500",iconColor:"text-success-600 hover:text-success-700",fontColor:"text-success-900"}},y1=Object.entries(uh).map(([e,t])=>({type:e,icon:t.icon,color:t.iconColor,title:`Change comment type to ${e}`})),w5=({comments:e,onClose:t,isOpen:n,taskName:r,taskInstanceId:o,isLoading:i,playbookInstanceId:s,taskVerification:a})=>{const[l,c]=T.useState(""),[u,f]=T.useState(dt.INFO),[d,h]=T.useState(0),[p,g]=T.useState([]),m=T.useRef(null),{username:y}=b1(),{manageComment:b}=h4({playbookInstanceId:s}),v=()=>{const P=p.length,W=p.some(z=>!md(z.mimeType))?"Attachment":"Image",j=P>1?"s":"";return`<p class="m-0"><span style="white-space: pre-wrap;">${W}${j} added.</span></p>`},w=P=>{const I=Array.from(P).map((W,j)=>o4(W,p.length+j+1));g(W=>[...W,...I])},A=P=>{g(I=>I.filter(W=>W.originFile!==P))},C=P=>{f(P)},_=async()=>{if(!p.length&&$a(l)||!o)return;p.length>0&&g([]);const P=of.sanitize(l);c(""),h(I=>I+1),await b({action:"add",comment:p.length>0&&$a(l)?v():P,username:y||"",commentType:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,hasAssets:p.length>0,taskInstanceId:o,taskVerified:a,attachments:p}),f(dt.INFO)},E=async P=>{o&&await b({username:y||"",action:"delete",taskVerified:!1,taskInstanceId:o,commentId:P})},N=async({commentId:P,comment:I,commentType:W,hasAssets:j,isAlreadyVerified:z})=>{o&&await b({action:"edit",username:y||"",...I&&{comment:I},taskInstanceId:o,commentId:P,hasAssets:j,taskVerified:z,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,commentType:W})};return T.useLayoutEffect(()=>{m.current&&n&&!i&&e.length>0&&(m.current.scrollTop=m.current.scrollHeight)},[n,i,e.length]),x.jsxs("div",{className:_e("transition-all duration-300 fixed bg-white right-0 bottom-0 h-[100vh] z-[9999999998] flex flex-col min-w-[270px] max-w-[420px] w-[calc(100vw-1rem)] border border-gray-200 rounded-t-sm overflow-hidden",n?"translate-y-0 opacity-100":"translate-y-full opacity-0 pointer-events-none"),children:[x.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-gray-200 px-2 py-4 w-full",children:[x.jsx("h6",{className:"font-semibold text-gray-900 truncate max-w-[300px]",children:r}),x.jsx(je,{color:"grayLight",size:"smallCollapse",rounded:"none",title:"Close comment box",onClick:t,children:x.jsx(ke,{icon:Dl,className:"size-4 text-gray-300"})})]}),x.jsxs("div",{ref:m,className:"flex flex-col flex-1 overflow-y-auto",children:[x.jsxs("div",{className:"flex flex-col justify-end flex-1 gap-4 p-4 pb-[102px]",children:[i&&x.jsx("div",{className:"flex flex-col gap-3",children:[1,2,3].map(P=>x.jsx("div",{className:"h-16 animate-pulse rounded-lg bg-gray-100"},P))}),(e==null?void 0:e.length)>0&&!i&&e.map(P=>x.jsx(x5,{username:y||"",onDelete:()=>E(P.commentId),onEdit:(I,W)=>N({commentId:P.commentId,comment:I,commentType:W,hasAssets:P.hasAssets,isAlreadyVerified:P.taskVerified}),...P},P.commentId)),(e==null?void 0:e.length)===0&&!i&&x.jsxs("div",{className:"flex flex-1 flex-col items-center justify-end gap-3 text-center mb-1",children:[x.jsx("img",{src:n4,className:"opacity-70",alt:"Empty"}),x.jsx("p",{className:"text-gray-400",children:"There is no discussion in this Task."})]})]}),x.jsx(g1,{attachments:p,onChange:c,containerClassName:"fixed bottom-0 left-0 right-0 bg-white",clearKey:d,commentType:u,onCommentTypeChange:C,onAddAttachments:w,onRemoveAttachment:A,onSubmit:_,isOpen:n,actions:x.jsx(je,{category:"link",size:"normalCollapse",title:"Send comment",onClick:_,disabled:$a(l)&&p.length===0,children:x.jsx(ke,{icon:IS})})})]})]})},Kf=T.createContext({comments:[],openTaskDetails:null,username:void 0,setOpenTaskDetails:()=>{},prefetchQuery:e=>{}}),b1=()=>{if(!T.useContext(Kf))throw new Error("useCommentContext must be used within a CommentProvider");return T.useContext(Kf)},A5=({playbookInstanceId:e,children:t,username:n})=>{const[r,o]=T.useState({taskInstanceId:null,taskName:"",taskVerification:!1}),{taskInstanceId:i,taskName:s,taskVerification:a}=r||{taskInstanceId:null,taskName:"",taskVerification:!1},{comments:l,isLoading:c,prefetchQuery:u}=c4({taskInstanceId:i||0,enabled:i!==null,username:n});return x.jsxs(Kf.Provider,{value:{comments:l,openTaskDetails:r,setOpenTaskDetails:o,prefetchQuery:u,username:n},children:[t,Nn.createPortal(x.jsxs("div",{id:"cnfdnc-comment-box-root",children:[x.jsx("style",{children:Cl}),x.jsx("div",{className:"confidence-playbook",children:x.jsx(w5,{playbookInstanceId:e,comments:l,onClose:()=>o(null),isOpen:!!i,taskName:s,taskInstanceId:i,isLoading:c,taskVerification:a})})]}),LS)]})},k5={[Be.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[Be.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[Be.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[Be.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},Bn={PHOTO:"photo",SCREENSHOT:"screenshot",COMMENT:"comment",NO_VERIFICATION:null},C5=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:i=!1,isExpanded:s=!1,toggleExpanded:a,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,d]=T.useState(!1),{taskDetails:h,prefetchQuery:p}=DE({taskId:e.taskId,playbookId:l,enabled:s}),{setOpenTaskDetails:g,prefetchQuery:m}=b1(),{buttons:y}=Bw({taskStatus:e.workflowStatus,canStart:i}),b=T.useMemo(()=>e.imageRequired===0?Bn.NO_VERIFICATION:e.imageRequired===1?Bn.SCREENSHOT:e.imageRequired===2?Bn.PHOTO:e.imageRequired===4?Bn.COMMENT:null,[e.imageRequired]),v=async w=>{try{d(!0),await r(w)}finally{d(!1)}};if(o==="list"){const w=T.useMemo(()=>e.workflowStatus===Be.COMPLETED?"success":e.workflowStatus===Be.IN_PROGRESS?"primary":"default",[e.workflowStatus]),A=T.useMemo(()=>{const C=[];return y.forEach(_=>{_==="START"&&C.push({id:"START",color:"primary",action:"Start",to:Be.IN_PROGRESS}),_==="COMPLETE"&&(!e.taskVerified&&b===Bn.COMMENT&&C.push({id:"ADD_COMMENT",color:"danger",action:"Add Comment",to:"Required"}),C.push({id:"COMPLETE",color:"success",action:"Complete",to:Be.COMPLETED,disabled:!e.taskVerified&&b===Bn.COMMENT}))}),C},[y,b,e.taskVerified]);return x.jsxs("div",{className:_e("flex flex-col"),children:[x.jsxs("div",{className:_e("flex items-center gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",s&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:s?u:0},children:[x.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),x.jsx("div",{onClick:()=>{a==null||a(!s)},onMouseOver:p,className:_e("flex-1 truncate cursor-pointer",s&&"font-medium",e.workflowStatus===Be.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===Be.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),x.jsx(hS,{taskVerified:e.taskVerified,verificationType:b,title:e.workflowStatus,variant:w,transitions:A,onClick:C=>{if(C===ui.ADD_COMMENT){g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!0});return}r(C)}}),x.jsx(Yp,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})})]}),(h==null?void 0:h.description)&&x.jsx("div",{className:_e(!s&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-[1px] bg-gray-100 rounded-b-md"),children:x.jsx(Vp,{description:(h==null?void 0:h.description)||""})})]})}return x.jsxs("div",{className:Es("flex items-stretch rounded-sm overflow-hidden border",k5[e.workflowStatus]),children:[x.jsx(yS,{playbookType:n,status:e.workflowStatus,step:t}),x.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&x.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:x.jsx(vS,{status:e.workflowStatus})}),x.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[x.jsx("div",{className:_e("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),b?x.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[x.jsx(ke,{icon:Iy,className:"size-4"}),x.jsxs("div",{children:[x.jsx("span",{className:"font-medium",children:b===Bn.PHOTO?"Photo":b===Bn.SCREENSHOT?"Screenshot":"Comment"})," ","required"]})]}):x.jsx(x.Fragment,{})]}),(h==null?void 0:h.description)&&x.jsx("div",{className:_e(!s&&"hidden"),children:x.jsx(Vp,{description:(h==null?void 0:h.description)||""})}),(y.length>0||e.hasDescription)&&x.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[x.jsx("div",{className:"flex-1",children:x.jsx(FE,{buttons:y,onButtonClick:v,disabled:f})}),x.jsx(Yp,{onMouseOver:()=>m(e.taskInstanceId),commentsCount:(e==null?void 0:e.numberOfComments)||0,commentType:(e==null?void 0:e.recentCommentType)||dt.INFO,onClick:()=>g({taskInstanceId:e.taskInstanceId,taskName:e.taskInstanceName,taskVerification:!1})}),a&&x.jsx(je,{size:"smallCollapse",onMouseOver:p,category:"link",onClick:()=>{a()},title:s?"Hide task description":"Show task description",children:x.jsx(ke,{icon:Fy,className:Es("cursor-pointer text-[#0069D9]",s?"rotate-180":"")})})]})]})]})},v1=T.forwardRef(({title:e,className:t,playbookStyle:n,...r},o)=>{var i,s,a;return x.jsx("div",{ref:o,className:_e("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((i=n==null?void 0:n.whiteLabel)==null?void 0:i.titleBackgroundColor)||"#f8f9fa"},...r,children:x.jsx("div",{className:_e("text-xl min-h-16 p-4 font-medium flex-1",{"text-dark":!((s=n==null?void 0:n.whiteLabel)!=null&&s.titleTextColor)}),style:{color:(a=n==null?void 0:n.whiteLabel)==null?void 0:a.titleTextColor},children:e})})});v1.displayName="PlaybookHeader";const _5=Cl.replace(/:root,\s*:host/g,":host"),E5=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:r=!0})=>{const{playbook:o,actions:i}=$w(e);if(!o)return x.jsx("div",{});const s=async(a,l)=>{var c;if(a===ui.COMPLETE){const u=(c=o.tasks.find(f=>f.taskInstanceId===l))==null?void 0:c.sequenceOrder;if(u===void 0){console.error("Task not found in playbook");return}return i.completeTask(l,u)}if(a===ui.START)return i.startTask(l)};return x.jsx("div",{className:"confidence-playbook",children:x.jsx(x1,{playbook:o,playbookMode:t,onTaskButtonClick:s,playbookStyle:n,defaultExpanded:r})})},S5=({className:e,children:t,numberOfTasks:n,playbookMode:r})=>x.jsxs("div",{className:_e("w-full p-4",e),children:[n&&x.jsxs("div",{className:_e(r==="card"&&"mb-4"),children:[x.jsx("span",{className:"font-medium",children:"Tasks"})," (",n,")"]}),x.jsx("div",{className:_e(r==="card"&&"space-y-4"),children:t})]}),x1=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r,defaultExpanded:o=!0})=>{var y,b,v,w,A;const{playbookInstanceName:i,tasks:s}=e,a=T.useRef(null),[l,c]=T.useState(0),[u,f]=T.useState(()=>{const C=M2(e.playbookInstanceId);return C!==null?C:o}),d=()=>{f(C=>{const _=!C;return P2(e.playbookInstanceId,_),_})},{isTaskExpanded:h,toggleTaskExpanded:p,isAtLeastOneTaskExpanded:g}=T0(e.playbookInstanceId,{onTaskExpanded:()=>{var C;c(((C=a.current)==null?void 0:C.offsetHeight)||0)}});T.useEffect(()=>{if(g){if(!a.current)throw new Error("Playbook header ref is not set");new ResizeObserver(_=>{var E;for(const N of _)N.contentRect&&c(((E=a.current)==null?void 0:E.offsetHeight)||0)}).observe(a.current)}return()=>{a.current&&new ResizeObserver(()=>{}).unobserve(a.current)}},[g]);const m=T.useMemo(()=>{const C=s.filter(_=>_.workflowStatus===Be.COMPLETED).sort((_,E)=>E.sequenceOrder-_.sequenceOrder)[0];return C?C.sequenceOrder+1:0},[s]);return x.jsxs("div",{className:_e(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[9999999997] flex","transition-all duration-300 ease-in-out "),...(r==null?void 0:r.overlay)&&{style:{width:"100%",maxWidth:u?((y=r.overlay.size)==null?void 0:y.width)||450:"2.25rem",height:((b=r.overlay.size)==null?void 0:b.height)||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:((v=r.overlay.offset)==null?void 0:v.right)!==void 0?r.overlay.offset.right:r.overlay.position==="right"?32:void 0,left:((w=r.overlay.offset)==null?void 0:w.left)!==void 0?r.overlay.offset.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&x.jsx("div",{onClick:d,className:_e("size-9 relative p-1 top-3 z-[9999999997] border-none rounded-l-sm cursor-pointer"),style:{backgroundColor:((A=r==null?void 0:r.whiteLabel)==null?void 0:A.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:x.jsx("img",{src:h0,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),x.jsxs("div",{className:_e("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[x.jsx(v1,{title:i,className:_e("top-0 sticky z-2"),playbookStyle:r,ref:a}),x.jsx(S5,{playbookMode:t,numberOfTasks:e.numberofTasks,children:s.map((C,_)=>{var E;return x.jsx(C5,{task:C,step:_+1,viewMode:t,playbookId:e.playbookId,canStart:C.sequenceOrder===m,onButtonClick:N=>n(N,C.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(E=r==null?void 0:r.whiteLabel)==null?void 0:E.primaryColor},isExpanded:h(C.taskInstanceId),toggleExpanded:()=>p(C.taskInstanceId),listStickyTopBase:l||104},C.taskId)})})]})]})},T5=({email:e,playbookId:t,playbookMode:n,playbookStyle:r,bank:o="public-sdk",timezone:i="America/Los_Angeles",persistKey:s,defaultExpanded:a=!0})=>{const[l,c]=T.useState(null);return T.useEffect(()=>{(async()=>{const u=q0(t,s);if(u&&u.email===e){c(u.playbookInstanceId);return}const{playbookInstanceId:f,errorCode:d,details:h,message:p}=await N0({bank:o,email:e,timezone:i,playbookUid:t})||{};if(d)throw new Error(`Error initiating playbook: ${p} (Code: ${d}) - Details: ${h}`);if(!f)throw new Error("No playbook instance ID returned from initiation");H0(t,f,e,s),c(f)})()},[]),l?x.jsx(Hr,{playbookInstanceId:l,playbookMode:n,playbookStyle:r,username:e,defaultExpanded:a}):null},N5=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook",btnColor:o="primary",persistKey:i,defaultExpanded:s=!0})=>{const[a,l]=T.useState(null),[c,u]=T.useState(void 0);return T.useEffect(()=>{const f=q0(e,i);f&&(l(f.playbookInstanceId),u(f.email))},[e,i]),x.jsxs(x.Fragment,{children:[x.jsxs(Al.div,{children:[x.jsx(Wk,{playbookId:e,disabled:!!a,onInitiated:(f,d)=>{H0(e,f,d,i),l(f),u(d)},btnLabel:r,btnColor:o}),x.jsx("style",{type:"text/css",children:_5})]}),a&&x.jsx(Hr,{playbookInstanceId:a,playbookMode:t,playbookStyle:n,username:c,defaultExpanded:s})]})},Hr=({playbookInstanceId:e,playbookMode:t,playbookStyle:n,username:r,defaultExpanded:o=!0})=>(console.log("Starting ConfidencePlaybook with instance ID:",e,r),x.jsx(E0,{children:x.jsx(A5,{playbookInstanceId:e,username:r,children:x.jsx(E5,{playbookInstanceId:e,playbookMode:t,playbookStyle:n,defaultExpanded:o})})}));Hr.Context=E0;Hr.View=x1;Hr.AutoInstantiated=T5;Hr.WithInstantiateButton=N5;const w1=Cl.replace(/:root,\s*:host/g,":host"),A1=e=>Nn.createPortal(x.jsxs(Al.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:w1}),x.jsx(Hr,{...e})]}),document.body),O5=e=>Nn.createPortal(x.jsxs(Al.div,{style:{position:"relative",zIndex:2147483646},children:[x.jsx("style",{children:w1}),x.jsx(Hr.AutoInstantiated,{...e})]}),document.body);A1.AutoInstantiated=O5;exports.ConfidencePlaybook=A1;
|